Skip to content

Commit

Permalink
Compile based on present architecture.
Browse files Browse the repository at this point in the history
  • Loading branch information
Semih Akkurt committed Oct 8, 2024
1 parent b92d919 commit 7bd53ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ if(${CMAKE_Fortran_COMPILER_ID} STREQUAL "PGI" OR

set(CMAKE_Fortran_FLAGS "-cpp -cuda")
set(CMAKE_Fortran_FLAGS_DEBUG "-g -O0 -traceback -Mbounds -Mchkptr -Ktrap=fp")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -fast")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -fast -gpu=ccnative")
target_link_options(x3d2 INTERFACE "-cuda")
target_link_options(x3d2 INTERFACE "-cudalib=cufftmp")

target_compile_options(xcompact PRIVATE "-DCUDA")
elseif(${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
set(CMAKE_Fortran_FLAGS "-cpp -std=f2018")
set(CMAKE_Fortran_FLAGS_DEBUG "-g -Og -Wall -Wpedantic -Werror -Wimplicit-interface -Wimplicit-procedure -Wno-unused-dummy-argument")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -ffast-math")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -ffast-math -march=native")
endif()

find_package(OpenMP REQUIRED)
Expand Down

0 comments on commit 7bd53ed

Please sign in to comment.