Skip to content

Commit ed29f8d

Browse files
committed
Merge pull request #7 from thewtex/ExternalBuild
External build
2 parents 9769dd1 + d8c4fbe commit ed29f8d

File tree

7 files changed

+101
-4
lines changed

7 files changed

+101
-4
lines changed

CMakeLists.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
project( MinimalPathExtraction )
2-
set( MinimalPathExtraction_LIBRARIES MinimalPathExtraction )
3-
itk_module_impl()
1+
cmake_minimum_required(VERSION 2.8.9)
2+
project(MinimalPathExtraction)
3+
set(MinimalPathExtraction_LIBRARIES MinimalPathExtraction)
4+
5+
if(NOT ITK_SOURCE_DIR)
6+
find_package(ITK REQUIRED)
7+
list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR})
8+
include(ITKModuleExternal)
9+
else()
10+
itk_module_impl()
11+
endif()

CTestConfig.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
set(CTEST_PROJECT_NAME "ITK")
2+
set(CTEST_NIGHTLY_START_TIME "1:00:00 UTC")
3+
4+
set(CTEST_DROP_METHOD "http")
5+
set(CTEST_DROP_SITE "open.cdash.org")
6+
set(CTEST_DROP_LOCATION "/submit.php?project=Insight")
7+
set(CTEST_DROP_SITE_CDASH TRUE)

include/itkPhysicalCentralDifferenceImageFunction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class ITK_EXPORT PhysicalCentralDifferenceImageFunction :
147147

148148
} // end namespace itk
149149

150-
#if ITK_TEMPLATE_TXX
150+
#ifndef ITK_MANUAL_INSTANTIATION
151151
# include "itkPhysicalCentralDifferenceImageFunction.hxx"
152152
#endif
153153

test/Docker/Dockerfile

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
FROM debian:8
2+
MAINTAINER Insight Software Consortium <[email protected]>
3+
4+
RUN apt-get update && apt-get install -y \
5+
build-essential \
6+
curl \
7+
cmake \
8+
git \
9+
libexpat1-dev \
10+
libhdf5-dev \
11+
libjpeg-dev \
12+
libpng12-dev \
13+
libpython3-dev \
14+
libtiff5-dev \
15+
python \
16+
ninja-build \
17+
wget \
18+
vim \
19+
zlib1g-dev
20+
21+
RUN mkdir -p /usr/src/ITKMinimalPathExtraction-build
22+
WORKDIR /usr/src
23+
24+
# 2015-09-17
25+
ENV ITK_GIT_TAG af1a72fc24ad8e58be0e9af71d791043dcdbca1a
26+
RUN git clone git://itk.org/ITK.git && \
27+
cd ITK && \
28+
git checkout ${ITK_GIT_TAG} && \
29+
cd ../ && \
30+
mkdir ITK-build && \
31+
cd ITK-build && \
32+
cmake \
33+
-G Ninja \
34+
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
35+
-DBUILD_EXAMPLES:BOOL=OFF \
36+
-DBUILD_TESTING:BOOL=OFF \
37+
-DBUILD_SHARED_LIBS:BOOL=ON \
38+
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON \
39+
-DITK_LEGACY_REMOVE:BOOL=ON \
40+
-DITK_BUILD_DEFAULT_MODULES:BOOL=OFF \
41+
-DITK_USE_SYSTEM_LIBRARIES:BOOL=ON \
42+
-DModule_ITKOptimizers:BOOL=ON \
43+
-DModule_ITKPath:BOOL=ON \
44+
-DModule_ITKFastMarching:BOOL=ON \
45+
-DModule_ITKTestKernel:BOOL=ON \
46+
-DModule_ITKIOSpatialObjects:BOOL=ON \
47+
../ITK && \
48+
ninja && \
49+
find . -name '*.o' -delete
50+

test/Docker/build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
script_dir="`cd $(dirname $0); pwd`"
4+
5+
docker build -t insighttoolkit/minimalpathextraction-test $script_dir

test/Docker/run.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
3+
script_dir="`cd $(dirname $0); pwd`"
4+
5+
docker run \
6+
--rm \
7+
-v $script_dir/../..:/usr/src/ITKMinimalPathExtraction \
8+
insighttoolkit/minimalpathextraction-test \
9+
/usr/src/ITKMinimalPathExtraction/test/Docker/test.sh

test/Docker/test.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
# This is a script to build the modules and run the test suite in the base
4+
# Docker container.
5+
6+
die() {
7+
echo "Error: $@" 1>&2
8+
exit 1;
9+
}
10+
11+
cd /usr/src/ITKMinimalPathExtraction-build || die "Could not cd into the build directory"
12+
13+
cmake \
14+
-G Ninja \
15+
-DITK_DIR:PATH=/usr/src/ITK-build \
16+
-DCMAKE_BUILD_TYPE:STRING=Release \
17+
/usr/src/ITKMinimalPathExtraction || die "CMake configuration failed"
18+
ctest -VV -D Experimental || die "ctest failed"

0 commit comments

Comments
 (0)