Disable Eigen docs builds by default.

Disable Eigen docs builds by default.

Eigen documentation builds compile tools with the host toolchain which
it then tries to execute. When cross compiling doc tool execution
fails as the tools are built with the target toolchain. This change
disables Eigen docs builds by default to facilitate cross compilation.
Unfortunately, CMAKE_CROSSCOMPILING can't be used to enable docs
builds when cross compilation is disabled as it does not work on Apple
platforms.

PiperOrigin-RevId: 355646699
Change-Id: Ic9bf789037a0abf9c40676f5f12998466d4978bc

--- tensorflow/lite/tools/cmake/modules/eigen.cmake
+++ tensorflow/lite/tools/cmake/modules/eigen.cmake
@@ -52,6 +52,13 @@
   file(WRITE "${eigen_SOURCE_DIR}/bench/spbench/CMakeLists.txt" "")
 endif()

+# Patch Eigen to disable doc generation, as it builds C++ standalone apps with
+# the host toolchain which breaks cross compiled builds.
+if(NOT EIGEN_GENERATE_DOCS)
+  file(WRITE "${eigen_SOURCE_DIR}/doc/CMakeLists.txt" "")
+  file(WRITE "${eigen_SOURCE_DIR}/unsupported/doc/CMakeLists.txt" "")
+endif()
+
 set(EIGEN_DISABLED_FORTRAN_COMPILER_CHECK ON CACHE BOOL "Disabled Fortran")

 set(EIGEN_LEAVE_TEST_IN_ALL_TARGET OFF CACHE BOOL


On Windows, use the correct version of the C++ runtime.

--- googletest.cmake
+++ googletest.cmake
@@ -29,6 +29,7 @@
       SVN_REVISION -r692
       TIMEOUT 10
       PREFIX "${GTEST_PREFIX}"
+      CMAKE_ARGS -Dgtest_force_shared_crt=ON
       INSTALL_COMMAND ""
       LOG_DOWNLOAD ON
       LOG_CONFIGURE ON


STYLE: Update SCIFIO for KWStyke failures

Change-Id: I59746f951013cd19fdff9b5aea6900d67f050253

--- Modules/Remote/SCIFIO.remote.cmake
+++ Modules/Remote/SCIFIO.remote.cmake
@@ -1,5 +1,5 @@
 itk_fetch_module(SCIFIO
   "SCIFIO (Bioformats) ImageIO plugin for ITK"
   GIT_REPOSITORY https://github.com/scifio/scifio-imageio.git
-  GIT_TAG 789c08071bbcd4341eba76fda10582a8d5fb7626
+  GIT_TAG 9346dbbf30b64645ebd9546fbf82f5438dc88a48
   )


ENH: Bump TubeTK to v1.0.0

ENH: Bump TubeTK to v1.0.0

--- Modules/Remote/TubeTK.remote.cmake
+++ Modules/Remote/TubeTK.remote.cmake
@@ -48,5 +48,5 @@
   "http://www.tubetk.org"
   MODULE_COMPLIANCE_LEVEL 3
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTubeTK.git
-  GIT_TAG 06b083a7158be433f55ccc05bbfcafe124f94fde
+  GIT_TAG cee053ac95743ed6d7a879465ac2d4ddd4beb04f
   )


Temporarily disable local discovery of capnp/kj.

--- external/CapnProto.cmake
+++ external/CapnProto.cmake
@@ -21,14 +21,17 @@

 option(SOURCE_CAPNP "Build Cap'n Proto from source even if it is found." OFF)

-if (NOT ${SOURCE_CAPNP})
-  find_package(CapnProto)
-  # Find static libraries
-  find_library(LIB_KJ ${STATIC_PRE}kj${STATIC_SUF})
-  find_library(LIB_CAPNP ${STATIC_PRE}capnp${STATIC_SUF})
-  find_library(LIB_CAPNPC ${STATIC_PRE}capnpc${STATIC_SUF})
-  set(CAPNP_LIBRARIES ${LIB_KJ} ${LIB_CAPNP} ${LIB_CAPNPC})
-endif ()
+# TODO: Enable discovery of capnp/kj locally.
+#if (NOT ${SOURCE_CAPNP})
+#  find_package(CapnProto)
+#  # Find static libraries
+#  find_library(LIB_KJ ${STATIC_PRE}kj${STATIC_SUF})
+#  find_library(LIB_CAPNP ${STATIC_PRE}capnp${STATIC_SUF})
+#  find_library(LIB_CAPNPC ${STATIC_PRE}capnpc${STATIC_SUF})
+#  set(CAPNP_LIBRARIES ${LIB_KJ} ${LIB_CAPNP} ${LIB_CAPNPC})
+#  set(CAPNP_LIBRARIES_LITE ${LIB_KJ} ${LIB_CAPNP})
+#  # TODO: Lookup CAPNP_INCLUDE_DIRS, CAPNP_EXECUTABLE, and CAPCP_CXX_EXECUTABLE.
+#endif ()

 if (NOT CAPNP_FOUND)
   # Build Cap'n Proto from source.
@@ -89,7 +92,7 @@
 set(CAPNP_EXECUTABLE ${CAPNP_EXECUTABLE} PARENT_SCOPE)
 set(CAPNPC_CXX_EXECUTABLE ${CAPNPC_CXX_EXECUTABLE} PARENT_SCOPE)

-# Install headers.
+# Install headers and libraries.
 foreach (INCLUDE_DIR ${CAPNP_INCLUDE_DIRS})
   install(DIRECTORY ${INCLUDE_DIR}/kj
           DESTINATION include/)


More specific paths for old ceres

More specific paths for old ceres

Former-commit-id: b4e4382c3258226007839c52b577fa68f7b1768e

--- cmake-modules/Fetch_Ceres.cmake
+++ cmake-modules/Fetch_Ceres.cmake
@@ -37,16 +37,16 @@

     set(CERES_FLAGS "${CERES_FLAGS} -I${GLOG_INCLUDE_DIR} -I${GFLAGS_INCLUDE_DIR} ")
     string (REPLACE ";" " " CERES_FLAGS "${CERES_FLAGS}")
-    list(APPEND CERES_CMAKE_OPTIONS  -DCERES_FLAGS:STRING=${CERES_FLAGS})
-    list(APPEND CERES_CMAKE_OPTIONS  -DCUSTOM_SUFFIX:STRING=${CUSTOM_SUFFIX})
-    list(APPEND CERES_CMAKE_OPTIONS  -DEigen3_DIR:PATH=${CMAKE_INSTALL_PREFIX}/Eigen3/share/eigen3/cmake)
-    list(APPEND CERES_CMAKE_OPTIONS  -DEIGEN3_INCLUDE_DIR:PATH=${EIGEN3_INCLUDE_DIR})
-    list(APPEND CERES_CMAKE_OPTIONS  -Dgflags_DIR:PATH=${CMAKE_INSTALL_PREFIX}/gflags/${CMAKE_INSTALL_LIBDIR}/cmake/gflags)
-    list(APPEND CERES_CMAKE_OPTIONS  -DGFLAGS_INCLUDE_DIR:PATH=${GFLAGS_INCLUDE_DIR})
-    list(APPEND CERES_CMAKE_OPTIONS  -DGFLAGS_LIBRARIES:PATH=${GFLAGS_LIBRARIES})
-    list(APPEND CERES_CMAKE_OPTIONS  -Dglog_DIR:PATH=${CMAKE_INSTALL_PREFIX}/glog/lib/cmake/glog)
-    list(APPEND CERES_CMAKE_OPTIONS  -DGLOG_INCLUDE_DIR:PATH=${GLOG_INCLUDE_DIR})
-    list(APPEND CERES_CMAKE_OPTIONS  -DGLOG_LIBRARIES:PATH=${GLOG_LIBRARIES})
+    list(APPEND CERES_CMAKE_OPTIONS  "-DCERES_FLAGS:STRING=${CERES_FLAGS}")
+    list(APPEND CERES_CMAKE_OPTIONS  "-DCUSTOM_SUFFIX:STRING=${CUSTOM_SUFFIX}")
+    list(APPEND CERES_CMAKE_OPTIONS  "-DEigen3_DIR:PATH=${CMAKE_INSTALL_PREFIX}/Eigen3/share/eigen3/cmake")
+    list(APPEND CERES_CMAKE_OPTIONS  "-DEIGEN3_INCLUDE_DIR:PATH=${EIGEN3_INCLUDE_DIR}")
+    list(APPEND CERES_CMAKE_OPTIONS  "-Dgflags_DIR:PATH=${CMAKE_INSTALL_PREFIX}/gflags/${CMAKE_INSTALL_LIBDIR}/cmake/gflags")
+    list(APPEND CERES_CMAKE_OPTIONS  "-DGFLAGS_INCLUDE_DIR:PATH=${GFLAGS_INCLUDE_DIR}")
+    list(APPEND CERES_CMAKE_OPTIONS  "-DGFLAGS_LIBRARIES:PATH=${GFLAGS_LIBRARIES}")
+    list(APPEND CERES_CMAKE_OPTIONS  "-Dglog_DIR:PATH=${CMAKE_INSTALL_PREFIX}/glog/lib/cmake/glog")
+    list(APPEND CERES_CMAKE_OPTIONS  "-DGLOG_INCLUDE_DIR:PATH=${GLOG_INCLUDE_DIR}")
+    list(APPEND CERES_CMAKE_OPTIONS  "-DGLOG_LIBRARIES:PATH=${GLOG_LIBRARIES}")

     message(STATUS "ceres flags  : ${CERES_FLAGS}")
     message(STATUS "ceres options: ${CERES_CMAKE_OPTIONS}")


[cmake/modules] fix FindOrcania to find Orcania library propertly and removing message() calls already done by FindPackageHandleStandardArgs module.

--- cmake-modules/FindOrcania.cmake
+++ cmake-modules/FindOrcania.cmake
@@ -31,8 +31,10 @@
 # License along with this library.	If not, see <http://www.gnu.org/licenses/>.
 #=============================================================================

+# Sat Jan 27 15:57:36 -03 2018
+
 find_package(PkgConfig QUIET)
-pkg_check_modules(PC_ORCANIA QUIET orcania)
+pkg_check_modules(PC_ORCANIA QUIET liborcania)

 find_path(ORCANIA_INCLUDE_DIR
         NAMES orcania.h
@@ -42,15 +44,12 @@
         NAMES orcania liborcania
         HINTS ${PC_ORCANIA_LIBDIR} ${PC_ORCANIA_LIBRARY_DIRS})

-set(ORCANIA_VERSION_STRING 0.0.0)
 if (PC_ORCANIA_VERSION)
     set(ORCANIA_VERSION_STRING ${PC_ORCANIA_VERSION})
 elseif (ORCANIA_INCLUDE_DIR AND EXISTS "${ORCANIA_INCLUDE_DIR}/orcania.h")
     set(regex_orcania_version "^#define[ \t]+ORCANIA_VERSION[ \t]+([^\"]+).*")
     file(STRINGS "${ORCANIA_INCLUDE_DIR}/orcania.h" orcania_version REGEX "${regex_orcania_version}")
-		MESSAGE("found " ${orcania_version})
     string(REGEX REPLACE "${regex_orcania_version}" "\\1" ORCANIA_VERSION_STRING "${orcania_version}")
-		MESSAGE("regex found " ${ORCANIA_VERSION_STRING})
     unset(regex_orcania_version)
     unset(orcania_version)
 endif ()
@@ -64,5 +63,4 @@
     set(ORCANIA_LIBRARIES ${ORCANIA_LIBRARY})
     set(ORCANIA_INCLUDE_DIRS ${ORCANIA_INCLUDE_DIR})
 endif ()
-
-mark_as_advanced(ORCANIA_INCLUDE_DIR ORCANIA_LIBRARY)
+mark_as_advanced(ORCANIA_INCLUDE_DIR ORCANIA_LIBRARY)


Update FindCFITSIO.cmake

Update FindCFITSIO.cmake

Add a fix for ROOT-9755 by linking explicitly against libcurl
for newer versions of cfistio that require it.

--- cmake/modules/FindCFITSIO.cmake
+++ cmake/modules/FindCFITSIO.cmake
@@ -1,55 +1,72 @@
-# - Try to find CFITSIO
-# Once done this will define
+#.rst:
+# FindCFITSIO
+# -------
 #
-#  CFITSIO_FOUND - system has CFITSIO
-#  CFITSIO_INCLUDE_DIR - the CFITSIO include directory
-#  CFITSIO_LIBRARY - the CFITSIO library
-#  CFITSIO_LIBRARIES (not cached) - Link these to use CFITSIO
-#  CFITSIO_VERSION_STRING - Human readable version number of cfitsio
-#  CFITSIO_VERSION_MAJOR  - Major version number of cfitsio
-#  CFITSIO_VERSION_MINOR  - Minor version number of cfitsio
+# Find the CFITSIO library header and define variables.
+#
+# Imported Targets
+# ^^^^^^^^^^^^^^^^
+#
+# This module defines :prop_tgt:`IMPORTED` target ``CFITSIO::CFITSIO``,
+# if CFITSIO has been found
+#
+# Result Variables
+# ^^^^^^^^^^^^^^^^
+#
+# This module defines the following variables:
+#
+# ::
+#
+#   CFITSIO_FOUND          - True if CFITSIO is found.
+#   CFITSIO_INCLUDE_DIRS   - Where to find fitsio.h
+#
+# ::
+#
+#   CFITSIO_VERSION        - The version of CFITSIO found (x.y)
+#   CFITSIO_VERSION_MAJOR  - The major version of CFITSIO
+#   CFITSIO_VERSION_MINOR  - The minor version of CFITSIO

-# Copyright (c) 2006, Jasem Mutlaq <mutlaqja@ikarustech.com>
-# Based on FindLibfacile by Carsten Niehaus, <cniehaus@gmx.de>
-# Chnaged by Pere Mato
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+find_path(CFITSIO_INCLUDE_DIR NAME fitsio.h
+  PATH_SUFFIXES libcfitsio3 libcfitsio0 cfitsio
+  PATHS $ENV{CFITSIO} ${CFITSIO_DIR}/include ${GNUWIN32_DIR}/include)

-
-find_path(CFITSIO_INCLUDE_DIR fitsio.h
-  PATH_SUFFIXES libcfitsio3 libcfitsio0 cfitsio
-  PATHS
-  $ENV{CFITSIO}
-  ${CFITSIO_DIR}/include
-  ${GNUWIN32_DIR}/include
-)
-
-find_library(CFITSIO_LIBRARY NAMES cfitsio
-  PATHS
-  $ENV{CFITSIO}
-  ${CFITSIO_DIR}/lib
-  ${GNUWIN32_DIR}/lib
-)
-if(CFITSIO_LIBRARY)
-  set(CFITSIO_LIBRARIES ${CFITSIO_LIBRARY})
+if(NOT CFITSIO_LIBRARY)
+  find_library(CFITSIO_LIBRARY NAMES cfitsio
+    PATHS $ENV{CFITSIO} ${CFITSIO_DIR}/lib ${GNUWIN32_DIR}/lib)
 endif()

-# handle the QUIETLY and REQUIRED arguments and set CFITSIO_FOUND to TRUE if
-# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(CFITSIO DEFAULT_MSG CFITSIO_INCLUDE_DIR CFITSIO_LIBRARY)
+mark_as_advanced(CFITSIO_INCLUDE_DIR CFITSIO_LIBRARY)

-mark_as_advanced(
-  CFITSIO_LIBRARY
-  CFITSIO_INCLUDE_DIR
-)
+if(CFITSIO_INCLUDE_DIR AND EXISTS "${CFITSIO_INCLUDE_DIR}/fitsio.h")
+  file(STRINGS "${CFITSIO_INCLUDE_DIR}/fitsio.h" CFITSIO_H REGEX "^#define CFITSIO_[A-Z]+[ ]+[0-9]+.*$")
+  string(REGEX REPLACE ".+CFITSIO_MAJOR[ ]+([0-9]+).*$"   "\\1" CFITSIO_VERSION_MAJOR "${CFITSIO_H}")
+  string(REGEX REPLACE ".+CFITSIO_MINOR[ ]+([0-9]+).*$"   "\\1" CFITSIO_VERSION_MINOR "${CFITSIO_H}")
+  set(CFITSIO_VERSION "${CFITSIO_VERSION_MAJOR}.${CFITSIO_VERSION_MINOR}")
+endif()

