Skip to content

Commit

Permalink
Skip -fno-rtti flag with rocThrust and libstdc++ version < 9 (kokkos#…
Browse files Browse the repository at this point in the history
…7384)

* Skip -fno-rtti flag with rocThrust and libstdc++ version < 9

* 2nd attempt to detect the use of a libstc++ that is incompatible

* Revert "2nd attempt to detect the use of a libstc++ that is incompatible"

This reverts commit 498a248.

* The source must include a defintion of main()

Co-Authored-By: Nathan Ellingwood <ndellin@sandia.gov>

---------

Co-authored-by: Nathan Ellingwood <ndellin@sandia.gov>
  • Loading branch information
dalg24 and ndellingwood authored Sep 27, 2024
1 parent ef426e8 commit ab9a637
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cmake/kokkos_tpls.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ ELSE()
ENDIF()
KOKKOS_TPL_OPTION(ROCM ${ROCM_DEFAULT})
KOKKOS_TPL_OPTION(ROCTHRUST ${ROCTHRUST_DEFAULT})
if(Kokkos_ENABLE_ROCTHRUST)
include(CheckCXXSourceCompiles)
check_cxx_source_compiles("
#include <ios>
int main() {
static_assert(_GLIBCXX_RELEASE < 9);
return 0;
}
"
Kokkos_ENABLE_IMPL_SKIP_NO_RTTI_FLAG
)
endif()

IF(KOKKOS_ENABLE_SYCL)
SET(ONEDPL_DEFAULT ON)
Expand Down
1 change: 1 addition & 0 deletions cmake/kokkos_tribits.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ FUNCTION(KOKKOS_ADD_EXECUTABLE_AND_TEST ROOT_NAME)
SET_PROPERTY(TARGET ${EXE_NAME} PROPERTY CXX_VISIBILITY_PRESET hidden)
ENDIF()
IF(NOT (Kokkos_INSTALL_TESTING OR Kokkos_ENABLE_SYCL OR Kokkos_ENABLE_HPX
OR Kokkos_ENABLE_IMPL_SKIP_NO_RTTI_FLAG
OR (KOKKOS_CXX_COMPILER_ID STREQUAL "Intel" AND KOKKOS_CXX_COMPILER_VERSION VERSION_LESS 2021.2.0)
OR (KOKKOS_CXX_COMPILER_ID STREQUAL "NVIDIA" AND KOKKOS_CXX_COMPILER_VERSION VERSION_LESS 11.3.0)
OR (KOKKOS_CXX_COMPILER_ID STREQUAL "NVIDIA" AND KOKKOS_CXX_HOST_COMPILER_ID STREQUAL "MSVC")))
Expand Down

0 comments on commit ab9a637

Please sign in to comment.