Fix #12358: make optionally enabling ASM work again

Alex
This commit is contained in:
Alex Neundorf 2011-08-17 01:00:28 +02:00
parent 7b044105ce
commit cd70f00ea4
2 changed files with 15 additions and 5 deletions

View File

@ -33,7 +33,7 @@ IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
IF(NOT _INCLUDED_FILE) IF(NOT _INCLUDED_FILE)
IF("ASM${ASM_DIALECT}" STREQUAL "ASM") 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") ENDIF("ASM${ASM_DIALECT}" STREQUAL "ASM")
INCLUDE(Platform/${CMAKE_BASE_NAME} OPTIONAL) INCLUDE(Platform/${CMAKE_BASE_NAME} OPTIONAL)
ENDIF(NOT _INCLUDED_FILE) ENDIF(NOT _INCLUDED_FILE)

View File

@ -18,8 +18,18 @@
# because otherwise there would have to be a separate assembler source file # because otherwise there would have to be a separate assembler source file
# for each assembler on every architecture. # for each assembler on every architecture.
SET(_ASM_COMPILER_WORKS 0)
IF(CMAKE_ASM${ASM_DIALECT}_COMPILER) IF(CMAKE_ASM${ASM_DIALECT}_COMPILER)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_WORKS 1 CACHE INTERNAL "") SET(_ASM_COMPILER_WORKS 1)
ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER) ENDIF()
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_WORKS 0 CACHE INTERNAL "")
ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER) # 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 "")