Skip to content

Commit

Permalink
Merge pull request #23005 from ghisvail/ants
Browse files Browse the repository at this point in the history
Add recipe for ANTs
  • Loading branch information
ocefpaf authored Jun 22, 2023
2 parents aea5e3e + ee0638a commit 99b48f0
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
18 changes: 18 additions & 0 deletions recipes/ants/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
mkdir build
if errorlevel 1 exit 1
cd build
if errorlevel 1 exit 1

cmake -G Ninja ^
%CMAKE_ARGS% ^
-DCMAKE_INSTALL_LIBDIR:STRING=%LIBRARY_LIB% ^
-DCMAKE_INSTALL_PREFIX:STRING=%LIBRARY_PREFIX% ^
-DCMAKE_PREFIX_PATH:STRING=%LIBRARY_PREFIX% ^
-DBUILD_SHARED_LIBS:BOOL=ON ^
-DANTS_SUPERBUILD:BOOL=OFF ^
-DUSE_SYSTEM_ITK:BOOL=ON ^
%SRC_DIR%
if errorlevel 1 exit 1

cmake --build . --config RelWithDebInfo --parallel %CPU_COUNT% --target install
if errorlevel 1 exit 1
31 changes: 31 additions & 0 deletions recipes/ants/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash

# Abort on error.
set -ex

# Build out-of-tree.
mkdir build
cd build

# Config
cmake -G Ninja \
${CMAKE_ARGS} \
-DANTS_SUPERBUILD:BOOL=OFF \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_INSTALL_LIBDIR:STRING=lib \
-DCMAKE_INSTALL_PREFIX:STRING=${PREFIX} \
-DCMAKE_PREFIX_PATH:STRING=${PREFIX} \
-DRUN_SHORT_TESTS:BOOL=ON \
-DRUN_LONG_TESTS:BOOL=OFF \
-DUSE_SYSTEM_ITK:BOOL=ON \
${SRC_DIR}

# Build
cmake --build . --config Release --parallel ${CPU_COUNT}

# Test
ctest -C Release --output-on-failure

# Install
cmake --build . --config Release --target install
43 changes: 43 additions & 0 deletions recipes/ants/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{% set name = "ANTs" %}
{% set version = "2.4.4" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/ANTsX/ANTs/archive/v{{ version }}.tar.gz
sha256: 3a872ae60f00665c7b77b5d3727b1f9e5edaf33fe96024abb3289cee917e11d6

build:
number: 0
skip: true # [win]

requirements:
build:
- {{ compiler('cxx') }}
- cmake >=3.16.3
- ninja
host:
- boost-cpp
- libitk-devel
run:
- libitk

test:
commands:
- antsRegistration --help

about:
home: http://stnava.github.io/ANTs/
license: BSD-3-Clause
license_family: BSD
license_file: COPYING.txt
summary: >
ANTs computes high-dimensional mappings to capture the statistics of brain structure and function
doc_url: http://stnava.github.io/ANTsDoc
dev_url: https://github.com/ANTsX/ANTs/wiki

extra:
recipe-maintainers:
- ghisvail

0 comments on commit 99b48f0

Please sign in to comment.