summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-09-14 13:19:59 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-09-14 13:19:59 (GMT)
commit31117bb17c4e764bb60b8c9c6847a631cc9ecf3c (patch)
tree7d5344a424d0993e66414739d24bd02d6749e449 /Tests
parent75ad8d342119be9e71006c2f352755ad9565963b (diff)
parented258d606b87dacc465dad73b04f1c3e270b627c (diff)
downloadCMake-31117bb17c4e764bb60b8c9c6847a631cc9ecf3c.zip
CMake-31117bb17c4e764bb60b8c9c6847a631cc9ecf3c.tar.gz
CMake-31117bb17c4e764bb60b8c9c6847a631cc9ecf3c.tar.bz2
Merge topic 'fix-buildsystem-property-append'
ed258d60 Tests: Cover set_property for buildsystem directory properties fb45c371 cmState: Only append non-empty values to buildsystem properties. 158f7e31 cmMakefile: Use appropriate parameter name. 08ce3f48 cmTarget: Only append non-empty values to buildsystem properties.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/set_property/COMPILE_DEFINITIONS-stdout.txt3
-rw-r--r--Tests/RunCMake/set_property/COMPILE_DEFINITIONS.cmake1
-rw-r--r--Tests/RunCMake/set_property/COMPILE_FEATURES-stdout.txt2
-rw-r--r--Tests/RunCMake/set_property/COMPILE_OPTIONS-stdout.txt3
-rw-r--r--Tests/RunCMake/set_property/COMPILE_OPTIONS.cmake1
-rw-r--r--Tests/RunCMake/set_property/Common.cmake14
-rw-r--r--Tests/RunCMake/set_property/INCLUDE_DIRECTORIES-stdout.txt3
-rw-r--r--Tests/RunCMake/set_property/INCLUDE_DIRECTORIES.cmake1
-rw-r--r--Tests/RunCMake/set_property/LINK_LIBRARIES-stdout.txt2
-rw-r--r--Tests/RunCMake/set_property/USER_PROP-stdout.txt1
-rw-r--r--Tests/RunCMake/set_property/USER_PROP.cmake1
11 files changed, 27 insertions, 5 deletions
diff --git a/Tests/RunCMake/set_property/COMPILE_DEFINITIONS-stdout.txt b/Tests/RunCMake/set_property/COMPILE_DEFINITIONS-stdout.txt
index b85f41d..dd5bae1 100644
--- a/Tests/RunCMake/set_property/COMPILE_DEFINITIONS-stdout.txt
+++ b/Tests/RunCMake/set_property/COMPILE_DEFINITIONS-stdout.txt
@@ -1 +1,2 @@
--- Target COMPILE_DEFINITIONS is 'a;;b;c;;d;;e'
+-- Target COMPILE_DEFINITIONS is 'a;b;c;d;;e'
+-- Directory COMPILE_DEFINITIONS is 'a;b;c;d;;e'
diff --git a/Tests/RunCMake/set_property/COMPILE_DEFINITIONS.cmake b/Tests/RunCMake/set_property/COMPILE_DEFINITIONS.cmake
index ec07ce9..f0c63bf 100644
--- a/Tests/RunCMake/set_property/COMPILE_DEFINITIONS.cmake
+++ b/Tests/RunCMake/set_property/COMPILE_DEFINITIONS.cmake
@@ -1,2 +1,3 @@
include(Common.cmake)
test_target_property(COMPILE_DEFINITIONS)
+test_directory_property(COMPILE_DEFINITIONS)
diff --git a/Tests/RunCMake/set_property/COMPILE_FEATURES-stdout.txt b/Tests/RunCMake/set_property/COMPILE_FEATURES-stdout.txt
index 81ef170..bd5a992 100644
--- a/Tests/RunCMake/set_property/COMPILE_FEATURES-stdout.txt
+++ b/Tests/RunCMake/set_property/COMPILE_FEATURES-stdout.txt
@@ -1 +1 @@
--- Target COMPILE_FEATURES is 'a;;b;c;;d;;e'
+-- Target COMPILE_FEATURES is 'a;b;c;d;;e'
diff --git a/Tests/RunCMake/set_property/COMPILE_OPTIONS-stdout.txt b/Tests/RunCMake/set_property/COMPILE_OPTIONS-stdout.txt
index f18451a..1a20501 100644
--- a/Tests/RunCMake/set_property/COMPILE_OPTIONS-stdout.txt
+++ b/Tests/RunCMake/set_property/COMPILE_OPTIONS-stdout.txt
@@ -1 +1,2 @@
--- Target COMPILE_OPTIONS is 'a;;b;c;;d;;e'
+-- Target COMPILE_OPTIONS is 'a;b;c;d;;e'
+-- Directory COMPILE_OPTIONS is 'a;b;c;d;;e'
diff --git a/Tests/RunCMake/set_property/COMPILE_OPTIONS.cmake b/Tests/RunCMake/set_property/COMPILE_OPTIONS.cmake
index da20ec8..75f0535 100644
--- a/Tests/RunCMake/set_property/COMPILE_OPTIONS.cmake
+++ b/Tests/RunCMake/set_property/COMPILE_OPTIONS.cmake
@@ -1,2 +1,3 @@
include(Common.cmake)
test_target_property(COMPILE_OPTIONS)
+test_directory_property(COMPILE_OPTIONS)
diff --git a/Tests/RunCMake/set_property/Common.cmake b/Tests/RunCMake/set_property/Common.cmake
index b359487..9d5e4f4 100644
--- a/Tests/RunCMake/set_property/Common.cmake
+++ b/Tests/RunCMake/set_property/Common.cmake
@@ -12,3 +12,17 @@ macro(test_target_property PROP)
message(STATUS "Target ${PROP} is '${val}'")
set_property(TARGET CustomTarget PROPERTY ${PROP})
endmacro()
+
+macro(test_directory_property PROP)
+ set_property(DIRECTORY PROPERTY ${PROP} x)
+ set_property(DIRECTORY PROPERTY ${PROP})
+ set_property(DIRECTORY APPEND PROPERTY ${PROP})
+ set_property(DIRECTORY PROPERTY ${PROP} a)
+ set_property(DIRECTORY APPEND PROPERTY ${PROP} "")
+ set_property(DIRECTORY APPEND PROPERTY ${PROP} b c)
+ set_property(DIRECTORY APPEND PROPERTY ${PROP})
+ set_property(DIRECTORY APPEND PROPERTY ${PROP} "d;;e")
+ get_property(val DIRECTORY PROPERTY ${PROP})
+ message(STATUS "Directory ${PROP} is '${val}'")
+ set_property(DIRECTORY PROPERTY ${PROP})
+endmacro()
diff --git a/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES-stdout.txt b/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES-stdout.txt
index f9970ce..c957dd5 100644
--- a/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES-stdout.txt
+++ b/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES-stdout.txt
@@ -1 +1,2 @@
--- Target INCLUDE_DIRECTORIES is 'a;;b;c;;d;;e'
+-- Target INCLUDE_DIRECTORIES is 'a;b;c;d;;e'
+-- Directory INCLUDE_DIRECTORIES is 'a;b;c;d;;e'
diff --git a/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES.cmake b/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES.cmake
index 8f44aee..c9a9151 100644
--- a/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES.cmake
+++ b/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES.cmake
@@ -1,2 +1,3 @@
include(Common.cmake)
test_target_property(INCLUDE_DIRECTORIES)
+test_directory_property(INCLUDE_DIRECTORIES)
diff --git a/Tests/RunCMake/set_property/LINK_LIBRARIES-stdout.txt b/Tests/RunCMake/set_property/LINK_LIBRARIES-stdout.txt
index 1f7663b..9a3988e 100644
--- a/Tests/RunCMake/set_property/LINK_LIBRARIES-stdout.txt
+++ b/Tests/RunCMake/set_property/LINK_LIBRARIES-stdout.txt
@@ -1 +1 @@
--- Target LINK_LIBRARIES is 'a;;b;c;;d;;e'
+-- Target LINK_LIBRARIES is 'a;b;c;d;;e'
diff --git a/Tests/RunCMake/set_property/USER_PROP-stdout.txt b/Tests/RunCMake/set_property/USER_PROP-stdout.txt
index eaf6e37..107cc87 100644
--- a/Tests/RunCMake/set_property/USER_PROP-stdout.txt
+++ b/Tests/RunCMake/set_property/USER_PROP-stdout.txt
@@ -1 +1,2 @@
-- Target USER_PROP is 'a;b;c;d;;e'
+-- Directory USER_PROP is 'a;b;c;d;;e'
diff --git a/Tests/RunCMake/set_property/USER_PROP.cmake b/Tests/RunCMake/set_property/USER_PROP.cmake
index e1f88e1..aa0aa83 100644
--- a/Tests/RunCMake/set_property/USER_PROP.cmake
+++ b/Tests/RunCMake/set_property/USER_PROP.cmake
@@ -1,2 +1,3 @@
include(Common.cmake)
test_target_property(USER_PROP)
+test_directory_property(USER_PROP)