From 1f59932660e0db29a1452abe3dc058f20d7dddce Mon Sep 17 00:00:00 2001 From: Ashley Anderson Date: Tue, 5 Apr 2022 06:38:39 -0400 Subject: [PATCH] Compile with shared ITK/VTK, add basic cibuildwheel config for linux. --- cibuildwheel.toml | 7 +++++++ scripts/configure_ITK.sh | 6 ++---- scripts/configure_VTK.sh | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 cibuildwheel.toml diff --git a/cibuildwheel.toml b/cibuildwheel.toml new file mode 100644 index 00000000..a84cd8d3 --- /dev/null +++ b/cibuildwheel.toml @@ -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" diff --git a/scripts/configure_ITK.sh b/scripts/configure_ITK.sh index 43194928..5efb3d25 100755 --- a/scripts/configure_ITK.sh +++ b/scripts/configure_ITK.sh @@ -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/ \ @@ -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 ../ diff --git a/scripts/configure_VTK.sh b/scripts/configure_VTK.sh index 0c620641..90a859db 100755 --- a/scripts/configure_VTK.sh +++ b/scripts/configure_VTK.sh @@ -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 \