Skip to content

Commit 6d8a435

Browse files
Feature/fix appveyor (#77)
* ci: Fix appveyor * ci: Fix pkgx windows error * ci: pkgx fixes [skip ci] * ci: Updates [skip ci] * ci: Allow clang-format to run by request [skip ci] * fix: strip out qt temporarily Until we can get it to compile again * fix: CoderabbitAI suggestions * fix: Coderabbit suggestions part 2 * fix: More Coderabbit tuning * fix: AppleClang C++23 support check left out AppleClang * Update src/bistellar-flip.cpp Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * ci: disable macos * ci: Fix workflows mostly Note we also updated vcpkg * ci: CodeRabbit suggestions * ci: Fix comment [ci skip] * ci: revert Coderabbit suggestion [ci skip] --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent a79eed9 commit 6d8a435

File tree

10 files changed

+150
-74
lines changed

10 files changed

+150
-74
lines changed

.appveyor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ clone_script:
1919
&& git submodule update --init --recursive
2020
2121
environment:
22-
APPVEYOR_SAVE_CACHE_ON_ERROR : true
22+
APPVEYOR_SAVE_CACHE_ON_ERROR: false
23+
APPVEYOR_CACHE_SKIP_RESTORE: true
2324
VCPKG_DEFAULT_TRIPLET: x64-windows
2425
VCPKG_ROOT: c:\tools\vcpkg
2526

.coderabbit.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
language: en-US
2+
tone_instructions: 'Be constructive and professional. Focus on technical accuracy while maintaining a friendly tone.'
3+
early_access: true
4+
enable_free_tier: true
5+
reviews:
6+
profile: assertive
7+
request_changes_workflow: false
8+
high_level_summary: true
9+
high_level_summary_placeholder: '@coderabbitai summary'
10+
auto_title_placeholder: '@coderabbitai'
11+
review_status: true
12+
commit_status: true
13+
poem: true
14+
collapse_walkthrough: false
15+
sequence_diagrams: true
16+
changed_files_summary: true
17+
labeling_instructions: []
18+
path_filters: []
19+
path_instructions:
20+
- path: 'src/**/*.cpp'
21+
instructions: 'Focus on performance, memory management, and RAII principles'
22+
- path: 'include/**/*.hpp'
23+
instructions: 'Focus on design patterns, interfaces, and encapsulation'
24+
- path: 'test/**/*.cpp'
25+
instructions: |
26+
Review the following unit test code written using doctest. Ensure the following:
27+
- Comprehensive test coverage and proper test organization.
28+
- The code adheres to best practices using doctest.
29+
- Descriptive test names are used to clearly convey the intent of each test.
30+
abort_on_close: true
31+
auto_review:
32+
enabled: true
33+
auto_incremental_review: true
34+
ignore_title_keywords: []
35+
labels: []
36+
drafts: true
37+
base_branches: []
38+
tools:
39+
shellcheck:
40+
enabled: true
41+
markdownlint:
42+
enabled: true
43+
github-checks:
44+
enabled: true
45+
timeout_ms: 90000
46+
gitleaks:
47+
enabled: true
48+
cppcheck:
49+
enabled: true
50+
languagetool:
51+
enabled: true
52+
enabled_only: false
53+
level: default
54+
hadolint:
55+
enabled: true
56+
yamllint:
57+
enabled: true
58+
actionlint:
59+
enabled: true
60+
pmd:
61+
enabled: true
62+
semgrep:
63+
enabled: true
64+
chat:
65+
auto_reply: true
66+
knowledge_base:
67+
opt_out: false
68+
learnings:
69+
scope: auto
70+
issues:
71+
scope: auto
72+
jira:
73+
project_keys: []
74+
linear:
75+
team_keys: []
76+
pull_requests:
77+
scope: auto

.github/workflows/clang-format-check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
pull_request:
88
branches:
99
- develop
10+
workflow_dispatch:
1011

1112
jobs:
1213
formatting-check:

.github/workflows/macos.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,13 @@ jobs:
1818

1919
- name: Setup
2020
run: |
21-
rm /usr/local/bin/2to3
22-
rm /usr/local/bin/2to3-3.11
23-
rm /usr/local/bin/2to3-3.12
24-
rm /usr/local/bin/idle3
25-
rm /usr/local/bin/idle3.11
26-
rm /usr/local/bin/idle3.12
27-
rm /usr/local/bin/pydoc3
28-
rm /usr/local/bin/pydoc3.11
29-
rm /usr/local/bin/pydoc3.12
30-
rm /usr/local/bin/python3
31-
rm /usr/local/bin/python3.11
32-
rm /usr/local/bin/python3.12
33-
rm /usr/local/bin/python3-config
34-
rm /usr/local/bin/python3.11-config
35-
rm /usr/local/bin/python3.12-config
21+
# Remove Python symlinks if they exist
22+
echo "Checking and removing Python symlinks..."
23+
for file in \
24+
/usr/local/bin/{2to3,idle3,pydoc3,python3,python3-config}{,-3.11,-3.12}; do
25+
[ -L "$file" ] && sudo rm "$file" || true
26+
done
27+
echo "Python symlink cleanup completed."
3628
brew install automake autoconf autoconf-archive libtool texinfo yasm ninja python ccache pkg-config
3729

3830
- name: Restore artifacts or setup vcpkg

CMakeLists.txt

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.16...3.26)
1+
cmake_minimum_required(VERSION 3.16)
22

