summaryrefslogtreecommitdiffstats
path: root/Modules/CheckSourceCompiles.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/CheckSourceCompiles.cmake')
-rw-r--r--Modules/CheckSourceCompiles.cmake9
1 files changed, 6 insertions, 3 deletions
diff --git a/Modules/CheckSourceCompiles.cmake b/Modules/CheckSourceCompiles.cmake
index 08fc153..4ed9a5c 100644
--- a/Modules/CheckSourceCompiles.cmake
+++ b/Modules/CheckSourceCompiles.cmake
@@ -94,7 +94,7 @@ function(CHECK_SOURCE_COMPILES _lang _source _var)
set(_lang_ext "cu")
elseif(_lang STREQUAL Fortran)
set(_lang_textual "Fortran")
- set(_lang_ext "F")
+ set(_lang_ext "F90")
elseif(_lang STREQUAL ISPC)
set(_lang_textual "ISPC")
set(_lang_ext "ispc")
@@ -121,8 +121,11 @@ function(CHECK_SOURCE_COMPILES _lang _source _var)
foreach(arg ${ARGN})
if("${arg}" MATCHES "^(FAIL_REGEX|SRC_EXT)$")
set(_key "${arg}")
- elseif(_key)
- list(APPEND _${_key} "${arg}")
+ elseif(_key STREQUAL "FAIL_REGEX")
+ list(APPEND _FAIL_REGEX "${arg}")
+ elseif(_key STREQUAL "SRC_EXT")
+ set(_SRC_EXT "${arg}")
+ set(_key "")
else()
message(FATAL_ERROR "Unknown argument:\n ${arg}\n")
endif()