|
@@ -13,6 +13,19 @@ try_compile(RESULT
|
|
|
${BuildDepends_SOURCE_DIR}/Project
|
|
${BuildDepends_SOURCE_DIR}/Project
|
|
|
testRebuild
|
|
testRebuild
|
|
|
OUTPUT_VARIABLE OUTPUT)
|
|
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)
|
|
if(NOT RESULT)
|
|
|
message(SEND_ERROR "Could not build test project: ${OUTPUT}")
|
|
message(SEND_ERROR "Could not build test project: ${OUTPUT}")
|
|
|
endif(NOT RESULT)
|
|
endif(NOT RESULT)
|
|
@@ -33,7 +46,7 @@ message("${out}")
|
|
|
if("${out}" STREQUAL "foo ")
|
|
if("${out}" STREQUAL "foo ")
|
|
|
message("Worked!")
|
|
message("Worked!")
|
|
|
else("${out}" STREQUAL "foo ")
|
|
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 ")
|
|
endif("${out}" STREQUAL "foo ")
|
|
|
|
|
|
|
|
write_file(${BuildDepends_BINARY_DIR}/Project/foo.cxx
|
|
write_file(${BuildDepends_BINARY_DIR}/Project/foo.cxx
|
|
@@ -44,6 +57,20 @@ try_compile(RESULT
|
|
|
testRebuild
|
|
testRebuild
|
|
|
OUTPUT_VARIABLE OUTPUT)
|
|
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)
|
|
if(NOT RESULT)
|
|
|
message(SEND_ERROR "Could not build test project: ${OUTPUT}")
|
|
message(SEND_ERROR "Could not build test project: ${OUTPUT}")
|
|
|
endif(NOT RESULT)
|
|
endif(NOT RESULT)
|