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/RunCMake/CMP0043 | |
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/RunCMake/CMP0043')
-rw-r--r-- | Tests/RunCMake/CMP0043/CMP0043-NEW-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0043/CMP0043-NEW-stderr.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0043/CMP0043-NEW.cmake | 7 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0043/CMP0043-OLD-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0043/CMP0043-OLD-stderr.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0043/CMP0043-OLD.cmake | 7 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0043/CMP0043-WARN-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0043/CMP0043-WARN-stderr.txt | 5 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0043/CMP0043-WARN.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0043/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0043/RunCMakeTest.cmake | 7 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0043/empty.cpp | 7 |
12 files changed, 46 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0043/CMP0043-NEW-result.txt b/Tests/RunCMake/CMP0043/CMP0043-NEW-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CMP0043/CMP0043-NEW-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CMP0043/CMP0043-NEW-stderr.txt b/Tests/RunCMake/CMP0043/CMP0043-NEW-stderr.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/CMP0043/CMP0043-NEW-stderr.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/CMP0043/CMP0043-NEW.cmake b/Tests/RunCMake/CMP0043/CMP0043-NEW.cmake new file mode 100644 index 0000000..857153d --- /dev/null +++ b/Tests/RunCMake/CMP0043/CMP0043-NEW.cmake @@ -0,0 +1,7 @@ + +cmake_policy(SET CMP0043 NEW) + +add_library(foo empty.cpp) +set_property(TARGET foo + PROPERTY COMPILE_DEFINITIONS_DEBUG "DEBUG_MODE" +) diff --git a/Tests/RunCMake/CMP0043/CMP0043-OLD-result.txt b/Tests/RunCMake/CMP0043/CMP0043-OLD-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CMP0043/CMP0043-OLD-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CMP0043/CMP0043-OLD-stderr.txt b/Tests/RunCMake/CMP0043/CMP0043-OLD-stderr.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/CMP0043/CMP0043-OLD-stderr.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/CMP0043/CMP0043-OLD.cmake b/Tests/RunCMake/CMP0043/CMP0043-OLD.cmake new file mode 100644 index 0000000..f379430 --- /dev/null +++ b/Tests/RunCMake/CMP0043/CMP0043-OLD.cmake @@ -0,0 +1,7 @@ + +cmake_policy(SET CMP0043 OLD) + +add_library(foo empty.cpp) +set_property(TARGET foo + PROPERTY COMPILE_DEFINITIONS_DEBUG "DEBUG_MODE" +) diff --git a/Tests/RunCMake/CMP0043/CMP0043-WARN-result.txt b/Tests/RunCMake/CMP0043/CMP0043-WARN-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CMP0043/CMP0043-WARN-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CMP0043/CMP0043-WARN-stderr.txt b/Tests/RunCMake/CMP0043/CMP0043-WARN-stderr.txt new file mode 100644 index 0000000..4769a63 --- /dev/null +++ b/Tests/RunCMake/CMP0043/CMP0043-WARN-stderr.txt @@ -0,0 +1,5 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Policy CMP0043 is not set: Ignore COMPILE_DEFINITIONS_<Config> properties. + Run "cmake --help-policy CMP0043" for policy details. Use the cmake_policy + command to set the policy and suppress this warning. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CMP0043/CMP0043-WARN.cmake b/Tests/RunCMake/CMP0043/CMP0043-WARN.cmake new file mode 100644 index 0000000..161a60d --- /dev/null +++ b/Tests/RunCMake/CMP0043/CMP0043-WARN.cmake @@ -0,0 +1,5 @@ + +add_library(foo empty.cpp) +set_property(TARGET foo + PROPERTY COMPILE_DEFINITIONS_DEBUG "DEBUG_MODE" +) diff --git a/Tests/RunCMake/CMP0043/CMakeLists.txt b/Tests/RunCMake/CMP0043/CMakeLists.txt new file mode 100644 index 0000000..11ea636 --- /dev/null +++ b/Tests/RunCMake/CMP0043/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8) +project(${RunCMake_TEST} CXX) +include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/CMP0043/RunCMakeTest.cmake b/Tests/RunCMake/CMP0043/RunCMakeTest.cmake new file mode 100644 index 0000000..7f9572e --- /dev/null +++ b/Tests/RunCMake/CMP0043/RunCMakeTest.cmake @@ -0,0 +1,7 @@ +include(RunCMake) + +list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug) + +run_cmake(CMP0043-OLD) +run_cmake(CMP0043-NEW) +run_cmake(CMP0043-WARN) diff --git a/Tests/RunCMake/CMP0043/empty.cpp b/Tests/RunCMake/CMP0043/empty.cpp new file mode 100644 index 0000000..bfbbdde --- /dev/null +++ b/Tests/RunCMake/CMP0043/empty.cpp @@ -0,0 +1,7 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif +int empty() +{ + return 0; +} |