Skip to content

Commit

Permalink
add flags instead of replacing them
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanoseb committed Oct 8, 2024
1 parent 1509cb3 commit 4ff5462
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,9 @@ if(${CMAKE_Fortran_COMPILER_ID} STREQUAL "PGI" OR
target_compile_options(xcompact PRIVATE "-DCUDA")
elseif(${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
if (NOT FLAGS_SET)
# set(OpenMP_Fortran_FLAGS "-fopenmp" CACHE STRING "" FORCE)
# set(OpenMP_Fortran_LIB_NAMES "gomp" CACHE STRING "" FORCE)
# set(OpenMP_gomp_LIBRARY "-lgomp" CACHE STRING "" FORCE)

set(CMAKE_Fortran_FLAGS "-cpp -fallow-argument-mismatch" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_DEBUG "-g -Og -Wall -Wpedantic -Werror -Wimplicit-interface -Wimplicit-procedure -Wno-unused-dummy-argument" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -ffast-math -march=native" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -cpp -std=f2018 -fallow-argument-mismatch" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -g -Og -Wall -Wpedantic -Werror -Wimplicit-interface -Wimplicit-procedure -Wno-unused-dummy-argument" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -O3 -ffast-math -march=native" CACHE STRING "" FORCE)
set(FLAGS_SET 1 CACHE INTERNAL "")
endif()
endif()
Expand Down

0 comments on commit 4ff5462

Please sign in to comment.