summaryrefslogtreecommitdiff
path: root/Modules/Compiler/GNU-Fortran.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-03-26 09:32:39 -0400
committerBrad King <brad.king@kitware.com>2015-03-26 09:33:20 -0400
commita8e7a1047ad3b61238f073ea3d2cd138f207c1ed (patch)
tree75bf7760003dab507328b42082b894dec4c1b30f /Modules/Compiler/GNU-Fortran.cmake
parent166e29e453e6a48e191b02835b08cf5bd3d0f988 (diff)
downloadcmake-a8e7a1047ad3b61238f073ea3d2cd138f207c1ed.tar.gz
GNU: Do not use -isystem with gfortran
The compiler documents that USE statements search for ".mod" files in directories specified with -I, but not -isystem. Reported-by: Hugh Sorby <h.sorby@auckland.ac.nz>
Diffstat (limited to 'Modules/Compiler/GNU-Fortran.cmake')
-rw-r--r--Modules/Compiler/GNU-Fortran.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/Compiler/GNU-Fortran.cmake b/Modules/Compiler/GNU-Fortran.cmake
index dfd79274d9..e9c8a594ab 100644
--- a/Modules/Compiler/GNU-Fortran.cmake
+++ b/Modules/Compiler/GNU-Fortran.cmake
@@ -8,5 +8,8 @@ set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form")
set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os")
set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
+# No -isystem for Fortran because it will not find .mod files.
+unset(CMAKE_INCLUDE_SYSTEM_FLAG_Fortran)
+
# Fortran-specific feature flags.
set(CMAKE_Fortran_MODDIR_FLAG -J)