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

Attempt at simplifying the file structure and CMake build #961

Merged
merged 53 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
9919da3
Initial file moves, stage logic for src/CMakeLists.txt rework
starseeker Sep 27, 2024
e0f28b3
Start working on getting reorganized files to build, as well as doing…
starseeker Sep 27, 2024
8b0eea1
remove unused libs, propagate dependency includes
starseeker Sep 27, 2024
3884e0d
Ignore common temporary files and build directories
starseeker Sep 27, 2024
f1bc2fc
Just build the C bindings, since this is already a C++ compile - redu…
starseeker Sep 27, 2024
eda8beb
Fixes for python binding building
starseeker Sep 27, 2024
2dfb3bc
Require C++17, don't use extensions
starseeker Sep 27, 2024
186029c
Remove C binding CMake file
starseeker Sep 27, 2024
362e1bd
Remove extra libraries from link line
starseeker Sep 27, 2024
c2ccb1f
Try to set up the manifoldConfig file to just find the required depen…
starseeker Sep 27, 2024
947bcaa
Go looking for glm and Clipper2 installed with Manifold first (untested)
starseeker Sep 27, 2024
e075526
Use a bundled Clipper2 copy instead of downloading
starseeker Sep 27, 2024
fbcd9ba
Remove option and directories no longer present
starseeker Sep 27, 2024
97d6cf5
Remove option no longer present.
starseeker Sep 27, 2024
910e9e8
Put back the default .gitignore
starseeker Sep 27, 2024
a28397e
Add a few more patterns
starseeker Sep 27, 2024
c441106
Revert "Use a bundled Clipper2 copy instead of downloading"
starseeker Sep 27, 2024
8c155d2
Just build polygon as part of the main library
starseeker Sep 27, 2024
4e9891d
Correct some library linkages
starseeker Sep 27, 2024
2360f22
Tweak exported target file install location - this seems to be what's…
starseeker Sep 27, 2024
58970c1
clang format fixes
starseeker Sep 28, 2024
fd90612
Just include FetchContent up front
starseeker Sep 28, 2024
3bd58c2
Fix include for minimize_testcase
starseeker Sep 28, 2024
aad9713
formatting
starseeker Sep 28, 2024
2cd37f7
Add sstream header
starseeker Sep 28, 2024
97ace19
Need to disable more code when cross_section is off
starseeker Sep 28, 2024
566d50a
Don't try to build the bindings unless MANIFOLD_CROSS_SECTION is on.
starseeker Sep 28, 2024
eed7fa9
formatting
starseeker Sep 28, 2024
dd92fb7
manifoldc folded into libmanifold
starseeker Sep 28, 2024
d815fa8
Fix location of test-cmake.sh script
starseeker Sep 28, 2024
ae69fe3
Try using previous install dir for Apple/MSVC manifoldConfig.cmake file
starseeker Sep 28, 2024
84599cf
Fix conditional test, add namespace
starseeker Sep 28, 2024
9c30191
Fix header install
starseeker Sep 28, 2024
0fe3579
Remove unused bindings filter from lcov line, Remove unused MANIFOLD_…
starseeker Sep 28, 2024
24eb99d
Don't do tests if downloads are off, since they require googletest.
starseeker Sep 28, 2024
19ed4b8
elalish spotted that this isn't a public header - fix.
starseeker Sep 28, 2024
dcb79ca
Try out CMake intenting based on vim + file footer with settings.
starseeker Sep 28, 2024
334d485
Rename sh directory to scripts per suggestion from pca006132
starseeker Sep 28, 2024
1f60a05
Per pca006132, remove unnecessary find_package call for oneDPL.
starseeker Sep 28, 2024
6c9a66e
Simplify MANIFOLD_PAR to an OFF/ON setting
starseeker Sep 28, 2024
391c339
conv.h is also a private header
starseeker Sep 28, 2024
54dbd87
Hmm - looks like flake naming was coming from MANIFOLD_PAR - try tran…
starseeker Sep 28, 2024
ad20572
Whoops - need to translate the active value not the cached value.
starseeker Sep 28, 2024
8fec63e
OFF is still defined, so make sure we catch that case too
starseeker Sep 28, 2024
384b08b
Explain multiple calls to get_filename_component
starseeker Sep 28, 2024
2583f01
Move parallel.h to src
starseeker Sep 28, 2024
aa47594
Move iters.h to src
starseeker Sep 28, 2024
4cc1f67
Place optional components in subdirectories.
starseeker Sep 28, 2024
5682ed6
Correct path in gen_docs.py
starseeker Sep 29, 2024
0deabaa
Fix the file location for python bindings.
starseeker Sep 29, 2024
e1bb2b4
Revert "Move iters.h to src"
starseeker Sep 29, 2024
93158e6
Revert "Move parallel.h to src"
starseeker Sep 29, 2024
79bfc42
Footers, indenting adjustments for other CMake files
starseeker Sep 29, 2024
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
36 changes: 18 additions & 18 deletions .github/workflows/manifold.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ on:

