summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-05-23 21:58:14 (GMT)
committerBrad King <brad.king@kitware.com>2007-05-23 21:58:14 (GMT)
commit6a145fb2bece19f04079778c3cb3326cd37a78ee (patch)
tree5f588c7dab5dae78596f2ae50ad815a8bfb3e2bf
parentea44d68cb669b145406d468b9b7943a0ddac4d91 (diff)
downloadCMake-6a145fb2bece19f04079778c3cb3326cd37a78ee.zip
CMake-6a145fb2bece19f04079778c3cb3326cd37a78ee.tar.gz
CMake-6a145fb2bece19f04079778c3cb3326cd37a78ee.tar.bz2
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.
-rw-r--r--Tests/BuildDepends/CMakeLists.txt29
1 files changed, 28 insertions, 1 deletions
diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt
index 3a4ba26..6acb844 100644
--- a/Tests/BuildDepends/CMakeLists.txt
+++ b/Tests/BuildDepends/CMakeLists.txt
@@ -13,6 +13,19 @@ try_compile(RESULT
${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 @@ message("${out}")
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 @@ try_compile(RESULT
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)