summaryrefslogtreecommitdiff
path: root/Tests/Assembler
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2013-02-13 18:21:12 -0800
committerAnas Nashif <anas.nashif@intel.com>2013-02-13 18:21:12 -0800
commitef8aa19c33e83ff019595fd7f8fdc29c35c336a3 (patch)
tree6501b44707b5c6a88fa5f817adee1a3ffcb0012d /Tests/Assembler
parent035c7fabc3b82cbc9a346c11abe2e9462b4c0379 (diff)
downloadcmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.tar.gz
cmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.tar.bz2
cmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.zip
Imported Upstream version 2.8.10.2upstream/2.8.10.2
Diffstat (limited to 'Tests/Assembler')
-rw-r--r--Tests/Assembler/CMakeLists.txt16
1 files changed, 10 insertions, 6 deletions
diff --git a/Tests/Assembler/CMakeLists.txt b/Tests/Assembler/CMakeLists.txt
index 456e4961f..bb4bcccbe 100644
--- a/Tests/Assembler/CMakeLists.txt
+++ b/Tests/Assembler/CMakeLists.txt
@@ -7,10 +7,14 @@ set(SRCS)
# (at least) the following toolchains can process assembler files directly
# and also generate assembler files from C:
-if("${CMAKE_GENERATOR}" MATCHES "Makefile")
- if(("${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU|HP|SunPro|XL)$") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel" AND UNIX))
+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)
+ if(CMAKE_OSX_SYSROOT AND CMAKE_C_SYSROOT_FLAG AND NOT ";${C_FLAGS};" MATCHES ";${CMAKE_C_SYSROOT_FLAG};")
+ list(APPEND C_FLAGS ${CMAKE_C_SYSROOT_FLAG} ${CMAKE_OSX_SYSROOT})
+ endif()
set(SRCS main.s)
add_custom_command(
OUTPUT main.s
@@ -18,16 +22,16 @@ if("${CMAKE_GENERATOR}" MATCHES "Makefile")
DEPENDS main.c
VERBATIM
)
- endif(("${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU|HP|SunPro|XL)$") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel" AND UNIX))
-endif("${CMAKE_GENERATOR}" MATCHES "Makefile")
+ endif()
+endif()
if(SRCS)
set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS}")
enable_language(ASM OPTIONAL)
-else(SRCS)
+else()
message(STATUS "No assembler enabled, using C")
set(SRCS main.c)
-endif(SRCS)
+endif()
add_executable(HelloAsm ${SRCS})