Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/fix appveyor #77

Merged
merged 16 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
language: en-US
tone_instructions: 'Be constructive and professional. Focus on technical accuracy while maintaining a friendly tone.'
early_access: true
enable_free_tier: true
reviews:
profile: assertive
request_changes_workflow: false
high_level_summary: true
high_level_summary_placeholder: '@coderabbitai summary'
auto_title_placeholder: '@coderabbitai'
review_status: true
commit_status: true
poem: true
collapse_walkthrough: false
sequence_diagrams: true
changed_files_summary: true
labeling_instructions: []
path_filters: []
acgetchell marked this conversation as resolved.
Show resolved Hide resolved
path_instructions:
- path: 'src/**/*.cpp'
instructions: 'Focus on performance, memory management, and RAII principles'
- path: 'include/**/*.hpp'
instructions: 'Focus on design patterns, interfaces, and encapsulation'
- path: 'test/**/*.cpp'
instructions: |
Review the following unit test code written using doctest. Ensure the following:
- Comprehensive test coverage and proper test organization.
- The code adheres to best practices using doctest.
- Descriptive test names are used to clearly convey the intent of each test.
abort_on_close: true
auto_review:
enabled: true
auto_incremental_review: true
ignore_title_keywords: []
labels: []
drafts: true
base_branches: []
tools:
shellcheck:
enabled: true
markdownlint:
enabled: true
github-checks:
enabled: true
timeout_ms: 90000
languagetool:
enabled: true
enabled_only: false
level: default
biome:
enabled: true
hadolint:
enabled: true
yamllint:
enabled: true
gitleaks:
enabled: true
checkov:
enabled: true
buf:
enabled: true
regal:
enabled: true
actionlint:
enabled: true
pmd:
enabled: true
cppcheck:
enabled: true
acgetchell marked this conversation as resolved.
Show resolved Hide resolved
semgrep:
enabled: true
circleci:
enabled: true
chat:
auto_reply: true
knowledge_base:
opt_out: false
learnings:
scope: auto
issues:
scope: auto
jira:
project_keys: []
linear:
team_keys: []
pull_requests:
scope: auto
acgetchell marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
pull_request:
branches:
- develop
workflow_dispatch:

jobs:
formatting-check:
Expand Down
18 changes: 11 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

# Link this 'library' to set the c++ standard / compile-time options requested
add_library(project_options INTERFACE)
target_compile_features(project_options INTERFACE cxx_std_20)
target_compile_features(project_options INTERFACE cxx_std_23)
acgetchell marked this conversation as resolved.
Show resolved Hide resolved

if(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
option(ENABLE_BUILD_WITH_TIME_TRACE "Enable -ftime-trace to generate time tracing .json files on clang" OFF)
Expand Down Expand Up @@ -67,21 +67,25 @@
# Set CGAL_DATA_DIR to the location of the CGAL data files
set(ENV{CGAL_DATA_DIR} CMAKE_BINARY_DIR/Data)

if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.34")
message(FATAL_ERROR "MSVC 19.34 or higher required for C++23 support")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "12.2")
message(FATAL_ERROR "GCC 12.2 or higher required for C++23 support")
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "16.0")
message(FATAL_ERROR "Clang 16.0 or higher required for C++23 support")

Check failure on line 75 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / build

Clang 16.0 or higher required for C++23 support
endif()

# Set NOMINMAX to avoid min/max macro errors on Windows in date.h
#if(WIN32)
# # Workaround for https://github.com/CGAL/cgal/issues/4665 and https://github.com/microsoft/vcpkg/issues/23572
# add_compile_options(/DNOMINMAX)
#endif()

if (MSVC)
# Add /utf-8 flag for MSVC
add_compile_options(/utf-8)
endif()

# Project vcpkg dependencies

