Link corret gflags target on

Link corret gflags target on

Former-commit-id: d67cc6ed9636c6f562b0687c80ce53fed1211b78

--- cmake-modules/Fetch_gflags.cmake
+++ cmake-modules/Fetch_gflags.cmake
@@ -1,7 +1,14 @@
+
+if(NOT BUILD_SHARED_LIBS)
+    set(COMPONENTS COMPONENTS)
+    set(ITEMS nothreads_static)
+endif()
+

 if(NOT TARGET gflags AND DMRG_DOWNLOAD_METHOD MATCHES "find|fetch")
     # Gflags comes in static flavor in conda also!
     find_package(gflags
+            ${COMPONENTS} ${ITEMS}
             NO_CMAKE_PACKAGE_REGISTRY)
     if(TARGET gflags)
         message(STATUS "Found gflags")
@@ -13,6 +20,7 @@
     include(${PROJECT_SOURCE_DIR}/cmake-modules/BuildDependency.cmake)
     build_dependency(gflags "${CMAKE_INSTALL_PREFIX}" "")
     find_package(gflags
+            ${COMPONENTS} ${ITEMS}
             HINTS ${CMAKE_INSTALL_PREFIX}/gflags
             NO_CMAKE_PACKAGE_REGISTRY)
     if(TARGET gflags)
@@ -35,6 +43,7 @@
         replace_or_remove_shared(gflags)
         replace_pthread_shallow(gflags)
     endif()
+
     # Modernize
     get_property(imp_loc_set TARGET gflags PROPERTY IMPORTED_LOCATION SET) # Returns a boolean if set
     get_property(loc_set     TARGET gflags PROPERTY LOCATION SET) # Returns a boolean if set


cmake fix

cmake fix

git-svn-id: 6b1c4fe79111c0bc0cce83313250759594f8984b@9032 e128ff1e-fa79-4151-a8cb-522299a2c450

--- cmake/AddCXXCompileOptions.cmake
+++ cmake/AddCXXCompileOptions.cmake
@@ -1,6 +1,10 @@
-#
-# This file is a backport from CMake version 3.7.x. Therefore,
-#
+######################################################################
+## CMakeLists.txt ---
+## This file is part of the G+Smo library.
+##
+## Authors: M. Moeller and A. Mantzaflaris
+## Copyright (C) 2012 - 2017 RICAM-Linz.
+######################################################################

 set(CMAKE_CXX_STANDARD_DEFAULT 11)

@@ -177,8 +181,8 @@
 if (CMAKE_VERSION VERSION_LESS "3.1")

   if ( NOT "x${CMAKE_CXX_STANDARD}" STREQUAL "x98" AND
-       ${CMAKE_CXX_STANDARD} LESS ${CMAKE_CXX_STANDARD_DEFAULT})
-      message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++${CMAKE_CXX_STANDARD}.")
+       ${CMAKE_CXX_STANDARD_DEFAULT} LESS ${CMAKE_CXX_STANDARD})
+      message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} supports at most C++${CMAKE_CXX_STANDARD_DEFAULT} (requested: ${CMAKE_CXX_STANDARD}).")
   endif()

   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION}")


Fix ccc-analyzer wrapper.

Fix ccc-analyzer wrapper.

--- cmake/EnableClangDebugging.cmake
+++ cmake/EnableClangDebugging.cmake
@@ -39,12 +39,12 @@
     if ( NOT "${cxx_analyzer}" STREQUAL "cxx_analyzer-NOTFOUND" )
         message(STATUS "Activating clang's static analyzer for C++; original compiler is ${CMAKE_CXX_COMPILER}.")

-        set(CCC_CXX "${CMAKE_C_COMPILER}")
+        set(CCC_CXX "${CMAKE_CXX_COMPILER}")

         set(cxx_analyzer_wrapper "${CMAKE_CURRENT_BINARY_DIR}/c++-analyzer-cmake-wrapper")
         configure_file(${cxx_analyzer_wrapper_in} ${cxx_analyzer_wrapper})

-        set(CMAKE_C_COMPILER "${cxx_analyzer_wrapper}")
+        set(CMAKE_CXX_COMPILER "${cxx_analyzer_wrapper}")

     else ()
         message(STATUS "NOTE: Cannot find c++-analyzer in PATH, no static analysis for C++")


use different commit of file-windows

use different commit of file-windows

--- cmake/Modules/FindMagic_EP.cmake
+++ cmake/Modules/FindMagic_EP.cmake
@@ -90,8 +90,7 @@
     ExternalProject_Add(ep_magic
       PREFIX "externals"
       GIT_REPOSITORY "https://github.com/TileDB-Inc/file-windows.git"
-      #GIT_TAG "nplat-cmake-install-support"
-      GIT_TAG "117c8a6533adb135c2c9fd06342daa671a44cb34"
+      GIT_TAG "494060c2ea02494aabfbfc75e76d0af95c36156c"
       GIT_SUBMODULES_RECURSE TRUE
       UPDATE_COMMAND ""
       CMAKE_ARGS


Bug fix for `add_svcomp_benchmark()` macro.

If invoking `svcb-emit-cmake-decls.py` fails an output file might
still be left behind which means when configuration is run again
it might succeed. Instead delete the output file.

--- cmake/add_svcomp_benchmark.cmake
+++ cmake/add_svcomp_benchmark.cmake
@@ -36,6 +36,9 @@
                     RESULT_VARIABLE RESULT_CODE
                    )
     if (NOT ${RESULT_CODE} EQUAL 0)
+      # Remove the generated output file because it is broken and if we don't
+      # the next time configure runs it will succeed.
+      file(REMOVE "${OUTPUT_FILE}")
       message(FATAL_ERROR "Failed to process benchmark ${BENCHMARK_DIR}. With error ${RESULT_CODE}")
     endif()
   endif()


Polkit min version set to 0.94.0

Polkit min version set to 0.94.0

svn path=/branches/work/polkit-qt-1/; revision=1016717

--- cmake/modules/FindPolkitQt.cmake
+++ cmake/modules/FindPolkitQt.cmake
@@ -22,7 +22,7 @@
 include(FindPkgConfig)

 if (NOT POLKITQT_MIN_VERSION)
-  set(POLKITQT_MIN_VERSION "0.9.0")
+  set(POLKITQT_MIN_VERSION "0.94.0")
 endif (NOT POLKITQT_MIN_VERSION)

 pkg_search_module( POLKITQT polkit-qt )


build: fix typo in build system

build: fix typo in build system

This fixes a typo in the build system which is important because it
fixes the dependency tracking and the output location for the swift doc
that is generated for the swift SDK overlay.

--- cmake/modules/SwiftSupport.cmake
+++ cmake/modules/SwiftSupport.cmake
@@ -54,7 +54,7 @@
   add_custom_command(OUTPUT
                        ${ASL_OUTPUT}
                        ${ASL_MODULE_PATH}
-                       ${moodule_directory}/${ASL_MODULE_NAME}.swiftdoc
+                       ${module_directory}/${ASL_MODULE_NAME}.swiftdoc
                      DEPENDS
                        ${ASL_SOURCES}
                      COMMAND
@@ -65,5 +65,5 @@
                     DEPENDS
                        ${ASL_OUTPUT}
                        ${ASL_MODULE_PATH}
-                       ${moodule_directory}/${ASL_MODULE_NAME}.swiftdoc)
+                       ${module_directory}/${ASL_MODULE_NAME}.swiftdoc)
 endfunction()


Install symlinks relative, not absolute

Install symlinks relative, not absolute

This is necessary to fix artifact copy in Jenkins. Besides, the
symlinking on Unix for the different SO versions of libraries
is also based on relative symlinks.

--- InstallSymlink.cmake
+++ InstallSymlink.cmake
@@ -1,22 +1,19 @@

 # Creates a FROM->TO symlink during installation
-function(INSTALL_SYMLINK FROM TO COMPONENT)
-  if (MSVC)
+function(INSTALL_SYMLINK)
+  cmake_parse_arguments(THIS "" "" "FROM;TO;WORKING_DIRECTORY;COMPONENT" ${ARGN})
+  if(MSVC)
     install(CODE
-      "get_filename_component(FROM_ABSOLUTE ${CMAKE_INSTALL_PREFIX}/${FROM}
-         ABSOLUTE)
-       file(TO_NATIVE_PATH \${FROM_ABSOLUTE} FROM_ABSOLUTE)
-       file(TO_NATIVE_PATH \${CMAKE_INSTALL_PREFIX}/${TO} TO)
-       message(\"mklink /j \${TO} \${FROM_ABSOLUTE}\")
-       execute_process(COMMAND mklink /j \${TO} \${FROM_ABSOLUTE})"
-      COMPONENT "${COMPONENT}")
+      "message(\"mklink /j \${THIS_TO} \${THIS_FROM}\")
+       execute_process(COMMAND mklink /j \${THIS_TO} \${THIS_FROM}
+                       WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${THIS_WORKING_DIRECTORY})"
+      COMPONENT "${THIS_COMPONENT}")
   else()
     install(CODE
-      "execute_process(COMMAND rm -f ${CMAKE_INSTALL_PREFIX}/${TO})
-       get_filename_component(FROM_ABSOLUTE ${CMAKE_INSTALL_PREFIX}/${FROM}
-         ABSOLUTE)
-       execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
-         \${FROM_ABSOLUTE} ${CMAKE_INSTALL_PREFIX}/${TO})"
-      COMPONENT "${COMPONENT}")
+      "execute_process(COMMAND rm -f ${THIS_TO}
+                       WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${THIS_WORKING_DIRECTORY})
+       execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${THIS_FROM} ${THIS_TO}
+                       WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${THIS_WORKING_DIRECTORY})"
+      COMPONENT "${THIS_COMPONENT}")
   endif()
 endfunction()


fix installation folder

fix installation folder

--- src/cmake/licensecc-config.cmake
+++ src/cmake/licensecc-config.cmake
@@ -1,11 +1,16 @@
 # licensecc-config.cmake - package configuration file
 get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+#TODO windows?
+set(LCC_PRJ_BASE "${SELF_DIR}/../../licensecc")
+set(LCC_FOUND false)
+
 if(licensecc_FIND_COMPONENTS)
 	foreach(component ${licensecc_FIND_COMPONENTS})
-		set(cmakefile "${SELF_DIR}/${component}/cmake/licensecc.cmake")
+		set(cmakefile "${LCC_PRJ_BASE}/${component}/cmake/licensecc.cmake")
 		if(EXISTS "${cmakefile}")
 			include("${cmakefile}")
 			set(${component}_FOUND true CACHE BOOL "Licensecc ${component} present")
+			set(LCC_FOUND true)
 		else(EXISTS "${cmakefile}")
 			set(${component}_FOUND false CACHE BOOL "Licensecc ${component} present")
 			message( WARNING "Component ${component} declared but not found." )
@@ -14,25 +19,29 @@
 	endforeach(component)
 else(licensecc_FIND_COMPONENTS)
 	if(LCC_PROJECT_NAME)
-		if(EXISTS "${SELF_DIR}/${LCC_PROJECT_NAME}/cmake/licensecc.cmake")
-			include("${SELF_DIR}/${LCC_PROJECT_NAME}/cmake/licensecc.cmake")
+		if(EXISTS "${LCC_PRJ_BASE}/${LCC_PROJECT_NAME}/cmake/licensecc.cmake")
+			include("${LCC_PRJ_BASE}/${LCC_PROJECT_NAME}/cmake/licensecc.cmake")
 			set(${LCC_PROJECT_NAME}_FOUND true CACHE BOOL "Licensecc ${LCC_PROJECT_NAME} present")
+			set(LCC_FOUND true)
 		else()
 			message( WARNING "Variable LCC_PROJECT_NAME declared but project ${LCC_PROJECT_NAME} not found.")
 		endif()
 		mark_as_advanced(${LCC_PROJECT_NAME}_FOUND)
 	else(LCC_PROJECT_NAME)
-		if(PROJECT_NAME AND (EXISTS "${SELF_DIR}/${PROJECT_NAME}/cmake/licensecc.cmake"))
-			include("${SELF_DIR}/${PROJECT_NAME}/cmake/licensecc.cmake")
+		if(PROJECT_NAME AND (EXISTS "${LCC_PRJ_BASE}/${PROJECT_NAME}/cmake/licensecc.cmake"))
+			include("${LCC_PRJ_BASE}/${PROJECT_NAME}/cmake/licensecc.cmake")
 			set(${PROJECT_NAME}_FOUND true CACHE BOOL "Licensecc ${PROJECT_NAME} present")
 		    mark_as_advanced(${PROJECT_NAME}_FOUND)
+		    set(LCC_FOUND true)
 		endif()
 	endif(LCC_PROJECT_NAME)
 endif(licensecc_FIND_COMPONENTS)

-get_property(COMPILE_DEF TARGET licensecc::licensecc_static PROPERTY INTERFACE_COMPILE_DEFINITIONS)
-if("HAS_OPENSSL" IN_LIST COMPILE_DEF AND NOT OpenSSL_FOUND)
-	#message( VERBOSE "Trying to find openssl (required by the target)")
-    SET ( OPENSSL_USE_STATIC_LIBS ON )
-    find_package(OpenSSL REQUIRED COMPONENTS Crypto)
-endif()+if(LCC_FOUND)
+	get_property(COMPILE_DEF TARGET licensecc::licensecc_static PROPERTY INTERFACE_COMPILE_DEFINITIONS)
+	if("HAS_OPENSSL" IN_LIST COMPILE_DEF AND NOT OpenSSL_FOUND)
+		#message( VERBOSE "Trying to find openssl (required by the target)")
+	    SET ( OPENSSL_USE_STATIC_LIBS ON )
+	    find_package(OpenSSL REQUIRED COMPONENTS Crypto)
+	endif()
+endif(LCC_FOUND)


Use cmake target property to set C++ version

--- prosoft/core/config/cmake/config_cpp.cmake
+++ prosoft/core/config/cmake/config_cpp.cmake
@@ -30,26 +30,14 @@
 macro(ps_core_config_cpp_version TARGET_NAME)
 	include(CheckCXXSourceCompiles)
 	if(NOT MSVC)
-		# For MSVC, their implementation of the latest version of C++ is always enabled.
-		# Only GCC 4.7+/Clang accept "c++11", while GCC 4.3+ accepts -std=c++0x.
-		# GCC 4.8+ has removed -std=c++0x.
-		# NOTE: use of CMAKE_CXX_FLAGS/etc can interfere with CMake's compiler flag checking.
 		include(CheckCXXCompilerFlag)
-		check_cxx_compiler_flag("-std=c++14" HAVE_STD_CPP14_FLAG)
-		check_cxx_compiler_flag("-std=c++1y" HAVE_STD_CPP1y_FLAG)
 		check_cxx_compiler_flag("-std=c++11" HAVE_STD_CPP11_FLAG)
-		# Clang 3.5 release (though not pre-release) and GCC 4.9.2 are the only compilers to accept "c++14".
-		# We only enable C++14 if the std flag is implemented with an exception made for clang 3.4+ and gcc 4.9+ .
-		if(HAVE_STD_CPP14_FLAG)
-			set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
-		elseif(HAVE_STD_CPP1y_FLAG AND (PSCLANG OR GXX_VERSION VERSION_EQUAL 4.9 OR GXX_VERSION VERSION_GREATER 4.9))
-			set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
-		elseif(HAVE_STD_CPP11_FLAG)
-			set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+		if(HAVE_STD_CPP11_FLAG)
+			# Cmake 3.8 adds C++17 support
+			set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD 14)
 		else()
 			message(FATAL_ERROR "Your compiler doesn't support C++11.")
 		endif()
-		# Link to libc++ for 10.7+. XXX: libc++ DOES NOT support all C++14 stdlib features as of 10.11.0.
 		check_cxx_compiler_flag("-stdlib=libc++" HAVE_STDLIB_LIBCPP_FLAG)
 		if(HAVE_STDLIB_LIBCPP_FLAG)
 			set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
@@ -59,5 +47,7 @@
 		if(CMAKE_COMPILER_IS_GNUCXX)
 			target_compile_definitions(${TARGET_NAME} PRIVATE _GLIBCXX_USE_CXX11_ABI=1)
 		endif()
-	 endif()
+	else()
+		set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD 14) # ignored until VS2017
+	endif()
 endmacro()


bootstrap

bootstrap

