summaryrefslogtreecommitdiffstats
path: root/Tests/GeneratorExpression/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-02 12:25:22 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-03 12:03:33 (GMT)
commit303cd7037a5de2b26373ed4184fd36e68e0f01da (patch)
tree49398fbc6dd15245f8f922cdb6ff58b8c16efd5d /Tests/GeneratorExpression/CMakeLists.txt
parentdb730f3e5092bbfcd1cee8c0cdf5150c88fb65b3 (diff)
downloadCMake-303cd7037a5de2b26373ed4184fd36e68e0f01da.zip
CMake-303cd7037a5de2b26373ed4184fd36e68e0f01da.tar.gz
CMake-303cd7037a5de2b26373ed4184fd36e68e0f01da.tar.bz2
VS,Xcode: Fix TARGET_PROPERTY genex in source COMPILE_FLAGS property
This already worked in other generators. Also add a test case. Fixes: #17314
Diffstat (limited to 'Tests/GeneratorExpression/CMakeLists.txt')
-rw-r--r--Tests/GeneratorExpression/CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt
index 8ac3419..83fd11d 100644
--- a/Tests/GeneratorExpression/CMakeLists.txt
+++ b/Tests/GeneratorExpression/CMakeLists.txt
@@ -258,11 +258,13 @@ add_custom_target(check-part4 ALL
VERBATIM
)
+add_executable(srcgenex srcgenex.c)
+set_property(SOURCE srcgenex.c PROPERTY COMPILE_FLAGS "-DNAME=$<TARGET_PROPERTY:NAME>")
+
#-----------------------------------------------------------------------------
# Cover test properties with generator expressions.
add_executable(echo echo.c)
add_executable(pwd pwd.c)
-set_property(SOURCE echo.c PROPERTY COMPILE_FLAGS $<1:-DSRC_GENEX_WORKS>)
add_test(NAME echo-configuration COMMAND echo $<CONFIGURATION>)
set_property(TEST echo-configuration PROPERTY