Split Intel compiler information files

This moves platform-independent Intel compiler flags into separate
"Compiler/Intel-<lang>.cmake" modules.  Platform-specific flags are
left untouched.
This commit is contained in:
Brad King 2009-08-21 09:54:42 -04:00
parent 8f84ec9ad7
commit 2ce6a7d0fb
7 changed files with 63 additions and 45 deletions

View File

@ -1 +1,17 @@
INCLUDE(Compiler/Intel)
IF(XIAR)
SET(CMAKE_C_CREATE_STATIC_LIBRARY
"${XIAR} cr <TARGET> <LINK_FLAGS> <OBJECTS> "
"${XIAR} -s <TARGET> ")
ENDIF(XIAR)
SET(CMAKE_C_VERBOSE_FLAG "-v")
SET(CMAKE_C_FLAGS_INIT "")
SET(CMAKE_C_FLAGS_DEBUG_INIT "-g")
SET(CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
SET(CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
SET(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
SET(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")

View File

@ -1 +1,17 @@
INCLUDE(Compiler/Intel)
IF(XIAR)
SET(CMAKE_CXX_CREATE_STATIC_LIBRARY
"${XIAR} cr <TARGET> <LINK_FLAGS> <OBJECTS> "
"${XIAR} -s <TARGET> ")
ENDIF(XIAR)
SET(CMAKE_CXX_VERBOSE_FLAG "-v")
SET(CMAKE_CXX_FLAGS_INIT "")
SET(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
SET(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
SET(CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
SET(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
SET(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")

View File

@ -1 +1,21 @@
INCLUDE(Compiler/Intel)
IF(XIAR)
SET(CMAKE_Fortran_CREATE_STATIC_LIBRARY
"${XIAR} cr <TARGET> <LINK_FLAGS> <OBJECTS> "
"${XIAR} -s <TARGET> ")
ENDIF(XIAR)
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-fPIC")
SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-shared")
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-i_dynamic")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG "-Wl,-rpath,")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":")
SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-Wl,-soname,")
SET(CMAKE_Fortran_FLAGS_INIT "")
SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
SET(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os")
SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
SET(CMAKE_Fortran_MODDIR_FLAG "-module ")
SET(CMAKE_Fortran_VERBOSE_FLAG "-v")

View File

@ -0,0 +1,11 @@
if(NOT XIAR)
set(_intel_xair_hints)
foreach(lang C CXX Fortran)
if(IS_ABSOLUTE "${CMAKE_${lang}_COMPILER}")
get_filename_component(_hint "${CMAKE_${lang}_COMPILER}" PATH)
list(APPEND _intel_xair_hints ${_hint})
endif()
endforeach()
find_program(XIAR NAMES xiar HINTS ${_intel_xair_hints})
mark_as_advanced(XIAR)
endif(NOT XIAR)

View File

@ -1,16 +0,0 @@
SET (CMAKE_C_FLAGS_INIT "")
SET (CMAKE_C_FLAGS_DEBUG_INIT "-g")
SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
SET (CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
FIND_PROGRAM(XIAR xiar)
IF(XIAR)
SET(CMAKE_C_CREATE_STATIC_LIBRARY
"${XIAR} cr <TARGET> <LINK_FLAGS> <OBJECTS> "
"${XIAR} -s <TARGET> ")
ENDIF(XIAR)
MARK_AS_ADVANCED(XIAR)

View File

@ -1,16 +0,0 @@
SET (CMAKE_CXX_FLAGS_INIT "")
SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
FIND_PROGRAM(XIAR xiar)
IF(XIAR)
SET(CMAKE_CXX_CREATE_STATIC_LIBRARY
"${XIAR} cr <TARGET> <LINK_FLAGS> <OBJECTS> "
"${XIAR} -s <TARGET> ")
ENDIF(XIAR)
MARK_AS_ADVANCED(XIAR)

View File

@ -1,14 +1 @@
SET(CMAKE_DL_LIBS "dl")
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-fPIC")
SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-shared")
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-i_dynamic")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG "-Wl,-rpath,")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":")
SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-Wl,-soname,")
SET(CMAKE_Fortran_MODDIR_FLAG "-module ")
SET (CMAKE_Fortran_FLAGS_INIT "")
SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os")
SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")