--- bootstrap.cmake
+++ bootstrap.cmake
@@ -1,53 +1,38 @@
 ##
-## bootstrap.cmake
-##
-## Author(s):
-##  - Cedric GESTES <gestes@aldebaran-robotics.com>
-##
-## Copyright (C) 2009 Aldebaran Robotics
-##
+## Copyright (C) 2010 Aldebaran Robotics
 ##

 ###############################################
-# Warning:                                    #
-# This file should stay verbatin              #
+# Auto-generated file.                        #
+# Do not edit                                 #
 # This file is part of the T001CHAIN project  #
 ###############################################

-set(BOOTSTRAP_VERSION 1)
+set(BOOTSTRAP_VERSION 2)
+
 if (NOT CMAKE_TOOLCHAIN_FILE)
   message(STATUS
-    "\n"
-    "===========================================================\n"
-    "= No toolchain file has been specified                    =\n"
-    "= Please use cmake-gui (>= 2.6.4)                         =\n"
-    "= or call cmake like that:                                =\n"
-    "= cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake ..      =\n"
-    "= with a valid toolchain.cmake                            =\n"
-    "= Please refer to the T001chain doc                       =\n"
-    "===========================================================\n"
-    )
+    "
+    No toolchain file has been sepcified.
+    (CMAKE_TOOLCHAIN_FILE variable is not defined)
+
+    Please delete the CMake cache, specify a valid
+    toolchain file and try again.
+
+    Example:
+
+      cd build
+      rm -f CMakeCache.txt
+      cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/naoqi-sdk/toolchain.cmake ..
+
+    "
+  )
   message(FATAL_ERROR "")
-endif (NOT CMAKE_TOOLCHAIN_FILE)
+endif()

-#ok I must admin 1337 15 n07 7h47 gr347 f0r c0d1ng
-#for the export of TOOLCHAIN_DIR to T001CHAIN_DIR
+
 if (NOT TOOLCHAIN_DIR STREQUAL "")
   set(T001CHAIN_DIR ${TOOLCHAIN_DIR} CACHE PATH "" FORCE)
 endif (NOT TOOLCHAIN_DIR STREQUAL "")

-if (NOT T001CHAIN_DIR OR NOT EXISTS "${T001CHAIN_DIR}/cmake/general.cmake")
-  message(STATUS
-    "\n"
-    "===========================================================\n"
-    " ${T001CHAIN_DIR}\n"
-    "= TOOLCHAIN_DIR is undefined                              =\n"
-    "= Set this variable in your toolchain.cmake file          =\n"
-    "= or verify that you called project before including      =\n"
-    "= bootstrap.cmake                                         =\n"
-    "===========================================================\n"
-    )
-  message(FATAL_ERROR "")
-endif (NOT T001CHAIN_DIR OR NOT EXISTS "${T001CHAIN_DIR}/cmake/general.cmake")
-
 include("${T001CHAIN_DIR}/cmake/general.cmake")


build system updates

build system updates

--- qt/imageListViewer/PkgConfigPath.cmake
+++ qt/imageListViewer/PkgConfigPath.cmake
@@ -14,7 +14,7 @@
             PATHS "/Users/$ENV{USER}/Qt/*" "/Users/$ENV{USER}/code/src/Qt/*"
             NO_DEFAULT_PATH)
   if(EXISTS ${Qt5_CLANG_64_CMAKE_DIR})
-    set(Qt5_DIR ${Qt5_CLANG_64_CMAKE_DIR})
+    set(Qt5_DIR "${Qt5_CLANG_64_CMAKE_DIR}/clang_64/lib/cmake/Qt5")
     message(STATUS "Qt5_DIR: ${Qt5_DIR}")
   endif()
 else()


Make FindLibJpegTurbo work on Windows

Make FindLibJpegTurbo work on Windows

--- FindLibJpegTurbo.cmake
+++ FindLibJpegTurbo.cmake
@@ -15,13 +15,13 @@
 # Include dir
 find_path(LibJpegTurbo_INCLUDE_DIR
   NAMES turbojpeg.h
-  PATHS ${LibJpegTurbo_PKGCONF_INCLUDE_DIRS} /opt/libjpeg-turbo/include
+  PATHS ${LibJpegTurbo_PKGCONF_INCLUDE_DIRS} /opt/libjpeg-turbo/include $ENV{LIBJPEGTURBO_ROOT}/include
 )

 # Finally the library itself
 find_library(LibJpegTurbo_LIBRARY
-  NAMES libturbojpeg.so libturbojpeg.so.0 turbojpeg.dll libturbojpeg.dylib
-  PATHS ${LibJpegTurbo_PKGCONF_LIBRARY_DIRS} /opt/libjpeg-turbo/lib
+  NAMES libturbojpeg.so libturbojpeg.so.0 turbojpeg.lib libturbojpeg.dylib
+  PATHS ${LibJpegTurbo_PKGCONF_LIBRARY_DIRS} /opt/libjpeg-turbo/lib $ENV{LIBJPEGTURBO_ROOT}/lib
 )

 # Set the include dir variables and the libraries and let libfind_process do the rest.


make finding genmsg for roslang optional

--- core/roslang/cmake/roslang.cmake
+++ core/roslang/cmake/roslang.cmake
@@ -21,17 +21,19 @@
 endforeach(_l)

 # Hack to resolve languages from wet which rospack does not support yet
-find_package(catkin REQUIRED COMPONENTS genmsg)
-foreach(_l ${CATKIN_MESSAGE_GENERATORS})
-  string(REPLACE "gen" "ros" _l ${_l})
-  rosbuild_find_ros_package(${_l})
-  if(${_l}_PACKAGE_PATH)
-    set(_cmake_fragment ${${_l}_PACKAGE_PATH}/rosbuild/${_l}.cmake)
-    if(EXISTS ${_cmake_fragment})
-      list(APPEND _cmake_fragments ${_cmake_fragment})
-    endif()
-  endif(${_l}_PACKAGE_PATH)
-endforeach(_l)
+find_package(catkin COMPONENTS genmsg)
+if(genmsg_FOUND)
+  foreach(_l ${CATKIN_MESSAGE_GENERATORS})
+    string(REPLACE "gen" "ros" _l ${_l})
+    rosbuild_find_ros_package(${_l})
+    if(${_l}_PACKAGE_PATH)
+      set(_cmake_fragment ${${_l}_PACKAGE_PATH}/rosbuild/${_l}.cmake)
+      if(EXISTS ${_cmake_fragment})
+        list(APPEND _cmake_fragments ${_cmake_fragment})
+      endif()
+    endif(${_l}_PACKAGE_PATH)
+  endforeach(_l)
+endif()

 # Now include them all
 foreach(_f ${_cmake_fragments})


Silence crt-not-secure warnings on MSVC

Silence crt-not-secure warnings on MSVC

--- learn-asio/cmake/compiler_msvc.cmake
+++ learn-asio/cmake/compiler_msvc.cmake
@@ -17,6 +17,9 @@
       $<$<NOT:$<CONFIG:DEBUG>>:
         NDEBUG
       >
