Skip to content

Commit

Permalink
fix cray clang OpenMP linker issues
Browse files Browse the repository at this point in the history
CMake is not setting the linker flag `-fopenmp`  for the cray clang
compiler.
  • Loading branch information
psychocoderHPC committed Sep 23, 2024
1 parent 128d446 commit 351935e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmake/alpakaCommon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,11 @@ if(alpaka_ACC_CPU_B_OMP2_T_SEQ_ENABLE OR alpaka_ACC_CPU_B_SEQ_T_OMP2_ENABLE)
else()
find_package(OpenMP REQUIRED COMPONENTS CXX)
target_link_libraries(alpaka INTERFACE OpenMP::OpenMP_CXX)
# shown with CMake 3.29 and cray clang 17
# workaround: cmake is missing to add '-fopenmp' to the linker flags
if(CMAKE_CXX_COMPILER_ID STREQUAL "CrayClang")
target_link_libraries(alpaka INTERFACE -fopenmp)
endif()
endif()
endif()

Expand Down

0 comments on commit 351935e

Please sign in to comment.