summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CMakeASMInformation.cmake25
1 files changed, 12 insertions, 13 deletions
diff --git a/Modules/CMakeASMInformation.cmake b/Modules/CMakeASMInformation.cmake
index 9057e8f..f1bd9c9 100644
--- a/Modules/CMakeASMInformation.cmake
+++ b/Modules/CMakeASMInformation.cmake
@@ -6,6 +6,7 @@ ELSE(UNIX)
SET(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .obj)
ENDIF(UNIX)
+SET(CMAKE_INCLUDE_FLAG_ASM${ASM_DIALECT} "-I") # -I
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME_WE)
@@ -15,19 +16,17 @@ 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(CMAKE_SYSTEM_PROCESSOR)
+ INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
+ENDIF(CMAKE_SYSTEM_PROCESSOR)
+IF(NOT _INCLUDED_FILE)
+ INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-ASM-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
+ENDIF(NOT _INCLUDED_FILE)
+
+INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
+IF(NOT _INCLUDED_FILE)
+ INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-ASM OPTIONAL)
+ENDIF(NOT _INCLUDED_FILE)
IF(NOT CMAKE_ASM@ASM_DIALECT@_SOURCE_FILE_EXTENSIONS)
SET(CMAKE_ASM@ASM_DIALECT@_SOURCE_FILE_EXTENSIONS s;S;asm)