+
+      # No big deal for our sample code.
+      _CRT_SECURE_NO_WARNINGS
   )

   target_compile_options(${TARGET}


ENH: Bump SlicerExecutionModel to latest master.

Fixes for serializer support with Slicer.

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -63,10 +63,10 @@
   ${github_protocol}://github.com/TubeTK/TubeTK-ParameterSerializer.git )
 set( ParameterSerializer_HASH_OR_TAG fe360ce153bfe4efc36b276750d4606bb1d7b156 )

-# Slicer Execution Model snapshot 2014-02-18
+# Slicer Execution Model snapshot 2014-05-13
 set( SlicerExecutionModel_URL
   ${github_protocol}://github.com/Slicer/SlicerExecutionModel.git )
-set( SlicerExecutionModel_HASH_OR_TAG 46f3d892fc6deb9be2ce929257a5411d02c1ae75 )
+set( SlicerExecutionModel_HASH_OR_TAG e96f2965378cd9a9e5217cd43c8023350138b1cf )

 # Visualization Toolkit (3D Slicer fork) snapshot 2013-08-20 06:54:45
 set( VTK_URL ${github_protocol}://github.com/Slicer/VTK.git )


added PythonQt libary search path

added PythonQt libary search path

--- CMake/mitkFunctionGetLibrarySearchPaths.cmake
+++ CMake/mitkFunctionGetLibrarySearchPaths.cmake
@@ -78,8 +78,8 @@
     endif()
   endif()

-  if(MITK_USE_Python AND CTK_PYTHONQT_INSTALL_DIR)
-    list(APPEND _dir_candidates "${CTK_PYTHONQT_INSTALL_DIR}/bin")
+  if(MITK_USE_Python)
+    list(APPEND _dir_candidates "${CTK_DIR}/CMakeExternals/Install/bin")
   endif()

   if(MITK_USE_TOF_PMDO3 OR MITK_USE_TOF_PMDCAMCUBE OR MITK_USE_TOF_PMDCAMBOARD)


remove CPM since we use wks

remove CPM since we use wks

--- cmake/CPM.cmake
+++ cmake/CPM.cmake
@@ -1,887 +0,0 @@
-# CPM.cmake - CMake's missing package manager
-# ===========================================
-# See https://github.com/cpm-cmake/CPM.cmake for usage and update instructions.
-#
-# MIT License
-# -----------
-#[[
-  Copyright (c) 2021 Lars Melchior and additional contributors
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy
-  of this software and associated documentation files (the "Software"), to deal
-  in the Software without restriction, including without limitation the rights
-  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-  copies of the Software, and to permit persons to whom the Software is
-  furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all
-  copies or substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-]]
-
-cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
-
-set(CURRENT_CPM_VERSION 0.32.0)
-
-if(CPM_DIRECTORY)
-  if(NOT CPM_DIRECTORY STREQUAL CMAKE_CURRENT_LIST_DIR)
-    if(CPM_VERSION VERSION_LESS CURRENT_CPM_VERSION)
-      message(
-        AUTHOR_WARNING
-          "${CPM_INDENT} \
-A dependency is using a more recent CPM version (${CURRENT_CPM_VERSION}) than the current project (${CPM_VERSION}). \
-It is recommended to upgrade CPM to the most recent version. \
-See https://github.com/cpm-cmake/CPM.cmake for more information."
-      )
-    endif()
-    if(${CMAKE_VERSION} VERSION_LESS "3.17.0")
-      include(FetchContent)
-    endif()
-    return()
-  endif()
-
-  get_property(
-    CPM_INITIALIZED GLOBAL ""
-    PROPERTY CPM_INITIALIZED
-    SET
-  )
-  if(CPM_INITIALIZED)
-    return()
-  endif()
-endif()
-
-set_property(GLOBAL PROPERTY CPM_INITIALIZED true)
-
-option(CPM_USE_LOCAL_PACKAGES "Always try to use `find_package` to get dependencies"
-       $ENV{CPM_USE_LOCAL_PACKAGES}
-)
-option(CPM_LOCAL_PACKAGES_ONLY "Only use `find_package` to get dependencies"
-       $ENV{CPM_LOCAL_PACKAGES_ONLY}
-)
-option(CPM_DOWNLOAD_ALL "Always download dependencies from source" $ENV{CPM_DOWNLOAD_ALL})
-option(CPM_DONT_UPDATE_MODULE_PATH "Don't update the module path to allow using find_package"
-       $ENV{CPM_DONT_UPDATE_MODULE_PATH}
-)
-option(CPM_DONT_CREATE_PACKAGE_LOCK "Don't create a package lock file in the binary path"
-       $ENV{CPM_DONT_CREATE_PACKAGE_LOCK}
-)
-option(CPM_INCLUDE_ALL_IN_PACKAGE_LOCK
-       "Add all packages added through CPM.cmake to the package lock"
-       $ENV{CPM_INCLUDE_ALL_IN_PACKAGE_LOCK}
-)
-
-set(CPM_VERSION
-    ${CURRENT_CPM_VERSION}
-    CACHE INTERNAL ""
-)
-set(CPM_DIRECTORY
-    ${CMAKE_CURRENT_LIST_DIR}
-    CACHE INTERNAL ""
-)
-set(CPM_FILE
-    ${CMAKE_CURRENT_LIST_FILE}
-    CACHE INTERNAL ""
-)
-set(CPM_PACKAGES
-    ""
-    CACHE INTERNAL ""
-)
-set(CPM_DRY_RUN
-    OFF
-    CACHE INTERNAL "Don't download or configure dependencies (for testing)"
-)
-
-if(DEFINED ENV{CPM_SOURCE_CACHE})
-  set(CPM_SOURCE_CACHE_DEFAULT $ENV{CPM_SOURCE_CACHE})
-else()
-  set(CPM_SOURCE_CACHE_DEFAULT OFF)
-endif()
-
-set(CPM_SOURCE_CACHE
-    ${CPM_SOURCE_CACHE_DEFAULT}
-    CACHE PATH "Directory to download CPM dependencies"
-)
-
-if(NOT CPM_DONT_UPDATE_MODULE_PATH)
-  set(CPM_MODULE_PATH
-      "${CMAKE_BINARY_DIR}/CPM_modules"
-      CACHE INTERNAL ""
-  )
-  # remove old modules
-  file(REMOVE_RECURSE ${CPM_MODULE_PATH})
-  file(MAKE_DIRECTORY ${CPM_MODULE_PATH})
-  # locally added CPM modules should override global packages
-  set(CMAKE_MODULE_PATH "${CPM_MODULE_PATH};${CMAKE_MODULE_PATH}")
-endif()
-
-if(NOT CPM_DONT_CREATE_PACKAGE_LOCK)
-  set(CPM_PACKAGE_LOCK_FILE
-      "${CMAKE_BINARY_DIR}/cpm-package-lock.cmake"
-      CACHE INTERNAL ""
-  )
-  file(WRITE ${CPM_PACKAGE_LOCK_FILE}
-       "# CPM Package Lock\n# This file should be committed to version control\n\n"
-  )
-endif()
-
-include(FetchContent)
-
-# Try to infer package name from git repository uri (path or url)
-function(cpm_package_name_from_git_uri URI RESULT)
-  if("${URI}" MATCHES "([^/:]+)/?.git/?$")
-    set(${RESULT}
-        ${CMAKE_MATCH_1}
-        PARENT_SCOPE
-    )
-  else()
-    unset(${RESULT} PARENT_SCOPE)
-  endif()
-endfunction()
-
-# Try to infer package name and version from a url
-function(cpm_package_name_and_ver_from_url url outName outVer)
-  if(url MATCHES "[/\\?]([a-zA-Z0-9_\\.-]+)\\.(tar|tar\\.gz|tar\\.bz2|zip|ZIP)(\\?|/|$)")
-    # We matched an archive
-    set(filename "${CMAKE_MATCH_1}")
-
-    if(filename MATCHES "([a-zA-Z0-9_\\.-]+)[_-]v?(([0-9]+\\.)*[0-9]+[a-zA-Z0-9]*)")
-      # We matched <name>-<version> (ie foo-1.2.3)
-      set(${outName}
-          "${CMAKE_MATCH_1}"
-          PARENT_SCOPE
-      )
-      set(${outVer}
-          "${CMAKE_MATCH_2}"
-          PARENT_SCOPE
-      )
-    elseif(filename MATCHES "(([0-9]+\\.)+[0-9]+[a-zA-Z0-9]*)")
-      # We couldn't find a name, but we found a version
-      #
-      # In many cases (which we don't handle here) the url would look something like
-      # `irrelevant/ACTUAL_PACKAGE_NAME/irrelevant/1.2.3.zip`. In such a case we can't possibly
-      # distinguish the package name from the irrelevant bits. Moreover if we try to match the
-      # package name from the filename, we'd get bogus at best.
-      unset(${outName} PARENT_SCOPE)
-      set(${outVer}
-          "${CMAKE_MATCH_1}"
-          PARENT_SCOPE
-      )
-    else()
-      # Boldly assume that the file name is the package name.
-      #
-      # Yes, something like `irrelevant/ACTUAL_NAME/irrelevant/download.zip` will ruin our day, but
-      # such cases should be quite rare. No popular service does this... we think.
-      set(${outName}
-          "${filename}"
-          PARENT_SCOPE
-      )
-      unset(${outVer} PARENT_SCOPE)
-    endif()
-  else()
-    # No ideas yet what to do with non-archives
-    unset(${outName} PARENT_SCOPE)
-    unset(${outVer} PARENT_SCOPE)
-  endif()
-endfunction()
-
-# Initialize logging prefix
-if(NOT CPM_INDENT)
-  set(CPM_INDENT
-      "CPM:"
-      CACHE INTERNAL ""
-  )
-endif()
-
-function(cpm_find_package NAME VERSION)
-  string(REPLACE " " ";" EXTRA_ARGS "${ARGN}")
-  find_package(${NAME} ${VERSION} ${EXTRA_ARGS} QUIET)
-  if(${CPM_ARGS_NAME}_FOUND)
-    message(STATUS "${CPM_INDENT} using local package ${CPM_ARGS_NAME}@${VERSION}")
-    CPMRegisterPackage(${CPM_ARGS_NAME} "${VERSION}")
-    set(CPM_PACKAGE_FOUND
-        YES
-        PARENT_SCOPE
-    )
-  else()
-    set(CPM_PACKAGE_FOUND
-        NO
-        PARENT_SCOPE
-    )
-  endif()
-endfunction()
-
-# Create a custom FindXXX.cmake module for a CPM package This prevents `find_package(NAME)` from
-# finding the system library
-function(cpm_create_module_file Name)
-  if(NOT CPM_DONT_UPDATE_MODULE_PATH)
-    # erase any previous modules
-    file(WRITE ${CPM_MODULE_PATH}/Find${Name}.cmake
-         "include(${CPM_FILE})\n${ARGN}\nset(${Name}_FOUND TRUE)"
-    )
-  endif()
-endfunction()
-
-# Find a package locally or fallback to CPMAddPackage
-function(CPMFindPackage)
-  set(oneValueArgs NAME VERSION GIT_TAG FIND_PACKAGE_ARGUMENTS)
-
-  cmake_parse_arguments(CPM_ARGS "" "${oneValueArgs}" "" ${ARGN})
-
-  if(NOT DEFINED CPM_ARGS_VERSION)
-    if(DEFINED CPM_ARGS_GIT_TAG)
-      cpm_get_version_from_git_tag("${CPM_ARGS_GIT_TAG}" CPM_ARGS_VERSION)
-    endif()
-  endif()
-
-  if(CPM_DOWNLOAD_ALL)
-    CPMAddPackage(${ARGN})
-    cpm_export_variables(${CPM_ARGS_NAME})
-    return()
-  endif()
-
-  cpm_check_if_package_already_added(${CPM_ARGS_NAME} "${CPM_ARGS_VERSION}")
-  if(CPM_PACKAGE_ALREADY_ADDED)
-    cpm_export_variables(${CPM_ARGS_NAME})
-    return()
-  endif()
-
-  cpm_find_package(${CPM_ARGS_NAME} "${CPM_ARGS_VERSION}" ${CPM_ARGS_FIND_PACKAGE_ARGUMENTS})
-
-  if(NOT CPM_PACKAGE_FOUND)
-    CPMAddPackage(${ARGN})
-    cpm_export_variables(${CPM_ARGS_NAME})
-  endif()
-
-endfunction()
-
-# checks if a package has been added before
-function(cpm_check_if_package_already_added CPM_ARGS_NAME CPM_ARGS_VERSION)
-  if("${CPM_ARGS_NAME}" IN_LIST CPM_PACKAGES)
-    CPMGetPackageVersion(${CPM_ARGS_NAME} CPM_PACKAGE_VERSION)
-    if("${CPM_PACKAGE_VERSION}" VERSION_LESS "${CPM_ARGS_VERSION}")
-      message(
-        WARNING
-          "${CPM_INDENT} requires a newer version of ${CPM_ARGS_NAME} (${CPM_ARGS_VERSION}) than currently included (${CPM_PACKAGE_VERSION})."
-      )
-    endif()
-    cpm_get_fetch_properties(${CPM_ARGS_NAME})
-    set(${CPM_ARGS_NAME}_ADDED NO)
-    set(CPM_PACKAGE_ALREADY_ADDED
-        YES
-        PARENT_SCOPE
-    )
-    cpm_export_variables(${CPM_ARGS_NAME})
-  else()
-    set(CPM_PACKAGE_ALREADY_ADDED
-        NO
-        PARENT_SCOPE
-    )
-  endif()
-endfunction()
-
-# Parse the argument of CPMAddPackage in case a single one was provided and convert it to a list of
-# arguments which can then be parsed idiomatically. For example gh:foo/bar@1.2.3 will be converted
-# to: GITHUB_REPOSITORY;foo/bar;VERSION;1.2.3
-function(cpm_parse_add_package_single_arg arg outArgs)
-  # Look for a scheme
-  if("${arg}" MATCHES "^([a-zA-Z]+):(.+)$")
-    string(TOLOWER "${CMAKE_MATCH_1}" scheme)
-    set(uri "${CMAKE_MATCH_2}")
-
-    # Check for CPM-specific schemes
-    if(scheme STREQUAL "gh")
-      set(out "GITHUB_REPOSITORY;${uri}")
-      set(packageType "git")
-    elseif(scheme STREQUAL "gl")
-      set(out "GITLAB_REPOSITORY;${uri}")
-      set(packageType "git")
-      # A CPM-specific scheme was not found. Looks like this is a generic URL so try to determine
-      # type
-    elseif(arg MATCHES ".git/?(@|#|$)")
-      set(out "GIT_REPOSITORY;${arg}")
-      set(packageType "git")
-    else()
-      # Fall back to a URL
-      set(out "URL;${arg}")
-      set(packageType "archive")
-
-      # We could also check for SVN since FetchContent supports it, but SVN is so rare these days.
-      # We just won't bother with the additional complexity it will induce in this function. SVN is
-      # done by multi-arg
-    endif()
-  else()
-    if(arg MATCHES ".git/?(@|#|$)")
-      set(out "GIT_REPOSITORY;${arg}")
-      set(packageType "git")
-    else()
-      # Give up
-      message(FATAL_ERROR "CPM: Can't determine package type of '${arg}'")
-    endif()
-  endif()
-
-  # For all packages we interpret @... as version. Only replace the last occurence. Thus URIs
-  # containing '@' can be used
-  string(REGEX REPLACE "@([^@]+)$" ";VERSION;\\1" out "${out}")
-
-  # Parse the rest according to package type
-  if(packageType STREQUAL "git")
-    # For git repos we interpret #... as a tag or branch or commit hash
-    string(REGEX REPLACE "#([^#]+)$" ";GIT_TAG;\\1" out "${out}")
-  elseif(packageType STREQUAL "archive")
-    # For archives we interpret #... as a URL hash.
-    string(REGEX REPLACE "#([^#]+)$" ";URL_HASH;\\1" out "${out}")
-    # We don't try to parse the version if it's not provided explicitly. cpm_get_version_from_url
-    # should do this at a later point
-  else()
-    # We should never get here. This is an assertion and hitting it means there's a bug in the code
-    # above. A packageType was set, but not handled by this if-else.
-    message(FATAL_ERROR "CPM: Unsupported package type '${packageType}' of '${arg}'")
-  endif()
-
-  set(${outArgs}
-      ${out}
-      PARENT_SCOPE
-  )
-endfunction()
-
-# Download and add a package from source
-function(CPMAddPackage)
-  list(LENGTH ARGN argnLength)
-  if(argnLength EQUAL 1)
-    cpm_parse_add_package_single_arg("${ARGN}" ARGN)
-
-    # The shorthand syntax implies EXCLUDE_FROM_ALL
-    set(ARGN "${ARGN};EXCLUDE_FROM_ALL;YES")
-  endif()
-
-  set(oneValueArgs
-      NAME
-      FORCE
-      VERSION
-      GIT_TAG
-      DOWNLOAD_ONLY
-      GITHUB_REPOSITORY
-      GITLAB_REPOSITORY
-      GIT_REPOSITORY
-      SOURCE_DIR
-      DOWNLOAD_COMMAND
-      FIND_PACKAGE_ARGUMENTS
-      NO_CACHE
-      GIT_SHALLOW
-      EXCLUDE_FROM_ALL
-      SOURCE_SUBDIR
-  )
-
-  set(multiValueArgs URL OPTIONS)
-
-  cmake_parse_arguments(CPM_ARGS "" "${oneValueArgs}" "${multiValueArgs}" "${ARGN}")
-
-  # Set default values for arguments
-
-  if(NOT DEFINED CPM_ARGS_VERSION)
-    if(DEFINED CPM_ARGS_GIT_TAG)
-      cpm_get_version_from_git_tag("${CPM_ARGS_GIT_TAG}" CPM_ARGS_VERSION)
-    endif()
-  endif()
-
-  if(CPM_ARGS_DOWNLOAD_ONLY)
-    set(DOWNLOAD_ONLY ${CPM_ARGS_DOWNLOAD_ONLY})
-  else()
-    set(DOWNLOAD_ONLY NO)
-  endif()
-
-  if(DEFINED CPM_ARGS_GITHUB_REPOSITORY)
-    set(CPM_ARGS_GIT_REPOSITORY "https://github.com/${CPM_ARGS_GITHUB_REPOSITORY}.git")
-  endif()
-
-  if(DEFINED CPM_ARGS_GITLAB_REPOSITORY)
-    set(CPM_ARGS_GIT_REPOSITORY "https://gitlab.com/${CPM_ARGS_GITLAB_REPOSITORY}.git")
-  endif()
-
-  if(DEFINED CPM_ARGS_GIT_REPOSITORY)
-    list(APPEND CPM_ARGS_UNPARSED_ARGUMENTS GIT_REPOSITORY ${CPM_ARGS_GIT_REPOSITORY})
-    if(NOT DEFINED CPM_ARGS_GIT_TAG)
-      set(CPM_ARGS_GIT_TAG v${CPM_ARGS_VERSION})
-    endif()
-
-    # If a name wasn't provided, try to infer it from the git repo
-    if(NOT DEFINED CPM_ARGS_NAME)
-      cpm_package_name_from_git_uri(${CPM_ARGS_GIT_REPOSITORY} CPM_ARGS_NAME)
-    endif()
-  endif()
-
-  set(CPM_SKIP_FETCH FALSE)
-
-  if(DEFINED CPM_ARGS_GIT_TAG)
-    list(APPEND CPM_ARGS_UNPARSED_ARGUMENTS GIT_TAG ${CPM_ARGS_GIT_TAG})
-    # If GIT_SHALLOW is explicitly specified, honor the value.
-    if(DEFINED CPM_ARGS_GIT_SHALLOW)
-      list(APPEND CPM_ARGS_UNPARSED_ARGUMENTS GIT_SHALLOW ${CPM_ARGS_GIT_SHALLOW})
-    endif()
-  endif()
-
-  if(DEFINED CPM_ARGS_URL)
-    # If a name or version aren't provided, try to infer them from the URL
-    list(GET CPM_ARGS_URL 0 firstUrl)
-    cpm_package_name_and_ver_from_url(${firstUrl} nameFromUrl verFromUrl)
-    # If we fail to obtain name and version from the first URL, we could try other URLs if any.
-    # However multiple URLs are expected to be quite rare, so for now we won't bother.
-
-    # If the caller provided their own name and version, they trump the inferred ones.
-    if(NOT DEFINED CPM_ARGS_NAME)
-      set(CPM_ARGS_NAME ${nameFromUrl})
-    endif()
-    if(NOT DEFINED CPM_ARGS_VERSION)
-      set(CPM_ARGS_VERSION ${verFromUrl})
-    endif()
-
-    list(APPEND CPM_ARGS_UNPARSED_ARGUMENTS URL "${CPM_ARGS_URL}")
-  endif()
-
-  # Check for required arguments
-
-  if(NOT DEFINED CPM_ARGS_NAME)
-    message(
-      FATAL_ERROR
-        "CPM: 'NAME' was not provided and couldn't be automatically inferred for package added with arguments: '${ARGN}'"
-    )
-  endif()
-
-  # Check if package has been added before
-  cpm_check_if_package_already_added(${CPM_ARGS_NAME} "${CPM_ARGS_VERSION}")
-  if(CPM_PACKAGE_ALREADY_ADDED)
-    cpm_export_variables(${CPM_ARGS_NAME})
-    return()
-  endif()
-
-  # Check for manual overrides
-  if(NOT CPM_ARGS_FORCE AND NOT "${CPM_${CPM_ARGS_NAME}_SOURCE}" STREQUAL "")
-    set(PACKAGE_SOURCE ${CPM_${CPM_ARGS_NAME}_SOURCE})
-    set(CPM_${CPM_ARGS_NAME}_SOURCE "")
-    CPMAddPackage(
-      NAME ${CPM_ARGS_NAME}
-      SOURCE_DIR ${PACKAGE_SOURCE}
-      FORCE True
-      OPTIONS ${CPM_ARGS_OPTIONS}
-    )
-    cpm_export_variables(${CPM_ARGS_NAME})
-    return()
-  endif()
-
-  # Check for available declaration
-  if(NOT CPM_ARGS_FORCE AND NOT "${CPM_DECLARATION_${CPM_ARGS_NAME}}" STREQUAL "")
-    set(declaration ${CPM_DECLARATION_${CPM_ARGS_NAME}})
-    set(CPM_DECLARATION_${CPM_ARGS_NAME} "")
-    CPMAddPackage(${declaration})
-    cpm_export_variables(${CPM_ARGS_NAME})
-    # checking again to ensure version and option compatibility
-    cpm_check_if_package_already_added(${CPM_ARGS_NAME} "${CPM_ARGS_VERSION}")
-    return()
-  endif()
-
-  if(CPM_USE_LOCAL_PACKAGES OR CPM_LOCAL_PACKAGES_ONLY)
-    cpm_find_package(${CPM_ARGS_NAME} "${CPM_ARGS_VERSION}" ${CPM_ARGS_FIND_PACKAGE_ARGUMENTS})
-
-    if(CPM_PACKAGE_FOUND)
-      cpm_export_variables(${CPM_ARGS_NAME})
-      return()
-    endif()
-
-    if(CPM_LOCAL_PACKAGES_ONLY)
-      message(
-        SEND_ERROR
-          "CPM: ${CPM_ARGS_NAME} not found via find_package(${CPM_ARGS_NAME} ${CPM_ARGS_VERSION})"
-      )
-    endif()
-  endif()
-
-  CPMRegisterPackage("${CPM_ARGS_NAME}" "${CPM_ARGS_VERSION}")
-
-  if(DEFINED CPM_ARGS_GIT_TAG)
-    set(PACKAGE_INFO "${CPM_ARGS_GIT_TAG}")
-  elseif(DEFINED CPM_ARGS_SOURCE_DIR)
-    set(PACKAGE_INFO "${CPM_ARGS_SOURCE_DIR}")
-  else()
-    set(PACKAGE_INFO "${CPM_ARGS_VERSION}")
-  endif()
-
-  if(DEFINED CPM_ARGS_DOWNLOAD_COMMAND)
-    list(APPEND CPM_ARGS_UNPARSED_ARGUMENTS DOWNLOAD_COMMAND ${CPM_ARGS_DOWNLOAD_COMMAND})
-  elseif(DEFINED CPM_ARGS_SOURCE_DIR)
-    list(APPEND CPM_ARGS_UNPARSED_ARGUMENTS SOURCE_DIR ${CPM_ARGS_SOURCE_DIR})
-  elseif(CPM_SOURCE_CACHE AND NOT CPM_ARGS_NO_CACHE)
-    string(TOLOWER ${CPM_ARGS_NAME} lower_case_name)
-    set(origin_parameters ${CPM_ARGS_UNPARSED_ARGUMENTS})
-    list(SORT origin_parameters)
-    string(SHA1 origin_hash "${origin_parameters}")
-    set(download_directory ${CPM_SOURCE_CACHE}/${lower_case_name}/${origin_hash})
-    list(APPEND CPM_ARGS_UNPARSED_ARGUMENTS SOURCE_DIR ${download_directory})
-    if(EXISTS ${download_directory})
-      # avoid FetchContent modules to improve performance
-      set(${CPM_ARGS_NAME}_BINARY_DIR ${CMAKE_BINARY_DIR}/_deps/${lower_case_name}-build)
-      set(${CPM_ARGS_NAME}_ADDED YES)
-      set(${CPM_ARGS_NAME}_SOURCE_DIR ${download_directory})
-      cpm_add_subdirectory(
-        "${CPM_ARGS_NAME}" "${DOWNLOAD_ONLY}"
-        "${${CPM_ARGS_NAME}_SOURCE_DIR}/${CPM_ARGS_SOURCE_SUBDIR}" "${${CPM_ARGS_NAME}_BINARY_DIR}"
-        "${CPM_ARGS_EXCLUDE_FROM_ALL}" "${CPM_ARGS_OPTIONS}"
-      )
-      set(CPM_SKIP_FETCH TRUE)
-      set(PACKAGE_INFO "${PACKAGE_INFO} at ${download_directory}")
-    else()
-      # Enable shallow clone when GIT_TAG is not a commit hash. Our guess may not be accurate, but
-      # it should guarantee no commit hash get mis-detected.
-      if(NOT DEFINED CPM_ARGS_GIT_SHALLOW)
-        cpm_is_git_tag_commit_hash("${CPM_ARGS_GIT_TAG}" IS_HASH)
-        if(NOT ${IS_HASH})
-          list(APPEND CPM_ARGS_UNPARSED_ARGUMENTS GIT_SHALLOW TRUE)
-        endif()
-      endif()
-
-      # remove timestamps so CMake will re-download the dependency
-      file(REMOVE_RECURSE ${CMAKE_BINARY_DIR}/_deps/${lower_case_name}-subbuild)
-      set(PACKAGE_INFO "${PACKAGE_INFO} to ${download_directory}")
-    endif()
-  endif()
-
-  cpm_create_module_file(${CPM_ARGS_NAME} "CPMAddPackage(${ARGN})")
-
-  if(CPM_PACKAGE_LOCK_ENABLED)
-    if((CPM_ARGS_VERSION AND NOT CPM_ARGS_SOURCE_DIR) OR CPM_INCLUDE_ALL_IN_PACKAGE_LOCK)
-      cpm_add_to_package_lock(${CPM_ARGS_NAME} "${ARGN}")
-    elseif(CPM_ARGS_SOURCE_DIR)
-      cpm_add_comment_to_package_lock(${CPM_ARGS_NAME} "local directory")
-    else()
-      cpm_add_comment_to_package_lock(${CPM_ARGS_NAME} "${ARGN}")
-    endif()
-  endif()
-
-  message(
-    STATUS "${CPM_INDENT} adding package ${CPM_ARGS_NAME}@${CPM_ARGS_VERSION} (${PACKAGE_INFO})"
-  )
-
-  if(NOT CPM_SKIP_FETCH)
-    cpm_declare_fetch(
-      "${CPM_ARGS_NAME}" "${CPM_ARGS_VERSION}" "${PACKAGE_INFO}" "${CPM_ARGS_UNPARSED_ARGUMENTS}"
-    )
-    cpm_fetch_package("${CPM_ARGS_NAME}")
-    cpm_add_subdirectory(
-      "${CPM_ARGS_NAME}" "${DOWNLOAD_ONLY}"
-      "${${CPM_ARGS_NAME}_SOURCE_DIR}/${CPM_ARGS_SOURCE_SUBDIR}" "${${CPM_ARGS_NAME}_BINARY_DIR}"
-      "${CPM_ARGS_EXCLUDE_FROM_ALL}" "${CPM_ARGS_OPTIONS}"
-    )
-    cpm_get_fetch_properties("${CPM_ARGS_NAME}")
-  endif()
-
-  set(${CPM_ARGS_NAME}_ADDED YES)
-  cpm_export_variables("${CPM_ARGS_NAME}")
-endfunction()
-
-# Fetch a previously declared package
-macro(CPMGetPackage Name)
-  if(DEFINED "CPM_DECLARATION_${Name}")
-    CPMAddPackage(NAME ${Name})
-  else()
-    message(SEND_ERROR "Cannot retrieve package ${Name}: no declaration available")
-  endif()
-endmacro()
-
-# export variables available to the caller to the parent scope expects ${CPM_ARGS_NAME} to be set
-macro(cpm_export_variables name)
-  set(${name}_SOURCE_DIR
-      "${${name}_SOURCE_DIR}"
-      PARENT_SCOPE
-  )
-  set(${name}_BINARY_DIR
-      "${${name}_BINARY_DIR}"
-      PARENT_SCOPE
-  )
-  set(${name}_ADDED
-      "${${name}_ADDED}"
-      PARENT_SCOPE
-  )
-endmacro()
-
-# declares a package, so that any call to CPMAddPackage for the package name will use these
-# arguments instead. Previous declarations will not be overriden.
-macro(CPMDeclarePackage Name)
-  if(NOT DEFINED "CPM_DECLARATION_${Name}")
-    set("CPM_DECLARATION_${Name}" "${ARGN}")
-  endif()
-endmacro()
-
-function(cpm_add_to_package_lock Name)
-  if(NOT CPM_DONT_CREATE_PACKAGE_LOCK)
-    cpm_prettify_package_arguments(PRETTY_ARGN false ${ARGN})
-    file(APPEND ${CPM_PACKAGE_LOCK_FILE} "# ${Name}\nCPMDeclarePackage(${Name}\n${PRETTY_ARGN})\n")
-  endif()
-endfunction()
-
-function(cpm_add_comment_to_package_lock Name)
-  if(NOT CPM_DONT_CREATE_PACKAGE_LOCK)
-    cpm_prettify_package_arguments(PRETTY_ARGN true ${ARGN})
-    file(APPEND ${CPM_PACKAGE_LOCK_FILE}
-         "# ${Name} (unversioned)\n# CPMDeclarePackage(${Name}\n${PRETTY_ARGN}#)\n"
-    )
-  endif()
-endfunction()
-
-# includes the package lock file if it exists and creates a target `cpm-write-package-lock` to
-# update it
-macro(CPMUsePackageLock file)
-  if(NOT CPM_DONT_CREATE_PACKAGE_LOCK)
-    get_filename_component(CPM_ABSOLUTE_PACKAGE_LOCK_PATH ${file} ABSOLUTE)
-    if(EXISTS ${CPM_ABSOLUTE_PACKAGE_LOCK_PATH})
-      include(${CPM_ABSOLUTE_PACKAGE_LOCK_PATH})
-    endif()
-    if(NOT TARGET cpm-update-package-lock)
-      add_custom_target(
-        cpm-update-package-lock COMMAND ${CMAKE_COMMAND} -E copy ${CPM_PACKAGE_LOCK_FILE}
-                                        ${CPM_ABSOLUTE_PACKAGE_LOCK_PATH}
-      )
-    endif()
-    set(CPM_PACKAGE_LOCK_ENABLED true)
-  endif()
-endmacro()
-
-# registers a package that has been added to CPM
-function(CPMRegisterPackage PACKAGE VERSION)
-  list(APPEND CPM_PACKAGES ${PACKAGE})
-  set(CPM_PACKAGES
-      ${CPM_PACKAGES}
-      CACHE INTERNAL ""
-  )
-  set("CPM_PACKAGE_${PACKAGE}_VERSION"
-      ${VERSION}
-      CACHE INTERNAL ""
-  )
-endfunction()
-
-# retrieve the current version of the package to ${OUTPUT}
-function(CPMGetPackageVersion PACKAGE OUTPUT)
-  set(${OUTPUT}
-      "${CPM_PACKAGE_${PACKAGE}_VERSION}"
-      PARENT_SCOPE
-  )
-endfunction()
-
-# declares a package in FetchContent_Declare
-function(cpm_declare_fetch PACKAGE VERSION INFO)
-  if(${CPM_DRY_RUN})
-    message(STATUS "${CPM_INDENT} package not declared (dry run)")
-    return()
-  endif()
-
-  FetchContent_Declare(${PACKAGE} ${ARGN})
-endfunction()
-
-# returns properties for a package previously defined by cpm_declare_fetch
-function(cpm_get_fetch_properties PACKAGE)
-  if(${CPM_DRY_RUN})
-    return()
-  endif()
-  FetchContent_GetProperties(${PACKAGE})
-  string(TOLOWER ${PACKAGE} lpackage)
-  set(${PACKAGE}_SOURCE_DIR
-      "${${lpackage}_SOURCE_DIR}"
-      PARENT_SCOPE
-  )
-  set(${PACKAGE}_BINARY_DIR
-      "${${lpackage}_BINARY_DIR}"
-      PARENT_SCOPE
-  )
-endfunction()
-
-# adds a package as a subdirectory if viable, according to provided options
-function(
-  cpm_add_subdirectory
-  PACKAGE
-  DOWNLOAD_ONLY
-  SOURCE_DIR
-  BINARY_DIR
-  EXCLUDE
-  OPTIONS
-)
-  if(NOT DOWNLOAD_ONLY AND EXISTS ${SOURCE_DIR}/CMakeLists.txt)
-    if(EXCLUDE)
-      set(addSubdirectoryExtraArgs EXCLUDE_FROM_ALL)
-    else()
-      set(addSubdirectoryExtraArgs "")
-    endif()
-    if(OPTIONS)
-      # the policy allows us to change options without caching
-      cmake_policy(SET CMP0077 NEW)
-      set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
-
-      foreach(OPTION ${OPTIONS})
-        cpm_parse_option(${OPTION})
-        set(${OPTION_KEY} ${OPTION_VALUE})
-      endforeach()
-    endif()
-    set(CPM_OLD_INDENT "${CPM_INDENT}")
-    set(CPM_INDENT "${CPM_INDENT} ${PACKAGE}:")
-    add_subdirectory(${SOURCE_DIR} ${BINARY_DIR} ${addSubdirectoryExtraArgs})
-    set(CPM_INDENT "${CPM_OLD_INDENT}")
-  endif()
-endfunction()
-
-# downloads a previously declared package via FetchContent and exports the variables
-# `${PACKAGE}_SOURCE_DIR` and `${PACKAGE}_BINARY_DIR` to the parent scope
-function(cpm_fetch_package PACKAGE)
-  if(${CPM_DRY_RUN})
-    message(STATUS "${CPM_INDENT} package ${PACKAGE} not fetched (dry run)")
-    return()
-  endif()
-
-  FetchContent_GetProperties(${PACKAGE})
-
-  if(NOT ${lower_case_name}_POPULATED)
-    FetchContent_Populate(${PACKAGE})
-  endif()
-
-  string(TOLOWER "${PACKAGE}" lower_case_name)
-  set(${PACKAGE}_SOURCE_DIR
-      ${${lower_case_name}_SOURCE_DIR}
-      PARENT_SCOPE
-  )
-  set(${PACKAGE}_BINARY_DIR
-      ${${lower_case_name}_BINARY_DIR}
-      PARENT_SCOPE
-  )
-endfunction()
-
-# splits a package option
-function(cpm_parse_option OPTION)
-  string(REGEX MATCH "^[^ ]+" OPTION_KEY ${OPTION})
-  string(LENGTH ${OPTION} OPTION_LENGTH)
-  string(LENGTH ${OPTION_KEY} OPTION_KEY_LENGTH)
-  if(OPTION_KEY_LENGTH STREQUAL OPTION_LENGTH)
-    # no value for key provided, assume user wants to set option to "ON"
-    set(OPTION_VALUE "ON")
-  else()
-    math(EXPR OPTION_KEY_LENGTH "${OPTION_KEY_LENGTH}+1")
-    string(SUBSTRING ${OPTION} "${OPTION_KEY_LENGTH}" "-1" OPTION_VALUE)
-  endif()
-  set(OPTION_KEY
-      "${OPTION_KEY}"
-      PARENT_SCOPE
-  )
-  set(OPTION_VALUE
-      "${OPTION_VALUE}"
-      PARENT_SCOPE
-  )
-endfunction()
-
-# guesses the package version from a git tag
-function(cpm_get_version_from_git_tag GIT_TAG RESULT)
-  string(LENGTH ${GIT_TAG} length)
-  if(length EQUAL 40)
-    # GIT_TAG is probably a git hash
-    set(${RESULT}
-        0
-        PARENT_SCOPE
-    )
-  else()
-    string(REGEX MATCH "v?([0123456789.]*).*" _ ${GIT_TAG})
-    set(${RESULT}
-        ${CMAKE_MATCH_1}
-        PARENT_SCOPE
-    )
-  endif()
-endfunction()
-
-# guesses if the git tag is a commit hash or an actual tag or a branch nane.
-function(cpm_is_git_tag_commit_hash GIT_TAG RESULT)
-  string(LENGTH "${GIT_TAG}" length)
-  # full hash has 40 characters, and short hash has at least 7 characters.
-  if(length LESS 7 OR length GREATER 40)
-    set(${RESULT}
-        0
-        PARENT_SCOPE
-    )
-  else()
-    if(${GIT_TAG} MATCHES "^[a-fA-F0-9]+$")
-      set(${RESULT}
-          1
-          PARENT_SCOPE
-      )
-    else()
-      set(${RESULT}
-          0
-          PARENT_SCOPE
-      )
-    endif()
-  endif()
-endfunction()
-
-function(cpm_prettify_package_arguments OUT_VAR IS_IN_COMMENT)
-  set(oneValueArgs
-      NAME
-      FORCE
-      VERSION
-      GIT_TAG
-      DOWNLOAD_ONLY
-      GITHUB_REPOSITORY
-      GITLAB_REPOSITORY
-      GIT_REPOSITORY
-      SOURCE_DIR
-      DOWNLOAD_COMMAND
-      FIND_PACKAGE_ARGUMENTS
-      NO_CACHE
-      GIT_SHALLOW
-  )
-  set(multiValueArgs OPTIONS)
-  cmake_parse_arguments(CPM_ARGS "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-
-  foreach(oneArgName ${oneValueArgs})
-    if(DEFINED CPM_ARGS_${oneArgName})
-      if(${IS_IN_COMMENT})
-        string(APPEND PRETTY_OUT_VAR "#")
-      endif()
-      if(${oneArgName} STREQUAL "SOURCE_DIR")
-        string(REPLACE ${CMAKE_SOURCE_DIR} "\${CMAKE_SOURCE_DIR}" CPM_ARGS_${oneArgName}
-                       ${CPM_ARGS_${oneArgName}}
-        )
-      endif()
-      string(APPEND PRETTY_OUT_VAR "  ${oneArgName} ${CPM_ARGS_${oneArgName}}\n")
-    endif()
-  endforeach()
-  foreach(multiArgName ${multiValueArgs})
-    if(DEFINED CPM_ARGS_${multiArgName})
-      if(${IS_IN_COMMENT})
-        string(APPEND PRETTY_OUT_VAR "#")
-      endif()
-      string(APPEND PRETTY_OUT_VAR "  ${multiArgName}\n")
-      foreach(singleOption ${CPM_ARGS_${multiArgName}})
-        if(${IS_IN_COMMENT})
-          string(APPEND PRETTY_OUT_VAR "#")
-        endif()
-        string(APPEND PRETTY_OUT_VAR "    \"${singleOption}\"\n")
-      endforeach()
-    endif()
-  endforeach()
-
-  if(NOT "${CPM_ARGS_UNPARSED_ARGUMENTS}" STREQUAL "")
-    if(${IS_IN_COMMENT})
-      string(APPEND PRETTY_OUT_VAR "#")
-    endif()
-    string(APPEND PRETTY_OUT_VAR " ")
-    foreach(CPM_ARGS_UNPARSED_ARGUMENT ${CPM_ARGS_UNPARSED_ARGUMENTS})
-      string(APPEND PRETTY_OUT_VAR " ${CPM_ARGS_UNPARSED_ARGUMENT}")
-    endforeach()
-    string(APPEND PRETTY_OUT_VAR "\n")
-  endif()
-
-  set(${OUT_VAR}
-      ${PRETTY_OUT_VAR}
-      PARENT_SCOPE
-  )
-
-endfunction()


Changed CMake to work for older and newer versions of OSX

--- indra/cmake/Variables.cmake
+++ indra/cmake/Variables.cmake
@@ -99,10 +99,21 @@
 if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
   set(DARWIN 1)

+  execute_process(
+	COMMAND sh -c "sw_vers -productVersion | cut -d'.' -f1-2"
+	OUTPUT_VARIABLE DARWIN_VERSION )
+
   # To support a different SDK update these Xcode settings:
-  set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
-  set(CMAKE_OSX_SYSROOT macosx10.6)
-  set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
+  if (DARWIN_VERSION GREATER 10.6)
+  	set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
+	set(CMAKE_OSX_SYSROOT macosx10.6)
+	set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
+  else (DARWIN_VERSION GREATER 10.6)
+  	set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
+    set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
+  	set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "4.0")
+  endif (DARWIN_VERSION GREATER 10.6)
+
   set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym)

   # NOTE: To attempt an i386/PPC Universal build, add this on the configure line:


