diff options
author | Brad King <brad.king@kitware.com> | 2013-07-25 12:37:13 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-07-25 12:37:13 (GMT) |
commit | 9f8fcdd2d8a819d00fcea28be52aede1e8b698ec (patch) | |
tree | 1d554ee70053dbbe47a69fd6c86a83b5ae2df6a4 /Tests | |
parent | 86f2d83de3465d4771679770486afead7b5e6027 (diff) | |
parent | a43e5e0ad56883366ecd7fd01c31e9ed5fcf5ae1 (diff) | |
download | CMake-9f8fcdd2d8a819d00fcea28be52aede1e8b698ec.zip CMake-9f8fcdd2d8a819d00fcea28be52aede1e8b698ec.tar.gz CMake-9f8fcdd2d8a819d00fcea28be52aede1e8b698ec.tar.bz2 |
Merge topic 'compile-defs-debugging'
a43e5e0 Test COMPILE_DEFINITIONS target property get/set/get round-trip
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/Preprocess/CMakeLists.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/Preprocess/CMakeLists.txt b/Tests/Preprocess/CMakeLists.txt index bc92a94..d44cb9c 100644 --- a/Tests/Preprocess/CMakeLists.txt +++ b/Tests/Preprocess/CMakeLists.txt @@ -259,6 +259,19 @@ set_property( ${DEF_FILE_PATH} ) +# Try reading and writing the property value to ensure the string is +# preserved. +get_property(defs1 TARGET Preprocess PROPERTY COMPILE_DEFINITIONS) +set_property(TARGET Preprocess PROPERTY COMPILE_DEFINITIONS "${defs1}") +get_property(defs2 TARGET Preprocess PROPERTY COMPILE_DEFINITIONS) +if(NOT "x${defs1}" STREQUAL "x${defs2}") + message(FATAL_ERROR "get/set/get COMPILE_DEFINITIONS round trip failed. " + "First get:\n" + " ${defs1}\n" + "Second get:\n" + " ${defs2}") +endif() + # Helper target for running test manually in build tree. add_custom_target(drive COMMAND Preprocess) |