[cmake-commits] king committed CMakeLists.txt 1.8 1.9

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Dec 21 12:22:14 EST 2007


Update of /cvsroot/CMake/CMake/Tests/BuildDepends
In directory public:/mounts/ram/cvs-serv21743/Tests/BuildDepends

Modified Files:
	CMakeLists.txt 
Log Message:
ENH: Add a depends check step to custom targets.  Add support for the IMPLICIT_DEPENDS feature of custom commands when building in custom targets.  Convert multiple-output pair checks to be per-target instead of global.


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/BuildDepends/CMakeLists.txt,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- CMakeLists.txt	17 Sep 2007 14:51:05 -0000	1.8
+++ CMakeLists.txt	21 Dec 2007 17:22:12 -0000	1.9
@@ -13,6 +13,8 @@
 
 file(WRITE ${BuildDepends_BINARY_DIR}/Project/zot.hxx.in
   "static const char* zot = \"zot\";\n")
+file(WRITE ${BuildDepends_BINARY_DIR}/Project/zot_custom.hxx.in
+  "static const char* zot_custom = \"zot_custom\";\n")
 
 message("Building project first time")
 try_compile(RESULT 
@@ -70,11 +72,11 @@
 string(REGEX REPLACE "[\r\n]" " " out "${out}")
 message("Run result: ${runResult} Output: \"${out}\"")
 
-if("${out}" STREQUAL "zot ")
+if("${out}" STREQUAL "[zot] [zot_custom] ")
   message("Worked!")
-else("${out}" STREQUAL "zot ")
+else("${out}" STREQUAL "[zot] [zot_custom] ")
   message(SEND_ERROR "Project did not initially build properly: ${out}")
-endif("${out}" STREQUAL "zot ")
+endif("${out}" STREQUAL "[zot] [zot_custom] ")
 
 message("Waiting 3 seconds...")
 # any additional argument will cause ${bar} to wait forever
@@ -85,6 +87,8 @@
   "const char* foo() { return \"foo changed\";}" )
 file(WRITE ${BuildDepends_BINARY_DIR}/Project/zot.hxx.in
   "static const char* zot = \"zot changed\";\n")
+file(WRITE ${BuildDepends_BINARY_DIR}/Project/zot_custom.hxx.in
+  "static const char* zot_custom = \"zot_custom changed\";\n")
 
 message("Building project second time")
 try_compile(RESULT 
@@ -137,8 +141,8 @@
 string(REGEX REPLACE "[\r\n]" " " out "${out}")
 message("Run result: ${runResult} Output: \"${out}\"")
 
-if("${out}" STREQUAL "zot changed ")
+if("${out}" STREQUAL "[zot changed] [zot_custom changed] ")
   message("Worked!")
-else("${out}" STREQUAL "zot changed ")
+else("${out}" STREQUAL "[zot changed] [zot_custom changed] ")
   message(SEND_ERROR "Project did not rebuild properly!")
-endif("${out}" STREQUAL "zot changed ")
+endif("${out}" STREQUAL "[zot changed] [zot_custom changed] ")



More information about the Cmake-commits mailing list