summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLine
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-10-20 16:17:03 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2014-10-20 16:17:03 (GMT)
commit368e8de4cd5a5d97c9b5e81489bf014579211bda (patch)
tree36c48077ae94108e7339295e327057b8473941a2 /Tests/RunCMake/CommandLine
parenta3eeaa63ae9900123cf88e4155d748bf37b93cce (diff)
downloadCMake-368e8de4cd5a5d97c9b5e81489bf014579211bda.zip
CMake-368e8de4cd5a5d97c9b5e81489bf014579211bda.tar.gz
CMake-368e8de4cd5a5d97c9b5e81489bf014579211bda.tar.bz2
Tests: test -D parsing on the command line
Diffstat (limited to 'Tests/RunCMake/CommandLine')
-rw-r--r--Tests/RunCMake/CommandLine/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CommandLine/D_nested_cache-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/D_nested_cache.cmake1
-rw-r--r--Tests/RunCMake/CommandLine/D_typed_nested_cache-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/D_typed_nested_cache.cmake1
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake8
6 files changed, 15 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/CMakeLists.txt b/Tests/RunCMake/CommandLine/CMakeLists.txt
new file mode 100644
index 0000000..2897109
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.0)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CommandLine/D_nested_cache-stderr.txt b/Tests/RunCMake/CommandLine/D_nested_cache-stderr.txt
new file mode 100644
index 0000000..a1cc8d3
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/D_nested_cache-stderr.txt
@@ -0,0 +1 @@
+^--><--$
diff --git a/Tests/RunCMake/CommandLine/D_nested_cache.cmake b/Tests/RunCMake/CommandLine/D_nested_cache.cmake
new file mode 100644
index 0000000..9b57284
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/D_nested_cache.cmake
@@ -0,0 +1 @@
+message("-->${FOO}<--")
diff --git a/Tests/RunCMake/CommandLine/D_typed_nested_cache-stderr.txt b/Tests/RunCMake/CommandLine/D_typed_nested_cache-stderr.txt
new file mode 100644
index 0000000..bba64bc
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/D_typed_nested_cache-stderr.txt
@@ -0,0 +1 @@
+^-->-DBAR:BOOL=BAZ<--$
diff --git a/Tests/RunCMake/CommandLine/D_typed_nested_cache.cmake b/Tests/RunCMake/CommandLine/D_typed_nested_cache.cmake
new file mode 100644
index 0000000..9b57284
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/D_typed_nested_cache.cmake
@@ -0,0 +1 @@
+message("-->${FOO}<--")
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 5622a5b..84e3614 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -43,3 +43,11 @@ run_cmake_command(E_sleep-bad-arg2 ${CMAKE_COMMAND} -E sleep 1 -1)
run_cmake_command(E_sleep-one-tenth ${CMAKE_COMMAND} -E sleep 0.1)
run_cmake_command(P_directory ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR})
+
+set(RunCMake_TEST_OPTIONS
+ "-DFOO=-DBAR:BOOL=BAZ")
+run_cmake(D_nested_cache)
+
+set(RunCMake_TEST_OPTIONS
+ "-DFOO:STRING=-DBAR:BOOL=BAZ")
+run_cmake(D_typed_nested_cache)