[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.3 1.4
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Dec 9 10:56:34 EST 2009
Update of /cvsroot/CMake/CMake/Tests/CMakeLib
In directory public:/mounts/ram/cvs-serv15711/Tests/CMakeLib
Modified Files:
CMakeLists.txt
Log Message:
Create CMakeLibTests output dir for Xcode
Xcode 2.x forgets to create the target output directory before linking
the individual architecture pieces of a universal binary for the target
CMakeLibTests. Then it passes the directory to -L and -F options when
linking the and warns that the directory does not exist. We work around
the problem by using a pre-build rule on the target to create the output
directory.
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CMakeLib/CMakeLists.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** CMakeLists.txt 8 Dec 2009 20:44:45 -0000 1.3
--- CMakeLists.txt 9 Dec 2009 15:56:30 -0000 1.4
***************
*** 18,21 ****
--- 18,31 ----
target_link_libraries(CMakeLibTests CMakeLib)
+ # Xcode 2.x forgets to create the output directory before linking
+ # the individual architectures.
+ if(CMAKE_OSX_ARCHITECTURES AND XCODE
+ AND NOT "${XCODE_VERSION}" MATCHES "^[^12]")
+ add_custom_command(
+ TARGET CMakeLibTests
+ PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CFG_INTDIR}"
+ )
+ endif()
+
foreach(test ${CMakeLib_TESTS})
add_test(CMakeLib.${test} CMakeLibTests ${test})
More information about the Cmake-commits
mailing list