From 3e68ef81c098370b9468f229fe340a8251a8be09 Mon Sep 17 00:00:00 2001 From: Nikolaus Demmel Date: Thu, 26 Dec 2019 21:43:43 +0100 Subject: [PATCH] cmake: fix macos workaround for cmake 3.16 --- CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 82bdf73..56839e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,14 +125,15 @@ if(APPLE) if(CMAKE_SYSTEM_VERSION VERSION_LESS 19.0.0) # use brewed llvm's libc++ - # Note: the suffix "/../v1" for the include path is needed to work around a recent cmake issue: - # https://gitlab.kitware.com/cmake/cmake/issues/19251#note_571030 - include_directories("/usr/local/opt/llvm/include/c++/v1/../v1") + include_directories("/usr/local/opt/llvm/include/c++/v1") link_directories("/usr/local/opt/llvm/lib") add_compile_options("-nostdinc++") set(STD_CXX_FS c++fs) - endif() + # Workaround for cmake not to filter the manually added standard include path + # See: https://gitlab.kitware.com/cmake/cmake/issues/19227#note_669894 + list(REMOVE_ITEM CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/usr/local/opt/llvm/include/c++/v1") + endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") message(STATUS "Detected macOS with non-Apple clang")