diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-06-28 13:14:27 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-06-28 13:14:27 (GMT) |
commit | 5b18b80b58a73814af8869cbfe17701156e913c3 (patch) | |
tree | 8ab1301ef8073a64ff091d7ea3a4f0e28dc56806 /Modules/CMakeASMInformation.cmake | |
parent | 43de8c862868be38ce5ffe91edf09898ef8478cf (diff) | |
download | CMake-5b18b80b58a73814af8869cbfe17701156e913c3.zip CMake-5b18b80b58a73814af8869cbfe17701156e913c3.tar.gz CMake-5b18b80b58a73814af8869cbfe17701156e913c3.tar.bz2 |
ENH: initial support for assembler in cmake, needs testing by our users
Alex
Diffstat (limited to 'Modules/CMakeASMInformation.cmake')
-rw-r--r-- | Modules/CMakeASMInformation.cmake | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/Modules/CMakeASMInformation.cmake b/Modules/CMakeASMInformation.cmake new file mode 100644 index 0000000..9057e8f --- /dev/null +++ b/Modules/CMakeASMInformation.cmake @@ -0,0 +1,62 @@ +MESSAGE(STATUS "Loaded CMakeASM${ASM_DIALECT}Information - ASM${ASM_DIALECT} support is still experimental, please report issues") + +IF(UNIX) + SET(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .o) +ELSE(UNIX) + SET(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .obj) +ENDIF(UNIX) + + +GET_FILENAME_COMPONENT(CMAKE_BASE_NAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME_WE) + +IF("${CMAKE_BASE_NAME}" STREQUAL "as") + SET(CMAKE_BASE_NAME gas) +ENDIF("${CMAKE_BASE_NAME}" STREQUAL "as") + +INCLUDE(Platform/${CMAKE_BASE_NAME} OPTIONAL) + +IF(CMAKE_SYSTEM_AND_ASM${ASM_DIALECT}_COMPILER_AND_PROCESSOR_INFO_FILE) + INCLUDE(${CMAKE_SYSTEM_AND_ASM${ASM_DIALECT}_COMPILER_AND_PROCESSOR_INFO_FILE} OPTIONAL) +ELSE(CMAKE_SYSTEM_AND_ASM${ASM_DIALECT}_COMPILER_AND_PROCESSOR_INFO_FILE) + IF(CMAKE_SYSTEM_PROCESSOR) + INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL) + ENDIF(CMAKE_SYSTEM_PROCESSOR) +ENDIF(CMAKE_SYSTEM_AND_ASM${ASM_DIALECT}_COMPILER_AND_PROCESSOR_INFO_FILE) + +IF(CMAKE_SYSTEM_AND_ASM${ASM_DIALECT}_COMPILER_INFO_FILE) + INCLUDE(${CMAKE_SYSTEM_AND_ASM${ASM_DIALECT}_COMPILER_INFO_FILE} OPTIONAL) +ELSE(CMAKE_SYSTEM_AND_ASM${ASM_DIALECT}_COMPILER_INFO_FILE) + INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) +ENDIF(CMAKE_SYSTEM_AND_ASM${ASM_DIALECT}_COMPILER_INFO_FILE) + +IF(NOT CMAKE_ASM@ASM_DIALECT@_SOURCE_FILE_EXTENSIONS) + SET(CMAKE_ASM@ASM_DIALECT@_SOURCE_FILE_EXTENSIONS s;S;asm) +ENDIF(NOT CMAKE_ASM@ASM_DIALECT@_SOURCE_FILE_EXTENSIONS) + +IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT) + SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> -o <OBJECT> <SOURCE>") +ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT) + +IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY) + SET(CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY + "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> " + "<CMAKE_RANLIB> <TARGET> ") +ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY) + +IF(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE) + SET(CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE + "<CMAKE_LINKER> <FLAGS> <CMAKE_ASM${ASM_DIALECT}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>") +ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE) + +# to be done +IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY) + SET(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY) +ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY) + +IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE) + SET(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE) +ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE) + + +SET(CMAKE_ASM${ASM_DIALECT}_INFOMATION_LOADED 1) + |