From: Joel Rosdahl Date: Sun, 13 Oct 2019 14:44:30 +0000 (+0200) Subject: Use #include "third_party/..." consistently to include third party code X-Git-Tag: v4.0~736 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3578d20a95c2f7612da4ef84f0e8b6b8847914aa;p=thirdparty%2Fccache.git Use #include "third_party/..." consistently to include third party code --- diff --git a/Makefile.in b/Makefile.in index 360a894a8..225396dd0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -22,7 +22,7 @@ LIBS = @LIBS@ all_cflags = $(CFLAGS) all_cxxflags = $(CXXFLAGS) -all_cppflags = @DEFS@ -DSYSCONFDIR=$(sysconfdir) -I. -I$(srcdir)/src -I$(srcdir)/src/third_party -I$(builddir)/unittest $(CPPFLAGS) +all_cppflags = @DEFS@ -DSYSCONFDIR=$(sysconfdir) -I. -I$(srcdir)/src -I$(builddir)/unittest $(CPPFLAGS) extra_libs = @extra_libs@ v_at_0 = yes diff --git a/src/AtomicFile.cpp b/src/AtomicFile.cpp index ab63e0b2a..6661c022d 100644 --- a/src/AtomicFile.cpp +++ b/src/AtomicFile.cpp @@ -22,9 +22,10 @@ #include "Util.hpp" #include "ccache.hpp" +#include "third_party/fmt/core.h" + #include #include -#include #include AtomicFile::AtomicFile(const std::string& path, Mode mode) : m_path(path) diff --git a/src/CacheEntryReader.cpp b/src/CacheEntryReader.cpp index 59da8562c..2670ed13c 100644 --- a/src/CacheEntryReader.cpp +++ b/src/CacheEntryReader.cpp @@ -22,7 +22,7 @@ #include "Error.hpp" #include "ccache.hpp" -#include +#include "third_party/fmt/core.h" CacheEntryReader::CacheEntryReader(FILE* stream, const uint8_t expected_magic[4], diff --git a/src/CacheFile.hpp b/src/CacheFile.hpp index 04d4ba3ba..bcf8bf2c6 100644 --- a/src/CacheFile.hpp +++ b/src/CacheFile.hpp @@ -20,9 +20,10 @@ #include "Error.hpp" +#include "third_party/fmt/core.h" + #include #include -#include #include #include #include diff --git a/src/Checksum.hpp b/src/Checksum.hpp index adc0b0bad..7ffee2c8a 100644 --- a/src/Checksum.hpp +++ b/src/Checksum.hpp @@ -20,7 +20,7 @@ #include "system.hpp" -#include +#include "third_party/xxhash.h" class Checksum { diff --git a/src/Config.hpp b/src/Config.hpp index a05ba4f0b..bf8dbfaa4 100644 --- a/src/Config.hpp +++ b/src/Config.hpp @@ -22,7 +22,8 @@ #include "ccache.hpp" -#include +#include "third_party/fmt/core.h" + #include #include #include diff --git a/src/ProgressBar.cpp b/src/ProgressBar.cpp index df430529c..55db6a6bb 100644 --- a/src/ProgressBar.cpp +++ b/src/ProgressBar.cpp @@ -18,8 +18,9 @@ #include "ProgressBar.hpp" +#include "third_party/fmt/core.h" + #include -#include #include #ifdef _WIN32 diff --git a/src/ccache.cpp b/src/ccache.cpp index fc60c5e8e..7b27aa5f1 100644 --- a/src/ccache.cpp +++ b/src/ccache.cpp @@ -24,15 +24,6 @@ #include "Util.hpp" #include "cleanup.hpp" #include "compopt.hpp" - -#include -#include - -#ifdef HAVE_GETOPT_LONG -# include -#else -# include "third_party/getopt_long.h" -#endif #include "compress.hpp" #include "hash.hpp" #include "hashutil.hpp" @@ -41,7 +32,16 @@ #include "result.hpp" #include "unify.hpp" +#include "third_party/fmt/core.h" + +#ifdef HAVE_GETOPT_LONG +# include +#else +# include "third_party/getopt_long.h" +#endif + #include +#include // Global variables used by other compilation units. extern char* primary_config_path; diff --git a/src/compress.cpp b/src/compress.cpp index 5704d3e86..240d7ed98 100644 --- a/src/compress.cpp +++ b/src/compress.cpp @@ -28,7 +28,8 @@ #include "manifest.hpp" #include "result.hpp" -#include +#include "third_party/fmt/core.h" + #include #include diff --git a/src/legacy_util.cpp b/src/legacy_util.cpp index 1c5171c50..37874cde8 100644 --- a/src/legacy_util.cpp +++ b/src/legacy_util.cpp @@ -22,7 +22,8 @@ #include "Util.hpp" #include "ccache.hpp" -#include +#include "third_party/fmt/core.h" + #include #ifdef HAVE_PWD_H diff --git a/unittest/catch2_tests.cpp b/unittest/catch2_tests.cpp index 9d3b33646..e6743edb3 100644 --- a/unittest/catch2_tests.cpp +++ b/unittest/catch2_tests.cpp @@ -19,7 +19,7 @@ #include "catch2_tests.hpp" #define CATCH_CONFIG_RUNNER -#include +#include "third_party/catch.hpp" int run_catch2_tests(int argc, char** argv) diff --git a/unittest/test_AtomicFile.cpp b/unittest/test_AtomicFile.cpp index a45f2f3be..3e07e1955 100644 --- a/unittest/test_AtomicFile.cpp +++ b/unittest/test_AtomicFile.cpp @@ -19,7 +19,7 @@ #include "../src/AtomicFile.hpp" #include "../src/Util.hpp" -#include +#include "third_party/catch.hpp" using Catch::Equals; diff --git a/unittest/test_Checksum.cpp b/unittest/test_Checksum.cpp index 0c5359367..9b107de41 100644 --- a/unittest/test_Checksum.cpp +++ b/unittest/test_Checksum.cpp @@ -18,7 +18,7 @@ #include "../src/Checksum.hpp" -#include +#include "third_party/catch.hpp" TEST_CASE("Checksums") { diff --git a/unittest/test_Compression.cpp b/unittest/test_Compression.cpp index 97c2b0514..e2ccf7085 100644 --- a/unittest/test_Compression.cpp +++ b/unittest/test_Compression.cpp @@ -18,7 +18,7 @@ #include "../src/Compression.hpp" -#include +#include "third_party/catch.hpp" using Catch::Equals; diff --git a/unittest/test_Config.cpp b/unittest/test_Config.cpp index f32ceabd6..a956899f6 100644 --- a/unittest/test_Config.cpp +++ b/unittest/test_Config.cpp @@ -21,8 +21,9 @@ #include "../src/Util.hpp" #include "../src/ccache.hpp" -#include -#include +#include "third_party/catch.hpp" +#include "third_party/fmt/core.h" + #include #include #include diff --git a/unittest/test_NullCompression.cpp b/unittest/test_NullCompression.cpp index 43e0c1986..0d767545a 100644 --- a/unittest/test_NullCompression.cpp +++ b/unittest/test_NullCompression.cpp @@ -21,7 +21,7 @@ #include "../src/Decompressor.hpp" #include "../src/File.hpp" -#include +#include "third_party/catch.hpp" using Catch::Equals; diff --git a/unittest/test_Util.cpp b/unittest/test_Util.cpp index 9d55a826b..eaec54f34 100644 --- a/unittest/test_Util.cpp +++ b/unittest/test_Util.cpp @@ -18,7 +18,7 @@ #include "../src/Util.hpp" -#include +#include "third_party/catch.hpp" using Catch::Equals; diff --git a/unittest/test_ZstdCompression.cpp b/unittest/test_ZstdCompression.cpp index d9973d92f..b978b5f88 100644 --- a/unittest/test_ZstdCompression.cpp +++ b/unittest/test_ZstdCompression.cpp @@ -21,7 +21,7 @@ #include "../src/Decompressor.hpp" #include "../src/File.hpp" -#include +#include "third_party/catch.hpp" using Catch::Equals;