Move to line 47.

Move to line 47.

--- SetFlags.cmake
+++ SetFlags.cmake
@@ -45,6 +45,7 @@
 			set(CMAKE_CXX_FLAGS         "${CMAKE_CXX_FLAGS}         -std=c++11")
 			set(CMAKE_CXX_FLAGS_DEBUG   "${CMAKE_CXX_FLAGS_DEBUG}   -std=c++11")
 			set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++11")
+			add_flags_cxx("-stdlib=libc++")
 		else()
 			add_flags_cxx("-pthread")
 		endif()
@@ -188,9 +189,6 @@
 		add_flags_cxx("-ffast-math")

 		if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-			if (APPLE)
-				add_flags_cxx("-stdlib=libc++")
-			endif()
 			# clang does not provide the __extern_always_inline macro and a part of libm depends on this when using fast-math
 			add_flags_cxx("-D__extern_always_inline=inline")
 			add_flags_cxx("-Werror -Weverything -Wno-c++98-compat-pedantic -Wno-string-conversion")


disable STIR HDF5 support by default

disable STIR HDF5 support by default

--- SuperBuild/External_STIR.cmake
+++ SuperBuild/External_STIR.cmake
@@ -50,7 +50,7 @@
   option(STIR_BUILD_SWIG_PYTHON "Build STIR Python interface" ${default_STIR_BUILD_SWIG_PYTHON})
   option(STIR_DISABLE_CERN_ROOT "Disable STIR ROOT interface" ON)
   option(STIR_DISABLE_LLN_MATRIX "Disable STIR Louvain-la-Neuve Matrix library for ECAT7 support" ON)
