Ninja: on Mac no multiple -arch because of -M

This commit is contained in:
Peter Kümmel 2012-07-10 13:43:01 +02:00
parent 801f23fe51
commit 392a6541b5
1 changed files with 3 additions and 9 deletions

View File

@ -17,15 +17,9 @@ endfunction()
if(APPLE) if(APPLE)
# only use multi-arch if the sysroot exists on this machine # only use multi-arch if the sysroot exists on this machine
if(EXISTS "${CMAKE_OSX_SYSROOT}") # Ninja needs -M which could not be used with multiple -arch flags
if("${CMAKE_GENERATOR}" MATCHES "Ninja") if(EXISTS "${CMAKE_OSX_SYSROOT}" AND NOT "${CMAKE_GENERATOR}" MATCHES "Ninja")
# c++-4.2: -E, -S, -save-temps and -M options are not set(CMAKE_OSX_ARCHITECTURES "ppc;i386")
# allowed with multiple -arch flags
# but in a ninja build -MMD and -MT is set
set(CMAKE_OSX_ARCHITECTURES "i386")
else()
set(CMAKE_OSX_ARCHITECTURES "ppc;i386")
endif()
test_for_xcode4(is_xcode4) test_for_xcode4(is_xcode4)
if(is_xcode4) if(is_xcode4)
# Xcode 4, use modern architectures as defaults # Xcode 4, use modern architectures as defaults