| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before it was possible to force downloading of the Zstandard library
using "-D ZSTD_FROM_INTERNET=ON" and similar for Hiredis. That ability
was lost in 2c742c2c7ca9, so if you for some reason want to not use a
locally installed library you're out of luck.
Improve this by letting ZSTD_FROM_INTERNET and HIREDIS_FROM_INTERNET be
tristate variables:
ON: Always download
AUTO (default): Download if local installation not found
OFF: Never download
As mentioned in #1240.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a feature request to be able not to use a local cache at all,
only a network cache. With such a feature, the names "primary storage"
and "secondary storage" make less sense since ccache would be operating
in "secondary only" mode, but then that storage would of course become
the primary (and only).
Let's rename "primary storage" to "local storage" and "secondary
storage" to "remote storage" – operating in "remote only" mode then
makes sense.
One of the original motivations to call networked storage "secondary" is
that the file storage can be used for local file systems as well, making
such storage "not quite remote", but in practice I guess the file
storage backend used primarily for network file systems.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Change the behavior of ZSTD_FROM_INTERNET and HIREDIS_FROM_INTERNET to
always be on and only come into affect when the package is not found on
the system by normal means.
Also use the cmake standard module FetchContent for the
download/checksum/unpack logic.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
|
| |
|
|
|
|
|
|
| |
This reverts commit 077e2a6c279755f6521ab78f4a1a049ae6a93990.
Not needed yet.
|
| |
|
|
|
|
| |
CMP0091 defaults to NEW with cmake_minimum_required 3.15 and later.
|
|
|
|
|
|
|
|
| |
A C++17-compatible compiler is now readily available on all systems we
target primarily, so it's time to bump to C++17.
Also, we want to use features in CMake 3.15 (see #1069), so bump that
too.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
When enabling ccache using the standard recommended method (via PATH or
via masquerading symlinks), UseCcache.cmake will introduce double
invocations of ccache. I find this a bit annoying and I also think that
it should be up to the user to enable or not enable ccache and which
settings to use.
|
|
|
|
|
|
| |
On mingw IPO seems to be broken (out-of-diskspace errors
and lacking linker module support), therefore IPO support is being
deactivated.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Using Gold or LLD on less common platforms such as MIPS may not be a
good idea (see e.g.
<https://www.sourceware.org/bugzilla/show_bug.cgi?id=22838>), so be
conservative and only probe for a faster linker on platforms that likely
don’t have toolchain bugs. Also, using a faster linker is in practice
only relevant for dev builds.
Fixes #907.
|
| |
|
|
|
|
|
|
|
| |
This means that libthird_party_lib.a will become libthird_party.a which
removes repetition of “lib”. ccache_lib can’t be renamed to just ccache
since that’s the name of the main binary, so that’s renamed to
ccache_framework.
|
| |
|
| |
|
|
|
|
| |
This is the next step after a57f70eda32e99221de56f5499079b4f00dc2bc5.
|
|
|
| |
Fixes #884.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When enabling CMake policy
<https://cmake.org/cmake/help/latest/policy/CMP0067.html> by either enabling it
directly or via a `cmake_minimum_required` of `3.8` or later, the
`test.inode_cache` test starts to fail.
This happens because this policy slightly changes the `CheckCSourceCompiles`
logic by passing-in any configured C-standard. The detection of the following
features now report absence:
--- CMakeCache-old.txt 2021-07-05 15:50:25.698278961 +0200
+++ CMakeCache-new.txt 2021-07-05 15:50:54.626397301 +0200
@@ -657,7 +657,7 @@
//Have function pthread_mutexattr_setpshared
HAVE_PTHREAD_MUTEXATTR_SETPSHARED:INTERNAL=1
//Test HAVE_PTHREAD_MUTEX_ROBUST
-HAVE_PTHREAD_MUTEX_ROBUST:INTERNAL=1
+HAVE_PTHREAD_MUTEX_ROBUST:INTERNAL=
//Have include pwd.h
HAVE_PWD_H:INTERNAL=1
//Have function realpath
@@ -675,9 +675,9 @@
//Test HAVE_STRUCT_STATFS_F_FSTYPENAME
HAVE_STRUCT_STATFS_F_FSTYPENAME:INTERNAL=
//Test HAVE_STRUCT_STAT_ST_CTIM
-HAVE_STRUCT_STAT_ST_CTIM:INTERNAL=1
+HAVE_STRUCT_STAT_ST_CTIM:INTERNAL=
//Test HAVE_STRUCT_STAT_ST_MTIM
-HAVE_STRUCT_STAT_ST_MTIM:INTERNAL=1
+HAVE_STRUCT_STAT_ST_MTIM:INTERNAL=
//Have function syslog
HAVE_SYSLOG:INTERNAL=1
//Have include syslog.h
In case of `HAVE_PTHREAD_MUTEX_ROBUST` the now passed-in `-std=c99` does not
enable the required `__USE_XOPEN2K` extension:
#ifdef __USE_XOPEN2K
/* Robust mutex or not flags. */
enum
{
PTHREAD_MUTEX_STALLED,
PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
PTHREAD_MUTEX_ROBUST,
PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
};
#endif
To remedy the situation CMake now checks for those features within a C++
language context. In C++ those features seem to be available without enabling
any extra extensions.
It also makes the check more precise because all of the consumers are C++ (and
not C) compilation units.
|
|
|
|
|
|
|
|
|
|
| |
Ccache 4.0 introduced a requirement on a C++11-compatible compiler. The
language version was primarily chosen to support CentOS 7.
The time has now come to bump to C++14, to among other things get access
to generic lambda expressions and improved constexpr functions. Another
side effect is to get usable support for std::regex due to requiring a
newer GCC than 4.8 which lacks such support.
|
|
|
|
| |
It no longer works.
|
|
|
|
|
|
|
|
| |
So we don't need to support corner cases as for example one fixed in
commit f6202db308e3 ("doc/MANUAL.adoc: Don't use non-ASCII quotes
(#761)") when the documentation is actually not needed at all as ccache
is used as a build tool only.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
misc/format-files now executes misc/clang-format, which works like this:
1. If environment variable CLANG_FORMAT is set, execute $CLANG_FORMAT.
2. Otherwise, if <ccache-top-dir>/misc/.clang-format-exe exists, execute
that program.
3. Otherwise, download a statically linked clang-format executable,
verify its integrity, place it in
<ccache-top-dir>/misc/.clang-format-exe and execute it.
This makes it possible for us to lock Clang-Format to version 10 and
remove most “// clang-format off/on” comments.
|
|
|
|
|
|
|
|
| |
As noted by Nicholas Hutchinson in #794, the availability of a linker
program is not enough to conclude that it works for some older compilers
and platforms like macOS and Windows.
Improve this by probing if it works to pass “-fuse-ld=$LINKER”.
|
|
|
|
| |
The inode cache requires pthread_mutexattr_setpshared() and build fails on OSes
with sys/mman.h that do not have this function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Build the blake3 asm files to determine if they are supported
Building the files doesn't take long and gives a better result than just
checking that the assembler accepts a flag.
See also #768.
* Remove no longer used cmake function
* Update BLAKE3 to 3a8204f5f (0.3.7 + minor fixes) and include all MSVC asm files
* Try to improve blake3 on MSVC by using asm version
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In version 3.x, ccache was in “user mode” when building from release
archive sources and “dev mode” otherwise. In “dev mode”, additional
compiler flags like “-Wextra -Wpedantic -Werror” were added, but they
were not present in “user mode” in order not to break end users’ builds.
This behavior was partially lost in the conversion to CMake.
This commit tries to imitate the previous behavior by introducing a
CCACHE_DEV_MODE CMake variable and only enable potentially problematic
compiler flags when it’s set to ON.
Related to #730.
|
|
|
|
|
|
|
| |
The release contains only the executable without the dll dependencies.
It is easier to deploy a single self-contained executable anyway.
Fixes #729.
|
|
|
|
| |
There is no reason to enable it by default. Looks like it was done for
enabling it to run with wine.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fmtlib can detect format string errors at compile time if (1) applying
FMT_STRING to the format string literal and (2) compiling for C++14 or
higher.
Requirement 1 is implemented by introducing a LOG macro which applies
FMT_STRING to the first argument and calls Logging::log (if logging is
enabled). Also added are a companion LOG_RAW macro (since C++11 requires
at least one argument for the “...” part in variadic macros) and a
BULK_LOG macro which calls Logging::bulk_log (if logging is enabled).
Requirement 2 is implemented by setting CMAKE_CXX_STANDARD to 14 for one
CI build with a known C++14-capable compiler. We can’t set it to 14 by
default since we still want the code to be buildable with C++11
compilers.
This will catch errors such as the one fixed by PR #691.
|
| |
|
| |
|
|
|
|
| |
NOTICE is apparently new for CMake 3.15.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With these changes, the project builds with Visual Studio 2019, unit
tests pass and it works correctly with mingw gcc.
NOTE: The very latest version of Visual Studio 2019 is required, because
there was just a necessary fix for template arguments.
Tested building and running unit tests on Windows+MSVC, Windows+MinGW,
Linux and macOS.
- Enable `ZSTD_FROM_INTERNET` by default for MSVC when not using vcpkg
or conan.
- Add include tests for some standard UNIX headers not available on
MSVC.
- Add necessary MSVC compiler flags.
- In `Args::from_gcc_atfile()` iterate over the string via `c_str()`
instead of `cbegin()`, the MSVC string character iterator does not
include the ending null byte.
- Misc. minor cmake fix-ups.
- Add some headers that are not implicitly included from other headers
like `<algorithm>`, `<ios>`, `<cstdint>` and `<cstdarg>` in some
places, gcc does this but MSVC does not.
- Add `std::filesystem` version of `Util::traverse()` when dirent.h is
not available, which is preferred for performance reasons.
- Add implementations of the following functions that are not available
in MSVC in Win32Util.cpp: `gettimeofday()`, `localtime_r()`,
`asprintf()`.
- Add Windows implementation of `getopt_long()` from
https://www.codeproject.com/Articles/157001/Full-getopt-Port-for-Unicode-and-Multibyte-Microso
to third_party/win32.
- Add some compatibility typedefs, constants and macros to the `_WIN32`
section of system.hpp, as well as the prototypes for the functions
added to Win32Util.cpp.
- Fix up unit tests expecting '/' separated paths to expect paths
delimited by `DIR_DELIM_CH`.
- Invoke test/run with bash from cmake, necessary on msys2+mingw64, many
fail, there is more work to do here.
- Set the warning level to `/W4` and silence all the uninteresting
warning types. Compiles with no warnings now.
- Switch to using standard C++ attributes `[[nodiscard]]` and
`[[maybe_unused]]` and define macros for gcc for their equivalents.
- `#define DOCTEST_CONFIG_USE_STD_HEADERS` for MSVC only, because it
requires explicitly including `<ostream>`.
- Add vim files to .gitignore.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
|
|
|
|
| |
CMake requires ASM to be the last parameter so it can try whether the C compiler can compile asm.
See https://gitlab.kitware.com/cmake/cmake/-/merge_requests/1560/diffs
|
| |
|
|
|
|
| |
It’s Ccache, not CCache.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Simplified names (e.g. ubuntu-14-trusty -> ubuntu-14.04,
debian-9-stretch -> debian-9).
- Enabled debian-9 in misc/test-all-systems since it works.
- Renamed centos to centos-7.
- Added centos-8 and fedora-32.
- Updated dockerfiles/README to match reality after the conversion to
CMake.
- Cleaned up Dockerfiles.
- Improved misc/test-all-systems.
- Removed unsupported Clang build for alpine-3.4, centos-7 and
ubuntu-14.04.
|
|
|
|
|
| |
- Simplified scripts.
- Made colored output work again.
|