Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CMake check for Intel compiler #1

Merged
merged 1 commit into from
Apr 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ if (FPE_TRAP_ENABLED)
endif (FPE_TRAP_ENABLED)

# Setup dependencies
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
if (${CMAKE_Fortran_COMPILER_ID} MATCHES "^Intel")
find_package(MKL)
endif()
if (MKL_FOUND)
Expand Down
4 changes: 2 additions & 2 deletions cmake/OpenfastFortranOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ macro(set_fast_fortran)
elseif("${CMAKE_Fortran_COMPILER_VERSION}" VERSION_LESS "4.6.0")
message(FATAL_ERROR "A version of GNU GFortran greater than 4.6.0 is required. GFortran version detected by CMake: ${CMAKE_Fortran_COMPILER_VERSION}.")
endif()
elseif(${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES "^Intel")
if("${CMAKE_Fortran_COMPILER_VERSION}" VERSION_LESS "11")
message(FATAL_ERROR "A version of Intel ifort greater than 11 is required. ifort version detected by CMake: ${CMAKE_Fortran_COMPILER_VERSION}.")
endif()
Expand All @@ -68,7 +68,7 @@ macro(set_fast_fortran)
# Get OS/Compiler specific options
if (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
set_fast_gfortran()
elseif(${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES "^Intel")
set_fast_intel_fortran()
endif()
endmacro(set_fast_fortran)
Expand Down
2 changes: 1 addition & 1 deletion modules/nwtc-library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ if (CMAKE_BUILD_TYPE MATCHES Debug)
set_source_files_properties(src/NetLib/slatec/NWTC_SLATEC.f90 PROPERTIES COMPILE_FLAGS -frecursive)
set_source_files_properties(src/NetLib/slatec/dqk61.f PROPERTIES COMPILE_FLAGS -frecursive)
set_source_files_properties(src/NetLib/slatec/qk61.f PROPERTIES COMPILE_FLAGS -frecursive)
elseif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
elseif (${CMAKE_Fortran_COMPILER_ID} MATCHES "^Intel")
if("${CMAKE_Fortran_COMPILER_VERSION}" VERSION_LESS "19")
if (WIN32)
set_source_files_properties(src/NetLib/slatec/NWTC_SLATEC.f90 PROPERTIES COMPILE_FLAGS "/recursive")
Expand Down
2 changes: 1 addition & 1 deletion share/discon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ endif (NOT CMAKE_BUILD_TYPE)
# set the build flags
if (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
set_gfortran()
elseif(${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES "^Intel")
set_ifort()
endif()
set(CMAKE_SHARE_LINKER_FLAGS "-shared")
Expand Down