33
# vcpkg settings must be set before project()
44
if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
@@ -30,7 +30,7 @@ include(cmake/PreventInSourceBuilds.cmake)
3030

3131
# Link this 'library' to set the c++ standard / compile-time options requested
3232
add_library(project_options INTERFACE)
33-
target_compile_features(project_options INTERFACE cxx_std_20)
33+
target_compile_features(project_options INTERFACE cxx_std_23)
3434

3535
if(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
3636
option(ENABLE_BUILD_WITH_TIME_TRACE "Enable -ftime-trace to generate time tracing .json files on clang" OFF)
@@ -67,21 +67,31 @@ include(CMakeDependentOption)
6767
# Set CGAL_DATA_DIR to the location of the CGAL data files
6868
set(ENV{CGAL_DATA_DIR} CMAKE_BINARY_DIR/Data)
6969

70+
# Minimum compiler versions required for C++23 support:
71+
# - MSVC 19.34 (Visual Studio 2022 version 17.4)
72+
# - GCC 12.2
73+
# - AppleClang 14.0
74+
# - Clang 16.0
75+
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.34")
76+
message(FATAL_ERROR "MSVC 19.34 or higher required for C++23 support")
77+
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "12.2")
78+
message(FATAL_ERROR "GCC 12.2 or higher required for C++23 support")
79+
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "16.0")
80+
message(FATAL_ERROR "Clang 16.0 or higher required for C++23 support")
81+
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "14.0")
82+
message(FATAL_ERROR "AppleClang 14.0 or higher required for C++23 support")
83+
endif()
84+
7085
# Set NOMINMAX to avoid min/max macro errors on Windows in date.h
7186
#if(WIN32)
7287
# # Workaround for https://github.com/CGAL/cgal/issues/4665 and https://github.com/microsoft/vcpkg/issues/23572
7388
# add_compile_options(/DNOMINMAX)
7489
#endif()
7590

76-
if (MSVC)
77-
# Add /utf-8 flag for MSVC
78-
add_compile_options(/utf-8)
79-
endif()
80-
8191
# Project vcpkg dependencies
8292

