diff --git a/libcudacxx/include/cuda/std/detail/__config b/libcudacxx/include/cuda/std/detail/__config index 5ba1b1d4440..952593d2d8e 100644 --- a/libcudacxx/include/cuda/std/detail/__config +++ b/libcudacxx/include/cuda/std/detail/__config @@ -30,6 +30,10 @@ # define _LIBCUDACXX_CUDA_ABI_VERSION _LIBCUDACXX_CUDA_ABI_VERSION_LATEST #endif +#if (_LIBCUDACXX_CUDA_ABI_VERSION < 4) && !defined(LIBCUDACXX_IGNORE_DEPRECATED_ABI) +# error "libcu++ ABIs older than version 4 are deprecated, define LIBCUDACXX_IGNORE_DEPRECATED_ABI to ignore" +#endif + #ifdef _LIBCUDACXX_PIPELINE_ASSUMED_ABI_VERSION # if _LIBCUDACXX_PIPELINE_ASSUMED_ABI_VERSION != _LIBCUDACXX_CUDA_ABI_VERSION # error cuda_pipeline.h has assumed a different libcu++ ABI version than provided by this library. To fix this, please include a libcu++ header before including cuda_pipeline.h, or upgrade to a version of the toolkit this version of libcu++ shipped in. diff --git a/libcudacxx/test/libcudacxx/CMakeLists.txt b/libcudacxx/test/libcudacxx/CMakeLists.txt index 2aad419a35f..3f907d7efab 100644 --- a/libcudacxx/test/libcudacxx/CMakeLists.txt +++ b/libcudacxx/test/libcudacxx/CMakeLists.txt @@ -44,6 +44,7 @@ string(APPEND LIBCUDACXX_TEST_COMPILER_FLAGS " -DCCCL_ENABLE_ASSERTIONS") # Disable dialect deprecation string(APPEND LIBCUDACXX_TEST_COMPILER_FLAGS " -DCCCL_IGNORE_DEPRECATED_CPP_DIALECT") +string(APPEND LIBCUDACXX_TEST_COMPILER_FLAGS " -DLIBCUDACXX_IGNORE_DEPRECATED_ABI") if (NOT MSVC AND NOT ${CMAKE_CUDA_COMPILER_ID} STREQUAL "Clang") set(LIBCUDACXX_WARNING_LEVEL "--compiler-options=-Wall --compiler-options=-Wextra") diff --git a/libcudacxx/test/utils/nvidia/nvrtc/nvrtcc.cpp b/libcudacxx/test/utils/nvidia/nvrtc/nvrtcc.cpp index df64e3fd457..637629b8317 100644 --- a/libcudacxx/test/utils/nvidia/nvrtc/nvrtcc.cpp +++ b/libcudacxx/test/utils/nvidia/nvrtc/nvrtcc.cpp @@ -162,6 +162,12 @@ ArgPair argHandlers[] = { nvrtcArguments.emplace_back("-G"); return NORMAL; }}, + {// Matches -D + std::regex("^-D.+$"), + [](const std::smatch& match) { + nvrtcArguments.emplace_back(match[0].str()); + return NORMAL; + }}, {// Capture an argument that is just '-'. If no input file is listed input is on stdin std::regex("^-$"), [](const std::smatch& match) {