Merge topic 'shorten-test-paths'

70c50962 Tests: Shorten paths in ExternalProjectLocal
539c5c25 Tests: Shorten paths in RunCMake.CompileFeatures
494f6e8d Tests: Shorten paths in CompileDefinitions
This commit is contained in:
Brad King 2015-01-28 09:33:38 -05:00 committed by CMake Topic Stage
commit 6a0a4079ef
9 changed files with 22 additions and 30 deletions

View File

@ -1,6 +1,4 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
project(CompileDefinitions) project(CompileDefinitions)
if ("${CMAKE_GENERATOR}" STREQUAL "Visual Studio 6") if ("${CMAKE_GENERATOR}" STREQUAL "Visual Studio 6")
@ -19,8 +17,8 @@ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS
"BUILD_CONFIG_NAME=\"$<CONFIGURATION>\"" "BUILD_CONFIG_NAME=\"$<CONFIGURATION>\""
) )
add_subdirectory(add_definitions_command) add_subdirectory(add_def_cmd)
add_subdirectory(target_prop) add_subdirectory(target_prop)
add_subdirectory(add_definitions_command_with_target_prop) add_subdirectory(add_def_cmd_tprop)
add_executable(CompileDefinitions runtest.c) add_executable(CompileDefinitions runtest.c)

View File

@ -1,6 +1,3 @@
project(add_definitions_command)
add_definitions(-DCMAKE_IS_FUN -DCMAKE_IS=Fun -DCMAKE_IS_="Fun") add_definitions(-DCMAKE_IS_FUN -DCMAKE_IS=Fun -DCMAKE_IS_="Fun")
if (NOT NO_SPACES_IN_DEFINE_VALUES) if (NOT NO_SPACES_IN_DEFINE_VALUES)
add_definitions(-DCMAKE_IS_REALLY="Very Fun") add_definitions(-DCMAKE_IS_REALLY="Very Fun")
@ -12,4 +9,4 @@ endif()
add_definitions(-DCMAKE_IS_FUN -DCMAKE_IS=Fun) add_definitions(-DCMAKE_IS_FUN -DCMAKE_IS=Fun)
add_definitions(-DBUILD_IS_DEBUG=$<CONFIG:Debug> -DBUILD_IS_NOT_DEBUG=$<NOT:$<CONFIG:Debug>>) 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)

View File

@ -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>>)

View File

@ -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>>)

View File

@ -15,7 +15,7 @@ endif()
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER
"CMakePredefinedTargets-in-ExternalProjectTest") "CMakePredefinedTargets-in-ExternalProjectTest")
set(base "${CMAKE_BINARY_DIR}/CMakeExternals") set(base "${CMAKE_BINARY_DIR}/Ext")
set(binary_base "${base}/Build") set(binary_base "${base}/Build")
set_property(DIRECTORY PROPERTY EP_BASE ${base}) set_property(DIRECTORY PROPERTY EP_BASE ${base})
set_property(DIRECTORY PROPERTY EP_STEP_TARGETS configure build test) set_property(DIRECTORY PROPERTY EP_STEP_TARGETS configure build test)

View File

@ -1,4 +1,4 @@
CMake Error at NotAFeature_OriginDebug_target_compile_features.cmake:4 \(target_compile_features\): CMake Error at NotAFeature_OriginDebugCommand.cmake:4 \(target_compile_features\):
target_compile_features specified unknown feature "not_a_feature" for target_compile_features specified unknown feature "not_a_feature" for
target "somelib". target "somelib".
Call Stack \(most recent call first\): Call Stack \(most recent call first\):

View File

@ -6,7 +6,7 @@ run_cmake(NotAFeatureTransitive)
run_cmake(NotAFeature_OriginDebug) run_cmake(NotAFeature_OriginDebug)
run_cmake(NotAFeature_OriginDebugGenex) run_cmake(NotAFeature_OriginDebugGenex)
run_cmake(NotAFeature_OriginDebugTransitive) run_cmake(NotAFeature_OriginDebugTransitive)
run_cmake(NotAFeature_OriginDebug_target_compile_features) run_cmake(NotAFeature_OriginDebugCommand)
run_cmake(generate_feature_list) run_cmake(generate_feature_list)
file(READ file(READ