aedi: update module target handling to the current version of cmake

`_IMPORT_CHECK_TARGETS` and `_IMPORT_CHECK_FILES_FOR_...` were replaced with `_cmake_import_check_targets` and `_cmake_import_check_files_for_...` in cmake 3.24.0, see 59cc92085e
This commit is contained in:
alexey.lysiuk 2023-04-04 13:07:16 +03:00
parent 8435672098
commit 477a2c88be

View file

@ -462,8 +462,8 @@ class CMakeStaticDependencyTarget(CMakeTarget):
def keep_module_target(self, state: BuildState, target: str): def keep_module_target(self, state: BuildState, target: str):
import_patterns = ( import_patterns = (
r'list\s*\(APPEND\s+_IMPORT_CHECK_TARGETS\s+(?P<target>\w+::[\w-]+)[\s)]', r'list\s*\(APPEND\s+_cmake_import_check_targets\s+(?P<target>\w+::[\w-]+)[\s)]',
r'list\s*\(APPEND\s+_IMPORT_CHECK_FILES_FOR_(?P<target>\w+::[\w-]+)\s', r'list\s*\(APPEND\s+_cmake_import_check_files_for_(?P<target>\w+::[\w-]+)\s',
) )
import_regexes = [re.compile(regex, re.IGNORECASE) for regex in import_patterns] import_regexes = [re.compile(regex, re.IGNORECASE) for regex in import_patterns]