diff options
author | Brad King <brad.king@kitware.com> | 2012-09-21 14:34:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-09-21 15:15:23 (GMT) |
commit | 242f673829d40456bd1bcf3f52e10171bccd6868 (patch) | |
tree | be6903e6d61597265adb7d728ac11b454a961040 /Tests/Assembler | |
parent | a1c032b99477b1cd29be0e196187c5b878d00d5f (diff) | |
download | CMake-242f673829d40456bd1bcf3f52e10171bccd6868.zip CMake-242f673829d40456bd1bcf3f52e10171bccd6868.tar.gz CMake-242f673829d40456bd1bcf3f52e10171bccd6868.tar.bz2 |
Tests/Assembler: Use CMAKE_OSX_SYSROOT to generate .s file
On OS X if the user-provided flags do not include -isysroot and
CMAKE_OSX_SYSROOT is defined then add the proper -isysroot flag to the C
compiler invocation we use to generate the .s file.
Diffstat (limited to 'Tests/Assembler')
-rw-r--r-- | Tests/Assembler/CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/Assembler/CMakeLists.txt b/Tests/Assembler/CMakeLists.txt index 94a6325..bb4bccc 100644 --- a/Tests/Assembler/CMakeLists.txt +++ b/Tests/Assembler/CMakeLists.txt @@ -12,6 +12,9 @@ if("${CMAKE_GENERATOR}" MATCHES "Makefile|Xcode" AND 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 |