fail-fast: false
matrix:
config:
- - os: ubuntu-18.04
- compiler: gcc
- version: "4.8" # results in 4.8.5
-
- os: ubuntu-18.04
compiler: gcc
version: "5"
fail-fast: false
matrix:
config:
- - name: Linux GCC debug + C++14 + in source + tracing
+ - name: Linux GCC debug + in source + tracing
os: ubuntu-18.04
CC: gcc
CXX: g++
ENABLE_CACHE_CLEANUP_TESTS: 1
BUILDDIR: .
CCACHE_LOC: .
- CMAKE_PARAMS: -DCMAKE_BUILD_TYPE=Debug -DENABLE_TRACING=1 -DCMAKE_CXX_STANDARD=14
+ CMAKE_PARAMS: -DCMAKE_BUILD_TYPE=Debug -DENABLE_TRACING=1
apt_get: elfutils libzstd-dev
- name: Linux GCC 32-bit
endif()
set(CMAKE_PROJECT_DESCRIPTION "a fast C/C++ compiler cache")
-if(NOT "${CMAKE_CXX_STANDARD}")
- set(CMAKE_CXX_STANDARD 11)
+if(MSVC)
+ set(CMAKE_CXX_STANDARD 17) # Need support for std::filesystem
+else()
+ set(CMAKE_CXX_STANDARD 14)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS NO)
#
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.8)
- OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8.4)
+ OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5)
OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0))
message(
FATAL_ERROR
endif()
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4)
- OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0))
+ OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6))
message(
WARNING
"The compiler you are using is rather old.\n"
-q
--enable=all
--force
- --std=c++11
+ --std=c++14
-I ${CMAKE_SOURCE_DIR}
--template="cppcheck: warning: {id}:{file}:{line}: {message}"
-i src/third_party)
CCACHE_COMPILER_WARNINGS "-Wno-zero-as-null-pointer-constant")
add_compile_flag_if_supported(
CCACHE_COMPILER_WARNINGS "-Wno-undefined-func-template")
- add_compile_flag_if_supported(
- CCACHE_COMPILER_WARNINGS "-Wno-return-std-move-in-c++11")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
list(
APPEND
target_compile_options(
standard_settings
- INTERFACE /std:c++latest /Zc:preprocessor /Zc:__cplusplus /D_CRT_SECURE_NO_WARNINGS
+ INTERFACE /Zc:preprocessor /Zc:__cplusplus /D_CRT_SECURE_NO_WARNINGS
)
endif()
To build ccache you need:
- CMake 3.4.3 or newer.
-- A C++11 compiler. See [Supported platforms, compilers and
+- A C++14 compiler. See [Supported platforms, compilers and
languages](https://ccache.dev/platform-compiler-language-support.html) for
details.
- A C99 compiler.
FROM centos:7
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
+ && yum install -y centos-release-scl \
&& yum install -y \
asciidoc \
autoconf \
ccache \
clang \
cmake3 \
+ devtoolset-8 \
elfutils \
gcc \
gcc-c++ \
&& yum clean all \
&& cp /usr/bin/cmake3 /usr/bin/cmake \
&& cp /usr/bin/ctest3 /usr/bin/ctest
+
+ENTRYPOINT ["scl", "enable", "devtoolset-8", "--"]
build debian-10 gcc g++ gcc
build debian-10 clang clang++ clang
-build ubuntu-14.04 gcc g++ gcc -DZSTD_FROM_INTERNET=ON
-build ubuntu-14.04 gcc g++ clang -DZSTD_FROM_INTERNET=ON
-
build ubuntu-16.04 gcc g++ gcc
build ubuntu-16.04 gcc g++ clang
-// Copyright (C) 2020 Joel Rosdahl and other contributors
+// Copyright (C) 2020-2021 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
} while (false)
// Log a message (plus a newline character) described by a format string with at
-// least one placeholder. `format` is compile-time checked if CMAKE_CXX_STANDARD
-// >= 14.
+// least one placeholder. `format` is checked at compile time.
#define LOG(format_, ...) LOG_RAW(fmt::format(FMT_STRING(format_), __VA_ARGS__))
// Log a message (plus a newline character) described by a format string with at
// least one placeholder without flushing and with a reused timestamp. `format`
-// is compile-time checked if CMAKE_CXX_STANDARD >= 14.
+// is checked at compile time.
#define BULK_LOG(format_, ...) \
do { \
if (Logging::enabled()) { \