Open daixtrose opened 1 year ago
@cpp-entwickler-de This may be mitigated by either changing cmake_utilities
or how it is used in the demo.
The issue is in the CompilerFlags module, which is included in lib_A and sets the project name to compiler_flags, which wrecks the library name. Since this is a module, we should remove the project() call.
See https://github.com/daixtrose/cmake_utilities/pull/9 for the suggested change.
OMG. How did you find THAT one?
Good old printf debugging :smile:. There are only a handful of probable reasons for CMake not to find a target. A message with the target name right next to target creation shows if the naming variable is correct and if the target definition is reached at all. When the printed name suddenly contains another project's name, it is quite clear where to look for the issue.
How to reproduce
Use the testsuite in https://github.com/dep-heaven/tool_1:
Output