diff --git a/.github/workflows/linux-codeql.yml b/.github/workflows/linux-codeql.yml index f8b5224..31b1d56 100644 --- a/.github/workflows/linux-codeql.yml +++ b/.github/workflows/linux-codeql.yml @@ -103,7 +103,7 @@ jobs: version: 17 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Dependencies run: | diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 101d3e1..cba225c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -103,7 +103,7 @@ jobs: version: 17 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Dependencies run: | @@ -164,12 +164,13 @@ jobs: - name: Archive Coverage if: matrix.compiler == 'clang' && matrix.config == 'Debug' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-linux path: | ${{runner.workspace}}/build/tests/coverage.${{matrix.compiler}}-${{matrix.version}}.txt ${{runner.workspace}}/build/tests/coverage.overview.${{matrix.compiler}}-${{matrix.version}}.txt + overwrite: true - name: Documentation working-directory: ${{runner.workspace}}/build diff --git a/.github/workflows/macos-codeql.yml b/.github/workflows/macos-codeql.yml index f57f111..813ecbe 100644 --- a/.github/workflows/macos-codeql.yml +++ b/.github/workflows/macos-codeql.yml @@ -47,7 +47,7 @@ jobs: architecture: arm64 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Dependencies run: | diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index adf0898..7ce0449 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -47,7 +47,7 @@ jobs: architecture: arm64 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Dependencies run: | @@ -84,12 +84,13 @@ jobs: # - name: Archive Coverage # if: matrix.config == 'Debug' && matrix.architecture != 'arm64' -# uses: actions/upload-artifact@v3 +# uses: actions/upload-artifact@v4 # with: # name: coverage-macos # path: | # ${{runner.workspace}}/build/tests/coverage.${{matrix.compiler}}-${{matrix.version}}.txt # ${{runner.workspace}}/build/tests/coverage.overview.${{matrix.compiler}}-${{matrix.version}}.txt +# overwrite: true - name: Documentation working-directory: ${{runner.workspace}}/build diff --git a/.github/workflows/windows-codeql.yml b/.github/workflows/windows-codeql.yml index d6b732e..280500b 100644 --- a/.github/workflows/windows-codeql.yml +++ b/.github/workflows/windows-codeql.yml @@ -67,14 +67,14 @@ jobs: architecture: x64 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ilammy/msvc-dev-cmd@v1 with: arch: ${{matrix.architecture}} - name: Cache Dependencies id: cache-choco - uses: actions/cache@v3 + uses: actions/cache@v4 env: cache-name: cache-choco-packages with: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index e31049d..58a8895 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -67,14 +67,14 @@ jobs: architecture: x64 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ilammy/msvc-dev-cmd@v1 with: arch: ${{matrix.architecture}} - name: Cache Dependencies id: cache-choco - uses: actions/cache@v3 + uses: actions/cache@v4 env: cache-name: cache-choco-packages with: diff --git a/CMakeLists.txt b/CMakeLists.txt index d7a8d24..b98b665 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -cmake_minimum_required(VERSION 3.18...3.27) +cmake_minimum_required(VERSION 3.18...3.28) include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/policy.cmake) update_policy() diff --git a/cmake/env.cmake b/cmake/env.cmake index 6bf81a5..76eac56 100644 --- a/cmake/env.cmake +++ b/cmake/env.cmake @@ -32,8 +32,8 @@ option(CMAKE_VERBOSE_MAKEFILE "Show the complete build commands" OFF) # possibility to disable build steps -option(CORE_BUILD_EXAMPLES "Build examples for modern.cpp.core" ON) -option(CORE_BUILD_TESTS "Build tests for modern.cpp.core" ON) +option(CORE_BUILD_EXAMPLES "Build examples" ON) +option(CORE_BUILD_TESTS "Build tests" ON) # General set(CMAKE_TLS_VERIFY TRUE) @@ -53,7 +53,8 @@ include(CheckCCompilerFlag) if(CMAKE_C_COMPILER_ID STREQUAL "MSVC" OR CMAKE_C_SIMULATE_ID STREQUAL "MSVC") check_c_compiler_flag(/std:c23 HAVE_FLAG_STD_C23) check_c_compiler_flag(/std:c17 HAVE_FLAG_STD_C17) - if(CMAKE_C_COMPILER_ID MATCHES Clang) + # Visual Studio 2019 will have clang-12, Visual Studio will have clang-15, but cmake do not know how to set the standard for that. + if(CMAKE_C_COMPILER_ID MATCHES Clang AND CMAKE_C_COMPILER_VERSION VERSION_LESS 16.0) set(HAVE_FLAG_STD_C23 OFF) endif() else() @@ -75,8 +76,10 @@ set(CMAKE_C_EXTENSIONS OFF) include(CheckCXXCompilerFlag) if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC") check_cxx_compiler_flag(/std:c++23 HAVE_FLAG_STD_CXX23) + # An issue with visual studio 2019 with fetch project and same settings, so check early check_cxx_compiler_flag(/std:c++20 HAVE_FLAG_STD_CXX20) - if(CMAKE_CXX_COMPILER_ID MATCHES Clang) + # Visual Studio 2019 will have clang-12, but cmake do not know how to set the standard for that. + if(CMAKE_CXX_COMPILER_ID MATCHES Clang AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.0) set(HAVE_FLAG_STD_CXX23 OFF) endif() else() @@ -113,7 +116,7 @@ if(CORE_MASTER_PROJECT AND CMAKE_BUILD_TYPE STREQUAL Release) endif() endif() -# Compiler configuration +# Warning flags include(${CMAKE}/clang_warnings.cmake) include(${CMAKE}/gcc_warnings.cmake) include(${CMAKE}/msvc_warnings.cmake) diff --git a/cmake/external/fmt.cmake b/cmake/external/fmt.cmake index 1b0a2ca..04fb38d 100644 --- a/cmake/external/fmt.cmake +++ b/cmake/external/fmt.cmake @@ -54,7 +54,7 @@ set(FMT_INCLUDE_DIR ${FMT_INSTALL}/include) ExternalProject_Add(fmt PREFIX ${FMT_SRC} GIT_REPOSITORY https://github.com/fmtlib/fmt.git - GIT_TAG 10.1.1 + GIT_TAG 10.2.1 GIT_SHALLOW 1 CMAKE_ARGS -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} diff --git a/cmake/external/ranges.cmake b/cmake/external/ranges.cmake index 9066039..ba999f1 100644 --- a/cmake/external/ranges.cmake +++ b/cmake/external/ranges.cmake @@ -124,6 +124,7 @@ namespace std { namespace ranges { using ::ranges::all_of\; + using ::ranges::count\; using ::ranges::distance\; using ::ranges::find_if\; using ::ranges::for_each\; diff --git a/cmake/fetch/doxygen-awesome-css.cmake b/cmake/fetch/doxygen-awesome-css.cmake index 2301679..a859ace 100644 --- a/cmake/fetch/doxygen-awesome-css.cmake +++ b/cmake/fetch/doxygen-awesome-css.cmake @@ -32,7 +32,7 @@ include(FetchContent) FetchContent_Declare(doxygen-awesome-css GIT_REPOSITORY https://github.com/jothepro/doxygen-awesome-css.git - GIT_TAG v2.2.1 + GIT_TAG v2.3.1 GIT_SHALLOW 1 )