-if (CFITSIO_FOUND)
-  # Find the version of the cfitsio header
-  FILE(READ "${CFITSIO_INCLUDE_DIR}/fitsio.h" FITSIO_H)
-  STRING(REGEX REPLACE ".*#define CFITSIO_VERSION[^0-9]*([0-9]+)\\.([0-9]+).*" "\\1.\\2" CFITSIO_VERSION_STRING "${FITSIO_H}")
-  STRING(REGEX REPLACE "^([0-9]+)[.]([0-9]+)" "\\1" CFITSIO_VERSION_MAJOR ${CFITSIO_VERSION_STRING})
-  STRING(REGEX REPLACE "^([0-9]+)[.]([0-9]+)" "\\2" CFITSIO_VERSION_MINOR ${CFITSIO_VERSION_STRING})
-  message(STATUS "Found CFITSIO version: ${CFITSIO_VERSION_STRING}")
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(CFITSIO
+  REQUIRED_VARS CFITSIO_LIBRARY CFITSIO_INCLUDE_DIR VERSION_VAR CFITSIO_VERSION)
+
+if(CFITSIO_FOUND)
+  set(CFITSIO_INCLUDE_DIRS "${CFITSIO_INCLUDE_DIR}")
+
+  if(NOT CFITSIO_LIBRARIES)
+    set(CFITSIO_LIBRARIES ${CFITSIO_LIBRARY})
+    if(${CFITSIO_VERSION} VERSION_GREATER_EQUAL 3.42)
+      find_package(CURL QUIET)
+      if(CURL_FOUND)
+        set(CFITSIO_LIBRARIES "${CFITSIO_LIBRARIES} ${CURL_LIBRARIES}")
+      endif()
+    endif()
+  endif()
+
+  if(NOT TARGET CFITSIO::CFITSIO)
+    add_library(CFITSIO::CFITSIO UNKNOWN IMPORTED)
+    set_target_properties(CFITSIO::CFITSIO PROPERTIES
+      IMPORTED_LOCATION "${CFITSIO_LIBRARY}"
+      INTERFACE_INCLUDE_DIRECTORIES "${CFITSIO_INCLUDE_DIRS}"
+      INTERFACE_LINK_LIBRARIES "${CURL_LIBRARIES}"
+    )
+  endif()
 endif()


[CMake] Re-apply r200765, "Get rid of llvm_config() to expand dependencies."

CMake's target_link_libraries() will manage dependencies with Brad's LLVMConfig improvements.

Configuration time may be reduced by a few seconds.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@201062 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/LLVM-Config.cmake
+++ cmake/modules/LLVM-Config.cmake
@@ -62,13 +62,7 @@
 function(explicit_llvm_config executable)
   set( link_components ${ARGN} )

-  # Check for out-of-tree builds.
-  if(PROJECT_NAME STREQUAL "LLVM")
-    llvm_map_components_to_libnames(LIBRARIES ${link_components})
-  else()
-    explicit_map_components_to_libraries(LIBRARIES ${link_components})
-  endif()
-
+  llvm_map_components_to_libnames(LIBRARIES ${link_components})
   target_link_libraries(${executable} ${LIBRARIES})
 endfunction(explicit_llvm_config)


Remove notes

Remove notes

--- cmake/projects/ccv/hunter.cmake
+++ cmake/projects/ccv/hunter.cmake
@@ -1,7 +1,6 @@
 # Copyright (c) 2015, David Hirvonen
 # All rights reserved.

-# This is a header-like file, so include guards needed
 if(DEFINED HUNTER_CMAKE_PROJECTS_CCV_HUNTER_CMAKE_)
   return()
 else()


Jars are complied in BINARY dir not SOURCE.

--- cmake_modules/ZorbaModule.cmake
+++ cmake_modules/ZorbaModule.cmake
@@ -425,7 +425,7 @@
     MESSAGE (FATAL_ERROR "'JAR' argument is required for DECLARE_ZORBA_JAR")
   ENDIF (NOT JAR_FILE)
   IF (NOT IS_ABSOLUTE "${JAR_FILE}")
-    SET (JAR_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${JAR_FILE}")
+    SET (JAR_FILE "${CMAKE_CURRENT_BINARY_DIR}/${JAR_FILE}")
   ENDIF (NOT IS_ABSOLUTE "${JAR_FILE}")

   IF (JAR_EXTERNAL)


update lua-openssl support srp

update lua-openssl support srp

--- deps/lua-openssl.cmake
+++ deps/lua-openssl.cmake
@@ -59,6 +59,7 @@
   ${LUA_OPENSSL_DIR}/src/rsa.c
   ${LUA_OPENSSL_DIR}/src/sk.h
   ${LUA_OPENSSL_DIR}/src/sm2.c
+  ${LUA_OPENSSL_DIR}/src/srp.c
   ${LUA_OPENSSL_DIR}/src/ssl.c
   ${LUA_OPENSSL_DIR}/src/th-lock.c
   ${LUA_OPENSSL_DIR}/src/util.c


cmake: Clean up comments and make sure to use the right enable var name. (#2523)

--- src/cmake/externalpackages.cmake
+++ src/cmake/externalpackages.cmake
@@ -33,13 +33,13 @@

 # checked_find_package(pkgname ..) is a wrapper for find_package, with the
 # following extra features:
-#   * If either USE_<pkgname> or the all-uppercase USE_PKGNAME exists as
-#     either a CMake or environment variable, is nonempty by contains a
-#     non-true/nonnzero value, do not search for or use the package. The
-#     optional ENABLE <var> arguments allow you to override the name of the
-#     enabling variable. In other words, support for the dependency is
-#     presumed to be ON, unless turned off explicitly from one of these
-#     sources.
+#   * If either `USE_pkgname` or the all-uppercase `USE_PKGNAME` (or
+#     `ENABLE_pkgname` or `ENABLE_PKGNAME`) exists as either a CMake or
+#     environment variable, is nonempty by contains a non-true/nonnzero
+#     value, do not search for or use the package. The optional ENABLE <var>
+#     arguments allow you to override the name of the enabling variable. In
+#     other words, support for the dependency is presumed to be ON, unless
+#     turned off explicitly from one of these sources.
 #   * Print a message if the package is enabled but not found. This is based
 #     on ${pkgname}_FOUND or $PKGNNAME_FOUND.
 #   * Optional DEFINITIONS <string> are passed to add_definitions if the
@@ -76,7 +76,7 @@
     foreach (_dep ${_pkg_DEPS})
         if (_enable AND NOT ${_dep}_FOUND)
             set (_enable false)
-            set (${pkgname}_ENABLED OFF PARENT_SCOPE)
+            set (ENABLE_${pkgname} OFF PARENT_SCOPE)
             set (_disablereason "(because ${_dep} was not found)")
         endif ()
     endforeach ()


Fixes this, https://github.com/jasp-stats/jasp-test-release/issues/1768

--- Tools/CMake/Install.cmake
+++ Tools/CMake/Install.cmake
@@ -47,7 +47,7 @@
     ".*(\\.bib|\\.Rnw|\\.cpp|\\.c|\\.pdf|\\.html|\\.f|\\.dSYM|\\.log|\\.bak|\\.deb|\\.DS_Store|\\.Rhistory)$"
 )
 set(FOLDERS_EXCLUDE_PATTERN
-    ".*(/doc|/examples|/help|/man|/html|/demo|/i386|/bib|/gfortran|/BH|/announce|/test|/tinytest|/tests)$"
+    ".*(/doc|/examples|/man|/html|/demo|/i386|/bib|/gfortran|/BH|/announce|/test|/tinytest|/tests)$"
 )

 # See here, http://cmake.org/cmake/help/v3.22/variable/CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT.html


Travis: disable checksums for UBSan builds

--- Testing/script/travis_script.cmake
+++ Testing/script/travis_script.cmake
@@ -129,10 +129,16 @@
   if(${MERCURY_MEMORYCHECK_TYPE} MATCHES "UndefinedBehaviorSanitizer")
     # Must add verbosity / Error in build if no memory output file is produced
     set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS "verbosity=1")
+    # Disable checksums to prevent output from checksum library
+    set(USE_CHECKSUMS OFF)
+  else()
+    set(USE_CHECKSUMS ON)
   endif()

   # needed by mercury_common.cmake
   set(dashboard_do_memcheck TRUE)
+else()
+  set(USE_CHECKSUMS ON)
 endif()

 # Build name referenced in cdash
@@ -180,6 +186,7 @@
 MERCURY_ENABLE_COVERAGE:BOOL=${dashboard_do_coverage}
 MERCURY_ENABLE_DEBUG:BOOL=${enable_debug}
 MERCURY_USE_BOOST_PP:BOOL=OFF
+MERCURY_USE_CHECKSUMS:BOOL=${USE_CHECKSUMS}
 MERCURY_USE_SELF_FORWARD:BOOL=ON
 MERCURY_USE_XDR:BOOL=OFF
 NA_USE_BMI:BOOL=${USE_BMI}


cake_pkg: Allow relative DESTINATION in script mode

--- Modules/CakePkg.cmake
+++ Modules/CakePkg.cmake
@@ -423,7 +423,10 @@
       if(ARG_DESTINATION)
         if(NOT IS_ABSOLUTE "${ARG_DESTINATION}")
           if(DEFINED CMAKE_SCRIPT_MODE_FILE)
