diff options
author | David Cole <david.cole@kitware.com> | 2011-08-25 19:39:33 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2011-08-25 19:39:33 (GMT) |
commit | c672c728f27c307f688b0ec988fa0c25652a1bf2 (patch) | |
tree | 56b5e0a8b45048659d0bdb2e871093db48ae4b1e /Modules | |
parent | d2b90e4c682ef64cdd018fc037d2224ef56300f6 (diff) | |
parent | cd70f00ea473a97b3b210fb9fddbc283299d788a (diff) | |
download | CMake-c672c728f27c307f688b0ec988fa0c25652a1bf2.zip CMake-c672c728f27c307f688b0ec988fa0c25652a1bf2.tar.gz CMake-c672c728f27c307f688b0ec988fa0c25652a1bf2.tar.bz2 |
Merge topic 'FixOptionalEnableAsm'
cd70f00 Fix #12358: make optionally enabling ASM work again
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeASMInformation.cmake | 2 | ||||
-rw-r--r-- | Modules/CMakeTestASMCompiler.cmake | 18 |
2 files changed, 15 insertions, 5 deletions
diff --git a/Modules/CMakeASMInformation.cmake b/Modules/CMakeASMInformation.cmake index d50f351..b5f2420 100644 --- a/Modules/CMakeASMInformation.cmake +++ b/Modules/CMakeASMInformation.cmake @@ -33,7 +33,7 @@ IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) IF(NOT _INCLUDED_FILE) IF("ASM${ASM_DIALECT}" STREQUAL "ASM") - MESSAGE(FATAL_ERROR "Did not find file Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT}") + MESSAGE(STATUS "Warning: Did not find file Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT}") ENDIF("ASM${ASM_DIALECT}" STREQUAL "ASM") INCLUDE(Platform/${CMAKE_BASE_NAME} OPTIONAL) ENDIF(NOT _INCLUDED_FILE) diff --git a/Modules/CMakeTestASMCompiler.cmake b/Modules/CMakeTestASMCompiler.cmake index 56cf332..294511d 100644 --- a/Modules/CMakeTestASMCompiler.cmake +++ b/Modules/CMakeTestASMCompiler.cmake @@ -18,8 +18,18 @@ # because otherwise there would have to be a separate assembler source file # for each assembler on every architecture. + +SET(_ASM_COMPILER_WORKS 0) + IF(CMAKE_ASM${ASM_DIALECT}_COMPILER) - SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_WORKS 1 CACHE INTERNAL "") -ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER) - SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_WORKS 0 CACHE INTERNAL "") -ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER) + SET(_ASM_COMPILER_WORKS 1) +ENDIF() + +# when using generic "ASM" support, we must have detected the compiler ID, fail otherwise: +IF("ASM${ASM_DIALECT}" STREQUAL "ASM") + IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) + SET(_ASM_COMPILER_WORKS 0) + ENDIF() +ENDIF() + +SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_WORKS ${_ASM_COMPILER_WORKS} CACHE INTERNAL "") |