[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.172 1.173
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Dec 14 17:47:16 EST 2009
Update of /cvsroot/CMake/CMake
In directory public:/mounts/ram/cvs-serv18887
Modified Files:
CMakeLists.txt
Log Message:
Disable arch-specific try_run in CMake itself
We disallow try_run() when CMAKE_TRY_COMPILE_OSX_ARCHITECTURES is set
because the binary might not be able to run on the host architecture.
This prevents us from creating ppc test binaries on i386 Mac machines
that cause Rosetta install dialogs to appear.
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/CMakeLists.txt,v
retrieving revision 1.172
retrieving revision 1.173
diff -C 2 -d -r1.172 -r1.173
*** CMakeLists.txt 10 Dec 2009 15:34:33 -0000 1.172
--- CMakeLists.txt 14 Dec 2009 22:47:14 -0000 1.173
***************
*** 30,33 ****
--- 30,44 ----
ENDIF()
+ IF("${CMake_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
+ # Disallow architecture-specific try_run. It may not run on the host.
+ MACRO(TRY_RUN)
+ IF(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
+ MESSAGE(FATAL_ERROR "TRY_RUN not allowed with CMAKE_TRY_COMPILE_OSX_ARCHITECTURES=[${CMAKE_TRY_COMPILE_OSX_ARCHITECTURES}]")
+ ELSE()
+ _TRY_RUN(${ARGV})
+ ENDIF()
+ ENDMACRO()
+ ENDIF()
+
#-----------------------------------------------------------------------
# a macro to deal with system libraries, implemented as a macro
More information about the Cmake-commits
mailing list