Fix build failure with Clang 20. (#1667)

* Modified for Clang

* Updated timemory version so it compiles with Clang 20

* Using TBB version 2018.6 for both GCC and Clang builds
This commit is contained in:
ajanicijamd
2025-11-08 11:36:12 -05:00
committed by GitHub
vanhempi 93947241d0
commit 2f9017f706
2 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
@@ -43,11 +43,7 @@ endif()
set(TBB_USE_DEBUG_BUILD OFF CACHE BOOL "Use debug versions of TBB libraries")
# Minimum version of TBB (assumes a dotted-decimal format: YYYY.XX)
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
set(_tbb_min_version 2019.7)
else()
set(_tbb_min_version 2018.6)
endif()
set(_tbb_min_version 2018.6)
set(TBB_MIN_VERSION
${_tbb_min_version}
@@ -32,7 +32,11 @@ add_executable(
)
option(USE_CLANG_OMP "Use the clang OpenMP if available" ON)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(OpenMP_C_FLAGS "-fopenmp=libomp")
set(OpenMP_CXX_FLAGS "-fopenmp=libomp")
find_package(OpenMP REQUIRED)
target_link_libraries(openmp-common PUBLIC OpenMP::OpenMP_CXX)
set(ROCPROFSYS_OPENMP_USING_LIBOMP_LIBRARY