jobs:
build:
name: CrossSection:${{matrix.cross_section}} ${{matrix.parallel_backend == 'TBB' && 'TBB' || ''}} GCC ${{matrix.gcc}}
name: CrossSection:${{matrix.cross_section}} ${{matrix.parallel_backend == 'ON'}} GCC ${{matrix.gcc}}
timeout-minutes: 45
strategy:
matrix:
cross_section: [ON]
parallel_backend: [NONE, TBB]
parallel_backend: [OFF, ON]
gcc: [13, 14]
include:
- cross_section: OFF
parallel_backend: TBB
parallel_backend: ON
gcc: 14
runs-on: ubuntu-24.04
env:
Expand All @@ -40,18 +40,18 @@ jobs:
- uses: actions/checkout@v4
- uses: jwlawson/actions-setup-cmake@v2
- name: Build ${{matrix.parallel_backend}}
if: matrix.parallel_backend != 'NONE'
if: matrix.parallel_backend != 'OFF'
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DMANIFOLD_PYBIND=ON -DMANIFOLD_DEBUG=ON -DMANIFOLD_FLAGS=-UNDEBUG -DMANIFOLD_CROSS_SECTION=${{matrix.cross_section}} -DMANIFOLD_EXPORT=ON -DMANIFOLD_PAR=${{matrix.parallel_backend}} .. && make
- name: Test ${{matrix.parallel_backend}}
if: matrix.parallel_backend != 'NONE'
if: matrix.parallel_backend != 'OFF'
run: |
cd build/test
./manifold_test
- name: Test Python bindings ${{matrix.parallel_backend}}
if: matrix.parallel_backend != 'NONE' && matrix.cross_section == 'ON'
if: matrix.parallel_backend != 'OFF' && matrix.cross_section == 'ON'
run: |
export PYTHONPATH=$PYTHONPATH:$(pwd)/build/bindings/python
python3 bindings/python/examples/run_all.py -e
Expand All @@ -60,7 +60,7 @@ jobs:
# only do code coverage for default sequential backend, it seems that TBB
# backend will cause failure
# perhaps issue related to invalid memory access?
if: matrix.parallel_backend == 'NONE'
if: matrix.parallel_backend == 'OFF'
run: |
mkdir build
cd build
Expand All @@ -71,10 +71,10 @@ jobs:
cd ../
lcov --capture --gcov-tool gcov-${{ matrix.gcc }} --ignore-errors mismatch --directory . --output-file ./code_coverage_test.info
lcov --add-tracefile ./code_coverage_init.info --add-tracefile ./code_coverage_test.info --output-file ./code_coverage_total.info
lcov --remove ./code_coverage_total.info '/usr/*' '*/test/*' '*/extras/*' '*/bindings/*' --output-file ./code_coverage.info
lcov --remove ./code_coverage_total.info '/usr/*' '*/test/*' '*/extras/*' --output-file ./code_coverage.info
cd ../
- uses: codecov/codecov-action@v4
if: matrix.parallel_backend == 'NONE'
if: matrix.parallel_backend == 'OFF'
with:
files: build/code_coverage.info
fail_ci_if_error: false
Expand All @@ -84,7 +84,7 @@ jobs:
cd build
sudo cmake --install .
cd ..
./test-cmake.sh
./scripts/test-cmake.sh

