summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMP0026
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/CMP0026')
-rw-r--r--Tests/RunCMake/CMP0026/CMP0026-IMPORTED-result.txt1
-rw-r--r--Tests/RunCMake/CMP0026/CMP0026-IMPORTED-stderr.txt1
-rw-r--r--Tests/RunCMake/CMP0026/CMP0026-IMPORTED.cmake6
-rw-r--r--Tests/RunCMake/CMP0026/CMP0026-NEW-result.txt1
-rw-r--r--Tests/RunCMake/CMP0026/CMP0026-NEW-stderr.txt11
-rw-r--r--Tests/RunCMake/CMP0026/CMP0026-NEW.cmake7
-rw-r--r--Tests/RunCMake/CMP0026/CMP0026-WARN-result.txt1
-rw-r--r--Tests/RunCMake/CMP0026/CMP0026-WARN-stderr.txt12
-rw-r--r--Tests/RunCMake/CMP0026/CMP0026-WARN.cmake5
-rw-r--r--Tests/RunCMake/CMP0026/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CMP0026/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/CMP0026/empty.cpp7
12 files changed, 60 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0026/CMP0026-IMPORTED-result.txt b/Tests/RunCMake/CMP0026/CMP0026-IMPORTED-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-IMPORTED-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CMP0026/CMP0026-IMPORTED-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-IMPORTED-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-IMPORTED-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/CMP0026/CMP0026-IMPORTED.cmake b/Tests/RunCMake/CMP0026/CMP0026-IMPORTED.cmake
new file mode 100644
index 0000000..650c8a5
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-IMPORTED.cmake
@@ -0,0 +1,6 @@
+
+enable_language(CXX)
+
+add_library(someimportedlib SHARED IMPORTED)
+
+get_target_property(_loc someimportedlib LOCATION)
diff --git a/Tests/RunCMake/CMP0026/CMP0026-NEW-result.txt b/Tests/RunCMake/CMP0026/CMP0026-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMP0026/CMP0026-NEW-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-NEW-stderr.txt
new file mode 100644
index 0000000..2a05a4d
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-NEW-stderr.txt
@@ -0,0 +1,11 @@
+CMake Error at CMP0026-NEW.cmake:7 \(get_target_property\):
+ Policy CMP0026 is not set: Disallow use of the LOCATION target property.
+ Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
+ command to set the policy and suppress this warning.
+
+ The LOCATION property may not be read from target "somelib". Use the
+ target name directly with add_custom_command, or use the generator
+ expression \$<TARGET_FILE>, as appropriate.
+
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/CMP0026/CMP0026-NEW.cmake b/Tests/RunCMake/CMP0026/CMP0026-NEW.cmake
new file mode 100644
index 0000000..1659ffc
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-NEW.cmake
@@ -0,0 +1,7 @@
+
+enable_language(CXX)
+
+cmake_policy(SET CMP0026 NEW)
+
+add_library(somelib empty.cpp)
+get_target_property(_loc somelib LOCATION)
diff --git a/Tests/RunCMake/CMP0026/CMP0026-WARN-result.txt b/Tests/RunCMake/CMP0026/CMP0026-WARN-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-WARN-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CMP0026/CMP0026-WARN-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-WARN-stderr.txt
new file mode 100644
index 0000000..9b88194
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-WARN-stderr.txt
@@ -0,0 +1,12 @@
+CMake Warning \(dev\) at CMP0026-WARN.cmake:5 \(get_target_property\):
+ Policy CMP0026 is not set: Disallow use of the LOCATION target property.
+ Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy
+ command to set the policy and suppress this warning.
+
+ The LOCATION property should not be read from target "somelib". Use the
+ target name directly with add_custom_command, or use the generator
+ expression \$<TARGET_FILE>, as appropriate.
+
+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/CMP0026/CMP0026-WARN.cmake b/Tests/RunCMake/CMP0026/CMP0026-WARN.cmake
new file mode 100644
index 0000000..89c5a8a
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-WARN.cmake
@@ -0,0 +1,5 @@
+
+enable_language(CXX)
+
+add_library(somelib empty.cpp)
+get_target_property(_loc somelib LOCATION)
diff --git a/Tests/RunCMake/CMP0026/CMakeLists.txt b/Tests/RunCMake/CMP0026/CMakeLists.txt
new file mode 100644
index 0000000..e8db6b0
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 2.8)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0026/RunCMakeTest.cmake b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake
new file mode 100644
index 0000000..68000a6
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake
@@ -0,0 +1,5 @@
+include(RunCMake)
+
+run_cmake(CMP0026-WARN)
+run_cmake(CMP0026-NEW)
+run_cmake(CMP0026-IMPORTED)
diff --git a/Tests/RunCMake/CMP0026/empty.cpp b/Tests/RunCMake/CMP0026/empty.cpp
new file mode 100644
index 0000000..bfbbdde
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/empty.cpp
@@ -0,0 +1,7 @@
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+int empty()
+{
+ return 0;
+}