diff options
author | Brad King <brad.king@kitware.com> | 2017-08-31 15:00:52 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-09-01 14:23:37 (GMT) |
commit | 068cc545d905a5b0fd8caa09494c04346d0ca936 (patch) | |
tree | dec7cfce9204cd05af3f2af2c838ab3cac810333 /Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-SOURCES-check.cmake | |
parent | fca4423786ba2c4a5ab0ec6c1a1cbac8cd8600b4 (diff) | |
download | CMake-068cc545d905a5b0fd8caa09494c04346d0ca936.zip CMake-068cc545d905a5b0fd8caa09494c04346d0ca936.tar.gz CMake-068cc545d905a5b0fd8caa09494c04346d0ca936.tar.bz2 |
Genex: Fix TARGET_PROPERTY value of SOURCES
Refactoring in commit v3.8.0-rc1~445^2~2 (cmTarget: Move sanity checks
and computed property access to callers, 2016-10-13) exposed a typo in
commit v3.8.0-rc1~445^2~3 (cmGeneratorTarget: Implement
cmTargetPropertyComputer interface, 2016-10-13). Together they broke
the `$<TARGET_PROPERTY:mytgt,SOURCES>` generator expression in the case
that the `SOURCES` target property is populated in part by the
`target_sources` command. Add the missing `;`-separator.
Fixes: #17243
Diffstat (limited to 'Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-SOURCES-check.cmake')
-rw-r--r-- | Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-SOURCES-check.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-SOURCES-check.cmake b/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-SOURCES-check.cmake new file mode 100644 index 0000000..f1452b5 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-SOURCES-check.cmake @@ -0,0 +1,9 @@ +file(READ ${RunCMake_TEST_BINARY_DIR}/foo.txt foo_sources) + +# VS generators inject CMakeLists.txt as a source. Remove it. +string(REGEX REPLACE ";[^;]*CMakeLists.txt$" "" foo_sources "${foo_sources}") + +set(foo_expected "empty.c;empty2.c;empty3.c") +if(NOT foo_sources STREQUAL foo_expected) + set(RunCMake_TEST_FAILED "foo SOURCES was:\n [[${foo_sources}]]\nbut expected:\n [[${foo_expected}]]") +endif() |