Skip to content

Commit

Permalink
User-settable flags (#19)
Browse files Browse the repository at this point in the history
User-settable flags by pre-pending to CMAKE_<Lang>_FLAGS
  • Loading branch information
kgerheiser authored Aug 27, 2020
1 parent 863674f commit d93b00c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ elseif(UNIX)
endif()

if(CMAKE_C_COMPILER_ID MATCHES "^(Intel)$")
set(CMAKE_C_FLAGS "-g")
set(CMAKE_C_FLAGS "-g ${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS_RELEASE "-O3")
set(CMAKE_Fortran_FLAGS "-g")
set(CMAKE_Fortran_FLAGS "-g ${CMAKE_Fortran_FLAGS}")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3")
elseif(CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$")
set(CMAKE_C_FLAGS "-g")
set(CMAKE_C_FLAGS "-g ${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS_RELEASE "-O3")
set(CMAKE_C_FLAGS_DEBUG "-ggdb -Wall")
set(CMAKE_Fortran_FLAGS "-g -fbacktrace -funroll-loops")
set(CMAKE_Fortran_FLAGS "-g -fbacktrace -funroll-loops ${CMAKE_Fortran_FLAGS}")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3")
set(CMAKE_Fortran_FLAGS_DEBUG "-ggdb -Wall")
endif()
Expand Down

0 comments on commit d93b00c

Please sign in to comment.