diff options
Diffstat (limited to 'Modules/CMakeCXXInformation.cmake')
-rw-r--r-- | Modules/CMakeCXXInformation.cmake | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index ba76e34..d4d1a8c 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -21,30 +21,23 @@ IF(CMAKE_COMPILER_IS_GNUCXX) ENDIF(CMAKE_COMPILER_IS_GNUCXX) -IF(CMAKE_SYSTEM_AND_CXX_COMPILER_AND_PROCESSOR_INFO_FILE) - INCLUDE(${CMAKE_SYSTEM_AND_CXX_COMPILER_AND_PROCESSOR_INFO_FILE} OPTIONAL) -ELSE(CMAKE_SYSTEM_AND_CXX_COMPILER_AND_PROCESSOR_INFO_FILE) - IF(CMAKE_SYSTEM_PROCESSOR) - IF(CMAKE_CXX_COMPILER_ID) - INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) - ENDIF(CMAKE_CXX_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_CXX_COMPILER_AND_PROCESSOR_INFO_FILE) - - -IF(CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE) - INCLUDE(${CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE} OPTIONAL) -ELSE(CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE) +# load a hardware specific file, mostly useful for embedded compilers +IF(CMAKE_SYSTEM_PROCESSOR) IF(CMAKE_CXX_COMPILER_ID) - INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) + INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) ENDIF(CMAKE_CXX_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_CXX_COMPILER_INFO_FILE) +ENDIF(CMAKE_SYSTEM_PROCESSOR) + +# load the system- and compiler specific files +IF(CMAKE_CXX_COMPILER_ID) + INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) +ENDIF(CMAKE_CXX_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 |