From 2f9017f706ff88b71ec4a6277e317e7b459bef4b Mon Sep 17 00:00:00 2001 From: ajanicijamd Date: Sat, 8 Nov 2025 11:36:12 -0500 Subject: [PATCH] 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 --- projects/rocprofiler-systems/cmake/DyninstTBB.cmake | 6 +----- projects/rocprofiler-systems/examples/openmp/CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/rocprofiler-systems/cmake/DyninstTBB.cmake b/projects/rocprofiler-systems/cmake/DyninstTBB.cmake index 110d00f8e8..56d0923fcf 100644 --- a/projects/rocprofiler-systems/cmake/DyninstTBB.cmake +++ b/projects/rocprofiler-systems/cmake/DyninstTBB.cmake @@ -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} diff --git a/projects/rocprofiler-systems/examples/openmp/CMakeLists.txt b/projects/rocprofiler-systems/examples/openmp/CMakeLists.txt index 3d5388007c..9e0302b73b 100644 --- a/projects/rocprofiler-systems/examples/openmp/CMakeLists.txt +++ b/projects/rocprofiler-systems/examples/openmp/CMakeLists.txt @@ -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