diff options
author | Brad King <brad.king@kitware.com> | 2013-10-08 14:59:07 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-10-08 14:59:07 (GMT) |
commit | 40c84683aafc9447a0e17d81a71d061efde84bdb (patch) | |
tree | f5090d54d217c02c75b92980d61bfdee974c0db5 /Tests | |
parent | 5a6c15155cbf18de60e118700e3e778f796e213d (diff) | |
parent | 904ff9fe592882db5dae88e526db2b380d92f87d (diff) | |
download | CMake-40c84683aafc9447a0e17d81a71d061efde84bdb.zip CMake-40c84683aafc9447a0e17d81a71d061efde84bdb.tar.gz CMake-40c84683aafc9447a0e17d81a71d061efde84bdb.tar.bz2 |
Merge topic 'export-policy'
904ff9f export: Add policy CMP0024 to disallow include() of export files
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/include/CMP0024-NEW-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/include/CMP0024-NEW-stderr.txt | 15 | ||||
-rw-r--r-- | Tests/RunCMake/include/CMP0024-NEW.cmake | 9 | ||||
-rw-r--r-- | Tests/RunCMake/include/CMP0024-WARN-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/include/CMP0024-WARN-stderr.txt | 16 | ||||
-rw-r--r-- | Tests/RunCMake/include/CMP0024-WARN.cmake | 7 | ||||
-rw-r--r-- | Tests/RunCMake/include/RunCMakeTest.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/include/empty.cpp | 7 |
8 files changed, 58 insertions, 0 deletions
diff --git a/Tests/RunCMake/include/CMP0024-NEW-result.txt b/Tests/RunCMake/include/CMP0024-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/include/CMP0024-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/include/CMP0024-NEW-stderr.txt b/Tests/RunCMake/include/CMP0024-NEW-stderr.txt new file mode 100644 index 0000000..182c67a --- /dev/null +++ b/Tests/RunCMake/include/CMP0024-NEW-stderr.txt @@ -0,0 +1,15 @@ +CMake Error at CMP0024-NEW.cmake:9 \(include\): + Policy CMP0024 is not set: Disallow include export result. Run "cmake + --help-policy CMP0024" for policy details. Use the cmake_policy command to + set the policy and suppress this warning. + + The file + + .*/Tests/RunCMake/include/CMP0024-NEW-build/theTargets.cmake + + was generated by the export\(\) command. It may not be used as the argument + to the include\(\) command. Use ALIAS targets instead to refer to targets by + alternative names. + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/include/CMP0024-NEW.cmake b/Tests/RunCMake/include/CMP0024-NEW.cmake new file mode 100644 index 0000000..0685d6c --- /dev/null +++ b/Tests/RunCMake/include/CMP0024-NEW.cmake @@ -0,0 +1,9 @@ + +enable_language(CXX) + +cmake_policy(SET CMP0024 NEW) + +add_library(foo SHARED empty.cpp) + +export(TARGETS foo FILE "${CMAKE_CURRENT_BINARY_DIR}/theTargets.cmake") +include("${CMAKE_CURRENT_BINARY_DIR}/theTargets.cmake") diff --git a/Tests/RunCMake/include/CMP0024-WARN-result.txt b/Tests/RunCMake/include/CMP0024-WARN-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/include/CMP0024-WARN-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/include/CMP0024-WARN-stderr.txt b/Tests/RunCMake/include/CMP0024-WARN-stderr.txt new file mode 100644 index 0000000..2b36f17 --- /dev/null +++ b/Tests/RunCMake/include/CMP0024-WARN-stderr.txt @@ -0,0 +1,16 @@ +CMake Warning \(dev\) at CMP0024-WARN.cmake:7 \(include\): + Policy CMP0024 is not set: Disallow include export result. Run "cmake + --help-policy CMP0024" for policy details. Use the cmake_policy command to + set the policy and suppress this warning. + + The file + + .*/Tests/RunCMake/include/CMP0024-WARN-build/theTargets.cmake + + was generated by the export\(\) command. It should not be used as the + argument to the include\(\) command. Use ALIAS targets instead to refer to + targets by alternative names. + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/include/CMP0024-WARN.cmake b/Tests/RunCMake/include/CMP0024-WARN.cmake new file mode 100644 index 0000000..583c7d4 --- /dev/null +++ b/Tests/RunCMake/include/CMP0024-WARN.cmake @@ -0,0 +1,7 @@ + +enable_language(CXX) + +add_library(foo SHARED empty.cpp) + +export(TARGETS foo FILE "${CMAKE_CURRENT_BINARY_DIR}/theTargets.cmake") +include("${CMAKE_CURRENT_BINARY_DIR}/theTargets.cmake") diff --git a/Tests/RunCMake/include/RunCMakeTest.cmake b/Tests/RunCMake/include/RunCMakeTest.cmake index 59b87ca..7fc9a12 100644 --- a/Tests/RunCMake/include/RunCMakeTest.cmake +++ b/Tests/RunCMake/include/RunCMakeTest.cmake @@ -2,3 +2,5 @@ include(RunCMake) run_cmake(EmptyString) run_cmake(EmptyStringOptional) +run_cmake(CMP0024-WARN) +run_cmake(CMP0024-NEW) diff --git a/Tests/RunCMake/include/empty.cpp b/Tests/RunCMake/include/empty.cpp new file mode 100644 index 0000000..bfbbdde --- /dev/null +++ b/Tests/RunCMake/include/empty.cpp @@ -0,0 +1,7 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif +int empty() +{ + return 0; +} |