diff --git a/.github/workflows/cuda.yml b/.github/workflows/cuda.yml index 9b1caf36..6ef93269 100644 --- a/.github/workflows/cuda.yml +++ b/.github/workflows/cuda.yml @@ -82,7 +82,8 @@ jobs: -DCUDA_PATH=/usr/local/cuda-12.6 \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ - -DCMAKE_CUDA_FLAGS="-std=c++20" \ + -DCMAKE_CUDA_FLAGS="-std=c++20 -Xcompiler -stdlib=libstdc++" \ + -DCMAKE_CXX_FLAGS="-stdlib=libstdc++" \ .. \ --debug-output diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2ce46a86..1fd6768c 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -15,7 +15,21 @@ if(HAVE_BOOST_TEST) enable_language(CUDA) set(CMAKE_CUDA_EXTENSIONS OFF) - boost_test_jamfile(FILE nvcc_jamfile LINK_LIBRARIES Boost::crypt ${CUDA_LIBRARIES} INCLUDE_DIRECTORIES ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES} COMPILE_OPTIONS --expt-relaxed-constexpr -std=c++20 -Xcompiler -std=c++20 -MMD ) + # Add these lines to explicitly use libstdc++ + set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler -stdlib=libstdc++") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++") + + boost_test_jamfile( + FILE nvcc_jamfile + LINK_LIBRARIES Boost::crypt ${CUDA_LIBRARIES} + INCLUDE_DIRECTORIES ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES} + COMPILE_OPTIONS + --expt-relaxed-constexpr + -std=c++20 + -Xcompiler -std=c++20 + -Xcompiler -stdlib=libstdc++ + -MMD + ) elseif (BOOST_CRYPT_ENABLE_NVRTC)