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

Compile with shared ITK/VTK to reduce wheel size #346

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
7 changes: 7 additions & 0 deletions cibuildwheel.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[tool.cibuildwheel]
build = "cp36-manylinux_x86_64 cp37-manylinux_x86_64 cp38-manylinux_x86_64 cp39-manylinux_x86_64"
before-build = "git clean -ffdx"
test-command = "{project}/tests/run_tests.sh"

[tool.cibuildwheel.linux]
before-all = "yum install -y libpng-devel"
6 changes: 2 additions & 4 deletions scripts/configure_ITK.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ cmake \
-DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} -Wno-c++11-long-long -fPIC -O2 -DNDEBUG "\
-DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -Wno-c++11-long-long -fPIC -O2 -DNDEBUG "\
-DITK_USE_GIT_PROTOCOL:BOOL=OFF \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DBUILD_TESTING:BOOL=OFF \
-DBUILD_EXAMPLES:BOOL=OFF \
-DCMAKE_INSTALL_PREFIX:PATH=${R_PACKAGE_DIR}/libs/ \
Expand All @@ -75,9 +75,7 @@ cmake \
-DITKGroup_Segmentation=ON \
-DModule_AdaptiveDenoising:BOOL=ON \
-DModule_GenericLabelInterpolator:BOOL=ON \
-DCMAKE_C_VISIBILITY_PRESET:BOOL=hidden \
-DCMAKE_CXX_VISIBILITY_PRESET:BOOL=hidden \
-DCMAKE_VISIBILITY_INLINES_HIDDEN:BOOL=ON ../itksource/
../itksource/
make -j ${j:-4}
#make install
cd ../
2 changes: 1 addition & 1 deletion scripts/configure_VTK.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ cmake \
-DCMAKE_BUILD_TYPE:STRING="${CMAKE_BUILD_TYPE}" \
-DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} -Wno-c++11-long-long -fPIC -O2 -DNDEBUG "\
-DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -Wno-c++11-long-long -fPIC -O2 -DNDEBUG "\
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DBUILD_TESTING:BOOL=OFF \
-DBUILD_EXAMPLES:BOOL=OFF \
-DVTK_LEGACY_REMOVE:BOOL=OFF \
Expand Down