diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-11-28 10:50:33 -0800 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-11-28 10:50:33 -0800 |
| commit | 8ba327914306a1545c039c0c1b55b962adeeebfb (patch) | |
| tree | 916513423a1cf64c38c8c7b05213e76f12c95f4b /toolsrc | |
| parent | b9b4ae8641f44296a8f0c3f64366901123d134f2 (diff) | |
| download | vcpkg-8ba327914306a1545c039c0c1b55b962adeeebfb.tar.gz vcpkg-8ba327914306a1545c039c0c1b55b962adeeebfb.zip | |
[vcpkg] Use c++experimental in clang
Diffstat (limited to 'toolsrc')
| -rw-r--r-- | toolsrc/CMakeLists.txt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt index af281f12f..0325160ee 100644 --- a/toolsrc/CMakeLists.txt +++ b/toolsrc/CMakeLists.txt @@ -1,14 +1,19 @@ cmake_minimum_required(VERSION 3.3)
project(vcpkg CXX)
-add_compile_options(-std=c++1z)
-
file(GLOB_RECURSE VCPKGLIB_SOURCES src/vcpkg/*.cpp)
add_library(vcpkglib STATIC ${VCPKGLIB_SOURCES})
target_compile_definitions(vcpkglib PRIVATE -DDISABLE_METRICS=0)
target_include_directories(vcpkglib PUBLIC include)
-target_link_libraries(vcpkglib PRIVATE stdc++fs)
+
+if(CMAKE_COMPILER_IS_GNUXX)
+ target_link_libraries(vcpkglib PRIVATE stdc++fs)
+ target_compile_options(vcpkglib PRIVATE -std=c++1z)
+elseif(CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
+ target_link_libraries(vcpkglib PRIVATE c++experimental)
+ target_compile_options(vcpkglib PRIVATE -std=c++1z)
+endif()
add_executable(vcpkg src/vcpkg.cpp)
target_link_libraries(vcpkg PRIVATE vcpkglib)
|
