From 38f92bfbe19afa18f92d336b69576bcba5d1cc35 Mon Sep 17 00:00:00 2001 From: Alex Neundorf Date: Sun, 30 Jan 2011 21:14:53 +0100 Subject: [PATCH] Add ASM support for the Intel compiler Alex --- Modules/CMakeDetermineASMCompiler.cmake | 4 ++++ Modules/Compiler/GNU-ASM.cmake | 2 +- Modules/Compiler/Intel-ASM.cmake | 11 +++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 Modules/Compiler/Intel-ASM.cmake diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake index 33463583f..c09077e37 100644 --- a/Modules/CMakeDetermineASMCompiler.cmake +++ b/Modules/CMakeDetermineASMCompiler.cmake @@ -91,6 +91,10 @@ IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_GNU "--version") SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_GNU "(GNU assembler)|(GCC)") + LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS Intel ) + SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_Intel "--version") + SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_Intel "(ICC)") + LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS TI_DSP ) SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_TI_DSP "-h") SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_TI_DSP "Texas Instruments") diff --git a/Modules/Compiler/GNU-ASM.cmake b/Modules/Compiler/GNU-ASM.cmake index 93ef724df..bec212ff6 100644 --- a/Modules/Compiler/GNU-ASM.cmake +++ b/Modules/Compiler/GNU-ASM.cmake @@ -1,7 +1,7 @@ # This file is loaded when gcc/g++ is used for assembler files (the "ASM" cmake language) include(Compiler/GNU) -set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm) +set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S;asm) set(CMAKE_ASM_COMPILE_OBJECT " -o -c ") diff --git a/Modules/Compiler/Intel-ASM.cmake b/Modules/Compiler/Intel-ASM.cmake new file mode 100644 index 000000000..07437a8db --- /dev/null +++ b/Modules/Compiler/Intel-ASM.cmake @@ -0,0 +1,11 @@ +SET(CMAKE_ASM_VERBOSE_FLAG "-v") + +SET(CMAKE_ASM_FLAGS_INIT "") +SET(CMAKE_ASM_FLAGS_DEBUG_INIT "-g") +SET(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") +SET(CMAKE_ASM_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") +SET(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") + +set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s) + +set(CMAKE_ASM_COMPILE_OBJECT " -o -c ")