Update FindFilesystem, re-enable support for CMake 3.10.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
Also re-enable tests on Ubuntu bionic with GCC 7 and clang 6.
This commit is contained in:
parent
1af807e588
commit
bede02659d
58
.drone.yml
58
.drone.yml
|
@ -78,35 +78,35 @@ steps:
|
|||
- name: debian-package-cache
|
||||
path: /var/cache/apt/archives
|
||||
|
||||
# - name: GCC 7 / clang 6
|
||||
# image: ubuntu:bionic
|
||||
# pull: always
|
||||
# environment:
|
||||
# CXX: g++-7
|
||||
# CXXFLAGS: -pipe -O2
|
||||
# DEBIAN_FRONTEND: noninteractive
|
||||
# LANG: C.utf8
|
||||
# nlohmann_json_DIR: "/usr/lib/cmake"
|
||||
# commands:
|
||||
# - rm /etc/apt/apt.conf.d/docker-clean
|
||||
# - alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get'
|
||||
# - apt-get update -q
|
||||
# - apt-get install -qq build-essential cmake clang pkg-config
|
||||
# - apt-get install -qq catch libcgicc-dev nlohmann-json-dev libgit2-dev libcurl4-openssl-dev
|
||||
# - rm -rf build && mkdir -p build && cd build
|
||||
# - cmake -G "Unix Makefiles" -DWITH_TESTS=YES ..
|
||||
# - make VERBOSE=1
|
||||
# - make install DESTDIR=install
|
||||
# - cd tests && ctest -V
|
||||
# - cd ../../
|
||||
# - rm -rf build && mkdir -p build && cd build
|
||||
# - CXX="clang++" cmake -G "Unix Makefiles" -DWITH_TESTS=YES ..
|
||||
# - make VERBOSE=1
|
||||
# - make install DESTDIR=install
|
||||
# - cd tests && ctest -V
|
||||
# volumes:
|
||||
# - name: debian-package-cache
|
||||
# path: /var/cache/apt/archives
|
||||
- name: GCC 7 / clang 6
|
||||
image: ubuntu:bionic
|
||||
pull: always
|
||||
environment:
|
||||
CXX: g++-7
|
||||
CXXFLAGS: -pipe -O2
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
LANG: C.utf8
|
||||
nlohmann_json_DIR: "/usr/lib/cmake"
|
||||
commands:
|
||||
- rm /etc/apt/apt.conf.d/docker-clean
|
||||
- alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get'
|
||||
- apt-get update -q
|
||||
- apt-get install -qq build-essential cmake clang pkg-config
|
||||
- apt-get install -qq catch libcgicc-dev nlohmann-json-dev libgit2-dev libcurl4-openssl-dev
|
||||
- rm -rf build && mkdir -p build && cd build
|
||||
- cmake -G "Unix Makefiles" -DWITH_TESTS=YES ..
|
||||
- make VERBOSE=1
|
||||
- make install DESTDIR=install
|
||||
- cd tests && ctest -V
|
||||
- cd ../../
|
||||
- rm -rf build && mkdir -p build && cd build
|
||||
- CXX="clang++" cmake -G "Unix Makefiles" -DWITH_TESTS=YES ..
|
||||
- make VERBOSE=1
|
||||
- make install DESTDIR=install
|
||||
- cd tests && ctest -V
|
||||
volumes:
|
||||
- name: debian-package-cache
|
||||
path: /var/cache/apt/archives
|
||||
|
||||
- name: notify
|
||||
image: drillster/drone-email
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.11...3.16)
|
||||
cmake_minimum_required(VERSION 3.10...3.16)
|
||||
# Ranges are supported from 3.12, set policy to current for < 3.12.
|
||||
if(${CMAKE_VERSION} VERSION_LESS 3.12)
|
||||
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
|
||||
|
|
|
@ -68,12 +68,12 @@ Existing screenshots will not be overwritten.
|
|||
==== Dependencies
|
||||
|
||||
* Tested OS: Linux
|
||||
* C\++ compiler with C++17 support (tested: link:{uri-gcc}[GCC] 8/9/10,
|
||||
link:{uri-clang}[clang] 7/10)
|
||||
* link:{uri-cmake}[CMake] (at least: 3.9)
|
||||
* C\++ compiler with C++17 support (tested: link:{uri-gcc}[GCC] 7/8/9/10,
|
||||
link:{uri-clang}[clang] 6/7/10)
|
||||
* link:{uri-cmake}[CMake] (at least: 3.10)
|
||||
* link:{uri-cgicc}[cgicc] (tested: 3.2)
|
||||
* link:{uri-nlohmann-json}[nlohmann-json] (tested: 3.7 / 2.1)
|
||||
* link:{uri-libgit2}[libgit2] with SSH support (tested: 1.0 / 0.27)
|
||||
* link:{uri-libgit2}[libgit2] with SSH support (tested: 1.0 / 0.26)
|
||||
* link:{uri-libcurl}[libcurl] (at least: 7.56)
|
||||
* Optional
|
||||
** Tests: link:{uri-catch}[Catch] (tested: 2.5 / 1.10)
|
||||
|
|
|
@ -102,6 +102,8 @@ if(TARGET std::filesystem)
|
|||
return()
|
||||
endif()
|
||||
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
include(CMakePushCheckState)
|
||||
include(CheckIncludeFileCXX)
|
||||
include(CheckCXXSourceCompiles)
|
||||
|
@ -159,10 +161,12 @@ if(_CXX_FILESYSTEM_HAVE_HEADER)
|
|||
set(_have_fs TRUE)
|
||||
set(_fs_header filesystem)
|
||||
set(_fs_namespace std::filesystem)
|
||||
set(_is_experimental FALSE)
|
||||
elseif(_CXX_FILESYSTEM_HAVE_EXPERIMENTAL_HEADER)
|
||||
set(_have_fs TRUE)
|
||||
set(_fs_header experimental/filesystem)
|
||||
set(_fs_namespace std::experimental::filesystem)
|
||||
set(_is_experimental TRUE)
|
||||
else()
|
||||
set(_have_fs FALSE)
|
||||
endif()
|
||||
|
@ -170,6 +174,7 @@ endif()
|
|||
set(CXX_FILESYSTEM_HAVE_FS ${_have_fs} CACHE BOOL "TRUE if we have the C++ filesystem headers")
|
||||
set(CXX_FILESYSTEM_HEADER ${_fs_header} CACHE STRING "The header that should be included to obtain the filesystem APIs")
|
||||
set(CXX_FILESYSTEM_NAMESPACE ${_fs_namespace} CACHE STRING "The C++ namespace that contains the filesystem APIs")
|
||||
set(CXX_FILESYSTEM_IS_EXPERIMENTAL ${_is_experimental} CACHE BOOL "TRUE if the C++ filesystem library is the experimental version")
|
||||
|
||||
set(_found FALSE)
|
||||
|
||||
|
@ -205,15 +210,15 @@ if(CXX_FILESYSTEM_HAVE_FS)
|
|||
|
||||
if(can_link)
|
||||
add_library(std::filesystem INTERFACE IMPORTED)
|
||||
target_compile_features(std::filesystem INTERFACE cxx_std_17)
|
||||
set_property(TARGET std::filesystem APPEND PROPERTY INTERFACE_COMPILE_FEATURES cxx_std_17)
|
||||
set(_found TRUE)
|
||||
|
||||
if(CXX_FILESYSTEM_NO_LINK_NEEDED)
|
||||
# Nothing to add...
|
||||
elseif(CXX_FILESYSTEM_STDCPPFS_NEEDED)
|
||||
target_link_libraries(std::filesystem INTERFACE -lstdc++fs)
|
||||
set_property(TARGET std::filesystem APPEND PROPERTY INTERFACE_LINK_LIBRARIES -lstdc++fs)
|
||||
elseif(CXX_FILESYSTEM_CPPFS_NEEDED)
|
||||
target_link_libraries(std::filesystem INTERFACE -lc++fs)
|
||||
set_property(TARGET std::filesystem APPEND PROPERTY INTERFACE_LINK_LIBRARIES -lc++fs)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
|
Reference in New Issue