diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-12-30 12:33:02 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-01-08 15:41:34 (GMT) |
commit | 5bb53f6b731228e4592066329e8992987289a986 (patch) | |
tree | 77176fe26f9f2d658094d5964d56a9abd52d551d /Tests/CompileDefinitions | |
parent | 855e8759fdf20a209f19f02e8dc5d203f4713a6a (diff) | |
download | CMake-5bb53f6b731228e4592066329e8992987289a986.zip CMake-5bb53f6b731228e4592066329e8992987289a986.tar.gz CMake-5bb53f6b731228e4592066329e8992987289a986.tar.bz2 |
cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy.
Diffstat (limited to 'Tests/CompileDefinitions')
-rw-r--r-- | Tests/CompileDefinitions/compiletest.c | 4 | ||||
-rw-r--r-- | Tests/CompileDefinitions/target_prop/CMakeLists.txt | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Tests/CompileDefinitions/compiletest.c b/Tests/CompileDefinitions/compiletest.c index d7883af..8871750 100644 --- a/Tests/CompileDefinitions/compiletest.c +++ b/Tests/CompileDefinitions/compiletest.c @@ -13,6 +13,10 @@ #error Unexpected LINK_LANGUAGE_IS_CXX #endif +#ifdef DEBUG_MODE +#error Unexpected DEBUG_MODE +#endif + int main(void) { return 0; diff --git a/Tests/CompileDefinitions/target_prop/CMakeLists.txt b/Tests/CompileDefinitions/target_prop/CMakeLists.txt index a0d3f4e..2ca2869 100644 --- a/Tests/CompileDefinitions/target_prop/CMakeLists.txt +++ b/Tests/CompileDefinitions/target_prop/CMakeLists.txt @@ -35,6 +35,9 @@ set_property(TARGET target_prop_executable APPEND PROPERTY COMPILE_DEFINITIONS add_executable(target_prop_c_executable ../compiletest.c) +cmake_policy(SET CMP0043 NEW) +set_property(TARGET target_prop_c_executable APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG_MODE) + set_property(TARGET target_prop_c_executable APPEND PROPERTY COMPILE_DEFINITIONS "$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:LINK_CXX_DEFINE>" "$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,C>:LINK_C_DEFINE>" |