Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cil #154

Merged
merged 144 commits into from
Oct 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
f6910a8
added CIL (ccpi-framework) to the dependency
paskino Jul 29, 2018
36217fd
Adds CIL to the SuperBuild
paskino Jul 29, 2018
7f6955b
uses version_config to set ccpi/cil versions
paskino Jul 29, 2018
e54712f
reflects changes to CCPi-RGL
paskino Aug 20, 2018
01b41ae
builds latest master
paskino Aug 20, 2018
cc47c52
points to spdhg branch
paskino Sep 21, 2018
50830ce
Added CCPi-FrameworkPlugins as CIL dependency
paskino Sep 21, 2018
e244b1a
updated Gadgetron and ISMRMRD tags
paskino Oct 9, 2018
4205dbc
Merge branch 'master' into ubuntu18.04
paskino Oct 9, 2018
a652614
Merge branch 'master' into ubuntu18.04
paskino Oct 23, 2018
90740d5
set gadgetron version to 3.17.0
paskino Oct 23, 2018
d23f78c
fix typo
paskino Oct 24, 2018
147a557
Merge branch 'master' into add_cil
paskino Nov 16, 2018
520c70b
fix to CIL commit hash
paskino Nov 16, 2018
6b1ff05
comments removed
paskino Nov 16, 2018
2885fbc
CCPi-Regularisation-Toolkit depends on Cython
paskino Nov 16, 2018
fa47308
removed External_CIL.cmake
paskino Nov 16, 2018
bb541e4
removed reference to hackathor repo
paskino Nov 16, 2018
c3dacbe
added date and right package name
paskino Nov 23, 2018
1f5ad30
added reference to LICENSE
paskino Nov 23, 2018
07acf19
added BUILD_CIL option
paskino Nov 23, 2018
bc27a0b
updated date
paskino Nov 23, 2018
85ca375
Merge branch 'gcc6' into ubuntu18.04
Dec 8, 2018
a2f24b0
updated boost to 1.65.1 for Gadgetron
Dec 9, 2018
edd8628
[TRAVIS] update gcc
Dec 9, 2018
7bfd43f
[TRAVIS] on trusty, use gcc-7 with our own ACE
Dec 9, 2018
b36b0fd
Merge remote-tracking branch 'origin/master' into ubuntu18.04
Dec 9, 2018
eb22e04
Merge branch 'master' into ubuntu18.04
Dec 9, 2018
bbce834
Merge branch 'master' into ubuntu18.04
KrisThielemans Dec 14, 2018
9db7f7d
[TRAVIS] forgot to replace gcc-5 with gcc-6
KrisThielemans Dec 14, 2018
3a0e11a
update CIL versions to master
paskino Jan 8, 2019
5617455
Merge branch 'add_cil' of https://github.com/CCPPETMR/SIRF-SuperBuild…
paskino Jan 8, 2019
ceeddc0
Merge branch 'master' into add_cil
paskino Jan 8, 2019
101bb79
Merge remote-tracking branch 'origin' into ubuntu18.04
paskino Feb 8, 2019
0c6c613
removed names for licensing issues
paskino Feb 8, 2019
3a113f1
remove names for licensing
paskino Feb 8, 2019
cf32f9c
removed names for licensing issues
paskino Feb 8, 2019
a2e70b2
Merge branch 'add_cil' of https://github.com/CCPPETMR/SIRF-SuperBuild…
paskino Feb 11, 2019
4c66176
Merge remote-tracking branch 'origin' into add_cil
paskino Feb 11, 2019
b431327
need to pass env variable during build
paskino Feb 11, 2019
17514b5
Merge branch 'master' into ubuntu18.04
paskino Mar 4, 2019
97ec1a4
Merge remote-tracking branch 'origin/ubuntu18.04' into add_cil
paskino Mar 14, 2019
db0cb7b
Merge remote-tracking branch 'origin/master' into add_cil
paskino Mar 14, 2019
43178e2
updated CIL build
paskino Mar 15, 2019
3ca2531
fixed text
paskino Mar 22, 2019
43cc82b
adds version of CIL repos
paskino Mar 22, 2019
de1c6bd
use variable CIL_VERSION
paskino Mar 22, 2019
ada6d50
use specific version of CIL for default build and master in DEVEL_BUILD
paskino Mar 22, 2019
26b9b39
Merge branch 'master' into add_cil
paskino Mar 22, 2019
e581da2
removed hard coded version
paskino Mar 22, 2019
685f0d8
removed comments
paskino Mar 22, 2019
cd996d4
removed hard coded CIL_VERSION
paskino Mar 22, 2019
eb3555b
match version config of master
paskino Mar 23, 2019
2318d2e
set default version to current stable 1.1.1
paskino Mar 25, 2019
476f3cb
adds build of CIL modules
paskino Mar 25, 2019
7e4c193
added test phase
paskino Mar 25, 2019
d4c6aa6
add cython as dependency to build CIL modules
paskino Mar 26, 2019
acb8f23
build command update
paskino Mar 26, 2019
6c3c182
Merge branch 'add_cil' of https://github.com/CCPPETMR/SIRF-SuperBuild…
paskino Mar 26, 2019
2f3f07d
remove build boost in CIL build
paskino Mar 26, 2019
3268078
simplified matrix
paskino Mar 27, 2019
c5bbc3b
not build gadgetron
paskino Mar 27, 2019
44eb833
add CIL Framework Test in SuperBuild
paskino Mar 27, 2019
5e15cf1
add cil build
paskino Mar 27, 2019
1108c0d
builds boost
paskino Mar 28, 2019
9cd354a
build only CIL
paskino Mar 28, 2019
12c89b2
add cython for CIL
paskino Mar 29, 2019
d31ad8f
add numpy
paskino Mar 29, 2019
c79d9ef
pip install cython and numpy
paskino Mar 29, 2019
c67d2c0
add CIL to docker, minor travis tidy
casperdcl Mar 29, 2019
20dea0c
re-enable docker
casperdcl Mar 29, 2019
0e521a2
cython from apt numpy from pip
paskino Mar 29, 2019
df69306
to revert probably
casperdcl Mar 29, 2019
b004e7e
pass the Python Executable
paskino Mar 29, 2019
9487b95
installs numpy from apt
paskino Mar 29, 2019
9e95fee
build the add_to_sirf_classes branch of SIRF
paskino Mar 29, 2019
a752ff6
Merge branch 'add_cil' of https://github.com/CCPPETMR/SIRF-SuperBuild…
paskino Mar 29, 2019
b6a201b
merge master .travis.yml
paskino Mar 29, 2019
b1f69de
modify FindCython and remove OSX builds
paskino Apr 2, 2019
11e656d
add cil build
paskino Apr 2, 2019
dd1b643
add cil build
paskino Apr 2, 2019
ce7ebff
install cython and numpy via pip
paskino Apr 2, 2019
4c8a381
Merge branch 'master' into add_cil
paskino Apr 8, 2019
642886d
fix indent and test phase
paskino Apr 8, 2019
e7e8d95
Add option Gadgetron_USE_MKL
paskino Apr 25, 2019
2aff173
moved option Gadgetron_USE_MKL
paskino May 1, 2019
7504a52
Merge remote-tracking branch 'origin' into add_cil
paskino May 2, 2019
52314c2
fixed conflicts
paskino May 2, 2019
d73b671
removed parenthesis
paskino May 2, 2019
4149f78
Merge remote-tracking branch 'origin/mkl_warning' into add_cil
paskino May 2, 2019
929119a
Merge remote-tracking branch 'origin/master' into add_cil
paskino Jul 1, 2019
a955860
updated CIL versions
paskino Jul 2, 2019
ea10bcf
use last CIL stable version
paskino Jul 9, 2019
0284132
fixed CIL versions
paskino Jul 15, 2019
58455e2
Merge branch 'master' into add_cil
paskino Sep 3, 2019
7c09193
added build for libastra
paskino Sep 4, 2019
481dccd
added build of astra python wrapper
paskino Sep 4, 2019
66e688d
fix build
paskino Sep 4, 2019
a37bd03
added CCPi-Astra
paskino Sep 4, 2019
6f66a73
copy TestData
paskino Sep 5, 2019
448445d
added environment variable SIRF_INSTALL_PATH
paskino Sep 5, 2019
07938a2
updated branch and add test
paskino Sep 9, 2019
9a800f7
does not build CUDA support if not found
paskino Sep 11, 2019
29028e9
ccpi framework branch
paskino Sep 11, 2019
f9862cb
Added TomoPhantom to create CT analytical phantoms/sinograms
paskino Sep 11, 2019
78ececd
fixed build of python wrapper
paskino Sep 24, 2019
5658cff
NIFTYREG to build libZ and libpng
paskino Sep 25, 2019
13d297d
renamed CCPi-RGL to CCPi-Regularisation-Toolkit
paskino Sep 25, 2019
1cdd2e3
added CIL dependencies
paskino Sep 26, 2019
b0777d3
add dependencies for CIL
paskino Sep 26, 2019
9c23601
added python-pil
paskino Sep 26, 2019
420f1cf
potential CIL dependency fix
casperdcl Sep 26, 2019
ab75adf
tidy deps
casperdcl Sep 26, 2019
5d259a7
travis py3 -> py3.6
casperdcl Sep 26, 2019
9f46c85
update SIRF branch
paskino Sep 27, 2019
a8ed0b0
Merge branch 'add_cil' of https://github.com/CCPPETMR/SIRF-SuperBuild…
paskino Sep 27, 2019
86cc19e
removed TomoPhantom
paskino Sep 27, 2019
ac181ea
Revert "removed TomoPhantom"
casperdcl Sep 27, 2019
432ff49
pass python vars into TomoPhantom
casperdcl Sep 27, 2019
2b5ec0d
builds specific branch of SIRF if CIL is built
paskino Oct 2, 2019
2358140
pass python executable to astra, add 2.7 for CIL
paskino Oct 2, 2019
e0a13e9
add wget for CIL_BUILDs
paskino Oct 2, 2019
f30be58
removed BUILD_CIL from docker builds
paskino Oct 2, 2019
e4ae893
modify docker build for CIL
paskino Oct 2, 2019
a7e0a62
Revert "removed BUILD_CIL from docker builds"
casperdcl Oct 2, 2019
5761333
fix docker CIL
casperdcl Oct 2, 2019
24ca979
add .dockerignore
casperdcl Oct 2, 2019
58353b5
docker conda distutils warning suppression/fix
casperdcl Oct 2, 2019
3802b54
pass SIRF/CIL tags at cmake time
paskino Oct 2, 2019
c04af38
Merge branch 'add_cil' of https://github.com/CCPPETMR/SIRF-SuperBuild…
paskino Oct 2, 2019
9f83fe9
safer docker build cache
casperdcl Oct 2, 2019
570937b
fix Edo merge
casperdcl Oct 2, 2019
ac23054
Merge remote-tracking branch 'origin/master' into add_cil
casperdcl Oct 2, 2019
3d48ff3
travis docker cache permissions fix
casperdcl Oct 2, 2019
2d634bf
try again to fix docker
casperdcl Oct 2, 2019
48bdca8
silly ommission
casperdcl Oct 2, 2019
51113fd
added 2019
paskino Oct 7, 2019
7fea0a8
Gadgetron requires at least Boost 1.65
paskino Oct 7, 2019
bd582aa
swapped master for add_cil branch
paskino Oct 7, 2019
213919f
removed dependecy from TomoPhantom
paskino Oct 7, 2019
d1808aa
added BUILD_CIL_LITE option
paskino Oct 7, 2019
d4a99c2
reviewed indentation
paskino Oct 7, 2019
841e808
add a BUILD_CIL_LITE=ON
paskino Oct 7, 2019
3f97f9a
add test to CIL_LITE
paskino Oct 7, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 40 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,27 @@ matrix:
include:
# linux g{cc,++}-6 py{27,3}
- os: linux
KrisThielemans marked this conversation as resolved.
Show resolved Hide resolved
python: 3
python: 3.6
# -boost +fftw3 +hdf5 +ace +cil
env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DBUILD_CIL=ON -DSIRF_TAG=origin/add_to_sirf_classes -DCCPi-Framework_TAG=origin/finite_diff_for_sirf" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3
- os: linux
python: 2.7
# -boost +fftw3 +hdf5 +ace +cil
env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DBUILD_CIL=ON -DSIRF_TAG=origin/add_to_sirf_classes -DCCPi-Framework_TAG=origin/finite_diff_for_sirf" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=2
- os: linux
python: 2.7
# -boost +fftw3 +hdf5 +ace +cil_lite
env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DBUILD_CIL_LITE=ON -DSIRF_TAG=origin/add_to_sirf_classes -DCCPi-Framework_TAG=origin/finite_diff_for_sirf" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=2
- os: linux
python: 3.6
# -boost +fftw3 +hdf5 +ace
env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3
- os: linux
python: 2.7
# -boost +fftw3 +hdf5 +siemens_to_ismrmrd +swig +ace
env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DBUILD_siemens_to_ismrmrd=ON -DUSE_SYSTEM_SWIG=ON -DUSE_SYSTEM_ACE=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=2
- os: linux
python: 3
python: 3.6
# +DEVEL -boost -hdf5 -fftw3 +ace +siemens_to_ismrmrd
env: EXTRA_BUILD_FLAGS="-DDEVEL_BUILD=ON -DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_FFTW3=OFF -DUSE_SYSTEM_ACE=ON -DBUILD_siemens_to_ismrmrd=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3
- os: linux
Expand All @@ -50,7 +62,7 @@ matrix:
# env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_SWIG=OFF" MATRIX_EVAL="CC=gcc CXX=g++" PYMVER=2
# - os: osx
# # +boost +fftw3 -hdf5 -swig
# python: 3
# python: 3.6
# env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_SWIG=OFF" MATRIX_EVAL="CC=gcc CXX=g++" PYMVER=3
# - os: osx
# python: 2.7
Expand All @@ -62,7 +74,7 @@ matrix:
# env: EXTRA_BUILD_FLAGS="-DDEVEL_BUILD=ON -DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_FFTW3=OFF -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_SWIG=ON" MATRIX_EVAL="CC=gcc CXX=g++" PYMVER=2
# itk
- os: linux
python: 3
python: 3.6
# -boost +itk +fftw3 +hdf5
env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_ITK=ON -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3
# - os: osx
Expand Down Expand Up @@ -120,6 +132,12 @@ addons:
- libxslt-dev
- libace-dev
# - root-system-bin
# dependencies for ASTRA toolbox
- autotools-dev
- automake
- autogen
- autoconf
- libtool

