[cmake-commits] king committed CMakeLists.txt 1.4 1.5

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Jan 17 17:19:15 EST 2008


Update of /cvsroot/CMake/CMake/Tests/Properties
In directory public:/mounts/ram/cvs-serv31094/Tests/Properties

Modified Files:
	CMakeLists.txt 
Log Message:
ENH: Changed signature of GET_PROPERTY command to be more powerful and extendible.


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/Properties/CMakeLists.txt,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CMakeLists.txt	17 Jan 2008 20:54:49 -0000	1.4
+++ CMakeLists.txt	17 Jan 2008 22:19:13 -0000	1.5
@@ -27,32 +27,34 @@
 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)



More information about the Cmake-commits mailing list