Skip to content

Commit

Permalink
Use C++23 standard
Browse files Browse the repository at this point in the history
  • Loading branch information
acgetchell committed Oct 23, 2023
1 parent 09d913d commit 36785a7
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codecov-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-clang-pkgx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-pkgx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions cmake/StandardProjectSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
8 changes: 4 additions & 4 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -29,4 +29,4 @@ target_link_libraries(
CGAL::CGAL)

# Run unit tests
add_test(NAME cdt-unit-tests COMMAND $<TARGET_FILE:CDT_test>)
add_test(NAME cdt-unit-tests COMMAND $<TARGET_FILE:CDT_unit_tests>)

0 comments on commit 36785a7

Please sign in to comment.