FCFLAGS overrules other flags

This commit is contained in:
Radovan Bast
2015-06-04 17:57:18 +02:00
parent 8170fd0b6f
commit a9e1497030
5 changed files with 38 additions and 21 deletions

View File

@ -1,5 +1,7 @@
if(CMAKE_Fortran_COMPILER_ID MATCHES PGI)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3")
set(CMAKE_Fortran_FLAGS_DEBUG "-g")
if(NOT DEFINED ENV{FCFLAGS})
if(CMAKE_Fortran_COMPILER_ID MATCHES PGI)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3")
set(CMAKE_Fortran_FLAGS_DEBUG "-g")
endif()
endif()