diff options
-rw-r--r-- | Modules/Compiler/Intel-C.cmake | 16 | ||||
-rw-r--r-- | Modules/Compiler/Intel-CXX.cmake | 16 | ||||
-rw-r--r-- | Modules/Compiler/Intel-Fortran.cmake | 20 | ||||
-rw-r--r-- | Modules/Compiler/Intel.cmake | 11 | ||||
-rw-r--r-- | Modules/Platform/Linux-Intel-C.cmake | 16 | ||||
-rw-r--r-- | Modules/Platform/Linux-Intel-CXX.cmake | 16 | ||||
-rw-r--r-- | Modules/Platform/Linux-Intel-Fortran.cmake | 13 |
7 files changed, 63 insertions, 45 deletions
diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake index abf384a..57637b9 100644 --- a/Modules/Compiler/Intel-C.cmake +++ b/Modules/Compiler/Intel-C.cmake @@ -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>") diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake index f3c6b5f..d1ee60f 100644 --- a/Modules/Compiler/Intel-CXX.cmake +++ b/Modules/Compiler/Intel-CXX.cmake @@ -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>") diff --git a/Modules/Compiler/Intel-Fortran.cmake b/Modules/Compiler/Intel-Fortran.cmake index 7f7c128..f0db1a8 100644 --- a/Modules/Compiler/Intel-Fortran.cmake +++ b/Modules/Compiler/Intel-Fortran.cmake @@ -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") diff --git a/Modules/Compiler/Intel.cmake b/Modules/Compiler/Intel.cmake new file mode 100644 index 0000000..030f2c0 --- /dev/null +++ b/Modules/Compiler/Intel.cmake @@ -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) diff --git a/Modules/Platform/Linux-Intel-C.cmake b/Modules/Platform/Linux-Intel-C.cmake deleted file mode 100644 index 4b8f6ad..0000000 --- a/Modules/Platform/Linux-Intel-C.cmake +++ /dev/null @@ -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) diff --git a/Modules/Platform/Linux-Intel-CXX.cmake b/Modules/Platform/Linux-Intel-CXX.cmake deleted file mode 100644 index 6ce7f46..0000000 --- a/Modules/Platform/Linux-Intel-CXX.cmake +++ /dev/null @@ -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) diff --git a/Modules/Platform/Linux-Intel-Fortran.cmake b/Modules/Platform/Linux-Intel-Fortran.cmake index 06de82b..266599e 100644 --- a/Modules/Platform/Linux-Intel-Fortran.cmake +++ b/Modules/Platform/Linux-Intel-Fortran.cmake @@ -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") |