From 7a68756b2b129648f0b689f2f3849a72b43bf5af Mon Sep 17 00:00:00 2001 From: fwcd Date: Sat, 6 Apr 2019 21:16:31 +0200 Subject: [PATCH] Add libc++ flag to top-level CMakeLists --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ab801da..d0d8c385 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,4 +2,10 @@ cmake_minimum_required(VERSION 3.13) project(calculator CXX) set(CMAKE_CXX_STANDARD 17) +if(CMAKE_CXX_COMPILER MATCHES ".*clang") + # Clang disagress with libstdc++ about constexpr-ness of wstring_view + # See https://github.com/Microsoft/calculator/pull/321 + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") +endif() + add_subdirectory(src)