diff options
author | Brad King <brad.king@kitware.com> | 2015-07-27 13:31:16 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-07-27 13:31:16 (GMT) |
commit | d74abbea895d032e5b4efa43854ad57417b8ab40 (patch) | |
tree | 55f95e8001b1ff683397ffe1fc70754e772f32d8 /Tests | |
parent | 91a159245fc5978c20245b60360e55e204f468a4 (diff) | |
parent | bbb507aebcb3559ae6e7d34ef02443e2d6ec3869 (diff) | |
download | CMake-d74abbea895d032e5b4efa43854ad57417b8ab40.zip CMake-d74abbea895d032e5b4efa43854ad57417b8ab40.tar.gz CMake-d74abbea895d032e5b4efa43854ad57417b8ab40.tar.bz2 |
Merge topic 'refactor-cmMakefile-properties'
bbb507ae cmMakefile: Move the InitializeFromParent method
6ed9c7e0 cmState: Host buildsystem properties for directories.
8f0a5d84 cmState: Fix compilation on IBM XL compiler
9644a2d1 cmAlgorithms: Add cmMakeReverseIterator.
1e77de74 cmMakefile: Don't clear buildsystem properties.
c1bf1a59 CompileDefinitions: Add unit test for setting empty content.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CompileDefinitions/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CompileDefinitions/RunCMakeTest.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CompileDefinitions/SetEmpty-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CompileDefinitions/SetEmpty-stderr.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CompileDefinitions/SetEmpty.cmake | 12 |
6 files changed, 23 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 7ff1889..607e799 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -143,6 +143,7 @@ add_RunCMake_test(Swift) add_RunCMake_test(TargetObjects) add_RunCMake_test(TargetSources) add_RunCMake_test(find_dependency) +add_RunCMake_test(CompileDefinitions) add_RunCMake_test(CompileFeatures) add_RunCMake_test(WriteCompilerDetectionHeader) if(NOT WIN32) diff --git a/Tests/RunCMake/CompileDefinitions/CMakeLists.txt b/Tests/RunCMake/CompileDefinitions/CMakeLists.txt new file mode 100644 index 0000000..74b3ff8 --- /dev/null +++ b/Tests/RunCMake/CompileDefinitions/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.3) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CompileDefinitions/RunCMakeTest.cmake b/Tests/RunCMake/CompileDefinitions/RunCMakeTest.cmake new file mode 100644 index 0000000..233fe34 --- /dev/null +++ b/Tests/RunCMake/CompileDefinitions/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(SetEmpty) diff --git a/Tests/RunCMake/CompileDefinitions/SetEmpty-result.txt b/Tests/RunCMake/CompileDefinitions/SetEmpty-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CompileDefinitions/SetEmpty-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CompileDefinitions/SetEmpty-stderr.txt b/Tests/RunCMake/CompileDefinitions/SetEmpty-stderr.txt new file mode 100644 index 0000000..ace6656 --- /dev/null +++ b/Tests/RunCMake/CompileDefinitions/SetEmpty-stderr.txt @@ -0,0 +1,3 @@ +RESULT1=A;;B +RESULT2= +RESULT3=-DBAR diff --git a/Tests/RunCMake/CompileDefinitions/SetEmpty.cmake b/Tests/RunCMake/CompileDefinitions/SetEmpty.cmake new file mode 100644 index 0000000..15cb4e9 --- /dev/null +++ b/Tests/RunCMake/CompileDefinitions/SetEmpty.cmake @@ -0,0 +1,12 @@ + +set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS A "" B) +get_property(result DIRECTORY PROPERTY COMPILE_DEFINITIONS) +message("RESULT1=${result}") + +set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS) +get_property(result DIRECTORY PROPERTY COMPILE_DEFINITIONS) +message("RESULT2=${result}") + +set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS -DBAR) +get_property(result DIRECTORY PROPERTY COMPILE_DEFINITIONS) +message("RESULT3=${result}") |