diff options
author | Alex Neundorf <neundorf@kde.org> | 2011-08-16 23:00:28 (GMT) |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2011-08-16 23:00:28 (GMT) |
commit | cd70f00ea473a97b3b210fb9fddbc283299d788a (patch) | |
tree | 5de0f9c5a2b50daec3adfda25cae0b6ab76ba6a2 /Modules/CMakeTestASMCompiler.cmake | |
parent | 7b044105ce0c2e8f4f078a74ed02c33a50c52d7c (diff) | |
download | CMake-cd70f00ea473a97b3b210fb9fddbc283299d788a.zip CMake-cd70f00ea473a97b3b210fb9fddbc283299d788a.tar.gz CMake-cd70f00ea473a97b3b210fb9fddbc283299d788a.tar.bz2 |
Fix #12358: make optionally enabling ASM work again
Alex
Diffstat (limited to 'Modules/CMakeTestASMCompiler.cmake')
-rw-r--r-- | Modules/CMakeTestASMCompiler.cmake | 18 |
1 files changed, 14 insertions, 4 deletions
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 "") |