Commit 797e49a1 authored by Brad King's avatar Brad King

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.
parent f10c2581
......@@ -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++
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment