summaryrefslogtreecommitdiff
path: root/Modules/Compiler
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/Cray-CXX.cmake2
-rw-r--r--Modules/Compiler/CrayPrgEnv-C.cmake6
-rw-r--r--Modules/Compiler/CrayPrgEnv-CXX.cmake6
-rw-r--r--Modules/Compiler/CrayPrgEnv-Cray-C.cmake7
-rw-r--r--Modules/Compiler/CrayPrgEnv-Cray-CXX.cmake7
-rw-r--r--Modules/Compiler/CrayPrgEnv-Cray-Fortran.cmake7
-rw-r--r--Modules/Compiler/CrayPrgEnv-Fortran.cmake6
-rw-r--r--Modules/Compiler/CrayPrgEnv-GNU-C.cmake7
-rw-r--r--Modules/Compiler/CrayPrgEnv-GNU-CXX.cmake7
-rw-r--r--Modules/Compiler/CrayPrgEnv-GNU-Fortran.cmake7
-rw-r--r--Modules/Compiler/CrayPrgEnv-Intel-C.cmake7
-rw-r--r--Modules/Compiler/CrayPrgEnv-Intel-CXX.cmake7
-rw-r--r--Modules/Compiler/CrayPrgEnv-Intel-Fortran.cmake7
-rw-r--r--Modules/Compiler/CrayPrgEnv-PGI-C.cmake7
-rw-r--r--Modules/Compiler/CrayPrgEnv-PGI-CXX.cmake7
-rw-r--r--Modules/Compiler/CrayPrgEnv-PGI-Fortran.cmake7
-rw-r--r--Modules/Compiler/CrayPrgEnv.cmake57
-rw-r--r--Modules/Compiler/Flang-Fortran.cmake3
-rw-r--r--Modules/Compiler/GNU-Fortran.cmake3
-rw-r--r--Modules/Compiler/Intel-CXX-FeatureTests.cmake2
-rw-r--r--Modules/Compiler/Intel-Fortran.cmake3
-rw-r--r--Modules/Compiler/PGI-Fortran.cmake3
-rw-r--r--Modules/Compiler/XL-Fortran.cmake3
23 files changed, 21 insertions, 157 deletions
diff --git a/Modules/Compiler/Cray-CXX.cmake b/Modules/Compiler/Cray-CXX.cmake
index ff97e92aab..85a316793e 100644
--- a/Modules/Compiler/Cray-CXX.cmake
+++ b/Modules/Compiler/Cray-CXX.cmake
@@ -2,7 +2,7 @@
# file Copyright.txt or https://cmake.org/licensing for details.
include(Compiler/Cray)
-__compiler_cray(C)
+__compiler_cray(CXX)
string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -DNDEBUG")
diff --git a/Modules/Compiler/CrayPrgEnv-C.cmake b/Modules/Compiler/CrayPrgEnv-C.cmake
index 6b461ce060..76aa93b95d 100644
--- a/Modules/Compiler/CrayPrgEnv-C.cmake
+++ b/Modules/Compiler/CrayPrgEnv-C.cmake
@@ -4,8 +4,4 @@ endif()
set(__craylinux_crayprgenv_c 1)
include(Compiler/CrayPrgEnv)
-macro(__CrayPrgEnv_setup_C compiler_cmd link_cmd)
- __CrayPrgEnv_setup(C
- ${CMAKE_ROOT}/Modules/CMakeCCompilerABI.c
- ${compiler_cmd} ${link_cmd})
-endmacro()
+__CrayPrgEnv_setup(C)
diff --git a/Modules/Compiler/CrayPrgEnv-CXX.cmake b/Modules/Compiler/CrayPrgEnv-CXX.cmake
index aad85b67e2..442370ecce 100644
--- a/Modules/Compiler/CrayPrgEnv-CXX.cmake
+++ b/Modules/Compiler/CrayPrgEnv-CXX.cmake
@@ -4,8 +4,4 @@ endif()
set(__craylinux_crayprgenv_cxx 1)
include(Compiler/CrayPrgEnv)
-macro(__CrayPrgEnv_setup_CXX compiler_cmd link_cmd)
- __CrayPrgEnv_setup(CXX
- ${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp
- ${compiler_cmd} ${link_cmd})
-endmacro()
+__CrayPrgEnv_setup(CXX)
diff --git a/Modules/Compiler/CrayPrgEnv-Cray-C.cmake b/Modules/Compiler/CrayPrgEnv-Cray-C.cmake
deleted file mode 100644
index 547a4b4d5d..0000000000
--- a/Modules/Compiler/CrayPrgEnv-Cray-C.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-if(__craylinux_crayprgenv_cray_c)
- return()
-endif()
-set(__craylinux_crayprgenv_cray_c 1)
-
-include(Compiler/CrayPrgEnv-C)
-__CrayPrgEnv_setup_C("/opt/cray/cce/.*/ccfe" "/opt/cray/cce/.*/ld")
diff --git a/Modules/Compiler/CrayPrgEnv-Cray-CXX.cmake b/Modules/Compiler/CrayPrgEnv-Cray-CXX.cmake
deleted file mode 100644
index df8452c15a..0000000000
--- a/Modules/Compiler/CrayPrgEnv-Cray-CXX.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-if(__craylinux_crayprgenv_cray_cxx)
- return()
-endif()
-set(__craylinux_crayprgenv_cray_cxx 1)
-
-include(Compiler/CrayPrgEnv-CXX)
-__CrayPrgEnv_setup_CXX("/opt/cray/cce/.*/ccfe" "/opt/cray/cce/.*/ld")
diff --git a/Modules/Compiler/CrayPrgEnv-Cray-Fortran.cmake b/Modules/Compiler/CrayPrgEnv-Cray-Fortran.cmake
deleted file mode 100644
index 9f46a04c89..0000000000
--- a/Modules/Compiler/CrayPrgEnv-Cray-Fortran.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-if(__craylinux_crayprgenv_cray_fortran)
- return()
-endif()
-set(__craylinux_crayprgenv_cray_fortran 1)
-
-include(Compiler/CrayPrgEnv-Fortran)
-__CrayPrgEnv_setup_Fortran("/opt/cray/cce/.*/ftnfe" "/opt/cray/cce/.*/ld")
diff --git a/Modules/Compiler/CrayPrgEnv-Fortran.cmake b/Modules/Compiler/CrayPrgEnv-Fortran.cmake
index 9c4d2694ae..85f82d3f7b 100644
--- a/Modules/Compiler/CrayPrgEnv-Fortran.cmake
+++ b/Modules/Compiler/CrayPrgEnv-Fortran.cmake
@@ -4,8 +4,4 @@ endif()
set(__craylinux_crayprgenv_fortran 1)
include(Compiler/CrayPrgEnv)
-macro(__CrayPrgEnv_setup_Fortran compiler_cmd link_cmd)
- __CrayPrgEnv_setup(Fortran
- ${CMAKE_ROOT}/Modules/CMakeFortranCompilerABI.F
- ${compiler_cmd} ${link_cmd})
-endmacro()
+__CrayPrgEnv_setup(Fortran)
diff --git a/Modules/Compiler/CrayPrgEnv-GNU-C.cmake b/Modules/Compiler/CrayPrgEnv-GNU-C.cmake
deleted file mode 100644
index 248081b872..0000000000
--- a/Modules/Compiler/CrayPrgEnv-GNU-C.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-if(__craylinux_crayprgenv_gnu_c)
- return()
-endif()
-set(__craylinux_crayprgenv_gnu_c 1)
-
-include(Compiler/CrayPrgEnv-C)
-__CrayPrgEnv_setup_C("/opt/gcc/.*/cc1" "/opt/gcc/.*/collect2")
diff --git a/Modules/Compiler/CrayPrgEnv-GNU-CXX.cmake b/Modules/Compiler/CrayPrgEnv-GNU-CXX.cmake
deleted file mode 100644
index be4eb6d544..0000000000
--- a/Modules/Compiler/CrayPrgEnv-GNU-CXX.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-if(__craylinux_crayprgenv_gnu_cxx)
- return()
-endif()
-set(__craylinux_crayprgenv_gnu_cxx 1)
-
-include(Compiler/CrayPrgEnv-CXX)
-__CrayPrgEnv_setup_CXX("/opt/gcc/.*/cc1plus" "/opt/gcc/.*/collect2")
diff --git a/Modules/Compiler/CrayPrgEnv-GNU-Fortran.cmake b/Modules/Compiler/CrayPrgEnv-GNU-Fortran.cmake
deleted file mode 100644
index 8bd23ff88f..0000000000
--- a/Modules/Compiler/CrayPrgEnv-GNU-Fortran.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-if(__craylinux_crayprgenv_gnu_fortran)
- return()
-endif()
-set(__craylinux_crayprgenv_gnu_fortran 1)
-
-include(Compiler/CrayPrgEnv-Fortran)
-__CrayPrgEnv_setup_Fortran("/opt/gcc/.*/f951" "/opt/gcc/.*/collect2")
diff --git a/Modules/Compiler/CrayPrgEnv-Intel-C.cmake b/Modules/Compiler/CrayPrgEnv-Intel-C.cmake
deleted file mode 100644
index 83c4e3801d..0000000000
--- a/Modules/Compiler/CrayPrgEnv-Intel-C.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-if(__craylinux_crayprgenv_intel_c)
- return()
-endif()
-set(__craylinux_crayprgenv_intel_c 1)
-
-include(Compiler/CrayPrgEnv-C)
-__CrayPrgEnv_setup_C("/opt/intel/.*/mcpcom" "^ld ")
diff --git a/Modules/Compiler/CrayPrgEnv-Intel-CXX.cmake b/Modules/Compiler/CrayPrgEnv-Intel-CXX.cmake
deleted file mode 100644
index 3c3c3e63fd..0000000000
--- a/Modules/Compiler/CrayPrgEnv-Intel-CXX.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-if(__craylinux_crayprgenv_intel_cxx)
- return()
-endif()
-set(__craylinux_crayprgenv_intel_cxx 1)
-
-include(Compiler/CrayPrgEnv-CXX)
-__CrayPrgEnv_setup_CXX("/opt/intel/.*/mcpcom" "^ld ")
diff --git a/Modules/Compiler/CrayPrgEnv-Intel-Fortran.cmake b/Modules/Compiler/CrayPrgEnv-Intel-Fortran.cmake
deleted file mode 100644
index 08a316d2c4..0000000000
--- a/Modules/Compiler/CrayPrgEnv-Intel-Fortran.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-if(__craylinux_crayprgenv_intel_fortran)
- return()
-endif()
-set(__craylinux_crayprgenv_intel_fortran 1)
-
-include(Compiler/CrayPrgEnv-Fortran)
-__CrayPrgEnv_setup_Fortran("/opt/intel/.*/fortcom" "^ld ")
diff --git a/Modules/Compiler/CrayPrgEnv-PGI-C.cmake b/Modules/Compiler/CrayPrgEnv-PGI-C.cmake
deleted file mode 100644
index f45767cafb..0000000000
--- a/Modules/Compiler/CrayPrgEnv-PGI-C.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-if(__craylinux_crayprgenv_pgi_c)
- return()
-endif()
-set(__craylinux_crayprgenv_pgi_c 1)
-
-include(Compiler/CrayPrgEnv-C)
-__CrayPrgEnv_setup_C("/opt/pgi/[^ ]*/pgc" "/usr/bin/ld")
diff --git a/Modules/Compiler/CrayPrgEnv-PGI-CXX.cmake b/Modules/Compiler/CrayPrgEnv-PGI-CXX.cmake
deleted file mode 100644
index a2a286f8c3..0000000000
--- a/Modules/Compiler/CrayPrgEnv-PGI-CXX.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-if(__craylinux_crayprgenv_pgi_cxx)
- return()
-endif()
-set(__craylinux_crayprgenv_pgi_cxx 1)
-
-include(Compiler/CrayPrgEnv-CXX)
-__CrayPrgEnv_setup_CXX("/opt/pgi/[^ ]*/pgcpp" "/usr/bin/ld")
diff --git a/Modules/Compiler/CrayPrgEnv-PGI-Fortran.cmake b/Modules/Compiler/CrayPrgEnv-PGI-Fortran.cmake
deleted file mode 100644
index f6ba7c0fa0..0000000000
--- a/Modules/Compiler/CrayPrgEnv-PGI-Fortran.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-if(__craylinux_crayprgenv_pgi_fortran)
- return()
-endif()
-set(__craylinux_crayprgenv_pgi_fortran 1)
-
-include(Compiler/CrayPrgEnv-Fortran)
-__CrayPrgEnv_setup_Fortran("/opt/pgi/[^ ]*/pgf" "/usr/bin/ld")
diff --git a/Modules/Compiler/CrayPrgEnv.cmake b/Modules/Compiler/CrayPrgEnv.cmake
index 05e3fc7634..6c1c770161 100644
--- a/Modules/Compiler/CrayPrgEnv.cmake
+++ b/Modules/Compiler/CrayPrgEnv.cmake
@@ -4,54 +4,7 @@ if(__craylinux_crayprgenv)
endif()
set(__craylinux_crayprgenv 1)
-macro(__cray_extract_args cmd tag_regex out_var make_absolute)
- string(REGEX MATCHALL "${tag_regex}" args "${cmd}")
- foreach(arg IN LISTS args)
- string(REGEX REPLACE "^${tag_regex}$" "\\2" param "${arg}")
- if(make_absolute)
- get_filename_component(param "${param}" ABSOLUTE)
- endif()
- list(APPEND ${out_var} ${param})
- endforeach()
-endmacro()
-
-function(__cray_extract_implicit src compiler_cmd link_cmd lang include_dirs_var link_dirs_var link_libs_var)
- set(BIN "${CMAKE_PLATFORM_INFO_DIR}/CrayExtractImplicit_${lang}.bin")
- execute_process(
- COMMAND ${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_VERBOSE_FLAG} -o ${BIN}
- RESULT_VARIABLE result
- OUTPUT_VARIABLE output
- ERROR_VARIABLE error
- )
- if(EXISTS "${BIN}")
- file(REMOVE "${BIN}")
- endif()
- set(include_dirs)
- set(link_dirs)
- set(link_libs)
- string(REGEX REPLACE "\r?\n" ";" output_lines "${output}\n${error}")
- foreach(line IN LISTS output_lines)
- if("${line}" MATCHES "${compiler_cmd}")
- __cray_extract_args("${line}" " -(I ?|isystem )([^ ]*)" include_dirs 1)
- set(processed_include 1)
- endif()
- if("${line}" MATCHES "${link_cmd}")
- __cray_extract_args("${line}" " -(L ?)([^ ]*)" link_dirs 1)
- __cray_extract_args("${line}" " -(l ?)([^ ]*)" link_libs 0)
- set(processed_link 1)
- endif()
- if(processed_include AND processed_link)
- break()
- endif()
- endforeach()
-
- set(${include_dirs_var} "${include_dirs}" PARENT_SCOPE)
- set(${link_dirs_var} "${link_dirs}" PARENT_SCOPE)
- set(${link_libs_var} "${link_libs}" PARENT_SCOPE)
- set(CRAY_${lang}_EXTRACTED_IMPLICIT 1 CACHE INTERNAL "" FORCE)
-endfunction()
-
-macro(__CrayPrgEnv_setup lang test_src compiler_cmd link_cmd)
+macro(__CrayPrgEnv_setup lang)
if(DEFINED ENV{CRAYPE_VERSION})
message(STATUS "Cray Programming Environment $ENV{CRAYPE_VERSION} ${lang}")
elseif(DEFINED ENV{ASYNCPE_VERSION})
@@ -81,12 +34,4 @@ macro(__CrayPrgEnv_setup lang test_src compiler_cmd link_cmd)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
set(CMAKE_LINK_SEARCH_START_STATIC TRUE)
endif()
- if(NOT CRAY_${lang}_EXTRACTED_IMPLICIT)
- __cray_extract_implicit(
- ${test_src} ${compiler_cmd} ${link_cmd} ${lang}
- CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES
- CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES
- CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES
- )
- endif()
endmacro()
diff --git a/Modules/Compiler/Flang-Fortran.cmake b/Modules/Compiler/Flang-Fortran.cmake
index d522739478..f0e61d8248 100644
--- a/Modules/Compiler/Flang-Fortran.cmake
+++ b/Modules/Compiler/Flang-Fortran.cmake
@@ -1,6 +1,9 @@
include(Compiler/Clang)
__compiler_clang(Fortran)
+set(CMAKE_Fortran_SUBMODULE_SEP "-")
+set(CMAKE_Fortran_SUBMODULE_EXT ".mod")
+
set(CMAKE_Fortran_PREPROCESS_SOURCE
"<CMAKE_Fortran_COMPILER> -cpp <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
diff --git a/Modules/Compiler/GNU-Fortran.cmake b/Modules/Compiler/GNU-Fortran.cmake
index c333d500b4..6413769cfc 100644
--- a/Modules/Compiler/GNU-Fortran.cmake
+++ b/Modules/Compiler/GNU-Fortran.cmake
@@ -1,6 +1,9 @@
include(Compiler/GNU)
__compiler_gnu(Fortran)
+set(CMAKE_Fortran_SUBMODULE_SEP "@")
+set(CMAKE_Fortran_SUBMODULE_EXT ".smod")
+
set(CMAKE_Fortran_PREPROCESS_SOURCE
"<CMAKE_Fortran_COMPILER> -cpp <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> -o <PREPROCESSED_SOURCE>")
diff --git a/Modules/Compiler/Intel-CXX-FeatureTests.cmake b/Modules/Compiler/Intel-CXX-FeatureTests.cmake
index 0df6c0fe92..aa35b977e0 100644
--- a/Modules/Compiler/Intel-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/Intel-CXX-FeatureTests.cmake
@@ -24,7 +24,7 @@ set(DETECT_CXX14 "((__cplusplus >= 201300L) || ((__cplusplus == 201103L) && !def
unset(DETECT_BUGGY_ICC15)
set(Intel17_CXX14 "__INTEL_COMPILER >= 1700 && ${DETECT_CXX14}")
-set(_cmake_feature_test_cxx_relaxed_constexpr "__cpp_constexpr >= 201304 || (${Intel17_CXX14} && __INTEL_COMPILER != 1800 && !defined(_MSC_VER))")
+set(_cmake_feature_test_cxx_relaxed_constexpr "__cpp_constexpr >= 201304 || (${Intel17_CXX14} && !(__INTEL_COMPILER == 1800 && __INTEL_COMPILER_UPDATE < 5) && !defined(_MSC_VER))")
set(Intel16_CXX14 "__INTEL_COMPILER >= 1600 && ${DETECT_CXX14}")
set(_cmake_feature_test_cxx_aggregate_default_initializers "${Intel16_CXX14}")
diff --git a/Modules/Compiler/Intel-Fortran.cmake b/Modules/Compiler/Intel-Fortran.cmake
index a1320555af..5275ddf648 100644
--- a/Modules/Compiler/Intel-Fortran.cmake
+++ b/Modules/Compiler/Intel-Fortran.cmake
@@ -1,6 +1,9 @@
include(Compiler/Intel)
__compiler_intel(Fortran)
+set(CMAKE_Fortran_SUBMODULE_SEP "@")
+set(CMAKE_Fortran_SUBMODULE_EXT ".smod")
+
set(CMAKE_Fortran_MODDIR_FLAG "-module ")
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-fixed")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-free")
diff --git a/Modules/Compiler/PGI-Fortran.cmake b/Modules/Compiler/PGI-Fortran.cmake
index a183c339bc..3daf7987e2 100644
--- a/Modules/Compiler/PGI-Fortran.cmake
+++ b/Modules/Compiler/PGI-Fortran.cmake
@@ -1,6 +1,9 @@
include(Compiler/PGI)
__compiler_pgi(Fortran)
+set(CMAKE_Fortran_SUBMODULE_SEP "-")
+set(CMAKE_Fortran_SUBMODULE_EXT ".mod")
+
set(CMAKE_Fortran_PREPROCESS_SOURCE
"<CMAKE_Fortran_COMPILER> -Mpreprocess <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
diff --git a/Modules/Compiler/XL-Fortran.cmake b/Modules/Compiler/XL-Fortran.cmake
index 6bab6f69e0..c4fb09712a 100644
--- a/Modules/Compiler/XL-Fortran.cmake
+++ b/Modules/Compiler/XL-Fortran.cmake
@@ -1,6 +1,9 @@
include(Compiler/XL)
__compiler_xl(Fortran)
+set(CMAKE_Fortran_SUBMODULE_SEP "_")
+set(CMAKE_Fortran_SUBMODULE_EXT ".smod")
+
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-qfixed") # [=<right_margin>]
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-qfree") # [=f90|ibm]