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 | |
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')
-rw-r--r-- | Tests/CompileDefinitions/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/CompileDefinitions/add_def_cmd/CMakeLists.txt (renamed from Tests/CompileDefinitions/add_definitions_command/CMakeLists.txt) | 5 | ||||
-rw-r--r-- | Tests/CompileDefinitions/add_def_cmd_tprop/CMakeLists.txt | 16 | ||||
-rw-r--r-- | Tests/CompileDefinitions/add_definitions_command_with_target_prop/CMakeLists.txt | 19 |
4 files changed, 19 insertions, 27 deletions
diff --git a/Tests/CompileDefinitions/CMakeLists.txt b/Tests/CompileDefinitions/CMakeLists.txt index 930d220..13d1b01 100644 --- a/Tests/CompileDefinitions/CMakeLists.txt +++ b/Tests/CompileDefinitions/CMakeLists.txt @@ -1,6 +1,4 @@ - cmake_minimum_required(VERSION 2.8) - project(CompileDefinitions) if ("${CMAKE_GENERATOR}" STREQUAL "Visual Studio 6") @@ -19,8 +17,8 @@ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "BUILD_CONFIG_NAME=\"$<CONFIGURATION>\"" ) -add_subdirectory(add_definitions_command) +add_subdirectory(add_def_cmd) add_subdirectory(target_prop) -add_subdirectory(add_definitions_command_with_target_prop) +add_subdirectory(add_def_cmd_tprop) add_executable(CompileDefinitions runtest.c) diff --git a/Tests/CompileDefinitions/add_definitions_command/CMakeLists.txt b/Tests/CompileDefinitions/add_def_cmd/CMakeLists.txt index 23e0134..2bce602 100644 --- a/Tests/CompileDefinitions/add_definitions_command/CMakeLists.txt +++ b/Tests/CompileDefinitions/add_def_cmd/CMakeLists.txt @@ -1,6 +1,3 @@ - -project(add_definitions_command) - add_definitions(-DCMAKE_IS_FUN -DCMAKE_IS=Fun -DCMAKE_IS_="Fun") if (NOT NO_SPACES_IN_DEFINE_VALUES) add_definitions(-DCMAKE_IS_REALLY="Very Fun") @@ -12,4 +9,4 @@ endif() add_definitions(-DCMAKE_IS_FUN -DCMAKE_IS=Fun) add_definitions(-DBUILD_IS_DEBUG=$<CONFIG:Debug> -DBUILD_IS_NOT_DEBUG=$<NOT:$<CONFIG:Debug>>) -add_executable(add_definitions_command_executable ../compiletest.cpp) +add_executable(add_def_cmd_exe ../compiletest.cpp) 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>>) diff --git a/Tests/CompileDefinitions/add_definitions_command_with_target_prop/CMakeLists.txt b/Tests/CompileDefinitions/add_definitions_command_with_target_prop/CMakeLists.txt deleted file mode 100644 index 55108db..0000000 --- a/Tests/CompileDefinitions/add_definitions_command_with_target_prop/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ - -project(add_definitions_command_with_target_prop) - -add_definitions(-DCMAKE_IS_FUN -DCMAKE_IS=Fun) - -add_executable(add_definitions_command_with_target_prop_executable ../compiletest.cpp) - -set_target_properties(add_definitions_command_with_target_prop_executable PROPERTIES COMPILE_DEFINITIONS CMAKE_IS_="Fun") - -if (NOT NO_SPACES_IN_DEFINE_VALUES) - set_property(TARGET add_definitions_command_with_target_prop_executable APPEND PROPERTY COMPILE_DEFINITIONS CMAKE_IS_REALLY="Very Fun") -endif() - -add_definitions(-DCMAKE_IS_FUN) - -set_property(TARGET add_definitions_command_with_target_prop_executable APPEND PROPERTY COMPILE_DEFINITIONS CMAKE_IS=Fun CMAKE_IS_="Fun") - -add_definitions(-DBUILD_IS_DEBUG=$<CONFIG:Debug>) -set_property(TARGET add_definitions_command_with_target_prop_executable APPEND PROPERTY COMPILE_DEFINITIONS BUILD_IS_NOT_DEBUG=$<NOT:$<CONFIG:Debug>>) |