-            message(FATAL_ERROR "[cake_pkg] In script mode <destination-dir> must be absolute path.")
+            if(NOT CAKE_CURRENT_DIRECTORY)
+              message(FATAL_ERROR "[cake_pkg] Internal error, CAKE_CURRENT_DIRECTORY should be defined.")
+            endif()
+            get_filename_component(ARG_DESTINATION "${CAKE_CURRENT_DIRECTORY}/${ARG_DESTINATION}" ABSOLUTE)
           else()
             get_filename_component(ARG_DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/${ARG_DESTINATION}" ABSOLUTE)
           endif()


fix BOOST_ARCHIVE_LOCATION

fix BOOST_ARCHIVE_LOCATION

--- modules/boost/boost.cmake
+++ modules/boost/boost.cmake
@@ -69,20 +69,18 @@
 #   define:
 #     - "'-DBOOST_INCLUDEDIR=\"{0}\"'.format(arguments['--boost-headers'])"
 #     - "'-DBOOST_LIBRARYDIR=\"{0}\"'.format(arguments['--boost-libraries'])"
-#     - "'-DFORCE_CUSTOM_BOOST=\"{0}\"'.format(arguments['--build-boost'])"
+#     - "'-DFORCE_CUSTOM_BOOST={0}'.format(arguments['--build-boost'])"
 #     - "'-DBOOST_MINIMUM_REQUIRED=\"%(major).%(minor).%(patch)\"'"
-#     - "'-DBOOST_COMPONENTS_REQUIRED=\"%(components)\"'"
+#     - "'-DBOOST_COMPONENTS_REQUIRED=%(components)'"

 # FIXME Maintainer should be able to choose between fail (end-user has to satisfy dependency
 #       on its own) and soft-fail (self-build of Boost)
 # Underscore-separated version number
 string(REGEX REPLACE "\\." "_" BOOSTVER ${BOOST_MINIMUM_REQUIRED})
+
 # Where the Boost .zip archive is located
-# CMAKE_CURRENT_LIST_DIR is undefined in CMake 2.8.2
-# see https://public.kitware.com/Bug/print_bug_page.php?bug_id=11675
-# workaround: create CMAKE_CURRENT_LIST_DIR
-get_filename_component(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
-set(BOOST_ARCHIVE_LOCATION ${CMAKE_CURRENT_LIST_DIR})
+set(BOOST_ARCHIVE_LOCATION ${PROJECT_SOURCE_DIR}/cmake/downloaded)
+
 set(BOOST_ARCHIVE boost_${BOOSTVER}.zip)

 # FIXME These are possibly not always good settings


Fixed an issue with deploying third-party libraries on Windows [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -844,11 +844,11 @@
 #===============================================================================

 MACRO(WINDOWS_DEPLOY_LIBRARY DIRNAME FILENAME)
-    # Copy the library file to the build/bin folder, if required
-
-    IF(ENABLE_TESTS)
-        COPY_FILE_TO_BUILD_DIR(${PROJECT_NAME} ${DIRNAME} bin ${FILENAME})
-    ENDIF()
+    # Copy the library file to both the build and build/bin folders, so we can
+    # test things without first having to deploy OpenCOR
+
+    COPY_FILE_TO_BUILD_DIR(${PROJECT_NAME} ${DIRNAME} . ${FILENAME})
+    COPY_FILE_TO_BUILD_DIR(${PROJECT_NAME} ${DIRNAME} bin ${FILENAME})

     # Install the library file

@@ -879,12 +879,6 @@
 #===============================================================================

 MACRO(LINUX_DEPLOY_LIBRARY DIRNAME FILENAME)
-    # Copy the library file to the build/bin folder, if required
-
-    IF(ENABLE_TESTS)
-        COPY_FILE_TO_BUILD_DIR(${PROJECT_NAME} ${DIRNAME} bin ${FILENAME})
-    ENDIF()
-
     # Install the library file

     INSTALL(FILES ${DIRNAME}/${FILENAME}


CMake: hide more distracting variables (#285).

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -45,6 +45,11 @@
     mark_as_advanced(CMAKE_OSX_DEPLOYMENT_TARGET)
     mark_as_advanced(CMAKE_OSX_SYSROOT)
   endif()
+  if(WIN32)
+    mark_as_advanced(LibXml2_DIR)
+  else()
+    mark_as_advanced(pkgcfg_lib_PC_LIBXML_xml2)
+  endif()
 endfunction()

 function(GROUP_SOURCE_TO_DIR_STRUCTURE)


Added -faligned-new to compilers that allow it.

This allows for aligned allocations in cases where AVX is enabled with
compiler flags, which requests 32-bit alignment.

--- cmake/config.cmake
+++ cmake/config.cmake
@@ -22,6 +22,12 @@
 	add_compile_options(-Wall -Werror -Wconversion -Wno-sign-conversion -fno-strict-aliasing)
 	if (CMAKE_C_COMPILER_ID MATCHES "GNU")
 		add_compile_options(-Wno-comment)
+		if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 7.0)
+			add_compile_options(-faligned-new)
+		endif()
+	elseif (CMAKE_C_COMPILER_ID MATCHES "Clang" AND
+			CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 5.0)
+		add_compile_options(-faligned-new)
 	endif()
 	# Behavior for VISIBILITY_PRESET variables are inconsistent between CMake versions.
 	if (CUTTLEFISH_SHARED)
@@ -56,16 +62,16 @@
 	set(oneValueArgs SRC_DIR INCLUDE_DIR)
 	set(multiValueArgs FILES)
 	cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-
+
 	foreach (fileName ${ARGS_FILES})
 		# Get the directory name. Make sure there's a trailing /.
 		get_filename_component(directoryName ${fileName} DIRECTORY)
 		set(directoryName ${directoryName}/)
-
+
 		set(filterName)
 		string(REGEX MATCH ${ARGS_SRC_DIR}/.* matchSrc ${directoryName})
 		string(REGEX MATCH ${ARGS_INCLUDE_DIR}/.* matchInclude ${directoryName})
-
+
 		if (matchSrc)
 			string(REPLACE ${ARGS_SRC_DIR}/ "" filterName ${directoryName})
 			set(filterName src/${filterName})
@@ -73,7 +79,7 @@
 			string(REPLACE ${ARGS_INCLUDE_DIR}/ "" filterName ${directoryName})
 			set(filterName include/${filterName})
 		endif()
-
+
 		if (filterName)
 			string(REPLACE "/" "\\" filterName ${filterName})
 			source_group(${filterName} FILES ${fileName})


Fix banner dependency in cmake

Fix banner dependency in cmake

--- cmake/cpp3ds.cmake
+++ cmake/cpp3ds.cmake
@@ -347,7 +347,7 @@
 			-DAPP_TITLE=${APP_TITLE}
 			-DAPP_PRODUCT_CODE=${APP_PRODUCT_CODE}
 			-DAPP_UNIQUE_ID=${APP_UNIQUE_ID}
-            DEPENDS ${target} ${RSF} ${ROMFS_FILES} ${SHADER_OUTPUT} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${target_we}.bnr ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${target_we}.smdh
+            DEPENDS ${target} ${RSF} ${ROMFS_FILES} ${SHADER_OUTPUT} ${BANNER} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${target_we}.smdh
             WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
             VERBATIM
     )


cmake(dotnet): Fix samples target name

cmake(dotnet): Fix samples target name

--- cmake/dotnet.cmake
+++ cmake/dotnet.cmake
@@ -314,7 +314,7 @@
     ${DOTNET_SAMPLE_PATH}/${SAMPLE_NAME}.csproj
     @ONLY)

-  add_custom_target(dotnet_sample_${SAMPLE_NAME} ALL
+  add_custom_target(dotnet_${COMPONENT_NAME}_${SAMPLE_NAME} ALL
     DEPENDS
       ${DOTNET_SAMPLE_PATH}/${SAMPLE_NAME}.csproj
       ${DOTNET_SAMPLE_PATH}/${SAMPLE_NAME}.cs
@@ -324,7 +324,7 @@
       ${DOTNET_SAMPLE_PATH}/bin
       ${DOTNET_SAMPLE_PATH}/obj
     WORKING_DIRECTORY ${DOTNET_SAMPLE_PATH})
-  add_dependencies(dotnet_sample_${SAMPLE_NAME} dotnet_package)
+  add_dependencies(dotnet_${COMPONENT_NAME}_${SAMPLE_NAME} dotnet_package)

   if(BUILD_TESTING)
     add_test(


cmake: clean python.cmake

cmake: clean python.cmake

--- cmake/python.cmake
+++ cmake/python.cmake
@@ -217,7 +217,7 @@
   ${PROJECT_BINARY_DIR}/python/README.txt
   COPYONLY)

-# Look for python module wheel
+# Look for required python modules
 search_python_module(
   NAME setuptools
   PACKAGE setuptools)
@@ -314,6 +314,27 @@
     COMMAND ${VENV_Python3_EXECUTABLE} ${VENV_DIR}/test.py)
 endif()

+# add_python_test()
+# CMake function to generate and build python test.
+# Parameters:
+#  the python filename
+# e.g.:
+# add_python_test(foo.py)
+function(add_python_test FILE_NAME)
+  message(STATUS "Configuring test ${FILE_NAME} ...")
+  get_filename_component(TEST_NAME ${FILE_NAME} NAME_WE)
+  get_filename_component(COMPONENT_DIR ${FILE_NAME} DIRECTORY)
+  get_filename_component(COMPONENT_NAME ${COMPONENT_DIR} NAME)
+
+  if(BUILD_TESTING)
+    add_test(
+      NAME python_${COMPONENT_NAME}_${TEST_NAME}
+      COMMAND ${VENV_Python3_EXECUTABLE} ${FILE_NAME}
+      WORKING_DIRECTORY ${VENV_DIR})
+  endif()
+  message(STATUS "Configuring test ${FILE_NAME} done")
+endfunction()
+
 # add_python_sample()
 # CMake function to generate and build python sample.
 # Parameters:
@@ -356,24 +377,3 @@
   endif()
   message(STATUS "Configuring example ${FILE_NAME} done")
 endfunction()
-
-# add_python_test()
-# CMake function to generate and build python test.
-# Parameters:
-#  the python filename
-# e.g.:
-# add_python_test(foo.py)
-function(add_python_test FILE_NAME)
-  message(STATUS "Configuring test ${FILE_NAME} ...")
-  get_filename_component(TEST_NAME ${FILE_NAME} NAME_WE)
-  get_filename_component(COMPONENT_DIR ${FILE_NAME} DIRECTORY)
-  get_filename_component(COMPONENT_NAME ${COMPONENT_DIR} NAME)
-
-  if(BUILD_TESTING)
-    add_test(
-      NAME python_${COMPONENT_NAME}_${TEST_NAME}
-      COMMAND ${VENV_Python3_EXECUTABLE} ${FILE_NAME}
-      WORKING_DIRECTORY ${VENV_DIR})
-  endif()
-  message(STATUS "Configuring test ${FILE_NAME} done")
-endfunction()


cmake: Cleanup python.cmake

cmake: Cleanup python.cmake

--- cmake/python.cmake
+++ cmake/python.cmake
@@ -39,7 +39,7 @@
   "ortools/util/*.proto"
   )
 list(REMOVE_ITEM proto_py_files "ortools/constraint_solver/demon_profiler.proto")
-foreach(PROTO_FILE ${proto_py_files})
+foreach(PROTO_FILE IN LISTS proto_py_files)
   #message(STATUS "protoc proto(py): ${PROTO_FILE}")
   get_filename_component(PROTO_DIR ${PROTO_FILE} DIRECTORY)
   get_filename_component(PROTO_NAME ${PROTO_FILE} NAME_WE)


SVN_SILENT made messages (.desktop file) - always resolve ours

In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -10,5 +10,115 @@
 InitialPreference=15

 Name=GStreamer
+Name[ast]=GStreamer
+Name[bg]=GStreamer
+Name[bs]=Gstreamer
+Name[ca]=GStreamer
+Name[ca@valencia]=GStreamer
+Name[cs]=GStreamer
+Name[da]=GStreamer
+Name[de]=GStreamer
+Name[el]=GStreamer
+Name[en_GB]=GStreamer
+Name[es]=GStreamer
+Name[et]=GStreamer
+Name[eu]=GStreamer
+Name[fa]=GStreamer
+Name[fi]=GStreamer
+Name[fr]=GStreamer
+Name[ga]=GStreamer
+Name[gl]=GStreamer
+Name[hsb]=GStreamer
+Name[hu]=GStreamer
+Name[id]=GStreamer
+Name[is]=GStreamer
+Name[it]=GStreamer
+Name[ja]=GStreamer
+Name[kk]=GStreamer
+Name[ko]=GStreamer
+Name[ku]=GStreamer
+Name[lt]=GStreamer
+Name[lv]=GStreamer
+Name[mai]=GStreamer
+Name[mr]=जी-स्ट्रीमर
+Name[nb]=GStreamer
+Name[nds]=GStreamer
+Name[nl]=GStreamer
+Name[nn]=GStreamer
+Name[pa]=ਜੀਸਟੀਰਮਰ
+Name[pl]=GStreamer
+Name[pt]=GStreamer
+Name[pt_BR]=GStreamer
+Name[ro]=GStreamer
+Name[ru]=GStreamer
+Name[se]=GStreamer
+Name[sk]=GStreamer
+Name[sl]=GStreamer
+Name[sr]=Гстример
+Name[sr@ijekavian]=Гстример
+Name[sr@ijekavianlatin]=GStreamer
+Name[sr@latin]=GStreamer
+Name[sv]=Gstreamer
+Name[th]=GStreamer
+Name[tr]=GStreamer
+Name[ug]=GStreamer
+Name[uk]=GStreamer
+Name[x-test]=xxGStreamerxx
+Name[zh_CN]=GStreamer
+Name[zh_TW]=GStreamer

 Comment=Phonon GStreamer backend
+Comment[bg]=Phonon GStreamer
+Comment[bs]=Gstreamer kao pozadina Phonona
+Comment[ca]=Dorsal GStreamer del Phonon
+Comment[ca@valencia]=Dorsal GStreamer del Phonon
+Comment[cs]=Podpůrná vrstva GStreamer pro Phonon
+Comment[da]=GStreamer-backend til Phonon
+Comment[de]=Phonon-Treiber für GStreamer
+Comment[el]=Σύστημα υποστήριξης GStreamer του Phonon
+Comment[en_GB]=Phonon GStreamer backend
+Comment[es]=Motor GStreamer para Phonon
+Comment[et]=Phononi GStreameri taustaprogramm
+Comment[eu]=Phonon-en GStreamer bizkarraldekoa
+Comment[fa]=پسانه‌ی جی‌استریمر برای فنون (Phonon GStreamer backend)
+Comment[fi]=Phonon GStreamer -taustajärjestelmä
+Comment[fr]=Moteur GStreamer pour Phonon
+Comment[ga]=Inneall GStreamer le haghaidh Phonon
+Comment[gl]=Infraestrutura de GStreamer para Phonon
+Comment[hsb]=Phonon GStreamer backend
+Comment[hu]=Phonon GStreamer-modul
+Comment[id]=Backend phonon GStreamer
+Comment[is]=Phonon GStreamer bakendi
+Comment[it]=Motore Gstreamer di Phonon
+Comment[ja]=Phonon GStreamer バックエンド
+Comment[kk]=Phonon GStreamer тетігі
+Comment[ko]=Phonon GStreamer 백엔드
+Comment[ku]=Binesaza Phonon GStreamer
+Comment[lt]=Phonon GStreamer galinė sąsaja
+Comment[lv]=Phonon GStreamer aizmugure
+Comment[mr]=फोनॉन जी-स्ट्रीमर बॅकएन्ड
+Comment[nb]=Phonon-motor for GStreamer
+Comment[nds]=GStreamer-Hülpprogramm för Phonon
+Comment[nl]=GStreamer-backend (Phonon)
+Comment[nn]=Phonon-motor for GStreamer
+Comment[pa]=ਫੋਨੋਨ ਜਸਟੀਰਮਰ ਬੈਕਐਂਡ
+Comment[pl]=Obsługa GStreamera przez Phonon
+Comment[pt]=Infra-estrutura do GStreamer para o Phonon
+Comment[pt_BR]=Infraestrutura do GStreamer para o Phonon
+Comment[ro]=Suportul GStreamer pentru Phonon
+Comment[ru]=Механизм GStreamer для Phonon
+Comment[se]=Phonon GStreamer duogášmohtor
+Comment[sk]=Podsystém Phonon GStreamer
+Comment[sl]=Zaledje GStreamer za Phonon
+Comment[sr]=Гстример као позадина Фонона
+Comment[sr@ijekavian]=Гстример као позадина Фонона
+Comment[sr@ijekavianlatin]=GStreamer kao pozadina Phonona
+Comment[sr@latin]=GStreamer kao pozadina Phonona
+Comment[sv]=Phonon Gstreamer-gränssnitt
+Comment[th]=โปรแกรมเบื้องหลัง GStreamer ของ Phonon
+Comment[tr]=Phonon GStreamer arka ucu
+Comment[ug]=Phonon GStreamer نىڭ ئارقائۇچى
+Comment[uk]=Модуль використання GStreamer у Phonon
+Comment[x-test]=xxPhonon GStreamer backendxx
+Comment[zh_CN]=Phonon GStreamer 后端
+Comment[zh_TW]=Phonon GStreamer 後端介面


--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -10,6 +10,7 @@
 InitialPreference=15

 Name=GStreamer
+Name[ast]=GStreamer
 Name[bg]=GStreamer
 Name[bs]=Gstreamer
 Name[ca]=GStreamer


COMP: Update SimpleITKFilters remote module

88f6dd2 Add wrapping for DICOMOrient and NPaste image filter
e383bad COMP: fix compilation error with SetDesiredCoordinateOrientation

--- Modules/Remote/SimpleITKFilters.remote.cmake
+++ Modules/Remote/SimpleITKFilters.remote.cmake
@@ -49,5 +49,5 @@
   contains a discrete hessian, and a composite filter to compute objectness."
   MODULE_COMPLIANCE_LEVEL 3
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSimpleITKFilters.git
-  GIT_TAG ce51d77771a54e7e0791fadb15e50dc38cbd8358
+  GIT_TAG a2101c137d2c99cf32b2d9600b1e4c3e14722a16
   )


Add ctk_option_logical_expression_to_message function

--- CMake/ctkMacroOptionUtils.cmake
+++ CMake/ctkMacroOptionUtils.cmake
@@ -1,3 +1,20 @@
+
+function(ctk_option_logical_expression_to_message varname logical_expr)
+  set(enabling_msg)
+  foreach(arg ${logical_expr})
+    if(NOT "${${arg}}" STREQUAL "")
+      set(value_as_int 0)
+      if(${${arg}})
+        set(value_as_int 1)
+      endif()
+      set(enabling_msg "${enabling_msg} ${arg}:${value_as_int}")
+    else()
+      set(enabling_msg "${enabling_msg} ${arg}")
+    endif()
+  endforeach()
+  set(${varname} ${enabling_msg} PARENT_SCOPE)
+endfunction()
+
 macro(ctk_option option_prefix name doc default)
   option(${option_prefix}_${name} ${doc} ${default})
   mark_as_advanced(${option_prefix}_${name})
@@ -12,17 +29,7 @@
       set(${option_prefix}_${name} ON CACHE BOOL ${_doc_string} FORCE)
       # Generate user-friendly message
       set(enabling_msg)
-      foreach(arg ${ARGN})
-        if(NOT "${${arg}}" STREQUAL "")
-          set(value_as_int 0)
-          if(${${arg}})
-            set(value_as_int 1)
-          endif()
-          set(enabling_msg "${enabling_msg} ${arg}:${value_as_int}")
-        else()
-          set(enabling_msg "${enabling_msg} ${arg}")
-        endif()
-      endforeach()
+      ctk_option_logical_expression_to_message(enabling_msg "${ARGN}")
       message("Enabling [${option_prefix}_${name}] because of [${enabling_msg}] evaluates to True")
     endif()
   endif()


Add matchpoint to workbench release config

--- CMake/BuildConfigurations/WorkbenchRelease.cmake
+++ CMake/BuildConfigurations/WorkbenchRelease.cmake
@@ -1,4 +1,20 @@
 include(${CMAKE_CURRENT_LIST_DIR}/Default.cmake)
+
+set(MITK_CONFIG_PACKAGES ${MITK_CONFIG_PACKAGES}
+  MatchPoint
+)
+
+set(MITK_CONFIG_PLUGINS ${MITK_CONFIG_PLUGINS}
+  org.mitk.gui.qt.multilabelsegmentation
+  org.mitk.matchpoint.core.helper
+  org.mitk.gui.qt.matchpoint.algorithm.browser
+  org.mitk.gui.qt.matchpoint.algorithm.control
+  org.mitk.gui.qt.matchpoint.mapper
+  org.mitk.gui.qt.matchpoint.framereg
+  org.mitk.gui.qt.matchpoint.visualizer
+  org.mitk.gui.qt.matchpoint.evaluator
+  org.mitk.gui.qt.matchpoint.manipulator
+)

 set(MITK_VTK_DEBUG_LEAKS OFF CACHE BOOL "Enable VTK Debug Leaks" FORCE)


