Skip to content

Commit 9a46fda

Browse files
committed
Update compiler name for executable
1 parent b88f7a9 commit 9a46fda

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

CMakeLists.txt

+6-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# https://github.com/SethMMorton/cmake_fortran_template @SethMMorton (https://github.com/SethMMorton)
2121
#
2222
# Contact: zlj@lreis.ac.cn
23-
# Latest updated: Apr. 20 2020
23+
# Latest updated: Apr. 21 2020
2424
# Copyright (C) 2017-2020 LREIS, IGSNRR, CAS
2525
# ----------------------------------------------------------------------------------------------
2626
cmake_minimum_required(VERSION 2.8.5)
@@ -72,10 +72,15 @@ IF(MSVC)
7272
SET(CMAKE_BUILD_BIT "x86")
7373
ENDIF()
7474
ENDIF()
75+
7576
IF(MINGW)
7677
SET(TOOL_CHAIN "mingw64")
7778
ELSEIF(MSVC)
7879
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")
7984
ENDIF()
8085

8186
### Break in case of popular CMake configuration mistakes.
@@ -118,8 +123,6 @@ GET_FILENAME_COMPONENT(FCNAME ${CMAKE_Fortran_COMPILER} NAME)
118123
IF(FCNAME STREQUAL "pgf90")
119124
UNSET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
120125
ENDIF(FCNAME STREQUAL "pgf90")
121-
#set(CMAKE_Fortran_FLAGS_COVERAGE "-fprofile-arcs -ftest-coverage")
122-
#set(CMAKE_Fortran_FLAGS_LLVM "-fplugin=dragonegg -O4")
123126

124127
############################################################
125128
# Define the actual files and folders that make up the build

0 commit comments

Comments
 (0)