Remove cmake_target_namespace and cmake_module_target_namespace properties in CMakeDeps generator - #10099
Conversation
Co-authored-by: Luis Martinez <lasote@gmail.com>
|
I was reviewing this pull request proposing to remove the restriction of having a component with the name of the package, and I have some related questions: |
For the aliases there's a check and a warning that the alias won't be declared if already declared: https://github.com/SSE4/conan/blob/16556f34e1e70e07e6d20188193df16adaed7c59/conan/tools/cmake/cmakedeps/templates/targets.py#L85 For |
|
I would say, Let's raise in both cases. We can always revert if we realize later that something is being re-declared or something like that. |
Changelog: Feature: Remove
cmake_target_namespaceandcmake_module_target_namespaceproperties.Changelog: Feature: Allow
CMakeDepsto setcmake_target_nameproperty as an absolute target.Changelog: Feature: Add warning in
CMakeDepsgenerated CMake files when target names collide.Docs: conan-io/docs#2316
Now
CMakeDepswill allow setting an absolute name for the targets. It's also possible to name the target for the root cpp_info and components without namespaces.If no
cmake_target_nameis set, then the default generated target is:pkg_name::pkg_namefor the root cpp_info andpkg_name::component_namefor components (note it will not try to extract the namespace from the root cpp_info to compose the component target name)supersedes: #10077
#TAGS: slow