build_cbind:
timeout-minutes: 30
Expand All @@ -101,7 +101,7 @@ jobs:
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DMANIFOLD_PYBIND=ON -DMANIFOLD_DEBUG=ON -DMANIFOLD_CBIND=ON -DMANIFOLD_PAR=TBB .. && make
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DMANIFOLD_PYBIND=ON -DMANIFOLD_DEBUG=ON -DMANIFOLD_PAR=ON .. && make
- name: Test
run: |
cd build/test
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
timeout-minutes: 30
strategy:
matrix:
parallel_backend: [NONE, TBB]
parallel_backend: [OFF, ON]
max-parallel: 1
runs-on: windows-2019
if: github.event.pull_request.draft == false
Expand All @@ -183,13 +183,13 @@ jobs:
cd build
cmake --install .
cd ..
./test-cmake.sh
./scripts/test-cmake.sh

build_mxe:
timeout-minutes: 30
strategy:
matrix:
parallel_backend: [NONE, TBB]
parallel_backend: [OFF, ON]
max-parallel: 1
runs-on: ubuntu-latest
container: openscad/mxe-x86_64-gui:latest
Expand All @@ -205,13 +205,13 @@ jobs:
export MXETARGETDIR=$MXEDIR/usr/$MXE_TARGETS
export PATH=/mxe/usr/bin:$PATH
export CMAKE=$MXE_TARGETS-cmake
$CMAKE -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMANIFOLD_PYBIND=OFF -DMANIFOLD_CBIND=OFF -DMANIFOLD_DEBUG=ON -DMANIFOLD_PAR=${{matrix.parallel_backend}} .. && make
$CMAKE -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMANIFOLD_PYBIND=OFF -DMANIFOLD_DEBUG=ON -DMANIFOLD_PAR=${{matrix.parallel_backend}} .. && make

build_mac:
timeout-minutes: 30
strategy:
matrix:
parallel_backend: [NONE, TBB]
parallel_backend: [OFF, ON]
runs-on: macos-latest
if: github.event.pull_request.draft == false
steps:
Expand All @@ -220,7 +220,7 @@ jobs:
brew install pkg-config googletest assimp
pip install trimesh pytest
- name: Install TBB
if: matrix.parallel_backend == 'TBB'
if: matrix.parallel_backend == 'ON'
run: brew install tbb onedpl
- uses: actions/checkout@v4
- uses: jwlawson/actions-setup-cmake@v2
Expand All @@ -239,7 +239,7 @@ jobs:
cd build
sudo cmake --install .
cd ..
./test-cmake.sh
./scripts/test-cmake.sh

build_nix:
timeout-minutes: 30
Expand Down
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,18 @@ __pycache__
*.sublime-project
*.sublime-workspace
.cache
CMakeUserPresets.json
CMakeSettings.json

# PyCharm
.idea
.idea

# Temporary files
*~
\#*\#
.\#*
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-v][a-z]
[._]sw[a-p]

4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"-DMANIFOLD_EXPORT=ON",
"-DMANIFOLD_DEBUG=ON",
"-DMANIFOLD_EXCEPTIONS=ON",
"-DMANIFOLD_PAR=TBB",
"-DMANIFOLD_PAR=ON",
"-DCODE_COVERAGE=OFF",
"-DCMAKE_CXX_FLAGS=''" //'-fsanitize=address,undefined'"
],
Expand Down Expand Up @@ -158,4 +158,4 @@
},
"python.formatting.provider": "none",
"clang-format.executable": "clang-format",
}
}
Loading
Loading