Skip to content

Commit

Permalink
Optimize debug builds with -Og
Browse files Browse the repository at this point in the history
Accelerate tests in CI.
  • Loading branch information
jngrad committed Mar 14, 2020
1 parent d9a59b3 commit 69d4962
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTDIR}/espressomd")
# drop 'lib' prefix from all libraries
set(CMAKE_SHARED_LIBRARY_PREFIX "")

set(CMAKE_CXX_FLAGS_CODECOV "-O0 -g")
set(CMAKE_CXX_FLAGS_CODECOV "-Og -g")
if(WARNINGS_ARE_ERRORS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
endif(WARNINGS_ARE_ERRORS)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindCUDACompilerClang.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if(CUDA_VERSION VERSION_LESS ${MINIMAL_CUDA_VERSION})
message(FATAL_ERROR "${CMAKE_CUDA_COMPILER} was built for CUDA ${CUDA_VERSION}: version does not match requirements (CUDA ${MINIMAL_CUDA_VERSION}).")
endif()

set(CUDA_NVCC_FLAGS_DEBUG "${CUDA_NVCC_FLAGS_DEBUG} -O0 -g")
set(CUDA_NVCC_FLAGS_DEBUG "${CUDA_NVCC_FLAGS_DEBUG} -Og -g")
set(CUDA_NVCC_FLAGS_RELEASE "${CUDA_NVCC_FLAGS_RELEASE} -O3 -DNDEBUG")
set(CUDA_NVCC_FLAGS_MINSIZEREL "${CUDA_NVCC_FLAGS_MINSIZEREL} -O2 -DNDEBUG")
set(CUDA_NVCC_FLAGS_RELWITHDEBINFO "${CUDA_NVCC_FLAGS_RELWITHDEBINFO} -O2 -g -DNDEBUG")
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindCUDACompilerNVCC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ set(CUDA_LINK_LIBRARIES_KEYWORD PUBLIC)

SET(CUDA_PROPAGATE_HOST_FLAGS OFF)

set(CUDA_NVCC_FLAGS_DEBUG "${CUDA_NVCC_FLAGS_DEBUG} -O0 -Xptxas -O0 -Xcompiler -O0 -G -g -Xptxas -g -Xcompiler -g")
set(CUDA_NVCC_FLAGS_DEBUG "${CUDA_NVCC_FLAGS_DEBUG} -O3 -Xptxas -O3 -Xcompiler -Og -g -Xcompiler -g")
set(CUDA_NVCC_FLAGS_RELEASE "${CUDA_NVCC_FLAGS_RELEASE} -O3 -Xptxas -O3 -Xcompiler -O3 -DNDEBUG")
set(CUDA_NVCC_FLAGS_MINSIZEREL "${CUDA_NVCC_FLAGS_MINSIZEREL} -O2 -Xptxas -O2 -Xcompiler -Os -DNDEBUG")
set(CUDA_NVCC_FLAGS_RELWITHDEBINFO "${CUDA_NVCC_FLAGS_RELWITHDEBINFO} -O2 -Xptxas -O2 -Xcompiler -O2 -g -Xcompiler -g -DNDEBUG")
Expand Down

0 comments on commit 69d4962

Please sign in to comment.