diff --git a/conans/client/generators/cmake_find_package.py b/conans/client/generators/cmake_find_package.py index d759759dc98..f96bbf5afc9 100644 --- a/conans/client/generators/cmake_find_package.py +++ b/conans/client/generators/cmake_find_package.py @@ -31,17 +31,17 @@ class CMakeFindPackageGenerator(GeneratorComponentsMixin, Generator): {find_libraries_block} if(NOT ${{CMAKE_VERSION}} VERSION_LESS "3.0") # Target approach - if(NOT TARGET {name}::{name}) - add_library({name}::{name} INTERFACE IMPORTED) + if(NOT TARGET {namespace}::{name}) + add_library({namespace}::{name} INTERFACE IMPORTED) if({name}_INCLUDE_DIRS) - set_target_properties({name}::{name} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES + set_target_properties({namespace}::{name} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${{{name}_INCLUDE_DIRS}}") endif() - set_property(TARGET {name}::{name} PROPERTY INTERFACE_LINK_LIBRARIES + set_property(TARGET {namespace}::{name} PROPERTY INTERFACE_LINK_LIBRARIES "${{{name}_LIBRARIES_TARGETS}};${{{name}_LINKER_FLAGS_LIST}}") - set_property(TARGET {name}::{name} PROPERTY INTERFACE_COMPILE_DEFINITIONS + set_property(TARGET {namespace}::{name} PROPERTY INTERFACE_COMPILE_DEFINITIONS ${{{name}_COMPILE_DEFINITIONS}}) - set_property(TARGET {name}::{name} PROPERTY INTERFACE_COMPILE_OPTIONS + set_property(TARGET {namespace}::{name} PROPERTY INTERFACE_COMPILE_OPTIONS "${{{name}_COMPILE_OPTIONS_LIST}}") {find_dependencies_block} endif() @@ -76,7 +76,7 @@ class CMakeFindPackageGenerator(GeneratorComponentsMixin, Generator): if({{ pkg_name }}_FIND_COMPONENTS) foreach(_FIND_COMPONENT {{ '${'+pkg_name+'_FIND_COMPONENTS}' }}) - list(FIND {{ pkg_name }}_COMPONENTS "{{ pkg_name }}::${_FIND_COMPONENT}" _index) + list(FIND {{ pkg_name }}_COMPONENTS "{{ namespace }}::${_FIND_COMPONENT}" _index) if(${_index} EQUAL -1) conan_message(FATAL_ERROR "Conan: Component '${_FIND_COMPONENT}' NOT found in package '{{ pkg_name }}'") else() @@ -172,17 +172,17 @@ class CMakeFindPackageGenerator(GeneratorComponentsMixin, Generator): if(NOT ${CMAKE_VERSION} VERSION_LESS "3.0") # Target approach - if(NOT TARGET {{ pkg_name }}::{{ comp_name }}) - add_library({{ pkg_name }}::{{ comp_name }} INTERFACE IMPORTED) - set_target_properties({{ pkg_name }}::{{ comp_name }} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES + if(NOT TARGET {{ namespace }}::{{ comp_name }}) + add_library({{ namespace }}::{{ comp_name }} INTERFACE IMPORTED) + set_target_properties({{ namespace }}::{{ comp_name }} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "{{ '${'+pkg_name+'_'+comp_name+'_INCLUDE_DIRS}' }}") - set_target_properties({{ pkg_name }}::{{ comp_name }} PROPERTIES INTERFACE_LINK_DIRECTORIES + set_target_properties({{ namespace }}::{{ comp_name }} PROPERTIES INTERFACE_LINK_DIRECTORIES "{{ '${'+pkg_name+'_'+comp_name+'_LIB_DIRS}' }}") - set_target_properties({{ pkg_name }}::{{ comp_name }} PROPERTIES INTERFACE_LINK_LIBRARIES + set_target_properties({{ namespace }}::{{ comp_name }} PROPERTIES INTERFACE_LINK_LIBRARIES "{{ '${'+pkg_name+'_'+comp_name+'_LINK_LIBS}' }};{{ '${'+pkg_name+'_'+comp_name+'_LINKER_FLAGS_LIST}' }}") - set_target_properties({{ pkg_name }}::{{ comp_name }} PROPERTIES INTERFACE_COMPILE_DEFINITIONS + set_target_properties({{ namespace }}::{{ comp_name }} PROPERTIES INTERFACE_COMPILE_DEFINITIONS "{{ '${'+pkg_name+'_'+comp_name+'_COMPILE_DEFINITIONS}' }}") - set_target_properties({{ pkg_name }}::{{ comp_name }} PROPERTIES INTERFACE_COMPILE_OPTIONS + set_target_properties({{ namespace }}::{{ comp_name }} PROPERTIES INTERFACE_COMPILE_OPTIONS "{{ '${'+pkg_name+'_'+comp_name+'_COMPILE_OPTIONS_C}' }};{{ '${'+pkg_name+'_'+comp_name+'_COMPILE_OPTIONS_CXX}' }}") endif() endif() @@ -192,10 +192,10 @@ class CMakeFindPackageGenerator(GeneratorComponentsMixin, Generator): ########## GLOBAL TARGET #################################################################### if(NOT ${CMAKE_VERSION} VERSION_LESS "3.0") - if(NOT TARGET {{ pkg_name }}::{{ pkg_name }}) - add_library({{ pkg_name }}::{{ pkg_name }} INTERFACE IMPORTED) + if(NOT TARGET {{ namespace }}::{{ pkg_name }}) + add_library({{ namespace }}::{{ pkg_name }} INTERFACE IMPORTED) endif() - set_property(TARGET {{ pkg_name }}::{{ pkg_name }} APPEND PROPERTY + set_property(TARGET {{ namespace }}::{{ pkg_name }} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "{{ '${'+pkg_name+'_COMPONENTS}' }}") endif() @@ -227,10 +227,12 @@ def content(self): for pkg_name, cpp_info in self.deps_build_info.dependencies: pkg_filename = self._get_filename(cpp_info) pkg_findname = self._get_name(cpp_info) + pkg_namespace = self._get_namespace(cpp_info) or pkg_findname ret["Find%s.cmake" % pkg_filename] = self._find_for_dep( pkg_name=pkg_name, pkg_findname=pkg_findname, pkg_filename=pkg_filename, + pkg_namespace=pkg_namespace, cpp_info=cpp_info ) return ret @@ -245,7 +247,7 @@ def _get_components(self, pkg_name, cpp_info): ret.append((comp_genname, deps_cpp_cmake)) return ret - def _find_for_dep(self, pkg_name, pkg_findname, pkg_filename, cpp_info): + def _find_for_dep(self, pkg_name, pkg_findname, pkg_filename, pkg_namespace, cpp_info): # return the content of the FindXXX.cmake file for the package "pkg_name" self._validate_components(cpp_info) @@ -263,7 +265,7 @@ def _find_for_dep(self, pkg_name, pkg_findname, pkg_filename, cpp_info): if cpp_info.components: components = self._get_components(pkg_name, cpp_info) # Note these are in reversed order, from more dependent to less dependent - pkg_components = " ".join(["{p}::{c}".format(p=pkg_findname, c=comp_findname) for + pkg_components = " ".join(["{p}::{c}".format(p=pkg_namespace, c=comp_findname) for comp_findname, _ in reversed(components)]) pkg_info = DepsCppCmake(cpp_info, self.name) global_target_variables = target_template.format(name=pkg_findname, deps=pkg_info, @@ -271,6 +273,7 @@ def _find_for_dep(self, pkg_name, pkg_findname, pkg_filename, cpp_info): deps_names=deps_names) return self.find_components_tpl.render( pkg_name=pkg_findname, + namespace=pkg_namespace, pkg_filename=pkg_filename, pkg_version=pkg_version, pkg_components=pkg_components, @@ -296,8 +299,8 @@ def _find_for_dep(self, pkg_name, pkg_findname, pkg_filename, cpp_info): # The find_libraries_block, all variables for the package, and creation of targets deps = DepsCppCmake(dep_cpp_info, self.name) - find_libraries_block = target_template.format(name=pkg_findname, deps=deps, - build_type_suffix="", + find_libraries_block = target_template.format(name=pkg_findname, + deps=deps, build_type_suffix="", deps_names=deps_names) # The find_transitive_dependencies block @@ -309,7 +312,8 @@ def _find_for_dep(self, pkg_name, pkg_findname, pkg_filename, cpp_info): find_dependencies_block = ''.join(" " + line if line.strip() else line for line in f.splitlines(True)) - return self.find_template.format(name=pkg_findname, version=pkg_version, + return self.find_template.format(name=pkg_findname, namespace=pkg_namespace, + version=pkg_version, filename=pkg_filename, find_libraries_block=find_libraries_block, find_dependencies_block=find_dependencies_block, diff --git a/conans/client/generators/cmake_find_package_multi.py b/conans/client/generators/cmake_find_package_multi.py index 7ad8f3ec9fb..ae6d94832e5 100644 --- a/conans/client/generators/cmake_find_package_multi.py +++ b/conans/client/generators/cmake_find_package_multi.py @@ -31,8 +31,8 @@ class CMakeFindPackageMultiGenerator(CMakeFindPackageGenerator): """) targets_template = textwrap.dedent(""" - if(NOT TARGET {name}::{name}) - add_library({name}::{name} INTERFACE IMPORTED) + if(NOT TARGET {namespace}::{name}) + add_library({namespace}::{name} INTERFACE IMPORTED) endif() # Load the debug and release library finders @@ -47,23 +47,23 @@ class CMakeFindPackageMultiGenerator(CMakeFindPackageGenerator): # This template takes the "name" of the target name::name and configs = ["Release", "Debug"..] target_properties = Template(""" # Assign target properties -set_property(TARGET {{name}}::{{name}} +set_property(TARGET {{namespace}}::{{name}} PROPERTY INTERFACE_LINK_LIBRARIES {%- for config in configs %} $<$:${{'{'}}{{name}}_LIBRARIES_TARGETS_{{config.upper()}}} ${{'{'}}{{name}}_LINKER_FLAGS_{{config.upper()}}_LIST}> {%- endfor %}) -set_property(TARGET {{name}}::{{name}} +set_property(TARGET {{namespace}}::{{name}} PROPERTY INTERFACE_INCLUDE_DIRECTORIES {%- for config in configs %} $<$:${{'{'}}{{name}}_INCLUDE_DIRS_{{config.upper()}}}> {%- endfor %}) -set_property(TARGET {{name}}::{{name}} +set_property(TARGET {{namespace}}::{{name}} PROPERTY INTERFACE_COMPILE_DEFINITIONS {%- for config in configs %} $<$:${{'{'}}{{name}}_COMPILE_DEFINITIONS_{{config.upper()}}}> {%- endfor %}) -set_property(TARGET {{name}}::{{name}} +set_property(TARGET {{namespace}}::{{name}} PROPERTY INTERFACE_COMPILE_OPTIONS {%- for config in configs %} $<$:${{'{'}}{{name}}_COMPILE_OPTIONS_{{config.upper()}}_LIST}> @@ -166,14 +166,14 @@ class CMakeFindPackageMultiGenerator(CMakeFindPackageGenerator): components_targets_tpl = Template(textwrap.dedent("""\ {%- for comp_name, comp in components %} - if(NOT TARGET {{ pkg_name }}::{{ comp_name }}) - add_library({{ pkg_name }}::{{ comp_name }} INTERFACE IMPORTED) + if(NOT TARGET {{ namespace }}::{{ comp_name }}) + add_library({{ namespace }}::{{ comp_name }} INTERFACE IMPORTED) endif() {%- endfor %} - if(NOT TARGET {{ pkg_name }}::{{ pkg_name }}) - add_library({{ pkg_name }}::{{ pkg_name }} INTERFACE IMPORTED) + if(NOT TARGET {{ namespace }}::{{ pkg_name }}) + add_library({{ namespace }}::{{ pkg_name }} INTERFACE IMPORTED) endif() # Load the debug and release library finders @@ -186,7 +186,7 @@ class CMakeFindPackageMultiGenerator(CMakeFindPackageGenerator): if({{ pkg_name }}_FIND_COMPONENTS) foreach(_FIND_COMPONENT {{ '${'+pkg_name+'_FIND_COMPONENTS}' }}) - list(FIND {{ pkg_name }}_COMPONENTS_{{ build_type }} "{{ pkg_name }}::${_FIND_COMPONENT}" _index) + list(FIND {{ pkg_name }}_COMPONENTS_{{ build_type }} "{{ namespace }}::${_FIND_COMPONENT}" _index) if(${_index} EQUAL -1) conan_message(FATAL_ERROR "Conan: Component '${_FIND_COMPONENT}' NOT found in package '{{ pkg_name }}'") else() @@ -237,20 +237,20 @@ class CMakeFindPackageMultiGenerator(CMakeFindPackageGenerator): ########## COMPONENT {{ comp_name }} TARGET PROPERTIES ###################################### - set_property(TARGET {{ pkg_name }}::{{ comp_name }} PROPERTY INTERFACE_LINK_LIBRARIES + set_property(TARGET {{ namespace }}::{{ comp_name }} PROPERTY INTERFACE_LINK_LIBRARIES {%- for config in configs %} $<$:{{tvalue(pkg_name, comp_name, 'LINK_LIBS', config)}} {{tvalue(pkg_name, comp_name, 'LINKER_FLAGS_LIST', config)}}> {%- endfor %}) - set_property(TARGET {{ pkg_name }}::{{ comp_name }} PROPERTY INTERFACE_INCLUDE_DIRECTORIES + set_property(TARGET {{ namespace }}::{{ comp_name }} PROPERTY INTERFACE_INCLUDE_DIRECTORIES {%- for config in configs %} $<$:{{tvalue(pkg_name, comp_name, 'INCLUDE_DIRS', config)}}> {%- endfor %}) - set_property(TARGET {{ pkg_name }}::{{ comp_name }} PROPERTY INTERFACE_COMPILE_DEFINITIONS + set_property(TARGET {{ namespace }}::{{ comp_name }} PROPERTY INTERFACE_COMPILE_DEFINITIONS {%- for config in configs %} $<$:{{tvalue(pkg_name, comp_name, 'COMPILE_DEFINITIONS', config)}}> {%- endfor %}) - set_property(TARGET {{ pkg_name }}::{{ comp_name }} PROPERTY INTERFACE_COMPILE_OPTIONS + set_property(TARGET {{ namespace }}::{{ comp_name }} PROPERTY INTERFACE_COMPILE_OPTIONS {%- for config in configs %} $<$: {{tvalue(pkg_name, comp_name, 'COMPILE_OPTIONS_C', config)}} @@ -263,7 +263,7 @@ class CMakeFindPackageMultiGenerator(CMakeFindPackageGenerator): ########## GLOBAL TARGET PROPERTIES ######################################################### if(NOT {{ pkg_name }}_{{ pkg_name }}_TARGET_PROPERTIES) - set_property(TARGET {{ pkg_name }}::{{ pkg_name }} APPEND PROPERTY INTERFACE_LINK_LIBRARIES + set_property(TARGET {{ namespace }}::{{ pkg_name }} APPEND PROPERTY INTERFACE_LINK_LIBRARIES {%- for config in configs %} $<$:{{ '${'+pkg_name+'_COMPONENTS_'+config.upper()+'}'}}> {%- endfor %}) @@ -312,6 +312,7 @@ def content(self): self._validate_components(cpp_info) pkg_filename = self._get_filename(cpp_info) pkg_findname = self._get_name(cpp_info) + pkg_namespace = self._get_namespace(cpp_info) or pkg_findname pkg_version = cpp_info.version public_deps = self.get_public_deps(cpp_info) @@ -329,11 +330,12 @@ def content(self): ret[self._config_filename(pkg_filename)] = self._config( filename=pkg_filename, name=pkg_findname, + namespace=pkg_namespace, version=cpp_info.version, public_deps_names=pkg_public_deps_filenames ) ret["{}Targets.cmake".format(pkg_filename)] = self.targets_template.format( - filename=pkg_filename, name=pkg_findname) + filename=pkg_filename, name=pkg_findname, namespace=pkg_namespace) # If any config matches the build_type one, add it to the cpp_info dep_cpp_info = extend(cpp_info, build_type.lower()) @@ -347,7 +349,7 @@ def content(self): pkg_info = DepsCppCmake(cpp_info, self.name) components = self._get_components(pkg_name, cpp_info) # Note these are in reversed order, from more dependent to less dependent - pkg_components = " ".join(["{p}::{c}".format(p=pkg_findname, c=comp_findname) for + pkg_components = " ".join(["{p}::{c}".format(p=pkg_namespace, c=comp_findname) for comp_findname, _ in reversed(components)]) global_target_variables = target_template.format(name=pkg_findname, deps=pkg_info, build_type_suffix=build_type_suffix, @@ -364,6 +366,7 @@ def content(self): ret["{}Target-{}.cmake".format(pkg_filename, build_type.lower())] = variables targets = self.components_targets_tpl.render( pkg_name=pkg_findname, + namespace=pkg_namespace, pkg_filename=pkg_filename, components=components, build_type=build_type @@ -371,6 +374,7 @@ def content(self): ret["{}Targets.cmake".format(pkg_filename)] = targets target_config = self.components_config_tpl.render( pkg_name=pkg_findname, + namespace=pkg_namespace, pkg_filename=pkg_filename, components=components, pkg_public_deps=pkg_public_deps_filenames, @@ -392,7 +396,7 @@ def _config_version_filename(self, pkg_filename): else: return "{}ConfigVersion.cmake".format(pkg_filename) - def _config(self, filename, name, version, public_deps_names): + def _config(self, filename, name, namespace, version, public_deps_names): # Builds the XXXConfig.cmake file for one package # The common macros @@ -403,7 +407,8 @@ def _config(self, filename, name, version, public_deps_names): ]) # Define the targets properties - targets_props = self.target_properties.render(name=name, configs=self.configurations) + targets_props = self.target_properties.render(name=name, namespace=namespace, + configs=self.configurations) # Add build modules build_modules_block = self.build_modules.render(name=name, configs=self.configurations) # The find_dependencies_block diff --git a/conans/model/build_info.py b/conans/model/build_info.py index 44b8d363e8c..71237dcd2ec 100644 --- a/conans/model/build_info.py +++ b/conans/model/build_info.py @@ -228,6 +228,13 @@ def get_name(self, generator, default_name=True): return self.get_property(property_name, generator) \ or self.names.get(generator, self._name if default_name else None) + # To provide compatibility for legacy generators with cmake_target_namespace + # and make migration easier + def get_namespace(self, generator): + if generator == "cmake_find_package" or generator == "cmake_find_package_multi": + namespace = self.get_property("cmake_target_namespace", generator) + return namespace + # TODO: Deprecate for 2.0. Only cmake generators should access this. Use get_property for 2.0 def get_filename(self, generator, default_name=True): if generator == "cmake_find_package" and self.get_property("cmake_module_file_name", generator): diff --git a/conans/model/conan_generator.py b/conans/model/conan_generator.py index 6109bf8dc25..5086312d83f 100644 --- a/conans/model/conan_generator.py +++ b/conans/model/conan_generator.py @@ -23,6 +23,10 @@ def __init__(self, conanfile): def _get_name(cls, obj): return obj.get_name(cls.name) + @classmethod + def _get_namespace(cls, obj): + return obj.get_namespace(cls.name) + @property def deps_build_info(self): return self._deps_build_info @@ -84,11 +88,13 @@ def _get_require_name(self, pkg_name, req): pkg, cmp = req.split(COMPONENT_SCOPE) if COMPONENT_SCOPE in req else (pkg_name, req) pkg_build_info = self.deps_build_info[pkg] pkg_name = self._get_name(pkg_build_info) + # fallback namespace to pkg_name if not defined + pkg_namespace = self._get_namespace(pkg_build_info) or pkg_name if cmp in pkg_build_info.components: cmp_name = self._get_name(pkg_build_info.components[cmp]) else: cmp_name = pkg_name - return pkg_name, cmp_name + return pkg_namespace, cmp_name def _get_components(self, pkg_name, cpp_info): ret = [] diff --git a/conans/test/integration/generators/cpp_info_set_generator_properties_test.py b/conans/test/integration/generators/cpp_info_set_generator_properties_test.py index 3672189d425..8ca2e8f068a 100644 --- a/conans/test/integration/generators/cpp_info_set_generator_properties_test.py +++ b/conans/test/integration/generators/cpp_info_set_generator_properties_test.py @@ -289,6 +289,95 @@ def package_info(self): assert find_package_contents_old == find_package_contents +@pytest.mark.parametrize("generator", ["cmake_find_package_multi", "cmake_find_package"]) +def test_cmake_find_package_target_namespace(generator): + # https://github.com/conan-io/conan/issues/9946 + client = TestClient() + hello = textwrap.dedent(""" + import os + from conans import ConanFile + class MyHello(ConanFile): + settings = "build_type" + name = "hello" + version = "1.0" + def package_info(self): + self.cpp_info.components["helloworld"].set_property("cmake_target_name", "HelloWorld") + {} + + """) + + greetings = textwrap.dedent(""" + import os + from conans import ConanFile + class MyPkg(ConanFile): + settings = "build_type" + name = "greetings" + version = "1.0" + requires = "hello/1.0" + def package_info(self): + self.cpp_info.components["greetingshello"].requires = ["hello::helloworld"] + {} + """) + + client.save({"hello.py": hello.format('self.cpp_info.set_property("cmake_target_namespace", "hello_namespace")'), + "greetings.py": greetings.format('self.cpp_info.set_property("cmake_target_namespace", "greetings_namespace")')}) + client.run("create hello.py hello/1.0@") + client.run("create greetings.py greetings/1.0@") + client.run("install greetings/1.0@ -g {}".format(generator)) + if generator == "cmake_find_package_multi": + hello_config = client.load("hello-config.cmake") + assert "set_property(TARGET hello_namespace::HelloWorld" in hello_config + hello_targets_release = client.load("helloTarget-release.cmake") + assert "set(hello_COMPONENTS_RELEASE hello_namespace::HelloWorld)" in hello_targets_release + hello_target = client.load("helloTargets.cmake") + assert "add_library(hello_namespace::HelloWorld" in hello_target + assert "add_library(hello_namespace::hello" in hello_target + greetings_config = client.load("greetings-config.cmake") + assert "set_property(TARGET greetings_namespace::greetings" in greetings_config + greetings_targets_release = client.load("greetingsTarget-release.cmake") + assert "set(greetings_COMPONENTS_RELEASE greetings_namespace::greetingshello)" in greetings_targets_release + greetings_target = client.load("greetingsTargets.cmake") + assert "add_library(greetings_namespace::greetingshello INTERFACE IMPORTED)" in greetings_target + assert "add_library(greetings_namespace::greetings INTERFACE IMPORTED)" in greetings_target + else: + hello_contents = client.load("Findhello.cmake") + assert "set(hello_COMPONENTS hello_namespace::HelloWorld)" in hello_contents + assert "add_library(hello_namespace::HelloWorld INTERFACE IMPORTED)" in hello_contents + assert "add_library(hello_namespace::hello INTERFACE IMPORTED)" in hello_contents + greetings_contents = client.load("Findgreetings.cmake") + assert "set(greetings_COMPONENTS greetings_namespace::greetingshello)" in greetings_contents + assert "add_library(greetings_namespace::greetingshello INTERFACE IMPORTED)" in greetings_contents + assert "add_library(greetings_namespace::greetings INTERFACE IMPORTED)" in greetings_contents + + # check that the contents with the namespace that equals the default + # generates exactly the same files + client.save({"hello.py": hello.format('self.cpp_info.set_property("cmake_target_namespace", "hello")'), + "greetings.py": greetings.format('self.cpp_info.set_property("cmake_target_namespace", "greetings")')}, + clean_first=True) + client.run("create hello.py hello/1.0@") + client.run("create greetings.py greetings/1.0@") + client.run("install greetings/1.0@ -g {}".format(generator)) + + if generator == "cmake_find_package_multi": + files_to_compare = ["greetings-config.cmake", "greetingsTarget-release.cmake", "greetingsTargets.cmake", + "hello-config.cmake", "helloTarget-release.cmake", "helloTargets.cmake"] + else: + files_to_compare = ["Findhello.cmake", "Findgreetings.cmake"] + + files_namespace = [client.load(file) for file in files_to_compare] + + client.save({"hello.py": hello.format(''), + "greetings.py": greetings.format('')}, + clean_first=True) + client.run("create hello.py hello/1.0@") + client.run("create greetings.py greetings/1.0@") + client.run("install greetings/1.0@ -g {}".format(generator)) + + files_no_namespace = [client.load(file) for file in files_to_compare] + + assert files_namespace == files_no_namespace + + def test_legacy_cmake_is_not_affected_by_set_property_usage(): """ "set_property" will have no effect on "cmake" legacy generator