From ff4fc05b185933fdee5e645d7dc3502fdea30525 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Tue, 21 Dec 2021 22:59:23 -0600 Subject: [PATCH] Stop configuration when GCC is detected on macOS --- cmake/Macros.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake index 286103ef..095d45c5 100644 --- a/cmake/Macros.cmake +++ b/cmake/Macros.cmake @@ -23,9 +23,11 @@ function(sfml_set_stdlib target) if (SFML_OS_MACOSX) if (${CMAKE_GENERATOR} MATCHES "Xcode") sfml_set_xcode_property(${target} CLANG_CXX_LIBRARY "libc++") - else() + elseif(SFML_COMPILER_CLANG) target_compile_options(${target} PRIVATE "-stdlib=libc++") target_link_libraries(${target} PRIVATE "-stdlib=libc++") + else() + message(FATAL_ERROR "Clang is the only supported compiler on macOS") endif() endif() endfunction()