diff options
| author | Joel Pelaez Jorge <joel.pelaez.jorge@gmail.com> | 2019-10-14 18:04:05 -0500 |
|---|---|---|
| committer | dan-shaw <51385773+dan-shaw@users.noreply.github.com> | 2019-10-14 16:04:05 -0700 |
| commit | db3e74fa9c683f2fdd7f0244cedc0fbf3f9478f6 (patch) | |
| tree | 3f1cf2cc03db89f51e4059ada127d9e47fcff9eb | |
| parent | 96e55fb3c2478c38e7f16ab6f50683629643e34a (diff) | |
| download | vcpkg-db3e74fa9c683f2fdd7f0244cedc0fbf3f9478f6.tar.gz vcpkg-db3e74fa9c683f2fdd7f0244cedc0fbf3f9478f6.zip | |
Fix CMake checks for Apple Clang 11.0 on macOS 10.15 (#8580)
* Fix CMake checks for Apple Clang 11.0 on macOS 10.15
* Use clang++ instance clang if allowAppleClang is enabled
| -rw-r--r-- | scripts/bootstrap.sh | 2 | ||||
| -rw-r--r-- | toolsrc/CMakeLists.txt | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index d89d5a15b..55859d1f8 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -244,7 +244,7 @@ else fi if [ "$os" = "osx" ]; then if [ "$vcpkgAllowAppleClang" = "true" ] ; then - CXX=clang + CXX=clang++ else selectCXX CXX || exit 1 fi diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt index 3ae7cdae5..bbecb8f30 100644 --- a/toolsrc/CMakeLists.txt +++ b/toolsrc/CMakeLists.txt @@ -23,7 +23,11 @@ endif() if(CMAKE_COMPILER_IS_GNUXX OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set(GCC 1)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
- if(NOT VCPKG_ALLOW_APPLE_CLANG)
+ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "11.0.0")
+ set(CLANG 1)
+ # Disable linking with libc++fs because this features are added in libc++ library
+ set(NO_LIBCXXFS 1)
+ elseif(NOT VCPKG_ALLOW_APPLE_CLANG)
message(FATAL_ERROR
"Building the vcpkg tool requires support for the C++ Filesystem TS.
Apple clang versions 10.01 and below do not have support for it.
@@ -58,7 +62,7 @@ endif() if(GCC OR (CLANG AND USES_LIBSTDCXX))
link_libraries(stdc++fs)
-elseif(CLANG AND NOT MSVC)
+elseif(CLANG AND NOT MSVC AND NOT NO_LIBCXXFS)
link_libraries(c++fs)
endif()
|
