mirror of
https://github.com/reactos/CMake.git
synced 2024-11-23 19:49:51 +00:00
ENH: Load platform-independent per-compiler files
This teaches the language configuration modules to load per-compiler information for each language using the compiler id but no system name. They look for modules named "Compiler/<id>-<lang>.cmake". Such modules may specify compiler flags that do not depend on the platform.
This commit is contained in:
parent
f10c258167
commit
797e49a1cc
@ -12,6 +12,12 @@ IF(UNIX)
|
||||
ELSE(UNIX)
|
||||
SET(CMAKE_C_OUTPUT_EXTENSION .obj)
|
||||
ENDIF(UNIX)
|
||||
|
||||
# Load compiler-specific information.
|
||||
IF(CMAKE_C_COMPILER_ID)
|
||||
INCLUDE(Compiler/${CMAKE_C_COMPILER_ID}-C OPTIONAL)
|
||||
ENDIF(CMAKE_C_COMPILER_ID)
|
||||
|
||||
SET(CMAKE_BASE_NAME)
|
||||
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE)
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
|
@ -13,6 +13,11 @@ ELSE(UNIX)
|
||||
SET(CMAKE_CXX_OUTPUT_EXTENSION .obj)
|
||||
ENDIF(UNIX)
|
||||
|
||||
# Load compiler-specific information.
|
||||
IF(CMAKE_CXX_COMPILER_ID)
|
||||
INCLUDE(Compiler/${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL)
|
||||
ENDIF(CMAKE_CXX_COMPILER_ID)
|
||||
|
||||
SET(CMAKE_BASE_NAME)
|
||||
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
|
||||
# since the gnu compiler has several names force g++
|
||||
|
@ -3,6 +3,11 @@
|
||||
# It also loads the available platform file for the system-compiler
|
||||
# if it exists.
|
||||
|
||||
# Load compiler-specific information.
|
||||
IF(CMAKE_Fortran_COMPILER_ID)
|
||||
INCLUDE(Compiler/${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL)
|
||||
ENDIF(CMAKE_Fortran_COMPILER_ID)
|
||||
|
||||
SET(CMAKE_BASE_NAME)
|
||||
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER} NAME_WE)
|
||||
# since the gnu compiler has several names force g++
|
||||
|
Loading…
Reference in New Issue
Block a user