| 1 |
set shell := ['bash', '-ceuo', 'pipefail'] |
| 2 |
|
| 3 |
cpp_version := "17" |
| 4 |
build_type := "RelWithDebInfo" |
| 5 |
|
| 6 |
@default: test |
| 7 |
|
| 8 |
@all: test build-docs build-docker build-static build-cpp98 build-conda |
| 9 |
|
| 10 |
@configure: |
| 11 |
mkdir -p build; \ |
| 12 |
cd build; \ |
| 13 |
cmake -GNinja \ |
| 14 |
-D CMAKE_BUILD_TYPE={{ build_type }} \ |
| 15 |
-D CMAKE_CXX_STANDARD={{ cpp_version }} \ |
| 16 |
-D CMAKE_INSTALL_PREFIX=$(conda info --json | jq -r .default_prefix) \ |
| 17 |
.. |
| 18 |
|
| 19 |
@autoconfigure: |
| 20 |
if [ ! -f "build/build.ninja" ]; then \ |
| 21 |
echo "Ninja file not found. Running cmake..."; \ |
| 22 |
just configure; \ |
| 23 |
fi |
| 24 |
|
| 25 |
@build: autoconfigure |
| 26 |
cd build && ninja |
| 27 |
|
| 28 |
@test: build |
| 29 |
cd build/tests && ./test_ismrmrd |
| 30 |
|
| 31 |
@install: test |
| 32 |
cd build && ninja install |
| 33 |
|
| 34 |
@build-docker: |
| 35 |
./docker/build-images.sh; \ |
| 36 |
./docker/test-images.sh |
| 37 |
|
| 38 |
@build-static: |
| 39 |
./docker/build-and-test-variant.sh static |
| 40 |
|
| 41 |
@build-cpp98: |
| 42 |
./docker/build-and-test-variant.sh cpp98 |
| 43 |
|
| 44 |
@build-docs: autoconfigure |
| 45 |
cd build && ninja doc |
| 46 |
|
| 47 |
@build-conda: |
| 48 |
bash -il ./conda/setup-conda-build.sh; \ |
| 49 |
cd conda && ./package.sh |