diff options
author | Brad King <brad.king@kitware.com> | 2015-01-25 13:09:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-01-25 13:12:12 (GMT) |
commit | 494f6e8d5b9f2e556a2b2db2c165a56c01fd1827 (patch) | |
tree | c067bac908fd8e4a44c24c038622de0d38d12ed7 /Tests/CompileDefinitions/add_def_cmd_tprop | |
parent | c99e19a4ac7e6e55345a073b13c36befaa8702d8 (diff) | |
download | CMake-494f6e8d5b9f2e556a2b2db2c165a56c01fd1827.zip CMake-494f6e8d5b9f2e556a2b2db2c165a56c01fd1827.tar.gz CMake-494f6e8d5b9f2e556a2b2db2c165a56c01fd1827.tar.bz2 |
Tests: Shorten paths in CompileDefinitions
Shorten the add_definitions command test directory and target names to
avoid creating really long paths that fail with some tools on Windows.
While at it, remove unnecessary project() command calls.
Diffstat (limited to 'Tests/CompileDefinitions/add_def_cmd_tprop')
-rw-r--r-- | Tests/CompileDefinitions/add_def_cmd_tprop/CMakeLists.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/CompileDefinitions/add_def_cmd_tprop/CMakeLists.txt b/Tests/CompileDefinitions/add_def_cmd_tprop/CMakeLists.txt new file mode 100644 index 0000000..4ef8a09 --- /dev/null +++ b/Tests/CompileDefinitions/add_def_cmd_tprop/CMakeLists.txt @@ -0,0 +1,16 @@ +add_definitions(-DCMAKE_IS_FUN -DCMAKE_IS=Fun) + +add_executable(add_def_cmd_tprop_exe ../compiletest.cpp) + +set_target_properties(add_def_cmd_tprop_exe PROPERTIES COMPILE_DEFINITIONS CMAKE_IS_="Fun") + +if (NOT NO_SPACES_IN_DEFINE_VALUES) + set_property(TARGET add_def_cmd_tprop_exe APPEND PROPERTY COMPILE_DEFINITIONS CMAKE_IS_REALLY="Very Fun") +endif() + +add_definitions(-DCMAKE_IS_FUN) + +set_property(TARGET add_def_cmd_tprop_exe APPEND PROPERTY COMPILE_DEFINITIONS CMAKE_IS=Fun CMAKE_IS_="Fun") + +add_definitions(-DBUILD_IS_DEBUG=$<CONFIG:Debug>) +set_property(TARGET add_def_cmd_tprop_exe APPEND PROPERTY COMPILE_DEFINITIONS BUILD_IS_NOT_DEBUG=$<NOT:$<CONFIG:Debug>>) |