Skip to content

Commit 8e1e16c

Browse files
authored
Merge pull request #399 from bradking/cmake-fortran-fixed-format
cmake: Tell CMake that our Fortran sources are in fixed format
2 parents 29fe9e4 + a56239b commit 8e1e16c

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

CMAKE/CheckLAPACKCompilerFlags.cmake

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ elseif( (CMAKE_Fortran_COMPILER_ID STREQUAL "VisualAge" ) OR # CMake 2.6
4444
set( FPE_EXIT TRUE )
4545
endif()
4646

47-
if( NOT ("${CMAKE_Fortran_FLAGS}" MATCHES "-qfixed") )
48-
message( STATUS "Enabling fixed format F90/F95 with -qfixed" )
49-
set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qfixed"
50-
CACHE STRING "Flags for Fortran compiler." FORCE )
51-
endif()
52-
5347
# HP Fortran
5448
elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "HP" )
5549
if( "${CMAKE_Fortran_FLAGS}" MATCHES "\\+fp_exception" )

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ set(CMAKE_MODULE_PATH "${LAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH})
1616
# Export all symbols on Windows when building shared libraries
1717
SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
1818

19+
# Tell CMake that our Fortran sources are written in fixed format.
20+
set(CMAKE_Fortran_FORMAT FIXED)
21+
1922
# Set a default build type if none was specified
2023
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
2124
message(STATUS "Setting build type to 'Release' as none was specified.")

0 commit comments

Comments
 (0)