-  option(STIR_DISABLE_HDF5_SUPPORT "Disable STIR use of HDF5 libraries" OFF)
+  option(STIR_DISABLE_HDF5_SUPPORT "Disable STIR use of HDF5 libraries" ON)
   option(STIR_ENABLE_EXPERIMENTAL "Enable STIR experimental code" OFF)

   mark_as_advanced(BUILD_STIR_EXECUTABLES BUILD_STIR_SWIG_PYTHON STIR_DISABLE_CERN_ROOT)


Fix issues with building external projects.

The supplied external project was not built in some cases, where the
superbuild system thought the target is up-to-date. Issue a build "all"
in an additionally supplied directory instead.

--- CMake/MITKDashboardDriverScript.cmake
+++ CMake/MITKDashboardDriverScript.cmake
@@ -287,24 +287,29 @@

         string(REPLACE "^^" ";" external_project_with_build_dir_list "${external_project_with_build_dir}")
         list(GET external_project_with_build_dir_list 0 external_project)
-        list(GET external_project_with_build_dir_list 1 external_project_build_dir)
+        list(GET external_project_with_build_dir_list 1 external_project_test_dir)
+        list(GET external_project_with_build_dir_list 2 external_project_build_dir)
+
+        if (NOT external_project_build_dir)
+          set(external_project_build_dir ${external_project_test_dir})
+        endif()

         set_property(GLOBAL PROPERTY SubProject ${external_project})
         set_property(GLOBAL PROPERTY Label ${external_project})

         message("----------- [ Build ${external_project} ] -----------")

-        # Build target
-        func_build_target(${external_project} "${CTEST_BINARY_DIRECTORY}")
+        # Build the "all" target for the external project
+        func_build_target("" "${CTEST_BINARY_DIRECTORY}/${external_project_build_dir}")

         # HACK Unfortunately ctest_coverage ignores the build argument, try to force it...
-        file(READ "${CTEST_BINARY_DIRECTORY}/${external_project_build_dir}/CMakeFiles/TargetDirectories.txt" mitk_build_coverage_dirs)
+        file(READ "${CTEST_BINARY_DIRECTORY}/${external_project_test_dir}/CMakeFiles/TargetDirectories.txt" mitk_build_coverage_dirs)
         file(APPEND "${CTEST_BINARY_DIRECTORY}/CMakeFiles/TargetDirectories.txt" "${mitk_build_coverage_dirs}")

         message("----------- [ Test ${external_project} ] -----------")

         # runs only tests that have a LABELS property matching "${external_project}"
-        func_test(${external_project} "${CTEST_BINARY_DIRECTORY}/${external_project_build_dir}")
+        func_test(${external_project} "${CTEST_BINARY_DIRECTORY}/${external_project_test_dir}")

         # restore old coverage dirs
         file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeFiles/TargetDirectories.txt" "${old_coverage_dirs}")


Fixed wrong CMake variable name

Fixed wrong CMake variable name

--- CMake/MITKDashboardDriverScript.cmake
+++ CMake/MITKDashboardDriverScript.cmake
@@ -180,7 +180,7 @@
 CMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION}
 QT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
 WITH_COVERAGE:BOOL=${WITH_COVERAGE}
-${INITIAL_CMAKECACHE_OPTION}
+${INITIAL_CMAKECACHE_OPTIONS}
 ")
   endif()


Examples: print including HunterGate file

--- examples/common.cmake
+++ examples/common.cmake
@@ -7,6 +7,7 @@
 set(gate_dir "${CMAKE_CURRENT_LIST_DIR}/../gate")
 set(gate_module "${gate_dir}/cmake/HunterGate.cmake")

+get_filename_component(gate_module "${gate_module}" ABSOLUTE)
 if(NOT EXISTS "${gate_module}")
   message(
       FATAL_ERROR
@@ -14,6 +15,7 @@
   )
 endif()

+message("Including HunterGate: ${gate_module}")
 include("${gate_module}")

 ### Check testing variables are set


Use a known ParaView ref, and optionally use master

ParaView changes can impact tomviz, we need to decouple a little so
that we can choose when to push ParaView forward. Right now the biggest
issue is OpenGL2 rendering backend, and API changes that can affect
development.

--- versions.cmake
+++ versions.cmake
@@ -62,9 +62,17 @@
   URL "http://download.qt-project.org/archive/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz"
   URL_MD5 2edbe4d6c2eff33ef91732602f3518eb)

