diff --git a/unittests/Kokkos/CMakeLists.txt b/unittests/Kokkos/CMakeLists.txt index 95f826bb0..be0250cf1 100644 --- a/unittests/Kokkos/CMakeLists.txt +++ b/unittests/Kokkos/CMakeLists.txt @@ -3,5 +3,14 @@ add_clad_unittest(KokkosTests main.cpp ) +# If llvm does not require rtti, kokkos does. +if (NOT (LLVM_REQUIRES_RTTI OR LLVM_ENABLE_RTTI)) + if (LLVM_COMPILER_IS_GCC_COMPATIBLE) + target_compile_options(KokkosTests PUBLIC -frtti) + elseif(MSVC) + target_compile_options(KokkosTests PUBLIC /GR) + endif() +endif() + target_link_libraries(KokkosTests PUBLIC ${Kokkos_LIBRARIES}) target_include_directories(KokkosTests SYSTEM PRIVATE ${Kokkos_INCLUDE_DIRS})