From 36785a7d2bb0740ff06e2f373afc2122b003b197 Mon Sep 17 00:00:00 2001 From: Adam Getchell Date: Mon, 23 Oct 2023 12:13:11 -0700 Subject: [PATCH] Use C++23 standard --- .github/workflows/codecov-upload.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/linux-clang-pkgx.yml | 2 +- .github/workflows/linux-clang.yml | 2 +- .github/workflows/linux-gcc.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/sonarcloud.yml | 2 +- .github/workflows/windows-msvc.yml | 2 +- .github/workflows/windows-pkgx.yml | 2 +- CMakePresets.json | 2 +- README.md | 6 +++--- cmake/StandardProjectSettings.cmake | 4 ++-- tests/CMakeLists.txt | 8 ++++---- 13 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/codecov-upload.yml b/.github/workflows/codecov-upload.yml index e4bff5f72a..473613c7be 100644 --- a/.github/workflows/codecov-upload.yml +++ b/.github/workflows/codecov-upload.yml @@ -28,7 +28,7 @@ jobs: - name: Restore artifacts or setup vcpkg uses: lukka/run-vcpkg@v11 with: - vcpkgGitCommitId: ae360361a434310ffee36d84eb01c033b648fb22 + vcpkgGitCommitId: 3265c187c74914aa5569b75355badebfdbab7987 - name: Configure run: cmake -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo -D ENABLE_TESTING:BOOL=TRUE -D ENABLE_COVERAGE:BOOL=TRUE -S . -B build diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index b4796bb0c8..45d1624ba4 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -67,7 +67,7 @@ jobs: - name: Restore artifacts or setup vcpkg uses: lukka/run-vcpkg@v11 with: - vcpkgGitCommitId: ae360361a434310ffee36d84eb01c033b648fb22 + vcpkgGitCommitId: 3265c187c74914aa5569b75355badebfdbab7987 - name: Configure run: cmake --preset=build diff --git a/.github/workflows/linux-clang-pkgx.yml b/.github/workflows/linux-clang-pkgx.yml index 22c3a9b21e..b06a28dd63 100644 --- a/.github/workflows/linux-clang-pkgx.yml +++ b/.github/workflows/linux-clang-pkgx.yml @@ -27,7 +27,7 @@ jobs: - name: Restore artifacts or setup vcpkg uses: lukka/run-vcpkg@v11 with: - vcpkgGitCommitId: ae360361a434310ffee36d84eb01c033b648fb22 + vcpkgGitCommitId: 3265c187c74914aa5569b75355badebfdbab7987 - name: Configure run: cmake --preset=build diff --git a/.github/workflows/linux-clang.yml b/.github/workflows/linux-clang.yml index b849a02dda..ccc4abadc3 100644 --- a/.github/workflows/linux-clang.yml +++ b/.github/workflows/linux-clang.yml @@ -27,7 +27,7 @@ jobs: - name: Restore artifacts or setup vcpkg uses: lukka/run-vcpkg@v11 with: - vcpkgGitCommitId: ae360361a434310ffee36d84eb01c033b648fb22 + vcpkgGitCommitId: 3265c187c74914aa5569b75355badebfdbab7987 - name: Configure run: cmake --preset=build diff --git a/.github/workflows/linux-gcc.yml b/.github/workflows/linux-gcc.yml index 06a73fca2c..165508f110 100644 --- a/.github/workflows/linux-gcc.yml +++ b/.github/workflows/linux-gcc.yml @@ -27,7 +27,7 @@ jobs: - name: Restore artifacts or setup vcpkg uses: lukka/run-vcpkg@v11 with: - vcpkgGitCommitId: ae360361a434310ffee36d84eb01c033b648fb22 + vcpkgGitCommitId: 3265c187c74914aa5569b75355badebfdbab7987 - name: Configure run: cmake --preset=build diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d407ca17d1..37fbadef1f 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -19,7 +19,7 @@ jobs: - name: Restore artifacts or setup vcpkg uses: lukka/run-vcpkg@v11 with: - vcpkgGitCommitId: ae360361a434310ffee36d84eb01c033b648fb22 + vcpkgGitCommitId: 3265c187c74914aa5569b75355badebfdbab7987 - name: Configure run: cmake --preset=build diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index f008f03895..81e4da88c4 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -31,7 +31,7 @@ jobs: - name: Restore artifacts or setup vcpkg uses: lukka/run-vcpkg@v11 with: - vcpkgGitCommitId: ae360361a434310ffee36d84eb01c033b648fb22 + vcpkgGitCommitId: 3265c187c74914aa5569b75355badebfdbab7987 - name: Configure run: cmake -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo -D ENABLE_TESTING:BOOL=TRUE -D ENABLE_COVERAGE:BOOL=TRUE -S . -B build diff --git a/.github/workflows/windows-msvc.yml b/.github/workflows/windows-msvc.yml index 15abbcb27d..aabc8c0f25 100644 --- a/.github/workflows/windows-msvc.yml +++ b/.github/workflows/windows-msvc.yml @@ -24,7 +24,7 @@ jobs: - name: Restore artifacts, or setup vcpkg uses: lukka/run-vcpkg@v11 with: - vcpkgGitCommitId: ae360361a434310ffee36d84eb01c033b648fb22 + vcpkgGitCommitId: 3265c187c74914aa5569b75355badebfdbab7987 - name: Install vcpkg packages and configure CMake run: | diff --git a/.github/workflows/windows-pkgx.yml b/.github/workflows/windows-pkgx.yml index 9fb580b1fd..f59372345a 100644 --- a/.github/workflows/windows-pkgx.yml +++ b/.github/workflows/windows-pkgx.yml @@ -24,7 +24,7 @@ jobs: - name: Restore artifacts, or setup vcpkg uses: lukka/run-vcpkg@v11 with: - vcpkgGitCommitId: ae360361a434310ffee36d84eb01c033b648fb22 + vcpkgGitCommitId: 3265c187c74914aa5569b75355badebfdbab7987 - name: Install vcpkg packages and configure CMake run: | diff --git a/CMakePresets.json b/CMakePresets.json index 562a1a7678..b24f8f3f19 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -35,7 +35,7 @@ "binaryDir": "${sourceDir}/build", "cacheVariables": { "CMAKE_CXX_EXTENSIONS": "OFF", - "CMAKE_CXX_STANDARD": "20", + "CMAKE_CXX_STANDARD": "23", "CMAKE_CXX_STANDARD_REQUIRED": "ON" } }, diff --git a/README.md b/README.md index 8773a95f5a..b308f5deb9 100644 --- a/README.md +++ b/README.md @@ -284,16 +284,16 @@ If you do not have GraphViz installed, set this option to **NO** In the `scripts` directory, run `build.sh` or `build.bat` depending on your operating system. -Unit tests run (in `build/tests` or `build\tests\Debug`) via `CDT_test`, the [doctest] executable: +Unit tests run (in `build/tests` or `build\tests\Debug`) via `CDT_unit_tests`, the [doctest] executable: ~~~bash -./CDT_test +./CDT_unit_tests ~~~ or (Windows): ~~~cmd -CDT_test.exe +CDT_unit_tests.exe ~~~ You can also run both [CTest] integration and [doctest] unit tests in the `build` directory with: diff --git a/cmake/StandardProjectSettings.cmake b/cmake/StandardProjectSettings.cmake index 71f29a8530..b572784fdb 100644 --- a/cmake/StandardProjectSettings.cmake +++ b/cmake/StandardProjectSettings.cmake @@ -38,8 +38,8 @@ endif() # Set minimum Boost version set(BOOST_MIN_VERSION "1.75.0") -# Use C++20 -set(CMAKE_CXX_STANDARD 20) +# Use C++23 +set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7f42896c02..67590809da 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,5 @@ add_executable( - CDT_test + CDT_unit_tests ${PROJECT_SOURCE_DIR}/tests/main.cpp Apply_move_test.cpp Ergodic_moves_3_test.cpp @@ -18,9 +18,9 @@ add_executable( Utilities_test.cpp Vertex_test.cpp) # Activate C++20 features -target_compile_features(CDT_test PRIVATE cxx_std_20) +target_compile_features(CDT_unit_tests PRIVATE cxx_std_20) target_link_libraries( - CDT_test + CDT_unit_tests PRIVATE project_options project_warnings date::date-tz @@ -29,4 +29,4 @@ target_link_libraries( CGAL::CGAL) # Run unit tests -add_test(NAME cdt-unit-tests COMMAND $) +add_test(NAME cdt-unit-tests COMMAND $)