Modify robin-map download to look in system first (#1964)

Instead of downloading unconditionally, look for system install.

--- src/cmake/externalpackages.cmake
+++ src/cmake/externalpackages.cmake
@@ -527,29 +527,47 @@
 ###########################################################################
 # Tessil/robin-map

+option (BUILD_ROBINMAP_FORCE "Force local download/build of robin-map even if installed" OFF)
+option (BUILD_MISSING_ROBINMAP "Local download/build of robin-map if not installed" ON)
 set (BUILD_ROBINMAP_VERSION "1e59f1993c7b6eace15032f38b5acb0bc34f530b" CACHE STRING "Preferred Tessil/robin-map version, of downloading/building our own")
+set (ROBINMAP_HOME "" CACHE STRING "Installed robin-map location hint")

 macro (find_or_download_robin_map)
+    # If we weren't told to force our own download/build of robin-map, look
+    # for an installed version. Still prefer a copy that seems to be
+    # locally installed in this tree.
+    if (NOT BUILD_ROBINMAP_FORCE)
+        find_path (ROBINMAP_INCLUDE_DIR tsl/robin_map.h
+               "${PROJECT_SOURCE_DIR}/ext/robin-map/tsl/"
+               "${ROBINMAP_HOME}"
+               "$ENV{ROBINMAP_HOME}"
+               )
+    endif ()
+    # If an external copy wasn't found and we requested that missing
+    # packages be built, or we we are forcing a local copy to be built, then
+    # download and build it.
     # Download the headers from github
-    message (STATUS "Downloading local Tessil/robin-map")
-    set (ROBINMAP_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/robin-map")
-    set (ROBINMAP_GIT_REPOSITORY "https://github.com/Tessil/robin-map")
-    if (NOT IS_DIRECTORY ${ROBINMAP_INSTALL_DIR}/tsl)
-        find_package (Git REQUIRED)
-        execute_process(COMMAND             ${GIT_EXECUTABLE} clone    ${ROBINMAP_GIT_REPOSITORY} -n ${ROBINMAP_INSTALL_DIR})
-        execute_process(COMMAND             ${GIT_EXECUTABLE} checkout ${BUILD_ROBINMAP_VERSION}
-                        WORKING_DIRECTORY   ${ROBINMAP_INSTALL_DIR})
-
-        if (IS_DIRECTORY ${ROBINMAP_INSTALL_DIR}/tsl)
-            message (STATUS "DOWNLOADED Tessil/robin-map to ${ROBINMAP_INSTALL_DIR}.\n"
-                     "Remove that dir to get rid of it.")
-        else ()
-            message (FATAL_ERROR "Could not download Tessil/robin-map")
-        endif ()
-    endif ()
-    set (ROBINMAP_INCLUDE_DIR "${ROBINMAP_INSTALL_DIR}")
+    if ((BUILD_MISSING_ROBINMAP AND NOT ROBINMAP_INCLUDE_DIR) OR BUILD_ROBINMAP_FORCE)
+        message (STATUS "Downloading local Tessil/robin-map")
+        set (ROBINMAP_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/robin-map")
+        set (ROBINMAP_GIT_REPOSITORY "https://github.com/Tessil/robin-map")
+        if (NOT IS_DIRECTORY ${ROBINMAP_INSTALL_DIR}/tsl)
+            find_package (Git REQUIRED)
+            execute_process(COMMAND             ${GIT_EXECUTABLE} clone    ${ROBINMAP_GIT_REPOSITORY} -n ${ROBINMAP_INSTALL_DIR})
+            execute_process(COMMAND             ${GIT_EXECUTABLE} checkout ${BUILD_ROBINMAP_VERSION}
+                            WORKING_DIRECTORY   ${ROBINMAP_INSTALL_DIR})
+                if (IS_DIRECTORY ${ROBINMAP_INSTALL_DIR}/tsl)
+                message (STATUS "DOWNLOADED Tessil/robin-map to ${ROBINMAP_INSTALL_DIR}.\n"
+                         "Remove that dir to get rid of it.")
+            else ()
+                message (FATAL_ERROR "Could not download Tessil/robin-map")
+            endif ()
+        endif ()
+        set (ROBINMAP_INCLUDE_DIR "${ROBINMAP_INSTALL_DIR}")
+    endif ()
+
     if (ROBINMAP_INCLUDE_DIR)
-        message (STATUS "Tessil/robin-map include dir: ${ROBINMAP_INCLUDE_DIR}")
+        message (STATUS "robin-map include dir: ${ROBINMAP_INCLUDE_DIR}")
     else ()
         message (FATAL_ERROR "Tessil/robin-map is missing!")
     endif ()


Explicitly disable Qwt

Explicitly disable Qwt

--- CMake/BuildConfigurations/Minimal.cmake
+++ CMake/BuildConfigurations/Minimal.cmake
@@ -3,3 +3,4 @@
 set(MITK_USE_BLUEBERRY OFF CACHE BOOL "" FORCE)
 set(MITK_USE_CTK OFF CACHE BOOL "" FORCE)
 set(MITK_USE_Qt5 OFF CACHE BOOL "" FORCE)
+set(MITK_USE_Qwt OFF CACHE BOOL "" FORCE)


modules: updated FindMagnum.cmake from Magnum repository.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -35,6 +35,7 @@
 #                     and TgaImporter plugin)
 #  MagnumFontConverter - Magnum bitmap font converter plugin (depends on Text
 #                     component and TgaImageConverter plugin)
+#  ObjImporter      - OBJ importer plugin
 #  TgaImageConverter - TGA image converter plugin
 #  TgaImporter      - TGA importer plugin
 #  WavAudioImporter - WAV audio importer plugin (depends on Audio component)
@@ -333,6 +334,9 @@
     elseif(${component} STREQUAL TextureTools)
         set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES Atlas.h)
     endif()
+
+    # The plugins don't have any dependencies, nothing additional to do for
+    # them

     # Try to find the includes
     if(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES)


modules: link EGL along with SDL if targetting non-desktop ES.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -389,6 +389,16 @@
                 unset(MAGNUM_${_COMPONENT}_LIBRARY)
             endif()

+            # Find also EGL library, if on ES
+            if(MAGNUM_TARGET_GLES AND NOT MAGNUM_TARGET_DESKTOP_GLES)
+                find_package(EGL)
+                if(EGL_FOUND)
+                    list(APPEND _MAGNUM_${_COMPONENT}_LIBRARIES ${EGL_LIBRARY})
+                else()
+                    unset(MAGNUM_${_COMPONENT}_LIBRARY)
+                endif()
+            endif()
+
         # (Windowless) NaCl application dependencies
         elseif(${component} STREQUAL NaClApplication OR ${component} STREQUAL WindowlessNaClApplication)
             set(_MAGNUM_${_COMPONENT}_LIBRARIES ppapi_cpp ppapi)


fpta-cmake: add detection Elbrus lcc/l++.

--- cmake.fpta/compiler.cmake
+++ cmake.fpta/compiler.cmake
@@ -45,6 +45,50 @@
       Your G++ version is ${CMAKE_CXX_COMPILER_VERSION}, please update")
   endif()
 endif()
+
+# Check for Elbrus lcc
+execute_process(COMMAND ${CMAKE_C_COMPILER} --version
+  OUTPUT_VARIABLE tmp_lcc_probe_version
+  RESULT_VARIABLE tmp_lcc_probe_result ERROR_QUIET)
+if(tmp_lcc_probe_result EQUAL 0)
+  string(FIND "${tmp_lcc_probe_version}" "lcc:" tmp_lcc_marker)
+  string(FIND "${tmp_lcc_probe_version}" ":e2k-" tmp_e2k_marker)
+  if(tmp_lcc_marker GREATER -1 AND tmp_e2k_marker GREATER tmp_lcc_marker)
+    execute_process(COMMAND ${CMAKE_C_COMPILER} -print-version
+      OUTPUT_VARIABLE CMAKE_C_COMPILER_VERSION
+      RESULT_VARIABLE tmp_lcc_probe_result)
+    set(CMAKE_COMPILER_IS_ELBRUSC ON)
+    set(CMAKE_C_COMPILER_ID "Elbrus")
+  else()
+    set(CMAKE_COMPILER_IS_ELBRUSC OFF)
+  endif()
+  unset(tmp_lcc_marker)
+  unset(tmp_e2k_marker)
+endif()
+unset(tmp_lcc_probe_version)
+unset(tmp_lcc_probe_result)
+
+# Check for Elbrus l++
+execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
+  OUTPUT_VARIABLE tmp_lxx_probe_version
+  RESULT_VARIABLE tmp_lxx_probe_result ERROR_QUIET)
+if(tmp_lxx_probe_result EQUAL 0)
+  string(FIND "${tmp_lxx_probe_version}" "lcc:" tmp_lcc_marker)
+  string(FIND "${tmp_lxx_probe_version}" ":e2k-" tmp_e2k_marker)
+  if(tmp_lcc_marker GREATER -1 AND tmp_e2k_marker GREATER tmp_lcc_marker)
+    execute_process(COMMAND ${CMAKE_CXX_COMPILER} -print-version
+      OUTPUT_VARIABLE CMAKE_CXX_COMPILER_VERSION
+      RESULT_VARIABLE tmp_lxx_probe_result)
+    set(CMAKE_COMPILER_IS_ELBRUSCXX ON)
+    set(CMAKE_CXX_COMPILER_ID "Elbrus")
+  else()
+    set(CMAKE_COMPILER_IS_ELBRUSCXX OFF)
+  endif()
+  unset(tmp_lcc_marker)
+  unset(tmp_e2k_marker)
+endif()
+unset(tmp_lxx_probe_version)
+unset(tmp_lxx_probe_result)

 #
 # Check supported standards


fpta-cmake: check GNUCXX version.

fpta-cmake: check GNUCXX version.

--- cmake.fpta/compiler.cmake
+++ cmake.fpta/compiler.cmake
@@ -33,9 +33,16 @@
 # only in version 4.5 https://gcc.gnu.org/projects/cxx0x.html
 #
 if(CMAKE_COMPILER_IS_GNUCC)
+  if(CMAKE_C_COMPILER_VERSION VERSION_LESS 4.5)
+    message(FATAL_ERROR "
+      Your GCC version is ${CMAKE_C_COMPILER_VERSION}, please update")
+  endif()
+endif()
+
+if(CMAKE_COMPILER_IS_GNUCXX)
   if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.5)
     message(FATAL_ERROR "
-      Your GCC version is ${CMAKE_CXX_COMPILER_VERSION}, please update")
+      Your G++ version is ${CMAKE_CXX_COMPILER_VERSION}, please update")
   endif()
 endif()


Fix glog upstream autoconf

Fix glog upstream autoconf

--- cmake/External/glog.cmake
+++ cmake/External/glog.cmake
@@ -37,6 +37,7 @@
       GIT_TAG "v0.3.4"
       UPDATE_COMMAND ""
       INSTALL_DIR ${gflags_INSTALL}
+      PATCH_COMMAND autoreconf -i ${glog_PREFIX}/src/glog
       CONFIGURE_COMMAND env "CFLAGS=${GLOG_C_FLAGS}" "CXXFLAGS=${GLOG_CXX_FLAGS}" ${glog_PREFIX}/src/glog/configure --prefix=${glog_INSTALL} --enable-shared=no --enable-static=yes --with-gflags=${GFLAGS_LIBRARY_DIRS}/..
       LOG_DOWNLOAD 1
       LOG_CONFIGURE 1


find gstreamer headers in the default location CCMAIL: cbro@semperpax.com CCMAIL: andriusmao@gmail.com

find gstreamer headers in the default location
CCMAIL: 0c2851a4f8ab4aa5606e69c0757771dd13dbe686@semperpax.com
CCMAIL: 2f097127025817f451e61f96cd8639181dbdabdd@gmail.com

--- cmake/FindGStreamer.cmake
+++ cmake/FindGStreamer.cmake
@@ -33,6 +33,7 @@
 FIND_PATH(GSTREAMER_INCLUDE_DIR gst/gst.h
    PATHS
    ${PKG_GSTREAMER_INCLUDE_DIRS}
+   PATH_SUFFIXES gstreamer-0.10
    )

 FIND_LIBRARY(GSTREAMER_LIBRARIES NAMES gstreamer-0.10


Don't require libvorbisenc for vorbisfile support

--- cmake/FindOggVorbis.cmake
+++ cmake/FindOggVorbis.cmake
@@ -30,16 +30,19 @@
                  OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY VORBISENC_LIBRARY)

-if(VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBISENC_LIBRARY)
+if(VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
    set(OGGVORBIS_FOUND TRUE)

    set(OGGVORBIS_LIBRARIES ${OGG_LIBRARY} ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY} ${VORBISENC_LIBRARY})
    set(OGGVORBIS_INCLUDE_DIRS ${OGG_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR})

-   set(_CMAKE_REQUIRED_LIBRARIES_TMP ${CMAKE_REQUIRED_LIBRARIES})
-   set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${OGGVORBIS_LIBRARIES})
-   check_function_exists(vorbis_bitrate_addblock HAVE_LIBVORBISENC2)
-   set(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_TMP})
+   if(VORBISENC_LIBRARY)
+       set(OGGVORBIS_LIBRARIES ${OGGVORBIS_LIBRARIES} ${VORBISENC_LIBRARY})
+       set(_CMAKE_REQUIRED_LIBRARIES_TMP ${CMAKE_REQUIRED_LIBRARIES})
+       set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${OGGVORBIS_LIBRARIES})
+       check_function_exists(vorbis_bitrate_addblock HAVE_LIBVORBISENC2)
+       set(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_TMP})
+   endif(VORBISENC_LIBRARY)

    if(HAVE_LIBVORBISENC2)
       set(OGGVORBIS_VERSION 2)
@@ -47,10 +50,10 @@
       set(OGGVORBIS_VERSION 1)
    endif(HAVE_LIBVORBISENC2)

-else(VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBISENC_LIBRARY)
+else(VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
    set(OGGVORBIS_VERSION)
    set(OGGVORBIS_FOUND FALSE)
-endif(VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBISENC_LIBRARY)
+endif(VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)

 if(OGGVORBIS_FOUND)


removes detection of verilator_coverage executable

--- cmake/FindVerilator.cmake
+++ cmake/FindVerilator.cmake
@@ -41,14 +41,6 @@
     DOC "Path to the Verilator executable"
 )

-find_program(VERILATOR_COVERAGE_EXECUTABLE
-	NAMES verilator_coverage_bin verilator_coverage_bin_dbg
-    HINTS ${CONAN_VERILATOR_ROOT} ENV VERILATOR_ROOT
-    PATH_SUFFIXES bin
-    REQUIRED
-    DOC "Path to the Verilator coverage executable"
-)
-
 if(${CONAN_VERILATOR_ROOT})
     set (ENV{VERILATOR_ROOT} ${CONAN_VERILATOR_ROOT})
     set (VERILATOR_EXECUTABLE_DIR ${CONAN_BIN_DIRS_VERILATOR})
@@ -64,11 +56,10 @@
 endif()

 mark_as_advanced(VERILATOR_EXECUTABLE)
-mark_as_advanced(VERILATOR_COVERAGE_EXECUTABLE)
 mark_as_advanced(VERILATOR_INCLUDE_DIR)

 find_package_handle_standard_args(Verilator REQUIRED_VARS
-    VERILATOR_EXECUTABLE VERILATOR_COVERAGE_EXECUTABLE VERILATOR_INCLUDE_DIR)
+    VERILATOR_EXECUTABLE VERILATOR_INCLUDE_DIR)

 set_source_files_properties(
     ${VERILATOR_INCLUDE_DIR}/verilated_cov.cpp


modifed hunter config

modifed hunter config

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -13,9 +13,9 @@

 hunter_config(
     XLink
-    VERSION "luxonis-2020.2-test-4"
-    URL "/Users/blackbird/Desktop/codes/Luxonis/new_build_system/XLink.zip"
-    SHA1 "ad1bbaccfa548860274a040f5d17b6c8533ae5fa"
+    VERSION "luxonis-2020.2-test_usb_info"
+    URL "https://github.com/luxonis/XLink/archive/test_usb_info.zip"
+    SHA1 "1ce5d55a3b0a0b9df85837afe5024986c857c57c"
     CMAKE_ARGS
         CMAKE_POSITION_INDEPENDENT_CODE=ON
 )


Corrects an issue where a change to the target template may not generate the appropriate main.cs for that template after the initial build configure.

--- Tools/CMake/torque3d.cmake
+++ Tools/CMake/torque3d.cmake
@@ -624,7 +624,7 @@
 if(NOT EXISTS "${projectOutDir}/${PROJECT_NAME}.torsion")
     CONFIGURE_FILE("${cmakeDir}/template.torsion.in" "${projectOutDir}/${PROJECT_NAME}.torsion")
 endif()
-if(EXISTS "${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/game/main.cs.in" AND NOT EXISTS "${projectOutDir}/main.cs")
+if(EXISTS "${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/game/main.cs.in")
     CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/game/main.cs.in" "${projectOutDir}/main.cs")
 endif()
 if(WIN32)


-Wno-unused-local-typedef surpresses unused typedef spam (in fastDelegate in particular)

--- Tools/CMake/torque3d.cmake
+++ Tools/CMake/torque3d.cmake
@@ -29,8 +29,8 @@
     #set(CXX_FLAG32 "-m32") #uncomment for build x32 on OSx64

     if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors -Wno-return-type-c-linkage ${TORQUE_ADDITIONAL_LINKER_FLAGS}")
-	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors -Wno-return-type-c-linkage ${TORQUE_ADDITIONAL_LINKER_FLAGS}")
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors -Wno-return-type-c-linkage -Wno-unused-local-typedef ${TORQUE_ADDITIONAL_LINKER_FLAGS}")
+	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors -Wno-return-type-c-linkage -Wno-unused-local-typedef ${TORQUE_ADDITIONAL_LINKER_FLAGS}")
     else()
     # default compiler flags
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors ${TORQUE_ADDITIONAL_LINKER_FLAGS} -Wl,-rpath,'$$ORIGIN'")


Fixed compilation error

Fixed compilation error

--- src/cmake/CMakeSources.cmake
+++ src/cmake/CMakeSources.cmake
@@ -163,7 +163,6 @@
 common/sphere_library/CSRand.h
 common/sphere_library/CSString.cpp
 common/sphere_library/CSString.h
-common/sphere_library/CStack.h
 common/sphere_library/CSTime.cpp
 common/sphere_library/CSTime.h
 common/sphere_library/CSWindow.cpp
@@ -173,6 +172,7 @@
 common/sphere_library/squeues.h
 common/sphere_library/sresetevents.cpp
 common/sphere_library/sresetevents.h
+common/sphere_library/sstacks.h
 )
 SOURCE_GROUP (common\\sphere_library FILES ${spherelibrary_SRCS})


