summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/CMP0019/CMP0019-NEW.cmake2
-rw-r--r--Tests/RunCMake/CMP0019/CMP0019-OLD.cmake2
-rw-r--r--Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt40
-rw-r--r--Tests/RunCMake/CMP0019/CMP0019-WARN.cmake1
-rw-r--r--Tests/RunCMake/CMP0019/CMP0019-code.cmake9
-rw-r--r--Tests/RunCMake/CMP0019/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CMP0019/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/CMakeLists.txt1
8 files changed, 63 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0019/CMP0019-NEW.cmake b/Tests/RunCMake/CMP0019/CMP0019-NEW.cmake
new file mode 100644
index 0000000..3091e66
--- /dev/null
+++ b/Tests/RunCMake/CMP0019/CMP0019-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0019 NEW)
+include(CMP0019-code.cmake)
diff --git a/Tests/RunCMake/CMP0019/CMP0019-OLD.cmake b/Tests/RunCMake/CMP0019/CMP0019-OLD.cmake
new file mode 100644
index 0000000..0f02f9c
--- /dev/null
+++ b/Tests/RunCMake/CMP0019/CMP0019-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0019 OLD)
+include(CMP0019-code.cmake)
diff --git a/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt b/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt
new file mode 100644
index 0000000..03faef9
--- /dev/null
+++ b/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt
@@ -0,0 +1,40 @@
+CMake Warning \(dev\) in CMakeLists.txt:
+ Policy CMP0019 is not set: Do not re-expand variables in include and link
+ information. Run "cmake --help-policy CMP0019" for policy details. Use
+ the cmake_policy command to set the policy and suppress this warning.
+
+ The following variable evaluations were encountered:
+
+ Evaluated directory INCLUDE_DIRECTORIES
+
+ /usr/include/\${VAR_INCLUDE};/usr/include/normal
+
+ as
+
+ /usr/include/VAL_INCLUDE;/usr/include/normal
+
+ Evaluated target some_target INCLUDE_DIRECTORIES
+
+ /usr/include/\${VAR_INCLUDE};/usr/include/normal
+
+ as
+
+ /usr/include/VAL_INCLUDE;/usr/include/normal
+
+ Evaluated link directory
+
+ /usr/lib/\${VAR_LINK_DIRS}
+
+ as
+
+ /usr/lib/VAL_LINK_DIRS
+
+ Evaluated link library
+
+ \${VAR_LINK_LIBS}
+
+ as
+
+ VAL_LINK_LIBS
+
+This warning is for project developers. Use -Wno-dev to suppress it.$
diff --git a/Tests/RunCMake/CMP0019/CMP0019-WARN.cmake b/Tests/RunCMake/CMP0019/CMP0019-WARN.cmake
new file mode 100644
index 0000000..a419f30
--- /dev/null
+++ b/Tests/RunCMake/CMP0019/CMP0019-WARN.cmake
@@ -0,0 +1 @@
+include(CMP0019-code.cmake)
diff --git a/Tests/RunCMake/CMP0019/CMP0019-code.cmake b/Tests/RunCMake/CMP0019/CMP0019-code.cmake
new file mode 100644
index 0000000..26c0e5b
--- /dev/null
+++ b/Tests/RunCMake/CMP0019/CMP0019-code.cmake
@@ -0,0 +1,9 @@
+set(VAR_INCLUDE "VAL_INCLUDE")
+set(VAR_LINK_DIRS "VAL_LINK_DIRS")
+set(VAR_LINK_LIBS "VAL_LINK_LIBS")
+add_custom_target(some_target)
+include_directories("/usr/include/\${VAR_INCLUDE}" /usr/include/normal)
+link_directories("/usr/lib/\${VAR_LINK_DIRS}" /usr/lib/normal)
+link_libraries("\${VAR_LINK_LIBS}" normal)
+add_custom_target(other_target)
+set_property(TARGET other_target PROPERTY INCLUDE_DIRECTORIES "")
diff --git a/Tests/RunCMake/CMP0019/CMakeLists.txt b/Tests/RunCMake/CMP0019/CMakeLists.txt
new file mode 100644
index 0000000..e8db6b0
--- /dev/null
+++ b/Tests/RunCMake/CMP0019/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/CMP0019/RunCMakeTest.cmake b/Tests/RunCMake/CMP0019/RunCMakeTest.cmake
new file mode 100644
index 0000000..119fc2b
--- /dev/null
+++ b/Tests/RunCMake/CMP0019/RunCMakeTest.cmake
@@ -0,0 +1,5 @@
+include(RunCMake)
+
+run_cmake(CMP0019-WARN)
+run_cmake(CMP0019-OLD)
+run_cmake(CMP0019-NEW)
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 722d9c3..cc544a3 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -45,6 +45,7 @@ macro(add_RunCMake_test test)
)
endmacro()
+add_RunCMake_test(CMP0019)
add_RunCMake_test(GeneratorExpression)
add_RunCMake_test(TargetPropertyGeneratorExpressions)
add_RunCMake_test(Languages)