]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
chore: Bump required compiler versions
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 3 Feb 2026 19:26:45 +0000 (20:26 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 3 Feb 2026 19:26:45 +0000 (20:26 +0100)
.github/workflows/build.yaml
CMakeLists.txt
cmake/StandardSettings.cmake
cmake/StdFilesystem.cmake [deleted file]

index 0662ccbbb95afd17d90f86515d266cafef932657..4be4b2dfae5f5f3e436f149c44f76ebd594940c2 100644 (file)
@@ -102,13 +102,6 @@ jobs:
               # The -multilib packages are only available on x86.
               sudo apt-get install -y g++-${{ matrix.version }}-multilib
             fi
-            if [ "${{ matrix.version }}" = 8 ]; then
-              # The compilation test in StdFilesystem.cmake doesn't work when
-              # GCC 9 is installed as well, so need to force linking with
-              # libstdc++fs for GCC 8. Note: This requires using -fuse-ld=lld to
-              # work.
-              echo "LDFLAGS=-lstdc++fs" >> $GITHUB_ENV
-            fi
           else
             echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV
             echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV
index 9f934fc0de9edb6e34840ee69f46c73ad23728dc..470d4eb07d754306581b069fcdce9d74385d047a 100644 (file)
@@ -26,27 +26,15 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
 # C++ error messages)
 #
 
-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 5)
-   OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0))
+if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7)
+   OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10)
+   OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10))
   message(
     FATAL_ERROR
     "The compiler you are using is too old, sorry.\n"
     "You need one listed here: https://ccache.dev/platform-compiler-language-support.html")
 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 6))
-  message(
-    WARNING
-    "The compiler you are using is rather old.\n"
-    "If anything goes wrong you might be better off with one listed here:"
-    " https://ccache.dev/platform-compiler-language-support.html")
-
-  # Warnings from old compilers are probably useless anyway.
-  option(WARNINGS_AS_ERRORS "Treat compiler warnings as errors" FALSE)
-endif()
-
 #
 # Settings
 #
index f82e2320c6208b9a220063fe75d893c68142e76f..430c237d674d70b9b35a2b8efaa4cc9783f3cd80 100644 (file)
@@ -58,7 +58,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "^GNU|(Apple)?Clang$" AND NOT MSVC)
   endforeach()
 
   include(StdAtomic)
-  include(StdFilesystem)
 elseif(MSVC AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
   target_compile_options(standard_settings INTERFACE
       /Zc:__cplusplus
diff --git a/cmake/StdFilesystem.cmake b/cmake/StdFilesystem.cmake
deleted file mode 100644 (file)
index ca451ce..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# Check if std::filesystem needs -lstdc++fs
-
-include(CheckCXXSourceCompiles)
-
-set(
-  check_std_filesystem_source_code
-  [=[
-    #include <filesystem>
-    int main(void)
-    {
-      return std::filesystem::is_regular_file(\"/\") ? 0 : 1;
-    }
-  ]=])
-
-check_cxx_source_compiles("${check_std_filesystem_source_code}" std_filesystem_without_libfs)
-
-if(NOT std_filesystem_without_libfs)
-  set(CMAKE_REQUIRED_LIBRARIES stdc++fs)
-  check_cxx_source_compiles("${check_std_filesystem_source_code}" std_filesystem_with_libfs)
-  set(CMAKE_REQUIRED_LIBRARIES)
-  if(NOT std_filesystem_with_libfs)
-    message(FATAL_ERROR "Toolchain doesn't support std::filesystem with nor without -lstdc++fs")
-  else()
-    target_link_libraries(standard_settings INTERFACE stdc++fs)
-  endif()
-endif()