summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/include
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-10-10 09:46:06 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-10-10 10:01:39 (GMT)
commitaf1f6987571b6f8298b03e184aa4aad23882d5c8 (patch)
treeb8c2ed5d64659f6defc853921a1aa5cf2b46e8dd /Tests/RunCMake/include
parent7e4910fe47d667e059e42ac6395b0f4726f17064 (diff)
downloadCMake-af1f6987571b6f8298b03e184aa4aad23882d5c8.zip
CMake-af1f6987571b6f8298b03e184aa4aad23882d5c8.tar.gz
CMake-af1f6987571b6f8298b03e184aa4aad23882d5c8.tar.bz2
CMP0024: Store the fact of included export in global generator.
Storing it in the makefile means that the policy does not trigger when include and export are in differing directories.
Diffstat (limited to 'Tests/RunCMake/include')
-rw-r--r--Tests/RunCMake/include/CMP0024-NEW-stderr.txt7
-rw-r--r--Tests/RunCMake/include/CMP0024-NEW.cmake4
-rw-r--r--Tests/RunCMake/include/CMP0024-WARN-stderr.txt6
-rw-r--r--Tests/RunCMake/include/CMP0024-WARN.cmake4
-rw-r--r--Tests/RunCMake/include/subdir1/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/include/subdir2/CMakeLists.txt2
6 files changed, 12 insertions, 13 deletions
diff --git a/Tests/RunCMake/include/CMP0024-NEW-stderr.txt b/Tests/RunCMake/include/CMP0024-NEW-stderr.txt
index 182c67a..059d7e4 100644
--- a/Tests/RunCMake/include/CMP0024-NEW-stderr.txt
+++ b/Tests/RunCMake/include/CMP0024-NEW-stderr.txt
@@ -1,15 +1,12 @@
-CMake Error at CMP0024-NEW.cmake:9 \(include\):
+CMake Error at subdir2/CMakeLists.txt:2 \(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
+ .*/Tests/RunCMake/include/CMP0024-NEW-build/subdir1/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
index 0685d6c..0e03d2a 100644
--- a/Tests/RunCMake/include/CMP0024-NEW.cmake
+++ b/Tests/RunCMake/include/CMP0024-NEW.cmake
@@ -5,5 +5,5 @@ 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")
+add_subdirectory(subdir1)
+add_subdirectory(subdir2)
diff --git a/Tests/RunCMake/include/CMP0024-WARN-stderr.txt b/Tests/RunCMake/include/CMP0024-WARN-stderr.txt
index 2b36f17..9c79007 100644
--- a/Tests/RunCMake/include/CMP0024-WARN-stderr.txt
+++ b/Tests/RunCMake/include/CMP0024-WARN-stderr.txt
@@ -1,16 +1,14 @@
-CMake Warning \(dev\) at CMP0024-WARN.cmake:7 \(include\):
+CMake Warning \(dev\) at subdir2/CMakeLists.txt:2 \(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
+ .*/Tests/RunCMake/include/CMP0024-WARN-build/subdir1/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
index 583c7d4..783cf78 100644
--- a/Tests/RunCMake/include/CMP0024-WARN.cmake
+++ b/Tests/RunCMake/include/CMP0024-WARN.cmake
@@ -3,5 +3,5 @@ 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")
+add_subdirectory(subdir1)
+add_subdirectory(subdir2)
diff --git a/Tests/RunCMake/include/subdir1/CMakeLists.txt b/Tests/RunCMake/include/subdir1/CMakeLists.txt
new file mode 100644
index 0000000..11a76d1
--- /dev/null
+++ b/Tests/RunCMake/include/subdir1/CMakeLists.txt
@@ -0,0 +1,2 @@
+
+export(TARGETS foo FILE "${CMAKE_CURRENT_BINARY_DIR}/theTargets.cmake")
diff --git a/Tests/RunCMake/include/subdir2/CMakeLists.txt b/Tests/RunCMake/include/subdir2/CMakeLists.txt
new file mode 100644
index 0000000..7361f9c
--- /dev/null
+++ b/Tests/RunCMake/include/subdir2/CMakeLists.txt
@@ -0,0 +1,2 @@
+
+include("${CMAKE_CURRENT_BINARY_DIR}/../subdir1/theTargets.cmake")