+# Default to build from a known ParaView revision
+option(USE_PARAVIEW_MASTER "Use ParaView master instead of known ref" OFF)
+if(USE_PARAVIEW_MASTER)
+  set(_paraview_revision "master")
+else()
+  # Test the revision with OpenGL2 rendering before updating, update often!
+  set(_paraview_revision "28dfcd039338a2d369672cae51a9ecfc6fbd8ff3")
+endif()
 add_revision(paraview
-  GIT_REPOSITORY https://gitlab.kitware.com/paraview/paraview.git
-  GIT_TAG master)
+  GIT_REPOSITORY "https://gitlab.kitware.com/paraview/paraview.git"
+  GIT_TAG "${_paraview_revision}")

 option(tomviz_FROM_GIT "If enabled then the repository is fetched from git" ON)
 cmake_dependent_option(tomviz_FROM_SOURCE_DIR OFF


lame: update git repo url

lame: update git repo url

--- packages/lame.cmake
+++ packages/lame.cmake
@@ -1,6 +1,6 @@
 ExternalProject_Add(lame
     DEPENDS gcc
-    GIT_REPOSITORY "git://anonscm.debian.org/pkg-multimedia/lame.git"
+    GIT_REPOSITORY "https://salsa.debian.org/multimedia-team/lame.git"
     UPDATE_COMMAND ""
     PATCH_COMMAND ${DEBPATCH}
     CONFIGURE_COMMAND ${EXEC} <SOURCE_DIR>/configure


iOS: Fix bitcode feature

iOS: Fix bitcode feature

[skip ci]

--- flags/bitcode.cmake
+++ flags/bitcode.cmake
@@ -7,6 +7,12 @@
   set(POLLY_FLAGS_BITCODE_ 1)
 endif()

-set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE YES)
+include(polly_add_cache_flag)

-list(APPEND HUNTER_TOOLCHAIN_UNDETECTABLE_ID "bitcode")
+polly_add_cache_flag(CMAKE_CXX_FLAGS "-fembed-bitcode")
+
+# We can't use 'ENABLE_BITCODE' because
+# it only adds '-fembed-bitcode-marker':
+# * https://stackoverflow.com/a/31346742
+
+list(APPEND HUNTER_TOOLCHAIN_UNDETECTABLE_ID "bitcode.2")


rm unused refs

rm unused refs

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -17,10 +17,6 @@
 set(pcl_dep_url https://svn.csail.mit.edu/drc/trunk/software/externals/pcl_dep)
 set(pcl_dep_revision 8337)
 set(pcl_dep_depends)
-
-set(pcl_drc_url https://svn.csail.mit.edu/drc/trunk/software/externals/pcl_drc)
-set(pcl_drc_revision 8326)
-set(pcl_drc_depends Eigen_pod pcl_dep)

 set(pcl_url http://github.com/pointcloudlibrary/pcl.git)
 set(pcl_revision pcl-1.7.1)
@@ -48,22 +44,6 @@
 set(frsm_revision bbf1d83023ae35ecf595c93e46b8601206be9e9b)
 set(frsm_depends libbot-drc)

-set(jpeg-utils_url https://svn.csail.mit.edu/drc/trunk/software/externals/jpeg-utils)
-set(jpeg-utils_revision 8298)
-set(jpeg-utils_depends)
-
-set(isam_include_url https://svn.csail.mit.edu/drc/trunk/software/externals/isam_include)
-set(isam_include_revision 8298)
-set(isam_include_depends)
-
-set(visualization_url https://svn.csail.mit.edu/drc/trunk/software/externals/visualization)
-set(visualization_revision 8321)
-set(visualization_depends isam_include Eigen_pod libbot-drc)
-
-set(velodyne_url https://svn.csail.mit.edu/rrg_pods/drivers/velodyne)
-set(velodyne_revision 852)
-set(velodyne_depends common_utils)
-
 set(kinect_url https://svn.csail.mit.edu/rrg_pods/drivers/kinect)
 set(kinect_revision 964)
 set(kinect_depends libbot-drc)
@@ -87,18 +67,6 @@
 set(vicon_url https://svn.csail.mit.edu/rrg_pods/drivers/vicon)
 set(vicon_revision 855)
 set(vicon_depends libbot-drc)
-
-set(vicon-drc_url https://svn.csail.mit.edu/drc/trunk/software/externals/vicon-drc)
-set(vicon-drc_revision 8298)
-set(vicon-drc_depends)
-
-set(camunits-wrapper_url https://svn.csail.mit.edu/rrg_pods/camunits-pods/camunits-wrapper)
-set(camunits-wrapper_revision 887)
-set(camunits-wrapper_depends)
-
-set(camunits-extra-wrapper_url https://svn.csail.mit.edu/rrg_pods/camunits-pods/camunits-extra-wrapper)
-set(camunits-extra-wrapper_revision 887)
-set(camunits-extra-wrapper_depends camunits-wrapper)

 set(apriltags_url https://github.com/psiorx/apriltags-pod.git)
 set(apriltags_revision ed2972f01e00d9b5a4afa2612b018374d889641f)
@@ -124,10 +92,6 @@
 set(mosek_url ssh://git@github.com/RobotLocomotion/mosek.git)
 set(mosek_revision 8e93c8a)
 set(mosek_depends)
-
-set(flycapture_url https://svn.csail.mit.edu/drc/trunk/software/externals/flycapture)
-set(flycapture_revision 8298)
-set(flycapture_depends)

 set(pypolyhedron_url ssh://git@github.com/rdeits/pypolyhedron.git)
 set(pypolyhedron_revision 1f110addf89398f62644830bf69a69930db8c4d0)
@@ -165,20 +129,12 @@
   occ-map
   common_utils
   frsm
-  #jpeg-utils
-  #isam_include
-  #visualization
-  #velodyne
   kinect
   microstrain_comm
   fovis
   estimate-pose
   vicon
-  #vicon-drc
-  #camunits-wrapper
-  #camunits-extra-wrapper
   apriltags
-  #flycapture
   bullet
   spotless
   snopt


Enable debugging by default

Enable debugging by default

--- configure.cmake
+++ configure.cmake
@@ -1,4 +1,4 @@
-set(CMAKE_BUILD_TYPE RELEASE)
+set(CMAKE_BUILD_TYPE DEBUG)

 # Set to TRUE if you wish to use GPU
 set(USE_GPU FALSE)


Cleaned redundant include for cmath and math.h from platform.h.cmake (#317)

git-svn-id: 6c2b1bd10c324c49ea9d9e6e31006a80e70507cb@2871 5242fede-7e19-0410-aef8-94bd7d2200fb

--- include/geos/platform.h.cmake
+++ include/geos/platform.h.cmake
@@ -83,8 +83,12 @@
  */
 #ifdef _MSC_VER
 #define _USE_MATH_DEFINES
-#include <math.h>
+#include <cmath>
+#include <float.h>
+#else
+#include <cmath>
 #endif
+#include <limits>

 #ifndef M_PI
 #define M_PI 3.14159265358979323846
@@ -118,20 +122,15 @@
 #endif

 #if defined(HAVE_STD_ISNAN)
-# include <cmath>
 # define ISNAN(x) (std::isnan)(x)
 #elif defined(HAVE_INLINE_ISNAND_XCODE)
-# include <math.h>
 # define ISNAN(x) __inline_isnand(static_cast<double>(x))
 #elif defined(HAVE_ISNAND_XCODE)
-# include <math.h>
 # define ISNAN(x) __isnand(static_cast<double>(x))
 #elif defined(HAVE_ISNAN)
 # if defined(_MSC_VER)
-#  include <float.h>
 #  define ISNAN(x) _isnan(static_cast<double>(x))
 # else
-#  include <math.h>
 #  define ISNAN(x) isnan(x)
 # endif
 #else
@@ -139,24 +138,20 @@
 #endif

 #if defined(HAVE_STD_ISFINITE)
-# include <cmath>
 # define FINITE(x) (std::isfinite)(x)
 #elif defined(HAVE_ISFINITE)
-# include <math.h>
 # define FINITE(x) isfinite(x)
 #elif defined(HAVE_FINITE)
-# include <float.h>
 # define FINITE(x) _finite(static_cast<double>(x))
 #else
 # error "Could not find finite or isfinite function or macro!"
 #endif

-#include <limits>
-#define DoubleNegInfinity (-(std::numeric_limits<double>::infinity)())
-#define DoubleMax (std::numeric_limits<double>::max)()
-// Defines NaN for Intel platforms
-#define DoubleNotANumber std::numeric_limits<double>::quiet_NaN()
-// Don't forget to define infinities
-#define DoubleInfinity (std::numeric_limits<double>::infinity)()
+#define DoubleNegInfinity (-(std::numeric_limits<double>::infinity)())
+#define DoubleMax (std::numeric_limits<double>::max)()
+// Defines NaN for Intel platforms
+#define DoubleNotANumber std::numeric_limits<double>::quiet_NaN()
+// Don't forget to define infinities
+#define DoubleInfinity (std::numeric_limits<double>::infinity)()

 #endif // GEOS_PLATFORM_H_INCLUDED


[minor] Misc minor improvements

[minor] Misc minor improvements

--- testing/run_tests.sh.cmake
+++ testing/run_tests.sh.cmake
@@ -26,6 +26,7 @@
 WD=$WD/$TIMESTAMP
 ORIGINAL_DIRECTORY=$PWD
 mkdir -p $WD
+ORIGINAL_WD=$(pwd)
 cd $WD

 NUM_SUCCESS_TRANS=0
@@ -99,6 +100,16 @@
     fi
     echo "Testing stopped (some tests are not done)."
     finish
+}
+
+function abs_path()
+{
+    local path=$1
+    if [ $(expr substr $path 1 1) = '/' ]; then
+	echo $path
+    else
+	echo $ORIGINAL_WD/$path
+    fi
 }

 function generate_empty_translation_configuration()
@@ -163,13 +174,18 @@
 	echo -n "" > config.empty
     fi
     configs=$(generate_translation_configurations_cuda "$configs")
-    local overlap='true false'
-    local multistream='true fale'
+    local overlap='false true'
+    local multistream='fale true'
     local new_configs=""
     local idx=0
     for i in $overlap; do
 	for j in $multistream; do
 	    for k in $configs; do
+		# skip configurations with not all options enabled
+		if [ \( $i = 'true' -a $j = 'false' \)  \
+			-o \( $i = 'false' -a $j = 'false' \) ]; then
+		    continue;
+		fi
 		local c=config.mpi-cuda.$idx
 		idx=$(($idx + 1))
 		cat $k > $c
@@ -266,6 +282,8 @@
 	    exit_error "Unsupported target"
 	    ;;
     esac
+
+    sync
 }

 function get_reference_exe_name()
@@ -325,6 +343,8 @@
     local proc_dim=$(echo $proc_dim_list | cut -d, -f$dim)
     local np=$(($(echo $proc_dim | sed 's/x/*/g')))
     echo "[EXECUTE] Run mpi as \"$MPIRUN -np $np $mfile_option $* --physis-proc $proc_dim\"" >&2
+    # make sure compiled binaries are synched to other nodes
+    sleep 30
     $MPIRUN -np $np $mfile_option $* --physis-proc $proc_dim
 }

@@ -449,8 +469,7 @@
 		shift 2
 		;;
 	    --machinefile)
-		MPI_MACHINEFILE=$2
-		echo $MPI_MACHINEFILE
+		MPI_MACHINEFILE=$(abs_path $2)
 		shift 2
 		;;
 	    -q|--quit)
@@ -479,7 +498,7 @@

     echo "Test sources: $(for i in $TESTS; do basename $i; done | xargs)"
     echo "Targets: $TARGETS"
-
+
     for TARGET in $TARGETS; do
 	for TEST in $TESTS; do
 	    SHORTNAME=$(basename $TEST)


cmake: Fix possible issues with librt during configure

Signed-off-by: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@cryptomilk.org>

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -100,11 +100,9 @@
 endif (WIN32)

 find_library(RT_LIBRARY rt)
-if (RT_LIBRARY)
-    set(CMAKE_REQUIRED_LIBRARIES ${RT_LIBRARY})
-endif (RT_LIBRARY)
-
-set(CMOCKA_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CACHE INTERNAL "cmocka required system libraries")
+if (RT_LIBRARY AND NOT LINUX)
+    set(CMOCKA_REQUIRED_LIBRARIES ${RT_LIBRARY} CACHE INTERNAL "cmocka required system libraries")
+endif ()

 # OPTIONS
 check_c_source_compiles("
@@ -124,9 +122,10 @@
 endif(WIN32)

 if (HAVE_TIME_H AND HAVE_STRUCT_TIMESPEC AND HAVE_CLOCK_GETTIME)
-    set(CMAKE_REQUIRED_LIBRARIES ${RT_LIBRARY})
+    if (RT_LIBRARY)
+        set(CMAKE_REQUIRED_LIBRARIES ${RT_LIBRARY})
+    endif()

-    message(STATUS "CMAKE_REQUIRED_INCLUDES=${CMAKE_REQUIRED_INCLUDES} CMAKE_REQUIRED_LIBRARIES=${CMAKE_REQUIRED_LIBRARIES}")
     check_c_source_compiles("
 #include <time.h>

@@ -137,7 +136,10 @@

     return 0;
 }" HAVE_CLOCK_GETTIME_REALTIME)
+
+    # reset cmake requirements
     set(CMAKE_REQUIRED_INCLUDES)
+    set(CMAKE_REQUIRED_LIBRARIES)
 endif ()

 # ENDIAN


BUG: kill git status -s on otb-data shared clone if no response in 20 sec

--- CMake/SourceStatus.cmake
+++ CMake/SourceStatus.cmake
@@ -48,12 +48,16 @@
     WORKING_DIRECTORY ${root_repo_dir}
     OUTPUT_VARIABLE OTB_WC_REVISION
     OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
+
+  message(STATUS "Repository status (${dir_name}) :")
+  message(STATUS "  Repository revision is ${OTB_WC_REVISION}")
+
   execute_process(COMMAND ${GIT_EXECUTABLE} status -s
     WORKING_DIRECTORY ${root_repo_dir}
     OUTPUT_VARIABLE OTB_WC_STATUS
+    TIMEOUT 20
     OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
-  message(STATUS "Repository status (${dir_name}) :")
-  message(STATUS "  Repository revision is ${OTB_WC_REVISION}")
+
   if(OTB_WC_STATUS)
     message(STATUS "  Local file modifications (${dir_name}) :")
     string(REPLACE "\n" "\n--     " OTB_WC_STATUS_PRETTYPRINT "    ${OTB_WC_STATUS}")


COMP: Disabled also mitkSegmentationInterpolationTest temporary (See Bug 13309)

--- Modules/Segmentation/Testing/files.cmake
+++ Modules/Segmentation/Testing/files.cmake
@@ -2,14 +2,14 @@
   mitkContourMapper2DTest.cpp
   mitkContourTest.cpp
   mitkDataNodeSegmentationTest.cpp
-  mitkSegmentationInterpolationTest.cpp
+  #mitkSegmentationInterpolationTest.cpp
   mitkOverwriteSliceFilterTest.cpp
 #  mitkOverwriteSliceFilterObliquePlaneTest.cpp
 )

 set(MODULE_IMAGE_TESTS
   mitkManualSegmentationToSurfaceFilterTest.cpp
-#  mitkOverwriteSliceImageFilterTest.cpp
+  #mitkOverwriteSliceImageFilterTest.cpp
 )
 set(MODULE_CUSTOM_TESTS
 )


enh: Assert that <LANG>_LIBRARY_TARGET is set when used [BASIS]

--- CMake/Basis/ProjectTools.cmake
+++ CMake/Basis/ProjectTools.cmake
@@ -1509,6 +1509,9 @@
                            " Skipping source files matching one of the extensions [${${LANGUAGE}_EXT}].")
         elseif (SOURCE_LANGUAGE MATCHES "${LANGUAGE}")
           set (TARGET_NAME "${${LANGUAGE}_LIBRARY_TARGET}")
+          if (NOT TARGET_NAME)
+            message (FATAL_ERROR "Variable ${LANGUAGE}_LIBRARY_TARGET not set (cf. BasisSettings module)!")
+          endif ()
           basis_add_library (${TARGET_NAME} ${EXPRESSIONS} LANGUAGE ${LANGUAGE})
           basis_set_target_properties (
             ${TARGET_NAME}


Always install the data, not optional in superbuild

--- projects/win32/tomviz.bundle.cmake
+++ projects/win32/tomviz.bundle.cmake
@@ -16,11 +16,9 @@
         DESTINATION "bin"
         COMPONENT ${AppName})

-if(tomviz_data_DIR)
-  install(DIRECTORY "${install_location}/share/"
-          DESTINATION "share"
-          COMPONENT ${AppName})
-endif()
+install(DIRECTORY "${install_location}/share/"
+        DESTINATION "share"
+        COMPONENT ${AppName})

 # install python since (since python dlls are not in the install location)
 if (python_ENABLED AND NOT USE_SYSTEM_python)


BUG: Don't append empty flags to CMAKE_CXX_FLAGS.

--- itkCMakeOptions.cmake
+++ itkCMakeOptions.cmake
@@ -42,16 +42,16 @@
 ENDIF(CMAKE_COMPILER_IS_GNUCXX)

 # force the use of ansi cxx flags (i.e. -LANG:std on sgi )
-IF (CMAKE_ANSI_CXXFLAGS)
-  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}")
-ENDIF (CMAKE_ANSI_CXXFLAGS)
-IF (CMAKE_ANSI_CFLAGS)
-  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
-ENDIF (CMAKE_ANSI_CFLAGS)
+IF (CMAKE_ANSI_CXXFLAGS MATCHES "[^ ]")
+  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}")
+ENDIF (CMAKE_ANSI_CXXFLAGS MATCHES "[^ ]")
+IF (CMAKE_ANSI_CFLAGS MATCHES "[^ ]")
+  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
+ENDIF (CMAKE_ANSI_CFLAGS MATCHES "[^ ]")

-IF(CMAKE_TEMPLATE_FLAGS)
-  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_TEMPLATE_FLAGS}")
-ENDIF(CMAKE_TEMPLATE_FLAGS)
+IF(CMAKE_TEMPLATE_FLAGS MATCHES "[^ ]")
+  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_TEMPLATE_FLAGS}")
+ENDIF(CMAKE_TEMPLATE_FLAGS MATCHES "[^ ]")

 IF(CMAKE_USE_PTHREADS)
     ADD_DEFINITIONS(-D_PTHREADS)


cmake: include find_package_handle_standard_args

The Findpigpio.cmake script doesn't work for me if this is missing (CMake 3.9.4 on Arch Linux ARM).

--- util/Findpigpio.cmake
+++ util/Findpigpio.cmake
@@ -25,6 +25,7 @@

 # Handle REQUIRED, QUIET, and version arguments
 # and set the <packagename>_FOUND variable.
+include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(pigpio
     DEFAULT_MSG
     pigpio_INCLUDE_DIR pigpio_LIBRARY pigpiod_if_LIBRARY pigpiod_if2_LIBRARY)


minor fixes in FindPyCXX check

minor fixes in FindPyCXX check

--- cMake/FindPyCXX.cmake
+++ cMake/FindPyCXX.cmake
@@ -27,13 +27,13 @@
     if(NOT EXISTS "${PYCXX_INCLUDE_DIR}/CXX/Config.hxx")
         if(PyCXX_FIND_REQUIRED)
             MESSAGE(FATAL_ERROR
-	        "PyCXX: could not find CXX/Config.hxx in PYCXX_INCLUDE_DIR "
-		"${PYCXX_INCLUDE_DIR}")
+                "PyCXX: could not find CXX/Config.hxx in PYCXX_INCLUDE_DIR "
+            "${PYCXX_INCLUDE_DIR}")
         else(PyCXX_FIND_REQUIRED)
             MESSAGE(WARNING
-	        "PyCXX: could not find CXX/Config.hxx in PYCXX_INCLUDE_DIR "
-		"${PYCXX_INCLUDE_DIR}")
-	    unset(PYCXX_FOUND)
+                "PyCXX: could not find CXX/Config.hxx in PYCXX_INCLUDE_DIR "
+            "${PYCXX_INCLUDE_DIR}")
+            unset(PYCXX_FOUND)
         endif(PyCXX_FIND_REQUIRED)
     endif(NOT EXISTS "${PYCXX_INCLUDE_DIR}/CXX/Config.hxx")
 else(PYCXX_INCLUDE_DIR)
@@ -44,11 +44,11 @@
     if(NOT PYCXX_INCLUDE_DIR)
         if(PyCXX_FIND_REQUIRED)
             MESSAGE(FATAL_ERROR
-	        "PyCXX not found; please set PYCXX_INCLUDE_DIR to "
-		"the location of CXX/Config.hxx")
+                "PyCXX not found; please set PYCXX_INCLUDE_DIR to "
+                "the location of CXX/Config.hxx")
         else(PyCXX_FIND_REQUIRED)
             MESSAGE(STATUS "PyCXX not found")
-	    unset(PYCXX_FOUND)
+            unset(PYCXX_FOUND)
         endif(PyCXX_FIND_REQUIRED)
     endif(NOT PYCXX_INCLUDE_DIR)
 endif(PYCXX_INCLUDE_DIR)
@@ -58,14 +58,14 @@
     # source directory specified, they'd better be there
     if(NOT EXISTS "${PYCXX_SOURCE_DIR}/cxxextensions.c")
         if(PyCXX_FIND_REQUIRED)
-	    MESSAGE(FATAL_ERROR
-	        "PyCXX: cxxextensions.c not found in PYCXX_INCLUDE_DIR "
-		"${PYCXX_INCLUDE_DIR}")
+            MESSAGE(FATAL_ERROR
+                "PyCXX: cxxextensions.c not found in PYCXX_SOURCE_DIR "
+                "${PYCXX_SOURCE_DIR}")
         else(PyCXX_FIND_REQUIRED)
             MESSAGE(WARNING
-	        "PyCXX: cxxextensions.c not found in PYCXX_INCLUDE_DIR "
-		"${PYCXX_INCLUDE_DIR}")
-	    unset(PYCXX_FOUND)
+                "PyCXX: cxxextensions.c not found in PYCXX_SOURCE_DIR "
+                "${PYCXX_SOURCE_DIR}")
+            unset(PYCXX_FOUND)
         endif(PyCXX_FIND_REQUIRED)
     endif(NOT EXISTS "${PYCXX_SOURCE_DIR}/cxxextensions.c")
 else(PYCXX_SOURCE_DIR)
@@ -79,12 +79,12 @@
         "${CMAKE_CURRENT_LIST_DIR}/../CXX")
     if(NOT PYCXX_SOURCE_DIR)
         if(PyCXX_FIND_REQUIRED)
-	    MESSAGE(FATAL_ERROR
-	        "PyCXX not found; please set PYCXX_SOURCE_DIR to "
-		"the location of cxxextensions.c")
+            MESSAGE(FATAL_ERROR
+                "PyCXX not found; please set PYCXX_SOURCE_DIR to "
+                "the location of cxxextensions.c")
         else(PyCXX_FIND_REQUIRED)
             MESSAGE(STATUS "PyCXX not found")
-	    unset(PYCXX_FOUND)
+            unset(PYCXX_FOUND)
         endif(PyCXX_FIND_REQUIRED)
     endif(NOT PYCXX_SOURCE_DIR)
 endif(PYCXX_SOURCE_DIR)
@@ -97,10 +97,10 @@

     # Build the list of sources for convenience
     set(PYCXX_SOURCES
-	${PYCXX_SOURCE_DIR}/cxxextensions.c
-	${PYCXX_SOURCE_DIR}/cxx_extensions.cxx
-	${PYCXX_SOURCE_DIR}/cxxsupport.cxx
-	${PYCXX_SOURCE_DIR}/IndirectPythonInterface.cxx
+        ${PYCXX_SOURCE_DIR}/cxxextensions.c
+        ${PYCXX_SOURCE_DIR}/cxx_extensions.cxx
+        ${PYCXX_SOURCE_DIR}/cxxsupport.cxx
+        ${PYCXX_SOURCE_DIR}/IndirectPythonInterface.cxx
     )
 else(PYCXX_FOUND)
     MESSAGE(STATUS "PyCXX not found")


BUG: update Shark version for serialization error

--- SuperBuild/CMake/External_shark.cmake
+++ SuperBuild/CMake/External_shark.cmake
@@ -30,8 +30,8 @@

 ExternalProject_Add(SHARK
   PREFIX SHARK
-  URL "https://github.com/Shark-ML/Shark/archive/75eac83266e3713e00af2d1ca1264fc6e44322b8.zip"
-  URL_MD5 bfbdf1fe8e0563dbf8af87da9419dc0f
+  URL "https://github.com/Shark-ML/Shark/archive/a48155fb9ce2f01b33d958ec6a3aaf115f330fbf.zip"
+  URL_MD5 a43fb09673b7a99f83b4bcf88dc5a109
   SOURCE_DIR ${SHARK_SB_SRC}
   BINARY_DIR ${SHARK_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}


[cmake] make CUSTOM_FLAGS string again

[cmake] make CUSTOM_FLAGS string again


Fix cmake build.

Fix cmake build.

PiperOrigin-RevId: 167933991

--- tensorflow/contrib/cmake/tf_python.cmake
+++ tensorflow/contrib/cmake/tf_python.cmake
@@ -834,6 +834,8 @@
     "${tensorflow_source_dir}/tensorflow/python/lib/core/ndarray_tensor_bridge.cc"
     "${tensorflow_source_dir}/tensorflow/python/lib/core/py_func.h"
     "${tensorflow_source_dir}/tensorflow/python/lib/core/py_func.cc"
+    "${tensorflow_source_dir}/tensorflow/python/lib/core/safe_ptr.h"
+    "${tensorflow_source_dir}/tensorflow/python/lib/core/safe_ptr.cc"
     "${tensorflow_source_dir}/tensorflow/python/lib/io/py_record_reader.h"
     "${tensorflow_source_dir}/tensorflow/python/lib/io/py_record_reader.cc"
     "${tensorflow_source_dir}/tensorflow/python/lib/io/py_record_writer.h"


remove some invalid entries (#10294)

remove some invalid entries (#10294)

I noticed that some entries don't exist (anymore).
This seems to be some kind of a consistency issue.

More specifically:
`tensorflow/contrib/ios_examples/camera/data`
`tensorflow/contrib/session_bundle/testdata/saved_model_half_plus_two`
`tensorflow/contrib/session_bundle/testdata/saved_model_half_plus_two/variables`

This is the continuation of PR #10264

--- tensorflow/contrib/cmake/tf_python.cmake
+++ tensorflow/contrib/cmake/tf_python.cmake
@@ -320,7 +320,6 @@
 add_python_module("tensorflow/contrib/ios_examples/benchmark/data")
 add_python_module("tensorflow/contrib/ios_examples/camera")
 add_python_module("tensorflow/contrib/ios_examples/camera/camera_example.xcodeproj")
-add_python_module("tensorflow/contrib/ios_examples/camera/data")
 add_python_module("tensorflow/contrib/ios_examples/camera/en.lproj")
 add_python_module("tensorflow/contrib/ios_examples/simple")
 add_python_module("tensorflow/contrib/ios_examples/simple/data")
@@ -466,8 +465,6 @@
 add_python_module("tensorflow/contrib/session_bundle")
 add_python_module("tensorflow/contrib/session_bundle/example")
 add_python_module("tensorflow/contrib/session_bundle/testdata")
-add_python_module("tensorflow/contrib/session_bundle/testdata/saved_model_half_plus_two")
-add_python_module("tensorflow/contrib/session_bundle/testdata/saved_model_half_plus_two/variables")
 add_python_module("tensorflow/contrib/signal")
 add_python_module("tensorflow/contrib/signal/python")
 add_python_module("tensorflow/contrib/signal/python/ops")


[cmake] as it turned out 'where' command on windows may return multiple results -- need to handle that

--- cmake/axl_utils.cmake
+++ cmake/axl_utils.cmake
@@ -903,7 +903,10 @@
 			OUTPUT_VARIABLE _OUTPUT
 			)

-		string (REPLACE "\\" "/" _OUTPUT "${_OUTPUT}")
+		if (NOT "${_OUTPUT}" STREQUAL "")
+			string (REGEX REPLACE "\n.*" "" _OUTPUT ${_OUTPUT})
+			string (REPLACE "\\" "/" _OUTPUT "${_OUTPUT}")
+		endif ()
 	else ()
 		execute_process (
 			COMMAND which ${_FILE_NAME}


Don't install Nasm

Don't install Nasm

--- cmake/bootstrap.cmake
+++ cmake/bootstrap.cmake
@@ -209,9 +209,7 @@
   set(_package "nasm-${_version}")
   y_download("https://www.nasm.us/pub/nasm/releasebuilds/${_version}/win64/${_package}-win64.zip" SHA1 "149a814fa53980976a7fc081231f59cfbcd02543")
   y_extract("${_package}-win64.zip" DIR ${_package})
-  file(INSTALL
-    ${BUILD_DIR}/${_package}/nasm.exe
-    DESTINATION ${PREFIX_DIR}/bin)
+  set(NASM_EXECUTABLE ${BUILD_DIR}/${_package}/nasm.exe)
 endif()

 if("openal" IN_LIST _y_packages)
@@ -261,7 +259,7 @@
   y_cmake(${_package}
     TARGET "jpeg-static"
     CONFIG ${CONFIGS}
-    OPTIONS -DWITH_CRT_DLL=ON -DWITH_TURBOJPEG=OFF)
+    OPTIONS -DNASM=${NASM_EXECUTABLE} -DWITH_CRT_DLL=ON -DWITH_TURBOJPEG=OFF)
   file(INSTALL
     ${BUILD_DIR}/${_package}/jconfig.h
     ${BUILD_DIR}/${_package}/jerror.h


fix typo where PKG_CONFIG_PATH environment variable was overwritten

--- cmake/dd-macros.cmake
+++ cmake/dd-macros.cmake
@@ -48,7 +48,7 @@
 endmacro()

 macro(setup_pods_pkg_config_path)
-  set(ENV{PKG_CONFIG_PATH} "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}")
+  set(ENV{PKG_CONFIG_PATH} "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}")
 endmacro()

 setup_pods_pkg_config_path()


ENH: Add ITKHeaderTests target.

ENH: Add ITKHeaderTests target.

This target regenerates all the header tests and builds them.  This target is
useful when modifying the headers in modules.

This patch gives more control to the developer.  Four ways for rebuilding the
tests are now possible:

1) make ITKHeaderTests
  - Regenerates and rebuilds all header tests.
2) make ${module_name}HeaderTestClean && make
  - remove a given module's header test and rebuild the tests.
3) make clean && make
  - All the header tests will also be rebuilt in this case.
4) make rebuild_cache && make
  Currently rebuilding CMake cache causes the header tests to be rebuilt.  We
  may want to consider removing this behaviour after the toolkit has stabilized
  on 4.0 release.

Change-Id: I340438dc79819b8c3c1ad9252d4769d533b4515b

--- CMake/ITKModuleHeaderTest.cmake
+++ CMake/ITKModuleHeaderTest.cmake
@@ -11,6 +11,10 @@
 # The maximum number of headers in a test.  (This helps limit memory issues,
 # and the cppcheck tests.)
 set( MAXIMUM_NUMBER_OF_HEADERS 35 )
+
+add_custom_target( ITKHeaderTests
+  ${CMAKE_COMMAND} --build ${ITK_BINARY_DIR}
+  COMMENT "Regenerating and building the header tests." )

 macro( itk_module_headertest _name )
   if( NOT ${_name}_THIRD_PARTY AND
@@ -36,8 +40,13 @@
     # Delete the outputs.  These should be regenerated when the header files
     # move around, but adding the header files to the add_custom_command DEPENDS
     # does not solve the problem.  So, they get nuked at CMake configuration
-    # time.
+    # time for robustness.  Eventually it should show be considered if this
+    # should be removed once the the toolkit stabilizes following the 4.0 release.
     file( REMOVE ${_outputs} )
+
+    add_custom_target( ${_name}HeaderTestClean
+      ${CMAKE_COMMAND} -E remove ${_outputs} )
+    add_dependencies( ITKHeaderTests ${_name}HeaderTestClean )

     set( _test_num 1 )
     foreach( _header_test_src ${_outputs} )


Use absolute output path for MinGW sysroot auto-detection. Credit to matanshukry who reported and fixed this issue. Close #1674. [ci only: master]

--- CMake/Modules/FindDirectX.cmake
+++ CMake/Modules/FindDirectX.cmake
@@ -74,7 +74,7 @@
             if (DEFINED ENV{MINGW_SYSROOT})
                 file (TO_CMAKE_PATH $ENV{MINGW_SYSROOT} MINGW_SYSROOT)
             else ()
-                execute_process (COMMAND ${CMAKE_COMMAND} -E echo "#include <_mingw.h>" COMMAND ${CMAKE_C_COMPILER} -E -M - OUTPUT_FILE find_mingw_sysroot_output ERROR_QUIET)
+                execute_process (COMMAND ${CMAKE_COMMAND} -E echo "#include <_mingw.h>" COMMAND ${CMAKE_C_COMPILER} -E -M - OUTPUT_FILE ${CMAKE_BINARY_DIR}/find_mingw_sysroot_output ERROR_QUIET)
                 file (STRINGS ${CMAKE_BINARY_DIR}/find_mingw_sysroot_output MINGW_SYSROOT REGEX _mingw\\.h)
                 string (REGEX REPLACE "^[^ ]* *(.*)/include.*$" \\1 MINGW_SYSROOT "${MINGW_SYSROOT}")  # Stringify for string replacement
                 string (REPLACE "\\ " " " MINGW_SYSROOT "${MINGW_SYSROOT}")


Use STATUS messages for enabling hints.

Use STATUS messages for enabling hints.

--- CMake/ctkMacroOptionUtils.cmake
+++ CMake/ctkMacroOptionUtils.cmake
@@ -30,7 +30,7 @@
       # Generate user-friendly message
       set(enabling_msg)
       ctk_option_logical_expression_to_message(enabling_msg "${ARGN}")
-      message("Enabling [${option_prefix}_${name}] because of [${enabling_msg}] evaluates to True")
+      message(STATUS "Enabling [${option_prefix}_${name}] because of [${enabling_msg}] evaluates to True")
     endif()
   endif()
 endmacro()


fix syntax

fix syntax

--- CMake/hoomd/HOOMDMPISetup.cmake
+++ CMake/hoomd/HOOMDMPISetup.cmake
@@ -72,7 +72,7 @@
     set_property(TARGET MPI::MPI_C PROPERTY INTERFACE_COMPILE_OPTIONS "${_MPI_C_COMPILE_OPTIONS}")
     unset(_MPI_C_COMPILE_OPTIONS)

-    string(REPLACE "-pthread" "$<$<AND:$<COMPILE_LANGUAGE:CUDA><$<STREQUAL:${HIP_PLATFORM},nvcc>>:-Xcompiler>;-pthread"
+    string(REPLACE "-pthread" "$<$<AND:$<COMPILE_LANGUAGE:CUDA>,$<STREQUAL:${HIP_PLATFORM},nvcc>>:-Xcompiler>;-pthread"
       _MPI_CXX_COMPILE_OPTIONS "${MPI_CXX_COMPILE_OPTIONS}")
     set_property(TARGET MPI::MPI_CXX PROPERTY INTERFACE_COMPILE_OPTIONS "${_MPI_CXX_COMPILE_OPTIONS}")
     message(STATUS "_MPI_CXX_COMPILE_OPTIONS: ${_MPI_CXX_COMPILE_OPTIONS}")


Made FindLibEvent.cmake log the exact lib not found

--- CMakeModules/FindLibevent.cmake
+++ CMakeModules/FindLibevent.cmake
@@ -32,15 +32,21 @@
     )
 endif()

-if (LIBEVENT_LIB AND LIBEVENT_LIB_CORE AND LIBEVENT_LIB_EXTRA)
-    set(LIBEVENT_LIBRARIES ${LIBEVENT_LIB} ${LIBEVENT_LIB_CORE} ${LIBEVENT_LIB_EXTRA})
-    if (NOT WIN32)
-        list(APPEND LIBEVENT_LIBRARIES ${LIBEVENT_LIB_OPENSSL} ${LIBEVENT_LIB_PTHREADS})
-    endif()
-    message(STATUS "libevent libs: ${LIBEVENT_LIBRARIES}")
-else()
-    message(WARNING "libevent libs not found")
+if (NOT LIBEVENT_LIB)
+    message(WARNING "Can't find libevent.a lib")
 endif()
+if (NOT LIBEVENT_LIB_CORE)
+    message(WARNING "Can't find libevent_core lib")
+endif()
+if (NOT LIBEVENT_LIB_EXTRA)
+    message(WARNING "Can't find libevent_extra lib")
+endif()
+
+set(LIBEVENT_LIBRARIES ${LIBEVENT_LIB} ${LIBEVENT_LIB_CORE} ${LIBEVENT_LIB_EXTRA})
+if (NOT WIN32)
+    list(APPEND LIBEVENT_LIBRARIES ${LIBEVENT_LIB_OPENSSL} ${LIBEVENT_LIB_PTHREADS})
+endif()
+message(STATUS "libevent libs: ${LIBEVENT_LIBRARIES}")

 include(FindPackageHandleStandardArgs)
 # handle the QUIETLY and REQUIRED arguments and set LIBEVENT_FOUND to TRUE


CI: try other cmake if condition

CI: try other cmake if condition

--- CI/main_ci.cmake
+++ CI/main_ci.cmake
@@ -29,7 +29,7 @@
 set (CTEST_BUILD_NAME "$ENV{CI_COMMIT_SHORT_SHA}")
 if("$ENV{CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}" AND "$ENV{CI_MERGE_REQUEST_TARGET_BRANCH_NAME}")
   set (CTEST_BUILD_NAME "${CTEST_BUILD_NAME} ($ENV{CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} to $ENV{CI_MERGE_REQUEST_TARGET_BRANCH_NAME})")
-elseif("$ENV{CI_COMMIT_REF_NAME}")
+elseif(CI_COMMIT_REF_NAME)
   set (CTEST_BUILD_NAME "${CTEST_BUILD_NAME} ($ENV{CI_COMMIT_REF_NAME})")
 endif()
 set (CTEST_SITE "${IMAGE_NAME}")


 Do not set mvsc linker flags for clang-cl (fixes #874) (#891)

Co-authored-by: Christian Fersch <40afc335b9b103f42b4977e9790b7d607739449e@gmail.com>

--- absl/copts/AbseilConfigureCopts.cmake
+++ absl/copts/AbseilConfigureCopts.cmake
@@ -41,7 +41,6 @@
     # clang-cl is half MSVC, half LLVM
     set(ABSL_DEFAULT_COPTS "${ABSL_CLANG_CL_FLAGS}")
     set(ABSL_TEST_COPTS "${ABSL_CLANG_CL_FLAGS};${ABSL_CLANG_CL_TEST_FLAGS}")
-    set(ABSL_DEFAULT_LINKOPTS "${ABSL_MSVC_LINKOPTS}")
   else()
     set(ABSL_DEFAULT_COPTS "${ABSL_LLVM_FLAGS}")
     set(ABSL_TEST_COPTS "${ABSL_LLVM_FLAGS};${ABSL_LLVM_TEST_FLAGS}")


Essais dart.

Essais dart.

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -18,6 +18,8 @@
 SET (PROJECT_URL "http://smsc.cnes.fr/PLEIADES/")

 # Dart server configuration
+SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/OrfeotoolboxRollup.cgi}
+
 #SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/insight-rollup-dashboard.sh")
 #SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/orfeotoolbox-rollup-dashboard.sh")
 #SET (CVS_WEB_URL "http://${DROP_SITE}/cgi-bin/viewcvs.cgi/")
@@ -30,7 +32,7 @@
 SET (DOXYGEN_URL "http://${DROP_SITE}/OrfeoToolbox/Doxygen/html/" )

 SET (USE_GNATS "On")
-SET (GNATS_WEB_URL "http://${DROP_SITE}/bugTracker/query.php?projects=6&status%5B%5D=1&status%5B%5D=2&status%5B%5D=3&status%5B%5D=4&status%5B%5D=6&op=doquery")
+SET (GNATS_WEB_URL "http://nemo/bugTracker/query.php?projects=6&status%5B%5D=1&status%5B%5D=2&status%5B%5D=3&status%5B%5D=4&status%5B%5D=6&op=doquery")

 # Continuous email delivery variables
 #SET (CONTINUOUS_FROM "lorensen@crd.ge.com")


Bump rtf patch number

Bump rtf patch number

--- conf/RTFVersion.cmake
+++ conf/RTFVersion.cmake
@@ -9,7 +9,7 @@
 # bumping VERSION_PATCH
 set(RTF_VERSION_MAJOR "1")
 set(RTF_VERSION_MINOR "4")
-set(RTF_VERSION_PATCH "60")
+set(RTF_VERSION_PATCH "61")
 set(RTF_VERSION_TWEAK "")
 set(RTF_VERSION_STRING "")


Fix typo in toolchain

Fix typo in toolchain

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -294,7 +294,7 @@
   set(SDK_NAME iphoneos)
   if(NOT ARCHS)
     set(ARCHS armv7 armv7s arm64)
-    set(APPLE_TARGET_TRIPLE_INT arm-apple-ios$${DEPLOYMENT_TARGET})
+    set(APPLE_TARGET_TRIPLE_INT arm-apple-ios${DEPLOYMENT_TARGET})
   else()
     set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET})
   endif()


COMP: mention that Japser will be skipped by OTB

--- Modules/ThirdParty/GDAL/otb-module-init.cmake
+++ Modules/ThirdParty/GDAL/otb-module-init.cmake
@@ -118,7 +118,7 @@
 gdal_try_run(STATUS GDAL_HAS_JPEG2000 gdalFormatsTest.c JPEG2000)
 #NOT is neeed because it keep the output of try_run execution which is non-zero if failed
 if (NOT GDAL_HAS_JPEG2000)
-  message(WARNING "JPEG2000 Driver found is 'Jasper'. OTB cannot use this driver. Possible options are OpenJPEG, ECW, Kakadu")
+  message(STATUS "Jasper JPEG2000 driver is available will be skipped by OTB. supported drivers OpenJPEG, ECW, Kakadu")
   gdal_try_run(STATUS GDAL_CAN_CREATE_JPEG2000 gdalCreateCopyTest.cxx ${TEMP}/testImage.gtif ${TEMP}/testImage.j2k JPEG2000)
 endif()


COMP: Add Video label for _fetchData tests

--- Modules/VideoCore/Common/add_video_test.cmake
+++ Modules/VideoCore/Common/add_video_test.cmake
@@ -5,4 +5,5 @@
 macro(add_video_test)
   midas_add_test(${ARGV})
   set_property(TEST ${ARGV1} PROPERTY LABELS Video)
+  set_property(TEST ${ARGV1}_fetchData PROPERTY LABELS Video)
 endmacro(add_video_test)


#1244 - OpenIGTLink Github version fixed.

git-svn-id: f70d4c833b20674991d6651a5f592bbdbe6b47b2@8242 30ced1d1-d8fb-0310-b896-84269ee58dd6

--- CMake/CMakeExternals/OPENIGTLINK.cmake
+++ CMake/CMakeExternals/OPENIGTLINK.cmake
@@ -34,7 +34,7 @@

 IF(NOT DEFINED OpenIGTLink_DIR)

-    SET(revision_tag d79e0d85b0)
+    SET(revision_tag 63a697e7bd)
     IF(${proj}_REVISION_TAG)
         SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


Hide default slicer modules

Hide default slicer modules

Some modules are irrelevant for Bender (diffusion, endoscopy...), they
should be hidden to the user.
Update the version of Slicer for:
 * fix memory leak with vtkCollection and vtkCollectionIterator
 * dynamically populate the module top level menu
 * fix Slicer_QTSCRIPTEDMODULES_DISABLED

--- CMake/Superbuild/External_Slicer.cmake
+++ CMake/Superbuild/External_Slicer.cmake
@@ -79,7 +79,7 @@
     BINARY_DIR ${${proj}_DIR}
     PREFIX ${proj}${ep_suffix}
     GIT_REPOSITORY "git://public.kitware.com/Bender/Slicer.git"
-    GIT_TAG "7e7bbf6e11390cff8fc8a6d02e39153ff907d84a"
+    GIT_TAG "99050b1f862bcb4f7ccb69690bf0c950940c7139"
     ${bender_external_update}
     INSTALL_COMMAND ""
     CMAKE_GENERATOR ${gen}
@@ -112,6 +112,7 @@
       -DSlicer_USE_QtTesting:BOOL=OFF
       -DSlicer_USE_PYTHONQT:BOOL=ON
       -DSlicer_QTLOADABLEMODULES_DISABLED:STRING=SlicerWelcome
+      -DSlicer_QTSCRIPTEDMODULES_DISABLED:STRING=Endoscopy.py^^SelfTests.py^^SampleData.py
       -DSlicer_BUILD_ChangeTrackerPy:BOOL=OFF
       -DSlicer_BUILD_MultiVolumeExplorer:BOOL=OFF
       -DSlicer_BUILD_MultiVolumeImporter:BOOL=OFF


ENH: Bump TubeTK to integrate image math CLP fix

--- CMake/Superbuild/External_TubeTK.cmake
+++ CMake/Superbuild/External_TubeTK.cmake
@@ -45,7 +45,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "https://github.com/TubeTK/TubeTK.git"
-    GIT_TAG "e8c6fea59c794a7f8d16bd072182dd7e920dbed4"
+    GIT_TAG "ee7cfa4cebbda1b74695111068186de14cb92a87"
     CMAKE_CACHE_ARGS
       -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}


fix cakepkg: cmake sets ARGV3 even when it should be empty

--- Modules/CakePkg.cmake
+++ Modules/CakePkg.cmake
@@ -173,7 +173,7 @@
       set(wd "")
     endif()
     cake_message(STATUS "git ${s}")
-    if(output_var_out STREQUAL _)
+    if(output_var_out MATCHES "^_$")
       set(output_var_option "")
     else()
       set(output_var_option OUTPUT_VARIABLE output_variable OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -183,13 +183,13 @@
       ${wd}
       ${output_var_option}
       RESULT_VARIABLE result_variable)
-    if(NOT ARGV3 AND result_variable)
+    if(ARGC LESS 4 AND result_variable)
       message(FATAL_ERROR "[cake] git command failed")
     endif()
-    if(NOT output_var_out STREQUAL _)
+    if(NOT output_var_out MATCHES "^_$")
       set(${output_var_out} "${output_variable}" PARENT_SCOPE)
     endif()
-    if(ARGV3)
+    if(ARGC GREATER 3)
       set(${ARGV3} "${result_variable}" PARENT_SCOPE)
     endif()
   endfunction()


Prefer curves without endomorphisms by default.

--- cmake/ec.cmake
+++ cmake/ec.cmake
@@ -9,7 +9,7 @@

 message("      Note: these methods must be given in order. Ex: EC_METHD=\"BINAR\"\n")

-option(EC_KBLTZ "Prefer Koblitz curves" on)
+option(EC_KBLTZ "Prefer Koblitz curves" off)

 # Choose the arithmetic methods.
 if (NOT EC_METHD)


cmake/BuildPCRE2.cmake: still pcre2-8 v.s. pcre2-8d [ci skip]

--- cmake/BuildPCRE2.cmake
+++ cmake/BuildPCRE2.cmake
@@ -62,7 +62,7 @@
     )
 ENDIF ()
 SET (PCRE2_INCLUDE_DIR "${3RDPARTY_OUTPUT_PATH}/include")
