[cmake-commits] king committed CMakeLists.txt 1.4 1.5
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed May 23 17:58:16 EDT 2007
Update of /cvsroot/CMake/CMake/Tests/BuildDepends
In directory public:/mounts/ram/cvs-serv12046
Modified Files:
CMakeLists.txt
Log Message:
BUG: Report proper error message when project does not build the first time. Also added hack to rebuild subproject several times for Xcode. The generator should be fixed and the hack removed.
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/BuildDepends/CMakeLists.txt,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CMakeLists.txt 23 May 2007 17:27:00 -0000 1.4
+++ CMakeLists.txt 23 May 2007 21:58:14 -0000 1.5
@@ -13,6 +13,19 @@
${BuildDepends_SOURCE_DIR}/Project
testRebuild
OUTPUT_VARIABLE OUTPUT)
+IF("${CMAKE_GENERATOR}" MATCHES "Xcode")
+ try_compile(RESULT
+ ${BuildDepends_BINARY_DIR}/Project
+ ${BuildDepends_SOURCE_DIR}/Project
+ testRebuild
+ OUTPUT_VARIABLE OUTPUT)
+ try_compile(RESULT
+ ${BuildDepends_BINARY_DIR}/Project
+ ${BuildDepends_SOURCE_DIR}/Project
+ testRebuild
+ OUTPUT_VARIABLE OUTPUT)
+ENDIF("${CMAKE_GENERATOR}" MATCHES "Xcode")
+
if(NOT RESULT)
message(SEND_ERROR "Could not build test project: ${OUTPUT}")
endif(NOT RESULT)
@@ -33,7 +46,7 @@
if("${out}" STREQUAL "foo ")
message("Worked!")
else("${out}" STREQUAL "foo ")
- message(SEND_ERROR "Program did not rebuild with changed file: ${out}")
+ message(SEND_ERROR "Project did not initially build properly: ${out}")
endif("${out}" STREQUAL "foo ")
write_file(${BuildDepends_BINARY_DIR}/Project/foo.cxx
@@ -44,6 +57,20 @@
testRebuild
OUTPUT_VARIABLE OUTPUT)
+# Xcode is in serious need of help here
+IF("${CMAKE_GENERATOR}" MATCHES "Xcode")
+ try_compile(RESULT
+ ${BuildDepends_BINARY_DIR}/Project
+ ${BuildDepends_SOURCE_DIR}/Project
+ testRebuild
+ OUTPUT_VARIABLE OUTPUT)
+ try_compile(RESULT
+ ${BuildDepends_BINARY_DIR}/Project
+ ${BuildDepends_SOURCE_DIR}/Project
+ testRebuild
+ OUTPUT_VARIABLE OUTPUT)
+ENDIF("${CMAKE_GENERATOR}" MATCHES "Xcode")
+
if(NOT RESULT)
message(SEND_ERROR "Could not build test project: ${OUTPUT}")
endif(NOT RESULT)
More information about the Cmake-commits
mailing list