From 130ab851237629eb0f68b884a9ce2a7d1cb1f114 Mon Sep 17 00:00:00 2001 From: David Lecomber Date: Wed, 23 Oct 2024 20:37:34 +0100 Subject: [PATCH] Only select LLVM's libc++ for APPLE platforms. Linux distros do not include it. Fixes #969. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ff9550f9..b865ec0f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -234,7 +234,7 @@ elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") # If we have libc++, then try and use it include(CheckCXXCompilerFlag) check_cxx_compiler_flag(-stdlib=libc++ HAVE_LIBCPP) - if(HAVE_LIBCPP) + if(HAVE_LIBCPP AND APPLE) message("It appears that you're compiling with clang and that libc++ is available, so I'll use that") list(APPEND TGT_COMPILE_FLAGS -stdlib=libc++) set(BOOST_TOOLSET "clang")