# https://github.com/CGAL/cgal
find_package(CGAL CONFIG REQUIRED OPTIONAL_COMPONENTS Qt5)
#find_package(CGAL CONFIG REQUIRED OPTIONAL_COMPONENTS Qt5)
find_package(CGAL CONFIG REQUIRED)
acgetchell marked this conversation as resolved.
Show resolved Hide resolved
# Don't let CGAL override flags
set(CGAL_DONT_OVERRIDE_CMAKE_FLAGS
TRUE
Expand Down
7 changes: 4 additions & 3 deletions cmake/StandardProjectSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ endif()
# Set minimum Boost version
set(BOOST_MIN_VERSION "1.75.0")

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

# Check if the compiler is MSVC
# Deal with UTF-8 encoding
if (MSVC)
# Add /utf-8 flag to MSVC
add_compile_options(/utf-8)
else()
add_compile_options(-finput-charset=UTF-8)
endif()
72 changes: 36 additions & 36 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ target_link_libraries(
spdlog::spdlog_header_only
TBB::tbb
CGAL::CGAL)
target_compile_features(initialize PRIVATE cxx_std_20)
target_compile_features(initialize PRIVATE cxx_std_23)

add_executable(cdt-opt ${PROJECT_SOURCE_DIR}/src/cdt-opt.cpp)
target_link_libraries(
Expand All @@ -23,7 +23,7 @@ target_link_libraries(
spdlog::spdlog_header_only
TBB::tbb
CGAL::CGAL)
target_compile_features(cdt-opt PRIVATE cxx_std_20)
target_compile_features(cdt-opt PRIVATE cxx_std_23)

add_executable(cdt ${PROJECT_SOURCE_DIR}/src/cdt.cpp)
target_link_libraries(
Expand All @@ -37,40 +37,40 @@ target_link_libraries(
spdlog::spdlog_header_only
TBB::tbb
CGAL::CGAL)
target_compile_features(cdt PRIVATE cxx_std_20)
target_compile_features(cdt PRIVATE cxx_std_23)

# Build cdt-viewer locally, but not in CI since QT takes more than an hour to build there
if(APPLE AND NOT ($ENV{CI}))
add_executable(cdt-viewer ${PROJECT_SOURCE_DIR}/src/cdt-viewer.cpp)
target_link_libraries(
cdt-viewer
PRIVATE project_options
project_warnings
date::date-tz
Boost::program_options
fmt::fmt-header-only
Eigen3::Eigen
spdlog::spdlog_header_only
TBB::tbb
CGAL::CGAL_Basic_viewer)
target_compile_features(cdt-viewer PRIVATE cxx_std_20)
endif()
#if(APPLE AND NOT ($ENV{CI}))
# add_executable(cdt-viewer ${PROJECT_SOURCE_DIR}/src/cdt-viewer.cpp)
# target_link_libraries(
# cdt-viewer
# PRIVATE project_options
# project_warnings
# date::date-tz
# Boost::program_options
# fmt::fmt-header-only
# Eigen3::Eigen
# spdlog::spdlog_header_only
# TBB::tbb
# CGAL::CGAL_Basic_viewer)
# target_compile_features(cdt-viewer PRIVATE cxx_std_23)
#endif()

# Build bistellar-flip locally, but not in CI since QT takes more than an hour to build there
if(APPLE AND NOT ($ENV{CI}))
add_executable(bistellar-flip ${PROJECT_SOURCE_DIR}/src/bistellar-flip.cpp)
target_link_libraries(
bistellar-flip
PRIVATE project_options
project_warnings
date::date-tz
fmt::fmt-header-only
Eigen3::Eigen
spdlog::spdlog_header_only
TBB::tbb
CGAL::CGAL_Basic_viewer)
target_compile_features(bistellar-flip PRIVATE cxx_std_20)
endif()
#if(APPLE AND NOT ($ENV{CI}))
# add_executable(bistellar-flip ${PROJECT_SOURCE_DIR}/src/bistellar-flip.cpp)
# target_link_libraries(
# bistellar-flip
# PRIVATE project_options
# project_warnings
# date::date-tz
# fmt::fmt-header-only
# Eigen3::Eigen
# spdlog::spdlog_header_only
# TBB::tbb)
# CGAL::CGAL_Basic_viewer)
acgetchell marked this conversation as resolved.
Show resolved Hide resolved
# target_compile_features(bistellar-flip PRIVATE cxx_std_23)
#endif()

#
# Tests ##
Expand Down Expand Up @@ -105,7 +105,7 @@ set_tests_properties(initialize-toroidal PROPERTIES PASS_REGULAR_EXPRESSION
add_test(NAME cdt-opt COMMAND $<TARGET_FILE:cdt-opt>)
set_tests_properties(cdt-opt PROPERTIES PASS_REGULAR_EXPRESSION "cdt-opt started at")

if(APPLE AND NOT ($ENV{CI}))
add_test(NAME cdt-viewer COMMAND $<TARGET_FILE:cdt-viewer> --dry-run test.off)
set_tests_properties(cdt-viewer PROPERTIES PASS_REGULAR_EXPRESSION "Dry run. Exiting.")
endif()
#if(APPLE AND NOT ($ENV{CI}))
# add_test(NAME cdt-viewer COMMAND $<TARGET_FILE:cdt-viewer> --dry-run test.off)
# set_tests_properties(cdt-viewer PROPERTIES PASS_REGULAR_EXPRESSION "Dry run. Exiting.")
#endif()
2 changes: 1 addition & 1 deletion src/bistellar-flip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#define DOCTEST_CONFIG_IMPLEMENT

#include <doctest/doctest.h>

Check failure on line 22 in src/bistellar-flip.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter

src/bistellar-flip.cpp:22:10 [clang-diagnostic-error]

'doctest/doctest.h' file not found
#include <spdlog/spdlog.h>

#include <numbers>
Expand Down Expand Up @@ -69,7 +69,7 @@
manifolds::Manifold_3 const manifold{
foliated_triangulations::FoliatedTriangulation_3{dt, 0, 1}
};
CGAL::draw(manifold.get_delaunay());
// CGAL::draw(manifold.get_delaunay());
acgetchell marked this conversation as resolved.
Show resolved Hide resolved
fmt::print("After bistellar flip.\n");
manifold.print_cells();
utilities::print_delaunay(dt);
Expand Down
4 changes: 2 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ add_executable(
Torus_test.cpp
Utilities_test.cpp
Vertex_test.cpp)
# Activate C++20 features
target_compile_features(CDT_unit_tests PRIVATE cxx_std_20)
# Activate C++23 features
target_compile_features(CDT_unit_tests PRIVATE cxx_std_23)
target_link_libraries(
CDT_unit_tests
PRIVATE project_options
Expand Down
10 changes: 1 addition & 9 deletions vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@
"name": "yasm-tool",
"platform": "windows"
},
{
"name": "cgal",
"features": ["qt"],
"platform": "osx"
},
{
"name": "cgal",
"platform": "!osx"
}
"cgal"
]
}
Loading