summaryrefslogtreecommitdiffstats
path: root/Modules/CheckFortranSourceRuns.cmake
diff options
context:
space:
mode:
authorMichael Hirsch <scivision@users.noreply.gitlab.kitware.com>2020-10-15 12:46:03 (GMT)
committerBrad King <brad.king@kitware.com>2020-10-15 13:33:59 (GMT)
commit1e519df0259677df67b5e7d21e1f189d655ddbd3 (patch)
tree3633cbfd48f5db5c1c3d0191cc3fff240e46e0ae /Modules/CheckFortranSourceRuns.cmake
parentb1d9a25f35a22f41b2c1b87725f091936711a28c (diff)
downloadCMake-1e519df0259677df67b5e7d21e1f189d655ddbd3.zip
CMake-1e519df0259677df67b5e7d21e1f189d655ddbd3.tar.gz
CMake-1e519df0259677df67b5e7d21e1f189d655ddbd3.tar.bz2
CheckSource{Runs,Compiles}: Fix default Fortran source extension
In commit 357e2ef429 (CheckSoureRuns: Add a unified way to check if a source runs, 2020-09-14, v3.19.0-rc1~118^2), the default Fortran source file extension was accidentally changed from `.F90` to `.F`. Fix that. In commit 10ae907de0 (CheckSoureCompiles: Add a unified way to check if a source compiles, 2020-09-14, v3.19.0-rc1~118^2~1), the default Fortran source extension was correctly preserved as `.F`, but `.F90` is a better default both for consistency and modern usage. Use that for direct calls to the `check_source_compiles` macro. Update our original `check_fortran_source_compiles` implementation to use `.F` by default as it did before. Fixes: #21307
Diffstat (limited to 'Modules/CheckFortranSourceRuns.cmake')
-rw-r--r--Modules/CheckFortranSourceRuns.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/CheckFortranSourceRuns.cmake b/Modules/CheckFortranSourceRuns.cmake
index 29f4a98..5276709 100644
--- a/Modules/CheckFortranSourceRuns.cmake
+++ b/Modules/CheckFortranSourceRuns.cmake
@@ -86,5 +86,7 @@ include_guard(GLOBAL)
include(CheckSourceRuns)
macro(CHECK_Fortran_SOURCE_RUNS SOURCE VAR)
- check_source_runs(Fortran "${SOURCE}" ${VAR} ${ARGN})
+ # Pass the SRC_EXT we used by default historically.
+ # A user-provided SRC_EXT argument in ARGN will override ours.
+ check_source_runs(Fortran "${SOURCE}" ${VAR} SRC_EXT "F90" ${ARGN})
endmacro()