Tests/Assembler: Do not use assembler in universal binaries

If CMAKE_OSX_ARCHITECTURES is set then the computed assembler .s source
file may not work for all architectures.  Skip it in that case.
This commit is contained in:
Brad King 2012-08-15 12:55:03 -04:00
parent f3477ed88c
commit 97140d3986
1 changed files with 2 additions and 1 deletions

View File

@ -7,7 +7,8 @@ set(SRCS)
# (at least) the following toolchains can process assembler files directly
# and also generate assembler files from C:
if("${CMAKE_GENERATOR}" MATCHES "Makefile|Xcode")
if("${CMAKE_GENERATOR}" MATCHES "Makefile|Xcode" AND
NOT CMAKE_OSX_ARCHITECTURES)
if(("${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU|Clang|HP|SunPro|XL)$") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel" AND UNIX))
set(C_FLAGS "${CMAKE_C_FLAGS}")
separate_arguments(C_FLAGS)