|
20 | 20 | # https://github.com/SethMMorton/cmake_fortran_template @SethMMorton (https://github.com/SethMMorton)
|
21 | 21 | #
|
22 | 22 | # Contact: zlj@lreis.ac.cn
|
23 |
| -# Latest updated: Apr. 20 2020 |
| 23 | +# Latest updated: Apr. 21 2020 |
24 | 24 | # Copyright (C) 2017-2020 LREIS, IGSNRR, CAS
|
25 | 25 | # ----------------------------------------------------------------------------------------------
|
26 | 26 | cmake_minimum_required(VERSION 2.8.5)
|
@@ -72,10 +72,15 @@ IF(MSVC)
|
72 | 72 | SET(CMAKE_BUILD_BIT "x86")
|
73 | 73 | ENDIF()
|
74 | 74 | ENDIF()
|
| 75 | + |
75 | 76 | IF(MINGW)
|
76 | 77 | SET(TOOL_CHAIN "mingw64")
|
77 | 78 | ELSEIF(MSVC)
|
78 | 79 | SET(TOOL_CHAIN "msvc.ifort")
|
| 80 | +ELSEIF(${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU") |
| 81 | + SET(TOOL_CHAIN "gfort") |
| 82 | +ELSEIF(${CMAKE_Fortran_COMPILER_ID} MATCHES "Intel") |
| 83 | + SET(TOOL_CHAIN "ifort") |
79 | 84 | ENDIF()
|
80 | 85 |
|
81 | 86 | ### Break in case of popular CMake configuration mistakes.
|
@@ -118,8 +123,6 @@ GET_FILENAME_COMPONENT(FCNAME ${CMAKE_Fortran_COMPILER} NAME)
|
118 | 123 | IF(FCNAME STREQUAL "pgf90")
|
119 | 124 | UNSET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
|
120 | 125 | ENDIF(FCNAME STREQUAL "pgf90")
|
121 |
| -#set(CMAKE_Fortran_FLAGS_COVERAGE "-fprofile-arcs -ftest-coverage") |
122 |
| -#set(CMAKE_Fortran_FLAGS_LLVM "-fplugin=dragonegg -O4") |
123 | 126 |
|
124 | 127 | ############################################################
|
125 | 128 | # Define the actual files and folders that make up the build
|
|
0 commit comments