We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c3d9dd commit 25e57d0Copy full SHA for 25e57d0
CMakeLists.txt
@@ -77,6 +77,13 @@ endfunction()
77
78
if(${SUBSPACE_BUILD_TESTS} OR ${SUBSPACE_BUILD_BENCHMARKS})
79
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
80
+ # Prevent googletest from including libc++abi's cxxabi.h, since it has a
81
+ # conflicting declaration of the __cxa_init_primary_exception symbol with
82
+ # libstdc++. It's very unclear why googletest unconditionally includes this
83
+ # header when the build is not set up to use libc++abi otherwise. We could
84
+ # add detection here to keep it when using libc++abi but we currently
85
+ # don't. See https://github.com/llvm/llvm-project/issues/121300
86
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGTEST_HAS_CXXABI_H_=0")
87
add_subdirectory(third_party/googletest)
88
include(GoogleTest)
89
enable_testing()
0 commit comments