diff options
author | MyungJoo Ham <myungjoo.ham@samsung.com> | 2017-10-11 15:16:57 +0900 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2017-10-11 15:16:57 +0900 |
commit | 915c76ded744c0f5f151402b9fa69f3fd8452573 (patch) | |
tree | ca6a387466543248890f346847acaa8343989b22 /Tests/Assembler | |
parent | 317dbdb79761ef65e45c7358cfc7571c6afa54ad (diff) | |
download | cmake-915c76ded744c0f5f151402b9fa69f3fd8452573.tar.gz cmake-915c76ded744c0f5f151402b9fa69f3fd8452573.tar.bz2 cmake-915c76ded744c0f5f151402b9fa69f3fd8452573.zip |
Imported Upstream version 3.9.4upstream/3.9.4
Diffstat (limited to 'Tests/Assembler')
-rw-r--r-- | Tests/Assembler/CMakeLists.txt | 5 | ||||
-rw-r--r-- | Tests/Assembler/main.c | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/Tests/Assembler/CMakeLists.txt b/Tests/Assembler/CMakeLists.txt index bb4bcccbe..fb17ebb60 100644 --- a/Tests/Assembler/CMakeLists.txt +++ b/Tests/Assembler/CMakeLists.txt @@ -9,12 +9,15 @@ set(SRCS) # and also generate assembler files from C: 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)) + if((CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang|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() + # Clang on OS X, and perhaps other compilers, do not support -g + # for both generating and assembling, so drop it from generating. + list(REMOVE_ITEM C_FLAGS -g) set(SRCS main.s) add_custom_command( OUTPUT main.s diff --git a/Tests/Assembler/main.c b/Tests/Assembler/main.c index 95de0b5d1..84a54d6a5 100644 --- a/Tests/Assembler/main.c +++ b/Tests/Assembler/main.c @@ -1,11 +1,13 @@ #include <stdio.h> #ifdef __CLASSIC_C__ -int main(){ +int main() +{ int argc; - char*argv[]; + char* argv[]; #else -int main(int argc, char*argv[]){ +int main(int argc, char* argv[]) +{ #endif printf("hello assembler world, %d arguments given\n", argc); return 0; |