COMP: Temporarily disabled mitkNavigationToolStorageSerializerAndDeserializerTest since it fails every now and then.

--- Modules/IGT/Testing/files.cmake
+++ Modules/IGT/Testing/files.cmake
@@ -32,13 +32,12 @@

    # ------------------ Navigation Tool Management Tests -------------------
    mitkNavigationToolStorageTest.cpp
-   mitkNavigationToolStorageSerializerAndDeserializerTest.cpp
    mitkNavigationToolTest.cpp
    mitkNavigationToolReaderAndWriterTest.cpp
    # -----------------------------------------------------------------------

    # ------------------ Deavtivated Tests ----------------------------------
-
+   # mitkNavigationToolStorageSerializerAndDeserializerTest.cpp # see bug 12730
    # -----------------------------------------------------------------------
 )


COMP: Commented out test until bug is fixed

--- Modules/IGT/Testing/files.cmake
+++ Modules/IGT/Testing/files.cmake
@@ -54,7 +54,7 @@
    # ------------------ Navigation Tool Management Tests -------------------
    mitkNavigationToolStorageTest.cpp
    mitkNavigationToolTest.cpp
-   mitkNavigationToolReaderAndWriterTest.cpp
+   # mitkNavigationToolReaderAndWriterTest.cpp # deactivated because of bug 18835
    # -----------------------------------------------------------------------
 )


add path suffixes for windows build

add path suffixes for windows build

git-svn-id: 7720f8ced686bbe1e9a8fc98aef2dd4d5d9a3e92@51 995b7d7e-cf50-0410-b6c9-9f4ebe303554

--- CMakeModules/FindlibSquish.cmake
+++ CMakeModules/FindlibSquish.cmake
@@ -4,7 +4,7 @@
 #  LIBSQUISH_LIBRARIES

 FIND_PATH(LIBSQUISH_INCLUDE_DIR squish.h PATHS . squish .. ../squish DOC "Directory containing libSquish headers")
-FIND_LIBRARY(LIBSQUISH_LIBRARY NAMES squish libsquish PATHS . squish .. ../squish DOC "Path to libSquish library")
+FIND_LIBRARY(LIBSQUISH_LIBRARY NAMES squish libsquish PATHS . squish .. ../squish PATH_SUFFIXES lib release minsizerel relwithdebinfo DOC "Path to libSquish library")

 SET(LIBSQUISH_LIBRARIES ${LIBSQUISH_LIBRARY})


build: separate positive and negative warning flags

--- cmake/modules/DispatchCompilerWarnings.cmake
+++ cmake/modules/DispatchCompilerWarnings.cmake
@@ -8,8 +8,6 @@
     add_compile_options(-Werror)
     add_compile_options(-Wall)
     add_compile_options(-Wextra)
-    add_compile_options(-Wno-unknown-warning-option)
-    add_compile_options(-Wno-trigraphs)
     add_compile_options(-Wmissing-field-initializers)
     add_compile_options(-Wmissing-prototypes)
     add_compile_options(-Wdocumentation)
@@ -26,7 +24,6 @@
     add_compile_options(-Wuninitialized)
     add_compile_options(-Wunknown-pragmas)
     add_compile_options(-Wshadow)
-    add_compile_options(-Wno-four-char-constants)
     add_compile_options(-Wconversion)
     add_compile_options(-Wconstant-conversion)
     add_compile_options(-Wint-conversion)
@@ -66,6 +63,10 @@
     add_compile_options(-Wtautological-compare)
     add_compile_options(-Wunguarded-availability)
     add_compile_options(-Wunused)
+
+    add_compile_options(-Wno-unknown-warning-option)
+    add_compile_options(-Wno-trigraphs)
+    add_compile_options(-Wno-four-char-constants)
     add_compile_options(-Wno-disabled-macro-expansion)
     add_compile_options(-Wno-pedantic)
     add_compile_options(-Wno-bad-function-cast)


iox-#350 added ccache as option

iox-#350 added ccache as option

Signed-off-by: Christian Eltzschig <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@elchris.org>

--- iceoryx_meta/build_options.cmake
+++ iceoryx_meta/build_options.cmake
@@ -16,22 +16,25 @@

 cmake_minimum_required(VERSION 3.5)

+## please add new entries alphabetically sorted
+option(BINDING_C "Builds the C language bindings" ON)
 option(BUILD_ALL "Build with all extensions and all tests" OFF)
-option(TOML_CONFIG "TOML support for RouDi with dynamic configuration" ON)
-option(ONE_TO_MANY_ONLY "Restricts communication to 1:n pattern" OFF)
+option(BUILD_DOC "Build and generate documentation" OFF)
+option(BUILD_SHARED_LIBS "Build iceoryx as shared libraries" OFF)
 option(BUILD_STRICT "Build is performed with '-Werror'" OFF)
-option(BUILD_SHARED_LIBS "Build iceoryx as shared libraries" OFF)
 option(BUILD_TEST "Build all tests" OFF)
-option(BUILD_DOC "Build and generate documentation" OFF)
+option(CCACHE "Use ccache when it's available" ON)
+option(CLANG_TIDY "Execute Clang-Tidy" OFF)
 option(COVERAGE "Build iceoryx with gcov flags" OFF)
+option(DDS_GATEWAY "Builds the iceoryx dds gateway - enables internode communication via dds" OFF)
 option(EXAMPLES "Build all iceoryx examples" OFF)
 option(INTROSPECTION "Builds the introspection client which requires the ncurses library with an activated terminfo feature" ON)
-option(DDS_GATEWAY "Builds the iceoryx dds gateway - enables internode communication via dds" OFF)
-option(BINDING_C "Builds the C language bindings" ON)
+option(ONE_TO_MANY_ONLY "Restricts communication to 1:n pattern" OFF)
+option(ROUDI_ENVIRONMENT "Build RouDi Environment for testing, is enabled when building tests" OFF)
 option(SANITIZE "Build with sanitizers" OFF)
-option(CLANG_TIDY "Execute Clang-Tidy" OFF)
-option(ROUDI_ENVIRONMENT "Build RouDi Environment for testing, is enabled when building tests" OFF)
 option(TEST_WITH_ADDITIONAL_USER "Build Test with additional user accounts for testing access control" OFF)
+option(TOML_CONFIG "TOML support for RouDi with dynamic configuration" ON)
+
 set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # "Create compile_commands.json file"

 if(BUILD_ALL)
@@ -43,34 +46,43 @@
   set(DDS_GATEWAY ON)
 endif()

-if(BUILD_TEST)
+if(BUILD_TEST AND NOT ROUDI_ENVIRONMENT)
+  set(ROUDI_ENV_HINT " (activated since its required by BUILD_TEST)")
   set(ROUDI_ENVIRONMENT ON)
 endif()

+if(CCACHE)
+  find_program(CCACHE_PROGRAM ccache)
+  if(CCACHE_PROGRAM)
+    set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_PROGRAM})
+  else()
+    set(CCACHE_HINT " (ccache not found)")
+  endif()
+endif()
+
 function(show_config_options)
-  if(BUILD_TEST)
-    set(ROUDI_ENV_HINT " (required by BUILD_TEST)")
-  endif()
-
   message("")
-  message("       Configured Options")
+  message("       CMake Options")
   message("          CMAKE_BUILD_TYPE.....................: " ${CMAKE_BUILD_TYPE})
   message("          CMAKE_TOOLCHAIN_FILE.................: " ${CMAKE_TOOLCHAIN_FILE})
-  message("          TOML_CONFIG..........................: " ${TOML_CONFIG})
+  message("          CMAKE_EXPORT_COMPILE_COMMANDS........: " ${CMAKE_EXPORT_COMPILE_COMMANDS})
+  message("")
+  message("       iceoryx Options")
+  message("          BINDING_C............................: " ${BINDING_C})
   message("          BUILD_ALL............................: " ${BUILD_ALL})
+  message("          BUILD_DOC............................: " ${BUILD_DOC})
+  message("          BUILD_SHARED_LIBS....................: " ${BUILD_SHARED_LIBS})
   message("          BUILD_STRICT.........................: " ${BUILD_STRICT})
-  message("          BUILD_SHARED_LIBS....................: " ${BUILD_SHARED_LIBS})
   message("          BUILD_TEST...........................: " ${BUILD_TEST})
+  message("          CCACHE...............................: " ${CCACHE} ${CCACHE_HINT})
+  message("          CLANG_TIDY...........................: " ${CLANG_TIDY})
+  message("          COVERAGE.............................: " ${COVERAGE})
+  message("          DDS_GATEWAY..........................: " ${DDS_GATEWAY})
   message("          EXAMPLES.............................: " ${EXAMPLES})
   message("          INTROSPECTION........................: " ${INTROSPECTION})
-  message("          DDS_GATEWAY..........................: " ${DDS_GATEWAY})
-  message("          BINDING_C............................: " ${BINDING_C})
-  message("          COVERAGE.............................: " ${COVERAGE})
+  message("          ONE_TO_MANY_ONLY ....................: " ${ONE_TO_MANY_ONLY})
+  message("          ROUDI_ENVIRONMENT....................: " ${ROUDI_ENVIRONMENT} ${ROUDI_ENV_HINT})
   message("          SANITIZE.............................: " ${SANITIZE})
-  message("          CLANG_TIDY...........................: " ${CLANG_TIDY})
-  message("          ROUDI_ENVIRONMENT....................: " ${ROUDI_ENVIRONMENT} ${ROUDI_ENV_HINT})
-  message("          CMAKE_EXPORT_COMPILE_COMMANDS........: " ${CMAKE_EXPORT_COMPILE_COMMANDS})
-  message("          ONE_TO_MANY_ONLY ....................: " ${ONE_TO_MANY_ONLY})
   message("          TEST_WITH_ADDITIONAL_USER ...........: " ${TEST_WITH_ADDITIONAL_USER})
-  message("          BUILD_DOC............................: " ${BUILD_DOC})
+  message("          TOML_CONFIG..........................: " ${TOML_CONFIG})
 endfunction()


Fixed redefinition warnings with LLVM_ENABLE_MODULES

Summary:
It seems we both have the HAVE_LIBCOMPRESSION define in the config header
and in the source files definitions of some files. This causes that the
Config.h header emits the following warning when we compile the Host module:

```
In file included from <module-includes>:21:
In file included from /Users/teemperor/llvm/llvm/tools/lldb/include/lldb/Host/MainLoop.h:13:
tools/lldb/include/lldb/Host/Config.h:33:9: warning: 'HAVE_LIBCOMPRESSION' macro redefined [-Wmacro-redefined]
        ^
<command line>:1:9: note: previous definition is here
        ^
```

It's not really clear why the define is in both places (the commit message
just says it fixes some unspecified bug), but we can easily work around this
by just guarding our define in Config.h.

Reviewers: aprantl

Reviewed By: aprantl

Subscribers: mgorny, lldb-commits

Differential Revision: https://reviews.llvm.org/D48977

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@336377 91177308-0d34-0410-b5e6-96231b3b80d8

--- include/lldb/Host/Config.h.cmake
+++ include/lldb/Host/Config.h.cmake
@@ -30,6 +30,8 @@

 #cmakedefine01 HAVE_NR_PROCESS_VM_READV

+#ifndef HAVE_LIBCOMPRESSION
 #cmakedefine HAVE_LIBCOMPRESSION
+#endif

 #endif // #ifndef LLDB_HOST_CONFIG_H


Change so that different flavours of VTK might be chosen by the user.

--- Examples/Build/vtkMy/vtkMy.cmake
+++ Examples/Build/vtkMy/vtkMy.cmake
@@ -7,7 +7,7 @@
 IF (USE_VTK_FILE)
   INCLUDE (${USE_VTK_FILE})
 ELSE (USE_VTK_FILE)
-  MESSAGE("Error. Unable to find VTK, please edit your CMakeCache.txt file to specify the correct location of your VTK build.")
+  MESSAGE("Warning. This project is supposed to work with VTK, which might be found on your system as different flavours: installed VTK, or (multiple) built VTK. Please, make sure that the VTK_INSTALL_PATH or VTK_BINARY_PATH setting reflect which VTK you are planning to use, then set one of the USE_INSTALLED_VTK or USE_BUILT_VTK to ON.")
   SET (VTKMY_CAN_BUILD 0)
 ENDIF (USE_VTK_FILE)

@@ -32,9 +32,13 @@
 # Defaults to the same VTK setting.
 #

-OPTION(BUILD_SHARED_LIBS
-       "Build with shared libraries."
-       ${VTK_BUILD_SHARED_LIBS})
+IF (VTKMY_CAN_BUILD)
+
+  OPTION(BUILD_SHARED_LIBS
+         "Build with shared libraries."
+         ${VTK_BUILD_SHARED_LIBS})
+
+ENDIF (VTKMY_CAN_BUILD)

 #
 # Wrap Tcl, Java, Python


Update ios.toolchain.cmake

Update ios.toolchain.cmake

Fixed an issue where compilation was broken on incremental builds.

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -182,22 +182,28 @@
 message(STATUS "Configuring iOS build for platform: ${IOS_PLATFORM}, "
   "architecture(s): ${IOS_ARCH}")
 # If user did not specify the SDK root to use, then query xcodebuild for it.