-IF (WIN32 AND ((CMAKE_BUILD_TYPE STREQUAL Debug) OR (CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo)))
+IF (WIN32 AND (CMAKE_BUILD_TYPE STREQUAL Debug))
   SET (PCRE2_LINK_FLAGS  "${3RDPARTY_OUTPUT_PATH}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}pcre2-8d${CMAKE_STATIC_LIBRARY_SUFFIX}")
 ELSE ()
   SET (PCRE2_LINK_FLAGS  "${3RDPARTY_OUTPUT_PATH}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}pcre2-8${CMAKE_STATIC_LIBRARY_SUFFIX}")


CMake: DA executable format : ${DETECTOR}{ALGORITHM}da.exe

Adding .exe at the end for the executable name to keep compatibility
with previous versions

--- cmake/CMakeALICE.cmake
+++ cmake/CMakeALICE.cmake
@@ -177,23 +177,23 @@
     setDAflags()

     # Generating the DA executable
-    add_executable(${DETECTOR}${ALGORITHM}da ${DETECTOR}${ALGORITHM}da.cxx) #
+    add_executable(${DETECTOR}${ALGORITHM}da.exe ${DETECTOR}${ALGORITHM}da.cxx) #

     # DA flags and linking information
     set(MODULE_COMPILE_FLAGS)
     set(MODULE_LINK_FLAGS)

