Skip to content

Commit

Permalink
Lowering CMake build optimization level for host code. (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
romerojosh authored Feb 1, 2024
1 parent 8fe53b7 commit fea67f4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ find_program(NVHPC_CXX_BIN "nvc++")
string(REPLACE "compilers/bin/nvc++" "cmake" NVHPC_CMAKE_DIR ${NVHPC_CXX_BIN})
set(CMAKE_PREFIX_PATH ${NVHPC_CMAKE_DIR})

# Limit optimization levels of CPU code compilation
set(CMAKE_CXX_FLAGS_RELEASE "-O1 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O1 -g -DNDEBUG")
set(CMAKE_Fortran_FLAGS_RELEASE "-O1 -DNDEBUG")
set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "-O1 -g -DNDEBUG")

if (CUDECOMP_BUILD_FORTRAN)
set(LANGS CXX CUDA Fortran)
else()
Expand Down

0 comments on commit fea67f4

Please sign in to comment.