summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCInformation.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/CMakeCInformation.cmake')
-rw-r--r--Modules/CMakeCInformation.cmake34
1 files changed, 14 insertions, 20 deletions
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake
index 4d4e52a..fec8389 100644
--- a/Modules/CMakeCInformation.cmake
+++ b/Modules/CMakeCInformation.cmake
@@ -19,30 +19,24 @@ IF(CMAKE_COMPILER_IS_GNUCC)
ENDIF(CMAKE_COMPILER_IS_GNUCC)
-IF(CMAKE_SYSTEM_AND_C_COMPILER_AND_PROCESSOR_INFO_FILE)
- INCLUDE(${CMAKE_SYSTEM_AND_C_COMPILER_AND_PROCESSOR_INFO_FILE} OPTIONAL)
-ELSE(CMAKE_SYSTEM_AND_C_COMPILER_AND_PROCESSOR_INFO_FILE)
- IF(CMAKE_SYSTEM_PROCESSOR)
- IF(CMAKE_C_COMPILER_ID)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
- ENDIF(CMAKE_C_COMPILER_ID)
- IF (NOT _INCLUDED_FILE)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
- ENDIF (NOT _INCLUDED_FILE)
- ENDIF(CMAKE_SYSTEM_PROCESSOR)
-ENDIF(CMAKE_SYSTEM_AND_C_COMPILER_AND_PROCESSOR_INFO_FILE)
-
-
-IF(CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE)
- INCLUDE(${CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE} OPTIONAL)
-ELSE(CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE)
+# load a hardware specific file, mostly useful for embedded compilers
+IF(CMAKE_SYSTEM_PROCESSOR)
IF(CMAKE_C_COMPILER_ID)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
+ INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF(CMAKE_C_COMPILER_ID)
IF (NOT _INCLUDED_FILE)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
+ INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
ENDIF (NOT _INCLUDED_FILE)
-ENDIF(CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE)
+ENDIF(CMAKE_SYSTEM_PROCESSOR)
+
+
+# load the system- and compiler specific files
+IF(CMAKE_C_COMPILER_ID)
+ INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
+ENDIF(CMAKE_C_COMPILER_ID)
+IF (NOT _INCLUDED_FILE)
+ INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
+ENDIF (NOT _INCLUDED_FILE)
# This should be included before the _INIT variables are