From f4492294b7082801de6e1d3dcbdd7c6020f06f48 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Thu, 22 Aug 2024 11:46:22 +0400 Subject: [PATCH 1/2] [cmake] fix condition for apple clang --- cmake/OpenMP.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/OpenMP.cmake b/cmake/OpenMP.cmake index 9484c268506..9ea27797342 100644 --- a/cmake/OpenMP.cmake +++ b/cmake/OpenMP.cmake @@ -23,7 +23,7 @@ endif() set(OpenMP_cmake_included true) include("cmake/Threading.cmake") -if (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") # OSX Clang doesn't have OpenMP by default. # But we still want to build the library. set(_omp_severity "WARNING") From 6353bd29cd9721fdce9d8a959e07343ebe6bb189 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Fri, 23 Aug 2024 23:47:14 +0400 Subject: [PATCH 2/2] Update CMakeLists.txt --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index af2522a0721..befd73f2094 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,11 @@ if(POLICY CMP0022) cmake_policy(SET CMP0022 NEW) endif() +# Compiler id for Apple Clang is now AppleClang +if(POLICY CMP0025) + cmake_policy(SET CMP0025 NEW) +endif() + # Foo::Bar always refers to an IMPORTED target if(POLICY CMP0028) cmake_policy(SET CMP0028 NEW)