[Cmake-commits] [cmake-commits] hoffman committed CMakeLists.txt 1.10.2.1 1.10.2.2
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu May 15 15:40:03 EDT 2008
Update of /cvsroot/CMake/CMake/Tests/BuildDepends
In directory public:/mounts/ram/cvs-serv17340/Tests/BuildDepends
Modified Files:
Tag: CMake-2-6
CMakeLists.txt
Log Message:
ENH: merge in from main tree
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/BuildDepends/CMakeLists.txt,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -C 2 -d -r1.10.2.1 -r1.10.2.2
*** CMakeLists.txt 25 Mar 2008 23:58:59 -0000 1.10.2.1
--- CMakeLists.txt 15 May 2008 19:40:01 -0000 1.10.2.2
***************
*** 13,16 ****
--- 13,32 ----
set(CMAKE_SUPPRESS_REGENERATION 1)
+ # Xcode needs some help with the fancy dependencies in this test.
+ if("${CMAKE_GENERATOR}" MATCHES "Xcode")
+ set(HELP_XCODE 1)
+ endif("${CMAKE_GENERATOR}" MATCHES "Xcode")
+ function(help_xcode_depends)
+ if(HELP_XCODE)
+ file(GLOB_RECURSE MACRO_OBJS
+ ${BuildDepends_BINARY_DIR}/Project/zot_macro_*.o*
+ )
+ if(MACRO_OBJS)
+ message("Helping Xcode by removing objects [${MACRO_OBJS}]")
+ file(REMOVE ${MACRO_OBJS})
+ endif(MACRO_OBJS)
+ endif(HELP_XCODE)
+ endfunction(help_xcode_depends)
+
file(MAKE_DIRECTORY ${BuildDepends_BINARY_DIR}/Project)
message("Creating Project/foo.cxx")
***************
*** 22,25 ****
--- 38,47 ----
file(WRITE ${BuildDepends_BINARY_DIR}/Project/zot_custom.hxx.in
"static const char* zot_custom = \"zot_custom\";\n")
+ file(WRITE ${BuildDepends_BINARY_DIR}/Project/zot_macro_dir.hxx
+ "static const char* zot_macro_dir = \"zot_macro_dir\";\n")
+ file(WRITE ${BuildDepends_BINARY_DIR}/Project/zot_macro_tgt.hxx
+ "static const char* zot_macro_tgt = \"zot_macro_tgt\";\n")
+
+ help_xcode_depends()
message("Building project first time")
***************
*** 29,33 ****
testRebuild
OUTPUT_VARIABLE OUTPUT)
! if("${CMAKE_GENERATOR}" MATCHES "Xcode")
try_compile(RESULT
${BuildDepends_BINARY_DIR}/Project
--- 51,55 ----
testRebuild
OUTPUT_VARIABLE OUTPUT)
! if(HELP_XCODE)
try_compile(RESULT
${BuildDepends_BINARY_DIR}/Project
***************
*** 40,44 ****
testRebuild
OUTPUT_VARIABLE OUTPUT)
! endif("${CMAKE_GENERATOR}" MATCHES "Xcode")
if(NOT RESULT)
--- 62,66 ----
testRebuild
OUTPUT_VARIABLE OUTPUT)
! endif(HELP_XCODE)
if(NOT RESULT)
***************
*** 79,87 ****
message("Run result: ${runResult} Output: \"${out}\"")
! if("${out}" STREQUAL "[zot] [zot_custom] ")
message("Worked!")
! else("${out}" STREQUAL "[zot] [zot_custom] ")
message(SEND_ERROR "Project did not initially build properly: ${out}")
! endif("${out}" STREQUAL "[zot] [zot_custom] ")
message("Waiting 3 seconds...")
--- 101,110 ----
message("Run result: ${runResult} Output: \"${out}\"")
! set(VALUE_UNCHANGED "[zot] [zot_custom] [zot_macro_dir] [zot_macro_tgt] ")
! if("${out}" STREQUAL "${VALUE_UNCHANGED}")
message("Worked!")
! else("${out}" STREQUAL "${VALUE_UNCHANGED}")
message(SEND_ERROR "Project did not initially build properly: ${out}")
! endif("${out}" STREQUAL "${VALUE_UNCHANGED}")
message("Waiting 3 seconds...")
***************
*** 96,99 ****
--- 119,128 ----
file(WRITE ${BuildDepends_BINARY_DIR}/Project/zot_custom.hxx.in
"static const char* zot_custom = \"zot_custom changed\";\n")
+ file(WRITE ${BuildDepends_BINARY_DIR}/Project/zot_macro_dir.hxx
+ "static const char* zot_macro_dir = \"zot_macro_dir changed\";\n")
+ file(WRITE ${BuildDepends_BINARY_DIR}/Project/zot_macro_tgt.hxx
+ "static const char* zot_macro_tgt = \"zot_macro_tgt changed\";\n")
+
+ help_xcode_depends()
message("Building project second time")
***************
*** 105,109 ****
# Xcode is in serious need of help here
! if("${CMAKE_GENERATOR}" MATCHES "Xcode")
try_compile(RESULT
${BuildDepends_BINARY_DIR}/Project
--- 134,138 ----
# Xcode is in serious need of help here
! if(HELP_XCODE)
try_compile(RESULT
${BuildDepends_BINARY_DIR}/Project
***************
*** 116,120 ****
testRebuild
OUTPUT_VARIABLE OUTPUT)
! endif("${CMAKE_GENERATOR}" MATCHES "Xcode")
if(NOT RESULT)
--- 145,149 ----
testRebuild
OUTPUT_VARIABLE OUTPUT)
! endif(HELP_XCODE)
if(NOT RESULT)
***************
*** 148,154 ****
message("Run result: ${runResult} Output: \"${out}\"")
! if("${out}" STREQUAL "[zot changed] [zot_custom changed] ")
message("Worked!")
! else("${out}" STREQUAL "[zot changed] [zot_custom changed] ")
message(SEND_ERROR "Project did not rebuild properly!")
! endif("${out}" STREQUAL "[zot changed] [zot_custom changed] ")
--- 177,186 ----
message("Run result: ${runResult} Output: \"${out}\"")
! set(VALUE_CHANGED
! "[zot changed] [zot_custom changed] [zot_macro_dir changed] [zot_macro_tgt changed] "
! )
! if("${out}" STREQUAL "${VALUE_CHANGED}")
message("Worked!")
! else("${out}" STREQUAL "${VALUE_CHANGED}")
message(SEND_ERROR "Project did not rebuild properly!")
! endif("${out}" STREQUAL "${VALUE_CHANGED}")
More information about the Cmake-commits
mailing list