8393
# https://github.com/CGAL/cgal
84-
find_package(CGAL CONFIG REQUIRED OPTIONAL_COMPONENTS Qt5)
94+
find_package(CGAL CONFIG REQUIRED)
8595
# Don't let CGAL override flags
8696
set(CGAL_DONT_OVERRIDE_CMAKE_FLAGS
8797
TRUE

cmake/StandardProjectSettings.cmake

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ endif()
3838
# Set minimum Boost version
3939
set(BOOST_MIN_VERSION "1.75.0")
4040

41-
# Use C++20
41+
# Use C++23
4242
set(CMAKE_CXX_STANDARD 23)
4343
set(CMAKE_CXX_STANDARD_REQUIRED ON)
4444
set(CMAKE_CXX_EXTENSIONS OFF)
@@ -55,8 +55,9 @@ add_definitions(-DCGAL_TRIANGULATION_NO_ASSERTIONS -DCGAL_TRIANGULATION_NO_POSTC
5555
# Easier navigation in an IDE when projects are organized in folders.
5656
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
5757

58-
# Check if the compiler is MSVC
58+
# Deal with UTF-8 encoding
5959
if (MSVC)
60-
# Add /utf-8 flag to MSVC
6160
add_compile_options(/utf-8)
61+
else()
62+
add_compile_options(-finput-charset=UTF-8)
6263
endif()

src/CMakeLists.txt

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ target_link_libraries(
1010
spdlog::spdlog_header_only
1111
TBB::tbb
1212
CGAL::CGAL)
13-
target_compile_features(initialize PRIVATE cxx_std_20)
13+
target_compile_features(initialize PRIVATE cxx_std_23)
1414

1515
add_executable(cdt-opt ${PROJECT_SOURCE_DIR}/src/cdt-opt.cpp)
1616
target_link_libraries(
@@ -23,7 +23,7 @@ target_link_libraries(
2323
spdlog::spdlog_header_only
2424
TBB::tbb
2525
CGAL::CGAL)
26-
target_compile_features(cdt-opt PRIVATE cxx_std_20)
26+
target_compile_features(cdt-opt PRIVATE cxx_std_23)
2727

2828
add_executable(cdt ${PROJECT_SOURCE_DIR}/src/cdt.cpp)
2929
target_link_libraries(
@@ -37,40 +37,40 @@ target_link_libraries(
3737
spdlog::spdlog_header_only
3838
TBB::tbb
3939
CGAL::CGAL)
40-
target_compile_features(cdt PRIVATE cxx_std_20)
40+
target_compile_features(cdt PRIVATE cxx_std_23)
4141

4242
# Build cdt-viewer locally, but not in CI since QT takes more than an hour to build there
43-
if(APPLE AND NOT ($ENV{CI}))
44-
add_executable(cdt-viewer ${PROJECT_SOURCE_DIR}/src/cdt-viewer.cpp)
45-
target_link_libraries(
46-
cdt-viewer
47-
PRIVATE project_options
48-
project_warnings
49-
date::date-tz
50-
Boost::program_options
51-
fmt::fmt-header-only
52-
Eigen3::Eigen
53-
spdlog::spdlog_header_only
54-
TBB::tbb
55-
CGAL::CGAL_Basic_viewer)
56-
target_compile_features(cdt-viewer PRIVATE cxx_std_20)
57-
endif()
43+
#if(APPLE AND NOT ($ENV{CI}))
44+
# add_executable(cdt-viewer ${PROJECT_SOURCE_DIR}/src/cdt-viewer.cpp)
45+
# target_link_libraries(
46+
# cdt-viewer
47+
# PRIVATE project_options
48+
# project_warnings
49+
# date::date-tz
50+
# Boost::program_options
51+
# fmt::fmt-header-only
52+
# Eigen3::Eigen
53+
# spdlog::spdlog_header_only
54+
# TBB::tbb
55+
# CGAL::CGAL_Basic_viewer)
56+
# target_compile_features(cdt-viewer PRIVATE cxx_std_23)
57+
#endif()
5858

5959
# Build bistellar-flip locally, but not in CI since QT takes more than an hour to build there
60-
if(APPLE AND NOT ($ENV{CI}))
61-
add_executable(bistellar-flip ${PROJECT_SOURCE_DIR}/src/bistellar-flip.cpp)
62-
target_link_libraries(
63-
bistellar-flip
64-
PRIVATE project_options
65-
project_warnings
66-
date::date-tz
67-
fmt::fmt-header-only
68-
Eigen3::Eigen
69-
spdlog::spdlog_header_only
70-
TBB::tbb
71-
CGAL::CGAL_Basic_viewer)
72-
target_compile_features(bistellar-flip PRIVATE cxx_std_20)
73-
endif()
60+
#if(APPLE AND NOT ($ENV{CI}))
61+
# add_executable(bistellar-flip ${PROJECT_SOURCE_DIR}/src/bistellar-flip.cpp)
62+
# target_link_libraries(
63+
# bistellar-flip
64+
# PRIVATE project_options
65+
# project_warnings
66+
# date::date-tz
67+
# fmt::fmt-header-only
68+
# Eigen3::Eigen
69+
# spdlog::spdlog_header_only
70+
# TBB::tbb)
71+
# CGAL::CGAL_Basic_viewer)
72+
# target_compile_features(bistellar-flip PRIVATE cxx_std_23)
73+
#endif()
7474

7575
#
7676
# Tests ##
@@ -105,7 +105,7 @@ set_tests_properties(initialize-toroidal PROPERTIES PASS_REGULAR_EXPRESSION
105105
add_test(NAME cdt-opt COMMAND $<TARGET_FILE:cdt-opt>)
106106
set_tests_properties(cdt-opt PROPERTIES PASS_REGULAR_EXPRESSION "cdt-opt started at")
107107

108-
if(APPLE AND NOT ($ENV{CI}))
109-
add_test(NAME cdt-viewer COMMAND $<TARGET_FILE:cdt-viewer> --dry-run test.off)
110-
set_tests_properties(cdt-viewer PROPERTIES PASS_REGULAR_EXPRESSION "Dry run. Exiting.")
111-
endif()
108+
#if(APPLE AND NOT ($ENV{CI}))
109+
# add_test(NAME cdt-viewer COMMAND $<TARGET_FILE:cdt-viewer> --dry-run test.off)
110+
# set_tests_properties(cdt-viewer PROPERTIES PASS_REGULAR_EXPRESSION "Dry run. Exiting.")
111+
#endif()

src/bistellar-flip.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ try
6969
manifolds::Manifold_3 const manifold{
7070
foliated_triangulations::FoliatedTriangulation_3{dt, 0, 1}
7171
};
72+
#ifdef ENABLE_VISUALIZATION
7273
CGAL::draw(manifold.get_delaunay());
74+
#endif
7375
fmt::print("After bistellar flip.\n");
7476
manifold.print_cells();
7577
utilities::print_delaunay(dt);

tests/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ add_executable(
1717
Torus_test.cpp
1818
Utilities_test.cpp
1919
Vertex_test.cpp)
20-
# Activate C++20 features
21-
target_compile_features(CDT_unit_tests PRIVATE cxx_std_20)
20+
# Activate C++23 features
21+
target_compile_features(CDT_unit_tests PRIVATE cxx_std_23)
2222
target_link_libraries(
2323
CDT_unit_tests
2424
PRIVATE project_options

vcpkg.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@
1616
"name": "yasm-tool",
1717
"platform": "windows"
1818
},
19-
{
20-
"name": "cgal",
21-
"features": ["qt"],
22-
"platform": "osx"
23-
},
24-
{
25-
"name": "cgal",
26-
"platform": "!osx"
27-
}
19+
"cgal"
2820
]
2921
}

0 commit comments

Comments
 (0)