summaryrefslogtreecommitdiffstats
path: root/Tests/Properties
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-17 22:19:13 (GMT)
committerBrad King <brad.king@kitware.com>2008-01-17 22:19:13 (GMT)
commit669db35aa445cc67eef1ff53aced9602e253249e (patch)
tree4d2d3eec6f0f04c78f9e5e5a2c3b93a2935824bb /Tests/Properties
parent83901b30da3e42c43b06d1579a86b14be2acf50e (diff)
downloadCMake-669db35aa445cc67eef1ff53aced9602e253249e.zip
CMake-669db35aa445cc67eef1ff53aced9602e253249e.tar.gz
CMake-669db35aa445cc67eef1ff53aced9602e253249e.tar.bz2
ENH: Changed signature of GET_PROPERTY command to be more powerful and extendible.
Diffstat (limited to 'Tests/Properties')
-rw-r--r--Tests/Properties/CMakeLists.txt22
1 files changed, 12 insertions, 10 deletions
diff --git a/Tests/Properties/CMakeLists.txt b/Tests/Properties/CMakeLists.txt
index 15b5e14..9766b46 100644
--- a/Tests/Properties/CMakeLists.txt
+++ b/Tests/Properties/CMakeLists.txt
@@ -27,32 +27,34 @@ define_property(GLOBALTEST GLOBAL "A test property"
set_property(GLOBAL PROPERTY GLOBALTEST 1)
set_property(DIRECTORY PROPERTY DIRECTORYTEST 1)
set_property(SOURCE SubDir/properties3.cxx PROPERTY SOURCETEST 1)
-get_property(GLOBALRESULT GLOBAL GLOBALTEST)
-get_property(DIRECTORYRESULT DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
- DIRECTORYTEST)
-get_property(SOURCE_FILERESULT SOURCE_FILE SubDir/properties3.cxx SOURCETEST)
+get_property(GLOBALRESULT GLOBAL PROPERTY GLOBALTEST)
+get_property(DIRECTORYRESULT DIRECTORY PROPERTY DIRECTORYTEST)
+get_property(SOURCERESULT
+ SOURCE SubDir/properties3.cxx
+ PROPERTY SOURCETEST
+ )
if (RESULT1 AND RESULT2 AND RESULT3 AND GLOBALRESULT AND
- DIRECTORYRESULT AND SOURCE_FILERESULT)
+ DIRECTORYRESULT AND SOURCERESULT)
add_executable (Properties SubDir/properties3.cxx properties)
else (RESULT1 AND RESULT2 AND RESULT3 AND GLOBALRESULT AND
- DIRECTORYRESULT AND SOURCE_FILERESULT)
+ DIRECTORYRESULT AND SOURCERESULT)
message("Error: test results are RESULT1=${RESULT1} RESULT2=${RESULT2} "
"RESULT3=${RESULT3} GLOBALRESULT=${GLOBALRESULT} "
"DIRECTORYRESULT=${DIRECTORYRESULT} "
- "SOURCE_FILERESULT=${SOURCE_FILERESULT}")
+ "SOURCERESULT=${SOURCERESULT}")
endif (RESULT1 AND RESULT2 AND RESULT3 AND GLOBALRESULT AND
- DIRECTORYRESULT AND SOURCE_FILERESULT)
+ DIRECTORYRESULT AND SOURCERESULT)
# test the target property
set_property(TARGET Properties PROPERTY TARGETTEST 1)
-get_property(TARGETRESULT TARGET Properties TARGETTEST)
+get_property(TARGETRESULT TARGET Properties PROPERTY TARGETTEST)
if (NOT TARGETRESULT)
message("Error: target result is TARGETRESULT=${TARGETRESULT}")
endif (NOT TARGETRESULT)
# test the target SOURCES property
-get_property(Properties_SOURCES TARGET Properties SOURCES)
+get_property(Properties_SOURCES TARGET Properties PROPERTY SOURCES)
set_source_files_properties(${Properties_SOURCES} PROPERTIES TEST4 1)
get_source_file_property(RESULT4 properties.h TEST4)
if(NOT RESULT4)