Skip to content

Commit

Permalink
Add compiler check
Browse files Browse the repository at this point in the history
  • Loading branch information
diehlpk committed Feb 1, 2024
1 parent dbdb595 commit 31b6bfe
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmake/kokkos_arch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,15 @@ IF (KOKKOS_ARCH_HSW)
ENDIF()

IF (KOKKOS_ARCH_RISCV_MILKV)
IF(NOT (
(KOKKOS_CXX_COMPILER_ID STREQUAL GNU
AND KOKKOS_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12)
OR
(KOKKOS_CXX_COMPILER_ID STREQUAL Clang
AND KOKKOS_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16)
)
MESSAGE(SEND_ERROR "Only gcc >= 12 and clang >= 16 support RISC-V.")
ENDIF()
COMPILER_SPECIFIC_FLAGS(
COMPILER_ID KOKKOS_CXX_HOST_COMPILER_ID
DEFAULT -march=rv64imafdcv
Expand Down

0 comments on commit 31b6bfe

Please sign in to comment.