From 59acf756f5cd895c77378f0039bc279f78a293b7 Mon Sep 17 00:00:00 2001 From: Juan Fumero Date: Thu, 19 Sep 2024 10:06:03 +0200 Subject: [PATCH] [fix] Build for OSx 14.5 and CLANG 16 --- tornado-drivers/opencl-jni/src/main/cpp/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tornado-drivers/opencl-jni/src/main/cpp/CMakeLists.txt b/tornado-drivers/opencl-jni/src/main/cpp/CMakeLists.txt index cd98620790..e759feb201 100644 --- a/tornado-drivers/opencl-jni/src/main/cpp/CMakeLists.txt +++ b/tornado-drivers/opencl-jni/src/main/cpp/CMakeLists.txt @@ -43,6 +43,11 @@ if(MSVC) string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}") endif() +elseif(APPLE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") + add_definitions(${CMAKE_CXX_FLAGS}) else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")