diff options
author | FeRD (Frank Dana) <ferdnyc@gmail.com> | 2022-06-06 16:25:51 (GMT) |
---|---|---|
committer | FeRD (Frank Dana) <ferdnyc@gmail.com> | 2022-06-06 16:25:51 (GMT) |
commit | 2579503f450f99166408d25161d950450cda0544 (patch) | |
tree | 4b7efeda666ae793ccf23a5683e18fa56acf70fa /Help/guide/tutorial/Step5/MathFunctions | |
parent | 2a56c240391c59a0d78dbf90911f38a79f161f7d (diff) | |
download | CMake-2579503f450f99166408d25161d950450cda0544.zip CMake-2579503f450f99166408d25161d950450cda0544.tar.gz CMake-2579503f450f99166408d25161d950450cda0544.tar.bz2 |
PrintHelpers: Fix target SOURCES property
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
Diffstat (limited to 'Help/guide/tutorial/Step5/MathFunctions')
0 files changed, 0 insertions, 0 deletions