diff options
author | Brad King <brad.king@kitware.com> | 2015-09-02 20:38:19 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-09-11 17:13:25 (GMT) |
commit | ed258d606b87dacc465dad73b04f1c3e270b627c (patch) | |
tree | 5935969a60c2903eba9388ef19b7ba350ad5e572 | |
parent | fb45c37160e4f8d839a2c29bce80cae7563cfd3a (diff) | |
download | CMake-ed258d606b87dacc465dad73b04f1c3e270b627c.zip CMake-ed258d606b87dacc465dad73b04f1c3e270b627c.tar.gz CMake-ed258d606b87dacc465dad73b04f1c3e270b627c.tar.bz2 |
Tests: Cover set_property for buildsystem directory properties
Extend the RunCMake.set_property test with cases covering buildsystem
directory properties:
* COMPILE_DEFINITIONS
* COMPILE_OPTIONS
* INCLUDE_DIRECTORIES
Also test a non-buildsystem property to document the equivalence
in behavior.
9 files changed, 22 insertions, 0 deletions
diff --git a/Tests/RunCMake/set_property/COMPILE_DEFINITIONS-stdout.txt b/Tests/RunCMake/set_property/COMPILE_DEFINITIONS-stdout.txt index 186fe99..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' +-- 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_OPTIONS-stdout.txt b/Tests/RunCMake/set_property/COMPILE_OPTIONS-stdout.txt index 65d6934..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' +-- 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 955bdf2..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' +-- 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/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) |