Tests: test -D parsing on the command line

This commit is contained in:
Ben Boeckel 2014-10-20 12:17:03 -04:00
parent a3eeaa63ae
commit 368e8de4cd
6 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,3 @@
cmake_minimum_required(VERSION 3.0)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)

View File

@ -0,0 +1 @@
^--><--$

View File

@ -0,0 +1 @@
message("-->${FOO}<--")

View File

@ -0,0 +1 @@
^-->-DBAR:BOOL=BAZ<--$

View File

@ -0,0 +1 @@
message("-->${FOO}<--")

View File

@ -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)