[cmake-commits] king committed CMakeLists.txt 1.2 1.3

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Dec 17 10:12:24 EST 2007


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

Modified Files:
	CMakeLists.txt 
Log Message:
ENH: Added SOURCES property to targets.  This is based on patch from issues #6137.


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/Properties/CMakeLists.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CMakeLists.txt	25 Jun 2007 13:51:37 -0000	1.2
+++ CMakeLists.txt	17 Dec 2007 15:12:22 -0000	1.3
@@ -35,7 +35,7 @@
 
 if (RESULT1 AND RESULT2 AND RESULT3 AND GLOBALRESULT AND 
     DIRECTORYRESULT AND SOURCE_FILERESULT)
-  add_executable (Properties SubDir/properties3.cxx)
+  add_executable (Properties SubDir/properties3.cxx properties)
 else (RESULT1 AND RESULT2 AND RESULT3 AND GLOBALRESULT AND 
     DIRECTORYRESULT AND SOURCE_FILERESULT)
   message("Error: test results are RESULT1=${RESULT1} RESULT2=${RESULT2} "
@@ -51,3 +51,13 @@
 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)
+set_source_files_properties(${Properties_SOURCES} PROPERTIES TEST4 1)
+get_source_file_property(RESULT4 properties.h TEST4)
+if(NOT RESULT4)
+  message("Error: target result is"
+    " RESULT4=${RESULT4}"
+    " Properties_SOURCES=[${Properties_SOURCES}]")
+endif(NOT RESULT4)



More information about the Cmake-commits mailing list