-if (NOT EXISTS ${CMAKE_OSX_SYSROOT})
+execute_process(COMMAND xcodebuild -version -sdk ${XCODE_IOS_PLATFORM} Path
+    OUTPUT_VARIABLE CMAKE_OSX_SYSROOT_INT
+     OUTPUT_QUIET ERROR_QUIET
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+# If user did not specify the SDK root to use, then query xcodebuild for it.
+if (NOT DEFINED CMAKE_OSX_SYSROOT OR (NOT CMAKE_OSX_SYSROOT STREQUAL CMAKE_OSX_SYSROOT_INT))
   execute_process(COMMAND xcodebuild -version -sdk ${XCODE_IOS_PLATFORM} Path
     OUTPUT_VARIABLE CMAKE_OSX_SYSROOT
     ERROR_QUIET
     OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-    if (NOT EXISTS ${CMAKE_OSX_SYSROOT})
-      message(SEND_ERROR "Please make sure that Xcode is installed and that the toolchain"
-      "is pointing to the correct path. Please run:"
-      "sudo xcode-select -s /Applications/Xcode.app/Contents/Developer"
-      "and see if that fixes the problem for you.")
-      message(FATAL_ERROR "Invalid CMAKE_OSX_SYSROOT: ${CMAKE_OSX_SYSROOT} "
-      "does not exist.")
-    else()
-       message(STATUS "Using SDK: ${CMAKE_OSX_SYSROOT} for platform: ${IOS_PLATFORM}")
-    endif()
+elseif(DEFINED CMAKE_OSX_SYSROOT)
+  message(STATUS "Using manually set SDK path: ${CMAKE_OSX_SYSROOT} for platform: ${IOS_PLATFORM}")
+endif()
+if (NOT EXISTS ${CMAKE_OSX_SYSROOT})
+  message(SEND_ERROR "Please make sure that Xcode is installed and that the toolchain"
+  "is pointing to the correct path. Please run:"
+  "sudo xcode-select -s /Applications/Xcode.app/Contents/Developer"
+  "and see if that fixes the problem for you.")
+  message(FATAL_ERROR "Invalid CMAKE_OSX_SYSROOT: ${CMAKE_OSX_SYSROOT} "
+  "does not exist.")
+else()
+   message(STATUS "Using SDK: ${CMAKE_OSX_SYSROOT} for platform: ${IOS_PLATFORM}")
 endif()
 # Specify minimum version of deployment target.
 if (NOT DEFINED IOS_DEPLOYMENT_TARGET)
@@ -405,7 +411,7 @@
   CMAKE_C_LINK_FLAGS
   CMAKE_CXX_LINK_FLAGS)
 foreach(VAR_TO_FORCE ${VARS_TO_FORCE_IN_CACHE})
-  set(${VAR_TO_FORCE} "${${VAR_TO_FORCE}}" CACHE STRING "" FORCE)
+  set(${VAR_TO_FORCE} "${${VAR_TO_FORCE}}" CACHE STRING "")
 endforeach()

 set(CMAKE_PLATFORM_HAS_INSTALLNAME 1)


Reorganized warning flags, disable -Wconversion due to know issues

--- flags.cmake
+++ flags.cmake
@@ -4,9 +4,11 @@
   SET (USING_CLANG FALSE)
 endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")

-SET (C_WARNINGS "-Wall -Wextra -Winit-self -pedantic -Wparentheses -Wfloat-equal -Wno-endif-labels -Wpointer-arith -Wdeprecated")
-SET (C_WARNINGS "${C_WARNINGS} -Wmissing-declarations -Wredundant-decls -Wswitch -Wswitch-enum -Wsign-promo -Wconversion")
-SET (C_WARNINGS "${C_WARNINGS} -Wcast-qual -Wmissing-include-dirs")
+SET (C_WARNINGS "-Wall -Wextra -pedantic")
+SET (C_WARNINGS "${C_WARNINGS} -Winit-self -Wparentheses -Wfloat-equal -Wno-endif-labels -Wpointer-arith -Wdeprecated")
+SET (C_WARNINGS "${C_WARNINGS} -Wmissing-declarations -Wredundant-decls -Wswitch -Wswitch-enum -Wsign-promo -Wcast-qual")
+SET (C_WARNINGS "${C_WARNINGS} -Wpacked -Wmissing-include-dirs -Wsign-conversion -Wdisabled-optimization -Winline")
+#SET (C_WARNINGS "${C_WARNINGS} -Wconversion")
 if(NOT USING_CLANG)
   SET( C_WARNINGS "${C_WARNINGS} -Wlogical-op")
 endif()
@@ -23,7 +25,7 @@
 SET (SHARED_C_FLAGS ${SHARED_C_FLAGS} CACHE STRING "Flags shared for all C file compiles")

 SET (SHARED_CXX_FLAGS "-std=c++11" CACHE STRING "Flags shared for all C++ file compiles")
-SET (SHARED_LD_FLAGS "-W1,-O1,--hash-style=gnu,--sort-common,--as-needed,--enable-new-dtags" CACHE STRING "Flags shared for all linker runs")
+SET (SHARED_LD_FLAGS "-W1,-O1,--hash-style=gnu,--as-needed,--enable-new-dtags" CACHE STRING "Flags shared for all linker runs")

 SET (CMAKE_C_FLAGS "${SHARED_C_FLAGS} ${C_WARNINGS}" CACHE STRING "Flags used for compiling C Files")
 SET (CMAKE_CXX_FLAGS "${SHARED_CXX_FLAGS} ${SHARED_C_FLAGS} ${C_WARNINGS} ${CXX_WARNINGS}")
@@ -35,4 +37,4 @@

 SET (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} ${OPTIMIZE_C_FLAGS} -DNDEBUG")
 SET (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} ${OPTIMIZE_C_FLAGS} -DNDEBUG")
-SET (CMAKE_LD_FLAGS_RELEASE "-s ${CMAKE_LD_FLAGS}")+SET (CMAKE_LD_FLAGS_RELEASE "-s ${CMAKE_LD_FLAGS}")


Bumped hardcoded version

Bumped hardcoded version

--- cmake/DetermineTomvizVersion.cmake
+++ cmake/DetermineTomvizVersion.cmake
@@ -7,7 +7,7 @@
 #   tomviz_version
 #   tomviz_version_long

-set(hardcoded_tomviz_version "0.6.1")
+set(hardcoded_tomviz_version "0.7.0")

 function(_set_version_vars versiontext)
   string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)[-]*(.*)" version_matches "${versiontext}")


Make CPack email available for all generators

Summary: This contact email will be used in the Debian generator and maybe others.

Test Plan:
```
ninja package
less CPackConfig.cmake  # make sure CPACK_PACKAGE_CONTACT and CPACK_NSIS_CONTACT are set properly
```

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5371

--- cmake/modules/PackageOptions.cmake
+++ cmake/modules/PackageOptions.cmake
@@ -2,6 +2,7 @@
 set(CPACK_PACKAGE_VENDOR "${COPYRIGHT_HOLDERS_FINAL}")
 set(CPACK_PACKAGE_DESCRIPTION "Bitcoin ABC is a Bitcoin Cash full node implementation.")
 set(CPACK_PACKAGE_HOMEPAGE_URL "${PROJECT_HOMEPAGE_URL}")
+set(CPACK_PACKAGE_CONTACT "info@bitcoinabc.org")

 set(CPACK_PACKAGE_INSTALL_DIRECTORY "Bitcoin-abc")
 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
@@ -34,7 +35,7 @@
 set(_nsis_bitcoin_qt "bitcoin-qt.exe")

 set(CPACK_NSIS_URL_INFO_ABOUT "${BITCOINABC_HOMEPAGE_URL}")
-set(CPACK_NSIS_CONTACT "info@bitcoinabc.org")
+set(CPACK_NSIS_CONTACT "${CPACK_PACKAGE_CONTACT}")

 set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/share/pixmaps/bitcoin-abc.ico")
 set(CPACK_NSIS_MUI_UNIICON "${CPACK_NSIS_MUI_ICON}")


Add dir

Add dir

--- Superbuild/Superbuild.cmake
+++ Superbuild/Superbuild.cmake
@@ -299,6 +299,7 @@
    	  "-DQt5Widgets_DIR:PATH=${Qt5Widgets_DIR}"
   	  "-DQt5Concurrent_DIR:PATH=${Qt5Concurrent_DIR}"
       "-DMACDEPLOYQT_OUTPUT_LEVEL:STRING=${MACDEPLOYQT_OUTPUT_LEVEL}"
+      "-DQWT_DIR:PATH=${QWT_DIR}"
     )
   ELSE()
     LIST(APPEND SCIRUN_CACHE_ARGS


rename teardown to cleanup

rename teardown to cleanup

--- test/cmake/ATFTestAddTests.cmake
+++ test/cmake/ATFTestAddTests.cmake
@@ -10,7 +10,7 @@
       "
 set(_wd \"${BINARY_DIR}/${_name}.\${_counter}\")
 add_test(${_name}.setup    ${CMAKE_COMMAND} -E   make_directory \"\${_wd}\")
-add_test(${_name}.teardown ${CMAKE_COMMAND} -E remove_directory \"\${_wd}\")
+add_test(${_name}.cleanup  ${CMAKE_COMMAND} -E remove_directory \"\${_wd}\")
 add_test(${_name}          ${CMAKE_COMMAND} -E env
          --unset=LANG --unset=LC_ALL --unset=LC_COLLATE --unset=LC_CTYPE
          --unset=LC_MESSAGES --unset=LC_MONETARY --unset=LC_NUMERIC
@@ -19,7 +19,7 @@
 set_tests_properties(${_name} PROPERTIES WORKING_DIRECTORY \"\${_wd}\")

 set_tests_properties(${_name}.setup     PROPERTIES FIXTURES_SETUP    ${_name}.f)
-set_tests_properties(${_name}.teardown  PROPERTIES FIXTURES_CLEANUP  ${_name}.f)
+set_tests_properties(${_name}.cleanup   PROPERTIES FIXTURES_CLEANUP  ${_name}.f)
 set_tests_properties(${_name}           PROPERTIES FIXTURES_REQUIRED ${_name}.f)

 math(EXPR _counter \"\${_counter}+1\")


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   17)
+SET(KWSYS_DATE_STAMP_DAY   18)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 08)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   06)
+SET(KWSYS_DATE_STAMP_DAY   07)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   29)
+SET(KWSYS_DATE_STAMP_DAY   30)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   06)
+SET(KWSYS_DATE_STAMP_DAY   07)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   21)
+SET(KWSYS_DATE_STAMP_DAY   22)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   26)
+SET(KWSYS_DATE_STAMP_DAY   27)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   19)
+SET(KWSYS_DATE_STAMP_DAY   20)


Add another fpic

Add another fpic

--- Superbuild/LodePngExternal.cmake
+++ Superbuild/LodePngExternal.cmake
@@ -34,6 +34,7 @@
   INSTALL_COMMAND ""
   CMAKE_CACHE_ARGS
     -DCMAKE_VERBOSE_MAKEFILE:BOOL=${CMAKE_VERBOSE_MAKEFILE}
+	-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
 )

 ExternalProject_Get_Property(LodePng_external BINARY_DIR)


Skip passing CMake variables with *_DEFAULT  to SimpleITK sub-project

--- SuperBuild/SuperBuild.cmake
+++ SuperBuild/SuperBuild.cmake
@@ -404,6 +404,8 @@
         NOT _varName MATCHES "^SimpleITK_USE_SYSTEM"
           AND
         NOT _varName MATCHES "^SimpleITK_.*_COMPILE_OPTIONS"
+           AND
+        NOT _varName MATCHES "^SimpleITK_.*_DEFAULT"
           AND
         NOT _varName MATCHES "^SITK_UNDEFINED_SYMBOLS_ALLOWED")
       message( STATUS "Passing variable \"${_varName}=${${_varName}}\" to SimpleITK external project.")


Be robust to non empty executable suffix.

	* build-aux/cmake/modules/CopyDependentLibraries.cmake: Here.

Signed-off-by: Nicolas Despres <abdeb541ca46f1651c9cc594d44e707056e73d5d@gostai.com>

--- build-aux/cmake/modules/CopyDependentLibraries.cmake
+++ build-aux/cmake/modules/CopyDependentLibraries.cmake
@@ -19,15 +19,16 @@
 function(COPY_DEPENDENT_LIBRARIES target)
   check_cmake_vars_exists(CMAKE_AUX_DIR)
   set(out "${target}-dldep")
+  set(binary ${target}${CMAKE_EXECUTABLE_SUFFIX})
   set(generator ${CMAKE_AUX_DIR}/dldep)
   add_custom_target(
     ${out} ALL
-    COMMAND ${generator} ${target} ${out}
-    DEPENDS ${target} ${generator}
+    COMMAND ${generator} ${binary} ${out}
+    DEPENDS ${binary} ${generator}
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     COMMENT "${CMAKE_COMMAND} -E cmake_echo_color "
     "--switch=${CMAKE_MAKEFILE_COLOR} --cyan "
-    "Copying dependent libraries of '${target}'."
+    "Copying dependent libraries of '${binary}'."
     VERBATIM
     )
   set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${out})


moved into CMake subdir

moved into CMake subdir

--- vtkThirdParty.cmake
+++ vtkThirdParty.cmake
@@ -1,2 +0,0 @@
-Temporary dummy file for make dependencies.
-


breakpad now copies the libs as part of the build step

--- cmake/modules/BuildGoogleBreakpad.cmake
+++ cmake/modules/BuildGoogleBreakpad.cmake
@@ -18,18 +18,22 @@
     UPDATE_COMMAND ""
     CONFIGURE_COMMAND <SOURCE_DIR>/src/tools/gyp/gyp.bat --no-circular-check <SOURCE_DIR>/src/client/windows/breakpad_client.gyp
     BUILD_COMMAND msbuild <SOURCE_DIR>/src/client/windows/handler/exception_handler.vcxproj /nologo /t:rebuild /m:2 /property:Configuration=$<CONFIG>
+    COMMAND ${CMAKE_SCRIPT_PATH}/robocopy.bat "<SOURCE_DIR>/src/" "<INSTALL_DIR>/lib/breakpad" "*.lib"
+    COMMAND ${CMAKE_SCRIPT_PATH}/robocopy.bat "<SOURCE_DIR>/src/" "<INSTALL_DIR>/bin" "*.dll"
     INSTALL_COMMAND ""
   )

   ExternalProject_Add_Step(
     breakpad
     build-crash-generation-client
+    DEPENDERS build
     COMMAND msbuild <SOURCE_DIR>/src/client/windows/crash_generation/crash_generation_client.vcxproj /nologo /t:rebuild /m:2 /property:Configuration=$<CONFIG>
   )

   ExternalProject_Add_Step(
     breakpad
     build-common
+    DEPENDERS build
     COMMAND msbuild <SOURCE_DIR>/src/client/windows/common.vcxproj /nologo /t:rebuild /m:2 /property:Configuration=$<CONFIG>
   )

@@ -61,15 +65,6 @@
     DEPENDERS patch_project_files
     COMMAND ${CMAKE_SCRIPT_PATH}/robocopy.bat "<SOURCE_DIR>/src/" "<INSTALL_DIR>/include/breakpad" "*.h"
     COMMAND ${CMAKE_SCRIPT_PATH}/robocopy.bat "<SOURCE_DIR>/src/" "<INSTALL_DIR>/include/breakpad" "*.hpp"
-  )
-
-  ExternalProject_Add_Step(
-    breakpad
-    install-breakpad
-    DEPENDEES build
-    DEPENDERS install
-    COMMAND ${CMAKE_SCRIPT_PATH}/robocopy.bat "<SOURCE_DIR>/src/" "<INSTALL_DIR>/lib/breakpad" "*.lib"
-    COMMAND ${CMAKE_SCRIPT_PATH}/robocopy.bat "<SOURCE_DIR>/src/" "<INSTALL_DIR>/bin" "*.dll"
   )
 else()


Cacheable Android-SDK

Cacheable Android-SDK

This package must be cacheable since it's used by Qt Android
build scheme (which is cacheable)

--- cmake/projects/Android-SDK/hunter.cmake
+++ cmake/projects/Android-SDK/hunter.cmake
@@ -8,6 +8,7 @@
 endif()

 include(hunter_add_version)
+include(hunter_cacheable)
 include(hunter_configuration_types)
 include(hunter_download)
 include(hunter_pick_scheme)
@@ -38,4 +39,8 @@
 hunter_configuration_types(Android-SDK CONFIGURATION_TYPES Release)

 hunter_pick_scheme(DEFAULT url_sha1_cmake)
+
+# This package must be cacheable since it's used by Qt Android build scheme
+hunter_cacheable(Android-SDK)
+
 hunter_download(PACKAGE_NAME Android-SDK)


DOC: Re-use `README.rst` info in `itk-module.cmake`.

Re-use `README.rst` info in `itk-module.cmake`.

Helps avoiding duplications/diverging versions of the documentation.

