From 01a7f62650856feae0dfcabb2132706c4380044a Mon Sep 17 00:00:00 2001 From: foxtran <39676482+foxtran@users.noreply.github.com> Date: Fri, 20 Dec 2024 11:39:49 +0100 Subject: [PATCH 1/2] Enable -fexperimental-library only for AppleClang --- cmake/config.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/config.cmake b/cmake/config.cmake index e976ad62..510a8774 100644 --- a/cmake/config.cmake +++ b/cmake/config.cmake @@ -23,7 +23,9 @@ else() endif() if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") - add_compile_options(-fexperimental-library) + if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + add_compile_options(-fexperimental-library) + endif() endif() if(WIN32) @@ -51,4 +53,4 @@ endif() file(GENERATE OUTPUT .gitignore CONTENT "*") -set(CMAKE_COLOR_DIAGNOSTICS ON) \ No newline at end of file +set(CMAKE_COLOR_DIAGNOSTICS ON) From 07d38d608e10c805d8397548e5401b79d0d0fe46 Mon Sep 17 00:00:00 2001 From: foxtran <39676482+foxtran@users.noreply.github.com> Date: Fri, 20 Dec 2024 11:55:18 +0100 Subject: [PATCH 2/2] Enable -fexperimental-library only for C++ --- cmake/config.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/config.cmake b/cmake/config.cmake index 510a8774..00cb12af 100644 --- a/cmake/config.cmake +++ b/cmake/config.cmake @@ -24,7 +24,7 @@ endif() if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") - add_compile_options(-fexperimental-library) + add_compile_options($<$:-fexperimental-library>) endif() endif()