Skip to content

Commit

Permalink
Allow passing additional flags to obara saika host compilation
Browse files Browse the repository at this point in the history
Helps with NVHPC segfault
  • Loading branch information
ryanstocks00 committed Sep 26, 2024
1 parent af72d05 commit 7c26939
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ set( GAUXC_OBARA_SAIKA_HOST_SRC
src/obara_saika_integrals.cxx
src/chebyshev_boys_computation.cxx
)

# This is required for compilation with NVHPC as it crashes with the O3 optimization flag
if (DEFINED GAUXC_OBARA_SAIKA_COMPILE_OPTIMIZATION_OPTIONS)
foreach (flag "[\\/\\-]O3" "[\\/\\-]Ofast" "[\\/\\-]fast")
string(REGEX REPLACE ${flag} ${GAUXC_OBARA_SAIKA_COMPILE_OPTIMIZATION_OPTIONS} CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
endforeach()
message("Setting Obara-Saika CMAKE_CXX_FLAGS_RELEASE to: ${CMAKE_CXX_FLAGS_RELEASE}")
endif()


target_sources( gauxc PRIVATE ${GAUXC_OBARA_SAIKA_HOST_SRC} )
target_include_directories( gauxc PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
Expand Down

0 comments on commit 7c26939

Please sign in to comment.