--- itk-module.cmake
+++ itk-module.cmake
@@ -1,6 +1,14 @@
-set(DOCUMENTATION "This module contains a filter to compute the strain tensor
-field from a displacement field image.")
+# the top-level README is used for describing this module, just
+# re-used it for documentation here
+get_filename_component(MY_CURRENT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+file(READ "${MY_CURRENT_DIR}/README.rst" DOCUMENTATION)

+# itk_module() defines the module dependencies in Strain
+# The testing module in Strain depends on ITKTestKernel
+# By convention those modules outside of ITK are not prefixed with
+# ITK.
+
+# define the dependencies of the include module and the tests
 itk_module(Strain
   DEPENDS
     ITKCommon


Fix SFML 3rd party issue discovered.

Fix SFML 3rd party issue discovered.

--- external/SFML/Options.cmake
+++ external/SFML/Options.cmake
@@ -107,6 +107,7 @@

   # Define where this module can find the precompiled libraries
   set(SFMLDIR ${EXTERNAL_DIR})
+  set(SFML_ROOT ${EXTERNAL_DIR})

   # Specify the binary directory to copy as a post_build step
   set(SFML_BIN_DIR


Ensure .luacheckrc file is picked up regardless of run directory.

--- build/cmake/test/lint.cmake
+++ build/cmake/test/lint.cmake
@@ -1,6 +1,7 @@
 add_custom_target(
   lint-target
   DEPENDS test-lua-deps
+  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
   COMMAND env LUA_PATH=${TEST_VENDOR_LUA_SHARE_DIR}/?.lua$<SEMICOLON>${TEST_VENDOR_LUA_SHARE_DIR}/?/init.lua$<SEMICOLON>$<SEMICOLON> LUA_CPATH=${TEST_VENDOR_LUA_LIB_DIR}/?.so$<SEMICOLON>$<SEMICOLON> ${TEST_VENDOR_DIR}/bin/luacheck ${CMAKE_SOURCE_DIR}/src
   VERBATIM
 )


ENH: Update elastix to revision 5260

ENH: Update elastix to revision 5260

This update resolves an issue where the fixed image, fixed mask and
moving mask had to be deep copied before each registration  because the
images where destroyed internally after registration to conserve
memory. The fix significantly reduces the memory footprint of reusing a
SimpleElastix object for multiple registrations.

--- SuperBuild/External_Elastix.cmake
+++ SuperBuild/External_Elastix.cmake
@@ -2,7 +2,7 @@

 file( WRITE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt" "${ep_common_cache}" )
 set( ELASTIX_REPOSITORY http://github.com/kaspermarstal/elastix )
-set( ELASTIX_TAG 1a49b457edb5bde3f27be710730c8185df74f4e8 )
+set( ELASTIX_TAG 31d502ba103e56f1c878923680ca1a706f348011 )

 ExternalProject_Add( ${proj}
   GIT_REPOSITORY ${ELASTIX_REPOSITORY}


Add stage name to failed test signatures

--- tests/system_tests/run_system_tests.sh.cmake
+++ tests/system_tests/run_system_tests.sh.cmake
@@ -1208,18 +1208,18 @@
 			;;
 		$FAIL_TRANSLATE)
 			inc NUM_FAIL_TRANS
-			FAILED_TESTS="$FAILED_TESTS $test_sig"
+			FAILED_TESTS="$FAILED_TESTS $test_sig/translate"
 			;;
 		$FAIL_COMPILE)
 			inc NUM_SUCCESS_TRANS
 			inc NUM_FAIL_COMPILE
-			FAILED_TESTS="$FAILED_TESTS $test_sig"
+			FAILED_TESTS="$FAILED_TESTS $test_sig/compile"
 			;;
 		$FAIL_EXECUTE)
 			inc NUM_SUCCESS_TRANS
 			inc NUM_SUCCESS_COMPILE
 			inc NUM_FAIL_EXECUTE
-			FAILED_TESTS="$FAILED_TESTS $test_sig"
+			FAILED_TESTS="$FAILED_TESTS $test_sig/execute"
 			;;
 		$SKIP_TRANSLATE)
 			inc NUM_SKIP_TRANS


Generate cpp03 for tests.

Generate cpp03 for tests.

--- BdeBuildSystem/BdeTargetUtils.cmake
+++ BdeBuildSystem/BdeTargetUtils.cmake
@@ -405,9 +405,10 @@

                     target_link_libraries(${target} PUBLIC ${pkg}-obj)

-                    # Generating cpp03 header and implementation files if any
+                    # Generating cpp03 headers, implementation and test files if any
                     bbs_generate_cpp03_sources("${${pkg}_INCLUDE_FILES}")
                     bbs_generate_cpp03_sources("${${pkg}_SOURCE_FILES}")
+                    bbs_generate_cpp03_sources("${${pkg}_TEST_SOURCES}")

                     if (NOT _SKIP_TESTS)
                         bbs_configure_target_tests(${pkg}


more Intel compiler settings

more Intel compiler settings

--- CMakeModules/CompilerSettings.cmake
+++ CMakeModules/CompilerSettings.cmake
@@ -5,10 +5,12 @@
 string(REGEX MATCH ".*icpc" IS_ICPC ${CMAKE_CXX_COMPILER})
 if(IS_ICPC)
     set(CMAKE_AR "xiar" CACHE STRING "Intel archiver" FORCE)
-    set(CMAKE_CXX_FLAGS_RELEASE "-fast -DNDEBUG -pthread"
+    set(CMAKE_CXX_FLAGS "-pthread" CACHE STRING "Default compile flags" FORCE)
+    set(CMAKE_CXX_FLAGS_RELEASE "-fast -DNDEBUG"
     CACHE STRING "Flags used by the C++ compiler during release builds." FORCE)
-    set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -pthread" CACHE STRING
+    set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g" CACHE STRING
     "Flags used by the C++ compiler during debug builds." FORCE)
+    set(CMAKE_LINKER "xild" CACHE STRING "Intel linker" FORCE)
 endif(IS_ICPC)

 string(REGEX MATCH ".*xlC" IS_XLC ${CMAKE_CXX_COMPILER})


[numerics] tagged as failed for some ADMM examples eith UMFPACK

--- numerics/numerics_tests.cmake
+++ numerics/numerics_tests.cmake
@@ -341,6 +341,9 @@
     SET(fc3d__NSN_AC_TEST_Tol_1e-3_Max_1000_inTol_0_inMax_0_Capsules-i122-1617_PROPERTIES WILL_FAIL TRUE)
   ENDIF()

+  IF(WITH_UMFPACK)
+    SET(fc3d__ADMM_Tol_1e-5_Max_10000_inTol_0_inMax_0_IPARAM_SICONOS_FRICTION_3D_ADMM_RHO_STRATEGY_CONSTANT_Confeti-ex13-Fc3D-SBM_PROPERTIES WILL_FAIL TRUE)
+  ENDIF()

   # --- NSGS with different local solvers and parameters ---


Cacheable GPUImage

Cacheable GPUImage

--- cmake/projects/GPUImage/hunter.cmake
+++ cmake/projects/GPUImage/hunter.cmake
@@ -8,6 +8,7 @@
 endif()

 include(hunter_add_version)
+include(hunter_cacheable)
 include(hunter_cmake_args)
 include(hunter_download)
 include(hunter_pick_scheme)
@@ -29,4 +30,5 @@
 )

 hunter_pick_scheme(DEFAULT url_sha1_cmake)
+hunter_cacheable(GPUImage)
 hunter_download(PACKAGE_NAME GPUImage)


python3: Do not include system processor when setting SOABI on MacOSX

SOABI will be set to value like "cpython-35m-darwin" instead of value like
"cpython-35m-x86_64-darwin".

--- cmake/ConfigureChecks.cmake
+++ cmake/ConfigureChecks.cmake
@@ -156,7 +156,11 @@
 set(_msg "Checking SOABI")
 string(TOLOWER ${CMAKE_SYSTEM_NAME} lc_system_name)
 # XXX This should be improved.
-set(PLATFORM_TRIPLET "${CMAKE_SYSTEM_PROCESSOR}-${lc_system_name}")
+if(APPLE)
+  set(PLATFORM_TRIPLET "${lc_system_name}")
+else()
+  set(PLATFORM_TRIPLET "${CMAKE_SYSTEM_PROCESSOR}-${lc_system_name}")
+endif()
 set(SOABI "cpython-${PY_VERSION_MAJOR}${PY_VERSION_MINOR}${ABIFLAGS}-${PLATFORM_TRIPLET}")
 message(STATUS "${_msg} - ${SOABI}")


Reintroduce changes necessary for building scipy

--- cmake/ParaViewModules.cmake
+++ cmake/ParaViewModules.cmake
@@ -383,6 +383,12 @@
       LD_LIBRARY_PATH "${ld_library_path}")
   endif ()

+  set(ldflags_argument)
+  list(APPEND ldflags_argument LDFLAGS "${project_ld_flags}")
+  if (SKIP_LDFLAGS_FOR_BUILD)
+    set(ldflags_argument)
+    set(SKIP_LDFLAGS_FOR_BUILD PARENT_SCOPE)
+  endif()

   #args needs to be quoted so that empty list items aren't removed
   #if that happens options like INSTALL_COMMAND "" won't work
@@ -396,7 +402,7 @@
     ${${name}_revision}

     PROCESS_ENVIRONMENT
-      LDFLAGS "${project_ld_flags}"
+      ${ldflags_argument}
       CPPFLAGS "${cppflags}"
       CXXFLAGS "${project_cxx_flags}"
       CFLAGS "${project_c_flags}"


Update default.cmake

Update default.cmake

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -24,7 +24,7 @@

 # NOTE: no names with spaces!

-hunter_config(puffin-stream VERSION 0.1.0.0)
+hunter_config(puffin-stream VERSION 0.1.0.1)
 hunter_config(puffin-buffer VERSION 0.3.0.0)
 hunter_config(AllTheFlopsThreads VERSION 0.1-p0)
 hunter_config(Android-Apk VERSION 1.1.13)


Update default.cmake

Update default.cmake

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -24,7 +24,7 @@

 # NOTE: no names with spaces!

-hunter_config(Buffer VERSION 0.1.2)
+hunter_config(Buffer VERSION 0.1.3)
 hunter_config(AllTheFlopsThreads VERSION 0.1-p0)
 hunter_config(Android-Apk VERSION 1.1.13)
 hunter_config(Android-Build-Tools VERSION 22.0.1)


Fix libmct.cmake tar ownership change  (#41516)

--- cmake/external/libmct.cmake
+++ cmake/external/libmct.cmake
@@ -45,7 +45,7 @@
     PREFIX                ${LIBMCT_PREFIX_DIR}
     DOWNLOAD_DIR          ${LIBMCT_DOWNLOAD_DIR}
     DOWNLOAD_COMMAND      wget --no-check-certificate ${LIBMCT_URL} -c -q -O ${LIBMCT_NAME}.tar.gz
-                          && tar zxvf ${LIBMCT_NAME}.tar.gz
+                          && tar --no-same-owner -zxvf ${LIBMCT_NAME}.tar.gz
     DOWNLOAD_NO_PROGRESS  1
     UPDATE_COMMAND        ""
     CMAKE_ARGS            -DCMAKE_INSTALL_PREFIX=${LIBMCT_INSTALL_ROOT}


update ngraph to v0.19 test=develop (#17582)

--- cmake/external/ngraph.cmake
+++ cmake/external/ngraph.cmake
@@ -37,7 +37,7 @@
 INCLUDE(ExternalProject)

 SET(NGRAPH_PROJECT         "extern_ngraph")
-SET(NGRAPH_GIT_TAG         "127e0dedfaac8c6f2b148cc03bf5f67ac5fbe6fe")
+SET(NGRAPH_GIT_TAG         "096ad6ef0c04d57db1522940dbdf9a0652768065")
 SET(NGRAPH_SOURCES_DIR     ${THIRD_PARTY_PATH}/ngraph)
 SET(NGRAPH_INSTALL_DIR     ${THIRD_PARTY_PATH}/install/ngraph)
 SET(NGRAPH_INC_DIR         ${NGRAPH_INSTALL_DIR}/include)


use add_compile_options

use add_compile_options

--- cmake/megamol_options.cmake
+++ cmake/megamol_options.cmake
@@ -6,15 +6,15 @@
 set_property(CACHE MEGAMOL_WARNING_LEVEL PROPERTY STRINGS "Off" "Default" "All")
 if ("${MEGAMOL_WARNING_LEVEL}" STREQUAL "Off")
   if (MSVC)
-    set(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /W0")
+    add_compile_options("/W0")
   else ()
-    set(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} -w")
+    add_compile_options("-w")
   endif ()
 elseif ("${MEGAMOL_WARNING_LEVEL}" STREQUAL "All")
   if (MSVC)
-    set(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /W4 /external:anglebrackets /external:W0")
+    add_compile_options("/W4 /external:anglebrackets /external:W0")
   else ()
-    set(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} -Wall -Wextra -pedantic")
+    add_compile_options("-Wall -Wextra -pedantic")
   endif ()
 endif ()


Explain why we don't always use --gc-sections.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@220237 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -143,10 +143,14 @@
 function(add_dead_strip target_name)
   if(NOT LLVM_NO_DEAD_STRIP)
     if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+      # ld64's implementation of -dead_strip breaks tools that use plugins.
       set_property(TARGET ${target_name} APPEND_STRING PROPERTY
                    LINK_FLAGS " -Wl,-dead_strip")
     elseif(NOT WIN32)
       # Object files are compiled with -ffunction-data-sections.
+      # Versions of bfd ld < 2.23.1 have a bug in --gc-sections that breaks
+      # tools that use plugins. Always pass --gc-sections once we require
+      # a newer linker.
       set_property(TARGET ${target_name} APPEND_STRING PROPERTY
                    LINK_FLAGS " -Wl,--gc-sections")
     endif()


fix GetRE2C.cmake for preventing rebuiding

--- cmake/modules/GetRE2C.cmake
+++ cmake/modules/GetRE2C.cmake
@@ -24,6 +24,8 @@
         execute_process(COMMAND ./autogen.sh WORKING_DIRECTORY ${re2c_SOURCE_DIR}/re2c)
     endif()

-    execute_process(COMMAND ${re2c_SOURCE_DIR}/re2c/configure WORKING_DIRECTORY ${re2c_BINARY_DIR})
-    execute_process(COMMAND make WORKING_DIRECTORY ${re2c_BINARY_DIR})
+    if(NOT EXISTS "${RE2C_BIN}")
+        execute_process(COMMAND ${re2c_SOURCE_DIR}/re2c/configure WORKING_DIRECTORY ${re2c_BINARY_DIR})
+        execute_process(COMMAND make WORKING_DIRECTORY ${re2c_BINARY_DIR})
+    endif()
 endmacro()


Update comments.

Update comments.

--- cmake/FindHinnantDate.cmake
+++ cmake/FindHinnantDate.cmake
@@ -72,8 +72,8 @@
         unset(HinnantDate_INCLUDE_FILE CACHE)
     else()
         # Check succeeded, create target
-        get_filename_component(HinnantDate_INCLUDE_DIR "${HinnantDate_INCLUDE_FILE}" DIRECTORY)
-        get_filename_component(HinnantDate_INCLUDE_DIR "${HinnantDate_INCLUDE_DIR}" DIRECTORY)
+        get_filename_component(HinnantDate_INCLUDE_DIR "${HinnantDate_INCLUDE_FILE}" DIRECTORY) # remove filename
+        get_filename_component(HinnantDate_INCLUDE_DIR "${HinnantDate_INCLUDE_DIR}" DIRECTORY) # remove date dir
         mark_as_advanced(HinnantDate_INCLUDE_DIR)
         set(HinnantDate_ROOT_DIR "${HinnantDate_INCLUDE_DIR}")
         unset(HinnantDate_NOT_FOUND_MESSAGE)


reverting some tweaks

reverting some tweaks

--- cmake/FindSuiteSparse.cmake
+++ cmake/FindSuiteSparse.cmake
@@ -1,14 +1,12 @@
-# Based on the file with the same name from:
+# Based on code from:
 #
 # Ceres Solver - A fast non-linear least squares minimizer
 # http://code.google.com/p/ceres-solver/
 #
-# With tweaks by: Dan Foreman-Mackey - danfm@nyu.edu
-#
-# Original license:
+# With tweaks by: Dan Foreman-Mackey danfm@nyu.edu
 #
 # Copyright 2013 Google Inc. All rights reserved.
-#
+
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions are met:
 #
@@ -158,20 +156,6 @@
   /usr/local/homebrew/lib # Mac OS X
   /usr/local/lib
   /usr/local/lib/suitesparse)
-
-# # BLAS.
-# FIND_PACKAGE(BLAS QUIET)
-# IF (NOT BLAS_FOUND)
-#   SUITESPARSE_REPORT_NOT_FOUND(
-#     "Did not find BLAS library (required for SuiteSparse).")
-# ENDIF (NOT BLAS_FOUND)
-#
-# # LAPACK.
-# FIND_PACKAGE(LAPACK QUIET)
-# IF (NOT LAPACK_FOUND)
-#   SUITESPARSE_REPORT_NOT_FOUND(
-#     "Did not find LAPACK library (required for SuiteSparse).")
-# ENDIF (NOT LAPACK_FOUND)

 # AMD.
 SET(AMD_FOUND TRUE)
@@ -453,7 +437,12 @@
   # SuiteSparse version >= 4.
   SET(SUITESPARSE_VERSION_FILE
     ${SUITESPARSE_CONFIG_INCLUDE_DIR}/SuiteSparse_config.h)
-  IF (EXISTS ${SUITESPARSE_VERSION_FILE})
+  IF (NOT EXISTS ${SUITESPARSE_VERSION_FILE})
+    SUITESPARSE_REPORT_NOT_FOUND(
+      "Could not find file: ${SUITESPARSE_VERSION_FILE} containing version "
+      "information for >= v4 SuiteSparse installs, but SuiteSparse_config was "
+      "found (only present in >= v4 installs).")
+  ELSE (NOT EXISTS ${SUITESPARSE_VERSION_FILE})
     FILE(READ ${SUITESPARSE_VERSION_FILE} SUITESPARSE_CONFIG_CONTENTS)

     STRING(REGEX MATCH "#define SUITESPARSE_MAIN_VERSION [0-9]+"
@@ -475,7 +464,7 @@
     # elements and insert ';' separators which would result in 4.;2.;1 nonsense.
     SET(SUITESPARSE_VERSION
       "${SUITESPARSE_MAIN_VERSION}.${SUITESPARSE_SUB_VERSION}.${SUITESPARSE_SUBSUB_VERSION}")
-  ENDIF (EXISTS ${SUITESPARSE_VERSION_FILE})
+  ENDIF (NOT EXISTS ${SUITESPARSE_VERSION_FILE})
 ENDIF (SUITESPARSE_CONFIG_FOUND)

 # METIS (Optional dependency).
@@ -495,7 +484,8 @@
     COLAMD_FOUND AND
     CCOLAMD_FOUND AND
     CHOLMOD_FOUND AND
-    SUITESPARSEQR_FOUND)
+    SUITESPARSEQR_FOUND AND
+    (SUITESPARSE_CONFIG_FOUND OR UFCONFIG_FOUND))
   SET(SUITESPARSE_FOUND TRUE)
   LIST(APPEND SUITESPARSE_INCLUDE_DIRS
     ${AMD_INCLUDE_DIR}


wip: run_tests.sh

wip: run_tests.sh

--- testing/run_tests.sh.cmake
+++ testing/run_tests.sh.cmake
@@ -7,9 +7,11 @@
 #
 # Author: Naoya Maruyama (naoya@matsulab.is.titech.ac.jp)

+#
+# For usage, see the help message by executing this script with option --help.
+#
+
 # TODO:
-# - compilation
-# - linking
 # - execution

 ###############################################################
@@ -32,21 +34,33 @@
 NUM_FAIL_TRANS=0
 NUM_SUCCESS_COMPILE=0
 NUM_FAIL_COMPILE=0
-NUM_SUCCESS_EXEC=0
-NUM_FAIL_EXEC=0
+NUM_SUCCESS_EXECUTE=0
+NUM_FAIL_EXECUTE=0
+FAILED_TESTS=""
+
+PHYSISC=${CMAKE_BINARY_DIR}/translator/physisc
+
+function fail()
+{
+	test=$1
+	trg=$2
+	stage=$3
+	FAILED_TESTS+="$test/$trg/$stage "
+}

 function finish()
 {
 	echo "All tests completed."
 	echo  "[TRANSLATE] #SUCCESS: $NUM_SUCCESS_TRANS, #FAIL: $NUM_FAIL_TRANS."
 	echo  "[COMPILE]   #SUCCESS: $NUM_SUCCESS_COMPILE, #FAIL: $NUM_FAIL_COMPILE."
-	echo  "[EXECUTE]   #SUCCESS: $NUM_SUCCESS_EXEC, #FAIL: $NUM_FAIL_EXEC."
+	echo  "[EXECUTE]   #SUCCESS: $NUM_SUCCESS_EXECUTE, #FAIL: $NUM_FAIL_EXECUTE."
+	if [ "x" != "x$FAILED_TESTS" ]; then echo  "Failed tests: $FAILED_TESTS"; fi
 	cd $ORIGINAL_DIRECTORY
 	if [ $FLAG_KEEP_OUTPUT -eq 0 ]; then
 		rm -rf $WD
 	fi
 	if [ $NUM_FAIL_TRANS -eq 0 -a $NUM_FAIL_COMPILE -eq 0 -a \
-		$NUM_FAIL_EXEC -eq 0 ]; then
+		$NUM_FAIL_EXECUTE -eq 0 ]; then
 		exit 0
 	else
 		exit 1
@@ -57,15 +71,16 @@
 {
 	src=$1
 	target=$2
-	echo compilation of $src for $target
 	src_file_base=$(basename $src .c).$target
 	if [ "${MPI_ENABLED}" = "TRUE" ]; then
-		MPI_C_FLAGS="-pthread"
+		MPI_CFLAGS="-pthread"
 		for mpiinc in $(echo "${MPI_INCLUDE_PATH}" | sed 's/;/ /g'); do
-			MPI_C_FLAGS+=" -I$mpiinc"
+			MPI_CFLAGS+=" -I$mpiinc"
 		done
 	fi
 	LDFLAGS=-L${CMAKE_BINARY_DIR}/runtime
+	NVCC_CFLAGS="-arch sm_20"
+	CUDA_LDFLAGS="-lcudart -L$(dirname ${CUDA_LIBRARIES})"
 	case $target in
 		ref)
 			src_file="$src_file_base".c
@@ -78,7 +93,8 @@
 				return 0
 			fi
 			src_file="$src_file_base".cu
-			nvcc -c $src_file -I${CMAKE_SOURCE_DIR}/include -Xcompiler $CFLAGS
+			nvcc -c $src_file -I${CMAKE_SOURCE_DIR}/include $NVCC_CFLAGS $CFLAGS &&
+			nvcc "$src_file_base".o -lphysis_rt_cuda $LDFLAGS -o "$src_file_base".exe
 			;;
 		mpi)
 			if [ "${MPI_ENABLED}" != "TRUE" ]; then
@@ -86,31 +102,135 @@
 				return 0
 			fi
 			src_file="$src_file_base".c
-			cc -c $src_file -I${CMAKE_SOURCE_DIR}/include $MPI_C_FLAGS $CFLAGS
+			cc -c $src_file -I${CMAKE_SOURCE_DIR}/include $MPI_CFLAGS $CFLAGS &&
+			mpic++ "$src_file_base".o -lphysis_rt_mpi $LDFLAGS -o "$src_file_base".exe
 			;;
 		mpi-cuda)
 			if [ "${MPI_ENABLED}" != "TRUE" -o "${CUDA_ENABLED}" != "TRUE" ]; then
 				echo "[COMPILE] Skipping MPI-CUDA compilation (not supported)"
 				return 0
 			fi
-			src_file="$src_file_base".cu
+			src_file="$src_file_base".cu
+			MPI_CUDA_CFLAGS=""
+			for f in $CFLAGS $MPI_CFLAGS; do
+				if echo $f | grep '^-I' > /dev/null; then
+					MPI_CUDA_CFLAGS+="$f "
+				else
+					MPI_CUDA_CFLAGS+="-Xcompiler $f "
+				fi
+			done
 			nvcc -c $src_file -I${CMAKE_SOURCE_DIR}/include \
-				$MPI_C_FLAGS -Xcompiler $CFLAGS
+				$NVCC_CFLAGS $MPI_CUDA_CFLAGS &&
+			mpic++ "$src_file_base".o -lphysis_rt_mpi_cuda $LDFLAGS $CUDA_LDFLAGS \
+			-o "$src_file_base".exe
 			;;
 		*)
-			echo "Error: Unsupported target"
+			echo "ERROR! Unsupported target"
 			finish
 			;;
 	esac
 }

-{
+# TODO
+function execute()
+{
+	src=$1
+	target=$2
+	src_file_base=$(basename $src .c).$target
+	echo "[EXECUTE] Processing $src/$target"
+	case $target in
+		ref)
+			exename=$src_file_base.ref.exe
+			;;
+		cuda)
+			exename=$src_file_base.cuda.exe
+			;;
+		mpi)
+			exename=$src_file_base.mpi.exe
+			;;
+		mpi-cuda)
+			exename=$src_file_base.mpi-cuda.exe
+			;;
+		*)
+			echo "ERROR! Unsupported target"
+			finish
+			;;
+	esac
+}
+
+function print_usage()
+{
+	echo "USAGE"
+	echo -e "\trun_tests.sh [options]"
+	echo ""
+	echo "OPTIONS"
+	echo -e "\t-t, --targets"
+	echo -e "\t\tSet the test targets. Supported targets: $($PHYSISC --list-targets)."
+	echo -e "\t--translate"
+	echo -e "\t\tTest only translation and its dependent tasks."
+	echo -e "\t--compile"
+	echo -e "\t\tTest only compilation and its dependent tasks."
+	echo -e "\t--execute"
+	echo -e "\t\tTest only execution and its dependent tasks."
+}
+
+{
+
+	TARGETS=""
+	STAGE="ALL"
+
+	TEMP=$(getopt -o ht:s: --long help,targets:,translate,compile,execute -- "$@")
+	if [ $? != 0 ]; then
+		echo "ERROR! Invalid options: $@";
+		print_usage
+		exit 1;
+	fi
+
+	eval set -- "$TEMP"
+	while true; do
+		case "$1" in
+			-t|--targets)
+				TARGETS=$2
+				shift 2
+				;;
+			--translate)
+				STAGE="TRANSLATE"
+				shift
+				;;
+			--compile)
+				STAGE="COMPILE"
+				shift
+				;;
+			--execute)
+				STAGE="EXECUTE"
+				shift
+				;;
+			-h|--help)
+				print_usage
+				exit 0
+				shift
+				;;
+			--)
+				shift
+				break
+				;;
+			*)
+				echo "ERROR! Invalid option: $1"
+				print_usage
+				exit 1
+				;;
+		esac
+	done
+
+	# Test all targets by default
+	if [ "x$TARGETS" = "x" ]; then TARGETS=$($PHYSISC --list-targets); fi
+
 	# find tests
