Skip to content

Commit

Permalink
Merge pull request #286 from gerlero/cgal
Browse files Browse the repository at this point in the history
Support CGAL 6
  • Loading branch information
gerlero authored Oct 8, 2024
2 parents e4671e8 + d0b702d commit 8839eeb
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ jobs:
run: |
make deps --dry-run ${{ env.MAKE_VARS }} > make_deps.txt
make build --dry-run ${{ env.MAKE_VARS }} > make_build.txt
brew update
brew bundle list | xargs -I {} sh -c 'brew info {} | head -n 1' > brew_versions.txt
brew deps --union $(brew bundle list) | xargs -I {} sh -c 'brew info {} | head -n 1' >> brew_versions.txt
sort -u -o brew_versions.txt brew_versions.txt
Expand Down
23 changes: 23 additions & 0 deletions scripts/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,26 @@ EOF
# Backport of https://develop.openfoam.com/Development/openfoam/-/issues/3098
[ $(bin/foamEtcFile -show-api) -gt 2312 ] || sed -i '' 's|_foamAddLib "$FOAM_USER_LIBBIN:$FOAM_SITE_LIBBIN"|_foamAddLib "$FOAM_SITE_LIBBIN"\n_foamAddLib "$FOAM_USER_LIBBIN"|' etc/config.sh/setup
[ $(bin/foamEtcFile -show-api) -gt 2312 ] || sed -i '' 's|_foamAddLib "$FOAM_USER_LIBBIN:$FOAM_SITE_LIBBIN"|_foamAddLib "$FOAM_SITE_LIBBIN"\n_foamAddLib "$FOAM_USER_LIBBIN"|' etc/config.csh/setup


# Compatibility with CGAL 6 (https://develop.openfoam.com/Development/openfoam/-/issues/3234)
sed -i '' 's|c++14|c++17|' wmake/rules/General/Clang/c++
patch src/OpenFOAM/db/IOstreams/memory/ISpanStream.H <<EOF
@@ -119,10 +119,10 @@ public:
#if __cplusplus >= 201703L
//- Construct (shallow copy) from std::string_view content
explicit ispanstream(std::string_view s)
- {
+ :
buffer_type(const_cast<char*>(s.data()), s.size()),
- stream_type(static_cast<buffer_type*>(this));
- }
+ stream_type(static_cast<buffer_type*>(this))
+ {}
#endif
//- Construct (shallow copy) from span character content
EOF
sed -i '' 's|boost::optional|std::optional|' applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C
sed -i '' 's|boost::optional|std::optional|' applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C
sed -i '' 's|boost::get|std::get_if|' applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C

0 comments on commit 8839eeb

Please sign in to comment.