before_install:
# Set C and C++ compiler etc using trick from
Expand Down Expand Up @@ -207,6 +225,17 @@ before_install:
- $PY_EXE -m pip install --user -U pip setuptools wheel
# ensure python bin dir exists (and coverage dependencies installed)
- $PY_EXE -m pip install --user -U nose codecov coveralls
# additional python deps
- $PY_EXE -m pip install --user -U Cython # first install Cython separately
- $PY_EXE -m pip install --user -U numpy
- |
if [[ "$EXTRA_BUILD_FLAGS" == *"-DBUILD_CIL=ON"* ]]; then
$PY_EXE -m pip install --user -U scipy h5py Pillow wget
fi
- |
if [[ "$EXTRA_BUILD_FLAGS" == *"-DBUILD_CIL_LITE=ON"* ]]; then
$PY_EXE -m pip install --user -U scipy h5py Pillow wget
fi
casperdcl marked this conversation as resolved.
Show resolved Hide resolved
# for counting clones, excluding ours
- |
if [[ -n "$GITHUB_API_TOKEN" ]]; then
Expand Down Expand Up @@ -236,6 +265,8 @@ install:
- |
if [[ -n "$DOCKER_BUILD" ]]; then
cd docker
[[ -n "$GROUPS" ]] || export GROUPS=$(id -g)
[[ -n "$UID" ]] || export UID=$(id -u)
export DCC="docker-compose -p "travis_${TRAVIS_JOB_NUMBER/./_}" -f $PWD/docker-compose.yml"
[[ "$DOCKER_BUILD" == *"DEVEL"* ]] && export DCC="$DCC -f $PWD/docker-compose.devel.yml"
[[ "$DOCKER_BUILD" == *"SERVICE"* ]] && export DCC="$DCC -f $PWD/docker-compose.srv.yml"
Expand All @@ -247,20 +278,22 @@ install:
# rebuild base image (using above docker cache)
# and sirf image (with travis' ccache)
rm -rf devel/.ccache
if [[ -n "$DOCKER_RECREATE_CCACHE" ]]; then
if [[ -n "$DOCKER_RECREATE_CCACHE" || ! -d ~/.ccache ]]; then
mkdir devel/.ccache
sudo rm -rf ~/.ccache
else
sudo chown -R $USER:$(id -g) ~/.ccache
mv ~/.ccache devel/
fi
rm .dockerignore # TODO: remove this line
$DCC build --pull core
# don't count the extra clone we're about to do
# TODO: Do we need this? Is docker a distinct cloner from travis?
# cloners_count_decrement
$DCC build sirf
# extract updated ccache
sudo rm -rf devel/.ccache/*
$DCC run --rm sirf /bin/bash -c 'sudo cp -a /opt/ccache/* /devel/.ccache/'
# sudo rm -rf devel/.ccache/*
$DCC run --rm sirf /bin/bash -c 'sudo rm -rf /devel/.ccache/* && sudo cp -a /opt/ccache/* /devel/.ccache/'
# replace travis' ccache with the built images's
mv devel/.ccache ~
)
Expand Down
50 changes: 50 additions & 0 deletions CMake/FindCython.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# code adapted from
# https://github.com/symengine/symengine.py/blob/master/cmake/FindCython.cmake
paskino marked this conversation as resolved.
Show resolved Hide resolved
# MIT License https://github.com/symengine/symengine.py/blob/master/LICENSE
# 16/11/18
#
# Cython
#

# This finds the "cython" executable in your PATH, and then in some standard
# paths:
SET(CYTHON_EXECUTABLE cython CACHE STRING "Cython executable name")
KrisThielemans marked this conversation as resolved.
Show resolved Hide resolved
SET(CYTHON_FLAGS --cplus --fast-fail)

SET(Cython_FOUND FALSE)
IF (CYTHON_EXECUTABLE)
# Try to run Cython, to make sure it works:
execute_process(
COMMAND ${CYTHON_EXECUTABLE} "--version"
RESULT_VARIABLE CYTHON_RESULT
OUTPUT_QUIET
ERROR_QUIET
)
if (CYTHON_RESULT EQUAL 0)
# Only if cython exits with the return code 0, we know that all is ok:
SET(Cython_FOUND TRUE)
SET(Cython_Compilation_Failed FALSE)
else (CYTHON_RESULT EQUAL 0)
SET(Cython_Compilation_Failed TRUE)
endif (CYTHON_RESULT EQUAL 0)
ENDIF (CYTHON_EXECUTABLE)


IF (Cython_FOUND)
IF (NOT Cython_FIND_QUIETLY)
MESSAGE(STATUS "Found CYTHON: ${CYTHON_EXECUTABLE}")
ENDIF (NOT Cython_FIND_QUIETLY)
ELSE (Cython_FOUND)
IF (Cython_FIND_REQUIRED)
if(Cython_Compilation_Failed)
MESSAGE(STATUS "Found CYTHON: ${CYTHON_EXECUTABLE}")
# On Win the testing of Cython does not return any accessible value, so the test is not carried out. Fresh Cython install was tested and works.
IF(NOT MSVC)
MESSAGE(FATAL_ERROR "Your Cython version is too old. Please upgrade Cython.")
ENDIF(NOT MSVC)
else(Cython_Compilation_Failed)
MESSAGE(FATAL_ERROR "Could not find Cython. Please install Cython.")
endif(Cython_Compilation_Failed)
ENDIF (Cython_FIND_REQUIRED)
ENDIF (Cython_FOUND)

21 changes: 21 additions & 0 deletions SuperBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ option(BUILD_STIR "Build STIR" ON)
option(BUILD_Gadgetron "Build Gadgetron" ${build_Gadgetron_default})
option(BUILD_siemens_to_ismrmrd "Build siemens_to_ismrmrd" OFF)
option(BUILD_petmr_rd_tools "Build petmr_rd_tools" OFF)
option(BUILD_CIL "Build CCPi CIL Modules and ASTRA engine" OFF)
option(BUILD_CIL_LITE "Build CCPi CIL Modules" OFF)
Comment on lines +170 to +171
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to have BUILD_CIL and BUILD_ASTRA separately? Or BUILD_CIL_STRATEGY CACHE STRING "FULL NO_ASTRA"?

option(BUILD_NIFTYREG "Build NIFTYREG" ON)

option(BUILD_SIRF_Registration "Build SIRFS's registration functionality" ${BUILD_NIFTYREG})
Expand Down Expand Up @@ -214,6 +216,25 @@ if (BUILD_petmr_rd_tools)
list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES petmr_rd_tools)
endif()

if ("${PYTHON_STRATEGY}" STREQUAL "CONDA")
set (BUILD_CIL OFF)
Copy link
Member

@casperdcl casperdcl Oct 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paskino should also set(BUILD_CIL_LITE OFF)?

endif()
Comment on lines +219 to +221
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is BUILD_CIL overridden for conda?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because it's not developed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does that mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it means that I developed only the installation for PYTHONPATH.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right... not sure if that will work then. Surely the VM uses conda?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No the VM uses system python and PYTHONPATH. I think Travis and docker use conda.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kewl but as per https://github.com/CCPPETMR/SIRF-SuperBuild/blob/7354e5c9feafa46314df02be7ea508d472c4a56a/SuperBuild.cmake#L113-L116 there's no harm in using CONDA. It just means that whoever runs the build will be responsible for manually installing python modules themselves.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case I don't think it should be there as an option.

if (APPLE)
if (BUILD_CIL or BUILD_CIL_LITE)
message(FATAL_ERROR "CIL Modules are not tested on OSX and will be disabled")
else()
message(WARNING "CIL Modules are not tested on OSX and will be disabled")
endif()
set(BUILD_CIL OFF)
set(BUILD_CIL_LITE OFF)
endif()
if (BUILD_CIL)
KrisThielemans marked this conversation as resolved.
Show resolved Hide resolved
list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES CCPi-Regularisation-Toolkit CCPi-Astra CCPi-Framework CCPi-FrameworkPlugins TomoPhantom)
endif()
if (BUILD_CIL_LITE)
list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES CCPi-Regularisation-Toolkit CCPi-Framework CCPi-FrameworkPlugins)
endif()

if (BUILD_SIRF_Registration)
list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES NIFTYREG)
endif()
Expand Down
92 changes: 92 additions & 0 deletions SuperBuild/External_CCPi-Astra.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#========================================================================
# Author: Edoardo Pasca
# Copyright 2018-2019 STFC
#
# This file is part of the CCP PETMR Synergistic Image Reconstruction Framework (SIRF) SuperBuild.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0.txt
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#=========================================================================

#This needs to be unique globally
set(proj CCPi-Astra)

# Set dependency list
set(${proj}_DEPENDENCIES "CCPi-Framework;astra-toolbox")

# Include dependent projects if any
ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${proj}_DEPENDENCIES)

# Set external name (same as internal for now)
set(externalProjName ${proj})

set(${proj}_SOURCE_DIR "${SOURCE_ROOT_DIR}/${proj}" )
set(${proj}_BINARY_DIR "${SUPERBUILD_WORK_DIR}/builds/${proj}/build" )
set(${proj}_DOWNLOAD_DIR "${SUPERBUILD_WORK_DIR}/downloads/${proj}" )
set(${proj}_STAMP_DIR "${SUPERBUILD_WORK_DIR}/builds/${proj}/stamp" )
set(${proj}_TMP_DIR "${SUPERBUILD_WORK_DIR}/builds/${proj}/tmp" )

if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalProjName}}" ) )
message(STATUS "${__indent}Adding project ${proj}")

### --- Project specific additions here
set(libcilreg_Install_Dir ${SUPERBUILD_INSTALL_DIR})

#message(STATUS "HDF5_ROOT in External_SIRF: " ${HDF5_ROOT})
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${SUPERBUILD_INSTALL_DIR})
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${SUPERBUILD_INSTALL_DIR})


message("${proj} URL " ${${proj}_URL} )
message("${proj} TAG " ${${proj}_TAG} )
# conda build should never get here
if("${PYTHON_STRATEGY}" STREQUAL "PYTHONPATH")
# in case of PYTHONPATH it is sufficient to copy the files to the
# $PYTHONPATH directory
ExternalProject_Add(${proj}
${${proj}_EP_ARGS}
GIT_REPOSITORY ${${proj}_URL}
GIT_TAG ${${proj}_TAG}
SOURCE_DIR ${${proj}_SOURCE_DIR}
BINARY_DIR ${${proj}_BINARY_DIR}
DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR}
STAMP_DIR ${${proj}_STAMP_DIR}
TMP_DIR ${${proj}_TMP_DIR}
INSTALL_DIR ${libcilreg_Install_Dir}

CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${${proj}_SOURCE_DIR}/Wrappers/Python/ccpi ${PYTHON_DEST}/ccpi
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir}
DEPENDS ${${proj}_DEPENDENCIES}
)

else()
# if SETUP_PY one can launch the conda build.sh script setting
# the appropriate variables.
message(FATAL_ERROR "Only PYTHONPATH install method is currently supported")
endif()


set(${proj}_ROOT ${${proj}_SOURCE_DIR})
set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR})

else()
ExternalProject_Add_Empty(${proj} DEPENDS "${${proj}_DEPENDENCIES}"
SOURCE_DIR ${${proj}_SOURCE_DIR}
BINARY_DIR ${${proj}_BINARY_DIR}
DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR}
STAMP_DIR ${${proj}_STAMP_DIR}
TMP_DIR ${${proj}_TMP_DIR}
)
endif()
102 changes: 102 additions & 0 deletions SuperBuild/External_CCPi-Framework.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
#========================================================================
# Author: Edoardo Pasca
# Copyright 2018-2019 STFC
#
# This file is part of the CCP PETMR Synergistic Image Reconstruction Framework (SIRF) SuperBuild.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0.txt
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#=========================================================================

#This needs to be unique globally
set(proj CCPi-Framework)

# Set dependency list
set(${proj}_DEPENDENCIES "")

# Include dependent projects if any
ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${proj}_DEPENDENCIES)

# Set external name (same as internal for now)
set(externalProjName ${proj})

set(${proj}_SOURCE_DIR "${SOURCE_ROOT_DIR}/${proj}" )
set(${proj}_BINARY_DIR "${SUPERBUILD_WORK_DIR}/builds/${proj}/build" )
set(${proj}_DOWNLOAD_DIR "${SUPERBUILD_WORK_DIR}/downloads/${proj}" )
set(${proj}_STAMP_DIR "${SUPERBUILD_WORK_DIR}/builds/${proj}/stamp" )
set(${proj}_TMP_DIR "${SUPERBUILD_WORK_DIR}/builds/${proj}/tmp" )

if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalProjName}}" ) )
message(STATUS "${__indent}Adding project ${proj}")

### --- Project specific additions here
set(libcilreg_Install_Dir ${SUPERBUILD_INSTALL_DIR})

set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${SUPERBUILD_INSTALL_DIR})
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${SUPERBUILD_INSTALL_DIR})

message("${proj} URL " ${${proj}_URL} )
message("${proj} TAG " ${${proj}_TAG} )

# conda build should never get here
if("${PYTHON_STRATEGY}" STREQUAL "PYTHONPATH")
# in case of PYTHONPATH it is sufficient to copy the files to the
# $PYTHONPATH directory
ExternalProject_Add(${proj}
${${proj}_EP_ARGS}
GIT_REPOSITORY ${${proj}_URL}
GIT_TAG ${${proj}_TAG}
SOURCE_DIR ${${proj}_SOURCE_DIR}
BINARY_DIR ${${proj}_BINARY_DIR}
DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR}
STAMP_DIR ${${proj}_STAMP_DIR}
TMP_DIR ${${proj}_TMP_DIR}
INSTALL_DIR ${libcilreg_Install_Dir}

CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${${proj}_SOURCE_DIR}/Wrappers/Python/ccpi ${PYTHON_DEST}/ccpi && ${CMAKE_COMMAND} -E copy_directory ${${proj}_SOURCE_DIR}/Wrappers/Python/data ${SUPERBUILD_INSTALL_DIR}/share/ccpi/
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir}
DEPENDS ${${proj}_DEPENDENCIES}
)

else()
# if SETUP_PY one can launch the conda build.sh script setting
# the appropriate variables.
message(FATAL_ERROR "Only PYTHONPATH install method is currently supported")
endif()


set(${proj}_ROOT ${${proj}_SOURCE_DIR})
set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR})

add_test(NAME CIL_FRAMEWORK_TESTS_1
COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -p test_Data*.py
WORKING_DIRECTORY ${${proj}_SOURCE_DIR}/Wrappers/Python/test)
add_test(NAME CIL_FRAMEWORK_TESTS_2
COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -p test_algor*.p
WORKING_DIRECTORY ${${proj}_SOURCE_DIR}/Wrappers/Python/test)
add_test(NAME CIL_FRAMEWORK_TESTS_3
COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -p test_run_*.py
WORKING_DIRECTORY ${${proj}_SOURCE_DIR}/Wrappers/Python/test)

else()
ExternalProject_Add_Empty(${proj} DEPENDS "${${proj}_DEPENDENCIES}"
SOURCE_DIR ${${proj}_SOURCE_DIR}
BINARY_DIR ${${proj}_BINARY_DIR}
DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR}
STAMP_DIR ${${proj}_STAMP_DIR}
TMP_DIR ${${proj}_TMP_DIR}
)
endif()
Loading