diff options
Diffstat (limited to 'Modules/CMakeCInformation.cmake')
-rw-r--r-- | Modules/CMakeCInformation.cmake | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake index 10ec1e7..5f73e6f 100644 --- a/Modules/CMakeCInformation.cmake +++ b/Modules/CMakeCInformation.cmake @@ -3,18 +3,21 @@ # It also loads the available platform file for the system-compiler # if it exists. -GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE) -IF(CMAKE_COMPILER_IS_GNUCC) - SET(CMAKE_BASE_NAME gcc) -ENDIF(CMAKE_COMPILER_IS_GNUCC) -IF(CMAKE_C_COMPILER_ID) - IF(EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C.cmake) - SET(CMAKE_BASE_NAME ${CMAKE_C_COMPILER_ID}-C) - ENDIF(EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C.cmake) -ENDIF(CMAKE_C_COMPILER_ID) -SET(CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE - ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) -INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) +IF(NOT CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE) + GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE) + IF(CMAKE_COMPILER_IS_GNUCC) + SET(CMAKE_BASE_NAME gcc) + ENDIF(CMAKE_COMPILER_IS_GNUCC) + IF(CMAKE_C_COMPILER_ID) + IF(EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C.cmake) + SET(CMAKE_BASE_NAME ${CMAKE_C_COMPILER_ID}-C) + ENDIF(EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C.cmake) + ENDIF(CMAKE_C_COMPILER_ID) + SET(CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE + ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) +ENDIF(NOT CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE) + +INCLUDE(${CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE} OPTIONAL) # This should be included before the _INIT variables are # used to initialize the cache. Since the rule variables |