Skip to content

Commit 8160947

Browse files
committed
docs(native): describe how to build and test with pixi
1 parent 48b4043 commit 8160947

File tree

3 files changed

+5
-170
lines changed

3 files changed

+5
-170
lines changed

dev-utils/itk-wasm-native-build.sh

Lines changed: 0 additions & 68 deletions
This file was deleted.

dev-utils/itk-wasm-native-get-source.sh

Lines changed: 0 additions & 43 deletions
This file was deleted.

docs/development/hacking_itk_wasm.md

Lines changed: 5 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -36,66 +36,12 @@ ITK-Wasm's [C++ core](../introduction/parts.md#cxx-core) can be developed with n
3636
2. Build the `WebAssemblyInterface` module from this module against ITK
3737
3. Run the tests
3838

39-
We recommend using the scripts provided in [dev-utils](../../dev-utils/) folder
40-
to [grab the source code](../../dev-utils/itk-wasm-native-get-source.sh) and run [native build commands](../../dev-utils/itk-wasm-native-build.sh).
41-
Note that you will need to include certain CXX compiler flags for the native windows build as shown in the script.
42-
The build script also demonstrates how to native build sub-packages such as @itk-wasm/dicom with additional ITK dependencies turned on.
39+
We recommend using [pixi](https://pixi.sh) with a bash shell (including on Windows).
40+
The steps to build and test the C++ core with a native toolchain are:
4341

44-
From a command line, these steps in brief are:
45-
46-
```sh
47-
# For Windows build (with mingw-bash or git-bash terminal)
48-
export CXXFLAGS="/Zc:__cplusplus /DNOMINMAX"
49-
50-
# Build ITK
51-
git clone https://github.com/InsightSoftwareConsortium/ITK --branch=itkwasm-main-mutable
52-
# cmake -BITK-build -SITK -DBUILD_TESTING=OFF -DModule_MeshToPolyData=ON -DITK_MSVC_STATIC_RUNTIME_LIBRARY=ON
53-
cmake -BITK-build -SITK \
54-
-DBUILD_TESTING=OFF \
55-
-DCMAKE_CXX_STANDARD:STRING=17 \
56-
-DCMAKE_BUILD_TYPE:STRING=Debug \
57-
-DCMAKE_CONFIGURATION_TYPES:STRING=Debug \
58-
-DBUILD_EXAMPLES:BOOL=OFF \
59-
-DBUILD_TESTING:BOOL=OFF \
60-
-DBUILD_SHARED_LIBS=OFF \
61-
-DBUILD_STATIC_LIBS=ON \
62-
-DDCMTK_LINK_STATIC=ON \
63-
-DITK_LEGACY_REMOVE:BOOL=ON \
64-
-DITK_BUILD_DEFAULT_MODULES:BOOL=ON \
65-
-DModule_MeshToPolyData=ON \
66-
-DDO_NOT_BUILD_ITK_TEST_DRIVER:BOOL=ON \
67-
-DOPJ_USE_THREAD:BOOL=OFF \
68-
-DDCMTK_WITH_THREADS:BOOL=OFF \
69-
-DDCMTK_BUILD_APPS:BOOL=OFF \
70-
-DNO_FLOAT_EXCEPTIONS:BOOL=ON \
71-
-DITK_MSVC_STATIC_RUNTIME_LIBRARY=ON
72-
cmake --build ITK-build --config Debug -j16
73-
74-
# Build the WebAssemblyInterface module from this module against ITK
75-
git clone https://github.com/InsightSoftwareConsortium/ITK-Wasm
76-
cmake -BITK-Wasm-build \
77-
-SITK-Wasm \
78-
-DBUILD_TESTING=ON \
79-
-DCMAKE_CXX_STANDARD:STRING=20 \
80-
-DCMAKE_BUILD_TYPE:STRING=Debug \
81-
-DCMAKE_CONFIGURATION_TYPES:STRING=Debug \
82-
-DBUILD_SHARED_LIBS=OFF \
83-
-DITK_DIR=$PWD/ITK-build
84-
cmake --build ITK-Wasm-build --config Debug -j16
85-
86-
# Run the tests
87-
ctest --test-dir itk-wasm-build
88-
89-
cmake -Bpackages-dicom \
90-
-SITK-Wasm/packages/dicom \
91-
-DBUILD_TESTING=ON \
92-
-DCMAKE_CXX_STANDARD:STRING=20 \
93-
-DCMAKE_BUILD_TYPE:STRING=Debug \
94-
-DCMAKE_CONFIGURATION_TYPES:STRING=Debug \
95-
-DITK_DIR=$PWD/ITK-build
96-
97-
cmake --build packages-dicom --config Debug -j16
98-
```
42+
1. Install pixi: `curl -fsSL https://pixi.sh/install.sh | bash`
43+
2. Clone [the ITK-Wasm GitHub repository](https://github.com/InsightSoftwareConsortium/ITK-Wasm)
44+
3. Run `pixi run test-itk-wasm`
9945

10046
For additional guidance on C++ development, see the [ITK Software Guide].
10147

0 commit comments

Comments
 (0)