summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-03-26 13:32:39 (GMT)
committerBrad King <brad.king@kitware.com>2015-03-26 13:33:20 (GMT)
commita8e7a1047ad3b61238f073ea3d2cd138f207c1ed (patch)
tree75bf7760003dab507328b42082b894dec4c1b30f
parent166e29e453e6a48e191b02835b08cf5bd3d0f988 (diff)
downloadCMake-a8e7a1047ad3b61238f073ea3d2cd138f207c1ed.zip
CMake-a8e7a1047ad3b61238f073ea3d2cd138f207c1ed.tar.gz
CMake-a8e7a1047ad3b61238f073ea3d2cd138f207c1ed.tar.bz2
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>
-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 dfd7927..e9c8a59 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)