Skip to content

Commit

Permalink
HPX runtime workaround for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
constracktor committed Nov 19, 2024
1 parent d296825 commit 545e0fb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/plssvm/backends/HPX/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ set(PLSSVM_HPX_SOURCES
# set target properties
set_local_and_parent(PLSSVM_HPX_BACKEND_LIBRARY_NAME plssvm-HPX)
add_library(${PLSSVM_HPX_BACKEND_LIBRARY_NAME} SHARED ${PLSSVM_HPX_SOURCES})
target_link_libraries(${PLSSVM_HPX_BACKEND_LIBRARY_NAME} PUBLIC HPX::hpx)
target_link_libraries(${PLSSVM_HPX_BACKEND_LIBRARY_NAME} PUBLIC HPX::hpx HPX::wrap_main)

# additional compilation flags
target_compile_options(${PLSSVM_HPX_BACKEND_LIBRARY_NAME} PRIVATE $<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang>:-Wconversion>)
Expand Down
6 changes: 6 additions & 0 deletions tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@

#include <cstdlib> // std::atexit

#if defined(PLSSVM_HAS_HPX_BACKEND)
// Workaround as Scope Guard not working properly with Google Test
// Run the entire main function in HPX rutime
#include <hpx/hpx_main.hpp>
#endif

// silence GTest warnings/test errors

// generic CSVM tests
Expand Down

0 comments on commit 545e0fb

Please sign in to comment.