-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase.cmake
More file actions
23 lines (18 loc) · 811 Bytes
/
base.cmake
File metadata and controls
23 lines (18 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#cmake_minimum_required ( VERSION 3.0 )
#project ( hello LANGUAGES Fortran VERSION 1.0.0 )
enable_language ( Fortran )
enable_testing ()
if ( CMAKE_Fortran_COMPILER_ID MATCHES "GNU" )
set ( dialect "-cpp -ffree-line-length-none -fopenmp -fdec-math -mcmodel=large -pthread -Dlinux -fcoarray=lib" )
set ( bounds "-fbounds-check -Ddebug" )
endif ()
if ( CMAKE_Fortran_COMPILER_ID MATCHES "Intel" )
set ( dialect "-fpp -free -Dlinux -Dintel -parallel -mcmodel=large" )
set ( bounds "-check bounds -Ddebug" )
endif ()
if ( CMAKE_Fortran_COMPILER_ID MATCHES "PGI" )
set ( dialect "-Mfreeform -Mdclchk -Mstandard -Mallocatable=03" )
set ( bounds "-C" )
endif ()
set ( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} ${bounds}" )
set ( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${dialect}" )