-    target_link_libraries(${DETECTOR}${ALGORITHM}da ${STATIC_DEPENDENCIES} ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 1
+    target_link_libraries(${DETECTOR}${ALGORITHM}da.exe ${STATIC_DEPENDENCIES} ${AMORE_AUXLIBS} daqDA ${DATE_MONLIBRARIES} ${DATE_RCPROXYLIBRARIES} Root RootExtra) # 1

     # different flags
     set(MODULE_COMPILE_FLAGS "  ${DATE_CFLAGS} ${AMORE_CFLAGS}")
     set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${AMORE_STATICLIBS}")

-    set_target_properties(${DETECTOR}${ALGORITHM}da PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
-    set_target_properties(${DETECTOR}${ALGORITHM}da PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
+    set_target_properties(${DETECTOR}${ALGORITHM}da.exe PROPERTIES COMPILE_FLAGS ${MODULE_COMPILE_FLAGS})
+    set_target_properties(${DETECTOR}${ALGORITHM}da.exe PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")

     # Installation
-    install(TARGETS ${DETECTOR}${ALGORITHM}da RUNTIME DESTINATION bin)
+    install(TARGETS ${DETECTOR}${ALGORITHM}da.exe RUNTIME DESTINATION bin)

     if(DARPM)
         createDArpm("${DETECTOR}" "${ALGORITHM}")
@@ -204,7 +204,7 @@
 macro(createDArpm DETECTOR ALGORITHM)
     getDAdescription("${DETECTOR}" "${ALGORITHM}")

-    set(DA_EXECUTABLE "${DETECTOR}${ALGORITHM}da")
+    set(DA_EXECUTABLE "${DETECTOR}${ALGORITHM}da.exe")
     set(DETECTOR "${DETECTOR}")
     set(ALGORITHM "${ALGORITHM}")
     set(RPM_DESCRIPTION ${RPM_DESCRIPTION})
@@ -221,9 +221,9 @@

     configure_file("${AliRoot_SOURCE_DIR}/cmake/da.spec.in" "${_ALGORITHM}-da.spec" @ONLY)

-    add_custom_command(TARGET ${DETECTOR}${ALGORITHM}da POST_BUILD
+    add_custom_command(TARGET ${DETECTOR}${ALGORITHM}da.exe POST_BUILD
                        COMMAND mkdir ARGS -p da-${_ALGORITHM}-rpm/root/${DA_PREFIX}/
-                       COMMAND cp ARGS ${DETECTOR}${ALGORITHM}da da-${_ALGORITHM}-rpm/root/${DA_PREFIX}/
+                       COMMAND cp ARGS ${DETECTOR}${ALGORITHM}da.exe da-${_ALGORITHM}-rpm/root/${DA_PREFIX}/
                        COMMAND rpmbuild ARGS --verbose --define "_topdir ${CMAKE_CURRENT_BINARY_DIR}/da-${_ALGORITHM}-rpm" --define "%buildroot ${CMAKE_CURRENT_BINARY_DIR}/da-${_ALGORITHM}-rpm/root" -bb ${_ALGORITHM}-da.spec
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} VERBATIM
                        COMMENT "RPM creation for ${DETECTOR}-${_ALGORITHM}"


cmake: adapt to load libjack dynamically

--- cmake/DPF-plugin.cmake
+++ cmake/DPF-plugin.cmake
@@ -173,16 +173,6 @@
 # Add build rules for a JACK program.
 #
 function(dpf__build_jack NAME DGL_LIBRARY)
-  find_package(PkgConfig)
-  pkg_check_modules(JACK "jack")
-  if(NOT JACK_FOUND)
-    dpf__warn_once_only(missing_jack
-      "JACK is not found, skipping the `jack` plugin targets")
-    return()
-  endif()
-
-  link_directories(${JACK_LIBRARY_DIRS})
-
   dpf__create_dummy_source_list(_no_srcs)

   dpf__add_executable("${NAME}-jack" ${_no_srcs})
@@ -193,8 +183,10 @@
     RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/$<0:>"
     OUTPUT_NAME "${NAME}")

-  target_include_directories("${NAME}-jack" PRIVATE ${JACK_INCLUDE_DIRS})
-  target_link_libraries("${NAME}-jack" PRIVATE ${JACK_LIBRARIES})
+  # Note: libjack will be linked at runtime
+  if((NOT WIN32) AND (NOT APPLE) AND (NOT HAIKU))
+    target_link_libraries("${NAME}-jack" PRIVATE "dl")
+  endif()
 endfunction()

 # dpf__build_ladspa
@@ -625,7 +617,7 @@
   endif()
   add_executable(lv2_ttl_generator "${DPF_ROOT_DIR}/utils/lv2-ttl-generator/lv2_ttl_generator.c")
   if((NOT WIN32) AND (NOT APPLE) AND (NOT HAIKU))
-    target_link_libraries(lv2_ttl_generator "dl")
+    target_link_libraries(lv2_ttl_generator PRIVATE "dl")
   endif()
 endfunction()


FindCyclus.cmake now uses 'cyclus --install-path' if cyclus bin is in PATH

--- cmake/FindCyclus.cmake
+++ cmake/FindCyclus.cmake
@@ -16,7 +16,14 @@
     MESSAGE(STATUS "\t\tThe environment variable CYCLUS_ROOT_DIR: $ENV{CYCLUS_ROOT_DIR}")
   ENDIF(NOT DEFINED CYCLUS_ROOT_DIR)
 ELSE(DEFINED ENV{CYCLUS_ROOT_DIR})
-  SET(CYCLUS_ROOT_DIR "$ENV{HOME}/.local")
+  FIND_PROGRAM(CYCLUS_BIN cyclus)
+  IF(CYCLUS_BIN)
+    EXECUTE_PROCESS(COMMAND cyclus --install-path
+                    OUTPUT_VARIABLE CYCLUS_ROOT_DIR
+                    OUTPUT_STRIP_TRAILING_WHITESPACE)
+  ELSE(CYCLUS_BIN)
+    SET(CYCLUS_ROOT_DIR "$ENV{HOME}/.local")
+  ENDIF(CYCLUS_BIN)
 ENDIF(DEFINED ENV{CYCLUS_ROOT_DIR})

 # Let the user know if we're using a hint


remove unessecary required vars

remove unessecary required vars

--- cmake/FindLibzip.cmake
+++ cmake/FindLibzip.cmake
@@ -21,7 +21,7 @@
     find_package(OpenSSL REQUIRED)

     FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBZIP
-            REQUIRED_VARS LIBZIP_LIBRARY LIBZIP_INCLUDE_DIR ZLIB_LIBRARIES BZIP2_LIBRARIES OPENSSL_LIBRARIES)
+            REQUIRED_VARS LIBZIP_LIBRARY LIBZIP_INCLUDE_DIR)

     set(LIBZIP_LIBRARIES ${LIBZIP_LIBRARY} ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} ${OPENSSL_LIBRARIES})


Cleanup in FindMatlab.cmake.

Cleanup in FindMatlab.cmake.

--- cmake/FindMatlab.cmake
+++ cmake/FindMatlab.cmake
@@ -14,14 +14,7 @@
 #  MATLAB_ENG_LIBRARY:        Path to libeng.lib
 #  MATLAB_LIBRARIES:          Required libraries: libmex, libmx, libeng
 #  MATLAB_MEXFILE_EXT:        MEX extension required for the current platform
-#  MATLAB_CREATE_MEX:         Macro to build a MEX-file
-#  MATLAB_MATLABR2010B_FOUND: Variable only available under Windows (used to fix compilation issue with MSVC 2010)
 #
-# The macro MATLAB_CREATE_MEX requires in this order:
-#  - function's name which will be called in Matlab;
-#  - C/C++ source files;
-#  - third libraries required.
-
 # Copyright (C) 2016, Moveck Solution Inc., all rights reserved.
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
@@ -97,12 +90,7 @@
       SET(MATLAB_OLD_WIN_MEXFILE_EXT 1 CACHE STRING "Old MEX extension for Windows")
     ENDIF()
   ENDIF()
-
-  FIND_PATH(MATLABR2010B_TEMP "license.txt" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.11;MATLABROOT]" NO_DEFAULT_PATH)
-  IF(MATLABR2010B_TEMP)
-    SET(MATLAB_MATLABR2010B_FOUND 1)
-  ENDIF()
-
+
   SET(MATLAB_LIBRARIES_PATHS
       "${MATLAB_ROOT}/extern/lib/win64/microsoft"
       "${MATLAB_ROOT}/extern/lib/win32/microsoft"
@@ -279,8 +267,4 @@
   MATLAB_INCLUDE_DIR
   MATLAB_MEXFILE_EXT
   MATLAB_OLD_WIN_MEXFILE_EXT
-)
-
-IF(WIN32)
-  MARK_AS_ADVANCED(MATLAB_MATLABR2010B_FOUND)
-ENDIF()+)


Fixed a bug with definitions and multiple tests.

--- cmake/ROCSMacros.cmake
+++ cmake/ROCSMacros.cmake
@@ -113,13 +113,13 @@
 		# Full test suite name
 		set(_TEST_TARGET_ "test_${MODULE_NAME}_${ARG_NAME}")

-		# Special definitions used by Boost
-		add_definitions("-DBOOST_TEST_DYN_LINK" "-DBOOST_TEST_MODULE=${_TEST_TARGET_}")
-
 		# Add target for the test
 		add_executable(${_TEST_TARGET_} cpp/tests/${ARG_NAME}.cc)
 		target_link_libraries(${_TEST_TARGET_} boost_unit_test_framework)
 		target_link_libraries(${_TEST_TARGET_} rocs_${MODULE_NAME})
+
+		# Special definitions used by Boost
+		set_property(TARGET ${_TEST_TARGET_} PROPERTY COMPILE_DEFINITIONS "BOOST_TEST_DYN_LINK" "BOOST_TEST_MODULE=${_TEST_TARGET_}")

 		# Say where it should be built
 		set_target_properties(${_TEST_TARGET_} PROPERTIES