Skip to content

Commit

Permalink
[cmake] Kokkos always requires rtti.
Browse files Browse the repository at this point in the history
  • Loading branch information
vgvassilev committed Feb 18, 2024
1 parent 053d5a3 commit 97e4092
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions unittests/Kokkos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})

0 comments on commit 97e4092

Please sign in to comment.