https://github.com/Kitware/CMake
Revision 2579503f450f99166408d25161d950450cda0544 authored by FeRD (Frank Dana) on 06 June 2022, 16:25:51 UTC, committed by FeRD (Frank Dana) on 06 June 2022, 16:25:51 UTC
It's been a long-standing bug in CMakePrintHelpers that the cmake_print_properties() function cannot print the SOURCES property of a requested TARGET, confusing it with a request to print properties of SOURCES. We work around this by parsing the arguments in two stages, so that a SOURCES that comes after the PROPERTIES keyword is handled differently from a SOURCES that comes before it. This adds the restriction that the "mode" keyword (TARGETS SOURCES DIRECTORIES etc...) and its arguments **must** precede the PROPERTIES keyword and its arguments. In other words: 1. Both of these are now valid and will be interpreted correctly, whereas previously only the first was, and the second caused a FATAL_ERROR: cmake_print_properties(SOURCES foo.c PROPERTIES LANGUAGE) cmake_print_properties(TARGETS foo PROPERTIES SOURCES) 2. This, OTOH, which used to be valid, no longer is, and will trigger a FATAL_ERROR: cmake_print_properties(PROPERTIES LANGUAGE SOURCES foo.c) Fixes: #14883
1 parent 2a56c24
Tip revision: 2579503f450f99166408d25161d950450cda0544 authored by FeRD (Frank Dana) on 06 June 2022, 16:25:51 UTC
PrintHelpers: Fix target SOURCES property
PrintHelpers: Fix target SOURCES property
Tip revision: 2579503
File | Mode | Size |
---|---|---|
.github | ||
.gitlab | ||
Auxiliary | ||
Help | ||
Licenses | ||
Modules | ||
Packaging | ||
Source | ||
Templates | ||
Tests | ||
Utilities | ||
.clang-format | -rw-r--r-- | 1.4 KB |
.clang-tidy | -rw-r--r-- | 1.3 KB |
.codespellrc | -rw-r--r-- | 570 bytes |
.editorconfig | -rw-r--r-- | 164 bytes |
.gitattributes | -rw-r--r-- | 1.2 KB |
.gitignore | -rw-r--r-- | 316 bytes |
.gitlab-ci.yml | -rw-r--r-- | 27.0 KB |
.hooks-config | -rw-r--r-- | 418 bytes |
CMakeCPack.cmake | -rw-r--r-- | 9.8 KB |
CMakeCPackOptions.cmake.in | -rw-r--r-- | 12.0 KB |
CMakeGraphVizOptions.cmake | -rw-r--r-- | 153 bytes |
CMakeLists.txt | -rw-r--r-- | 34.0 KB |
CMakeLogo.gif | -rw-r--r-- | 4.4 KB |
CONTRIBUTING.rst | -rw-r--r-- | 3.0 KB |
CTestConfig.cmake | -rw-r--r-- | 566 bytes |
CTestCustom.cmake.in | -rw-r--r-- | 6.8 KB |
CompileFlags.cmake | -rw-r--r-- | 4.7 KB |
Copyright.txt | -rw-r--r-- | 5.3 KB |
DartConfig.cmake | -rw-r--r-- | 374 bytes |
README.rst | -rw-r--r-- | 3.9 KB |
bootstrap | -rwxr-xr-x | 63.2 KB |
cmake_uninstall.cmake.in | -rw-r--r-- | 789 bytes |
configure | -rwxr-xr-x | 99 bytes |
doxygen.config | -rw-r--r-- | 27.4 KB |
Computing file changes ...