From f6910a8aea3c06494cdc64c3907592d88fbc5461 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Sun, 29 Jul 2018 09:55:20 +0000 Subject: [PATCH 001/118] added CIL (ccpi-framework) to the dependency --- SuperBuild.cmake | 4 ++ SuperBuild/External_CIL.cmake | 129 ++++++++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+) create mode 100644 SuperBuild/External_CIL.cmake diff --git a/SuperBuild.cmake b/SuperBuild.cmake index 660a4a88..81ab1a96 100644 --- a/SuperBuild.cmake +++ b/SuperBuild.cmake @@ -158,6 +158,10 @@ if (BUILD_petmr_rd_tools) list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES petmr_rd_tools) endif() +if (BUILD_CIL) + list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES CIL) +endif() + ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${PRIMARY_PROJECT_NAME}_DEPENDENCIES) message(STATUS "") diff --git a/SuperBuild/External_CIL.cmake b/SuperBuild/External_CIL.cmake new file mode 100644 index 00000000..5e26ea47 --- /dev/null +++ b/SuperBuild/External_CIL.cmake @@ -0,0 +1,129 @@ +#======================================================================== +# Author: Benjamin A Thomas +# Author: Kris Thielemans +# Author: Edoardo Pasca +# Copyright 2017 University College London +# Copyright 2017 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 CIL) + +# 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}) + + #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}) + + set(ENV{CIL_VERSION} 0.10.1) + set(CIL_URL https://github.com/vais-ral/CCPi-Framework.git) + set(CIL_TAG origin/master) + message("CIL URL " ${${proj}_URL} ) + message("CIL 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. + 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 env CIL_VERSION=0.10.0 SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh + CMAKE_ARGS + -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} + DEPENDS + ${${proj}_DEPENDENCIES} + ) + endif() + + + set(${proj}_ROOT ${${proj}_SOURCE_DIR}) + set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR}) + + else() + if(${USE_SYSTEM_${externalProjName}}) + find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED) + message("USING the system ${externalProjName}, set ${externalProjName}_DIR=${${externalProjName}_DIR}") + endif() + 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() + + mark_as_superbuild( + VARS + ${externalProjName}_DIR:PATH + LABELS + "FIND_PACKAGE" + ) From 36217fdc20b7fc2a528d7c28416b2aed72de7b02 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Sun, 29 Jul 2018 20:38:53 +0000 Subject: [PATCH 002/118] Adds CIL to the SuperBuild Adds CCPi-Framework and CCPi-RGL requires additional packages: cython --- SuperBuild/External_CCPi-Framework.cmake | 129 +++++++++++++++++++++ SuperBuild/External_CCPi-RGL.cmake | 140 +++++++++++++++++++++++ SuperBuild/External_CIL.cmake | 76 +----------- 3 files changed, 270 insertions(+), 75 deletions(-) create mode 100644 SuperBuild/External_CCPi-Framework.cmake create mode 100644 SuperBuild/External_CCPi-RGL.cmake diff --git a/SuperBuild/External_CCPi-Framework.cmake b/SuperBuild/External_CCPi-Framework.cmake new file mode 100644 index 00000000..f45be88f --- /dev/null +++ b/SuperBuild/External_CCPi-Framework.cmake @@ -0,0 +1,129 @@ +#======================================================================== +# Author: Benjamin A Thomas +# Author: Kris Thielemans +# Author: Edoardo Pasca +# Copyright 2017 University College London +# Copyright 2017 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}) + + #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}) + + set(ENV{CIL_VERSION} 0.10.1) + set(CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) + set(CCPi-Framework_TAG origin/master) + message("CIL URL " ${${proj}_URL} ) + message("CIL 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. + 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 env CIL_VERSION=0.10.0 SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh + CMAKE_ARGS + -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} + DEPENDS + ${${proj}_DEPENDENCIES} + ) + endif() + + + set(${proj}_ROOT ${${proj}_SOURCE_DIR}) + set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR}) + + else() + if(${USE_SYSTEM_${externalProjName}}) + find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED) + message("USING the system ${externalProjName}, set ${externalProjName}_DIR=${${externalProjName}_DIR}") + endif() + 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() + + mark_as_superbuild( + VARS + ${externalProjName}_DIR:PATH + LABELS + "FIND_PACKAGE" + ) diff --git a/SuperBuild/External_CCPi-RGL.cmake b/SuperBuild/External_CCPi-RGL.cmake new file mode 100644 index 00000000..e5bbe9e4 --- /dev/null +++ b/SuperBuild/External_CCPi-RGL.cmake @@ -0,0 +1,140 @@ +#======================================================================== +# Author: Benjamin A Thomas +# Author: Kris Thielemans +# Author: Edoardo Pasca +# Copyright 2017 University College London +# Copyright 2017 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-RGL) + +# 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}) + + #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}) + + set(ENV{CIL_VERSION} 0.10.1) + set(CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) + set(CCPi-RGL_TAG origin/windows_fix) + message("CIL URL " ${${proj}_URL} ) + message("CIL 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 "" + CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy_directory ${${proj}_SOURCE_DIR} ${${proj}_BINARY_DIR} + COMMAND grep -vx "make install" ${${proj}_SOURCE_DIR}/recipes/regularisers/build.sh > ${${proj}_BINARY_DIR}/recipes/regularisers/build.sh + #COMMAND grep -vx "\$PYTHON setup-regularisers.py install" ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh > ${${proj}_BINARY_DIR}/Wrappers/Python/conda-recipe/build.sh + COMMAND sed -e "s/install/build_ext --inplace/" ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh > ${${proj}_BINARY_DIR}/Wrappers/Python/conda-recipe/build.sh + + BUILD_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=0.10.0 SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/recipes/regularisers PYTHON=${PYTHON_EXECUTABLE} CONDA_PREFIX=${${proj}_BINARY_DIR} bash ${${proj}_BINARY_DIR}/recipes/regularisers/build.sh + COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=0.10.0 SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} CONDA_PREFIX=${${proj}_BINARY_DIR} PREFIX=${libcilreg_Install_Dir} LIBRARY_PATH=${${proj}_BINARY_DIR}/build/build/:$ENV{LIBRARY_PATH} bash ${${proj}_BINARY_DIR}/Wrappers/Python/conda-recipe/build.sh + + #INSTALL_COMMAND "" + INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${${proj}_BINARY_DIR}/build/build/libcilreg.so ${libcilreg_Install_Dir}/lib + COMMAND ${CMAKE_COMMAND} -E copy_directory ${${proj}_BINARY_DIR}/ccpi/Python/ccpi ${PYTHON_DEST}/ccpi + #BUILD_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=0.10.0 SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} + #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. + 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 env CIL_VERSION=0.10.0 SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh + CMAKE_ARGS + -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} + DEPENDS + ${${proj}_DEPENDENCIES} + ) + endif() + + + set(${proj}_ROOT ${${proj}_SOURCE_DIR}) + set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR}) + + else() + if(${USE_SYSTEM_${externalProjName}}) + find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED) + message("USING the system ${externalProjName}, set ${externalProjName}_DIR=${${externalProjName}_DIR}") + endif() + 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() + + mark_as_superbuild( + VARS + ${externalProjName}_DIR:PATH + LABELS + "FIND_PACKAGE" + ) diff --git a/SuperBuild/External_CIL.cmake b/SuperBuild/External_CIL.cmake index 5e26ea47..c8c813b1 100644 --- a/SuperBuild/External_CIL.cmake +++ b/SuperBuild/External_CIL.cmake @@ -25,7 +25,7 @@ set(proj CIL) # Set dependency list -set(${proj}_DEPENDENCIES "") +set(${proj}_DEPENDENCIES CCPi-Framework CCPi-RGL) # Include dependent projects if any ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${proj}_DEPENDENCIES) @@ -39,79 +39,6 @@ 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}) - - set(ENV{CIL_VERSION} 0.10.1) - set(CIL_URL https://github.com/vais-ral/CCPi-Framework.git) - set(CIL_TAG origin/master) - message("CIL URL " ${${proj}_URL} ) - message("CIL 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. - 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 env CIL_VERSION=0.10.0 SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} - DEPENDS - ${${proj}_DEPENDENCIES} - ) - endif() - - - set(${proj}_ROOT ${${proj}_SOURCE_DIR}) - set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR}) - - else() - if(${USE_SYSTEM_${externalProjName}}) - find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED) - message("USING the system ${externalProjName}, set ${externalProjName}_DIR=${${externalProjName}_DIR}") - endif() ExternalProject_Add_Empty(${proj} DEPENDS "${${proj}_DEPENDENCIES}" SOURCE_DIR ${${proj}_SOURCE_DIR} BINARY_DIR ${${proj}_BINARY_DIR} @@ -119,7 +46,6 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr STAMP_DIR ${${proj}_STAMP_DIR} TMP_DIR ${${proj}_TMP_DIR} ) - endif() mark_as_superbuild( VARS From 7f6955b160bef1b4946288d436a127f3448fe9e2 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Sun, 29 Jul 2018 20:57:24 +0000 Subject: [PATCH 003/118] uses version_config to set ccpi/cil versions --- SuperBuild.cmake | 3 +++ SuperBuild/External_CCPi-Framework.cmake | 4 ++-- SuperBuild/External_CCPi-RGL.cmake | 4 ++-- version_config.cmake | 17 +++++++++++++++++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/SuperBuild.cmake b/SuperBuild.cmake index 81ab1a96..4ab51866 100644 --- a/SuperBuild.cmake +++ b/SuperBuild.cmake @@ -158,6 +158,9 @@ if (BUILD_petmr_rd_tools) list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES petmr_rd_tools) endif() +if ("${PYTHON_STRATEGY}" STREQUAL "CONDA") + set (BUILD_CIL OFF) +endif() if (BUILD_CIL) list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES CIL) endif() diff --git a/SuperBuild/External_CCPi-Framework.cmake b/SuperBuild/External_CCPi-Framework.cmake index f45be88f..107362fe 100644 --- a/SuperBuild/External_CCPi-Framework.cmake +++ b/SuperBuild/External_CCPi-Framework.cmake @@ -50,8 +50,8 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${SUPERBUILD_INSTALL_DIR}) set(ENV{CIL_VERSION} 0.10.1) - set(CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) - set(CCPi-Framework_TAG origin/master) + #set(CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) + #set(CCPi-Framework_TAG origin/master) message("CIL URL " ${${proj}_URL} ) message("CIL TAG " ${${proj}_TAG} ) diff --git a/SuperBuild/External_CCPi-RGL.cmake b/SuperBuild/External_CCPi-RGL.cmake index e5bbe9e4..0ee01113 100644 --- a/SuperBuild/External_CCPi-RGL.cmake +++ b/SuperBuild/External_CCPi-RGL.cmake @@ -50,8 +50,8 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${SUPERBUILD_INSTALL_DIR}) set(ENV{CIL_VERSION} 0.10.1) - set(CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) - set(CCPi-RGL_TAG origin/windows_fix) + #set(CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) + #set(CCPi-RGL_TAG origin/windows_fix) message("CIL URL " ${${proj}_URL} ) message("CIL TAG " ${${proj}_TAG} ) diff --git a/version_config.cmake b/version_config.cmake index 03fe57c0..baea8369 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -118,6 +118,12 @@ if (DEVEL_BUILD) set(DEFAULT_ACE_URL https://github.com/paskino/libace-conda) set(DEFAULT_ACE_TAG origin/master) + # CCPi CIL + set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) + set(DEFAULT_CCPi-Framework_TAG origin/master) + set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) + set(DEFAULT_CCPi-RGL_TAG origin/master) + else() set(DEFAULT_SIRF_TAG v1.1.1) @@ -150,6 +156,13 @@ else() set(DEFAULT_ACE_URL https://github.com/paskino/libace-conda) set(DEFAULT_ACE_TAG origin/master) + + # CCPi CIL + set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) + set(DEFAULT_CCPi-Framework_TAG origin/master) + set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) + set(DEFAULT_CCPi-RGL_TAG origin/master) + endif() @@ -179,6 +192,10 @@ SET(glog_TAG ${DEFAULT_glog_TAG} CACHE STRING ON) set(ACE_URL ${DEFAULT_ACE_URL} CACHE STRING ON) set(ACE_TAG ${DEFAULT_ACE_TAG} CACHE STRING ON) +set(CCPi-RGL_URL ${DEFAULT_CCPi-RGL_URL} CACHE STRING ON) +set(CCPi-RGL_TAG ${DEFAULT_CCPi-RGL_TAG} CACHE STRING ON) +set(CCPi-Framework_URL ${DEFAULT_CCPi-Framework_URL} CACHE STRING ON) +set(CCPi-Framework_TAG ${DEFAULT_CCPi-Framework_TAG} CACHE STRING ON) mark_as_advanced(SIRF_URL SIRF_TAG STIR_URL STIR_TAG Gadgetron_URL Gadgetron_TAG siemens_to_ismrmrd_URL siemens_to_ismrmrd_TAG From e54712fdf5bca1d0e175e33b73d5885c738d98de Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Mon, 20 Aug 2018 10:51:03 +0000 Subject: [PATCH 004/118] reflects changes to CCPi-RGL --- SuperBuild.cmake | 2 +- SuperBuild/External_ACE.cmake | 3 +- SuperBuild/External_CCPi-RGL.cmake | 46 ++++++++++++++++++++++-------- version_config.cmake | 5 +++- 4 files changed, 41 insertions(+), 15 deletions(-) diff --git a/SuperBuild.cmake b/SuperBuild.cmake index 4ab51866..aa621cd2 100644 --- a/SuperBuild.cmake +++ b/SuperBuild.cmake @@ -162,7 +162,7 @@ if ("${PYTHON_STRATEGY}" STREQUAL "CONDA") set (BUILD_CIL OFF) endif() if (BUILD_CIL) - list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES CIL) + list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES CCPi-RGL CCPi-Framework) endif() ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${PRIMARY_PROJECT_NAME}_DEPENDENCIES) diff --git a/SuperBuild/External_ACE.cmake b/SuperBuild/External_ACE.cmake index b551dd15..b6f524c6 100644 --- a/SuperBuild/External_ACE.cmake +++ b/SuperBuild/External_ACE.cmake @@ -63,7 +63,8 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${Gadgetron_Install_Dir} - INSTALL_DIR ${Gadgetron_Install_Dir} + -DINSTALL_DIR=${libACE_Install_Dir}/lib + -DINCLUDE_DIR=${libACE_Install_Dir}/include DEPENDS ${${proj}_DEPENDENCIES} ) diff --git a/SuperBuild/External_CCPi-RGL.cmake b/SuperBuild/External_CCPi-RGL.cmake index 0ee01113..a4acb9e8 100644 --- a/SuperBuild/External_CCPi-RGL.cmake +++ b/SuperBuild/External_CCPi-RGL.cmake @@ -59,10 +59,28 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr if("${PYTHON_STRATEGY}" STREQUAL "PYTHONPATH") # in case of PYTHONPATH it is sufficient to copy the files to the # $PYTHONPATH directory + set (BUILD_PYTHON ${PYTHONLIBS_FOUND}) + if (BUILD_PYTHON) + set(PYTHON_DEST_DIR "" CACHE PATH "Directory of the SIRF Python modules") + if (PYTHON_DEST_DIR) + set(PYTHON_DEST "${PYTHON_DEST_DIR}") + else() + set(PYTHON_DEST "${CMAKE_INSTALL_PREFIX}/python") + endif() + message(STATUS "Python libraries found") + message(STATUS "SIRF Python modules will be installed in " ${PYTHON_DEST}) + endif() + set(PYTHON_STRATEGY "PYTHONPATH" CACHE STRING "\ + PYTHONPATH: prefix PYTHONPATH \n\ + SETUP_PY: execute ${PYTHON_EXECUTABLE} setup.py install \n\ + CONDA: do nothing") + set_property(CACHE PYTHON_STRATEGY PROPERTY STRINGS PYTHONPATH SETUP_PY CONDA) + ExternalProject_Add(${proj} ${${proj}_EP_ARGS} GIT_REPOSITORY ${${proj}_URL} - GIT_TAG ${${proj}_TAG} + #GIT_TAG ${${proj}_TAG} + GIT_TAG origin/cmaking SOURCE_DIR ${${proj}_SOURCE_DIR} BINARY_DIR ${${proj}_BINARY_DIR} DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR} @@ -70,22 +88,26 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr TMP_DIR ${${proj}_TMP_DIR} INSTALL_DIR ${libcilreg_Install_Dir} - #CONFIGURE_COMMAND "" - CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy_directory ${${proj}_SOURCE_DIR} ${${proj}_BINARY_DIR} - COMMAND grep -vx "make install" ${${proj}_SOURCE_DIR}/recipes/regularisers/build.sh > ${${proj}_BINARY_DIR}/recipes/regularisers/build.sh + ##CONFIGURE_COMMAND "" + #CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy_directory ${${proj}_SOURCE_DIR} ${${proj}_BINARY_DIR} + # COMMAND grep -vx "make install" ${${proj}_SOURCE_DIR}/recipes/regularisers/build.sh > ${${proj}_BINARY_DIR}/recipes/regularisers/build.sh #COMMAND grep -vx "\$PYTHON setup-regularisers.py install" ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh > ${${proj}_BINARY_DIR}/Wrappers/Python/conda-recipe/build.sh - COMMAND sed -e "s/install/build_ext --inplace/" ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh > ${${proj}_BINARY_DIR}/Wrappers/Python/conda-recipe/build.sh + # COMMAND sed -e "s/install/build_ext --inplace/" ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh > ${${proj}_BINARY_DIR}/Wrappers/Python/conda-recipe/build.sh - BUILD_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=0.10.0 SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/recipes/regularisers PYTHON=${PYTHON_EXECUTABLE} CONDA_PREFIX=${${proj}_BINARY_DIR} bash ${${proj}_BINARY_DIR}/recipes/regularisers/build.sh - COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=0.10.0 SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} CONDA_PREFIX=${${proj}_BINARY_DIR} PREFIX=${libcilreg_Install_Dir} LIBRARY_PATH=${${proj}_BINARY_DIR}/build/build/:$ENV{LIBRARY_PATH} bash ${${proj}_BINARY_DIR}/Wrappers/Python/conda-recipe/build.sh + #BUILD_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=0.10.0 SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/recipes/regularisers PYTHON=${PYTHON_EXECUTABLE} CONDA_PREFIX=${${proj}_BINARY_DIR} bash ${${proj}_BINARY_DIR}/recipes/regularisers/build.sh + # COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=0.10.0 SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} CONDA_PREFIX=${${proj}_BINARY_DIR} PREFIX=${libcilreg_Install_Dir} LIBRARY_PATH=${${proj}_BINARY_DIR}/build/build/:$ENV{LIBRARY_PATH} bash ${${proj}_BINARY_DIR}/Wrappers/Python/conda-recipe/build.sh - #INSTALL_COMMAND "" - INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${${proj}_BINARY_DIR}/build/build/libcilreg.so ${libcilreg_Install_Dir}/lib - COMMAND ${CMAKE_COMMAND} -E copy_directory ${${proj}_BINARY_DIR}/ccpi/Python/ccpi ${PYTHON_DEST}/ccpi - #BUILD_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=0.10.0 SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} - #INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${${proj}_SOURCE_DIR}/Wrappers/Python/ccpi ${PYTHON_DEST}/ccpi + ##INSTALL_COMMAND "" + #INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${${proj}_BINARY_DIR}/build/build/libcilreg.so ${libcilreg_Install_Dir}/lib + # COMMAND ${CMAKE_COMMAND} -E copy_directory ${${proj}_BINARY_DIR}/ccpi/Python/ccpi ${PYTHON_DEST}/ccpi + ##BUILD_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=0.10.0 SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} + ##INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${${proj}_SOURCE_DIR}/Wrappers/Python/ccpi ${PYTHON_DEST}/ccpi CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} + -DBUILD_PYTHON_WRAPPERS=ON -DCMAKE_BUILD_TYPE=Release + -DBUILD_CUDA=OFF -DCONDA_BUILD=OFF + -DPYTHON_DEST=${PYTHON_DEST_DIR} + DEPENDS ${${proj}_DEPENDENCIES} ) diff --git a/version_config.cmake b/version_config.cmake index baea8369..e8752b95 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -201,4 +201,7 @@ mark_as_advanced(SIRF_URL SIRF_TAG STIR_URL STIR_TAG siemens_to_ismrmrd_URL siemens_to_ismrmrd_TAG ISMRMRD_URL ISMRMRD_TAG petmr_rd_tools_URL petmr_rd_tools_TAG - glog_URL glog_TAG) + glog_URL glog_TAG + CCPi-Framework_URL CCPi-Framework_TAG + CCPi-RGL_URL CCPi-RGL_TAG +) From 01b41ae2efa78624866f6761663f9c8386bfd60f Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Mon, 20 Aug 2018 13:08:57 +0000 Subject: [PATCH 005/118] builds latest master --- SuperBuild/External_CCPi-RGL.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SuperBuild/External_CCPi-RGL.cmake b/SuperBuild/External_CCPi-RGL.cmake index a4acb9e8..de916dad 100644 --- a/SuperBuild/External_CCPi-RGL.cmake +++ b/SuperBuild/External_CCPi-RGL.cmake @@ -79,8 +79,8 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr ExternalProject_Add(${proj} ${${proj}_EP_ARGS} GIT_REPOSITORY ${${proj}_URL} - #GIT_TAG ${${proj}_TAG} - GIT_TAG origin/cmaking + GIT_TAG ${${proj}_TAG} + #GIT_TAG origin/cmaking SOURCE_DIR ${${proj}_SOURCE_DIR} BINARY_DIR ${${proj}_BINARY_DIR} DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR} From cc47c52b7c20677502c1ea4951bbe4ede2955ad1 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 21 Sep 2018 13:51:35 +0000 Subject: [PATCH 006/118] points to spdhg branch --- version_config.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/version_config.cmake b/version_config.cmake index e8752b95..225128a6 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -125,7 +125,8 @@ if (DEVEL_BUILD) set(DEFAULT_CCPi-RGL_TAG origin/master) else() - set(DEFAULT_SIRF_TAG v1.1.1) + set(DEFAULT_SIRF_URL https://github.com/CCPPETMR/Hackathon-SIRF ) + set(DEFAULT_SIRF_TAG origin/convert_spdhg_to_cil) ## STIR set(DEFAULT_STIR_URL https://github.com/UCL/STIR ) From 50830ce5e7b9e9381b907c3bf13c58520ad5d92b Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 21 Sep 2018 14:09:49 +0000 Subject: [PATCH 007/118] Added CCPi-FrameworkPlugins as CIL dependency --- SuperBuild.cmake | 2 +- .../External_CCPi-FrameworkPlugins.cmake | 130 ++++++++++++++++++ version_config.cmake | 8 ++ 3 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 SuperBuild/External_CCPi-FrameworkPlugins.cmake diff --git a/SuperBuild.cmake b/SuperBuild.cmake index aa621cd2..693b71fa 100644 --- a/SuperBuild.cmake +++ b/SuperBuild.cmake @@ -162,7 +162,7 @@ if ("${PYTHON_STRATEGY}" STREQUAL "CONDA") set (BUILD_CIL OFF) endif() if (BUILD_CIL) - list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES CCPi-RGL CCPi-Framework) + list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES CCPi-RGL CCPi-Framework CCPi-FrameworkPlugins) endif() ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${PRIMARY_PROJECT_NAME}_DEPENDENCIES) diff --git a/SuperBuild/External_CCPi-FrameworkPlugins.cmake b/SuperBuild/External_CCPi-FrameworkPlugins.cmake new file mode 100644 index 00000000..aa26bf36 --- /dev/null +++ b/SuperBuild/External_CCPi-FrameworkPlugins.cmake @@ -0,0 +1,130 @@ +#======================================================================== +# Author: Benjamin A Thomas +# Author: Kris Thielemans +# Author: Edoardo Pasca +# Copyright 2017 University College London +# Copyright 2017 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-FrameworkPlugins) + +# Set dependency list +set(${proj}_DEPENDENCIES "CCPi-Framework") + +# 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}) + + set(ENV{CIL_VERSION} 0.10.1) + #set(CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) + #set(CCPi-Framework_TAG origin/master) + message("CIL proj " ${proj} ) + message("CIL URL " ${${proj}_URL} ) + message("CIL 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. + 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 env CIL_VERSION=0.10.0 SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh + CMAKE_ARGS + -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} + DEPENDS + ${${proj}_DEPENDENCIES} + ) + endif() + + + set(${proj}_ROOT ${${proj}_SOURCE_DIR}) + set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR}) + + else() + if(${USE_SYSTEM_${externalProjName}}) + find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED) + message("USING the system ${externalProjName}, set ${externalProjName}_DIR=${${externalProjName}_DIR}") + endif() + 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() + + mark_as_superbuild( + VARS + ${externalProjName}_DIR:PATH + LABELS + "FIND_PACKAGE" + ) diff --git a/version_config.cmake b/version_config.cmake index 225128a6..5ba1e9a3 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -123,6 +123,8 @@ if (DEVEL_BUILD) set(DEFAULT_CCPi-Framework_TAG origin/master) set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) set(DEFAULT_CCPi-RGL_TAG origin/master) + set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) + set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master) else() set(DEFAULT_SIRF_URL https://github.com/CCPPETMR/Hackathon-SIRF ) @@ -163,6 +165,8 @@ else() set(DEFAULT_CCPi-Framework_TAG origin/master) set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) set(DEFAULT_CCPi-RGL_TAG origin/master) + set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) + set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master) endif() @@ -197,6 +201,9 @@ set(CCPi-RGL_URL ${DEFAULT_CCPi-RGL_URL} CACHE STRING ON) set(CCPi-RGL_TAG ${DEFAULT_CCPi-RGL_TAG} CACHE STRING ON) set(CCPi-Framework_URL ${DEFAULT_CCPi-Framework_URL} CACHE STRING ON) set(CCPi-Framework_TAG ${DEFAULT_CCPi-Framework_TAG} CACHE STRING ON) +set(CCPi-FrameworkPlugins_URL ${DEFAULT_CCPi-FrameworkPlugins_URL} CACHE STRING ON) +set(CCPi-FrameworkPlugins_TAG ${DEFAULT_CCPi-FrameworkPlugins_TAG} CACHE STRING ON) + mark_as_advanced(SIRF_URL SIRF_TAG STIR_URL STIR_TAG Gadgetron_URL Gadgetron_TAG siemens_to_ismrmrd_URL siemens_to_ismrmrd_TAG @@ -204,5 +211,6 @@ mark_as_advanced(SIRF_URL SIRF_TAG STIR_URL STIR_TAG petmr_rd_tools_URL petmr_rd_tools_TAG glog_URL glog_TAG CCPi-Framework_URL CCPi-Framework_TAG + CCPi-FrameworkPlugins_URL CCPi-FrameworkPlugins_TAG CCPi-RGL_URL CCPi-RGL_TAG ) From e244b1ac096e6658c370f7e03e57cbfc57ab34a9 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 9 Oct 2018 10:16:04 +0000 Subject: [PATCH 008/118] updated Gadgetron and ISMRMRD tags --- version_config.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/version_config.cmake b/version_config.cmake index e902c7d7..b39fdfe0 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -125,8 +125,8 @@ else() ## Gadgetron set(DEFAULT_Gadgetron_URL https://github.com/gadgetron/gadgetron ) #https://github.com/CCPPETMR/gadgetron) - - set(DEFAULT_Gadgetron_TAG e7eb430673eb3272e8a821b51750c0a2a96dafed ) + set (DEFAULT_Gadgetron_TAB origin/master) + #set(DEFAULT_Gadgetron_TAG e7eb430673eb3272e8a821b51750c0a2a96dafed ) #set(DEFAULT_Gadgetron_TAG 00b96376568278a595e78879026bb3b0d5fbb98d ) ## siemens_to_ismrmrd @@ -135,7 +135,8 @@ else() ## ISMRMRD set(DEFAULT_ISMRMRD_URL https://github.com/ismrmrd/ismrmrd ) - set(DEFAULT_ISMRMRD_TAG 42d93137cc16c270c8ba065edd2496483161bd21) + #set(DEFAULT_ISMRMRD_TAG 42d93137cc16c270c8ba065edd2496483161bd21) + set (DEFAULT_ISMRMRD_TAG v1.4.0) ## petmr-rd-tools set(DEFAULT_petmr_rd_tools_URL https://github.com/UCL/petmr-rd-tools ) From 90740d5bd26baa66c04019c2ea0ef7bc3edc0667 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 23 Oct 2018 15:12:28 +0000 Subject: [PATCH 009/118] set gadgetron version to 3.17.0 --- version_config.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_config.cmake b/version_config.cmake index 44fe2e78..95dbd314 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -133,7 +133,7 @@ else() ## Gadgetron set(DEFAULT_Gadgetron_URL https://github.com/gadgetron/gadgetron ) #https://github.com/CCPPETMR/gadgetron) - set (DEFAULT_Gadgetron_TAB origin/master) + set (DEFAULT_Gadgetron_TAB v3.17.0) #set(DEFAULT_Gadgetron_TAG e7eb430673eb3272e8a821b51750c0a2a96dafed ) #set(DEFAULT_Gadgetron_TAG 00b96376568278a595e78879026bb3b0d5fbb98d ) From d23f78c04ee05e05c645eb0cd791cd01cb056f5a Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 24 Oct 2018 09:02:41 +0000 Subject: [PATCH 010/118] fix typo --- version_config.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_config.cmake b/version_config.cmake index 95dbd314..f308fc5d 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -133,7 +133,7 @@ else() ## Gadgetron set(DEFAULT_Gadgetron_URL https://github.com/gadgetron/gadgetron ) #https://github.com/CCPPETMR/gadgetron) - set (DEFAULT_Gadgetron_TAB v3.17.0) + set (DEFAULT_Gadgetron_TAG v3.17.0) #set(DEFAULT_Gadgetron_TAG e7eb430673eb3272e8a821b51750c0a2a96dafed ) #set(DEFAULT_Gadgetron_TAG 00b96376568278a595e78879026bb3b0d5fbb98d ) From 520c70b24cf29f75e95c40a7dd6bff9645953864 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 16 Nov 2018 12:51:46 +0000 Subject: [PATCH 011/118] fix to CIL commit hash --- version_config.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/version_config.cmake b/version_config.cmake index 5588f476..6471697a 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -167,11 +167,11 @@ else() # CCPi CIL set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) - set(DEFAULT_CCPi-Framework_TAG 510849ab4e0524a8778c4870d9536002aaf8c376 ) + set(DEFAULT_CCPi-Framework_TAG ccb9a65318aa5ca1b72edfa9acf349cd14ad3747 ) set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) - set(DEFAULT_CCPi-RGL_TAG origin/master) + set(DEFAULT_CCPi-RGL_TAG a106da50c7f428db2e4115fe1bdc0c156a933a21 ) set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) - set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master) + set(DEFAULT_CCPi-FrameworkPlugins_TAG 0cb81711927adee9f2d1973a8af2b7799dd28ab6 ) endif() From 6b1ff05afb711062a5cf0e46c84f623259cc9333 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 16 Nov 2018 13:06:03 +0000 Subject: [PATCH 012/118] comments removed --- SuperBuild/External_CCPi-Framework.cmake | 2 -- SuperBuild/External_CCPi-FrameworkPlugins.cmake | 3 --- SuperBuild/External_CCPi-RGL.cmake | 14 -------------- 3 files changed, 19 deletions(-) diff --git a/SuperBuild/External_CCPi-Framework.cmake b/SuperBuild/External_CCPi-Framework.cmake index 55109d4c..bb30ae04 100644 --- a/SuperBuild/External_CCPi-Framework.cmake +++ b/SuperBuild/External_CCPi-Framework.cmake @@ -50,8 +50,6 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${SUPERBUILD_INSTALL_DIR}) set(ENV{CIL_VERSION} 0.10.1) - #set(CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) - #set(CCPi-Framework_TAG origin/master) message("CIL URL " ${${proj}_URL} ) message("CIL TAG " ${${proj}_TAG} ) diff --git a/SuperBuild/External_CCPi-FrameworkPlugins.cmake b/SuperBuild/External_CCPi-FrameworkPlugins.cmake index aa26bf36..59f7ed28 100644 --- a/SuperBuild/External_CCPi-FrameworkPlugins.cmake +++ b/SuperBuild/External_CCPi-FrameworkPlugins.cmake @@ -49,9 +49,6 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${SUPERBUILD_INSTALL_DIR}) set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${SUPERBUILD_INSTALL_DIR}) - set(ENV{CIL_VERSION} 0.10.1) - #set(CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) - #set(CCPi-Framework_TAG origin/master) message("CIL proj " ${proj} ) message("CIL URL " ${${proj}_URL} ) message("CIL TAG " ${${proj}_TAG} ) diff --git a/SuperBuild/External_CCPi-RGL.cmake b/SuperBuild/External_CCPi-RGL.cmake index de916dad..4894c335 100644 --- a/SuperBuild/External_CCPi-RGL.cmake +++ b/SuperBuild/External_CCPi-RGL.cmake @@ -88,20 +88,6 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr TMP_DIR ${${proj}_TMP_DIR} INSTALL_DIR ${libcilreg_Install_Dir} - ##CONFIGURE_COMMAND "" - #CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy_directory ${${proj}_SOURCE_DIR} ${${proj}_BINARY_DIR} - # COMMAND grep -vx "make install" ${${proj}_SOURCE_DIR}/recipes/regularisers/build.sh > ${${proj}_BINARY_DIR}/recipes/regularisers/build.sh - #COMMAND grep -vx "\$PYTHON setup-regularisers.py install" ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh > ${${proj}_BINARY_DIR}/Wrappers/Python/conda-recipe/build.sh - # COMMAND sed -e "s/install/build_ext --inplace/" ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh > ${${proj}_BINARY_DIR}/Wrappers/Python/conda-recipe/build.sh - - #BUILD_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=0.10.0 SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/recipes/regularisers PYTHON=${PYTHON_EXECUTABLE} CONDA_PREFIX=${${proj}_BINARY_DIR} bash ${${proj}_BINARY_DIR}/recipes/regularisers/build.sh - # COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=0.10.0 SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} CONDA_PREFIX=${${proj}_BINARY_DIR} PREFIX=${libcilreg_Install_Dir} LIBRARY_PATH=${${proj}_BINARY_DIR}/build/build/:$ENV{LIBRARY_PATH} bash ${${proj}_BINARY_DIR}/Wrappers/Python/conda-recipe/build.sh - - ##INSTALL_COMMAND "" - #INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${${proj}_BINARY_DIR}/build/build/libcilreg.so ${libcilreg_Install_Dir}/lib - # COMMAND ${CMAKE_COMMAND} -E copy_directory ${${proj}_BINARY_DIR}/ccpi/Python/ccpi ${PYTHON_DEST}/ccpi - ##BUILD_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=0.10.0 SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} - ##INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${${proj}_SOURCE_DIR}/Wrappers/Python/ccpi ${PYTHON_DEST}/ccpi CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} -DBUILD_PYTHON_WRAPPERS=ON -DCMAKE_BUILD_TYPE=Release From 2885fbcf4e679ce1ad74aa27c840b778991833cc Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 16 Nov 2018 14:49:23 +0000 Subject: [PATCH 013/118] CCPi-Regularisation-Toolkit depends on Cython --- CMake/FindCython.cmake | 49 ++++++++++++++++++++++++++++++ SuperBuild/External_CCPi-RGL.cmake | 5 +++ 2 files changed, 54 insertions(+) create mode 100644 CMake/FindCython.cmake diff --git a/CMake/FindCython.cmake b/CMake/FindCython.cmake new file mode 100644 index 00000000..123e84a7 --- /dev/null +++ b/CMake/FindCython.cmake @@ -0,0 +1,49 @@ +# code adapted from +# https://github.com/symengine/symengine.py/blob/master/cmake/FindCython.cmake +# 16/11/18 +# +# Cython +# + +# This finds the "cython" executable in your PATH, and then in some standard +# paths: +SET(CYTHON_BIN cython CACHE STRING "Cython executable name") +SET(CYTHON_FLAGS --cplus --fast-fail) + +SET(Cython_FOUND FALSE) +IF (CYTHON_BIN) + # Try to run Cython, to make sure it works: + execute_process( + COMMAND ${CYTHON_BIN} "--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_BIN) + + +IF (Cython_FOUND) + IF (NOT Cython_FIND_QUIETLY) + MESSAGE(STATUS "Found CYTHON: ${CYTHON_BIN}") + ENDIF (NOT Cython_FIND_QUIETLY) +ELSE (Cython_FOUND) + IF (Cython_FIND_REQUIRED) + if(Cython_Compilation_Failed) + MESSAGE(STATUS "Found CYTHON: ${CYTHON_BIN}") + # 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) + diff --git a/SuperBuild/External_CCPi-RGL.cmake b/SuperBuild/External_CCPi-RGL.cmake index 4894c335..c4b6a6ec 100644 --- a/SuperBuild/External_CCPi-RGL.cmake +++ b/SuperBuild/External_CCPi-RGL.cmake @@ -30,6 +30,11 @@ set(${proj}_DEPENDENCIES "") # Include dependent projects if any ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${proj}_DEPENDENCIES) +find_package(Cython) +if(NOT ${Cython_FOUND}) + message(FATAL_ERROR "CCPi-Regularisation-Toolkit depends on Cython") +endif() + # Set external name (same as internal for now) set(externalProjName ${proj}) From fa473082f4607ef1840da65f1d6fe4359b86b96d Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 16 Nov 2018 15:05:08 +0000 Subject: [PATCH 014/118] removed External_CIL.cmake --- SuperBuild/External_CIL.cmake | 55 ----------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 SuperBuild/External_CIL.cmake diff --git a/SuperBuild/External_CIL.cmake b/SuperBuild/External_CIL.cmake deleted file mode 100644 index c8c813b1..00000000 --- a/SuperBuild/External_CIL.cmake +++ /dev/null @@ -1,55 +0,0 @@ -#======================================================================== -# Author: Benjamin A Thomas -# Author: Kris Thielemans -# Author: Edoardo Pasca -# Copyright 2017 University College London -# Copyright 2017 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 CIL) - -# Set dependency list -set(${proj}_DEPENDENCIES CCPi-Framework CCPi-RGL) - -# 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" ) - - 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} - ) - - mark_as_superbuild( - VARS - ${externalProjName}_DIR:PATH - LABELS - "FIND_PACKAGE" - ) From bb541e4faa53ee0101add1e52501e68aa6db7101 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 16 Nov 2018 15:07:23 +0000 Subject: [PATCH 015/118] removed reference to hackathor repo --- version_config.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/version_config.cmake b/version_config.cmake index 6471697a..59e66d60 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -131,7 +131,6 @@ if (DEVEL_BUILD) set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master) else() - set(DEFAULT_SIRF_URL https://github.com/CCPPETMR/Hackathon-SIRF ) set(DEFAULT_SIRF_TAG origin/spdhg_from_cil) ## STIR From c3dacbe590b397d0a24b4c5d457a01986af52409 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 23 Nov 2018 10:30:47 +0000 Subject: [PATCH 016/118] added date and right package name --- SuperBuild/External_CCPi-RGL.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SuperBuild/External_CCPi-RGL.cmake b/SuperBuild/External_CCPi-RGL.cmake index c4b6a6ec..938aff28 100644 --- a/SuperBuild/External_CCPi-RGL.cmake +++ b/SuperBuild/External_CCPi-RGL.cmake @@ -2,8 +2,8 @@ # Author: Benjamin A Thomas # Author: Kris Thielemans # Author: Edoardo Pasca -# Copyright 2017 University College London -# Copyright 2017 STFC +# Copyright 2017-2018 University College London +# Copyright 2017-2018 STFC # # This file is part of the CCP PETMR Synergistic Image Reconstruction Framework (SIRF) SuperBuild. # @@ -66,7 +66,7 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr # $PYTHONPATH directory set (BUILD_PYTHON ${PYTHONLIBS_FOUND}) if (BUILD_PYTHON) - set(PYTHON_DEST_DIR "" CACHE PATH "Directory of the SIRF Python modules") + set(PYTHON_DEST_DIR "" CACHE PATH "Directory of the CIL regularisation Python modules") if (PYTHON_DEST_DIR) set(PYTHON_DEST "${PYTHON_DEST_DIR}") else() From 1f5ad304c94725b50eb16a495092eeec6b7ec476 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 23 Nov 2018 10:31:57 +0000 Subject: [PATCH 017/118] added reference to LICENSE --- CMake/FindCython.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/CMake/FindCython.cmake b/CMake/FindCython.cmake index 123e84a7..688f58ca 100644 --- a/CMake/FindCython.cmake +++ b/CMake/FindCython.cmake @@ -1,5 +1,6 @@ # code adapted from # https://github.com/symengine/symengine.py/blob/master/cmake/FindCython.cmake +# MIT License https://github.com/symengine/symengine.py/blob/master/LICENSE # 16/11/18 # # Cython From 07acf19d5f2318062dc6d28c423695ab54132b86 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 23 Nov 2018 10:35:09 +0000 Subject: [PATCH 018/118] added BUILD_CIL option --- SuperBuild.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/SuperBuild.cmake b/SuperBuild.cmake index bd6da764..36c89c76 100644 --- a/SuperBuild.cmake +++ b/SuperBuild.cmake @@ -166,6 +166,7 @@ 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_NiftyReg "Build NiftyReg" OFF) +option(BUILD_CIL "Build CCPi CIL Modules" OFF) if (BUILD_petmr_rd_tools) set(USE_ITK ON CACHE BOOL "Use ITK" FORCE) From bc27a0b3c0980f4a58fa3059344ca3fbbea57b52 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 23 Nov 2018 10:35:58 +0000 Subject: [PATCH 019/118] updated date --- SuperBuild/External_CCPi-FrameworkPlugins.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SuperBuild/External_CCPi-FrameworkPlugins.cmake b/SuperBuild/External_CCPi-FrameworkPlugins.cmake index 59f7ed28..d136ccd8 100644 --- a/SuperBuild/External_CCPi-FrameworkPlugins.cmake +++ b/SuperBuild/External_CCPi-FrameworkPlugins.cmake @@ -2,8 +2,8 @@ # Author: Benjamin A Thomas # Author: Kris Thielemans # Author: Edoardo Pasca -# Copyright 2017 University College London -# Copyright 2017 STFC +# Copyright 2018 University College London +# Copyright 2018 STFC # # This file is part of the CCP PETMR Synergistic Image Reconstruction Framework (SIRF) SuperBuild. # From a2f24b04858f6599174c079b18e21efa21be1fca Mon Sep 17 00:00:00 2001 From: Kris Thielemans Date: Sun, 9 Dec 2018 00:16:05 +0000 Subject: [PATCH 020/118] updated boost to 1.65.1 for Gadgetron --- version_config.cmake | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/version_config.cmake b/version_config.cmake index 4c2d82dc..c2571c93 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -22,10 +22,11 @@ #========================================================================= ## BOOST -set(Boost_VERSION 1.64.0) -set(Boost_REQUIRED_VERSION 1.64.0) -set(Boost_URL http://downloads.sourceforge.net/project/boost/boost/1.64.0/boost_1_64_0.zip) -set(Boost_MD5 36093e4018aecd5b0e31e80457ac5fc1) +# Gadgetron needs 1.65 +set(Boost_VERSION 1.65.1) +set(Boost_REQUIRED_VERSION 1.65.1) +set(Boost_URL http://downloads.sourceforge.net/project/boost/boost/1.65.1/boost_1_65_1.zip) +set(Boost_MD5 9824a7a3e25c9d4fdf2def07bce8651c) ## Armadillo set(Armadillo_URL https://downloads.sourceforge.net/project/arma/armadillo-7.800.2.tar.xz) @@ -95,12 +96,6 @@ mark_as_advanced(DEVEL_BUILD) set(DEFAULT_SIRF_URL https://github.com/CCPPETMR/SIRF ) if (DEVEL_BUILD) - # Gadgetron needs 1.65 - set(Boost_VERSION 1.65.1) - set(Boost_REQUIRED_VERSION 1.65.1) - set(Boost_URL http://downloads.sourceforge.net/project/boost/boost/1.65.1/boost_1_65_1.zip) - set(Boost_MD5 9824a7a3e25c9d4fdf2def07bce8651c) - set (DEFAULT_SIRF_TAG origin/master) ## STIR set(DEFAULT_STIR_URL https://github.com/UCL/STIR ) From edd862868ff10ac026e6c5b61b6ef8d53add9a70 Mon Sep 17 00:00:00 2001 From: Kris Thielemans Date: Sun, 9 Dec 2018 00:16:34 +0000 Subject: [PATCH 021/118] [TRAVIS] update gcc Use gcc-6 for non-devel builds and gcc-7 otherwise --- .travis.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 42ace90f..c80bd179 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,32 +18,32 @@ matrix: - os: linux python: 3 # +boost -itk +fftw3 +hdf5 -ace - env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=OFF -DUSE_NiftyReg=ON" MATRIX_EVAL="CC=gcc-5 CXX=g++-5" PYMVER=3 + env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=OFF -DUSE_NiftyReg=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 - os: linux python: 2.7 # +boost -itk +fftw3 +hdf5 -ace - env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=OFF -DUSE_NiftyReg=ON" MATRIX_EVAL="CC=gcc-5 CXX=g++-5" PYMVER=3 + env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=OFF -DUSE_NiftyReg=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 - os: linux python: 3 # +boost -itk +fftw3 +hdf5 -ace - env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=OFF" MATRIX_EVAL="CC=gcc-5 CXX=g++-5" PYMVER=3 + env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=OFF" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 # linux g{cc,++}-5 py{27,3} - os: linux python: 3 # +boost +fftw3 +hdf5 +ace - env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON" MATRIX_EVAL="CC=gcc-5 CXX=g++-5" PYMVER=3 + env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -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=ON -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-5 CXX=g++-5" PYMVER=2 + env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -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 # +DEVEL +boost -hdf5 -fftw3 +siemens_to_ismrmrd - env: EXTRA_BUILD_FLAGS="-DDEVEL_BUILD=ON -DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_FFTW3=OFF -DBUILD_siemens_to_ismrmrd=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 + env: EXTRA_BUILD_FLAGS="-DDEVEL_BUILD=ON -DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_FFTW3=OFF -DBUILD_siemens_to_ismrmrd=ON" MATRIX_EVAL="CC=gcc-7 CXX=g++-7" PYMVER=3 - os: linux python: 2.7 # +DEVEL -boost -fftw3 -hdf5 -swig - env: EXTRA_BUILD_FLAGS="-DDEVEL_BUILD=ON -DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=OFF -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_SWIG=OFF" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=2 + env: EXTRA_BUILD_FLAGS="-DDEVEL_BUILD=ON -DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=OFF -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_SWIG=OFF" MATRIX_EVAL="CC=gcc-7 CXX=g++-7" PYMVER=2 # osx g{cc,++} py{27,36} - os: osx python: 2.7 @@ -65,7 +65,7 @@ matrix: - os: linux python: 3 # +boost +itk +fftw3 +hdf5 - env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_ITK=ON -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON" MATRIX_EVAL="CC=gcc-5 CXX=g++-5" PYMVER=3 + env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_ITK=ON -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 - os: osx python: 2.7 # +boost +itk -hdf5 +swig @@ -100,8 +100,8 @@ addons: packages: - git-core - build-essential - - g++-5 - g++-6 + - g++-7 - libboost-all-dev - libhdf5-serial-dev - libfftw3-dev @@ -210,11 +210,11 @@ before_install: - $PY_EXE -m pip freeze # ccache compiler override - ln -s "$(which ccache)" g++ - - ln -s "$(which ccache)" g++-5 - ln -s "$(which ccache)" g++-6 + - ln -s "$(which ccache)" g++-7 - ln -s "$(which ccache)" gcc - - ln -s "$(which ccache)" gcc-5 - ln -s "$(which ccache)" gcc-6 + - ln -s "$(which ccache)" gcc-7 - export PATH="$PWD:$PATH" - popd # N.B.: don't put into build matrix to allow caching. From 7bfd43f3816ae7faba46338484bbd1d7f59dbc49 Mon Sep 17 00:00:00 2001 From: Kris Thielemans Date: Sun, 9 Dec 2018 11:13:57 +0000 Subject: [PATCH 022/118] [TRAVIS] on trusty, use gcc-7 with our own ACE Possibly work-around the fact that ACE is too old otherwise https://github.com/CCPPETMR/SIRF-SuperBuild/issues/169 --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index c80bd179..8cfa4e90 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,12 +38,12 @@ matrix: env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -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 - # +DEVEL +boost -hdf5 -fftw3 +siemens_to_ismrmrd - env: EXTRA_BUILD_FLAGS="-DDEVEL_BUILD=ON -DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_FFTW3=OFF -DBUILD_siemens_to_ismrmrd=ON" MATRIX_EVAL="CC=gcc-7 CXX=g++-7" PYMVER=3 + # +DEVEL +boost -hdf5 -fftw3 +siemens_to_ismrmrd -ace + env: EXTRA_BUILD_FLAGS="-DDEVEL_BUILD=ON -DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_FFTW3=OFF -DBUILD_siemens_to_ismrmrd=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 - os: linux python: 2.7 - # +DEVEL -boost -fftw3 -hdf5 -swig - env: EXTRA_BUILD_FLAGS="-DDEVEL_BUILD=ON -DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=OFF -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_SWIG=OFF" MATRIX_EVAL="CC=gcc-7 CXX=g++-7" PYMVER=2 + # +DEVEL -boost -fftw3 -hdf5 -swig +ace + env: EXTRA_BUILD_FLAGS="-DDEVEL_BUILD=ON -DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=OFF -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_ACE=OFF -DUSE_SYSTEM_SWIG=OFF" MATRIX_EVAL="CC=gcc-7 CXX=g++-7" PYMVER=2 # osx g{cc,++} py{27,36} - os: osx python: 2.7 From 9db7f7d73dc92cba02f5b5cb338a849d1fac3b37 Mon Sep 17 00:00:00 2001 From: Kris Thielemans Date: Fri, 14 Dec 2018 07:45:44 +0000 Subject: [PATCH 023/118] [TRAVIS] forgot to replace gcc-5 with gcc-6 needed for current Gadgetron --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 99242ef3..8118f0ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,24 +24,24 @@ matrix: - os: linux python: 3 # -boost -itk +fftw3 +hdf5 +ace +niftyreg - env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=ON" MATRIX_EVAL="CC=gcc-5 CXX=g++-5" PYMVER=3 + env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 - os: linux python: 2.7 # -boost -itk +fftw3 +hdf5 +ace +niftyreg - env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=ON" MATRIX_EVAL="CC=gcc-5 CXX=g++-5" PYMVER=3 + env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 - os: linux python: 3 # -boost -itk +fftw3 +hdf5 +ace - env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON" MATRIX_EVAL="CC=gcc-5 CXX=g++-5" PYMVER=3 - # linux g{cc,++}-5 py{27,3} + env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 + # linux g{cc,++}-6 py{27,3} - os: linux python: 3 # -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-5 CXX=g++-5" PYMVER=3 + 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-5 CXX=g++-5" PYMVER=2 + 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 # +DEVEL -boost -hdf5 -fftw3 +siemens_to_ismrmrd From 3a0e11aede9ef7a7b44555823db5b703553a476f Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 8 Jan 2019 15:57:44 +0000 Subject: [PATCH 024/118] update CIL versions to master --- version_config.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/version_config.cmake b/version_config.cmake index 59e66d60..832a9e69 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -131,7 +131,7 @@ if (DEVEL_BUILD) set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master) else() - set(DEFAULT_SIRF_TAG origin/spdhg_from_cil) + set(DEFAULT_SIRF_TAG origin/add_to_sirf_classes) ## STIR set(DEFAULT_STIR_URL https://github.com/UCL/STIR ) @@ -166,11 +166,11 @@ else() # CCPi CIL set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) - set(DEFAULT_CCPi-Framework_TAG ccb9a65318aa5ca1b72edfa9acf349cd14ad3747 ) + set(DEFAULT_CCPi-Framework_TAG origin/master ) set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) - set(DEFAULT_CCPi-RGL_TAG a106da50c7f428db2e4115fe1bdc0c156a933a21 ) + set(DEFAULT_CCPi-RGL_TAG origin/master ) set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) - set(DEFAULT_CCPi-FrameworkPlugins_TAG 0cb81711927adee9f2d1973a8af2b7799dd28ab6 ) + set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master ) endif() From 0c6c6138a073385c9804ed5ecfa63ed753f1c02c Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 8 Feb 2019 16:32:14 +0000 Subject: [PATCH 025/118] removed names for licensing issues --- SuperBuild/External_CCPi-FrameworkPlugins.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/SuperBuild/External_CCPi-FrameworkPlugins.cmake b/SuperBuild/External_CCPi-FrameworkPlugins.cmake index d136ccd8..ddd36aca 100644 --- a/SuperBuild/External_CCPi-FrameworkPlugins.cmake +++ b/SuperBuild/External_CCPi-FrameworkPlugins.cmake @@ -1,6 +1,4 @@ #======================================================================== -# Author: Benjamin A Thomas -# Author: Kris Thielemans # Author: Edoardo Pasca # Copyright 2018 University College London # Copyright 2018 STFC From 3a113f1931b44e364b9b35a944a7c1d0096d398b Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 8 Feb 2019 16:32:57 +0000 Subject: [PATCH 026/118] remove names for licensing --- SuperBuild/External_CCPi-RGL.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/SuperBuild/External_CCPi-RGL.cmake b/SuperBuild/External_CCPi-RGL.cmake index 938aff28..15f61b9a 100644 --- a/SuperBuild/External_CCPi-RGL.cmake +++ b/SuperBuild/External_CCPi-RGL.cmake @@ -1,6 +1,4 @@ #======================================================================== -# Author: Benjamin A Thomas -# Author: Kris Thielemans # Author: Edoardo Pasca # Copyright 2017-2018 University College London # Copyright 2017-2018 STFC From cf32f9c665714e24c38c6bcf9eb0f4fa0bab501a Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 8 Feb 2019 16:34:05 +0000 Subject: [PATCH 027/118] removed names for licensing issues --- SuperBuild/External_CCPi-Framework.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/SuperBuild/External_CCPi-Framework.cmake b/SuperBuild/External_CCPi-Framework.cmake index bb30ae04..bead09a8 100644 --- a/SuperBuild/External_CCPi-Framework.cmake +++ b/SuperBuild/External_CCPi-Framework.cmake @@ -1,6 +1,4 @@ #======================================================================== -# Author: Benjamin A Thomas -# Author: Kris Thielemans # Author: Edoardo Pasca # Copyright 2018 University College London # Copyright 2018 STFC From b431327df433034f39fbf10fef378c910a9d15df Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Mon, 11 Feb 2019 17:13:28 +0000 Subject: [PATCH 028/118] need to pass env variable during build --- SuperBuild/External_CCPi-RGL.cmake | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/SuperBuild/External_CCPi-RGL.cmake b/SuperBuild/External_CCPi-RGL.cmake index 15f61b9a..e60a09f6 100644 --- a/SuperBuild/External_CCPi-RGL.cmake +++ b/SuperBuild/External_CCPi-RGL.cmake @@ -52,7 +52,8 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${SUPERBUILD_INSTALL_DIR}) set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${SUPERBUILD_INSTALL_DIR}) - set(ENV{CIL_VERSION} 0.10.1) + set(ENV{CIL_VERSION} 19.02) + message(STATUS "1 CIL_VERSION env " $ENV{CIL_VERSION}) #set(CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) #set(CCPi-RGL_TAG origin/windows_fix) message("CIL URL " ${${proj}_URL} ) @@ -79,6 +80,7 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr CONDA: do nothing") set_property(CACHE PYTHON_STRATEGY PROPERTY STRINGS PYTHONPATH SETUP_PY CONDA) +message(STATUS "2 CIL_VERSION env " $ENV{CIL_VERSION}) ExternalProject_Add(${proj} ${${proj}_EP_ARGS} GIT_REPOSITORY ${${proj}_URL} @@ -90,12 +92,20 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr STAMP_DIR ${${proj}_STAMP_DIR} TMP_DIR ${${proj}_TMP_DIR} INSTALL_DIR ${libcilreg_Install_Dir} - - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} + # apparently this is the only way to pass environment variables to + # external projects + CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=$ENV{CIL_VERSION} cmake ${${proj}_SOURCE_DIR} -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} -DBUILD_PYTHON_WRAPPERS=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_CUDA=OFF -DCONDA_BUILD=OFF -DPYTHON_DEST=${PYTHON_DEST_DIR} + BUILD_COMMAND make + INSTALL_COMMAND "" + +# CMAKE_ARGS +# -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} +# -DBUILD_PYTHON_WRAPPERS=ON -DCMAKE_BUILD_TYPE=Release +# -DBUILD_CUDA=OFF -DCONDA_BUILD=OFF +# -DPYTHON_DEST=${PYTHON_DEST_DIR} DEPENDS ${${proj}_DEPENDENCIES} @@ -117,7 +127,7 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr CONFIGURE_COMMAND "" BUILD_COMMAND "" - INSTALL_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=0.10.0 SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh + INSTALL_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=$ENV{CIL_VERSION} SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} DEPENDS From 43178e25662860e876d4e2965c88d6b46014174c Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 15 Mar 2019 10:31:28 +0000 Subject: [PATCH 029/118] updated CIL build --- SuperBuild/External_CCPi-Framework.cmake | 1 - SuperBuild/External_CCPi-FrameworkPlugins.cmake | 1 - SuperBuild/External_CCPi-RGL.cmake | 3 +-- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/SuperBuild/External_CCPi-Framework.cmake b/SuperBuild/External_CCPi-Framework.cmake index bead09a8..020c98b7 100644 --- a/SuperBuild/External_CCPi-Framework.cmake +++ b/SuperBuild/External_CCPi-Framework.cmake @@ -1,6 +1,5 @@ #======================================================================== # Author: Edoardo Pasca -# Copyright 2018 University College London # Copyright 2018 STFC # # This file is part of the CCP PETMR Synergistic Image Reconstruction Framework (SIRF) SuperBuild. diff --git a/SuperBuild/External_CCPi-FrameworkPlugins.cmake b/SuperBuild/External_CCPi-FrameworkPlugins.cmake index ddd36aca..c564074d 100644 --- a/SuperBuild/External_CCPi-FrameworkPlugins.cmake +++ b/SuperBuild/External_CCPi-FrameworkPlugins.cmake @@ -1,6 +1,5 @@ #======================================================================== # Author: Edoardo Pasca -# Copyright 2018 University College London # Copyright 2018 STFC # # This file is part of the CCP PETMR Synergistic Image Reconstruction Framework (SIRF) SuperBuild. diff --git a/SuperBuild/External_CCPi-RGL.cmake b/SuperBuild/External_CCPi-RGL.cmake index e60a09f6..8214cc58 100644 --- a/SuperBuild/External_CCPi-RGL.cmake +++ b/SuperBuild/External_CCPi-RGL.cmake @@ -1,6 +1,5 @@ #======================================================================== # Author: Edoardo Pasca -# Copyright 2017-2018 University College London # Copyright 2017-2018 STFC # # This file is part of the CCP PETMR Synergistic Image Reconstruction Framework (SIRF) SuperBuild. @@ -99,7 +98,7 @@ message(STATUS "2 CIL_VERSION env " $ENV{CIL_VERSION}) -DBUILD_CUDA=OFF -DCONDA_BUILD=OFF -DPYTHON_DEST=${PYTHON_DEST_DIR} BUILD_COMMAND make - INSTALL_COMMAND "" + INSTALL_COMMAND make install # CMAKE_ARGS # -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} From 3ca25312c530dea70e0221eb863aa5127d2d2648 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 22 Mar 2019 13:40:50 +0000 Subject: [PATCH 030/118] fixed text --- SuperBuild/External_CCPi-RGL.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SuperBuild/External_CCPi-RGL.cmake b/SuperBuild/External_CCPi-RGL.cmake index 8214cc58..51e45f82 100644 --- a/SuperBuild/External_CCPi-RGL.cmake +++ b/SuperBuild/External_CCPi-RGL.cmake @@ -71,7 +71,7 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr set(PYTHON_DEST "${CMAKE_INSTALL_PREFIX}/python") endif() message(STATUS "Python libraries found") - message(STATUS "SIRF Python modules will be installed in " ${PYTHON_DEST}) + message(STATUS "CIL Regularisation Python modules will be installed in " ${PYTHON_DEST}) endif() set(PYTHON_STRATEGY "PYTHONPATH" CACHE STRING "\ PYTHONPATH: prefix PYTHONPATH \n\ From 43cc82b14f7ba75ef9ad6b7acd57a24621a27d90 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 22 Mar 2019 13:46:38 +0000 Subject: [PATCH 031/118] adds version of CIL repos --- version_config.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/version_config.cmake b/version_config.cmake index c977f60e..4fed517f 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -136,12 +136,13 @@ if (DEVEL_BUILD) set(DEFAULT_ACE_TAG origin/master) # CCPi CIL + set(CIL_VERSION "19.02") set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) - set(DEFAULT_CCPi-Framework_TAG origin/master) + set(DEFAULT_CCPi-Framework_TAG d108cd7e9652992001a116347941eda7e75b3301) set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) - set(DEFAULT_CCPi-RGL_TAG origin/master) + set(DEFAULT_CCPi-RGL_TAG "v${CIL_VERSION}") set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) - set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master) + set(DEFAULT_CCPi-FrameworkPlugins_TAG b19a37714dcf8288a55bcd41a2a78dd6f8164e7f) # For OSX, Gadgetron v3.17.0 doesn't work. So even in devel build, use same version # as for non-devel build if (APPLE) From de1c6bd3a4aa8ea2f653df92efc261ab68db2b33 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 22 Mar 2019 13:48:39 +0000 Subject: [PATCH 032/118] use variable CIL_VERSION --- SuperBuild/External_CCPi-Framework.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SuperBuild/External_CCPi-Framework.cmake b/SuperBuild/External_CCPi-Framework.cmake index 020c98b7..e9cf33af 100644 --- a/SuperBuild/External_CCPi-Framework.cmake +++ b/SuperBuild/External_CCPi-Framework.cmake @@ -1,6 +1,6 @@ #======================================================================== # Author: Edoardo Pasca -# Copyright 2018 STFC +# Copyright 2018-2019 STFC # # This file is part of the CCP PETMR Synergistic Image Reconstruction Framework (SIRF) SuperBuild. # @@ -46,7 +46,7 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${SUPERBUILD_INSTALL_DIR}) set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${SUPERBUILD_INSTALL_DIR}) - set(ENV{CIL_VERSION} 0.10.1) + set(ENV{CIL_VERSION} ${CIL_VERSION}) message("CIL URL " ${${proj}_URL} ) message("CIL TAG " ${${proj}_TAG} ) @@ -90,7 +90,7 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr CONFIGURE_COMMAND "" BUILD_COMMAND "" - INSTALL_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=0.10.0 SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh + INSTALL_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=${CIL_VERSION} SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} DEPENDS From ada6d502a60d81d859ec0cded27dc12bddbd3ad1 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 22 Mar 2019 13:50:56 +0000 Subject: [PATCH 033/118] use specific version of CIL for default build and master in DEVEL_BUILD --- version_config.cmake | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/version_config.cmake b/version_config.cmake index 4fed517f..b85ce8ed 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -138,11 +138,11 @@ if (DEVEL_BUILD) # CCPi CIL set(CIL_VERSION "19.02") set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) - set(DEFAULT_CCPi-Framework_TAG d108cd7e9652992001a116347941eda7e75b3301) + set(DEFAULT_CCPi-Framework_TAG origin/master) set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) - set(DEFAULT_CCPi-RGL_TAG "v${CIL_VERSION}") + set(DEFAULT_CCPi-RGL_TAG origin/master) set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) - set(DEFAULT_CCPi-FrameworkPlugins_TAG b19a37714dcf8288a55bcd41a2a78dd6f8164e7f) + set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master) # For OSX, Gadgetron v3.17.0 doesn't work. So even in devel build, use same version # as for non-devel build if (APPLE) @@ -185,12 +185,13 @@ else() set(DEFAULT_ACE_TAG origin/master) # CCPi CIL + set(CIL_VERSION "19.02") set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) - set(DEFAULT_CCPi-Framework_TAG origin/master ) + set(DEFAULT_CCPi-Framework_TAG d108cd7e9652992001a116347941eda7e75b3301) set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) - set(DEFAULT_CCPi-RGL_TAG origin/master ) + set(DEFAULT_CCPi-RGL_TAG "v${CIL_VERSION}") set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) - set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master ) + set(DEFAULT_CCPi-FrameworkPlugins_TAG b19a37714dcf8288a55bcd41a2a78dd6f8164e7f) endif() From e581da25cab8ffef988214bd1a8d2187851e95f9 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 22 Mar 2019 16:49:33 +0000 Subject: [PATCH 034/118] removed hard coded version --- SuperBuild/External_CCPi-RGL.cmake | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/SuperBuild/External_CCPi-RGL.cmake b/SuperBuild/External_CCPi-RGL.cmake index 51e45f82..ab656d4b 100644 --- a/SuperBuild/External_CCPi-RGL.cmake +++ b/SuperBuild/External_CCPi-RGL.cmake @@ -51,10 +51,6 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${SUPERBUILD_INSTALL_DIR}) set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${SUPERBUILD_INSTALL_DIR}) - set(ENV{CIL_VERSION} 19.02) - message(STATUS "1 CIL_VERSION env " $ENV{CIL_VERSION}) - #set(CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) - #set(CCPi-RGL_TAG origin/windows_fix) message("CIL URL " ${${proj}_URL} ) message("CIL TAG " ${${proj}_TAG} ) @@ -79,7 +75,6 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr CONDA: do nothing") set_property(CACHE PYTHON_STRATEGY PROPERTY STRINGS PYTHONPATH SETUP_PY CONDA) -message(STATUS "2 CIL_VERSION env " $ENV{CIL_VERSION}) ExternalProject_Add(${proj} ${${proj}_EP_ARGS} GIT_REPOSITORY ${${proj}_URL} @@ -93,7 +88,7 @@ message(STATUS "2 CIL_VERSION env " $ENV{CIL_VERSION}) INSTALL_DIR ${libcilreg_Install_Dir} # apparently this is the only way to pass environment variables to # external projects - CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=$ENV{CIL_VERSION} cmake ${${proj}_SOURCE_DIR} -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} + CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=${CIL_VERSION} cmake ${${proj}_SOURCE_DIR} -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} -DBUILD_PYTHON_WRAPPERS=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_CUDA=OFF -DCONDA_BUILD=OFF -DPYTHON_DEST=${PYTHON_DEST_DIR} @@ -126,7 +121,7 @@ message(STATUS "2 CIL_VERSION env " $ENV{CIL_VERSION}) CONFIGURE_COMMAND "" BUILD_COMMAND "" - INSTALL_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=$ENV{CIL_VERSION} SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh + INSTALL_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=${CIL_VERSION} SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} DEPENDS From 685f0d83a7b3fcee2accd4d0df37f9ac9e9ea48f Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 22 Mar 2019 16:50:02 +0000 Subject: [PATCH 035/118] removed comments --- SuperBuild/External_CCPi-Framework.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/SuperBuild/External_CCPi-Framework.cmake b/SuperBuild/External_CCPi-Framework.cmake index e9cf33af..4eb68ba0 100644 --- a/SuperBuild/External_CCPi-Framework.cmake +++ b/SuperBuild/External_CCPi-Framework.cmake @@ -42,11 +42,9 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr ### --- 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}) - set(ENV{CIL_VERSION} ${CIL_VERSION}) message("CIL URL " ${${proj}_URL} ) message("CIL TAG " ${${proj}_TAG} ) From cd996d4944a800c85ebaea7523531fcfc2640a0f Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 22 Mar 2019 16:59:27 +0000 Subject: [PATCH 036/118] removed hard coded CIL_VERSION --- SuperBuild/External_CCPi-FrameworkPlugins.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SuperBuild/External_CCPi-FrameworkPlugins.cmake b/SuperBuild/External_CCPi-FrameworkPlugins.cmake index c564074d..d88713ed 100644 --- a/SuperBuild/External_CCPi-FrameworkPlugins.cmake +++ b/SuperBuild/External_CCPi-FrameworkPlugins.cmake @@ -90,7 +90,7 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr CONFIGURE_COMMAND "" BUILD_COMMAND "" - INSTALL_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=0.10.0 SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh + INSTALL_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=${CIL_VERSION} SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} DEPENDS From eb3555b7156644d5643d4a63c7b47fea8c7bc3a1 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Sat, 23 Mar 2019 11:24:54 +0000 Subject: [PATCH 037/118] match version config of master --- version_config.cmake | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/version_config.cmake b/version_config.cmake index b85ce8ed..ca8eef7e 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -143,12 +143,6 @@ if (DEVEL_BUILD) set(DEFAULT_CCPi-RGL_TAG origin/master) set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master) - # For OSX, Gadgetron v3.17.0 doesn't work. So even in devel build, use same version - # as for non-devel build - if (APPLE) - set(DEFAULT_Gadgetron_TAG e7eb430673eb3272e8a821b51750c0a2a96dafed) - set(DEFAULT_ISMRMRD_TAG 42d93137cc16c270c8ba065edd2496483161bd21) - endif(APPLE) else() set(DEFAULT_SIRF_TAG origin/add_to_sirf_classes) @@ -157,22 +151,10 @@ else() set(DEFAULT_STIR_URL https://github.com/UCL/STIR ) set(DEFAULT_STIR_TAG fd3a7576a11930856d6af50d217f17d4848c2bff) - ## Gadgetron - set(DEFAULT_Gadgetron_URL https://github.com/gadgetron/gadgetron ) - #https://github.com/CCPPETMR/gadgetron) - set (DEFAULT_Gadgetron_TAG v3.17.0) - #set(DEFAULT_Gadgetron_TAG e7eb430673eb3272e8a821b51750c0a2a96dafed ) - #set(DEFAULT_Gadgetron_TAG 00b96376568278a595e78879026bb3b0d5fbb98d ) - ## siemens_to_ismrmrd set(DEFAULT_siemens_to_ismrmrd_URL https://github.com/ismrmrd/siemens_to_ismrmrd) set(DEFAULT_siemens_to_ismrmrd_TAG ba4773f9cf4bba5f3ccd19930e3548d8273fee01) - ## ISMRMRD - set(DEFAULT_ISMRMRD_URL https://github.com/ismrmrd/ismrmrd ) - #set(DEFAULT_ISMRMRD_TAG 42d93137cc16c270c8ba065edd2496483161bd21) - set (DEFAULT_ISMRMRD_TAG v1.4.0) - ## petmr-rd-tools set(DEFAULT_petmr_rd_tools_URL https://github.com/UCL/petmr-rd-tools ) set(DEFAULT_petmr_rd_tools_TAG b88281f79e8c4a3781ebda7663f1ce7f5cab6e68) From 2318d2eafbb73bb983f5134d51bf8caeb26707fc Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Mon, 25 Mar 2019 11:48:38 +0000 Subject: [PATCH 038/118] set default version to current stable 1.1.1 --- version_config.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_config.cmake b/version_config.cmake index ca8eef7e..f9104708 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -145,7 +145,7 @@ if (DEVEL_BUILD) set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master) else() - set(DEFAULT_SIRF_TAG origin/add_to_sirf_classes) + set(DEFAULT_SIRF_TAG v1.1.1) ## STIR set(DEFAULT_STIR_URL https://github.com/UCL/STIR ) From 476f3cbbb398d3ba67595b6835640edc21727901 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Mon, 25 Mar 2019 11:53:03 +0000 Subject: [PATCH 039/118] adds build of CIL modules added build for python 2 and 3 --- .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.travis.yml b/.travis.yml index e8546bb6..6c13e8ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,6 +56,16 @@ matrix: python: 2.7 # +DEVEL -boost -fftw3 -hdf5 -swig +ace env: EXTRA_BUILD_FLAGS="-DDEVEL_BUILD=ON -DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=OFF -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_ACE=ON -DUSE_SYSTEM_SWIG=OFF" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=2 + # CIL + - os: linux + python: 3 + # -boost -itk +fftw3 +hdf5 +ace -niftyreg +cil + env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=OFF -DBUILD_CIL=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 + - os: linux + python: 2.7 + # -boost -itk +fftw3 +hdf5 +ace -niftyreg +cil + env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=ON -DBUILD_CIL=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 + # osx g{cc,++} py{27,36} # - os: osx # python: 2.7 From 7e4c193280ba33e875a7a2093987691b0f9be39e Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Mon, 25 Mar 2019 15:55:32 +0000 Subject: [PATCH 040/118] added test phase --- SuperBuild/External_CCPi-Framework.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SuperBuild/External_CCPi-Framework.cmake b/SuperBuild/External_CCPi-Framework.cmake index 4eb68ba0..19404513 100644 --- a/SuperBuild/External_CCPi-Framework.cmake +++ b/SuperBuild/External_CCPi-Framework.cmake @@ -66,6 +66,9 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${${proj}_SOURCE_DIR}/Wrappers/Python/ccpi ${PYTHON_DEST}/ccpi + TEST_COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_Data*.py && + ${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_algor*.py && + ${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_run_*.py CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} DEPENDS From d4c6aa669ddb01d2e08b965816e988e68724d775 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 26 Mar 2019 10:23:18 +0000 Subject: [PATCH 041/118] add cython as dependency to build CIL modules --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6c13e8ab..d61b6d84 100644 --- a/.travis.yml +++ b/.travis.yml @@ -142,6 +142,8 @@ addons: # not in whitelist - libxslt-dev - libace-dev + # for building CIL + - cython # - root-system-bin before_install: From acb8f23b8bbafa13d8fb160c08d304f09a79ff79 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 26 Mar 2019 13:33:56 +0000 Subject: [PATCH 042/118] build command update --- SuperBuild/External_CCPi-RGL.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/SuperBuild/External_CCPi-RGL.cmake b/SuperBuild/External_CCPi-RGL.cmake index ab656d4b..f1d68952 100644 --- a/SuperBuild/External_CCPi-RGL.cmake +++ b/SuperBuild/External_CCPi-RGL.cmake @@ -94,6 +94,7 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr -DPYTHON_DEST=${PYTHON_DEST_DIR} BUILD_COMMAND make INSTALL_COMMAND make install + TEST_COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -p ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/run_test*.py # CMAKE_ARGS # -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} From 2f3f07d8807208dddc01f1dee59e5bd8f2c1b751 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 26 Mar 2019 13:51:26 +0000 Subject: [PATCH 043/118] remove build boost in CIL build --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index d61b6d84..6e137d5b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,12 +59,12 @@ matrix: # CIL - os: linux python: 3 - # -boost -itk +fftw3 +hdf5 +ace -niftyreg +cil - env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=OFF -DBUILD_CIL=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 + # +boost -itk +fftw3 +hdf5 +ace -niftyreg +cil + env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=OFF -DBUILD_CIL=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 - os: linux python: 2.7 - # -boost -itk +fftw3 +hdf5 +ace -niftyreg +cil - env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=ON -DBUILD_CIL=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 + # +boost -itk +fftw3 +hdf5 +ace -niftyreg +cil + env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=ON -DBUILD_CIL=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 # osx g{cc,++} py{27,36} # - os: osx From 3268078ecca8e8930fb5774e5e9dc7528432cb28 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 27 Mar 2019 10:20:24 +0000 Subject: [PATCH 044/118] simplified matrix --- .travis.yml | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6e137d5b..a20caa38 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,35 +27,35 @@ cache: # shared between builds # i.e. -boost == -DUSE_SYSTEM_Boost=OFF, which means that Boost will be built. matrix: include: - - os: linux - python: 3 +# - os: linux +# python: 3 # -boost -itk +fftw3 +hdf5 +ace +niftyreg - env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 - - os: linux - python: 2.7 +# env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 +# - os: linux +# python: 2.7 # -boost -itk +fftw3 +hdf5 +ace +niftyreg - env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 - - os: linux - python: 3 +# env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 +# - os: linux +# python: 3 # -boost -itk +fftw3 +hdf5 +ace - env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 +# env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 # linux g{cc,++}-6 py{27,3} - - os: linux - python: 3 +# - os: linux +# python: 3 # -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 +# 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 +# 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 # +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 - python: 2.7 +# 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 +# python: 2.7 # +DEVEL -boost -fftw3 -hdf5 -swig +ace - env: EXTRA_BUILD_FLAGS="-DDEVEL_BUILD=ON -DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=OFF -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_ACE=ON -DUSE_SYSTEM_SWIG=OFF" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=2 +# env: EXTRA_BUILD_FLAGS="-DDEVEL_BUILD=ON -DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=OFF -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_ACE=ON -DUSE_SYSTEM_SWIG=OFF" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=2 # CIL - os: linux python: 3 From c5bbc3becc292a26841cf0b744b10d0a87e052e3 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 27 Mar 2019 11:15:20 +0000 Subject: [PATCH 045/118] not build gadgetron --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a20caa38..82ca21d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,11 +60,11 @@ matrix: - os: linux python: 3 # +boost -itk +fftw3 +hdf5 +ace -niftyreg +cil - env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=OFF -DBUILD_CIL=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 + env: EXTRA_BUILD_FLAGS="-DBUILD_GADGETRON=OFF -DUSE_SYSTEM_Boost=ON -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=OFF -DBUILD_CIL=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 - os: linux python: 2.7 # +boost -itk +fftw3 +hdf5 +ace -niftyreg +cil - env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=ON -DBUILD_CIL=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 + env: EXTRA_BUILD_FLAGS="-DBUILD_GADGETRON=OFF -DUSE_SYSTEM_Boost=ON -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=ON -DBUILD_CIL=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 # osx g{cc,++} py{27,36} # - os: osx From 44eb833d9aec843af4f08d0d30e6e572ccbe9732 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 27 Mar 2019 14:02:07 +0000 Subject: [PATCH 046/118] add CIL Framework Test in SuperBuild --- SuperBuild/External_CCPi-Framework.cmake | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/SuperBuild/External_CCPi-Framework.cmake b/SuperBuild/External_CCPi-Framework.cmake index 19404513..630814f8 100644 --- a/SuperBuild/External_CCPi-Framework.cmake +++ b/SuperBuild/External_CCPi-Framework.cmake @@ -66,9 +66,9 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${${proj}_SOURCE_DIR}/Wrappers/Python/ccpi ${PYTHON_DEST}/ccpi - TEST_COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_Data*.py && - ${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_algor*.py && - ${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_run_*.py + #TEST_COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_Data*.py && + #${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_algor*.py && + #${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_run_*.py CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} DEPENDS @@ -103,6 +103,16 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr 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() if(${USE_SYSTEM_${externalProjName}}) find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED) From 5e15cf1ccc3a4fff4cbdc61b4a3432effce65652 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 27 Mar 2019 14:06:33 +0000 Subject: [PATCH 047/118] add cil build --- .travis.yml | 50 ++++++++++++++++++-------------------------------- 1 file changed, 18 insertions(+), 32 deletions(-) diff --git a/.travis.yml b/.travis.yml index 82ca21d1..974ffe14 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,45 +27,33 @@ cache: # shared between builds # i.e. -boost == -DUSE_SYSTEM_Boost=OFF, which means that Boost will be built. matrix: include: -# - os: linux -# python: 3 - # -boost -itk +fftw3 +hdf5 +ace +niftyreg -# env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 -# - os: linux -# python: 2.7 - # -boost -itk +fftw3 +hdf5 +ace +niftyreg -# env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 -# - os: linux -# python: 3 - # -boost -itk +fftw3 +hdf5 +ace -# env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 # linux g{cc,++}-6 py{27,3} -# - os: linux -# python: 3 + - os: linux + python: 3 # -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 + 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 + 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 # +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 -# python: 2.7 + 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 + python: 2.7 # +DEVEL -boost -fftw3 -hdf5 -swig +ace -# env: EXTRA_BUILD_FLAGS="-DDEVEL_BUILD=ON -DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=OFF -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_ACE=ON -DUSE_SYSTEM_SWIG=OFF" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=2 - # CIL + env: EXTRA_BUILD_FLAGS="-DDEVEL_BUILD=ON -DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=OFF -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_ACE=ON -DUSE_SYSTEM_SWIG=OFF" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=2 + #CIL + # - os: linux python: 3 - # +boost -itk +fftw3 +hdf5 +ace -niftyreg +cil - env: EXTRA_BUILD_FLAGS="-DBUILD_GADGETRON=OFF -DUSE_SYSTEM_Boost=ON -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=OFF -DBUILD_CIL=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 + # +boost +fftw3 +hdf5 +ace +cil + env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DBUILD_CIL=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 - os: linux python: 2.7 - # +boost -itk +fftw3 +hdf5 +ace -niftyreg +cil - env: EXTRA_BUILD_FLAGS="-DBUILD_GADGETRON=OFF -DUSE_SYSTEM_Boost=ON -DUSE_ITK=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DUSE_NiftyReg=ON -DBUILD_CIL=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 - + # +boost +fftw3 +hdf5 +ace +cil + env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DBUILD_CIL=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=2 # osx g{cc,++} py{27,36} # - os: osx # python: 2.7 @@ -142,8 +130,6 @@ addons: # not in whitelist - libxslt-dev - libace-dev - # for building CIL - - cython # - root-system-bin before_install: From 1108c0dd7122fd247a5e6516b23df76f0f014add Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Thu, 28 Mar 2019 09:37:38 +0000 Subject: [PATCH 048/118] builds boost --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 974ffe14..5beb880a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,11 +49,11 @@ matrix: - os: linux python: 3 # +boost +fftw3 +hdf5 +ace +cil - env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DBUILD_CIL=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 + env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DBUILD_CIL=ON" 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=ON -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DBUILD_CIL=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=2 + env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DBUILD_CIL=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=2 # osx g{cc,++} py{27,36} # - os: osx # python: 2.7 From 9cd354a3f96db9f5bb30d72dceabaa9e8b53697c Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Thu, 28 Mar 2019 14:17:24 +0000 Subject: [PATCH 049/118] build only CIL --- .travis.yml | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5beb880a..8a8aaf93 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,32 +28,11 @@ cache: # shared between builds matrix: include: # linux g{cc,++}-6 py{27,3} - - os: linux - python: 3 - # -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 - # +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 - python: 2.7 - # +DEVEL -boost -fftw3 -hdf5 -swig +ace - env: EXTRA_BUILD_FLAGS="-DDEVEL_BUILD=ON -DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=OFF -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_ACE=ON -DUSE_SYSTEM_SWIG=OFF" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=2 #CIL - # - os: linux python: 3 - # +boost +fftw3 +hdf5 +ace +cil + # -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" 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" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=2 # osx g{cc,++} py{27,36} # - os: osx # python: 2.7 @@ -81,15 +60,6 @@ matrix: # # +boost +itk -hdf5 +swig # env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_ITK=ON -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_SWIG=ON" MATRIX_EVAL="CC=gcc CXX=g++" PYMVER=2 # docker - - os: linux - # +ace +armadillo +boost +fftw3 +hdf5 +itk +siemens_to_ismrmrd +swig - env: DOCKER_BUILD=1 - - os: linux - # +ace +armadillo +boost +fftw3 +hdf5 +itk +siemens_to_ismrmrd +swig - env: DOCKER_BUILD=SERVICE - - os: linux - # +DEVEL +ace +armadillo +boost +fftw3 +hdf5 +itk +siemens_to_ismrmrd +swig - env: DOCKER_BUILD=DEVEL # - os: linux # # +DEVEL +ace +armadillo +boost +fftw3 +hdf5 +itk +siemens_to_ismrmrd +swig # env: DOCKER_BUILD=DEVEL_SERVICE From 12c89b2dd8fc76fed6e38c894301bb6f77d66036 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 29 Mar 2019 09:21:20 +0000 Subject: [PATCH 050/118] add cython for CIL --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 8a8aaf93..3c115c58 100644 --- a/.travis.yml +++ b/.travis.yml @@ -101,6 +101,8 @@ addons: - libxslt-dev - libace-dev # - root-system-bin + # CIL + - cython before_install: # Set C and C++ compiler etc using trick from From d31ad8f5bd4402eb810213b34bf4324ba6e42158 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 29 Mar 2019 09:42:09 +0000 Subject: [PATCH 051/118] add numpy --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 3c115c58..e5835ef3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -103,6 +103,7 @@ addons: # - root-system-bin # CIL - cython + - numpy before_install: # Set C and C++ compiler etc using trick from From c79d9ef1db4e6f52135eab08aea878697263934c Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 29 Mar 2019 09:53:55 +0000 Subject: [PATCH 052/118] pip install cython and numpy --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e5835ef3..2bbd98ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -101,9 +101,6 @@ addons: - libxslt-dev - libace-dev # - root-system-bin - # CIL - - cython - - numpy before_install: # Set C and C++ compiler etc using trick from @@ -187,6 +184,8 @@ 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 +# CIL +- $PY_EXE -m pip install --user -U cython numpy # for counting clones, excluding ours - | if [[ -n "$GITHUB_API_TOKEN" ]]; then From c67d2c09dbc110d0b894f82372f75f6545022cdf Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Fri, 29 Mar 2019 10:08:42 +0000 Subject: [PATCH 053/118] add CIL to docker, minor travis tidy --- .travis.yml | 6 +++--- docker/Dockerfile | 6 +++--- docker/requirements.txt | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2bbd98ff..e1fa8839 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,7 +61,7 @@ matrix: # env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_ITK=ON -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_SWIG=ON" MATRIX_EVAL="CC=gcc CXX=g++" PYMVER=2 # docker # - os: linux - # # +DEVEL +ace +armadillo +boost +fftw3 +hdf5 +itk +siemens_to_ismrmrd +swig + # # +DEVEL +ace +armadillo +boost +cil +fftw3 +hdf5 +itk +siemens_to_ismrmrd +swig # env: DOCKER_BUILD=DEVEL_SERVICE env: @@ -184,8 +184,6 @@ 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 -# CIL -- $PY_EXE -m pip install --user -U cython numpy # for counting clones, excluding ours - | if [[ -n "$GITHUB_API_TOKEN" ]]; then @@ -246,6 +244,8 @@ install: else ( set -ev $PY_EXE -m pip install --user --only-binary=numpy,scipy,matplotlib numpy scipy matplotlib + # CIL requirements + $PY_EXE -m pip install --user -U cython cmake $BUILD_FLAGS $EXTRA_BUILD_FLAGS . # Job may timeout (>50min) if no ccache, otherwise should be <1min: make diff --git a/docker/Dockerfile b/docker/Dockerfile index f633c672..a87791ae 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -78,9 +78,9 @@ RUN ccache -o cache_dir=/opt/ccache ARG BUILD_FLAGS="\ -DCMAKE_BUILD_TYPE=Release\ -DBUILD_STIR_WITH_OPENMP=ON -DUSE_SYSTEM_ACE=ON\ - -DUSE_SYSTEM_Armadillo=ON -DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_FFTW3=ON\ - -DUSE_SYSTEM_HDF5=ON -DUSE_ITK=ON -DBUILD_siemens_to_ismrmrd=ON\ - -DUSE_SYSTEM_SWIG=ON" + -DUSE_SYSTEM_Armadillo=ON -DUSE_SYSTEM_Boost=ON -DBUILD_CIL=ON\ + -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_ITK=ON\ + -DBUILD_siemens_to_ismrmrd=ON -DUSE_SYSTEM_SWIG=ON" ARG EXTRA_BUILD_FLAGS="" RUN bash user_sirf-ubuntu.sh RUN rm user_sirf-ubuntu.sh diff --git a/docker/requirements.txt b/docker/requirements.txt index 00797200..bc9ed05f 100644 --- a/docker/requirements.txt +++ b/docker/requirements.txt @@ -1,5 +1,6 @@ docopt matplotlib -# cython +cython # CIL +numpy # CIL # scipy -e git+https://github.com/ismrmrd/ismrmrd-python-tools.git@master#egg=ismrmrd-python-tools From 20dea0c3d05e7c417c58302b3024d9435263269b Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Fri, 29 Mar 2019 10:37:34 +0000 Subject: [PATCH 054/118] re-enable docker --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e1fa8839..0029fe57 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,9 +60,9 @@ matrix: # # +boost +itk -hdf5 +swig # env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_ITK=ON -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_SWIG=ON" MATRIX_EVAL="CC=gcc CXX=g++" PYMVER=2 # docker - # - os: linux - # # +DEVEL +ace +armadillo +boost +cil +fftw3 +hdf5 +itk +siemens_to_ismrmrd +swig - # env: DOCKER_BUILD=DEVEL_SERVICE + - os: linux + # +DEVEL +ace +armadillo +boost +cil +fftw3 +hdf5 +itk +siemens_to_ismrmrd +swig + env: DOCKER_BUILD=DEVEL_SERVICE env: global: From 0e521a29022426af719ebe7375166047cb19d566 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 29 Mar 2019 10:47:42 +0000 Subject: [PATCH 055/118] cython from apt numpy from pip --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0029fe57..30ee678c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -101,6 +101,8 @@ addons: - libxslt-dev - libace-dev # - root-system-bin + # CIL + - cython before_install: # Set C and C++ compiler etc using trick from @@ -184,6 +186,8 @@ 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 +# CIL +- $PY_EXE -m pip install --user -U numpy # for counting clones, excluding ours - | if [[ -n "$GITHUB_API_TOKEN" ]]; then From df6930616e96a66cbadfed6835c7e6c63a382991 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Fri, 29 Mar 2019 10:58:47 +0000 Subject: [PATCH 056/118] to revert probably --- .travis.yml | 6 ++---- docker/user_sirf-ubuntu.sh | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 30ee678c..c2b28d07 100644 --- a/.travis.yml +++ b/.travis.yml @@ -186,8 +186,6 @@ 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 -# CIL -- $PY_EXE -m pip install --user -U numpy # for counting clones, excluding ours - | if [[ -n "$GITHUB_API_TOKEN" ]]; then @@ -249,10 +247,10 @@ install: ( set -ev $PY_EXE -m pip install --user --only-binary=numpy,scipy,matplotlib numpy scipy matplotlib # CIL requirements - $PY_EXE -m pip install --user -U cython + #$PY_EXE -m pip install --user -U cython cmake $BUILD_FLAGS $EXTRA_BUILD_FLAGS . # Job may timeout (>50min) if no ccache, otherwise should be <1min: - make + make | grep -Eiv 'copy .*\/boost\/' mv INSTALL/share/gadgetron/config/gadgetron.xml.example INSTALL/share/gadgetron/config/gadgetron.xml ) || travis_terminate 1 source $PWD/INSTALL/bin/env_ccppetmr.sh diff --git a/docker/user_sirf-ubuntu.sh b/docker/user_sirf-ubuntu.sh index fd64c0ec..8163fdc7 100755 --- a/docker/user_sirf-ubuntu.sh +++ b/docker/user_sirf-ubuntu.sh @@ -3,7 +3,7 @@ set -ev INSTALL_DIR="${1:-/opt}" # SIRF -git clone https://github.com/CCPPETMR/SIRF-SuperBuild --recursive -b master $INSTALL_DIR/SIRF-SuperBuild +git clone https://github.com/CCPPETMR/SIRF-SuperBuild --recursive -b add_cil $INSTALL_DIR/SIRF-SuperBuild pushd $INSTALL_DIR/SIRF-SuperBuild echo $BUILD_FLAGS $EXTRA_BUILD_FLAGS From b004e7e41d2b580f6476e40e6e7f31df99755048 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 29 Mar 2019 11:25:41 +0000 Subject: [PATCH 057/118] pass the Python Executable --- SuperBuild/External_CCPi-RGL.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SuperBuild/External_CCPi-RGL.cmake b/SuperBuild/External_CCPi-RGL.cmake index f1d68952..93b12371 100644 --- a/SuperBuild/External_CCPi-RGL.cmake +++ b/SuperBuild/External_CCPi-RGL.cmake @@ -89,8 +89,8 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr # apparently this is the only way to pass environment variables to # external projects CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=${CIL_VERSION} cmake ${${proj}_SOURCE_DIR} -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} - -DBUILD_PYTHON_WRAPPERS=ON -DCMAKE_BUILD_TYPE=Release - -DBUILD_CUDA=OFF -DCONDA_BUILD=OFF + -DBUILD_PYTHON_WRAPPER=ON -DCMAKE_BUILD_TYPE=Release + -DBUILD_CUDA=ON -DCONDA_BUILD=OFF -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} -DPYTHON_DEST=${PYTHON_DEST_DIR} BUILD_COMMAND make INSTALL_COMMAND make install From 9487b956bd8d74efa15f8e454796d7fcf56bca94 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 29 Mar 2019 11:31:18 +0000 Subject: [PATCH 058/118] installs numpy from apt --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index c2b28d07..ddf3ecba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -103,6 +103,7 @@ addons: # - root-system-bin # CIL - cython + - python-numpy before_install: # Set C and C++ compiler etc using trick from From 9e95fee60ddb852c1c9f0ca897eef7841208cadd Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 29 Mar 2019 13:19:25 +0000 Subject: [PATCH 059/118] build the add_to_sirf_classes branch of SIRF --- version_config.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version_config.cmake b/version_config.cmake index f9104708..5323ef00 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -145,8 +145,8 @@ if (DEVEL_BUILD) set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master) else() - set(DEFAULT_SIRF_TAG v1.1.1) - + # set(DEFAULT_SIRF_TAG v1.1.1) + set (DEFAULT_SIRF_TAG origin/add_to_sirf_classes) ## STIR set(DEFAULT_STIR_URL https://github.com/UCL/STIR ) set(DEFAULT_STIR_TAG fd3a7576a11930856d6af50d217f17d4848c2bff) From b6a201b546294cccf14cd48f617a57dddac6cfe2 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 29 Mar 2019 13:23:21 +0000 Subject: [PATCH 060/118] merge master .travis.yml --- .travis.yml | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index ddf3ecba..0d2787c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,11 +28,22 @@ cache: # shared between builds matrix: include: # linux g{cc,++}-6 py{27,3} - #CIL - os: linux python: 3 - # -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" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 + # -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 + # +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 + python: 2.7 + # +DEVEL -boost -fftw3 -hdf5 -swig +ace + env: EXTRA_BUILD_FLAGS="-DDEVEL_BUILD=ON -DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=OFF -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_ACE=ON -DUSE_SYSTEM_SWIG=OFF" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=2 # osx g{cc,++} py{27,36} # - os: osx # python: 2.7 @@ -61,8 +72,17 @@ matrix: # env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=ON -DUSE_ITK=ON -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_SWIG=ON" MATRIX_EVAL="CC=gcc CXX=g++" PYMVER=2 # docker - os: linux - # +DEVEL +ace +armadillo +boost +cil +fftw3 +hdf5 +itk +siemens_to_ismrmrd +swig - env: DOCKER_BUILD=DEVEL_SERVICE + # +ace +armadillo +boost +fftw3 +hdf5 +itk +siemens_to_ismrmrd +swig + env: DOCKER_BUILD=1 + - os: linux + # +ace +armadillo +boost +fftw3 +hdf5 +itk +siemens_to_ismrmrd +swig + env: DOCKER_BUILD=SERVICE + - os: linux + # +DEVEL +ace +armadillo +boost +fftw3 +hdf5 +itk +siemens_to_ismrmrd +swig + env: DOCKER_BUILD=DEVEL + # - os: linux + # # +DEVEL +ace +armadillo +boost +fftw3 +hdf5 +itk +siemens_to_ismrmrd +swig + # env: DOCKER_BUILD=DEVEL_SERVICE env: global: @@ -101,9 +121,6 @@ addons: - libxslt-dev - libace-dev # - root-system-bin - # CIL - - cython - - python-numpy before_install: # Set C and C++ compiler etc using trick from @@ -247,11 +264,9 @@ install: else ( set -ev $PY_EXE -m pip install --user --only-binary=numpy,scipy,matplotlib numpy scipy matplotlib - # CIL requirements - #$PY_EXE -m pip install --user -U cython cmake $BUILD_FLAGS $EXTRA_BUILD_FLAGS . # Job may timeout (>50min) if no ccache, otherwise should be <1min: - make | grep -Eiv 'copy .*\/boost\/' + make mv INSTALL/share/gadgetron/config/gadgetron.xml.example INSTALL/share/gadgetron/config/gadgetron.xml ) || travis_terminate 1 source $PWD/INSTALL/bin/env_ccppetmr.sh From b1f69de106d49f31a611ef75dcc999b53136d751 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 2 Apr 2019 12:59:02 +0000 Subject: [PATCH 061/118] modify FindCython and remove OSX builds --- CMake/FindCython.cmake | 12 ++++++------ SuperBuild.cmake | 4 ++++ version_config.cmake | 3 ++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CMake/FindCython.cmake b/CMake/FindCython.cmake index 688f58ca..fbaf245c 100644 --- a/CMake/FindCython.cmake +++ b/CMake/FindCython.cmake @@ -8,14 +8,14 @@ # This finds the "cython" executable in your PATH, and then in some standard # paths: -SET(CYTHON_BIN cython CACHE STRING "Cython executable name") +SET(CYTHON_EXECUTABLE cython CACHE STRING "Cython executable name") SET(CYTHON_FLAGS --cplus --fast-fail) SET(Cython_FOUND FALSE) -IF (CYTHON_BIN) +IF (CYTHON_EXECUTABLE) # Try to run Cython, to make sure it works: execute_process( - COMMAND ${CYTHON_BIN} "--version" + COMMAND ${CYTHON_EXECUTABLE} "--version" RESULT_VARIABLE CYTHON_RESULT OUTPUT_QUIET ERROR_QUIET @@ -27,17 +27,17 @@ IF (CYTHON_BIN) else (CYTHON_RESULT EQUAL 0) SET(Cython_Compilation_Failed TRUE) endif (CYTHON_RESULT EQUAL 0) -ENDIF (CYTHON_BIN) +ENDIF (CYTHON_EXECUTABLE) IF (Cython_FOUND) IF (NOT Cython_FIND_QUIETLY) - MESSAGE(STATUS "Found CYTHON: ${CYTHON_BIN}") + 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_BIN}") + 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.") diff --git a/SuperBuild.cmake b/SuperBuild.cmake index 48acc939..a60a37d6 100644 --- a/SuperBuild.cmake +++ b/SuperBuild.cmake @@ -207,6 +207,10 @@ endif() if ("${PYTHON_STRATEGY}" STREQUAL "CONDA") set (BUILD_CIL OFF) endif() +if (APPLE) + message(WARNING "CIL Modules are not tested on OSX and will be disabled") + set(BUILD_CIL OFF) +endif() if (BUILD_CIL) list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES CCPi-RGL CCPi-Framework CCPi-FrameworkPlugins) endif() diff --git a/version_config.cmake b/version_config.cmake index 5323ef00..db67a1b3 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -169,7 +169,8 @@ else() # CCPi CIL set(CIL_VERSION "19.02") set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) - set(DEFAULT_CCPi-Framework_TAG d108cd7e9652992001a116347941eda7e75b3301) + #set(DEFAULT_CCPi-Framework_TAG d108cd7e9652992001a116347941eda7e75b3301) + set(DEFAULT_CCPi-Framework_TAG origin/composite_operator_datacontainer) set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) set(DEFAULT_CCPi-RGL_TAG "v${CIL_VERSION}") set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) From 11e656d579310a06471c7c24f6914d879b8f7e99 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 2 Apr 2019 13:01:14 +0000 Subject: [PATCH 062/118] add cil build --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0d2787c0..ce79616b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,6 +28,10 @@ cache: # shared between builds matrix: include: # linux g{cc,++}-6 py{27,3} + - os: linux + python: 3 + # -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" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 - os: linux python: 3 # -boost +fftw3 +hdf5 +ace From dd1b643503df087163659d78b4b9a9bca7c9f77e Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 2 Apr 2019 13:02:07 +0000 Subject: [PATCH 063/118] add cil build --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ce79616b..bd9eb69a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ matrix: - os: linux python: 3 # -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" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 + env: EXTRA_BUILD_FLAGS="-DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_SYSTEM_ACE=ON -DBUILD_CIL=ON" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 - os: linux python: 3 # -boost +fftw3 +hdf5 +ace From ce7ebffe9602b133bef88223fc7b06d82732961b Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 2 Apr 2019 13:36:29 +0000 Subject: [PATCH 064/118] install cython and numpy via pip --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index bd9eb69a..7674869e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -208,6 +208,7 @@ 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 +- $PY_EXE -m pip install --user -U numpy cython # for counting clones, excluding ours - | if [[ -n "$GITHUB_API_TOKEN" ]]; then From 642886d153844fdc93d22122d12e1785d6269aac Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Mon, 8 Apr 2019 21:39:44 +0000 Subject: [PATCH 065/118] fix indent and test phase --- SuperBuild/External_CCPi-Framework.cmake | 119 ++++++++-------- .../External_CCPi-FrameworkPlugins.cmake | 92 ++++++------ SuperBuild/External_CCPi-RGL.cmake | 134 +++++++++--------- 3 files changed, 167 insertions(+), 178 deletions(-) diff --git a/SuperBuild/External_CCPi-Framework.cmake b/SuperBuild/External_CCPi-Framework.cmake index 630814f8..f122aac8 100644 --- a/SuperBuild/External_CCPi-Framework.cmake +++ b/SuperBuild/External_CCPi-Framework.cmake @@ -52,84 +52,77 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr 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} + 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 - #TEST_COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_Data*.py && - #${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_algor*.py && - #${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_run_*.py - CMAKE_ARGS + 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} - ) + DEPENDS ${${proj}_DEPENDENCIES} + ) else() # if SETUP_PY one can launch the conda build.sh script setting # the appropriate variables. - 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} + 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 env CIL_VERSION=${CIL_VERSION} SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh - CMAKE_ARGS + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=${CIL_VERSION} SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} - DEPENDS - ${${proj}_DEPENDENCIES} - ) + DEPENDS ${${proj}_DEPENDENCIES} + ) endif() - set(${proj}_ROOT ${${proj}_SOURCE_DIR}) - set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR}) + 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) + 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() - if(${USE_SYSTEM_${externalProjName}}) - find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED) - message("USING the system ${externalProjName}, set ${externalProjName}_DIR=${${externalProjName}_DIR}") + else() + if(${USE_SYSTEM_${externalProjName}}) + find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED) + message("USING the system ${externalProjName}, set ${externalProjName}_DIR=${${externalProjName}_DIR}") endif() - 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} - ) + 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() mark_as_superbuild( - VARS - ${externalProjName}_DIR:PATH - LABELS - "FIND_PACKAGE" + VARS "" + LABELS "FIND_PACKAGE" ) diff --git a/SuperBuild/External_CCPi-FrameworkPlugins.cmake b/SuperBuild/External_CCPi-FrameworkPlugins.cmake index d88713ed..e5b05a20 100644 --- a/SuperBuild/External_CCPi-FrameworkPlugins.cmake +++ b/SuperBuild/External_CCPi-FrameworkPlugins.cmake @@ -54,59 +54,55 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr 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} + 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} - ) + 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. - 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} + 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 env CIL_VERSION=${CIL_VERSION} SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} - DEPENDS - ${${proj}_DEPENDENCIES} - ) + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=${CIL_VERSION} SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} + DEPENDS ${${proj}_DEPENDENCIES} + ) endif() - set(${proj}_ROOT ${${proj}_SOURCE_DIR}) - set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR}) + set(${proj}_ROOT ${${proj}_SOURCE_DIR}) + set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR}) - else() - if(${USE_SYSTEM_${externalProjName}}) - find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED) - message("USING the system ${externalProjName}, set ${externalProjName}_DIR=${${externalProjName}_DIR}") - endif() +else() + if(${USE_SYSTEM_${externalProjName}}) + find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED) + message("USING the system ${externalProjName}, set ${externalProjName}_DIR=${${externalProjName}_DIR}") + endif() ExternalProject_Add_Empty(${proj} DEPENDS "${${proj}_DEPENDENCIES}" SOURCE_DIR ${${proj}_SOURCE_DIR} BINARY_DIR ${${proj}_BINARY_DIR} @@ -114,11 +110,9 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr STAMP_DIR ${${proj}_STAMP_DIR} TMP_DIR ${${proj}_TMP_DIR} ) - endif() +endif() - mark_as_superbuild( - VARS - ${externalProjName}_DIR:PATH - LABELS - "FIND_PACKAGE" +mark_as_superbuild( + VARS "" + LABELS "FIND_PACKAGE" ) diff --git a/SuperBuild/External_CCPi-RGL.cmake b/SuperBuild/External_CCPi-RGL.cmake index 93b12371..1583d2f2 100644 --- a/SuperBuild/External_CCPi-RGL.cmake +++ b/SuperBuild/External_CCPi-RGL.cmake @@ -58,43 +58,44 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr if("${PYTHON_STRATEGY}" STREQUAL "PYTHONPATH") # in case of PYTHONPATH it is sufficient to copy the files to the # $PYTHONPATH directory - set (BUILD_PYTHON ${PYTHONLIBS_FOUND}) - if (BUILD_PYTHON) - set(PYTHON_DEST_DIR "" CACHE PATH "Directory of the CIL regularisation Python modules") - if (PYTHON_DEST_DIR) - set(PYTHON_DEST "${PYTHON_DEST_DIR}") - else() - set(PYTHON_DEST "${CMAKE_INSTALL_PREFIX}/python") + set (BUILD_PYTHON ${PYTHONLIBS_FOUND}) + if (BUILD_PYTHON) + set(PYTHON_DEST_DIR "" CACHE PATH "Directory of the CIL regularisation Python modules") + if (PYTHON_DEST_DIR) + set(PYTHON_DEST "${PYTHON_DEST_DIR}") + else() + set(PYTHON_DEST "${CMAKE_INSTALL_PREFIX}/python") + endif() + message(STATUS "Python libraries found") + message(STATUS "CIL Regularisation Python modules will be installed in " ${PYTHON_DEST}) endif() - message(STATUS "Python libraries found") - message(STATUS "CIL Regularisation Python modules will be installed in " ${PYTHON_DEST}) - endif() set(PYTHON_STRATEGY "PYTHONPATH" CACHE STRING "\ PYTHONPATH: prefix PYTHONPATH \n\ SETUP_PY: execute ${PYTHON_EXECUTABLE} setup.py install \n\ CONDA: do nothing") set_property(CACHE PYTHON_STRATEGY PROPERTY STRINGS PYTHONPATH SETUP_PY CONDA) - ExternalProject_Add(${proj} - ${${proj}_EP_ARGS} - GIT_REPOSITORY ${${proj}_URL} - GIT_TAG ${${proj}_TAG} - #GIT_TAG origin/cmaking - 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} - # apparently this is the only way to pass environment variables to - # external projects - CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=${CIL_VERSION} cmake ${${proj}_SOURCE_DIR} -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} + ExternalProject_Add(${proj} + ${${proj}_EP_ARGS} + GIT_REPOSITORY ${${proj}_URL} + GIT_TAG ${${proj}_TAG} + #GIT_TAG origin/cmaking + 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} + # apparently this is the only way to pass environment variables to + # external projects + CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=${CIL_VERSION} ${CMAKE_COMMAND} ${${proj}_SOURCE_DIR} -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} -DBUILD_PYTHON_WRAPPER=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_CUDA=ON -DCONDA_BUILD=OFF -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} -DPYTHON_DEST=${PYTHON_DEST_DIR} - BUILD_COMMAND make - INSTALL_COMMAND make install - TEST_COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -p ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/run_test*.py + # This build is Unix specific + BUILD_COMMAND ${CMAKE_COMMAND} --build . + INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install + #TEST_COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/test/ -p test*.py # CMAKE_ARGS # -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} @@ -102,55 +103,56 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr # -DBUILD_CUDA=OFF -DCONDA_BUILD=OFF # -DPYTHON_DEST=${PYTHON_DEST_DIR} - DEPENDS + DEPENDS ${${proj}_DEPENDENCIES} - ) + ) - else() - # if SETUP_PY one can launch the conda build.sh script setting - # the appropriate variables. - 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} + else() + # if SETUP_PY one can launch the conda build.sh script setting + # the appropriate variables. + 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 env CIL_VERSION=${CIL_VERSION} SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} - DEPENDS - ${${proj}_DEPENDENCIES} - ) - endif() + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=${CIL_VERSION} SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh + CMAKE_ARGS + -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} + DEPENDS + ${${proj}_DEPENDENCIES} + ) + endif() set(${proj}_ROOT ${${proj}_SOURCE_DIR}) set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR}) + add_test(NAME CIL_REGULARISATION_TEST_1 + COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s test -p test_*.py + WORKING_DIRECTORY ${${proj}_SOURCE_DIR}) - else() - if(${USE_SYSTEM_${externalProjName}}) - find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED) - message("USING the system ${externalProjName}, set ${externalProjName}_DIR=${${externalProjName}_DIR}") + else() + if(${USE_SYSTEM_${externalProjName}}) + find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED) + message("USING the system ${externalProjName}") endif() - 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} - ) + 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() mark_as_superbuild( - VARS - ${externalProjName}_DIR:PATH - LABELS - "FIND_PACKAGE" + VARS "" + LABELS "FIND_PACKAGE" ) From e7e8d95b90683f435ac14b696180bbeef8c36d36 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Thu, 25 Apr 2019 11:27:10 +0000 Subject: [PATCH 066/118] Add option Gadgetron_USE_MKL sets the USE_MKL variable for the configuration of Gadgetron closes #239 --- SuperBuild.cmake | 2 ++ SuperBuild/External_Gadgetron.cmake | 12 +----------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/SuperBuild.cmake b/SuperBuild.cmake index 14f68f00..97820134 100644 --- a/SuperBuild.cmake +++ b/SuperBuild.cmake @@ -145,6 +145,8 @@ option(USE_SYSTEM_SIRF "Build using an external version of SIRF" OFF) option(USE_SYSTEM_NIFTYREG "Build using an external version of NIFTYREG" OFF) option(USE_SYSTEM_GTest "Build using an external version of GTest" OFF) option(USE_SYSTEM_ACE "Build using an external version of ACE" ON) +option(Gadgetron_USE_MKL "Instruct Gadgetron to build linking to the MKL. The user must be able to install MKL on his own." OFF) +mark_as_advanced(Gadgetron_USE_MKL) if (WIN32) set(build_Gadgetron_default OFF) diff --git a/SuperBuild/External_Gadgetron.cmake b/SuperBuild/External_Gadgetron.cmake index e54b4f42..15f58200 100644 --- a/SuperBuild/External_Gadgetron.cmake +++ b/SuperBuild/External_Gadgetron.cmake @@ -54,16 +54,6 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${SUPERBUILD_INSTALL_DIR}) set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${SUPERBUILD_INSTALL_DIR}) - # work-around Gadgetron problem with old MKL -find_package(MKL) -if (MKL_FOUND) - if ( MKL_VERSION_STRING VERSION_LESS 11.2.0 ) - message(WARNING "Gadgetron requires Intel MKL version >= 11.2.0 but found ${MKL_VERSION_STRING}. Disabling usage of MKL") - set(MKL_FOUND false) - set(MKLROOT_PATH=) - endif () -endif () - # BLAS find_package(BLAS) if (APPLE AND NOT (CBLAS_LIBRARY AND CBLAS_INCLUDE_DIR)) @@ -112,7 +102,7 @@ endif () -DHDF5_INCLUDE_DIRS=${HDF5_INCLUDE_DIRS} -DHDF5_LIBRARIES=${HDF5_LIBRARIES} -DISMRMRD_DIR=${ISMRMRD_DIR} - -DMKLROOT_PATH=${MKLROOT_PATH} + -DUSE_MKL=${Gadgetron_USE_MKL} -DUSE_CUDA=${Gadgetron_USE_CUDA} -DCBLAS_INCLUDE_DIR:PATH=${CBLAS_INCLUDE_DIR} -DCBLAS_LIBRARY:FILEPATH=${CBLAS_LIBRARY} From 2aff173e8fe2a9eed8f13d6d7b3d8d69f86f37d1 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 1 May 2019 14:32:39 +0000 Subject: [PATCH 067/118] moved option Gadgetron_USE_MKL --- SuperBuild.cmake | 2 -- SuperBuild/External_Gadgetron.cmake | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/SuperBuild.cmake b/SuperBuild.cmake index 97820134..14f68f00 100644 --- a/SuperBuild.cmake +++ b/SuperBuild.cmake @@ -145,8 +145,6 @@ option(USE_SYSTEM_SIRF "Build using an external version of SIRF" OFF) option(USE_SYSTEM_NIFTYREG "Build using an external version of NIFTYREG" OFF) option(USE_SYSTEM_GTest "Build using an external version of GTest" OFF) option(USE_SYSTEM_ACE "Build using an external version of ACE" ON) -option(Gadgetron_USE_MKL "Instruct Gadgetron to build linking to the MKL. The user must be able to install MKL on his own." OFF) -mark_as_advanced(Gadgetron_USE_MKL) if (WIN32) set(build_Gadgetron_default OFF) diff --git a/SuperBuild/External_Gadgetron.cmake b/SuperBuild/External_Gadgetron.cmake index 15f58200..224db0f9 100644 --- a/SuperBuild/External_Gadgetron.cmake +++ b/SuperBuild/External_Gadgetron.cmake @@ -70,6 +70,7 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr RenameVariable(BUILD_GADGETRON_MATLAB_SUPPORT Gadgetron_BUILD_MATLAB_SUPPORT default_Gadgetron_BUILD_MATLAB_SUPPORT) option(Gadgetron_BUILD_MATLAB_SUPPORT "Build Gadgetron MATLAB gadgets (not required for SIRF)" ${default_Gadgetron_BUILD_MATLAB_SUPPORT}) + option(Gadgetron_USE_MKL "Instruct Gadgetron to build linking to the MKL. The user must be able to install MKL on his own." OFF) option(Gadgetron_USE_CUDA "Enable Gadgetron CUDA (if cuda libraries are present)" ON) mark_as_advanced(Gadgetron_USE_CUDA) From 52314c2d2dec4edc153196d38d142890e3f1cb05 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Thu, 2 May 2019 13:31:55 +0000 Subject: [PATCH 068/118] fixed conflicts --- version_config.cmake | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/version_config.cmake b/version_config.cmake index 6f6281c2..08ad3ff5 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -141,7 +141,6 @@ if (DEVEL_BUILD) set(DEFAULT_ACE_URL https://github.com/paskino/libace-conda) set(DEFAULT_ACE_TAG origin/master) -<<<<<<< HEAD # CCPi CIL set(CIL_VERSION "19.02") set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) @@ -211,31 +210,23 @@ SET(glog_TAG ${DEFAULT_glog_TAG} CACHE STRING ON) set(ACE_URL ${DEFAULT_ACE_URL} CACHE STRING ON) set(ACE_TAG ${DEFAULT_ACE_TAG} CACHE STRING ON) -<<<<<<< HEAD set(CCPi-RGL_URL ${DEFAULT_CCPi-RGL_URL} CACHE STRING ON) set(CCPi-RGL_TAG ${DEFAULT_CCPi-RGL_TAG} CACHE STRING ON) set(CCPi-Framework_URL ${DEFAULT_CCPi-Framework_URL} CACHE STRING ON) set(CCPi-Framework_TAG ${DEFAULT_CCPi-Framework_TAG} CACHE STRING ON) set(CCPi-FrameworkPlugins_URL ${DEFAULT_CCPi-FrameworkPlugins_URL} CACHE STRING ON) set(CCPi-FrameworkPlugins_TAG ${DEFAULT_CCPi-FrameworkPlugins_TAG} CACHE STRING ON) -======= set(NIFTYREG_URL ${DEFAULT_NIFTYREG_URL} CACHE STRING ON) set(NIFTYREG_TAG ${DEFAULT_NIFTYREG_TAG} CACHE STRING ON) ->>>>>>> origin mark_as_advanced(SIRF_URL SIRF_TAG STIR_URL STIR_TAG Gadgetron_URL Gadgetron_TAG siemens_to_ismrmrd_URL siemens_to_ismrmrd_TAG ISMRMRD_URL ISMRMRD_TAG -<<<<<<< HEAD - petmr_rd_tools_URL petmr_rd_tools_TAG + pet_rd_tools_URL pet_rd_tools_TAG glog_URL glog_TAG + NIFTYREG_URL NIFTYREG_TAG) CCPi-Framework_URL CCPi-Framework_TAG CCPi-FrameworkPlugins_URL CCPi-FrameworkPlugins_TAG CCPi-RGL_URL CCPi-RGL_TAG ) -======= - pet_rd_tools_URL pet_rd_tools_TAG - glog_URL glog_TAG - NIFTYREG_URL NIFTYREG_TAG) ->>>>>>> origin From d73b6714f718abf50c658f80a73f686483bd0ead Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Thu, 2 May 2019 13:40:24 +0000 Subject: [PATCH 069/118] removed parenthesis --- version_config.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_config.cmake b/version_config.cmake index 08ad3ff5..a7f3866d 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -225,7 +225,7 @@ mark_as_advanced(SIRF_URL SIRF_TAG STIR_URL STIR_TAG ISMRMRD_URL ISMRMRD_TAG pet_rd_tools_URL pet_rd_tools_TAG glog_URL glog_TAG - NIFTYREG_URL NIFTYREG_TAG) + NIFTYREG_URL NIFTYREG_TAG CCPi-Framework_URL CCPi-Framework_TAG CCPi-FrameworkPlugins_URL CCPi-FrameworkPlugins_TAG CCPi-RGL_URL CCPi-RGL_TAG From a9558606a11e2f90bc0d09e5d6025db8fc7be51f Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 2 Jul 2019 16:26:52 +0000 Subject: [PATCH 070/118] updated CIL versions --- version_config.cmake | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/version_config.cmake b/version_config.cmake index 19bca5fa..de36f95e 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -164,11 +164,11 @@ if (DEVEL_BUILD) set(DEFAULT_ACE_TAG origin/master) # CCPi CIL - set(CIL_VERSION "19.02") + set(CIL_VERSION "19.06") set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) set(DEFAULT_CCPi-Framework_TAG origin/master) - set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) - set(DEFAULT_CCPi-RGL_TAG origin/master) + set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git ) + set(DEFAULT_CCPi-RGL_TAG "${CIL_VERSION}") set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master) else() @@ -196,10 +196,9 @@ else() # CCPi CIL set(CIL_VERSION "19.06") set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) - #set(DEFAULT_CCPi-Framework_TAG origin/master) - set(DEFAULT_CCPi-Framework_TAG origin/composite_operator_datacontainer) + set(DEFAULT_CCPi-Framework_TAG origin/master) set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) - set(DEFAULT_CCPi-RGL_TAG "v${CIL_VERSION}") + set(DEFAULT_CCPi-RGL_TAG "${CIL_VERSION}") set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master) From ea10bcfa224c6d908041c27cc9201838619248c8 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 9 Jul 2019 20:21:07 +0000 Subject: [PATCH 071/118] use last CIL stable version --- version_config.cmake | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/version_config.cmake b/version_config.cmake index de36f95e..dc129bc4 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -164,13 +164,14 @@ if (DEVEL_BUILD) set(DEFAULT_ACE_TAG origin/master) # CCPi CIL - set(CIL_VERSION "19.06") + set(CIL_VERSION "v19.07") + set(RGL_VERSION "19.06") set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) - set(DEFAULT_CCPi-Framework_TAG origin/master) + set(DEFAULT_CCPi-Framework_TAG ${CIL_VERSION}) set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git ) - set(DEFAULT_CCPi-RGL_TAG "${CIL_VERSION}") + set(DEFAULT_CCPi-RGL_TAG "${RGL_VERSION}") set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) - set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master) + set(DEFAULT_CCPi-FrameworkPlugins_TAG "${CIL_VERSION}") else() # set(DEFAULT_SIRF_TAG v2.0.0) set (DEFAULT_SIRF_TAG origin/add_to_sirf_classes) From 028413249deb042d4ce1a9b24fa71577cb483dcb Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Mon, 15 Jul 2019 13:51:02 +0000 Subject: [PATCH 072/118] fixed CIL versions --- version_config.cmake | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/version_config.cmake b/version_config.cmake index dc129bc4..211a8919 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -162,16 +162,15 @@ if (DEVEL_BUILD) set(DEFAULT_ACE_URL https://github.com/paskino/libace-conda) set(DEFAULT_ACE_TAG origin/master) - # CCPi CIL - set(CIL_VERSION "v19.07") - set(RGL_VERSION "19.06") + #set(CIL_VERSION "19.06") set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) - set(DEFAULT_CCPi-Framework_TAG ${CIL_VERSION}) - set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git ) - set(DEFAULT_CCPi-RGL_TAG "${RGL_VERSION}") + set(DEFAULT_CCPi-Framework_TAG origin/master) + set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) + set(DEFAULT_CCPi-RGL_TAG origin/master) set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) - set(DEFAULT_CCPi-FrameworkPlugins_TAG "${CIL_VERSION}") + set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master) + else() # set(DEFAULT_SIRF_TAG v2.0.0) set (DEFAULT_SIRF_TAG origin/add_to_sirf_classes) @@ -195,13 +194,14 @@ else() set(DEFAULT_ACE_TAG origin/master) # CCPi CIL - set(CIL_VERSION "19.06") + set(CIL_VERSION "v19.07") + set(RGL_VERSION "19.06") set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) - set(DEFAULT_CCPi-Framework_TAG origin/master) - set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) - set(DEFAULT_CCPi-RGL_TAG "${CIL_VERSION}") + set(DEFAULT_CCPi-Framework_TAG ${CIL_VERSION}) + set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git ) + set(DEFAULT_CCPi-RGL_TAG "${RGL_VERSION}") set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) - set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master) + set(DEFAULT_CCPi-FrameworkPlugins_TAG "${CIL_VERSION}") endif() From 7c09193f04bb486a12329cbb0cb354f064ae0f3e Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 4 Sep 2019 13:03:14 +0100 Subject: [PATCH 073/118] added build for libastra --- SuperBuild.cmake | 2 +- SuperBuild/External_astra-toolbox.cmake | 187 ++++++++++++++++++++++++ version_config.cmake | 7 + 3 files changed, 195 insertions(+), 1 deletion(-) create mode 100644 SuperBuild/External_astra-toolbox.cmake diff --git a/SuperBuild.cmake b/SuperBuild.cmake index 55260eee..778c35b3 100644 --- a/SuperBuild.cmake +++ b/SuperBuild.cmake @@ -217,7 +217,7 @@ if (APPLE) set(BUILD_CIL OFF) endif() if (BUILD_CIL) - list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES CCPi-RGL CCPi-Framework CCPi-FrameworkPlugins) + list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES CCPi-RGL astra-toolbox CCPi-Framework CCPi-FrameworkPlugins) endif() if (BUILD_SIRF_Registration) diff --git a/SuperBuild/External_astra-toolbox.cmake b/SuperBuild/External_astra-toolbox.cmake new file mode 100644 index 00000000..d905295c --- /dev/null +++ b/SuperBuild/External_astra-toolbox.cmake @@ -0,0 +1,187 @@ +#======================================================================== +# Author: Edoardo Pasca +# Copyright 2017-2018 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 astra-toolbox) + +# Set dependency list +set(${proj}_DEPENDENCIES "Boost") + +# Include dependent projects if any +ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${proj}_DEPENDENCIES) + +find_package(Cython) +if(NOT ${Cython_FOUND}) + message(FATAL_ERROR "CCPi-Regularisation-Toolkit depends on Cython") +endif() + +find_package(CUDA) +# as in CCPi RGL +if (CUDA_FOUND) + set(CUDA_NVCC_FLAGS "-Xcompiler -fPIC -shared -D_FORCE_INLINES") + message(WARNING "CUDA_SDK_ROOT_DIR ${CUDA_SDK_ROOT_DIR}") + message(WARNING "CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT_DIR}") +endif() + +# 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(libastra_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("astra-toolkit URL " ${${proj}_URL} ) + message("astra-toolkit 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 + set (BUILD_PYTHON ${PYTHONLIBS_FOUND}) + if (BUILD_PYTHON) + set(PYTHON_DEST_DIR "" CACHE PATH "Directory of the CIL regularisation Python modules") + if (PYTHON_DEST_DIR) + set(PYTHON_DEST "${PYTHON_DEST_DIR}") + else() + set(PYTHON_DEST "${CMAKE_INSTALL_PREFIX}/python") + endif() + message(STATUS "Python libraries found") + message(STATUS "CIL Regularisation Python modules will be installed in " ${PYTHON_DEST}) + endif() + set(PYTHON_STRATEGY "PYTHONPATH" CACHE STRING "\ + PYTHONPATH: prefix PYTHONPATH \n\ + SETUP_PY: execute ${PYTHON_EXECUTABLE} setup.py install \n\ + CONDA: do nothing") + set_property(CACHE PYTHON_STRATEGY PROPERTY STRINGS PYTHONPATH SETUP_PY CONDA) + + +#create a configure script +file(WRITE ${${proj}_SOURCE_DIR}/configure-launch +" +#! /bin/bash + +echo $0 received $# parameters + +for arg +do echo $arg +done + +${${proj}_SOURCE_DIR}/build/linux/configure $@ --with-cuda=${CUDA_TOOLKIT_ROOT_DIR} --prefix=${libastra_Install_Dir} --with-install-type=prefix + +") + +set(cmd "${${proj}_SOURCE_DIR}/build/linux/configure") +list(APPEND cmd "CPPFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib") +list(APPEND cmd "NVCCFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib") + + +file(COPY ${${proj}_SOURCE_DIR}/configure-launch + DESTINATION ${${proj}_BINARY_DIR} + FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) + + ExternalProject_Add(${proj} + ${${proj}_EP_ARGS} + GIT_REPOSITORY ${${proj}_URL} + GIT_TAG ${${proj}_TAG} + #GIT_TAG origin/cmaking + 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 ${libastra_Install_Dir} + # apparently this is the only way to pass environment variables to + # external projects + CONFIGURE_COMMAND + ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux + ${CMAKE_COMMAND} -E env ./autogen.sh + ${CMAKE_COMMAND} -E env ${cmd} --with-cuda=${CUDA_TOOLKIT_ROOT_DIR} --prefix=${libastra_Install_Dir} --with-install-type=prefix + + # This build is Unix specific + BUILD_COMMAND + ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux + ${CMAKE_COMMAND} -E env make clean + ${CMAKE_COMMAND} -E env make install-libraries + INSTALL_COMMAND + ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux + DEPENDS + ${${proj}_DEPENDENCIES} + ) + + else() + # if SETUP_PY one can launch the conda build.sh script setting + # the appropriate variables. + 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 env CIL_VERSION=${CIL_VERSION} SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh + CMAKE_ARGS + -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} + DEPENDS + ${${proj}_DEPENDENCIES} + ) + endif() + + + set(${proj}_ROOT ${${proj}_SOURCE_DIR}) + set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR}) + #add_test(NAME CIL_REGULARISATION_TEST_1 + # COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s test -p test_*.py + #WORKING_DIRECTORY ${${proj}_SOURCE_DIR}) + + else() + if(${USE_SYSTEM_${externalProjName}}) + find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED) + message("USING the system ${externalProjName}") + endif() + 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() + + mark_as_superbuild( + VARS "" + LABELS "FIND_PACKAGE" + ) diff --git a/version_config.cmake b/version_config.cmake index 211a8919..e6163199 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -133,6 +133,10 @@ set(DEFAULT_ISMRMRD_TAG v1.4.0) set(DEFAULT_Gadgetron_URL https://github.com/gadgetron/gadgetron ) set(DEFAULT_Gadgetron_TAG b6191eaaa72ccca6c6a5fe4c0fa3319694f512ab) +## ASTRA +set(DEFAULT_astra-toolbox_URL https://github.com/astra-toolbox/astra-toolbox ) +set(DEFAULT_astra-toolbox_TAG v1.8.3) + option (DEVEL_BUILD "Developer Build" OFF) mark_as_advanced(DEVEL_BUILD) @@ -238,6 +242,9 @@ set(CCPi-Framework_URL ${DEFAULT_CCPi-Framework_URL} CACHE STRING ON) set(CCPi-Framework_TAG ${DEFAULT_CCPi-Framework_TAG} CACHE STRING ON) set(CCPi-FrameworkPlugins_URL ${DEFAULT_CCPi-FrameworkPlugins_URL} CACHE STRING ON) set(CCPi-FrameworkPlugins_TAG ${DEFAULT_CCPi-FrameworkPlugins_TAG} CACHE STRING ON) +set(astra-toolbox_URL ${DEFAULT_astra-toolbox_URL} CACHE STRING ON) +set(astra-toolbox_TAG ${DEFAULT_astra-toolbox_TAG} CACHE STRING ON) + set(NIFTYREG_URL ${DEFAULT_NIFTYREG_URL} CACHE STRING ON) set(NIFTYREG_TAG ${DEFAULT_NIFTYREG_TAG} CACHE STRING ON) From 481dccd2c854d527298a81702f3f09c76fe57b48 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 4 Sep 2019 14:10:36 +0100 Subject: [PATCH 074/118] added build of astra python wrapper --- SuperBuild/External_astra-toolbox.cmake | 66 ++++++++++++++++--------- 1 file changed, 42 insertions(+), 24 deletions(-) diff --git a/SuperBuild/External_astra-toolbox.cmake b/SuperBuild/External_astra-toolbox.cmake index d905295c..531d1242 100644 --- a/SuperBuild/External_astra-toolbox.cmake +++ b/SuperBuild/External_astra-toolbox.cmake @@ -83,30 +83,10 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr set_property(CACHE PYTHON_STRATEGY PROPERTY STRINGS PYTHONPATH SETUP_PY CONDA) -#create a configure script -file(WRITE ${${proj}_SOURCE_DIR}/configure-launch -" -#! /bin/bash - -echo $0 received $# parameters - -for arg -do echo $arg -done - -${${proj}_SOURCE_DIR}/build/linux/configure $@ --with-cuda=${CUDA_TOOLKIT_ROOT_DIR} --prefix=${libastra_Install_Dir} --with-install-type=prefix - -") - set(cmd "${${proj}_SOURCE_DIR}/build/linux/configure") list(APPEND cmd "CPPFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib") list(APPEND cmd "NVCCFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib") - -file(COPY ${${proj}_SOURCE_DIR}/configure-launch - DESTINATION ${${proj}_BINARY_DIR} - FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) - ExternalProject_Add(${proj} ${${proj}_EP_ARGS} GIT_REPOSITORY ${${proj}_URL} @@ -127,15 +107,53 @@ file(COPY ${${proj}_SOURCE_DIR}/configure-launch # This build is Unix specific BUILD_COMMAND - ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux - ${CMAKE_COMMAND} -E env make clean - ${CMAKE_COMMAND} -E env make install-libraries + ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux make install-libraries INSTALL_COMMAND - ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux + ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ls -h DEPENDS ${${proj}_DEPENDENCIES} ) + set(python_wrapper "astra-python-wrapper") + + #create a configure script + file(WRITE ${${proj}_SOURCE_DIR}/python_build +" +#! /bin/bash +set -ex + +CPPFLAGS="-DASTRA_CUDA -DASTRA_PYTHON -I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib -I${${proj}_SOURCE_DIR}/include" CC=${CMAKE_C_COMPILER} ${PYTHON_EXECUTABLE} builder.py build +") + + + file(COPY ${${proj}_SOURCE_DIR}/python_build + DESTINATION ${${proj}_SOURCE_DIR}/python + FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) + + set(cppflags "-DASTRA_CUDA -DASTRA_PYTHON -I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib -I${${proj}_SOURCE_DIR}/include") + set(build_python "") + list (APPEND build_python "CC=${CMAKE_C_COMPILER}") + ExternalProject_Add(${python_wrapper} + ${${proj}_EP_ARGS} + 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 ${libastra_Install_Dir} + # apparently this is the only way to pass environment variables to + # external projects + CONFIGURE_COMMAND "" + + # This build is Unix specific + BUILD_COMMAND + ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/python ./python_build + INSTALL_COMMAND + ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ls -h + DEPENDS + ${proj} + ) + else() # if SETUP_PY one can launch the conda build.sh script setting # the appropriate variables. From 66e688df6eabe96796161e6d88aad2b231f9c23d Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 4 Sep 2019 14:36:23 +0100 Subject: [PATCH 075/118] fix build --- SuperBuild/External_astra-toolbox.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SuperBuild/External_astra-toolbox.cmake b/SuperBuild/External_astra-toolbox.cmake index 531d1242..d3cdc060 100644 --- a/SuperBuild/External_astra-toolbox.cmake +++ b/SuperBuild/External_astra-toolbox.cmake @@ -101,15 +101,15 @@ list(APPEND cmd "NVCCFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_IN # apparently this is the only way to pass environment variables to # external projects CONFIGURE_COMMAND - ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux - ${CMAKE_COMMAND} -E env ./autogen.sh - ${CMAKE_COMMAND} -E env ${cmd} --with-cuda=${CUDA_TOOLKIT_ROOT_DIR} --prefix=${libastra_Install_Dir} --with-install-type=prefix + ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ./autogen.sh + #${CMAKE_COMMAND} -E env ./autogen.sh # This build is Unix specific BUILD_COMMAND - ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux make install-libraries + ${CMAKE_COMMAND} -E env ${cmd} --with-cuda=${CUDA_TOOLKIT_ROOT_DIR} --prefix=${libastra_Install_Dir} --with-install-type=prefix INSTALL_COMMAND - ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ls -h + ${CMAKE_COMMAND} -E chdir ${${proj}_BINARY_DIR}/ make -j install-libraries + #${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ls -h DEPENDS ${${proj}_DEPENDENCIES} ) @@ -122,7 +122,7 @@ list(APPEND cmd "NVCCFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_IN #! /bin/bash set -ex -CPPFLAGS="-DASTRA_CUDA -DASTRA_PYTHON -I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib -I${${proj}_SOURCE_DIR}/include" CC=${CMAKE_C_COMPILER} ${PYTHON_EXECUTABLE} builder.py build +CPPFLAGS=\"-DASTRA_CUDA -DASTRA_PYTHON -I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib -I${${proj}_SOURCE_DIR}/include\" CC=${CMAKE_C_COMPILER} ${PYTHON_EXECUTABLE} builder.py build ") From a37bd033edb48ca15f7b05595da696f3fcbb50b7 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 4 Sep 2019 15:05:44 +0100 Subject: [PATCH 076/118] added CCPi-Astra --- SuperBuild.cmake | 2 +- SuperBuild/External_CCPi-Astra.cmake | 119 ++++++++++++++++++++++++ SuperBuild/External_astra-toolbox.cmake | 25 +++-- version_config.cmake | 6 ++ 4 files changed, 144 insertions(+), 8 deletions(-) create mode 100644 SuperBuild/External_CCPi-Astra.cmake diff --git a/SuperBuild.cmake b/SuperBuild.cmake index 778c35b3..4eec61f4 100644 --- a/SuperBuild.cmake +++ b/SuperBuild.cmake @@ -217,7 +217,7 @@ if (APPLE) set(BUILD_CIL OFF) endif() if (BUILD_CIL) - list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES CCPi-RGL astra-toolbox CCPi-Framework CCPi-FrameworkPlugins) + list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES CCPi-RGL CCPi-Astra CCPi-Framework CCPi-FrameworkPlugins) endif() if (BUILD_SIRF_Registration) diff --git a/SuperBuild/External_CCPi-Astra.cmake b/SuperBuild/External_CCPi-Astra.cmake new file mode 100644 index 00000000..576c19a5 --- /dev/null +++ b/SuperBuild/External_CCPi-Astra.cmake @@ -0,0 +1,119 @@ +#======================================================================== +# Author: Edoardo Pasca +# Copyright 2018 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("CIL proj " ${proj} ) + message("CIL URL " ${${proj}_URL} ) + message("CIL 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() + # THIS IS NOT TESTED + # if SETUP_PY one can launch the conda build.sh script setting + # the appropriate variables. + 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 env CIL_VERSION=${CIL_VERSION} SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} + DEPENDS ${${proj}_DEPENDENCIES} + ) + endif() + + + set(${proj}_ROOT ${${proj}_SOURCE_DIR}) + set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR}) + +else() + if(${USE_SYSTEM_${externalProjName}}) + find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED) + message("USING the system ${externalProjName}, set ${externalProjName}_DIR=${${externalProjName}_DIR}") + endif() + 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() + +mark_as_superbuild( + VARS "" + LABELS "FIND_PACKAGE" + ) diff --git a/SuperBuild/External_astra-toolbox.cmake b/SuperBuild/External_astra-toolbox.cmake index d3cdc060..0d6f7f05 100644 --- a/SuperBuild/External_astra-toolbox.cmake +++ b/SuperBuild/External_astra-toolbox.cmake @@ -130,9 +130,20 @@ CPPFLAGS=\"-DASTRA_CUDA -DASTRA_PYTHON -I${SUPERBUILD_INSTALL_DIR}/include -L${S DESTINATION ${${proj}_SOURCE_DIR}/python FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) - set(cppflags "-DASTRA_CUDA -DASTRA_PYTHON -I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib -I${${proj}_SOURCE_DIR}/include") - set(build_python "") - list (APPEND build_python "CC=${CMAKE_C_COMPILER}") + #create an install script + file(WRITE ${${proj}_SOURCE_DIR}/python_install +" +#! /bin/bash +set -ex +build_dir=`ls ${${proj}_SOURCE_DIR}/python/build/ | grep lib` +cp -rv ${${proj}_SOURCE_DIR}/python/build/$build_dir ${libastra_Install_Dir}/python/ + +") + + file(COPY ${${proj}_SOURCE_DIR}/python_install + DESTINATION ${${proj}_SOURCE_DIR}/python + FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) + ExternalProject_Add(${python_wrapper} ${${proj}_EP_ARGS} SOURCE_DIR ${${proj}_SOURCE_DIR} @@ -149,7 +160,7 @@ CPPFLAGS=\"-DASTRA_CUDA -DASTRA_PYTHON -I${SUPERBUILD_INSTALL_DIR}/include -L${S BUILD_COMMAND ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/python ./python_build INSTALL_COMMAND - ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ls -h + ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/python ./python_install DEPENDS ${proj} ) @@ -181,9 +192,9 @@ CPPFLAGS=\"-DASTRA_CUDA -DASTRA_PYTHON -I${SUPERBUILD_INSTALL_DIR}/include -L${S set(${proj}_ROOT ${${proj}_SOURCE_DIR}) set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR}) - #add_test(NAME CIL_REGULARISATION_TEST_1 - # COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s test -p test_*.py - #WORKING_DIRECTORY ${${proj}_SOURCE_DIR}) + add_test(NAME ASTRA_BASIC_TEST + COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s test -p test_*.py + WORKING_DIRECTORY ${${proj}_SOURCE_DIR}) else() if(${USE_SYSTEM_${externalProjName}}) diff --git a/version_config.cmake b/version_config.cmake index e6163199..a3834a60 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -174,6 +174,8 @@ if (DEVEL_BUILD) set(DEFAULT_CCPi-RGL_TAG origin/master) set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master) + set(DEFAULT_CCPi-Astra_URL https://github.com/vais-ral/CCPi-Astra.git) + set(DEFAULT_CCPi-Astra_TAG origin/master) else() # set(DEFAULT_SIRF_TAG v2.0.0) @@ -206,6 +208,8 @@ else() set(DEFAULT_CCPi-RGL_TAG "${RGL_VERSION}") set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) set(DEFAULT_CCPi-FrameworkPlugins_TAG "${CIL_VERSION}") + set(DEFAULT_CCPi-Astra_URL https://github.com/vais-ral/CCPi-Astra.git) + set(DEFAULT_CCPi-Astra_TAG "${CIL_VERSION}") endif() @@ -242,6 +246,8 @@ set(CCPi-Framework_URL ${DEFAULT_CCPi-Framework_URL} CACHE STRING ON) set(CCPi-Framework_TAG ${DEFAULT_CCPi-Framework_TAG} CACHE STRING ON) set(CCPi-FrameworkPlugins_URL ${DEFAULT_CCPi-FrameworkPlugins_URL} CACHE STRING ON) set(CCPi-FrameworkPlugins_TAG ${DEFAULT_CCPi-FrameworkPlugins_TAG} CACHE STRING ON) +set(CCPi-Astra_URL ${DEFAULT_CCPi-Astra_URL} CACHE STRING ON) +set(CCPi-Astra_TAG ${DEFAULT_CCPi-Astra_TAG} CACHE STRING ON) set(astra-toolbox_URL ${DEFAULT_astra-toolbox_URL} CACHE STRING ON) set(astra-toolbox_TAG ${DEFAULT_astra-toolbox_TAG} CACHE STRING ON) From 6f66a733c492843ef613fbd656857436e07af8e5 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Thu, 5 Sep 2019 15:17:31 +0100 Subject: [PATCH 077/118] copy TestData --- SuperBuild/External_CCPi-Framework.cmake | 2 +- SuperBuild/External_astra-toolbox.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SuperBuild/External_CCPi-Framework.cmake b/SuperBuild/External_CCPi-Framework.cmake index f122aac8..de1b1731 100644 --- a/SuperBuild/External_CCPi-Framework.cmake +++ b/SuperBuild/External_CCPi-Framework.cmake @@ -65,7 +65,7 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr CONFIGURE_COMMAND "" BUILD_COMMAND "" - INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${${proj}_SOURCE_DIR}/Wrappers/Python/ccpi ${PYTHON_DEST}/ccpi + 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} diff --git a/SuperBuild/External_astra-toolbox.cmake b/SuperBuild/External_astra-toolbox.cmake index 0d6f7f05..6302db4f 100644 --- a/SuperBuild/External_astra-toolbox.cmake +++ b/SuperBuild/External_astra-toolbox.cmake @@ -106,7 +106,7 @@ list(APPEND cmd "NVCCFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_IN # This build is Unix specific BUILD_COMMAND - ${CMAKE_COMMAND} -E env ${cmd} --with-cuda=${CUDA_TOOLKIT_ROOT_DIR} --prefix=${libastra_Install_Dir} --with-install-type=prefix + ${CMAKE_COMMAND} -E env ${cmd} --with-cuda=${CUDA_TOOLKIT_ROOT_DIR} --prefix=${libastra_Install_Dir} --with-install-type=prefix --with-python INSTALL_COMMAND ${CMAKE_COMMAND} -E chdir ${${proj}_BINARY_DIR}/ make -j install-libraries #${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ls -h @@ -136,7 +136,7 @@ CPPFLAGS=\"-DASTRA_CUDA -DASTRA_PYTHON -I${SUPERBUILD_INSTALL_DIR}/include -L${S #! /bin/bash set -ex build_dir=`ls ${${proj}_SOURCE_DIR}/python/build/ | grep lib` -cp -rv ${${proj}_SOURCE_DIR}/python/build/$build_dir ${libastra_Install_Dir}/python/ +cp -rv ${${proj}_SOURCE_DIR}/python/build/$build_dir/astra ${libastra_Install_Dir}/python/ ") From 448445d37372a9d6ecd08c6e5d7da36105a0dc49 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Thu, 5 Sep 2019 15:18:05 +0100 Subject: [PATCH 078/118] added environment variable SIRF_INSTALL_PATH --- env_ccppetmr.csh.in | 2 ++ env_ccppetmr.sh.in | 3 +++ 2 files changed, 5 insertions(+) diff --git a/env_ccppetmr.csh.in b/env_ccppetmr.csh.in index b39989f4..f16a152e 100755 --- a/env_ccppetmr.csh.in +++ b/env_ccppetmr.csh.in @@ -4,6 +4,8 @@ # Preferably add this line to your .cshrc setenv SIRF_PATH @SIRF_SRC_DIR@ +# Where all binaries are installed +setenv SIRF_INSTALL_PATH @CCPPETMR_INSTALL@ # Where to find shared libraries # Setting for Linux but doesn't harm elsewhere if $?LD_LIBRARY_PATH then diff --git a/env_ccppetmr.sh.in b/env_ccppetmr.sh.in index f2d2fa27..60915fcb 100755 --- a/env_ccppetmr.sh.in +++ b/env_ccppetmr.sh.in @@ -6,6 +6,9 @@ SIRF_PATH=@SIRF_SRC_DIR@ export SIRF_PATH +# Where all binaries are installed +SIRF_INSTALL_PATH=@CCPPETMR_INSTALL@ +export SIRF_INSTALL_PATH # Where to find shared libraries # Setting for Linux but doesn't harm elsewhere LD_LIBRARY_PATH=@CCPPETMR_INSTALL@/lib:$LD_LIBRARY_PATH From 07938a26d0dcce4b00036fe3c2282538937d807b Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Mon, 9 Sep 2019 13:46:46 +0100 Subject: [PATCH 079/118] updated branch and add test --- SuperBuild/External_astra-toolbox.cmake | 6 ++++-- version_config.cmake | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/SuperBuild/External_astra-toolbox.cmake b/SuperBuild/External_astra-toolbox.cmake index 6302db4f..5b27feed 100644 --- a/SuperBuild/External_astra-toolbox.cmake +++ b/SuperBuild/External_astra-toolbox.cmake @@ -32,7 +32,8 @@ if(NOT ${Cython_FOUND}) message(FATAL_ERROR "CCPi-Regularisation-Toolkit depends on Cython") endif() -find_package(CUDA) +set (CUDA_TOOLKIT_ROOT_DIR $ENV{CUDA_BIN_DIR}) +find_package(CUDA REQUIRED) # as in CCPi RGL if (CUDA_FOUND) set(CUDA_NVCC_FLAGS "-Xcompiler -fPIC -shared -D_FORCE_INLINES") @@ -193,7 +194,8 @@ cp -rv ${${proj}_SOURCE_DIR}/python/build/$build_dir/astra ${libastra_Install_Di set(${proj}_ROOT ${${proj}_SOURCE_DIR}) set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR}) add_test(NAME ASTRA_BASIC_TEST - COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s test -p test_*.py + #COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s test -p test_*.py + COMMAND ${PYTHON_EXECUTABLE} -c "import astra; astra.test_CUDA()" WORKING_DIRECTORY ${${proj}_SOURCE_DIR}) else() diff --git a/version_config.cmake b/version_config.cmake index a3834a60..fdf13a8f 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -179,7 +179,7 @@ if (DEVEL_BUILD) else() # set(DEFAULT_SIRF_TAG v2.0.0) - set (DEFAULT_SIRF_TAG origin/add_to_sirf_classes) + set (DEFAULT_SIRF_TAG origin/add_to_sirf_classes_merge_master) ## STIR set(DEFAULT_STIR_URL https://github.com/UCL/STIR ) set(DEFAULT_STIR_TAG 3a277f7a819f35a553a8d6097402ea25cf55a240) From 9a800f704dded1ade70b8564ade31d2c5f4193ee Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 11 Sep 2019 13:40:52 +0000 Subject: [PATCH 080/118] does not build CUDA support if not found --- SuperBuild/External_astra-toolbox.cmake | 56 +++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/SuperBuild/External_astra-toolbox.cmake b/SuperBuild/External_astra-toolbox.cmake index 5b27feed..8cbbd549 100644 --- a/SuperBuild/External_astra-toolbox.cmake +++ b/SuperBuild/External_astra-toolbox.cmake @@ -33,7 +33,7 @@ if(NOT ${Cython_FOUND}) endif() set (CUDA_TOOLKIT_ROOT_DIR $ENV{CUDA_BIN_DIR}) -find_package(CUDA REQUIRED) +find_package(CUDA) # as in CCPi RGL if (CUDA_FOUND) set(CUDA_NVCC_FLAGS "-Xcompiler -fPIC -shared -D_FORCE_INLINES") @@ -86,7 +86,8 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr set(cmd "${${proj}_SOURCE_DIR}/build/linux/configure") list(APPEND cmd "CPPFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib") -list(APPEND cmd "NVCCFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib") +if (CUDA_FOUND) + list(APPEND cmd "NVCCFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib") ExternalProject_Add(${proj} ${${proj}_EP_ARGS} @@ -126,6 +127,49 @@ set -ex CPPFLAGS=\"-DASTRA_CUDA -DASTRA_PYTHON -I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib -I${${proj}_SOURCE_DIR}/include\" CC=${CMAKE_C_COMPILER} ${PYTHON_EXECUTABLE} builder.py build ") +else() +# No CUDA + message (WARNING "No CUDA found on host, skipping GPU") + ExternalProject_Add(${proj} + ${${proj}_EP_ARGS} + GIT_REPOSITORY ${${proj}_URL} + GIT_TAG ${${proj}_TAG} + #GIT_TAG origin/cmaking + 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 ${libastra_Install_Dir} + # apparently this is the only way to pass environment variables to + # external projects + CONFIGURE_COMMAND + ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ./autogen.sh + #${CMAKE_COMMAND} -E env ./autogen.sh + + # This build is Unix specific + BUILD_COMMAND + ${CMAKE_COMMAND} -E env ${cmd} --prefix=${libastra_Install_Dir} --with-install-type=prefix --with-python + INSTALL_COMMAND + ${CMAKE_COMMAND} -E chdir ${${proj}_BINARY_DIR}/ make -j install-libraries + #${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ls -h + DEPENDS + ${${proj}_DEPENDENCIES} + ) + + set(python_wrapper "astra-python-wrapper") + + #create a configure script + file(WRITE ${${proj}_SOURCE_DIR}/python_build +" +#! /bin/bash +set -ex + +CPPFLAGS=\"-DASTRA_PYTHON -I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib -I${${proj}_SOURCE_DIR}/include\" CC=${CMAKE_C_COMPILER} ${PYTHON_EXECUTABLE} builder.py build +") + + +endif() file(COPY ${${proj}_SOURCE_DIR}/python_build DESTINATION ${${proj}_SOURCE_DIR}/python @@ -195,8 +239,14 @@ cp -rv ${${proj}_SOURCE_DIR}/python/build/$build_dir/astra ${libastra_Install_Di set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR}) add_test(NAME ASTRA_BASIC_TEST #COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s test -p test_*.py - COMMAND ${PYTHON_EXECUTABLE} -c "import astra; astra.test_CUDA()" + COMMAND ${PYTHON_EXECUTABLE} -c "import astra; astra.test_noCUDA()" WORKING_DIRECTORY ${${proj}_SOURCE_DIR}) + if (CUDA_FOUND) + add_test(NAME ASTRA_BASIC_GPU_TEST + #COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s test -p test_*.py + COMMAND ${PYTHON_EXECUTABLE} -c "import astra; astra.test_CUDA()" + WORKING_DIRECTORY ${${proj}_SOURCE_DIR}) + endif() else() if(${USE_SYSTEM_${externalProjName}}) From 29028e9b7645056e0129a468cb83bd632cbb0c39 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 11 Sep 2019 13:41:37 +0000 Subject: [PATCH 081/118] ccpi framework branch --- version_config.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_config.cmake b/version_config.cmake index fdf13a8f..bef0a564 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -203,7 +203,7 @@ else() set(CIL_VERSION "v19.07") set(RGL_VERSION "19.06") set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) - set(DEFAULT_CCPi-Framework_TAG ${CIL_VERSION}) + set(DEFAULT_CCPi-Framework_TAG origin/finite_diff_for_sirf) set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git ) set(DEFAULT_CCPi-RGL_TAG "${RGL_VERSION}") set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) From f9862cb0af6a4dc6e90c289fbca13290fddc6928 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 11 Sep 2019 14:51:44 +0000 Subject: [PATCH 082/118] Added TomoPhantom to create CT analytical phantoms/sinograms --- SuperBuild/External_CCPi-Framework.cmake | 2 +- SuperBuild/External_TomoPhantom.cmake | 101 +++++++++++++++++++++++ version_config.cmake | 8 +- 3 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 SuperBuild/External_TomoPhantom.cmake diff --git a/SuperBuild/External_CCPi-Framework.cmake b/SuperBuild/External_CCPi-Framework.cmake index de1b1731..f76b6a6f 100644 --- a/SuperBuild/External_CCPi-Framework.cmake +++ b/SuperBuild/External_CCPi-Framework.cmake @@ -22,7 +22,7 @@ set(proj CCPi-Framework) # Set dependency list -set(${proj}_DEPENDENCIES "") +set(${proj}_DEPENDENCIES "TomoPhantom") # Include dependent projects if any ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${proj}_DEPENDENCIES) diff --git a/SuperBuild/External_TomoPhantom.cmake b/SuperBuild/External_TomoPhantom.cmake new file mode 100644 index 00000000..bdfddccf --- /dev/null +++ b/SuperBuild/External_TomoPhantom.cmake @@ -0,0 +1,101 @@ +#======================================================================== +# Author: Benjamin A Thomas +# Author: Kris Thielemans +# Author: Edoardo Pasca +# Copyright 2017, 2018 University College London +# Copyright 2017, 2018 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 TomoPhantom) + +# 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(TomoPhantom_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}) + + + + 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} + + CMAKE_ARGS + -DCMAKE_INSTALL_PREFIX=${TomoPhantom_Install_Dir} + -DLIBRARY_DIR=${TomoPhantom_Install_Dir}/lib + -DINCLUDE_DIR=${TomoPhantom_Install_Dir}/include + -DCONDA_BUILD=OFF + -DBUILD_PYTHON_WRAPPER=ON + -DCMAKE_BUILD_TYPE=Release + + # TODO this relies on using "make", but we could be build with something else + #INSTALL_COMMAND make TomoPhantom + DEPENDS + ${${proj}_DEPENDENCIES} + ) + + # not used + # set(${proj}_ROOT ${${proj}_SOURCE_DIR}) + # set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR}) + + else() + if(${USE_SYSTEM_${externalProjName}}) + find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED) + message(STATUS "USING the system ${externalProjName}, found ACE_LIBRARIES=${ACE_LIBRARIES}") + endif() + 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() + +# Currently, setting ACE_ROOT has no effect, see https://github.com/CCPPETMR/SIRF-SuperBuild/issues/147 +# mark_as_superbuild( +# VARS +# ${externalProjName}_ROOT:PATH +# LABELS +# "FIND_PACKAGE" +# ) diff --git a/version_config.cmake b/version_config.cmake index bef0a564..5b644004 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -137,6 +137,10 @@ set(DEFAULT_Gadgetron_TAG b6191eaaa72ccca6c6a5fe4c0fa3319694f512ab) set(DEFAULT_astra-toolbox_URL https://github.com/astra-toolbox/astra-toolbox ) set(DEFAULT_astra-toolbox_TAG v1.8.3) +## TomoPhantom +set(DEFAULT_TomoPhantom_URL https://github.com/dkazanc/TomoPhantom ) +set(DEFAULT_TomoPhantom_TAG v1.4) + option (DEVEL_BUILD "Developer Build" OFF) mark_as_advanced(DEVEL_BUILD) @@ -209,7 +213,7 @@ else() set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) set(DEFAULT_CCPi-FrameworkPlugins_TAG "${CIL_VERSION}") set(DEFAULT_CCPi-Astra_URL https://github.com/vais-ral/CCPi-Astra.git) - set(DEFAULT_CCPi-Astra_TAG "${CIL_VERSION}") + set(DEFAULT_CCPi-Astra_TAG origin/cpu_projector) endif() @@ -250,6 +254,8 @@ set(CCPi-Astra_URL ${DEFAULT_CCPi-Astra_URL} CACHE STRING ON) set(CCPi-Astra_TAG ${DEFAULT_CCPi-Astra_TAG} CACHE STRING ON) set(astra-toolbox_URL ${DEFAULT_astra-toolbox_URL} CACHE STRING ON) set(astra-toolbox_TAG ${DEFAULT_astra-toolbox_TAG} CACHE STRING ON) +set(TomoPhantom_URL ${DEFAULT_TomoPhantom_URL} CACHE STRING ON) +set(TomoPhantom_TAG ${DEFAULT_TomoPhantom_TAG} CACHE STRING ON) set(NIFTYREG_URL ${DEFAULT_NIFTYREG_URL} CACHE STRING ON) set(NIFTYREG_TAG ${DEFAULT_NIFTYREG_TAG} CACHE STRING ON) From 78ececddbef31ce858f1126244fb3279bb8b023d Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 24 Sep 2019 14:22:30 +0000 Subject: [PATCH 083/118] fixed build of python wrapper --- SuperBuild/External_astra-toolbox.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SuperBuild/External_astra-toolbox.cmake b/SuperBuild/External_astra-toolbox.cmake index 8cbbd549..d4d9fd80 100644 --- a/SuperBuild/External_astra-toolbox.cmake +++ b/SuperBuild/External_astra-toolbox.cmake @@ -172,7 +172,7 @@ CPPFLAGS=\"-DASTRA_PYTHON -I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INS endif() file(COPY ${${proj}_SOURCE_DIR}/python_build - DESTINATION ${${proj}_SOURCE_DIR}/python + DESTINATION ${${proj}_BINARY_DIR}/python FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) #create an install script @@ -186,7 +186,7 @@ cp -rv ${${proj}_SOURCE_DIR}/python/build/$build_dir/astra ${libastra_Install_Di ") file(COPY ${${proj}_SOURCE_DIR}/python_install - DESTINATION ${${proj}_SOURCE_DIR}/python + DESTINATION ${${proj}_BINARY_DIR}/python FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) ExternalProject_Add(${python_wrapper} @@ -199,7 +199,7 @@ cp -rv ${${proj}_SOURCE_DIR}/python/build/$build_dir/astra ${libastra_Install_Di INSTALL_DIR ${libastra_Install_Dir} # apparently this is the only way to pass environment variables to # external projects - CONFIGURE_COMMAND "" + CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy ${${proj}_BINARY_DIR}/python/python_build ${${proj}_SOURCE_DIR}/python/ && ${CMAKE_COMMAND} -E copy ${${proj}_BINARY_DIR}/python/python_install ${${proj}_SOURCE_DIR}/python/ # This build is Unix specific BUILD_COMMAND From 5658cff153c99d08f43076f6ea4e299981b490bd Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 25 Sep 2019 11:07:57 +0100 Subject: [PATCH 084/118] NIFTYREG to build libZ and libpng reinstated use of OpenMP --- SuperBuild/External_NIFTYREG.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SuperBuild/External_NIFTYREG.cmake b/SuperBuild/External_NIFTYREG.cmake index cffe0cdf..28868ce4 100644 --- a/SuperBuild/External_NIFTYREG.cmake +++ b/SuperBuild/External_NIFTYREG.cmake @@ -65,7 +65,8 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr -DCMAKE_INSTALL_PREFIX=${${proj}_Install_Dir} -DUSE_THROW_EXCEP=ON # fixes lib_reg_maths.a `GOMP_parallel' undefined reference linker errors - -DUSE_OPENMP:BOOL=OFF + -DUSE_OPENMP:BOOL=ON + -DBUILD_ALL_DEP:BOOL=ON INSTALL_DIR ${${proj}_Install_Dir} DEPENDS ${${proj}_DEPENDENCIES}) From 13d297d4b45dfa5124d8ff93ac79306bedf7e976 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 25 Sep 2019 22:23:42 +0100 Subject: [PATCH 085/118] renamed CCPi-RGL to CCPi-Regularisation-Toolkit addressed requested changes --- SuperBuild.cmake | 8 +++-- SuperBuild/External_CCPi-Astra.cmake | 35 +++---------------- SuperBuild/External_CCPi-Framework.cmake | 32 ++--------------- .../External_CCPi-FrameworkPlugins.cmake | 34 +++--------------- ...xternal_CCPi-Regularisation-Toolkit.cmake} | 15 ++++---- SuperBuild/External_astra-toolbox.cmake | 31 ++-------------- version_config.cmake | 16 ++++----- 7 files changed, 35 insertions(+), 136 deletions(-) rename SuperBuild/{External_CCPi-RGL.cmake => External_CCPi-Regularisation-Toolkit.cmake} (91%) diff --git a/SuperBuild.cmake b/SuperBuild.cmake index 4eec61f4..3c97b17b 100644 --- a/SuperBuild.cmake +++ b/SuperBuild.cmake @@ -213,11 +213,15 @@ if ("${PYTHON_STRATEGY}" STREQUAL "CONDA") set (BUILD_CIL OFF) endif() if (APPLE) - message(WARNING "CIL Modules are not tested on OSX and will be disabled") + if (BUILD_CIL) + 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) endif() if (BUILD_CIL) - list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES CCPi-RGL CCPi-Astra CCPi-Framework CCPi-FrameworkPlugins) + list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES CCPi-Regularisation-Toolkit CCPi-Astra CCPi-Framework CCPi-FrameworkPlugins) endif() if (BUILD_SIRF_Registration) diff --git a/SuperBuild/External_CCPi-Astra.cmake b/SuperBuild/External_CCPi-Astra.cmake index 576c19a5..0fc0d4da 100644 --- a/SuperBuild/External_CCPi-Astra.cmake +++ b/SuperBuild/External_CCPi-Astra.cmake @@ -1,6 +1,6 @@ #======================================================================== # Author: Edoardo Pasca -# Copyright 2018 STFC +# Copyright 2018-2019 STFC # # This file is part of the CCP PETMR Synergistic Image Reconstruction Framework (SIRF) SuperBuild. # @@ -46,10 +46,9 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${SUPERBUILD_INSTALL_DIR}) set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${SUPERBUILD_INSTALL_DIR}) - message("CIL proj " ${proj} ) - message("CIL URL " ${${proj}_URL} ) - message("CIL TAG " ${${proj}_TAG} ) + 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 @@ -73,26 +72,9 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr ) else() - # THIS IS NOT TESTED # if SETUP_PY one can launch the conda build.sh script setting # the appropriate variables. - 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 env CIL_VERSION=${CIL_VERSION} SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh - CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} - DEPENDS ${${proj}_DEPENDENCIES} - ) + message(FATAL_ERROR "Only PYTHONPATH install method is currently supported") endif() @@ -100,10 +82,6 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR}) else() - if(${USE_SYSTEM_${externalProjName}}) - find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED) - message("USING the system ${externalProjName}, set ${externalProjName}_DIR=${${externalProjName}_DIR}") - endif() ExternalProject_Add_Empty(${proj} DEPENDS "${${proj}_DEPENDENCIES}" SOURCE_DIR ${${proj}_SOURCE_DIR} BINARY_DIR ${${proj}_BINARY_DIR} @@ -112,8 +90,3 @@ else() TMP_DIR ${${proj}_TMP_DIR} ) endif() - -mark_as_superbuild( - VARS "" - LABELS "FIND_PACKAGE" - ) diff --git a/SuperBuild/External_CCPi-Framework.cmake b/SuperBuild/External_CCPi-Framework.cmake index f76b6a6f..2dbd291e 100644 --- a/SuperBuild/External_CCPi-Framework.cmake +++ b/SuperBuild/External_CCPi-Framework.cmake @@ -45,8 +45,8 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${SUPERBUILD_INSTALL_DIR}) set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${SUPERBUILD_INSTALL_DIR}) - message("CIL URL " ${${proj}_URL} ) - message("CIL TAG " ${${proj}_TAG} ) + message("${proj} URL " ${${proj}_URL} ) + message("${proj} TAG " ${${proj}_TAG} ) # conda build should never get here if("${PYTHON_STRATEGY}" STREQUAL "PYTHONPATH") @@ -74,24 +74,7 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr else() # if SETUP_PY one can launch the conda build.sh script setting # the appropriate variables. - 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 env CIL_VERSION=${CIL_VERSION} SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} - DEPENDS ${${proj}_DEPENDENCIES} - ) + message(FATAL_ERROR "Only PYTHONPATH install method is currently supported") endif() @@ -109,10 +92,6 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr WORKING_DIRECTORY ${${proj}_SOURCE_DIR}/Wrappers/Python/test) else() - if(${USE_SYSTEM_${externalProjName}}) - find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED) - message("USING the system ${externalProjName}, set ${externalProjName}_DIR=${${externalProjName}_DIR}") - endif() ExternalProject_Add_Empty(${proj} DEPENDS "${${proj}_DEPENDENCIES}" SOURCE_DIR ${${proj}_SOURCE_DIR} BINARY_DIR ${${proj}_BINARY_DIR} @@ -121,8 +100,3 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr TMP_DIR ${${proj}_TMP_DIR} ) endif() - - mark_as_superbuild( - VARS "" - LABELS "FIND_PACKAGE" - ) diff --git a/SuperBuild/External_CCPi-FrameworkPlugins.cmake b/SuperBuild/External_CCPi-FrameworkPlugins.cmake index e5b05a20..31d70d47 100644 --- a/SuperBuild/External_CCPi-FrameworkPlugins.cmake +++ b/SuperBuild/External_CCPi-FrameworkPlugins.cmake @@ -1,6 +1,6 @@ #======================================================================== # Author: Edoardo Pasca -# Copyright 2018 STFC +# Copyright 2018-2019 STFC # # This file is part of the CCP PETMR Synergistic Image Reconstruction Framework (SIRF) SuperBuild. # @@ -46,9 +46,8 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${SUPERBUILD_INSTALL_DIR}) set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${SUPERBUILD_INSTALL_DIR}) - message("CIL proj " ${proj} ) - message("CIL URL " ${${proj}_URL} ) - message("CIL TAG " ${${proj}_TAG} ) + message("${proj} URL " ${${proj}_URL} ) + message("${proj} TAG " ${${proj}_TAG} ) # conda build should never get here if("${PYTHON_STRATEGY}" STREQUAL "PYTHONPATH") @@ -75,23 +74,7 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr else() # if SETUP_PY one can launch the conda build.sh script setting # the appropriate variables. - 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 env CIL_VERSION=${CIL_VERSION} SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh - CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} - DEPENDS ${${proj}_DEPENDENCIES} - ) + message(FATAL_ERROR "Only PYTHONPATH install method is currently supported") endif() @@ -99,10 +82,6 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR}) else() - if(${USE_SYSTEM_${externalProjName}}) - find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED) - message("USING the system ${externalProjName}, set ${externalProjName}_DIR=${${externalProjName}_DIR}") - endif() ExternalProject_Add_Empty(${proj} DEPENDS "${${proj}_DEPENDENCIES}" SOURCE_DIR ${${proj}_SOURCE_DIR} BINARY_DIR ${${proj}_BINARY_DIR} @@ -111,8 +90,3 @@ else() TMP_DIR ${${proj}_TMP_DIR} ) endif() - -mark_as_superbuild( - VARS "" - LABELS "FIND_PACKAGE" - ) diff --git a/SuperBuild/External_CCPi-RGL.cmake b/SuperBuild/External_CCPi-Regularisation-Toolkit.cmake similarity index 91% rename from SuperBuild/External_CCPi-RGL.cmake rename to SuperBuild/External_CCPi-Regularisation-Toolkit.cmake index 1583d2f2..459cda38 100644 --- a/SuperBuild/External_CCPi-RGL.cmake +++ b/SuperBuild/External_CCPi-Regularisation-Toolkit.cmake @@ -1,6 +1,6 @@ #======================================================================== # Author: Edoardo Pasca -# Copyright 2017-2018 STFC +# Copyright 2017-2019 STFC # # This file is part of the CCP PETMR Synergistic Image Reconstruction Framework (SIRF) SuperBuild. # @@ -19,7 +19,7 @@ #========================================================================= #This needs to be unique globally -set(proj CCPi-RGL) +set(proj CCPi-Regularisation-Toolkit) # Set dependency list set(${proj}_DEPENDENCIES "") @@ -51,9 +51,10 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${SUPERBUILD_INSTALL_DIR}) set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${SUPERBUILD_INSTALL_DIR}) - message("CIL URL " ${${proj}_URL} ) - message("CIL TAG " ${${proj}_TAG} ) - + message(WARNING "${proj} URL " ${${proj}_URL} ) + message(WARNING "${proj} TAG " ${${proj}_TAG} ) + set (CIL_VERSION ${${prog}_TAG}) + message(WARNING "CIL_VERSION ${CIL_VERSION}" ) # conda build should never get here if("${PYTHON_STRATEGY}" STREQUAL "PYTHONPATH") # in case of PYTHONPATH it is sufficient to copy the files to the @@ -88,7 +89,7 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr INSTALL_DIR ${libcilreg_Install_Dir} # apparently this is the only way to pass environment variables to # external projects - CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=${CIL_VERSION} ${CMAKE_COMMAND} ${${proj}_SOURCE_DIR} -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} + CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=${${proj}_TAG} ${CMAKE_COMMAND} ${${proj}_SOURCE_DIR} -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} -DBUILD_PYTHON_WRAPPER=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_CUDA=ON -DCONDA_BUILD=OFF -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} -DPYTHON_DEST=${PYTHON_DEST_DIR} @@ -123,7 +124,7 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr CONFIGURE_COMMAND "" BUILD_COMMAND "" - INSTALL_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=${CIL_VERSION} SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh + INSTALL_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=${${proj}_TAG} SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} DEPENDS diff --git a/SuperBuild/External_astra-toolbox.cmake b/SuperBuild/External_astra-toolbox.cmake index d4d9fd80..a210a930 100644 --- a/SuperBuild/External_astra-toolbox.cmake +++ b/SuperBuild/External_astra-toolbox.cmake @@ -1,6 +1,6 @@ #======================================================================== # Author: Edoardo Pasca -# Copyright 2017-2018 STFC +# Copyright 2019 STFC # # This file is part of the CCP PETMR Synergistic Image Reconstruction Framework (SIRF) SuperBuild. # @@ -213,25 +213,7 @@ cp -rv ${${proj}_SOURCE_DIR}/python/build/$build_dir/astra ${libastra_Install_Di else() # if SETUP_PY one can launch the conda build.sh script setting # the appropriate variables. - 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 env CIL_VERSION=${CIL_VERSION} SRC_DIR=${${proj}_BINARY_DIR} RECIPE_DIR=${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe PYTHON=${PYTHON_EXECUTABLE} bash ${${proj}_SOURCE_DIR}/Wrappers/Python/conda-recipe/build.sh - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir} - DEPENDS - ${${proj}_DEPENDENCIES} - ) + message(FATAL_ERROR "Only PYTHONPATH install method is currently supported") endif() @@ -249,10 +231,6 @@ cp -rv ${${proj}_SOURCE_DIR}/python/build/$build_dir/astra ${libastra_Install_Di endif() else() - if(${USE_SYSTEM_${externalProjName}}) - find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED) - message("USING the system ${externalProjName}") - endif() ExternalProject_Add_Empty(${proj} DEPENDS "${${proj}_DEPENDENCIES}" SOURCE_DIR ${${proj}_SOURCE_DIR} BINARY_DIR ${${proj}_BINARY_DIR} @@ -261,8 +239,3 @@ cp -rv ${${proj}_SOURCE_DIR}/python/build/$build_dir/astra ${libastra_Install_Di TMP_DIR ${${proj}_TMP_DIR} ) endif() - - mark_as_superbuild( - VARS "" - LABELS "FIND_PACKAGE" - ) diff --git a/version_config.cmake b/version_config.cmake index 5b644004..34ab2d79 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -174,8 +174,8 @@ if (DEVEL_BUILD) #set(CIL_VERSION "19.06") set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) set(DEFAULT_CCPi-Framework_TAG origin/master) - set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) - set(DEFAULT_CCPi-RGL_TAG origin/master) + set(DEFAULT_CCPi-Regularisation-Toolkit_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git) + set(DEFAULT_CCPi-Regularisation-Toolkit_TAG origin/master) set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master) set(DEFAULT_CCPi-Astra_URL https://github.com/vais-ral/CCPi-Astra.git) @@ -205,11 +205,11 @@ else() # CCPi CIL set(CIL_VERSION "v19.07") - set(RGL_VERSION "19.06") + set(Regularisation-Toolkit_VERSION "19.06") set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git) set(DEFAULT_CCPi-Framework_TAG origin/finite_diff_for_sirf) - set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git ) - set(DEFAULT_CCPi-RGL_TAG "${RGL_VERSION}") + set(DEFAULT_CCPi-Regularisation-Toolkit_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git ) + set(DEFAULT_CCPi-Regularisation-Toolkit_TAG "${Regularisation-Toolkit_VERSION}") set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) set(DEFAULT_CCPi-FrameworkPlugins_TAG "${CIL_VERSION}") set(DEFAULT_CCPi-Astra_URL https://github.com/vais-ral/CCPi-Astra.git) @@ -244,8 +244,8 @@ SET(glog_TAG ${DEFAULT_glog_TAG} CACHE STRING ON) set(ACE_URL ${DEFAULT_ACE_URL} CACHE STRING ON) set(ACE_TAG ${DEFAULT_ACE_TAG} CACHE STRING ON) -set(CCPi-RGL_URL ${DEFAULT_CCPi-RGL_URL} CACHE STRING ON) -set(CCPi-RGL_TAG ${DEFAULT_CCPi-RGL_TAG} CACHE STRING ON) +set(CCPi-Regularisation-Toolkit_URL ${DEFAULT_CCPi-Regularisation-Toolkit_URL} CACHE STRING ON) +set(CCPi-Regularisation-Toolkit_TAG ${DEFAULT_CCPi-Regularisation-Toolkit_TAG} CACHE STRING ON) set(CCPi-Framework_URL ${DEFAULT_CCPi-Framework_URL} CACHE STRING ON) set(CCPi-Framework_TAG ${DEFAULT_CCPi-Framework_TAG} CACHE STRING ON) set(CCPi-FrameworkPlugins_URL ${DEFAULT_CCPi-FrameworkPlugins_URL} CACHE STRING ON) @@ -269,5 +269,5 @@ mark_as_advanced(SIRF_URL SIRF_TAG STIR_URL STIR_TAG NIFTYREG_URL NIFTYREG_TAG CCPi-Framework_URL CCPi-Framework_TAG CCPi-FrameworkPlugins_URL CCPi-FrameworkPlugins_TAG - CCPi-RGL_URL CCPi-RGL_TAG + CCPi-Regularisation-Toolkit_URL CCPi-Regularisation-Toolkit_TAG ) From 1cdd2e3f275a25559a44ca91a2abb719f0d0ad98 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Thu, 26 Sep 2019 05:59:37 +0000 Subject: [PATCH 086/118] added CIL dependencies --- .travis.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.travis.yml b/.travis.yml index 508d26f5..29508281 100644 --- a/.travis.yml +++ b/.travis.yml @@ -124,6 +124,18 @@ addons: - libxslt-dev - libace-dev # - root-system-bin + # dependencies for CIL + - cython + - scipy + - python-h5py + # CIL dependency for test + - python-wget + # dependencies for ASTRA toolbox + - autotools-dev + - automake + - autogen + - autoconf + - libtool before_install: # Set C and C++ compiler etc using trick from From b0777d36ee34c3213256dc28558e8eca1cf65fae Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Thu, 26 Sep 2019 06:29:23 +0000 Subject: [PATCH 087/118] add dependencies for CIL --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 29508281..e118bced 100644 --- a/.travis.yml +++ b/.travis.yml @@ -126,10 +126,8 @@ addons: # - root-system-bin # dependencies for CIL - cython - - scipy + - python-scipy - python-h5py - # CIL dependency for test - - python-wget # dependencies for ASTRA toolbox - autotools-dev - automake From 9c23601689f73d0a8442bc3e8f8696174b6198d6 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Thu, 26 Sep 2019 08:46:46 +0000 Subject: [PATCH 088/118] added python-pil --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index e118bced..8666b22b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -128,6 +128,7 @@ addons: - cython - python-scipy - python-h5py + - python-pil # dependencies for ASTRA toolbox - autotools-dev - automake From 420f1cf2b530ef8321586a07792b006a422b5ae5 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Thu, 26 Sep 2019 21:24:01 +0100 Subject: [PATCH 089/118] potential CIL dependency fix --- .travis.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8666b22b..3a267639 100644 --- a/.travis.yml +++ b/.travis.yml @@ -124,11 +124,6 @@ addons: - libxslt-dev - libace-dev # - root-system-bin - # dependencies for CIL - - cython - - python-scipy - - python-h5py - - python-pil # dependencies for ASTRA toolbox - autotools-dev - automake @@ -221,8 +216,10 @@ before_install: # setuptools may be out of date on osx - $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 -- $PY_EXE -m pip install --user -U numpy cython +- $PY_EXE -m pip install --user -U nose codecov coveralls Cython +- $PY_EXE -m pip install --user -U numpy +# dependencies for CIL (TODO: only install if necessary?) +- $PY_EXE -m pip install --user -U scipy h5py Pillow # for counting clones, excluding ours - | if [[ -n "$GITHUB_API_TOKEN" ]]; then From ab75adff3bdf0a6d9ec0bab39f767d030940625b Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Thu, 26 Sep 2019 21:37:47 +0100 Subject: [PATCH 090/118] tidy deps --- .travis.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3a267639..2a9044ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -216,10 +216,14 @@ before_install: # setuptools may be out of date on osx - $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 Cython +- $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 -# dependencies for CIL (TODO: only install if necessary?) -- $PY_EXE -m pip install --user -U scipy h5py Pillow +- | + if [[ "$EXTRA_BUILD_FLAGS" == *"-DBUILD_CIL=ON"* ]]; then + $PY_EXE -m pip install --user -U scipy h5py Pillow + fi # for counting clones, excluding ours - | if [[ -n "$GITHUB_API_TOKEN" ]]; then From 5d259a736df24bf3b592ebdaf04a562ec0f44564 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Thu, 26 Sep 2019 21:38:00 +0100 Subject: [PATCH 091/118] travis py3 -> py3.6 --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2a9044ae..afd7287c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,11 +29,11 @@ matrix: include: # linux g{cc,++}-6 py{27,3} - os: linux - 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" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 - os: linux - python: 3 + 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 @@ -41,7 +41,7 @@ matrix: # -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 @@ -54,7 +54,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 @@ -66,7 +66,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 From 9f46c85fecf1f54ff27641713296b0d19ec2db77 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 27 Sep 2019 10:02:27 +0100 Subject: [PATCH 092/118] update SIRF branch --- version_config.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_config.cmake b/version_config.cmake index 34ab2d79..58bc2190 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -183,7 +183,7 @@ if (DEVEL_BUILD) else() # set(DEFAULT_SIRF_TAG v2.0.0) - set (DEFAULT_SIRF_TAG origin/add_to_sirf_classes_merge_master) + set (DEFAULT_SIRF_TAG origin/add_to_sirf_classes) ## STIR set(DEFAULT_STIR_URL https://github.com/UCL/STIR ) set(DEFAULT_STIR_TAG 3a277f7a819f35a553a8d6097402ea25cf55a240) From 86cc19e34019e4aaf87667e599227472e37a5191 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Fri, 27 Sep 2019 13:40:55 +0100 Subject: [PATCH 093/118] removed TomoPhantom --- SuperBuild/External_CCPi-Framework.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SuperBuild/External_CCPi-Framework.cmake b/SuperBuild/External_CCPi-Framework.cmake index 2dbd291e..33addbaf 100644 --- a/SuperBuild/External_CCPi-Framework.cmake +++ b/SuperBuild/External_CCPi-Framework.cmake @@ -22,7 +22,7 @@ set(proj CCPi-Framework) # Set dependency list -set(${proj}_DEPENDENCIES "TomoPhantom") +set(${proj}_DEPENDENCIES "") # Include dependent projects if any ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${proj}_DEPENDENCIES) From ac181ea73900bf7951a9b034d8f68a988578fe4a Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Fri, 27 Sep 2019 14:38:20 +0100 Subject: [PATCH 094/118] Revert "removed TomoPhantom" This reverts commit 86cc19e34019e4aaf87667e599227472e37a5191. --- SuperBuild/External_CCPi-Framework.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SuperBuild/External_CCPi-Framework.cmake b/SuperBuild/External_CCPi-Framework.cmake index 33addbaf..2dbd291e 100644 --- a/SuperBuild/External_CCPi-Framework.cmake +++ b/SuperBuild/External_CCPi-Framework.cmake @@ -22,7 +22,7 @@ set(proj CCPi-Framework) # Set dependency list -set(${proj}_DEPENDENCIES "") +set(${proj}_DEPENDENCIES "TomoPhantom") # Include dependent projects if any ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${proj}_DEPENDENCIES) From 432ff49cf65d16cc69e02e78b7f250f99bf9ba54 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Fri, 27 Sep 2019 14:46:38 +0100 Subject: [PATCH 095/118] pass python vars into TomoPhantom --- SuperBuild/External_SIRF.cmake | 2 +- SuperBuild/External_TomoPhantom.cmake | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/SuperBuild/External_SIRF.cmake b/SuperBuild/External_SIRF.cmake index ff56a954..922ed780 100644 --- a/SuperBuild/External_SIRF.cmake +++ b/SuperBuild/External_SIRF.cmake @@ -58,7 +58,7 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr message(STATUS "HDF5_ROOT in External_SIRF: " ${HDF5_ROOT}) set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${SUPERBUILD_INSTALL_DIR}) - + if (WIN32) set(extra_args "-DSIRF_INSTALL_DEPENDENCIES=ON") else() diff --git a/SuperBuild/External_TomoPhantom.cmake b/SuperBuild/External_TomoPhantom.cmake index bdfddccf..d5678f13 100644 --- a/SuperBuild/External_TomoPhantom.cmake +++ b/SuperBuild/External_TomoPhantom.cmake @@ -2,8 +2,10 @@ # Author: Benjamin A Thomas # Author: Kris Thielemans # Author: Edoardo Pasca +# Author: Casper da Costa-Luis # Copyright 2017, 2018 University College London # Copyright 2017, 2018 STFC +# Copyright 2019 King's College London # # This file is part of the CCP PETMR Synergistic Image Reconstruction Framework (SIRF) SuperBuild. # @@ -59,7 +61,7 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR} STAMP_DIR ${${proj}_STAMP_DIR} TMP_DIR ${${proj}_TMP_DIR} - + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${TomoPhantom_Install_Dir} -DLIBRARY_DIR=${TomoPhantom_Install_Dir}/lib @@ -67,6 +69,11 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr -DCONDA_BUILD=OFF -DBUILD_PYTHON_WRAPPER=ON -DCMAKE_BUILD_TYPE=Release + -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} + -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIRS} + -DPYTHON_LIBRARY=${PYTHON_LIBRARIES} + -DPYTHON_DEST_DIR=${PYTHON_DEST_DIR} + -DPYTHON_STRATEGY=${PYTHON_STRATEGY} # TODO this relies on using "make", but we could be build with something else #INSTALL_COMMAND make TomoPhantom From 2b5ec0daa9de562865cf9d78d6af4077663935bb Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 2 Oct 2019 08:16:29 +0000 Subject: [PATCH 096/118] builds specific branch of SIRF if CIL is built --- version_config.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/version_config.cmake b/version_config.cmake index 58bc2190..67761572 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -182,8 +182,11 @@ if (DEVEL_BUILD) set(DEFAULT_CCPi-Astra_TAG origin/master) else() - # set(DEFAULT_SIRF_TAG v2.0.0) - set (DEFAULT_SIRF_TAG origin/add_to_sirf_classes) + if (BUILD_CIL OR BUILD_CIL_LITE) + set(DEFAULT_SIRF_TAG v2.0.0) + else() + set (DEFAULT_SIRF_TAG origin/add_to_sirf_classes) + endif() ## STIR set(DEFAULT_STIR_URL https://github.com/UCL/STIR ) set(DEFAULT_STIR_TAG 3a277f7a819f35a553a8d6097402ea25cf55a240) From 235814038f2070e9a2f75fa88e749e1fc8091ca3 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 2 Oct 2019 09:17:34 +0000 Subject: [PATCH 097/118] pass python executable to astra, add 2.7 for CIL --- .travis.yml | 4 ++++ SuperBuild/External_astra-toolbox.cmake | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index afd7287c..12dfe501 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,6 +32,10 @@ matrix: 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" 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" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=2 - os: linux python: 3.6 # -boost +fftw3 +hdf5 +ace diff --git a/SuperBuild/External_astra-toolbox.cmake b/SuperBuild/External_astra-toolbox.cmake index a210a930..49ae87f8 100644 --- a/SuperBuild/External_astra-toolbox.cmake +++ b/SuperBuild/External_astra-toolbox.cmake @@ -108,9 +108,9 @@ if (CUDA_FOUND) # This build is Unix specific BUILD_COMMAND - ${CMAKE_COMMAND} -E env ${cmd} --with-cuda=${CUDA_TOOLKIT_ROOT_DIR} --prefix=${libastra_Install_Dir} --with-install-type=prefix --with-python + ${CMAKE_COMMAND} -E env ${cmd} --with-cuda=${CUDA_TOOLKIT_ROOT_DIR} --prefix=${libastra_Install_Dir} --with-python=${PYTHON_EXECUTABLE} --with-install-type=prefix INSTALL_COMMAND - ${CMAKE_COMMAND} -E chdir ${${proj}_BINARY_DIR}/ make -j install-libraries + ${CMAKE_COMMAND} -E chdir ${${proj}_BINARY_DIR}/ make -j2 install-libraries #${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ls -h DEPENDS ${${proj}_DEPENDENCIES} @@ -149,7 +149,7 @@ else() # This build is Unix specific BUILD_COMMAND - ${CMAKE_COMMAND} -E env ${cmd} --prefix=${libastra_Install_Dir} --with-install-type=prefix --with-python + ${CMAKE_COMMAND} -E env ${cmd} --prefix=${libastra_Install_Dir} --with-install-type=prefix --with-python=${PYTHON_EXECUTABLE} INSTALL_COMMAND ${CMAKE_COMMAND} -E chdir ${${proj}_BINARY_DIR}/ make -j install-libraries #${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ls -h From e0a13e9656f6b8abc639ec9ff41f8e4920e67dfc Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 2 Oct 2019 10:12:57 +0000 Subject: [PATCH 098/118] add wget for CIL_BUILDs --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 12dfe501..591d9584 100644 --- a/.travis.yml +++ b/.travis.yml @@ -226,7 +226,7 @@ before_install: - $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 + $PY_EXE -m pip install --user -U scipy h5py Pillow wget fi # for counting clones, excluding ours - | From f30be5800259cafb3bc257d2daea9b16d89523be Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 2 Oct 2019 12:04:54 +0000 Subject: [PATCH 099/118] removed BUILD_CIL from docker builds --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 42be977b..3dadfe00 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -78,7 +78,7 @@ RUN ccache -o cache_dir=/opt/ccache ARG BUILD_FLAGS="\ -DCMAKE_BUILD_TYPE=Release\ -DBUILD_STIR_WITH_OPENMP=ON -DUSE_SYSTEM_ACE=ON\ - -DUSE_SYSTEM_Armadillo=ON -DUSE_SYSTEM_Boost=ON -DBUILD_CIL=ON\ + -DUSE_SYSTEM_Armadillo=ON -DUSE_SYSTEM_Boost=ON -DBUILD_CIL=OFF\ -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_ITK=ON\ -DBUILD_siemens_to_ismrmrd=ON -DUSE_SYSTEM_SWIG=ON" ARG EXTRA_BUILD_FLAGS="" From e4ae893d16039530557e01807089e17474495a2f Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 2 Oct 2019 12:17:27 +0000 Subject: [PATCH 100/118] modify docker build for CIL --- docker/Dockerfile | 2 +- docker/build_essential-ubuntu.sh | 7 ++++++- docker/requirements.txt | 9 ++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 3dadfe00..42be977b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -78,7 +78,7 @@ RUN ccache -o cache_dir=/opt/ccache ARG BUILD_FLAGS="\ -DCMAKE_BUILD_TYPE=Release\ -DBUILD_STIR_WITH_OPENMP=ON -DUSE_SYSTEM_ACE=ON\ - -DUSE_SYSTEM_Armadillo=ON -DUSE_SYSTEM_Boost=ON -DBUILD_CIL=OFF\ + -DUSE_SYSTEM_Armadillo=ON -DUSE_SYSTEM_Boost=ON -DBUILD_CIL=ON\ -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_ITK=ON\ -DBUILD_siemens_to_ismrmrd=ON -DUSE_SYSTEM_SWIG=ON" ARG EXTRA_BUILD_FLAGS="" diff --git a/docker/build_essential-ubuntu.sh b/docker/build_essential-ubuntu.sh index 49724544..a26b26fd 100755 --- a/docker/build_essential-ubuntu.sh +++ b/docker/build_essential-ubuntu.sh @@ -12,7 +12,12 @@ apt-get install -yq --no-install-recommends \ man \ make \ ccache \ - sudo + sudo \ + autotools-dev \ + automake \ + autogen \ + autoconf \ + libtool apt-get clean pushd $INSTALL_DIR diff --git a/docker/requirements.txt b/docker/requirements.txt index bc9ed05f..13a85f2e 100644 --- a/docker/requirements.txt +++ b/docker/requirements.txt @@ -1,6 +1,9 @@ docopt matplotlib -cython # CIL -numpy # CIL -# scipy +cython # CIL +numpy # CIL +wget # CIL +h5py # CIL +scipy # CIL +six # CIL -e git+https://github.com/ismrmrd/ismrmrd-python-tools.git@master#egg=ismrmrd-python-tools From a7e0a626c6cdf454beea3b7214b1cfef7bd9a53b Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 2 Oct 2019 13:38:55 +0100 Subject: [PATCH 101/118] Revert "removed BUILD_CIL from docker builds" This reverts commit f30be5800259cafb3bc257d2daea9b16d89523be. --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 3dadfe00..42be977b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -78,7 +78,7 @@ RUN ccache -o cache_dir=/opt/ccache ARG BUILD_FLAGS="\ -DCMAKE_BUILD_TYPE=Release\ -DBUILD_STIR_WITH_OPENMP=ON -DUSE_SYSTEM_ACE=ON\ - -DUSE_SYSTEM_Armadillo=ON -DUSE_SYSTEM_Boost=ON -DBUILD_CIL=OFF\ + -DUSE_SYSTEM_Armadillo=ON -DUSE_SYSTEM_Boost=ON -DBUILD_CIL=ON\ -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DUSE_ITK=ON\ -DBUILD_siemens_to_ismrmrd=ON -DUSE_SYSTEM_SWIG=ON" ARG EXTRA_BUILD_FLAGS="" From 5761333472a29cd7977a974eadeacf31df94c247 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 2 Oct 2019 13:53:21 +0100 Subject: [PATCH 102/118] fix docker CIL --- docker/build_system-ubuntu.sh | 9 +++++++++ docker/requirements.txt | 9 ++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/docker/build_system-ubuntu.sh b/docker/build_system-ubuntu.sh index 00baf3ba..599e8a60 100755 --- a/docker/build_system-ubuntu.sh +++ b/docker/build_system-ubuntu.sh @@ -12,4 +12,13 @@ apt-get install -yq --no-install-recommends \ apt-get install -yq --no-install-recommends \ libxml2-dev \ libxslt-dev + +# ASTRA toolbox external dependencies +apt-get install -yq --no-install-recommends \ + autotools-dev \ + automake \ + autogen \ + autoconf \ + libtool + apt-get clean diff --git a/docker/requirements.txt b/docker/requirements.txt index bc9ed05f..909660bd 100644 --- a/docker/requirements.txt +++ b/docker/requirements.txt @@ -1,6 +1,9 @@ docopt matplotlib -cython # CIL -numpy # CIL -# scipy -e git+https://github.com/ismrmrd/ismrmrd-python-tools.git@master#egg=ismrmrd-python-tools +Cython # CIL +numpy # CIL +scipy # CIL +h5py # CIL +Pillow # CIL +wget # CIL From 24ca9796c3a969e982956a6298cda367cff16fe6 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 2 Oct 2019 14:25:35 +0100 Subject: [PATCH 103/118] add .dockerignore --- docker/.dockerignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 docker/.dockerignore diff --git a/docker/.dockerignore b/docker/.dockerignore new file mode 100644 index 00000000..960e87bf --- /dev/null +++ b/docker/.dockerignore @@ -0,0 +1,2 @@ +/devel/** +!/devel/.ccache/** From 58353b5c70dc3c0037ffd1352ecfa546fce78bd9 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 2 Oct 2019 14:28:52 +0100 Subject: [PATCH 104/118] docker conda distutils warning suppression/fix --- docker/user_python-ubuntu.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/user_python-ubuntu.sh b/docker/user_python-ubuntu.sh index 88bcfabd..5690bde6 100755 --- a/docker/user_python-ubuntu.sh +++ b/docker/user_python-ubuntu.sh @@ -15,6 +15,7 @@ miniconda) conda config --add channels conda-forge # https://github.com/conda/conda/issues/6030 #conda update -c conda-forge -y conda + conda update -c conda-forge -y setuptools pip ;; *python*) # virtualenv From 3802b5409529552fb8afbcd8e22dde772f8c7925 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 2 Oct 2019 14:41:50 +0000 Subject: [PATCH 105/118] pass SIRF/CIL tags at cmake time --- .travis.yml | 4 ++-- version_config.cmake | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 591d9584..639a6d1b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,11 +31,11 @@ matrix: - os: linux 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" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=3 + 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" MATRIX_EVAL="CC=gcc-6 CXX=g++-6" PYMVER=2 + 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: 3.6 # -boost +fftw3 +hdf5 +ace diff --git a/version_config.cmake b/version_config.cmake index 67761572..c5a54d1f 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -182,11 +182,7 @@ if (DEVEL_BUILD) set(DEFAULT_CCPi-Astra_TAG origin/master) else() - if (BUILD_CIL OR BUILD_CIL_LITE) - set(DEFAULT_SIRF_TAG v2.0.0) - else() - set (DEFAULT_SIRF_TAG origin/add_to_sirf_classes) - endif() + set(DEFAULT_SIRF_TAG v2.0.0) ## STIR set(DEFAULT_STIR_URL https://github.com/UCL/STIR ) set(DEFAULT_STIR_TAG 3a277f7a819f35a553a8d6097402ea25cf55a240) @@ -216,7 +212,7 @@ else() set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git) set(DEFAULT_CCPi-FrameworkPlugins_TAG "${CIL_VERSION}") set(DEFAULT_CCPi-Astra_URL https://github.com/vais-ral/CCPi-Astra.git) - set(DEFAULT_CCPi-Astra_TAG origin/cpu_projector) + set(DEFAULT_CCPi-Astra_TAG "${CIL_VERSION}") endif() From 9f83fe9d6ee88e86b6ffa7729d33f2efc4961868 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 2 Oct 2019 21:49:26 +0100 Subject: [PATCH 106/118] safer docker build cache --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 639a6d1b..4bda4b8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -268,7 +268,7 @@ 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 @@ -280,8 +280,8 @@ install: # 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/* cp -a /opt/ccache/* /devel/.ccache/' # replace travis' ccache with the built images's mv devel/.ccache ~ ) From 570937bade7863deea8a526bb47edeaf9c2f948c Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 2 Oct 2019 22:10:53 +0100 Subject: [PATCH 107/118] fix Edo merge --- docker/build_essential-ubuntu.sh | 7 +------ docker/requirements.txt | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/docker/build_essential-ubuntu.sh b/docker/build_essential-ubuntu.sh index a26b26fd..49724544 100755 --- a/docker/build_essential-ubuntu.sh +++ b/docker/build_essential-ubuntu.sh @@ -12,12 +12,7 @@ apt-get install -yq --no-install-recommends \ man \ make \ ccache \ - sudo \ - autotools-dev \ - automake \ - autogen \ - autoconf \ - libtool + sudo apt-get clean pushd $INSTALL_DIR diff --git a/docker/requirements.txt b/docker/requirements.txt index 715cbf2e..f6b40c76 100644 --- a/docker/requirements.txt +++ b/docker/requirements.txt @@ -1,11 +1,5 @@ docopt matplotlib -cython # CIL -numpy # CIL -wget # CIL -h5py # CIL -scipy # CIL -six # CIL -e git+https://github.com/ismrmrd/ismrmrd-python-tools.git@master#egg=ismrmrd-python-tools Cython # CIL numpy # CIL @@ -13,3 +7,4 @@ scipy # CIL h5py # CIL Pillow # CIL wget # CIL +six # CIL From 3d48ff3131c3fe916f7be0aefd8e2e45a31f17c7 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 2 Oct 2019 22:45:18 +0100 Subject: [PATCH 108/118] travis docker cache permissions fix --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index ee6ff903..02fa5eb1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -257,6 +257,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" @@ -272,6 +274,7 @@ install: mkdir devel/.ccache sudo rm -rf ~/.ccache else + sudo chown -R $USER:$(id -g) ~/.ccache mv ~/.ccache devel/ fi $DCC build --pull core From 2d634bf009ded391e75c38686be6f0ef17c9be9e Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 2 Oct 2019 23:14:20 +0100 Subject: [PATCH 109/118] try again to fix docker --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 02fa5eb1..fc84450f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -277,6 +277,7 @@ install: 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? From 48bdca8c5d51ba9b6f4b4481140add48da817c8b Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Thu, 3 Oct 2019 00:47:03 +0100 Subject: [PATCH 110/118] silly ommission --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fc84450f..30d33276 100644 --- a/.travis.yml +++ b/.travis.yml @@ -285,7 +285,7 @@ install: $DCC build sirf # extract updated ccache # sudo rm -rf devel/.ccache/* - $DCC run --rm sirf /bin/bash -c 'sudo rm -rf /devel/.ccache/* cp -a /opt/ccache/* /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 ~ ) From 51113fd3bbf1647fbca0779e5d734cd799c51d3b Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Mon, 7 Oct 2019 11:10:51 +0100 Subject: [PATCH 111/118] added 2019 --- SuperBuild/External_TomoPhantom.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SuperBuild/External_TomoPhantom.cmake b/SuperBuild/External_TomoPhantom.cmake index d5678f13..aaa4de36 100644 --- a/SuperBuild/External_TomoPhantom.cmake +++ b/SuperBuild/External_TomoPhantom.cmake @@ -3,8 +3,8 @@ # Author: Kris Thielemans # Author: Edoardo Pasca # Author: Casper da Costa-Luis -# Copyright 2017, 2018 University College London -# Copyright 2017, 2018 STFC +# Copyright 2017, 2019 University College London +# Copyright 2017, 2019 STFC # Copyright 2019 King's College London # # This file is part of the CCP PETMR Synergistic Image Reconstruction Framework (SIRF) SuperBuild. From 7fea0a8af7d3e53f6f19b8baf95ee4d48b92194e Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Mon, 7 Oct 2019 12:03:24 +0100 Subject: [PATCH 112/118] Gadgetron requires at least Boost 1.65 --- version_config.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_config.cmake b/version_config.cmake index c5a54d1f..7b2331ab 100644 --- a/version_config.cmake +++ b/version_config.cmake @@ -22,7 +22,7 @@ #========================================================================= ## BOOST - # Gadgetron needs 1.65 + # Gadgetron needs at least 1.65 if (APPLE) # really should be checking for CLang # Boost 1.65 contains a bug for recent Clang https://github.com/CCPPETMR/SIRF-SuperBuild/issues/170 From bd582aac41e9d8f7f859c8483d589a95c85f5ee4 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Mon, 7 Oct 2019 12:03:54 +0100 Subject: [PATCH 113/118] swapped master for add_cil branch --- docker/user_sirf-ubuntu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/user_sirf-ubuntu.sh b/docker/user_sirf-ubuntu.sh index 8163fdc7..a057384c 100755 --- a/docker/user_sirf-ubuntu.sh +++ b/docker/user_sirf-ubuntu.sh @@ -3,7 +3,7 @@ set -ev INSTALL_DIR="${1:-/opt}" # SIRF -git clone https://github.com/CCPPETMR/SIRF-SuperBuild --recursive -b add_cil $INSTALL_DIR/SIRF-SuperBuild +git clone https://github.com/CCPPETMR/SIRF-SuperBuild --recursive -b master $INSTALL_DIR/SIRF-SuperBuild pushd $INSTALL_DIR/SIRF-SuperBuild echo $BUILD_FLAGS $EXTRA_BUILD_FLAGS From 213919fb44fcafb0b66380c56d4d89fa6da9c6b0 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Mon, 7 Oct 2019 12:04:32 +0100 Subject: [PATCH 114/118] removed dependecy from TomoPhantom --- SuperBuild/External_CCPi-Framework.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SuperBuild/External_CCPi-Framework.cmake b/SuperBuild/External_CCPi-Framework.cmake index 2dbd291e..33addbaf 100644 --- a/SuperBuild/External_CCPi-Framework.cmake +++ b/SuperBuild/External_CCPi-Framework.cmake @@ -22,7 +22,7 @@ set(proj CCPi-Framework) # Set dependency list -set(${proj}_DEPENDENCIES "TomoPhantom") +set(${proj}_DEPENDENCIES "") # Include dependent projects if any ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${proj}_DEPENDENCIES) From d1808aad91a22c991b6ed0c308cff1bc79b0ae11 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Mon, 7 Oct 2019 12:05:27 +0100 Subject: [PATCH 115/118] added BUILD_CIL_LITE option --- SuperBuild.cmake | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/SuperBuild.cmake b/SuperBuild.cmake index cc4dbecf..bd3d81d9 100644 --- a/SuperBuild.cmake +++ b/SuperBuild.cmake @@ -167,7 +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" OFF) +option(BUILD_CIL "Build CCPi CIL Modules and ASTRA engine" OFF) +option(BUILD_CIL_LITE "Build CCPi CIL Modules" OFF) option(BUILD_NIFTYREG "Build NIFTYREG" ON) option(BUILD_SIRF_Registration "Build SIRFS's registration functionality" ${BUILD_NIFTYREG}) @@ -219,15 +220,19 @@ if ("${PYTHON_STRATEGY}" STREQUAL "CONDA") set (BUILD_CIL OFF) endif() if (APPLE) - if (BUILD_CIL) + 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) - list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES CCPi-Regularisation-Toolkit CCPi-Astra CCPi-Framework CCPi-FrameworkPlugins) + 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) From d4a99c2b36c6c50d6d2d73d88382fd21e6d0a91e Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Mon, 7 Oct 2019 12:14:47 +0100 Subject: [PATCH 116/118] reviewed indentation --- SuperBuild/External_astra-toolbox.cmake | 215 ++++++++++++------------ 1 file changed, 103 insertions(+), 112 deletions(-) diff --git a/SuperBuild/External_astra-toolbox.cmake b/SuperBuild/External_astra-toolbox.cmake index 49ae87f8..5884d1c6 100644 --- a/SuperBuild/External_astra-toolbox.cmake +++ b/SuperBuild/External_astra-toolbox.cmake @@ -84,42 +84,39 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr set_property(CACHE PYTHON_STRATEGY PROPERTY STRINGS PYTHONPATH SETUP_PY CONDA) -set(cmd "${${proj}_SOURCE_DIR}/build/linux/configure") -list(APPEND cmd "CPPFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib") -if (CUDA_FOUND) - list(APPEND cmd "NVCCFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib") - - ExternalProject_Add(${proj} - ${${proj}_EP_ARGS} - GIT_REPOSITORY ${${proj}_URL} - GIT_TAG ${${proj}_TAG} - #GIT_TAG origin/cmaking - 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 ${libastra_Install_Dir} - # apparently this is the only way to pass environment variables to - # external projects - CONFIGURE_COMMAND - ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ./autogen.sh - #${CMAKE_COMMAND} -E env ./autogen.sh - - # This build is Unix specific - BUILD_COMMAND - ${CMAKE_COMMAND} -E env ${cmd} --with-cuda=${CUDA_TOOLKIT_ROOT_DIR} --prefix=${libastra_Install_Dir} --with-python=${PYTHON_EXECUTABLE} --with-install-type=prefix - INSTALL_COMMAND - ${CMAKE_COMMAND} -E chdir ${${proj}_BINARY_DIR}/ make -j2 install-libraries - #${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ls -h - DEPENDS - ${${proj}_DEPENDENCIES} - ) - - set(python_wrapper "astra-python-wrapper") + set(cmd "${${proj}_SOURCE_DIR}/build/linux/configure") + list(APPEND cmd "CPPFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib") + if (CUDA_FOUND) + list(APPEND cmd "NVCCFLAGS=-I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib") + + 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 ${libastra_Install_Dir} + # apparently this is the only way to pass environment variables to + # external projects + CONFIGURE_COMMAND + ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ./autogen.sh + + # This build is Unix specific + BUILD_COMMAND + ${CMAKE_COMMAND} -E env ${cmd} --with-cuda=${CUDA_TOOLKIT_ROOT_DIR} --prefix=${libastra_Install_Dir} --with-python=${PYTHON_EXECUTABLE} --with-install-type=prefix + INSTALL_COMMAND + ${CMAKE_COMMAND} -E chdir ${${proj}_BINARY_DIR}/ make -j2 install-libraries + DEPENDS + ${${proj}_DEPENDENCIES} + ) + + set(python_wrapper "astra-python-wrapper") - #create a configure script - file(WRITE ${${proj}_SOURCE_DIR}/python_build + #create a configure script + file(WRITE ${${proj}_SOURCE_DIR}/python_build " #! /bin/bash set -ex @@ -127,40 +124,36 @@ set -ex CPPFLAGS=\"-DASTRA_CUDA -DASTRA_PYTHON -I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib -I${${proj}_SOURCE_DIR}/include\" CC=${CMAKE_C_COMPILER} ${PYTHON_EXECUTABLE} builder.py build ") -else() -# No CUDA - message (WARNING "No CUDA found on host, skipping GPU") - ExternalProject_Add(${proj} - ${${proj}_EP_ARGS} - GIT_REPOSITORY ${${proj}_URL} - GIT_TAG ${${proj}_TAG} - #GIT_TAG origin/cmaking - 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 ${libastra_Install_Dir} - # apparently this is the only way to pass environment variables to - # external projects - CONFIGURE_COMMAND - ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ./autogen.sh - #${CMAKE_COMMAND} -E env ./autogen.sh - - # This build is Unix specific - BUILD_COMMAND - ${CMAKE_COMMAND} -E env ${cmd} --prefix=${libastra_Install_Dir} --with-install-type=prefix --with-python=${PYTHON_EXECUTABLE} - INSTALL_COMMAND - ${CMAKE_COMMAND} -E chdir ${${proj}_BINARY_DIR}/ make -j install-libraries - #${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ls -h - DEPENDS - ${${proj}_DEPENDENCIES} - ) - - set(python_wrapper "astra-python-wrapper") + else() + # No CUDA + message (WARNING "No CUDA found on host, skipping GPU") + 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 ${libastra_Install_Dir} + # apparently this is the only way to pass environment variables to + # external projects + CONFIGURE_COMMAND + ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ./autogen.sh + # This build is Unix specific + BUILD_COMMAND + ${CMAKE_COMMAND} -E env ${cmd} --prefix=${libastra_Install_Dir} --with-install-type=prefix --with-python=${PYTHON_EXECUTABLE} + INSTALL_COMMAND + ${CMAKE_COMMAND} -E chdir ${${proj}_BINARY_DIR}/ make -j install-libraries + DEPENDS + ${${proj}_DEPENDENCIES} + ) + + set(python_wrapper "astra-python-wrapper") - #create a configure script - file(WRITE ${${proj}_SOURCE_DIR}/python_build + #create a configure script + file(WRITE ${${proj}_SOURCE_DIR}/python_build " #! /bin/bash set -ex @@ -169,11 +162,11 @@ CPPFLAGS=\"-DASTRA_PYTHON -I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INS ") -endif() + endif() - file(COPY ${${proj}_SOURCE_DIR}/python_build - DESTINATION ${${proj}_BINARY_DIR}/python - FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) + file(COPY ${${proj}_SOURCE_DIR}/python_build + DESTINATION ${${proj}_BINARY_DIR}/python + FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) #create an install script file(WRITE ${${proj}_SOURCE_DIR}/python_install @@ -185,57 +178,55 @@ cp -rv ${${proj}_SOURCE_DIR}/python/build/$build_dir/astra ${libastra_Install_Di ") - file(COPY ${${proj}_SOURCE_DIR}/python_install - DESTINATION ${${proj}_BINARY_DIR}/python - FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) + file(COPY ${${proj}_SOURCE_DIR}/python_install + DESTINATION ${${proj}_BINARY_DIR}/python + FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) ExternalProject_Add(${python_wrapper} - ${${proj}_EP_ARGS} - 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 ${libastra_Install_Dir} - # apparently this is the only way to pass environment variables to - # external projects - CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy ${${proj}_BINARY_DIR}/python/python_build ${${proj}_SOURCE_DIR}/python/ && ${CMAKE_COMMAND} -E copy ${${proj}_BINARY_DIR}/python/python_install ${${proj}_SOURCE_DIR}/python/ - - # This build is Unix specific - BUILD_COMMAND - ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/python ./python_build - INSTALL_COMMAND - ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/python ./python_install - DEPENDS - ${proj} - ) + ${${proj}_EP_ARGS} + 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 ${libastra_Install_Dir} + # apparently this is the only way to pass environment variables to + # external projects + CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy ${${proj}_BINARY_DIR}/python/python_build ${${proj}_SOURCE_DIR}/python/ && ${CMAKE_COMMAND} -E copy ${${proj}_BINARY_DIR}/python/python_install ${${proj}_SOURCE_DIR}/python/ + + # This build is Unix specific + BUILD_COMMAND + ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/python ./python_build + INSTALL_COMMAND + ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/python ./python_install + DEPENDS + ${proj} + ) - 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() + 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 ASTRA_BASIC_TEST - #COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s test -p test_*.py - COMMAND ${PYTHON_EXECUTABLE} -c "import astra; astra.test_noCUDA()" - WORKING_DIRECTORY ${${proj}_SOURCE_DIR}) - if (CUDA_FOUND) - add_test(NAME ASTRA_BASIC_GPU_TEST - #COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s test -p test_*.py + set(${proj}_ROOT ${${proj}_SOURCE_DIR}) + set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR}) + add_test(NAME ASTRA_BASIC_TEST + COMMAND ${PYTHON_EXECUTABLE} -c "import astra; astra.test_noCUDA()" + WORKING_DIRECTORY ${${proj}_SOURCE_DIR}) + if (CUDA_FOUND) + add_test(NAME ASTRA_BASIC_GPU_TEST COMMAND ${PYTHON_EXECUTABLE} -c "import astra; astra.test_CUDA()" WORKING_DIRECTORY ${${proj}_SOURCE_DIR}) - endif() + endif() - else() - ExternalProject_Add_Empty(${proj} DEPENDS "${${proj}_DEPENDENCIES}" +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() +endif() From 841e808a8613d727cd8c449e0205f1eb85f33046 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Mon, 7 Oct 2019 12:16:05 +0100 Subject: [PATCH 117/118] add a BUILD_CIL_LITE=ON --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 30d33276..70ab3b7c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,6 +36,10 @@ matrix: 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 From 3f97f9a43213b021b60e774dbfe01a8c2747b3f6 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Mon, 7 Oct 2019 14:57:53 +0100 Subject: [PATCH 118/118] add test to CIL_LITE --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 70ab3b7c..ffdb3727 100644 --- a/.travis.yml +++ b/.travis.yml @@ -232,6 +232,10 @@ before_install: 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 # for counting clones, excluding ours - | if [[ -n "$GITHUB_API_TOKEN" ]]; then