-	TESTS=$(find ${CMAKE_SOURCE_DIR}/testing/tests -name 'test_*.c')
-	NUM_TESTS=$(echo $TESTS | wc -w)
-	echo "Testing $NUM_TESTS test code(s)"
-	PHYSISC=${CMAKE_BINARY_DIR}/translator/physisc
-	TARGETS=$($PHYSISC --list-targets)
+	TESTS=$(find ${CMAKE_SOURCE_DIR}/testing/tests -name 'test_*.c'|sort -n)
+
+	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)
@@ -122,9 +242,9 @@
 			else
 				echo "[TRANSLATE] FAIL"
 				NUM_FAIL_TRANS=$(($NUM_FAIL_TRANS + 1))
-			    # Terminates immediately when failed
-				finish
-			fi
+				fail $SHORTNAME $TARGET translate
+			fi
+			if [ "$STAGE" = "TRANSLATE" ]; then continue; fi
 			echo "[COMPILE] Processing $SHORTNAME for $TARGET target"
 			if compile $SHORTNAME $TARGET; then
 				echo "[COMPILE] SUCCESS"
@@ -132,8 +252,16 @@
 			else
 				echo "[COMPILE] FAIL"
 				NUM_FAIL_COMPILE=$(($NUM_FAIL_COMPILE + 1))
-				# Terminates immediately when failed
-				finish
+				fail $SHORTNAME $TARGET compile
+			fi
+			if [ "$STAGE" = "COMPILE" ]; then continue; fi
+			if execute $SHORTNAME $TARGET; then
+				echo "[EXECUTE] SUCCESS"
+				NUM_SUCCESS_EXECUTE=$(($NUM_SUCCESS_EXECUTE + 1))
+			else
+				echo "[EXECUTE] FAIL"
+				NUM_FAIL_EXECUTE=$(($NUM_FAIL_EXECUTE + 1))
+				fail $SHORTNAME $TARGET execute
 			fi
 		done
 	done


fixup incorrect use of 'RETURN()'

fixup incorrect use of 'RETURN()'

Change-Id: I29b62d4bda4908b5fbb155bd3f5afcf0556be036
Reviewed-on: http://review.couchbase.org/33293
Reviewed-by: Brett Lawson <c8c4369773d7d7226e031f0c4af62e3f38a08510@gmail.com>
Tested-by: Mark Nunberg <e7d42768707bf23038325b0b68d4b577e5f6064a@haskalah.org>

--- cmake/Modules/CopyPDB.cmake
+++ cmake/Modules/CopyPDB.cmake
@@ -22,26 +22,20 @@
 ENDMACRO()

 MACRO(INSTALL_PDBS target)
-    IF(!MSVC)
-        RETURN()
-    ENDIF()
-    GET_TARGET_PROPERTY(_BIN_DEBUG ${target} LOCATION_DEBUG)
-    GET_TARGET_PROPERTY(_BIN_RDB ${target} LOCATION_RelWithDebInfo)
-    TRANSFORM_TARGET(${_BIN_DEBUG} _DEBUG_PDB _DEBUG_EXP)
-    TRANSFORM_TARGET(${_BIN_RDB} _RDB_PDB _RDB_EXP)
-    INSTALL(FILES
-        ${_DEBUG_PDB}
-        ${_DEBUG_EXP}
-        DESTINATION lib
-        CONFIGURATIONS DEBUG)
-    INSTALL(FILES
-        ${_RDB_PDB}
-        ${_RDB_EXP}
-        DESTINATION lib
-        CONFIGURATIONS RelWithDebInfo)
-
-
-    # Handle the '.exp' stuff as well
-
-
+    IF(MSVC)
+        GET_TARGET_PROPERTY(_BIN_DEBUG ${target} LOCATION_DEBUG)
+        GET_TARGET_PROPERTY(_BIN_RDB ${target} LOCATION_RelWithDebInfo)
+        TRANSFORM_TARGET(${_BIN_DEBUG} _DEBUG_PDB _DEBUG_EXP)
+        TRANSFORM_TARGET(${_BIN_RDB} _RDB_PDB _RDB_EXP)
+        INSTALL(FILES
+            ${_DEBUG_PDB}
+            ${_DEBUG_EXP}
+            DESTINATION lib
+            CONFIGURATIONS DEBUG)
+        INSTALL(FILES
+            ${_RDB_PDB}
+            ${_RDB_EXP}
+            DESTINATION lib
+            CONFIGURATIONS RelWithDebInfo)
+    ENDIF(MSVC)
 ENDMACRO()


changed to find TBB library(VS2015)

changed to find TBB library(VS2015)

--- cmake/OpenCVDetectTBB.cmake
+++ cmake/OpenCVDetectTBB.cmake
@@ -65,6 +65,8 @@
           set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc11")
         elseif(MSVC12)
           set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc12")
+        elseif(MSVC14)
+          set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc14")
         endif()
         set(TBB_LIB_DIR "${_TBB_LIB_PATH}" CACHE PATH "Full path of TBB library directory")
         link_directories("${TBB_LIB_DIR}")


Update default.cmake

Update default.cmake

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -25,7 +25,7 @@
 # NOTE: no names with spaces!

 hunter_config(gloox VERSION 1.0.20)
-hunter_config(wdc VERSION 1.0.1-hunter)
+hunter_config(wdc VERSION 1.0.1-hunter-p1)
 hunter_config(pugixml VERSION 1.8.1)
 hunter_config(puffin-stream VERSION 0.2.2.0)
 hunter_config(puffin-buffer VERSION 0.3.2.0)


Fix DCMTK git repo URL

Fix DCMTK git repo URL

--- cmake/externals/DCMTK.cmake
+++ cmake/externals/DCMTK.cmake
@@ -20,7 +20,7 @@
     if (NOT DEFINED location)
         set(SRC_DIR ${CMAKE_BINARY_DIR}/dcmtk/src/DCMTK)
         if (NOT dcmtkp_UPSTREAM)
-            set(location GIT_REPOSITORY "git://dev-med.inria.fr/dcmtk/dcmtk.git" ${extproj_revision_tag})
+            set(location GIT_REPOSITORY "git://github.com/medInria/dcmtk.git" ${extproj_revision_tag})
         else()
             set(location GIT_REPOSITORY "git://git.dcmtk.org/dcmtk.git" ${extproj_revision_tag})
         endif()