From ad186e8bf8e33af872aa940205086e1cf22befc0 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Sun, 16 Sep 2018 10:00:30 -0400 Subject: [PATCH 1/3] COMP: Disable testing of ShapePopulationViewer, ShapeRegression and SPHARM-PDM --- SuperBuild/External_SPHARM-PDM.cmake | 1 + SuperBuild/External_ShapePopulationViewer.cmake | 1 + SuperBuild/External_ShapeRegressionExtension.cmake | 1 + 3 files changed, 3 insertions(+) diff --git a/SuperBuild/External_SPHARM-PDM.cmake b/SuperBuild/External_SPHARM-PDM.cmake index 73d9bbb..59f7f5d 100644 --- a/SuperBuild/External_SPHARM-PDM.cmake +++ b/SuperBuild/External_SPHARM-PDM.cmake @@ -71,6 +71,7 @@ if(NOT DEFINED ${proj}_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj}) -DSlicer_DIR:PATH=${Slicer_INNER_BUILD_DIR} # Options -D${proj}_BUILD_SLICER_EXTENSION:BOOL=ON + -DBUILD_TESTING:BOOL=OFF DEPENDS ${${proj}_DEPENDENCIES} ) diff --git a/SuperBuild/External_ShapePopulationViewer.cmake b/SuperBuild/External_ShapePopulationViewer.cmake index 5f82e4a..14b8dda 100644 --- a/SuperBuild/External_ShapePopulationViewer.cmake +++ b/SuperBuild/External_ShapePopulationViewer.cmake @@ -71,6 +71,7 @@ if(NOT DEFINED ${proj}_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj}) -DSlicer_DIR:PATH=${Slicer_INNER_BUILD_DIR} # Options -D${proj}_BUILD_SLICER_EXTENSION:BOOL=ON + -DBUILD_TESTING:BOOL=OFF DEPENDS ${${proj}_DEPENDENCIES} ) diff --git a/SuperBuild/External_ShapeRegressionExtension.cmake b/SuperBuild/External_ShapeRegressionExtension.cmake index 582b94d..9546387 100644 --- a/SuperBuild/External_ShapeRegressionExtension.cmake +++ b/SuperBuild/External_ShapeRegressionExtension.cmake @@ -71,6 +71,7 @@ if(NOT DEFINED ${proj}_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj}) -DSlicer_DIR:PATH=${Slicer_INNER_BUILD_DIR} # Options -D${proj}_BUILD_SLICER_EXTENSION:BOOL=ON + -DBUILD_TESTING:BOOL=OFF DEPENDS ${${proj}_DEPENDENCIES} ) From 20b303d8253d5ec0a2d431772425f6cf0c576bf5 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Sun, 16 Sep 2018 03:15:22 -0400 Subject: [PATCH 2/3] COMP: Fix packaging of SPHARM-PDM and ShapePopulationViewer on macOS List of SPHARM-PDM changes: $ git shortlog ed91661..09407a2 --no-merges Jean-Christophe Fillion-Robin (1): cmake: Ensure fortran library are properly fixed-up and packaged on macOS List of ShapePopulationViewer changes: $ git shortlog 76d356d..3a39e52 --no-merges Jean-Christophe Fillion-Robin (4): COMP: Fix -Winconsistent-missing-override warnings COMP: Fix macOS packaging as Slicer extension COMP: Configure ShapePopulationBase.h in the build directory ENH: Package into Slicer extension only Runtime libraries and executables List of Slicer changes: $ git shortlog e08d28f2e..cd7d51ce9 --no-merges Jean-Christophe Fillion-Robin (3): [Backport Slicer/Slicer#1022] COMP: Support packaging of extension from within Slicer custom application [Backport Slicer/Slicer#1022] COMP: Support packaging of libraries outside of Slicer or extension build tree [Backport Slicer/Slicer#1022] COMP: Support non-superbuild extension that define CPACK_INSTALL_CMAKE_PROJECTS jcfr (1): [Backport] COMP: Fix typo in SlicerExtensionCPackBundleFixup --- CMakeLists.txt | 2 +- SuperBuild/External_SPHARM-PDM.cmake | 4 ++-- SuperBuild/External_ShapePopulationViewer.cmake | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 57ec20e..2ce4b03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ if(NOT DEFINED slicersources_SOURCE_DIR) # Download Slicer sources and set variables slicersources_SOURCE_DIR and slicersources_BINARY_DIR FetchContent_Populate(slicersources GIT_REPOSITORY https://github.com/jcfr/Slicer - GIT_TAG e08d28f2e8ced063b55c541142be86e10a94f218 # slicersalt-4.9-2018-09-13-8c19c293c + GIT_TAG cd7d51ce9b613bdf966281d9a841017473ec0c07 # slicersalt-4.9-2018-09-13-8c19c293c GIT_PROGRESS 1 ) else() diff --git a/SuperBuild/External_SPHARM-PDM.cmake b/SuperBuild/External_SPHARM-PDM.cmake index 59f7f5d..8033f54 100644 --- a/SuperBuild/External_SPHARM-PDM.cmake +++ b/SuperBuild/External_SPHARM-PDM.cmake @@ -53,8 +53,8 @@ if(NOT DEFINED ${proj}_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj}) set(${proj}_PACKAGE_DIR ${${proj}_DIR}/${proj}-build) ExternalProject_Add(${proj} ${${proj}_EP_ARGS} - GIT_REPOSITORY "${EP_GIT_PROTOCOL}://github.com/NIRALUser/SPHARM-PDM.git" - GIT_TAG "ed916619c03b4e14ed7700a5d1b9c084472b2a4b" # 2018-09-14 + GIT_REPOSITORY "${EP_GIT_PROTOCOL}://github.com/jcfr/SPHARM-PDM.git" + GIT_TAG "09407a2549d601164b06cd9f41df7b97f37a35e7" # slicersalt-2018-09-14-ed916619c SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj} BINARY_DIR ${${proj}_DIR} INSTALL_COMMAND ${CMAKE_COMMAND} --build ${${proj}_PACKAGE_DIR} --config ${config} --target package diff --git a/SuperBuild/External_ShapePopulationViewer.cmake b/SuperBuild/External_ShapePopulationViewer.cmake index 14b8dda..ea36d25 100644 --- a/SuperBuild/External_ShapePopulationViewer.cmake +++ b/SuperBuild/External_ShapePopulationViewer.cmake @@ -53,8 +53,8 @@ if(NOT DEFINED ${proj}_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj}) set(${proj}_PACKAGE_DIR ${${proj}_DIR}) ExternalProject_Add(${proj} ${${proj}_EP_ARGS} - GIT_REPOSITORY "${EP_GIT_PROTOCOL}://github.com/NIRALUser/ShapePopulationViewer.git" - GIT_TAG "76d356d44f0d0bc9f4901b05452d692d846c2636" # 2018-09-14 + GIT_REPOSITORY "${EP_GIT_PROTOCOL}://github.com/jcfr/ShapePopulationViewer.git" + GIT_TAG "3a39e526238f5b5f55928e41369f9a4cb751d145" # slicersalt-2018-09-14-76d356d44 SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj} BINARY_DIR ${${proj}_DIR} INSTALL_COMMAND ${CMAKE_COMMAND} --build ${${proj}_PACKAGE_DIR} --config ${config} --target package From 94bf7905f540993833d6da0a2a81f353fe1b64a0 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Sun, 16 Sep 2018 23:53:27 -0400 Subject: [PATCH 3/3] COMP: Fix packaging of ShapeRegressionExtension on macOS and add shape4D project This commit updates ShapeRegressionExtension and shape4D so that they can be integrated and packaged independently. Prior to this commit, shape4D package was built as byproduct of ShapeRegressionExtension which made it challenging to integrate. List of ShapeRegressionExtension changes: $ git shortlog 983564f9c..35bbc25 --no-merges Jean-Christophe Fillion-Robin (5): COMP: Update minimum required CMake version from 2.8.9 to 3.5 COMP: Update and simplify build-system COMP: Update shape4D to fix warnings and minimum required CMake version COMP: Update shape4D and fix packaging of associated libraries COMP: Packaging shape4D within ShapeRegressionExtension not supported on macOS List of shape4D changes: $ git shortlog c74c766..3f47cf7 --no-merges Jean-Christophe Fillion-Robin (13): COMP: Fix -Wsign-compare warnings in regressionacceleration.cpp and polydatawriter.cpp COMP: Fix -Wdelete-non-virtual-dtor warning in regressionvelocity.cpp COMP: Fix -Wmaybe-uninitialized warnings in regressionacceleration.cpp COMP: Fix copy constructor warnings in tmplandmark.cpp and tmpsurfacecurrent.cpp COMP: Update minimum required CMake version from 3.1 to 3.5 STYLE: Add comments, fix indents, consistently use EXTENSION_NAME variable STYLE: Simplify SuperBuild.cmake and external projects COMP: Simplify handling of include directories in shape4D STYLE: Organize install rules to match extension template COMP: Associate "RuntimeLibraries" component with FFTW install rule ENH: Generate an Extension configuration file COMP: Remove unused variable from FindFFTW CMake module COMP: Fix packaging on macOS and allows dependent extension to package the project --- .../External_ShapeRegressionExtension.cmake | 8 +- SuperBuild/External_shape4D.cmake | 86 +++++++++++++++++++ SuperBuild/SlicerPackageExtensions.cmake | 1 + 3 files changed, 92 insertions(+), 3 deletions(-) create mode 100644 SuperBuild/External_shape4D.cmake diff --git a/SuperBuild/External_ShapeRegressionExtension.cmake b/SuperBuild/External_ShapeRegressionExtension.cmake index 9546387..3eaef2b 100644 --- a/SuperBuild/External_ShapeRegressionExtension.cmake +++ b/SuperBuild/External_ShapeRegressionExtension.cmake @@ -22,7 +22,9 @@ set(proj ShapeRegressionExtension) # Set dependency list -set(${proj}_DEPENDENCIES "") +set(${proj}_DEPENDENCIES + shape4D + ) # Include dependent projects if any ExternalProject_Include_Dependencies(${proj} @@ -53,8 +55,8 @@ if(NOT DEFINED ${proj}_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj}) set(${proj}_PACKAGE_DIR ${${proj}_DIR}/${proj}-build) ExternalProject_Add(${proj} ${${proj}_EP_ARGS} - GIT_REPOSITORY "${EP_GIT_PROTOCOL}://github.com/KitwareMedical/ShapeRegressionExtension.git" - GIT_TAG "983564f9cdd51cfcb3e35ab26e15d7db314b7d54 " # 2018-09-13 (master) + GIT_REPOSITORY "${EP_GIT_PROTOCOL}://github.com/jcfr/ShapeRegressionExtension.git" + GIT_TAG "35bbc25d185689bdf71798e7a6ff212873dc4969 " # 2018-09-13 (master) SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj} BINARY_DIR ${${proj}_DIR} INSTALL_COMMAND ${CMAKE_COMMAND} --build ${${proj}_PACKAGE_DIR} --config ${config} --target package diff --git a/SuperBuild/External_shape4D.cmake b/SuperBuild/External_shape4D.cmake new file mode 100644 index 0000000..7d7848a --- /dev/null +++ b/SuperBuild/External_shape4D.cmake @@ -0,0 +1,86 @@ +#============================================================================ +# +# Copyright (c) Kitware, Inc. +# +# 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. +# +#============================================================================ +# +# External project for the project. +# + +set(proj shape4D) + +# Set dependency list +set(${proj}_DEPENDENCIES + "" + ) + +# Include dependent projects if any +ExternalProject_Include_Dependencies(${proj} + PROJECT_VAR proj + DEPENDS_VAR ${proj}_DEPENDENCIES + SUPERBUILD_VAR Slicer_SUPERBUILD + ) + +list(APPEND ${proj}_DEPENDENCIES Slicer) + +if(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj}) + message(FATAL_ERROR "Enabling ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj} is not supported !") +endif() + +# Sanity checks +if(DEFINED ${proj}_DIR AND NOT EXISTS ${${proj}_DIR}) + message(FATAL_ERROR "${proj}_DIR variable is defined but corresponds to non-existing directory") +endif() + +if(NOT DEFINED ${proj}_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj}) + + set(config ${CMAKE_BUILD_TYPE}) + if(DEFINED CMAKE_CONFIGURATION_TYPES) + set(config ${CMAKE_CFG_INTDIR}) + endif() + + set(${proj}_DIR ${CMAKE_BINARY_DIR}/${proj}-build) + set(${proj}_PACKAGE_DIR ${${proj}_DIR}/${proj}-build) + ExternalProject_Add(${proj} + ${${proj}_EP_ARGS} + GIT_REPOSITORY "${EP_GIT_PROTOCOL}://github.com/jcfr/shape4D.git" + GIT_TAG "3f47cf711a3d21a441c1e46ea992b0f0480b5cf8" # slicersalt-2018-01-22-c74c766a4c + SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj} + BINARY_DIR ${${proj}_DIR} + INSTALL_COMMAND ${CMAKE_COMMAND} --build ${${proj}_PACKAGE_DIR} --config ${config} --target package + CMAKE_CACHE_ARGS + # Compiler settings + -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} + -DCMAKE_C_FLAGS:STRING=${ep_common_c_flags} + -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} + -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags} + -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD} + -DCMAKE_CXX_STANDARD_REQUIRED:BOOL=${CMAKE_CXX_STANDARD_REQUIRED} + -DCMAKE_CXX_EXTENSIONS:BOOL=${CMAKE_CXX_EXTENSIONS} + # Dependencies + -DSlicer_DIR:PATH=${Slicer_INNER_BUILD_DIR} + # Options + -D${proj}_BUILD_SLICER_EXTENSION:BOOL=ON + -DBUILD_TESTING:BOOL=OFF + DEPENDS + ${${proj}_DEPENDENCIES} + ) + + list(APPEND ${APPLICATION_NAME}_EXTENSION_CPACK_PACKAGE_DIRS + ${${proj}_PACKAGE_DIR}/_CPack_Packages + ) +else() + ExternalProject_Add_Empty(${proj} DEPENDS ${${proj}_DEPENDENCIES}) +endif() diff --git a/SuperBuild/SlicerPackageExtensions.cmake b/SuperBuild/SlicerPackageExtensions.cmake index b4f4864..a6e1bfa 100644 --- a/SuperBuild/SlicerPackageExtensions.cmake +++ b/SuperBuild/SlicerPackageExtensions.cmake @@ -28,6 +28,7 @@ set(proj SlicerPackageExtensions) set(${proj}_EXTENSIONS SPHARM-PDM ShapePopulationViewer + shape4D ShapeRegressionExtension )