cmake: Simplify add_lit_testsuites

cmake: Simplify add_lit_testsuites

cmake 3.4 introduced LIST_DIRECTORIES to glob recurse, which can be
used to simplify this code greatly.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1122,32 +1122,24 @@

     # Search recursively for test directories by assuming anything not
     # in a directory called Inputs contains tests.
-    set(lit_suites)
-    file(GLOB to_process ${directory}/*)
-    while(to_process)
-      set(cur_to_process ${to_process})
-      set(to_process)
-      foreach(lit_suite ${cur_to_process})
-        if(IS_DIRECTORY ${lit_suite})
-          string(FIND ${lit_suite} Inputs is_inputs)
-          if (is_inputs EQUAL -1)
-            list(APPEND lit_suites "${lit_suite}")
-            file(GLOB subdirs ${lit_suite}/*)
-            list(APPEND to_process ${subdirs})
-          endif()
-        endif()
-      endforeach()
-    endwhile()
-
-    # Now create a check- target for each test directory.
-    foreach(dir ${lit_suites})
-      string(REPLACE ${directory} "" name_slash ${dir})
+    file(GLOB_RECURSE to_process LIST_DIRECTORIES true ${directory}/*)
+    foreach(lit_suite ${to_process})
+      if(NOT IS_DIRECTORY ${lit_suite})
+        continue()
+      endif()
+      string(FIND ${lit_suite} Inputs is_inputs)
+      if (NOT is_inputs EQUAL -1)
+        continue()
+      endif()
+
+      # Create a check- target for the directory.
+      string(REPLACE ${directory} "" name_slash ${lit_suite})
       if (name_slash)
         string(REPLACE "/" "-" name_slash ${name_slash})
         string(REPLACE "\\" "-" name_dashes ${name_slash})
         string(TOLOWER "${project}${name_dashes}" name_var)
-        add_lit_target("check-${name_var}" "Running lit suite ${dir}"
-          ${dir}
+        add_lit_target("check-${name_var}" "Running lit suite ${lit_suite}"
+          ${lit_suite}
           PARAMS ${ARG_PARAMS}
           DEPENDS ${ARG_DEPENDS}
           ARGS ${ARG_ARGS}


Simplify FindQt5.cmake

Simplify FindQt5.cmake

Make further use of Qt 5's cmake integration

Reviewed-by: David Edmundson

--- cmake/modules/FindQt5.cmake
+++ cmake/modules/FindQt5.cmake
@@ -44,25 +44,31 @@
   RETURN()
 ENDIF(QT_INCLUDES AND QT_LIBRARIES AND QT_MAJOR_VERSION MATCHES 5)

-IF(NOT QT_QMAKE_EXECUTABLE)
-  FIND_PROGRAM(QT_QMAKE_EXECUTABLE_FINDQT NAMES qmake qmake5 qmake-qt5
-               PATHS "${QT_SEARCH_PATH}/bin" "$ENV{QTDIR}/bin")
-  SET(QT_QMAKE_EXECUTABLE ${QT_QMAKE_EXECUTABLE_FINDQT} CACHE PATH "Qt qmake program.")
-ENDIF(NOT QT_QMAKE_EXECUTABLE)
+IF(NOT Qt5Core_DIR )
+    IF(NOT QT_QMAKE_EXECUTABLE)
+        FIND_PROGRAM(QT_QMAKE_EXECUTABLE_FINDQT NAMES qmake qmake5 qmake-qt5
+            PATHS "${QT_SEARCH_PATH}/bin" "$ENV{QTDIR}/bin")
+        SET(QT_QMAKE_EXECUTABLE ${QT_QMAKE_EXECUTABLE_FINDQT} CACHE PATH "Qt qmake program.")
+    ENDIF(NOT QT_QMAKE_EXECUTABLE)

-EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION)
-IF(NOT QTVERSION MATCHES "5.*")
-  SET(QT_FOUND FALSE)
-  SET(QT5_FOUND FALSE)
-  IF(Qt5_FIND_REQUIRED)
-    MESSAGE(FATAL_ERROR "CMake was unable to find Qt5, put qmake in your path or set QTDIR/QT_QMAKE_EXECUTABLE.")
-  ENDIF(Qt5_FIND_REQUIRED)
-  RETURN()
-ENDIF(NOT QTVERSION MATCHES "5.*")
+    EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION)
+    IF(NOT QTVERSION MATCHES "5.*")
+        SET(QT_FOUND FALSE)
+        SET(QT5_FOUND FALSE)
+        IF(Qt5_FIND_REQUIRED)
+            MESSAGE(FATAL_ERROR "CMake was unable to find Qt5, put qmake in your path or set QTDIR/QT_QMAKE_EXECUTABLE.")
+        ENDIF(Qt5_FIND_REQUIRED)
+        RETURN()
+    ENDIF(NOT QTVERSION MATCHES "5.*")
+ENDIF(NOT Qt5Core_DIR )

-FIND_PACKAGE(PkgConfig REQUIRED)
-
-FIND_PACKAGE(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core DBus Gui Network Test Widgets Xml)
+find_package(Qt5Core ${REQUIRED_QT_VERSION} REQUIRED)
+find_package(Qt5DBus ${REQUIRED_QT_VERSION} REQUIRED)
+find_package(Qt5Gui ${REQUIRED_QT_VERSION} REQUIRED)
+find_package(Qt5Test ${REQUIRED_QT_VERSION} REQUIRED)
+find_package(Qt5Widgets ${REQUIRED_QT_VERSION} REQUIRED)
+find_package(Qt5Network ${REQUIRED_QT_VERSION} REQUIRED)
+find_package(Qt5Xml ${REQUIRED_QT_VERSION} REQUIRED)

 # Copy includes and library names into the same style as pkgconfig used for Qt4
 set(QT_INCLUDES ${Qt5Core_INCLUDE_DIRS} ${Qt5DBus_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS} ${Qt5Test_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
@@ -77,9 +83,12 @@

 set(QT_LIBRARIES ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${QT_QTTEST_LIBRARY} ${QT_QTWIDGETS_LIBRARY} ${QT_QTXML_LIBRARY})

-STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}")
-STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}")
-STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}")
+SET(QT_VERSION_MAJOR ${Qt5Core_VERSION_MAJOR})
+SET(QT_VERSION_MINOR ${Qt5Core_VERSION_MINOR})
+SET(QT_VERSION_PATCH ${Qt5Core_VERSION_PATCH})
+SET(QT_VERSION ${Qt5Core_VERSION})
+
+GET_PROPERTY(QT_QMAKE_EXECUTABLE TARGET ${Qt5Core_QMAKE_EXECUTABLE} PROPERTY IMPORTED_LOCATION)

 IF(NOT QT_INCLUDE_DIR)
   EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_HEADERS" OUTPUT_VARIABLE QTHEADERS)


fix for FindJNI.cmake

fix for FindJNI.cmake

--- cmake_modules/FindJNI.cmake
+++ cmake_modules/FindJNI.cmake
@@ -32,6 +32,7 @@
   /usr/lib/j2sdk1.4-sun/jre/lib/i386
   /usr/lib/j2sdk1.5-sun/jre/lib/i386
   /opt/sun-jdk-1.5.0.04/jre/lib/amd64
+  /usr/lib/jvm/java-6-sun/jre/lib/amd64
   /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/amd64
   /usr/lib/java/jre/lib/amd64
   /usr/local/lib/java/jre/lib/amd64
@@ -66,6 +67,7 @@
   /usr/lib/java/include
   /usr/local/lib/java/include
   /usr/lib/jvm/java/include
+  /usr/lib/jvm/java-6-sun/include
   /usr/lib/jvm/java-6-sun-1.6.0.00/include
   /usr/local/share/java/include
   /usr/lib/j2sdk1.4-sun/include


make test starts erlang with distribution enabled.

Change-Id: Ic23b5e0f092646c12ffdebb83f080dbb49763f93
Reviewed-on: http://review.couchbase.org/60759
Tested-by: Aliaksey Artamonau <3c875bcfb3adf2a65b2ae7686ca921e6c9433147@gmail.com>
Reviewed-by: Artem Stemkovski <15a0730a27c69f62ab86f2b6c639fca202166c02@couchbase.com>

--- cmake_modules/do-test.cmake
+++ cmake_modules/do-test.cmake
@@ -12,6 +12,9 @@
 # Bug in CMake?
 STRING (REGEX REPLACE "//" "/" ebindirs "${ebindirs}")

+STRING (RANDOM LENGTH 16 NODE_NAME_RANDOM)
+SET (NODE_NAME "test-${NODE_NAME_RANDOM}")
+
 # If you update the test command, please also update this echo command
 # (including the silly escaped quotes) so it displays what is
 # invoked. Yes, this is annoying.
@@ -21,6 +24,7 @@
   -pa "${COUCHDB_BIN_DIR}/src/mochiweb"
   -pa "${COUCHDB_BIN_DIR}/src/ejson"
   -noshell -kernel error_logger silent -shutdown_time 10000
+  -name "${NODE_NAME}"
   -eval "\"application:start(sasl).\""
   -eval "\"case t:${TEST_TARGET}() of ok -> init:stop(); _ -> init:stop(1) end.\"")

@@ -30,6 +34,7 @@
   -pa "${COUCHDB_BIN_DIR}/src/mochiweb"
   -pa "${COUCHDB_BIN_DIR}/src/ejson"
   -noshell -kernel error_logger silent -shutdown_time 10000
+  -name "${NODE_NAME}"
   -eval "application:start(sasl)."
   -eval "case t:${TEST_TARGET}() of ok -> init:stop(); _ -> init:stop(1) end.")
 IF (_failure)


export_complex_library add support for long names

If no MODULE is given the first part of LIBNAME is used as module.
The expected format is still MODULE-LIBNAME but now LIBNAME can also
contain -.

--- cmake/ComplexLibrary.cmake
+++ cmake/ComplexLibrary.cmake
@@ -47,9 +47,11 @@
 		message(FATAL_ERROR "export_complex_library requires a name to be set")
 	endif()
 	if (NOT ${PREFIX}_MODULE)
+		# get the module prefix and remove it from libname
 		string(REPLACE "-" ";" LIBNAME_LIST "${${PREFIX}_LIBNAME}")
 		list(GET LIBNAME_LIST 0 MODULE)
-		list(GET LIBNAME_LIST 1 LIBNAME)
+		list(REMOVE_AT LIBNAME_LIST 0)
+		string(REPLACE ";" "-" LIBNAME "${LIBNAME_LIST}")
 	else()
 		set(MODULE ${${PREFIX}_MODULE})
 		set(LIBNAME ${${PREFIX}_LIBNAME})


MINIFICPP-387 Allow TF path to be specified via environment variable

This closes #252.

Signed-off-by: Marc Parisi <3cd89688bb0a35b1f4229ca5a98e5d7bf31861da@apache.org>

--- cmake/FindTensorFlow.cmake
+++ cmake/FindTensorFlow.cmake
@@ -18,24 +18,33 @@
 include(FindPackageHandleStandardArgs)
 unset(TENSORFLOW_FOUND)

+if (TENSORFLOW_PATH)
+  message("-- Checking for TensorFlow in provided TENSORFLOW_PATH: ${TENSORFLOW_PATH}")
+endif()
+
 find_path(TENSORFLOW_INCLUDE_DIR
           NAMES
           tensorflow/core
           tensorflow/cc
           third_party
           HINTS
+          ${TENSORFLOW_PATH}
           /usr/local/include/google/tensorflow
           /usr/local/include/tensorflow
           /usr/include/google/tensorflow)

 find_library(TENSORFLOW_CC_LIBRARY NAMES tensorflow_cc
              HINTS
+             ${TENSORFLOW_PATH}
+             ${TENSORFLOW_PATH}/bazel-bin/tensorflow
              /usr/lib
              /usr/local/lib
              /usr/local/lib/tensorflow_cc)

 find_library(TENSORFLOW_FRAMEWORK_LIBRARY NAMES tensorflow_framework
              HINTS
+             ${TENSORFLOW_PATH}
+             ${TENSORFLOW_PATH}/bazel-bin/tensorflow
              /usr/lib
              /usr/local/lib
              /usr/local/lib/tensorflow_cc)
@@ -43,6 +52,8 @@
 find_package_handle_standard_args(TENSORFLOW DEFAULT_MSG TENSORFLOW_INCLUDE_DIR TENSORFLOW_CC_LIBRARY TENSORFLOW_FRAMEWORK_LIBRARY)

 if(TENSORFLOW_FOUND)
+    message("-- Found TensorFlow includes: ${TENSORFLOW_INCLUDE_DIR}")
+    message("-- Found TensorFlow libraries: ${TENSORFLOW_CC_LIBRARY} ${TENSORFLOW_FRAMEWORK_LIBRARY}")
     set(TENSORFLOW_LIBRARIES ${TENSORFLOW_CC_LIBRARY} ${TENSORFLOW_FRAMEWORK_LIBRARY})
     set(TENSORFLOW_INCLUDE_DIRS
         ${TENSORFLOW_INCLUDE_DIR}
@@ -52,6 +63,8 @@
         ${TENSORFLOW_INCLUDE_DIR}/tensorflow/contrib/makefile/downloads/gemmlowp
         ${TENSORFLOW_INCLUDE_DIR}/tensorflow/contrib/makefile/downloads/nsync/public
         ${TENSORFLOW_INCLUDE_DIR}/tensorflow/contrib/makefile/gen/protobuf-host/include)
+else()
+  message(FATAL_ERROR "TensorFlow was not found. Check or set TENSORFLOW_PATH to TensorFlow build, Install libtensorflow_cc.so and headers into the system, or disable the TensorFlow extension.")
 endif()

-mark_as_advanced(TENSORFLOW_INCLUDE_DIR TENSORFLOW_CC_LIBRARY TENSORFLOW_FRAMEWORK_LIBRARY)+mark_as_advanced(TENSORFLOW_INCLUDE_DIR TENSORFLOW_CC_LIBRARY TENSORFLOW_FRAMEWORK_LIBRARY)


CMake: Added preprocessor definitions required to build picojson 1.3.0.

Review: https://reviews.apache.org/r/38530

--- cmake/MesosConfigure.cmake
+++ cmake/MesosConfigure.cmake
@@ -115,3 +115,13 @@
 # NOTE: The third-party configuration variables exported here are used
 # throughout the project, so it's important that this config script goes here.
 include(ProcessConfigure)
+
+# Add preprocessor definitions required to build third-party libraries.
+#######################################################################
+# Enable the INT64 support for PicoJSON.
+add_definitions(-DPICOJSON_USE_INT64)
+# NOTE: PicoJson requires __STDC_FORMAT_MACROS to be defined before importing
+# 'inttypes.h'.  Since other libraries may also import this header, it must
+# be globally defined so that PicoJson has access to the macros, regardless
+# of the order of inclusion.
+add_definitions(-D__STDC_FORMAT_MACROS)


improve error messages for wrong include dirs

--- cmake/catkin_package.cmake
+++ cmake/catkin_package.cmake
@@ -281,12 +281,16 @@
   set(PROJECT_CMAKE_CONFIG_INCLUDE_DIRS "")
   set(PROJECT_PKG_CONFIG_INCLUDE_DIRS "")
   foreach(idir ${PROJECT_INCLUDE_DIRS})
-    if(IS_ABSOLUTE ${idir} AND IS_DIRECTORY ${idir})
-      set(include ${idir})
+    if(IS_ABSOLUTE ${idir})
+      if(IS_DIRECTORY ${idir})
+        set(include ${idir})
+      else()
+        message(FATAL_ERROR "catkin_package() absolute include dir '${idir}' does not exist")
+      endif()
     elseif(IS_DIRECTORY ${PKG_INCLUDE_PREFIX}/${idir})
       set(include ${PKG_INCLUDE_PREFIX}/${idir})
     else()
-      message(FATAL_ERROR "catkin_package() include dir '${idir}' is neither an absolute directory nor exists relative to '${CMAKE_CURRENT_SOURCE_DIR}'")
+      message(FATAL_ERROR "catkin_package() include dir '${idir}' does not exist relative to '${PKG_INCLUDE_PREFIX}'")
     endif()
     list_append_unique(PROJECT_CMAKE_CONFIG_INCLUDE_DIRS ${include})
     list_append_unique(PROJECT_PKG_CONFIG_INCLUDE_DIRS ${include})


First cut at -DINSTALL_LAYOUT=DEB support.

--- cmake/install_layout.cmake
+++ cmake/install_layout.cmake
@@ -24,6 +24,9 @@
 #
 #  RPM
 #    Build as per default RPM layout, with prefix=/usr
+#
+#  DEB
+#    Build as per STANDALONE, prefix=/opt/mysql-$major.$minor
 #
 #  SVR4
 #    Solaris package layout suitable for pkg* tools, prefix=/opt/mysql/mysql
@@ -69,6 +72,10 @@
 IF(UNIX)
   IF(INSTALL_LAYOUT MATCHES "RPM")
     SET(default_prefix "/usr")
+  ELSEIF(INSTALL_LAYOUT MATCHES "DEB")
+    SET(default_prefix "/opt/${MYSQL_BASE_VERSION}")
+    # This is required to avoid "cpack -GDEB" default of prefix=/usr
+    SET(CPACK_SET_DESTDIR ON)
   ELSEIF(INSTALL_LAYOUT MATCHES "SVR4")
     SET(default_prefix "/opt/mysql/mysql")
   ELSE()
@@ -121,6 +128,23 @@
 SET(INSTALL_SUPPORTFILESDIR_RPM "share/mysql")
 SET(INSTALL_MYSQLDATADIR_RPM "var")

+# DEB layout
+SET(INSTALL_BINDIR_DEB "bin")
+SET(INSTALL_SBINDIR_DEB "bin")
+SET(INSTALL_LIBDIR_DEB "lib")
+SET(INSTALL_INCLUDEDIR_DEB "include")
+SET(INSTALL_PLUGINDIR_DEB "lib/plugin")
+SET(INSTALL_DOCDIR_DEB "docs")
+SET(INSTALL_MANDIR_DEB "man")
+SET(INSTALL_MYSQLSHAREDIR_DEB "share")
+SET(INSTALL_SHAREDIR_DEB "share")
+SET(INSTALL_SCRIPTDIR_DEB "scripts")
+SET(INSTALL_MYSQLTESTDIR_DEB "mysql-test")
+SET(INSTALL_SQLBENCHROOTDIR_DEB ".")
+SET(INSTALL_DOCREADMEDIR_DEB ".")
+SET(INSTALL_SUPPORTFILESDIR_DEB "support-files")
+SET(INSTALL_MYSQLDATADIR_DEB "data")
+
 # SVR4 layout
 SET(INSTALL_BINDIR_SVR4 "bin")
 SET(INSTALL_SBINDIR_SVR4 "bin")


Update Findrp.cmake

Update Findrp.cmake

--- cmake/modules/Findrp.cmake
+++ cmake/modules/Findrp.cmake
@@ -8,7 +8,7 @@
    PATH_SUFFIXES
    )

-FIND_LIBRARY(WIRINGPI_LIBRARIES NAMES rp
+FIND_LIBRARY(REDPITAYA_LIBRARIES NAMES rp
    PATHS
    /usr/lib
    /usr/local/lib
@@ -19,4 +19,4 @@
 INCLUDE(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(rp DEFAULT_MSG REDPITAYA_LIBRARIES REDPITAYA_INCLUDE_DIR)

-MARK_AS_ADVANCED(REDPITAYA_INCLUDE_DIR REDPITAYA_LIBRARIES)+MARK_AS_ADVANCED(REDPITAYA_INCLUDE_DIR REDPITAYA_LIBRARIES)


Only use the appropriate component of QT_LIBRARIES depending on the embedded
keywords.

svn path=/trunk/; revision=9944

--- cmake/modules/plplot.cmake
+++ cmake/modules/plplot.cmake
@@ -27,6 +27,8 @@
 include(CheckFunctionExists)
 include(CheckSymbolExists)
 include(CheckPrototypeExists)
+
+# Useful macros....

 macro(TRANSFORM_VERSION _numerical_result _version)
 # _version must be a period-delimited triplet string of the form
@@ -43,6 +45,30 @@
   set(${_numerical_result} 0)
 endif(${_version} MATCHES "^[0-9]*\\.[0-9]*\\.[0-9]*$")
 endmacro(TRANSFORM_VERSION)
+
+macro(split_libraries_list _list _list_general _list_debug _list_optimized)
+  # Macro for splitting a libraries list into its keyword denoted general,
+  # debug, and optimized lists.
+  set(${_list_general})
+  set(${_list_debug})
+  set(${_list_optimized})
+
+  set(_keyword "general")
+  foreach(_element ${${_list}})
+    if(_element STREQUAL "general" OR _element STREQUAL "debug" OR _element STREQUAL "optimized" )
+      set(_keyword ${_element})
+    else(_element STREQUAL "general" OR _element STREQUAL "debug" OR _element STREQUAL "optimized" )
+      if(_keyword STREQUAL "general")
+	list(APPEND ${_list_general} ${_element})
+      elseif(_keyword STREQUAL "debug")
+	list(APPEND ${_list_debug} ${_element})
+      elseif(_keyword STREQUAL "optimized")
+	list(APPEND ${_list_optimized} ${_element})
+      endif(_keyword STREQUAL "general")
+    endif(_element STREQUAL "general" OR _element STREQUAL "debug" OR _element STREQUAL "optimized" )
+  endforeach(_element)
+
+endmacro(split_libraries_list _list _list_general _list_debug _list_optimized)

 # =======================================================================
 # Compilation and build options (PLFLT, install locations, and rpath)


Possible remedy to compile with petsc version > 3.5. Update FindPETSc.cmake

--- cmake_find/FindPETSc.cmake
+++ cmake_find/FindPETSc.cmake
@@ -120,7 +120,11 @@

 # Determine whether the PETSc layout is old-style (through 2.3.3) or
 # new-style (>= 3.0.0)
-if (EXISTS "${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h")   # > 2.3.3
+if (EXISTS "${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/conf/petscvariables") # > 3.5
+  set (petsc_conf_rules "${PETSC_DIR}/lib/petsc/conf/rules")
+  set (petsc_conf_variables "${PETSC_DIR}/lib/petsc/conf/variables")
+elseif (EXISTS "${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h")   # > 2.3.3
+# if (EXISTS "${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h")   # > 2.3.3
   set (petsc_conf_rules "${PETSC_DIR}/conf/rules")
   set (petsc_conf_variables "${PETSC_DIR}/conf/variables")
 elseif (EXISTS "${PETSC_DIR}/bmake/${PETSC_ARCH}/petscconf.h") # <= 2.3.3


ENH: Rename module to follow Remote Module convention.

Change-Id: I4900b7c6cd2edf63016e530937fb964f47782c87

--- itk-module.cmake
+++ itk-module.cmake
@@ -1,6 +1,6 @@
-set( DOCUMENTATION "This module builds all the examples found at http://itk.org/ITKExamples" )
+set( DOCUMENTATION "This module builds the examples found at http://itk.org/ITKExamples" )

-itk_module(ITKExamples
+itk_module(SphinxExamples
   DEPENDS
     ITKCommon
     EXCLUDE_FROM_DEFAULT


Add KPATH_SEPARATOR from kdelbs 4.1

Add KPATH_SEPARATOR from kdelbs 4.1

svn path=/trunk/KDE/kdepim/; revision=809795

--- kleopatra/config-kleopatra.h.cmake
+++ kleopatra/config-kleopatra.h.cmake
@@ -17,3 +17,15 @@
 #cmakedefine HAVE_KLEOPATRACLIENT_LIBRARY 1

 #define KLEOPATRA_VERSION_STRING "@kleopatra_version@"
+
+#if defined _WIN32 || defined _WIN64
+#include <kde_file_win.h>
+#endif
+
+#if !defined(KPATH_SEPARATOR)
+#if defined _WIN32 || defined _WIN64
+#define KPATH_SEPARATOR ';'
+#else
+#define KPATH_SEPARATOR ':'
+#endif
+#endif


[cmake] fix casing.

[cmake] fix casing.

--- cmake/WintermutePlugin.cmake
+++ cmake/WintermutePlugin.cmake
@@ -18,13 +18,13 @@
 # Boston, MA 02111-1307, USA.
 ###############################################################################

-include(WintermuteSourceBuild
+INCLUDE(WintermuteSourceBuild
   OPTIONAL
   RESULT_VARIABLE WINTERMUTE_IS_SOURCE_BUILD
   )

-include(WintermuteTest)
-include(WintermuteVariables)
+INCLUDE(WintermuteTest)
+INCLUDE(WintermuteVariables)

 MACRO(wintermute_plugin_declare)
   SET(options
@@ -39,22 +39,21 @@
   CMAKE_PARSE_ARGUMENTS(_wpd "${options}"
     "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

-  wintermute_add_target_properties(${_wpd_TARGET})
-  target_link_libraries(${_wpd_TARGET}
-    wintermute)
+  WINTERMUTE_ADD_TARGET_PROPERTIES(${_wpd_TARGET})
+  TARGET_LINK_LIBRARIES(${_wpd_TARGET} wintermute-core)

-  set(_include_dirs )
-  set(_libs )
+  SET(_include_dirs )
+  SET(_libs )

-  if (EXISTS ${WINTERMUTE_IS_SOURCE_BUILD})
-    set(_include_dirs
+  IF (EXISTS ${WINTERMUTE_IS_SOURCE_BUILD})
+    SET(_include_dirs
       ${CMAKE_SOURCE_DIR}/src
       )
-  else()
-    set(_include_dirs ${WINTERMUTE_INCLUDE_DIR})
-  endif()
+  ELSE()
+    SET(_include_dirs ${WINTERMUTE_INCLUDE_DIR})
+  ENDIF()

-  target_include_directories(${_wpd_TARGET} BEFORE
+  TARGET_INCLUDE_DIRECTORIES(${_wpd_TARGET} BEFORE
     PUBLIC ${_include_dirs})
 ENDMACRO(wintermute_plugin_declare)

@@ -78,6 +77,7 @@
   IF (EXISTS ${WINTERMUTE_IS_SOURCE_BUILD})
     SET(_test_driver_file "${CMAKE_SOURCE_DIR}/cmake/plugin_driver.hh.in")
   ELSE()
+    # TODO: Handle installed jazz.
   ENDIF()

   GET_TARGET_PROPERTY(_wpv_file ${_wpv_TARGET} LOCATION)
@@ -105,6 +105,5 @@
     "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

   WINTERMUTE_ADD_TEST("plugin-${_wpat_PREFIX}" ${_wpat_NAME} ${_wpat_HEADER})
-  TARGET_LINK_LIBRARIES("plugin-${_wpat_PREFIX}-${_wpat_NAME}"
-    ${_wpat_TARGET})
+  TARGET_LINK_LIBRARIES("plugin-${_wpat_PREFIX}-${_wpat_NAME}" ${_wpat_TARGET})
 ENDMACRO(wintermute_plugin_add_test)


cmake: Support exports correctly with LLVM_DISTRIBUTION_COMPONENTS

We need to apply the same export logic in clang as in llvm for
LLVM_DISTRIBUTION_COMPONENTS, or the clang exports will be invalid
when we use this config.

This makes using distribution components without setting
LLVM_TOOLCHAIN_ONLY=On work correctly.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@286181 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/AddClang.cmake
+++ cmake/modules/AddClang.cmake
@@ -89,9 +89,15 @@
     target_link_libraries(${name} INTERFACE ${LLVM_COMMON_LIBS})

     if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "libclang")
+
+      if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
+          NOT LLVM_DISTRIBUTION_COMPONENTS)
+        set(export_to_clangtargets EXPORT ClangTargets)
+      endif()
+
       install(TARGETS ${name}
         COMPONENT ${name}
-        EXPORT ClangTargets
+        ${export_to_clangtargets}
         LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
         ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
         RUNTIME DESTINATION bin)
@@ -128,7 +134,13 @@
   add_clang_executable(${name} ${ARGN})

   if (CLANG_BUILD_TOOLS)
+    if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
+        NOT LLVM_DISTRIBUTION_COMPONENTS)
+      set(export_to_clangtargets EXPORT ClangTargets)
+    endif()
+
     install(TARGETS ${name}
+      ${export_to_clangtargets}
       RUNTIME DESTINATION bin
       COMPONENT ${name})


add_swift_host_tool: normalize arguments, rename prefix

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -2330,31 +2330,28 @@
 endmacro()

 function(add_swift_host_tool executable)
-  set(ADDSWIFTHOSTTOOL_multiple_parameter_options
-        SWIFT_COMPONENT)
-
-  cmake_parse_arguments(
-      ADDSWIFTHOSTTOOL # prefix
-      "" # options
-      "" # single-value args
-      "${ADDSWIFTHOSTTOOL_multiple_parameter_options}" # multi-value args
-      ${ARGN})
-
-  precondition(ADDSWIFTHOSTTOOL_SWIFT_COMPONENT
+  set(options)
+  set(single_parameter_options SWIFT_COMPONENT)
+  set(multiple_parameter_options)
+
+  cmake_parse_arguments(ASHT
+    "${options}"
+    "${single_parameter_options}"
+    "${multiple_parameter_options}"
+    ${ARGN})
+
+  precondition(ASHT_SWIFT_COMPONENT
                MESSAGE "Swift Component is required to add a host tool")

   # Create the executable rule.
-  add_swift_executable(
-    ${executable}
-    ${ADDSWIFTHOSTTOOL_UNPARSED_ARGUMENTS}
-  )
-
-  swift_install_in_component(${ADDSWIFTHOSTTOOL_SWIFT_COMPONENT}
+  add_swift_executable(${executable}
+    ${ASHT_UNPARSED_ARGUMENTS})
+
+  swift_install_in_component(${ASHT_SWIFT_COMPONENT}
     TARGETS ${executable}
     RUNTIME DESTINATION bin)

-  swift_is_installing_component(${ADDSWIFTHOSTTOOL_SWIFT_COMPONENT}
-    is_installing)
+  swift_is_installing_component(${ASHT_SWIFT_COMPONENT} is_installing)

   if(NOT is_installing)
     set_property(GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${executable})


Force lua to copy the headers before building

--- cmake/modules/BuildLua.cmake
+++ cmake/modules/BuildLua.cmake
@@ -20,6 +20,7 @@
   ExternalProject_Add_Step(
     lua
     copy-lua
+    DEPENDERS build
     COMMAND ${CMAKE_SCRIPT_PATH}/robocopy.bat "<SOURCE_DIR>/src/" "<INSTALL_DIR>/include/" "*.h"
     COMMAND ${CMAKE_SCRIPT_PATH}/robocopy.bat "<SOURCE_DIR>/src/" "<INSTALL_DIR>/include/" "*.hpp"
   )


Apply patch of ROOT-5485

Apply patch of ROOT-5485

--- cmake/modules/FindPCRE.cmake
+++ cmake/modules/FindPCRE.cmake
@@ -15,9 +15,9 @@

 if(PCRE_CONFIG_EXECUTABLE)
   execute_process(COMMAND ${PCRE_CONFIG_EXECUTABLE} --version OUTPUT_VARIABLE PCRE_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
-  execute_process(COMMAND ${PCRE_CONFIG_EXECUTABLE} --cflags OUTPUT_VARIABLE PCRE_CFLAGS)
+  execute_process(COMMAND ${PCRE_CONFIG_EXECUTABLE} --cflags OUTPUT_VARIABLE PCRE_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
   string( REGEX MATCHALL "-I[^;]+" PCRE_INCLUDE_DIR "${PCRE_CFLAGS}" )
-  string( REPLACE "-I" "" PCRE_INCLUDE_DIR "${PCRE_INCLUDE_DIRS}")
+  string( REPLACE "-I" "" PCRE_INCLUDE_DIR "${PCRE_INCLUDE_DIR}")
   if(NOT  PCRE_INCLUDE_DIR)
     execute_process(COMMAND ${PCRE_CONFIG_EXECUTABLE} --prefix OUTPUT_VARIABLE PCRE_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
     set(PCRE_INCLUDE_DIR ${PCRE_PREFIX}/include)


Allow absolute paths in LLVM_TARGET_DEFINITIONS for CMake's TableGen rule

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

--- cmake/modules/TableGen.cmake
+++ cmake/modules/TableGen.cmake
@@ -6,10 +6,16 @@
   file(GLOB local_tds "*.td")
   file(GLOB_RECURSE global_tds "${LLVM_MAIN_SRC_DIR}/include/llvm/*.td")

+  if (IS_ABSOLUTE ${LLVM_TARGET_DEFINITIONS})
+    set(LLVM_TARGET_DEFINITIONS_ABSOLUTE ${LLVM_TARGET_DEFINITIONS})
+  else()
+    set(LLVM_TARGET_DEFINITIONS_ABSOLUTE
+      ${CMAKE_CURRENT_SOURCE_DIR}/${LLVM_TARGET_DEFINITIONS})
+  endif()
   add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}
     COMMAND ${LLVM_TABLEGEN_EXE} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR}
     -I ${LLVM_MAIN_SRC_DIR}/lib/Target -I ${LLVM_MAIN_INCLUDE_DIR}
-    ${CMAKE_CURRENT_SOURCE_DIR}/${LLVM_TARGET_DEFINITIONS}
+    ${LLVM_TARGET_DEFINITIONS_ABSOLUTE}
     -o ${CMAKE_CURRENT_BINARY_DIR}/${ofn}
     DEPENDS tblgen ${local_tds} ${global_tds}
     COMMENT "Building ${ofn}..."


codegen: qi_create_proxy cmake function.

Change-Id: I43a0f71722e22cd5fe15afc1ba16beae88ec0677
Reviewed-on: http://gerrit.aldebaran.lan:8080/17037
Reviewed-by: mnottale <e3ccf1b6558404e921a21fa09cebb1153b50ec36@aldebaran-robotics.com>
Tested-by: mnottale <e3ccf1b6558404e921a21fa09cebb1153b50ec36@aldebaran-robotics.com>

--- codegen/src/idl-config.cmake
+++ codegen/src/idl-config.cmake
@@ -20,6 +20,22 @@
     qi_error("idl.py not found")
   endif()
   qi_persistent_set(${where} ${IDLPY})
+endfunction()
+
+
+function(qi_create_proxy idl class_name output_dir _out)
+  _qi_find_idl(IDL)
+  string(TOLOWER ${class_name} _filename)
+  set(_filename "${_filename}_proxy.hpp")
+  message("tgt ${output_dir}/${_filename}")
+  set(${_out} ${output_dir}/${_filename} PARENT_SCOPE)
+  qi_generate_src(${output_dir}/${_filename}
+    SRC ${idl}
+    COMMAND ${_python_executable} ${IDL}
+      ${idl}
+      -c ${class_name}
+      -o ${output_dir}/${_filename}
+      -m proxyFuture)
 endfunction()

 #! Create an IDL file by parsing C++ header files.
@@ -209,7 +225,7 @@
          -o ${CMAKE_CURRENT_BINARY_DIR}/${name}_bind.cpp
          -I "${service_includes}"
     )
-    set(ARG_SRC ${CMAKE_CURRENT_BINARY_DIR}/${name}_bind.cpp $${ARG_SRC})
+    set(ARG_SRC ${CMAKE_CURRENT_BINARY_DIR}/${name}_bind.cpp ${ARG_SRC})
   endif()
   # Generate interface
   qi_generate_src(


px4-same70xplained-v1:Updated to upstream master

   Airspeed changes
   add FastRTPS

--- cmake/configs/nuttx_px4-same70xplained-v1_default.cmake
+++ cmake/configs/nuttx_px4-same70xplained-v1_default.cmake
@@ -21,6 +21,8 @@
 	drivers/rgbled
 	drivers/mpu6000
 	drivers/mpu9250
+	drivers/ms4525_airspeed
+	drivers/ms5525_airspeed
 	drivers/lsm303d
 	drivers/l3gd20
 	drivers/hmc5883
@@ -38,7 +40,6 @@
 	drivers/blinkm
 	drivers/airspeed
 	drivers/ets_airspeed
-	drivers/meas_airspeed
 	drivers/frsky_telemetry
 	modules/sensors
 	#drivers/mkblctrl
@@ -137,6 +138,7 @@
 	# had to add for cmake, not sure why wasn't in original config
 	platforms/common
 	platforms/nuttx/px4_layer
+	lib/micro-CDR

 	#
 	# OBC challenge


SVN_SILENT made messages (.desktop file)

--- plugins/gabble/ktpaccountskcm_plugin_gabble.desktop.cmake
+++ plugins/gabble/ktpaccountskcm_plugin_gabble.desktop.cmake
@@ -12,7 +12,7 @@
 Comment[et]=Gabble'i ühendusehaldurit kasutavate kontode kohandatud konto seadistamise kasutajaliides
 Comment[fi]=Gabble-yhteyshallintaa käyttävien tilien mukautettu hallintakäyttöliittymä.
 Comment[fr]=Interface utilisateur personnalisée pour la configuration de comptes en utilisant le gestionnaire de connexions « Gabble ».
-Comment[gl]=Interface de usuario de configuración personalizada da conta para contas que empreguen o xestor de conexións Gabble.
+Comment[gl]=Interface de usuario de configuración personalizada de contas que empreguen o xestor de conexións Gabble.
 Comment[hu]=Egyedi beállítófelület a Gabble kapcsolatkezelőt használó azonosítókhoz.
 Comment[ia]=Interfacie de usator pro configuration de conto personalisate pro contos usante le gerente de connexion Gabble.
 Comment[it]=Interfaccia utente personalizzata di configurazione account per account che usano il gestore di connessioni Gabble.


ENH : add otbossimplugins/ossim in the variable used to generate the include when install otb

--- otbIncludeDirectories.cmake
+++ otbIncludeDirectories.cmake
@@ -56,7 +56,6 @@
 #   ${OTB_SOURCE_DIR}/Utilities/otbossim/include/ossim/projection
 # Add otbossimplugins/ossim/otb into the include directories path
   ${OTB_SOURCE_DIR}/Utilities/otbossimplugins/ossim
-#  ${OTB_SOURCE_DIR}/Utilities/otbossimplugins/ossim/otb
   ${OTB_SOURCE_DIR}/Utilities/dxflib
   ${OTB_SOURCE_DIR}/Utilities/InsightJournal
   ${OTB_SOURCE_DIR}/Utilities/otb6S
@@ -306,6 +305,7 @@
   Utilities/otbossim/include
   Utilities/otbossim/include/ossim
   Utilities/otbossimplugins
+  Utilities/otbossimplugins/ossim
   Utilities/InsightJournal
   Utilities/otb6S
   Utilities/tinyXMLlib


FIX: do not use realpath command

FIX: do not use realpath command

--- tests/system_tests/run_system_tests.sh.cmake
+++ tests/system_tests/run_system_tests.sh.cmake
@@ -23,6 +23,15 @@
 ###############################################################
 set -u
 #set -e
+function realpath() {
+	local p=$1
+	local dname=""
+	if echo $p | grep '^/' > /dev/null 2>&1; then
+		echo $p
+	else
+		echo $(pwd)/$p
+	fi
+}
 SELF_NAME=$(realpath $0)
 SELF_BASE=$(basename $0)
 TIMESTAMP=$(date +%m-%d-%Y_%H-%M-%S)


Fixed common.cmake test targets

Fixed common.cmake test targets

fix: PAST_BUILD -> POST_BUILD
+ commented the line to execute the test after the build

--- common.cmake
+++ common.cmake
@@ -617,7 +617,7 @@
 		add_executable(${target} "" ${files})
 		if(is_test)
 			add_test(NAME ${target} COMMAND ${target})
-			add_custom_command(TARGET ${target} PAST_BUILD COMMAND $<TARGET_FILE:${target}>)
+			#add_custom_command(TARGET ${target} POST_BUILD COMMAND $<TARGET_FILE:${target}>)
 		endif()
 	elseif(is_shared)
 		add_library(${target} SHARED ${files})


v2x: Strip comments in v2x test output.

v2x: Strip comments in v2x test output.

Signed-off-by: Tim 'mithro' Ansell <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@mith.ro>

--- v2x_tests.cmake
+++ v2x_tests.cmake
@@ -35,10 +35,20 @@
   # pb_type checking
   set(GOLDEN_XML golden.${TYPE}.xml)
   add_file_target(FILE ${GOLDEN_XML} SCANNER_TYPE xml)
-  xml_canonicalize_merge(NAME ${NAME}_${TYPE}_golden_sort FILE ${GOLDEN_XML} OUTPUT ${NAME}.${TYPE}.golden.xml)
+  xml_canonicalize_merge(
+    NAME ${NAME}_${TYPE}_golden_sort
+    FILE ${GOLDEN_XML}
+    OUTPUT ${NAME}.${TYPE}.golden.xml
+    EXTRA_ARGUMENTS "-param" "strip_comments" "1"
+    )

   set(ACTUAL_XML ${NAME}.${TYPE}.xml)
-  xml_canonicalize_merge(NAME ${NAME}_${TYPE}_actual_sort FILE ${ACTUAL_XML} OUTPUT ${NAME}.${TYPE}.actual.xml)
+  xml_canonicalize_merge(
+    NAME ${NAME}_${TYPE}_actual_sort
+    FILE ${ACTUAL_XML}
+    OUTPUT ${NAME}.${TYPE}.actual.xml
+    EXTRA_ARGUMENTS "-param" "strip_comments" "1"
+    )

   diff(NAME ${NAME}_${TYPE}_diff GOLDEN ${NAME}.${TYPE}.golden.xml ACTUAL ${NAME}.${TYPE}.actual.xml)


#1284 Socket disconnection detection has been further improved in
OpenIGTLink, need to upgrade version tag to 1362db6789

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

--- CMake/CMakeExternals/OPENIGTLINK.cmake
+++ CMake/CMakeExternals/OPENIGTLINK.cmake
@@ -35,7 +35,7 @@
 IF(NOT DEFINED OpenIGTLink_DIR)

     #1273 - OpenIGTLink version update due to bugfixes.
-    SET(revision_tag b3f5dee767)
+    SET(revision_tag 1362db6789)
     IF(${proj}_REVISION_TAG)
         SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


enh: Use FINAL option of basis_add_executable for MIRTK scripts [CMake]

--- CMake/Modules/mirtkAddExecutable.cmake
+++ CMake/Modules/mirtkAddExecutable.cmake
@@ -62,11 +62,11 @@
     basis_add_executable(${target_name}.cpp ${TARGET_SOURCES} LIBEXEC)
   elseif (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${target_name}.py" OR
           EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${target_name}.py.in")
-    basis_add_executable(${target_name}.py ${TARGET_SOURCES} LIBEXEC)
+    basis_add_executable(${target_name}.py ${TARGET_SOURCES} LIBEXEC FINAL)
     set(LANGUAGE PYTHON)
   elseif (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${target_name}.sh" OR
           EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${target_name}.sh.in")
-    basis_add_executable(${target_name}.sh ${TARGET_SOURCES} LIBEXEC)
+    basis_add_executable(${target_name}.sh ${TARGET_SOURCES} LIBEXEC FINAL)
     set(LANGUAGE BASH)
   else ()
     message(FATAL_ERROR "Source file for MIRTK command ${target_name} not found!"


sitl: enable EMBEDDED_METADATA to add parameter metadata to ROMFS

--- boards/px4/sitl/default.cmake
+++ boards/px4/sitl/default.cmake
@@ -5,6 +5,7 @@
 	MODEL sitl
 	ROMFSROOT px4fmu_common
 	LABEL default
+	EMBEDDED_METADATA parameters
 	TESTING
 	DRIVERS
 		#barometer # all available barometer drivers


flexisip.spec: fix log directory creation

--- build/rpm/flexisip.spec.cmake
+++ build/rpm/flexisip.spec.cmake
@@ -174,6 +174,7 @@
 %{_datarootdir}/*
 %dir %{_includedir}/flexisip
 %{_includedir}/flexisip/*.hh
+%{_localstatedir}/*

 %if @ENABLE_PRESENCE@
 /lib/systemd/system/flexisip-presence.service


ENH: Bump json to same version used in TubeTK

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -34,9 +34,9 @@
 set( VTK_URL https://github.com/Slicer/VTK.git )
 set( VTK_URL_MD5_TAG 6da2c7235b8de9d8663a62f3246198d6865ecfae )

-# JsonCpp snapshot 2014-01-01 r287
-set( JsonCpp_URL http://midas3.kitware.com/midas/download/bitstream/337068/JsonCpp_r275.tar.gz )
-set( JsonCpp_HASH_OR_TAG 43301ad1118004fbdc69b6f7b14a4cd5 )
+# JsonCpp snapshot 2014-04-15 r276
+set( JsonCpp_URL http://midas3.kitware.com/midas/download/bitstream/366544/JsonCpp_r276.tar.gz )
+set( JsonCpp_HASH_OR_TAG 192f0cf2b00798d4f4fb29c99a3aa83c )

 # TubeTK Parameter Serializer snapshot 2014-02-05 )
 set( ParameterSerializer_URL


Install pygments using pip

Install pygments using pip

With "python setup.py install", the installed pygments directory
in "site-packages" has a version number and a ".egg" at the end.
It relies on the use of easypath to be found.

If we install it with "pip install ." instead, the installed
pygments directory is just named "pygments", and can be found
without easypath.

Signed-off-by: Patrick Avery <743342299f279e7a8c3ff5eb40671fce3e95f13a@kitware.com>

--- projects/pygments.cmake
+++ projects/pygments.cmake
@@ -20,6 +20,6 @@
   BUILD_IN_SOURCE 1
   INSTALL_COMMAND
     ${install_command_env}
-  ${pv_python_executable} setup.py install
+  ${python_pip_executable} install .
   ${process_environment}
 )


Switch to updated branch

Switch to updated branch

--- src/CMake/BoostConfig.cmake
+++ src/CMake/BoostConfig.cmake
@@ -68,7 +68,7 @@
       #       library fix is verified.
       SET(boost_GIT_TAG "origin/boost_1_54")
     ELSE()
-      SET(boost_GIT_TAG "origin/boost_1_56_0_beta1")
+      SET(boost_GIT_TAG "origin/boost_1_56_test")
     ENDIF()

     # TODO: fix install step


cmake: AmxConfig: Slightly better comment

--- cmake/Modules/AmxConfig.cmake
+++ cmake/Modules/AmxConfig.cmake
@@ -1,4 +1,4 @@
-# AMX configuration
+# Defines needed for amx.h.

 include(CheckIncludeFile)

@@ -18,4 +18,3 @@
 if(HAVE_STDINT_H)
 	add_definitions(-DHAVE_STDINT_H)
 endif()
-


Improve GTK+ library selection logic.

Improve GTK+ library selection logic.

The new logic will select GTK+3 by default if WITH_GTK is selected. If
the GTK+3 libraries are not found, then GTK+2 libraries will be selected
if found.
This can be overridden by using WITH_GTK_2_X to force selection of GTK+2
(if found).

--- cmake/OpenCVFindLibsGUI.cmake
+++ cmake/OpenCVFindLibsGUI.cmake
@@ -41,17 +41,13 @@
 # --- GTK ---
 ocv_clear_vars(HAVE_GTK HAVE_GTK3 HAVE_GTHREAD HAVE_GTKGLEXT)
 if(WITH_GTK AND NOT HAVE_QT)
-  if(WITH_GTK_2_X)
+  if(NOT WITH_GTK_2_X)
+    CHECK_MODULE(gtk+-3.0 HAVE_GTK3)
+    set(HAVE_GTK TRUE)
+  elseif(NOT HAVE_GTK3)
     CHECK_MODULE(gtk+-2.0 HAVE_GTK)
     if(HAVE_GTK AND (ALIASOF_gtk+-2.0_VERSION VERSION_LESS MIN_VER_GTK))
       message (FATAL_ERROR "GTK support requires a minimum version of ${MIN_VER_GTK} (${ALIASOF_gtk+-2.0_VERSION} found)")
-    endif()
-  else()
-    CHECK_MODULE(gtk+-3.0 HAVE_GTK3)
-    if(HAVE_GTK3)
-      set(HAVE_GTK ON)
-    else()
-      message(WARNING "Unable to locate GTK3 development libraries")
     endif()
   endif()
   CHECK_MODULE(gthread-2.0 HAVE_GTHREAD)


Fix logic error in OpenCVFindLibsGUI.cmake

When with_gtk is selected but GTK3 is not present the current logic
fails to check for GTK2. This edit corrects this.

--- cmake/OpenCVFindLibsGUI.cmake
+++ cmake/OpenCVFindLibsGUI.cmake
@@ -44,7 +44,8 @@
   if(NOT WITH_GTK_2_X)
     CHECK_MODULE(gtk+-3.0 HAVE_GTK3)
     set(HAVE_GTK HAVE_GTK3)
-  else()
+  endif()
+  if(NOT HAVE_GTK)
     CHECK_MODULE(gtk+-2.0 HAVE_GTK)
     if(HAVE_GTK AND (ALIASOF_gtk+-2.0_VERSION VERSION_LESS MIN_VER_GTK))
       message (FATAL_ERROR "GTK support requires a minimum version of ${MIN_VER_GTK} (${ALIASOF_gtk+-2.0_VERSION} found)")


Enable -Wextra.

Enable -Wextra.

--- cmake/compiler-warnings.cmake
+++ cmake/compiler-warnings.cmake
@@ -23,6 +23,10 @@

 CHECK_CXX_COMPILER_FLAG_AND_ENABLE_IT(-Wextra-semi)

+CHECK_CXX_COMPILER_FLAG_AND_ENABLE_IT(-Wextra)
+
+CHECK_CXX_COMPILER_FLAG_AND_ENABLE_IT(-Wno-unused-parameter)
+
 # should be < 64Kb
 # FIXME: 4K
 math(EXPR MAX_MEANINGFUL_SIZE 8*1024)


Simplify treatment of protobuf as external project. (#1223)

By default, protobuf decorates its debug libraries with a `d` postfix, I
was compiling both the release and debug versions of protobuf to
guarantee that the version without the `d` was always available. A
simpler solution is to use `protobuf_DEBUG_POSTFIX` to disable the
postfix altogether. As a side-effect we get slightly faster builds.

--- cmake/external/protobuf.cmake
+++ cmake/external/protobuf.cmake
@@ -34,31 +34,20 @@
         URL_HASH
             SHA256=4ffd420f39f226e96aebc3554f9c66a912f6cad6261f39f194f16af8a1f6dab2
         CONFIGURE_COMMAND ${CMAKE_COMMAND}
+                          -G${CMAKE_GENERATOR}
                           ${GOOGLE_CLOUD_CPP_EXTERNAL_PROJECT_CCACHE}
                           -DCMAKE_BUILD_TYPE=Debug
                           -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
                           -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
                           -DCMAKE_PREFIX_PATH=<INSTALL_DIR>
                           -Dprotobuf_BUILD_TESTS=OFF
+                          -Dprotobuf_DEBUG_POSTFIX=
                           -H<SOURCE_DIR>/cmake
-                          -B<BINARY_DIR>/Debug
-        COMMAND ${CMAKE_COMMAND} ${GOOGLE_CLOUD_CPP_EXTERNAL_PROJECT_CCACHE}
-                -DCMAKE_BUILD_TYPE=Release
-                -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
-                -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-                -DCMAKE_PREFIX_PATH=<INSTALL_DIR> -Dprotobuf_BUILD_TESTS=OFF
-                -H<SOURCE_DIR>/cmake -B<BINARY_DIR>/Release
+                          -B<BINARY_DIR>
         BUILD_COMMAND ${CMAKE_COMMAND}
                       --build
-                      Debug
+                      <BINARY_DIR>
                       ${PARALLEL}
-        COMMAND ${CMAKE_COMMAND} --build Release ${PARALLEL}
-        INSTALL_COMMAND ${CMAKE_COMMAND}
-                        --build
-                        Debug
-                        --target
-                        install
-        COMMAND ${CMAKE_COMMAND} --build Release --target install
         BUILD_BYPRODUCTS
             <INSTALL_DIR>/${CMAKE_INSTALL_LIBDIR}/libprotobuf${CMAKE_STATIC_LIBRARY_SUFFIX}
             <INSTALL_DIR>/${CMAKE_INSTALL_LIBDIR}/libprotobuf${CMAKE_SHARED_LIBRARY_SUFFIX}


Changed curl to be an interface lib instead of a unknown target

--- cmake/modules/BuildCURL.cmake
+++ cmake/modules/BuildCURL.cmake
@@ -7,7 +7,6 @@
     GIT_TAG cb529b713f4882ac65a074ae8d87faa41d19168e
     CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CURL_INSTALL_DIR} -DBUILD_TESTING=OFF -DHTTP_ONLY=ON
     INSTALL_DIR ${CURL_INSTALL_DIR}
-    BUILD_BYPRODUCTS ${CURL_INSTALL_DIR}/lib/libcurl$<$<CONFIG:Debug>:-d>_imp.lib
   )
 else()
   set(_byproducts
@@ -27,13 +26,12 @@
 ExternalProject_Get_Property(
   curl
   install_dir
-  build_byproducts
 )

 set(CURL_INCLUDE_DIRS "${install_dir}/include")

 if(WIN32)
-  set(CURL_LIBRARY "${build_byproducts}")
+  set(CURL_LIBRARY "${install_dir}/lib/libcurl$<$<CONFIG:Debug>:-d>_imp.lib")
   set(CURL_LIBRARIES "${CURL_LIBRARY}")
   set(CURL_INSTALL_LIBS "${install_dir}/bin/libcurl.dll")
 else()
@@ -43,8 +41,8 @@
 endif()

 if(NOT TARGET CURL::CURL)
-    add_library(CURL::CURL UNKNOWN IMPORTED)
+    add_library(CURL::CURL INTERFACE IMPORTED)
     add_dependencies(CURL::CURL curl)
     set_target_properties(CURL::CURL PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIRS}")
-    set_property(TARGET CURL::CURL APPEND PROPERTY IMPORTED_LOCATION "${CURL_LIBRARY}")
+    set_target_properties(CURL::CURL PROPERTIES INTERFACE_LINK_LIBRARIES "${CURL_LIBRARIES}")
 endif()


Revert "cmake/modules/FindNUMPY.cmake: Changed to reflect that NumPy is a required dependency."

This reverts commit 74119d1d70dba97637be01dae412f6efa45b065a.

--- cmake/modules/FindNUMPY.cmake
+++ cmake/modules/FindNUMPY.cmake
@@ -14,20 +14,22 @@
             SET(PYTHON_NUMPY_INCLUDE_DIR "PYTHON_NUMPY_INCLUDE_DIR-NOTFOUND")
         ENDIF()
     ENDIF()
+ELSE()
+    SET(PYTHON_NUMPY_INCLUDE_DIR "PYTHON_NUMPY_INCLUDE_DIR-NOTFOUND")
 ENDIF()

 SET(PYTHON_NUMPY_INCLUDE_DIR ${PYTHON_NUMPY_INCLUDE_DIR}
     CACHE PATH "Path to numpy include files" FORCE)

 IF(PYTHON_NUMPY_INCLUDE_DIR)
-    MESSAGE(STATUS "Found Numpy")
-    MESSAGE(STATUS "  > includes:      ${PYTHON_NUMPY_INCLUDE_DIR}")
+    SET(NUMPY_FOUND TRUE)
+
+    IF (NOT Numpy_FIND_QUIETLY)
+      MESSAGE(STATUS "Found Numpy")
+      MESSAGE(STATUS "  > includes:      ${PYTHON_NUMPY_INCLUDE_DIR}")
+    ENDIF()
+ELSE()
+    IF(Numpy_FIND_REQUIRED)
+      MESSAGE(FATAL_ERROR "Could not find Numpy")
+    ENDIF()
 ENDIF()
-
-# handle the QUIETLY and REQUIRED arguments and set NUMPY_FOUND to TRUE if
-# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(NUMPY DEFAULT_MSG PYTHON_NUMPY_INCLUDE_DIR )
-
-MARK_AS_ADVANCED(PYTHON_NUMPY_INCLUDE_DIR)
-


fix windows package filenames

fix windows package filenames

--- cmake/packages/packages.cmake
+++ cmake/packages/packages.cmake
@@ -57,6 +57,11 @@
   include(packages/bundle)
   include(packages/tar)
 elseif (MSVC)
+  if (${USE_ENTERPRISE})
+    set(CPACK_PACKAGE_NAME             "ArangoDB3e")
+  else()
+    set(CPACK_PACKAGE_NAME             "ArangoDB3")
+  endif()
   if (CMAKE_CL_64)
     SET(ARANGODB_PACKAGE_ARCHITECTURE "win64")
   else ()


Fixed FindIconv that was broken in previous commit.

--- cmake_modules/FindIconv.cmake
+++ cmake_modules/FindIconv.cmake
@@ -15,7 +15,7 @@
 FIND_PATH(ICONV_INCLUDE_DIR iconv.h
   /usr/include
   /usr/local/include
-  DOC "Include directory for the Iconv library linkage (the path to 'iconv.h' file)")
+  DOC "Include directory for the Iconv library linkage (the path to iconv.h file)")
 )

 FIND_LIBRARY(ICONV_LIBRARY NAMES iconv


Update FindArrow.cmake

Update FindArrow.cmake

--- cmake_scripts/FindArrow.cmake
+++ cmake_scripts/FindArrow.cmake
@@ -14,9 +14,6 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-#
-# Original from Apache Parquet C++
-#  https://github.com/apache/parquet-cpp/blob/5c1d9e94b8409d1a2b31491e68f92b4207e48646/cmake_modules/FindArrow.cmake

 # - Find ARROW (arrow/api.h, libarrow.a, libarrow.so)
 # This module defines
@@ -26,44 +23,81 @@
 #  ARROW_SHARED_LIB, path to libarrow's shared library
 #  ARROW_FOUND, whether arrow has been found

-set(ARROW_SEARCH_HEADER_PATHS
-  $ENV{ARROW_HOME}/include
-)
+include(FindPkgConfig)

-set(ARROW_SEARCH_LIB_PATH
-  $ENV{ARROW_HOME}/lib
-)
+if ("$ENV{ARROW_HOME}" STREQUAL "")
+  pkg_check_modules(ARROW arrow)
+  if (ARROW_FOUND)
+    pkg_get_variable(ARROW_ABI_VERSION arrow abi_version)
+    message(STATUS "Arrow ABI version: ${ARROW_ABI_VERSION}")
+    pkg_get_variable(ARROW_SO_VERSION arrow so_version)
+    message(STATUS "Arrow SO version: ${ARROW_SO_VERSION}")
+    set(ARROW_INCLUDE_DIR ${ARROW_INCLUDE_DIRS})
+    set(ARROW_LIBS ${ARROW_LIBRARY_DIRS})
+    set(ARROW_SEARCH_LIB_PATH ${ARROW_LIBRARY_DIRS})
+  elseif(DEFINED ENV{VIRTUAL_ENV})
+    find_path(ARROW_INCLUDE_DIR arrow/api.h HINTS
+      $ENV{VIRTUAL_ENV}/lib/*/site-packages/pyarrow/include)
+    get_filename_component(ARROW_SEARCH_LIB_PATH ${ARROW_INCLUDE_DIR} DIRECTORY)
+  endif()
+else()
+  set(ARROW_HOME "$ENV{ARROW_HOME}")

-find_path(ARROW_INCLUDE_DIR arrow/array.h PATHS
-  ${ARROW_SEARCH_HEADER_PATHS}
-  # make sure we don't accidentally pick up a different version
-  NO_DEFAULT_PATH
-)
+  set(ARROW_SEARCH_HEADER_PATHS
+    ${ARROW_HOME}/include
+    )
+
+  set(ARROW_SEARCH_LIB_PATH
+    ${ARROW_HOME}/lib
+    )
+
+  find_path(ARROW_INCLUDE_DIR arrow/array.h PATHS
+    ${ARROW_SEARCH_HEADER_PATHS}
+    # make sure we don't accidentally pick up a different version
+    NO_DEFAULT_PATH
+    )
+endif()

 find_library(ARROW_LIB_PATH NAMES arrow
   PATHS
   ${ARROW_SEARCH_LIB_PATH}
   NO_DEFAULT_PATH)
+get_filename_component(ARROW_LIBS ${ARROW_LIB_PATH} DIRECTORY)

-find_library(ARROW_IO_LIB_PATH NAMES arrow_io
+find_library(ARROW_JEMALLOC_LIB_PATH NAMES arrow_jemalloc
   PATHS
   ${ARROW_SEARCH_LIB_PATH}
   NO_DEFAULT_PATH)

-if (ARROW_INCLUDE_DIR AND ARROW_LIB_PATH)
+find_library(ARROW_PYTHON_LIB_PATH NAMES arrow_python
+  PATHS
+  ${ARROW_SEARCH_LIB_PATH}
+  NO_DEFAULT_PATH)
+
+if (ARROW_INCLUDE_DIR AND ARROW_LIBS)
   set(ARROW_FOUND TRUE)
-  set(ARROW_LIB_NAME libarrow)
-  set(ARROW_IO_LIB_NAME libarrow_io)

-  set(ARROW_LIBS ${ARROW_SEARCH_LIB_PATH})
-  set(ARROW_STATIC_LIB ${ARROW_LIBS}/${ARROW_LIB_NAME}.a)
-  set(ARROW_SHARED_LIB ${ARROW_LIBS}/${ARROW_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
+  if (MSVC)
+    set(ARROW_STATIC_LIB ${ARROW_LIB_PATH})
+    set(ARROW_PYTHON_STATIC_LIB ${ARROW_PYTHON_LIB_PATH})
+    set(ARROW_SHARED_LIB ${ARROW_STATIC_LIB})
+    set(ARROW_PYTHON_SHARED_LIB ${ARROW_PYTHON_STATIC_LIB})
+  else()
+    set(ARROW_STATIC_LIB ${ARROW_PYTHON_LIB_PATH}/libarrow.a)
+    set(ARROW_PYTHON_STATIC_LIB ${ARROW_PYTHON_LIB_PATH}/libarrow_python.a)
+    set(ARROW_JEMALLOC_STATIC_LIB ${ARROW_PYTHON_LIB_PATH}/libarrow_jemalloc.a)

-  set(ARROW_IO_STATIC_LIB ${ARROW_LIBS}/${ARROW_IO_LIB_NAME}.a)
-  set(ARROW_IO_SHARED_LIB ${ARROW_LIBS}/${ARROW_IO_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
+    set(ARROW_SHARED_LIB ${ARROW_LIBS}/libarrow${CMAKE_SHARED_LIBRARY_SUFFIX})
+    set(ARROW_JEMALLOC_SHARED_LIB ${ARROW_LIBS}/libarrow_jemalloc${CMAKE_SHARED_LIBRARY_SUFFIX})
+    set(ARROW_PYTHON_SHARED_LIB ${ARROW_LIBS}/libarrow_python${CMAKE_SHARED_LIBRARY_SUFFIX})
+  endif()
+endif()
+
+if (ARROW_FOUND)
   if (NOT Arrow_FIND_QUIETLY)
     message(STATUS "Found the Arrow core library: ${ARROW_LIB_PATH}")
-    message(STATUS "Found the Arrow IO library: ${ARROW_IO_LIB_PATH}")
+    message(STATUS "Found the Arrow Python library: ${ARROW_PYTHON_LIB_PATH}")
+    message(STATUS "Found the Arrow jemalloc library: ${ARROW_JEMALLOC_LIB_PATH}")
   endif ()
 else ()
   if (NOT Arrow_FIND_QUIETLY)
@@ -80,21 +114,11 @@
 endif ()

 mark_as_advanced(
-  ARROW_FOUND
   ARROW_INCLUDE_DIR
-  ARROW_LIBS
   ARROW_STATIC_LIB
   ARROW_SHARED_LIB
-  ARROW_IO_STATIC_LIB
-  ARROW_IO_SHARED_LIB
+  ARROW_PYTHON_STATIC_LIB
+  ARROW_PYTHON_SHARED_LIB
+  ARROW_JEMALLOC_STATIC_LIB
+  ARROW_JEMALLOC_SHARED_LIB
 )
-
-find_path(
-    PyArrow_INCLUDE_DIR
-    pyarrow/table_api.h
-    HINTS
-        $ENV{VIRTUAL_ENV}/lib/*/site-packages/
-        ENV PYTHON_INCLUDE_DIR
-        /usr/local/lib/python2.7/dist-packages/
-    DOC "Path to the PyArrow headers"
-)


set parallelproj to v0.6

set parallelproj to v0.6

--- version_config.cmake
+++ version_config.cmake
@@ -149,7 +149,7 @@

 ## parallelproj
 set(DEFAULT_parallelproj_URL https://github.com/gschramm/parallelproj )
-set(DEFAULT_parallelproj_TAG origin/master)
+set(DEFAULT_parallelproj_TAG v0.6)

 ## SIRF-Contribs
 set(DEFAULT_SIRF-Contribs_URL https://github.com/SyneRBI/SIRF-Contribs )


updated Gadgetron version

updated Gadgetron version

--- version_config.cmake
+++ version_config.cmake
@@ -93,8 +93,10 @@
   set(DEFAULT_STIR_TAG 41651b3a2007c58cbf1f7706bb2e269a21e870b1)

   ## Gadgetron
-  set(DEFAULT_Gadgetron_URL https://github.com/CCPPETMR/gadgetron) # https://github.com/CCPPETMR/gadgetron )
-  set(DEFAULT_Gadgetron_TAG chroot_fixes)
+  set(DEFAULT_Gadgetron_URL https://github.com/CCPPETMR/gadgetron )
+  #https://github.com/CCPPETMR/gadgetron)
+
+  set(DEFAULT_Gadgetron_TAG 00b96376568278a595e78879026bb3b0d5fbb98d )

   ## ISMRMRD
   set(DEFAULT_ISMRMRD_URL https://github.com/CCPPETMR/ismrmrd )


Add necessary bits to detect Intel FPGA OpenCL implementation.


Pass DOXYGEN_EXECUTABLE from Superbuild to inner CTK project

Doing so will ensure that th

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -106,6 +106,11 @@
 #-----------------------------------------------------------------------------
 # Qt is expected to be setup by CTK/CMakeLists.txt just before it includes the SuperBuild script
 #
+
+#-----------------------------------------------------------------------------
+# Attempt to discover Doxygen so that DOXYGEN_EXECUTABLE is set to an appropriate default value
+#
+FIND_PACKAGE(Doxygen QUIET)

 #-----------------------------------------------------------------------------
 # ExternalProjects - Project should be topologically ordered
@@ -231,6 +236,7 @@
     ${ctk_superbuild_boolean_args}
     -DCTK_SUPERBUILD:BOOL=OFF
     -DDOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY:PATH=${DOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY}
+    -DDOXYGEN_EXECUTABLE:FILEPATH=${DOXYGEN_EXECUTABLE}
     -DCTK_SUPERBUILD_BINARY_DIR:PATH=${CTK_BINARY_DIR}
     -DCTK_CMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CTK_CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
     -DCTK_CMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CTK_CMAKE_LIBRARY_OUTPUT_DIRECTORY}


cmake(android): update CMAKE_FIND_ROOT_PATH_MODE_* handling

Avoids this error message with CMake 3.10:
CMake Error: CMake was unable to find a build program corresponding to "Ninja".
CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.

Related changes is that pkg-config tool is found (/usr/bin/pkg-config).

--- platforms/android/android.toolchain.cmake
+++ platforms/android/android.toolchain.cmake
@@ -1596,16 +1596,49 @@
     "${CMAKE_INSTALL_PREFIX}/share" )

 # only search for libraries and includes in the ndk toolchain
-set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
-set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
-set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
-
+if(NOT CMAKE_FIND_ROOT_PATH_MODE_LIBRARY)
+  set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
+endif()
+
+if(NOT CMAKE_FIND_ROOT_PATH_MODE_INCLUDE)
+  set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
+endif()
+
+if(NOT CMAKE_FIND_ROOT_PATH_MODE_PACKAGE)
+  set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY )
+endif()
+
+if(NOT CMAKE_FIND_ROOT_PATH_MODE_PROGRAM)
+  set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
+endif()
+
+macro(__cmake_find_root_save_and_reset)
+  foreach(v
+      CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
+      CMAKE_FIND_ROOT_PATH_MODE_INCLUDE
+      CMAKE_FIND_ROOT_PATH_MODE_PACKAGE
+      CMAKE_FIND_ROOT_PATH_MODE_PROGRAM
+  )
+    set(__save_${v} ${${v}})
+    set(${v} NEVER)
+  endforeach()
+endmacro()
+
+macro(__cmake_find_root_restore)
+  foreach(v
+      CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
+      CMAKE_FIND_ROOT_PATH_MODE_INCLUDE
+      CMAKE_FIND_ROOT_PATH_MODE_PACKAGE
+      CMAKE_FIND_ROOT_PATH_MODE_PROGRAM
+  )
+    set(${v} ${__save_${v}})
+    unset(__save_${v})
+  endforeach()
+endmacro()

 # macro to find packages on the host OS
 macro( find_host_package )
- set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
- set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER )
- set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER )
+ __cmake_find_root_save_and_reset()
  if( CMAKE_HOST_WIN32 )
   SET( WIN32 1 )
   SET( UNIX )
@@ -1617,17 +1650,13 @@
  SET( WIN32 )
  SET( APPLE )
  SET( UNIX 1 )
- set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
- set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
- set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
+ __cmake_find_root_restore()
 endmacro()

 # macro to find programs on the host OS
 macro( find_host_program )
- set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
- set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER )
- set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER )
+ __cmake_find_root_save_and_reset()
  if( CMAKE_HOST_WIN32 )
   SET( WIN32 1 )
   SET( UNIX )
@@ -1639,9 +1668,7 @@
  SET( WIN32 )
  SET( APPLE )
  SET( UNIX 1 )
- set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
- set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
- set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
+ __cmake_find_root_restore()
 endmacro()


[cmake] Remove dead variable.

[cmake] Remove dead variable.

This variable was added in 2015 to set a value that was needed given upstream
changes. In Feb 2016, we started importing LLVMConfig.cmake. LLVMConfig.cmake
provides this value for us. Thus we can remove the dead variable.

rdar://26154980

--- cmake/modules/SwiftSharedCMakeConfig.cmake
+++ cmake/modules/SwiftSharedCMakeConfig.cmake
@@ -211,8 +211,6 @@
   endif()

   list(APPEND CMAKE_MODULE_PATH "${${product}_PATH_TO_LLVM_BUILD}/share/llvm/cmake")
-
-  set(LLVM_ABI_BREAKING_CHECKS "WITH_ASSERTS")

   include(AddLLVM)
   include(TableGen)


MSVC: update expat superbuild config for LibKML

--- CMake/External_libKML.cmake
+++ CMake/External_libKML.cmake
@@ -21,6 +21,12 @@
       -DEXPAT_INCLUDE_DIR:STRING=${CMAKE_INSTALL_PREFIX}/include
       -DEXPAT_LIBRARY:STRING=${CMAKE_INSTALL_PREFIX}/lib/libexpat.so
       )
+      if(MSVC)
+        set(LIBKML_SB_EXPAT_CONFIG
+            -DEXPAT_INCLUDE_DIR:STRING=${CMAKE_INSTALL_PREFIX}/include
+            -DEXPAT_LIBRARY:STRING=${CMAKE_INSTALL_PREFIX}/lib/expat.lib
+        )
+      endif()
     list(APPEND ${proj}_DEPENDENCIES EXPAT)
   endif()

@@ -38,28 +44,25 @@
   else()
     set(LIBKML_SB_ZLIB_CONFIG
       -DZLIB_ROOT:STRING=${CMAKE_INSTALL_PREFIX}
-      )
+      )
     list(APPEND ${proj}_DEPENDENCIES ZLIB)
   endif()

   if(MSVC)
     set(${proj}_DEPENDENCIES)
-    set(LIBKML_SB_EXPAT_CONFIG)
-    #set(LIBKML_SB_BOOST_CONFIG)
+
+    set(LIBKML_SB_BOOST_CONFIG)
     set(LIBKML_SB_ZLIB_CONFIG)
-    #try to use github clone
-    #URIPARSER, GOOGLETEST, EXPAT, MINIZIP dependencies
- ### endif()
-       message(STATUS "  LibKML SuperBuild is not available yet...")
-
-  else(UNIX)
-
+
+
   ExternalProject_Add(${proj}
     PREFIX ${proj}
     URL "http://ftp.de.debian.org/debian/pool/main/libk/libkml/libkml_1.3.0~r863.orig.tar.gz"
     URL_MD5 211ed5fdf2dd45aeb9c0abc8e1fe42be
     BINARY_DIR ${LIBKML_SB_BUILD_DIR}
     INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
+    DEPENDS ${${proj}_DEPENDENCIES}
+    PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory  ${CMAKE_SOURCE_DIR}/patches/${proj} ${LIBKML_SB_SRC}
     CMAKE_CACHE_ARGS
       -DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
       -DCMAKE_BUILD_TYPE:STRING=Release
@@ -67,14 +70,7 @@
       ${LIBKML_SB_EXPAT_CONFIG}
       ${LIBKML_SB_BOOST_CONFIG}
       ${LIBKML_SB_ZLIB_CONFIG}
-    #CMAKE_COMMAND
-    #  # use 'env' because CTest launcher doesn't perform shell interpretation
-    #  env LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib
-    #  ${CMAKE_COMMAND}
-    DEPENDS ${${proj}_DEPENDENCIES}
-    PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory
-      ${CMAKE_SOURCE_DIR}/patches/${proj}
-      ${LIBKML_SB_SRC}
+
     )

   message(STATUS "  Using libKML SuperBuild version")


Remove deprecated macro

Remove deprecated macro

--- CMake/OTBModuleMacros.cmake
+++ CMake/OTBModuleMacros.cmake
@@ -27,11 +27,8 @@
 include(${_OTBModuleMacros_DIR}/OTBModuleHeaderTest.cmake)
 include(${_OTBModuleMacros_DIR}/OTBApplicationMacros.cmake)

-# With Apple's GGC <=4.2 and LLVM-GCC <=4.2 visibility of template
-# don't work. Set the option to off and hide it.
-if(APPLE AND CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION  VERSION_LESS "4.3")
-  set( USE_COMPILER_HIDDEN_VISIBILITY OFF CACHE INTERNAL "" )
-elseif(APPLE)
+# TODO check if this is still the case:
+if(APPLE)
   #RK:  compiler visibility nor woking on osx with appleclang xcode.
   #gcc is a symlink to clang
   set( USE_COMPILER_HIDDEN_VISIBILITY OFF CACHE INTERNAL "" )
@@ -369,8 +366,3 @@
     otb_module_target_install(${_name})
   endif()
 endmacro()
-
-macro(otb_module_requires_cxx11)
-  message(WARNING "otb_module_requires_cxx11 is deprecated since OTB version 6.2 which build with c++14 by default. You can safely remove the call to this macro.")
-  set(OTB_MODULE_${otb-module}_REQUIRES_CXX11 1)
-endmacro()


Windows fixes

Windows fixes

--- halide.cmake
+++ halide.cmake
@@ -323,7 +323,7 @@

 # Get (and lazily create) the generated-files directory for Generators.
 function(_halide_genfiles_dir NAME OUTVAR)
-  set(GENFILES_DIR "${CMAKE_BINARY_DIR}/genfiles/${NAME}")
+  set(GENFILES_DIR "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/genfiles/${NAME}")
   file(MAKE_DIRECTORY "${GENFILES_DIR}")
   set(${OUTVAR} "${GENFILES_DIR}" PARENT_SCOPE)
 endfunction()
@@ -334,7 +334,7 @@
   if (NOT "${DIR}" STREQUAL "")
     set(DIR "${DIR}/")
   endif()
-  set(${OUTVAR} "${DIR}lib${TARGET}${CMAKE_STATIC_LIBRARY_SUFFIX}" PARENT_SCOPE)
+  set(${OUTVAR} "${DIR}${CMAKE_CFG_INTDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${TARGET}${CMAKE_STATIC_LIBRARY_SUFFIX}" PARENT_SCOPE)
 endfunction()

 # Adds features to a target string, canonicalizing the result.


COMP (#1356): removing entries of not yet committed files

--- Utilities/openCherry/Bundles/org.opencherry.ui/files.cmake
+++ Utilities/openCherry/Bundles/org.opencherry.ui/files.cmake
@@ -44,10 +44,10 @@
   application/cherryWorkbenchWindowAdvisor.cpp

   #commands
-  commands/cherryContributionItem.cpp
-  commands/cherryContributionManager.cpp
-  commands/cherryIContributionManagerOverrides.cpp
-  commands/cherryIMenuListener.cpp
+  #commands/cherryContributionItem.cpp
+  #commands/cherryContributionManager.cpp
+  #commands/cherryIContributionManagerOverrides.cpp
+  #commands/cherryIMenuListener.cpp

   #dialogs
   dialogs/cherryIDialog.cpp
@@ -55,6 +55,7 @@

   #guitk
   guitk/cherryGuiTkIControlListener.cpp
+  #guitk/cherryGuiTkIMenuListener.cpp
   guitk/cherryGuiTkISelectionListener.cpp
   guitk/cherryGuiTkSelectionEvent.cpp


[fixed] check on success

[fixed] check on success

--- cmake/BOTG.cmake
+++ cmake/BOTG.cmake
@@ -260,7 +260,7 @@
      FAIL_REGEX "[Ww]arning: [Oo]ption"                     # SunPro
      FAIL_REGEX "command option .* is not recognized"       # XL
      )
-   IF( result )
+   IF( ${result} )
      MESSAGE(STATUS "Performing Test ${flag} - Success")
    ELSE()
      MESSAGE(STATUS "Performing Test ${flag} - Fail")


Fixed bug in fix for .m detection in older cmakes

--- cmake/fips.cmake
+++ cmake/fips.cmake
@@ -406,10 +406,10 @@
             source_group("${group_name}" FILES ${py_src} ${py_hdr})
         endif()

-        # mark .m as .c file for older cmake versions
+        # mark .m as .c file for older cmake versions (bug is fixed in cmake 3.1+)
         if (FIPS_OSX)
             if (${f_ext} STREQUAL ".m")
-                set_source_files_properties(${f_ext} PROPERTIES LANGUAGE C)
+                set_source_files_properties(${cur_file} PROPERTIES LANGUAGE C)
             endif()
         endif()


Only error when lines begin with Error

Only error when lines begin with Error

--- cmake/test.cmake
+++ cmake/test.cmake
@@ -112,7 +112,7 @@
   set_tests_properties(test-${testname}-${instance}
     PROPERTIES
       WORKING_DIRECTORY       "${EXECUTABLE_OUTPUT_PATH}"
-      FAIL_REGULAR_EXPRESSION "Error: ")
+      FAIL_REGULAR_EXPRESSION "^Error: ")
   if (NOT WIN32)
     add_custom_target(test-${testname}-${instance})
     add_custom_command(


Turn off ctest coverage parsing due to crash

--- cmake/circle_continuous.cmake
+++ cmake/circle_continuous.cmake
@@ -33,9 +33,6 @@
   file(RENAME "${CTEST_BINARY_DIRECTORY}/coverage/js_coverage.xml" "${CTEST_BINARY_DIRECTORY}/coverage.xml")
 endif()

-ctest_coverage()
-
-file(REMOVE "${CTEST_BINARY_DIRECTORY}/coverage.xml")
 ctest_submit()

 file(REMOVE "${CTEST_BINARY_DIRECTORY}/test_failed")


Added optional support for cppcheck.

Added optional support for cppcheck.

--- cmake/compiler_settings.cmake
+++ cmake/compiler_settings.cmake
@@ -58,3 +58,8 @@
   endif()
 endif()

+option(USE_CPPCHECK "Use cppcheck static code analisys" OFF)
+find_program(CPPCHECK_PROGRAM NAMES cppcheck)
+if(CPPCHECK_PROGRAM AND USE_CPPCHECK)
+  set(CMAKE_CXX_CPPCHECK ${CPPCHECK_PROGRAM} --quiet)
+endif()


Quiet down test for have coverage.

Quiet down test for have coverage.

--- cmake/environmentchecks.cmake
+++ cmake/environmentchecks.cmake
@@ -38,13 +38,13 @@
     message(STATUS "Performing Test HAVE_COVERAGE")
     get_filename_component(PYTHON_DIR ${Python_EXECUTABLE} DIRECTORY)
     execute_process(COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/python_package_check.py exclude-until-coverage-plugin
-      RESULT_VARIABLE TEST_COVERAGE_RESULT)
+      RESULT_VARIABLE TEST_COVERAGE_RESULT OUTPUT_QUIET ERROR_QUIET)
     if(TEST_COVERAGE_RESULT EQUAL 0)
       set(HAVE_COVERAGE TRUE)
       message(STATUS "Performing Test HAVE_COVERAGE - Success")
     else()
       set(HAVE_COVERAGE FALSE)
-      message(STATUS "Performing Test HAVE_COVERAGE - Failure")
+      message(STATUS "Performing Test HAVE_COVERAGE - Failed")
     endif()
   endif()
 endif()


Don't search default paths when looking for numpy (#457)

cmakes find_path() function looks first in system directories and then
in the directories listed by PATHS.  So if there are numpy includes in
/usr/include they will be found first which can break the build.

One way to fix this could be to use HINTS instead of PATHS which will be
searched before the system paths. But in this case we know which
directory we want as we got it from python so let's just skip all other
paths and just look there by adding NO_DEFAULT_PATH.

--- cmake/modules/FindNumPy.cmake
+++ cmake/modules/FindNumPy.cmake
@@ -82,7 +82,8 @@
     return()
 endif()

-find_path(NUMPY_INCLUDE_DIR numpy/numpyconfig.h PATHS ${_numpy_include_path})
+# we already know where it should be so don't search default paths as well.
+find_path(NUMPY_INCLUDE_DIR numpy/numpyconfig.h PATHS ${_numpy_include_path} NO_DEFAULT_PATH)
 if(NUMPY_INCLUDE_DIR)
   set(NUMPY_INCLUDE_DIRS ${NUMPY_INCLUDE_DIR})
 endif()


Disable all weird libcurl protocols and features when bundling

--- cmake/modules/buildCurl.cmake
+++ cmake/modules/buildCurl.cmake
@@ -6,11 +6,46 @@
     set(SECURE_TRANSPORT_FLAGS "--with-secure-transport")
   endif()

+  string(JOIN " "
+    DISABLE_CURL_FEATURES
+    "--disable-ftp"
+    "--disable-ldap"
+    "--disable-ldaps"
+    "--disable-rtsp"
+    "--disable-dict"
+    "--disable-telnet"
+    "--disable-tftp"
+    "--disable-pop3"
+    "--disable-imap"
+    "--disable-smb"
+    "--disable-smtp"
+    "--disable-gopher"
+    "--disable-sspi"
+    "--disable-ntlm-wb"
+    "--disable-netrc"
+
+    "--without-winssl"
+    "--without-schannel"
+    "--without-darwinssl"
+    "--without-amissl"
+    "--without-gnutls"
+    "--without-mbedtls"
+    "--without-wolfssl"
+    "--without-mesalink"
+    "--without-nss"
+    "--without-libpsl"
+    "--without-libmetalink"
+    "--without-librtmp"
+    "--without-winidn"
+
+    "--without-libidn2"
+  )
+
   ExternalProject_Add(BuildCurlBundled
       SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/curl"
       PREFIX "${CMAKE_BINARY_DIR}/curl"
       BUILD_IN_SOURCE 1
-      CONFIGURE_COMMAND bash -c "autoreconf -i && ./configure  --prefix=${CMAKE_CURRENT_BINARY_DIR}/curl --disable-ftp --disable-ldap --disable-ldaps --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smb --disable-smtp --disable-gopher --without-libidn2 ${SECURE_TRANSPORT_FLAGS} && ${CMAKE_SOURCE_DIR}/patch-curl-clock-gettime.sh"
+      CONFIGURE_COMMAND bash -c "autoreconf -i && ./configure  --prefix=${CMAKE_CURRENT_BINARY_DIR}/curl ${DISABLE_CURL_FEATURES} ${SECURE_TRANSPORT_FLAGS} && ${CMAKE_SOURCE_DIR}/patch-curl-clock-gettime.sh"
       BUILD_COMMAND ${MAKE}
   )


For now keep the previous paths on OS X

For now keep the previous paths on OS X

--- Shared/CMake/JamomaUtilFunctions.cmake
+++ Shared/CMake/JamomaUtilFunctions.cmake
@@ -79,23 +79,39 @@
 endFunction()

 ## Function to set install path ##
-function(setOutput)
-	if(DEFINED IS_EXTENSION)
-		setExtensionSuffix()
-		INSTALL(TARGETS ${PROJECT_NAME}
-				DESTINATION "lib/jamoma"
-		)
-	elseif(DEFINED IS_EXTERNAL)
-		setExternalSuffix()
-		INSTALL(TARGETS ${PROJECT_NAME}
-				DESTINATION "externals")
-	else()
-		INSTALL(TARGETS ${PROJECT_NAME}
-		 		DESTINATION "lib"
-		)
-	endif()
-	INSTALL(FILES ${PROJECT_HDRS} DESTINATION "include/jamoma")
-endFunction()
+if(APPLE)
+	function(setOutput)
+		if(DEFINED IS_EXTENSION)
+			setExtensionSuffix()
+			INSTALL(TARGETS ${PROJECT_NAME} DESTINATION "extensions")
+		elseif(DEFINED IS_EXTERNAL)
+			setExternalSuffix()
+			INSTALL(TARGETS ${PROJECT_NAME} DESTINATION "externals")
+		else()
+			INSTALL(TARGETS ${PROJECT_NAME} DESTINATION "lib")
+		endif()
+
+			INSTALL(FILES ${PROJECT_HDRS} DESTINATION "include")
+	endFunction()
+else()
+	function(setOutput)
+		if(DEFINED IS_EXTENSION)
+			setExtensionSuffix()
+			INSTALL(TARGETS ${PROJECT_NAME}
+					DESTINATION "lib/jamoma"
+			)
+		elseif(DEFINED IS_EXTERNAL)
+			setExternalSuffix()
+			INSTALL(TARGETS ${PROJECT_NAME}
+					DESTINATION "externals")
+		else()
+			INSTALL(TARGETS ${PROJECT_NAME}
+			 		DESTINATION "lib"
+			)
+		endif()
+		INSTALL(FILES ${PROJECT_HDRS} DESTINATION "include/jamoma")
+	endFunction()
+endif()

 ## Function to add the Max/MSP includes ##
 function(addMaxsupport)


add support folder for JamomaMaxModularOnly target

maybe we can only add this rule to the relevant library that are really needed by modular

--- Shared/CMake/JamomaUtilFunctions.cmake
+++ Shared/CMake/JamomaUtilFunctions.cmake
@@ -88,6 +88,9 @@
 		install(TARGETS ${PROJECT_NAME}
 				DESTINATION "${JAMOMAMAX_INSTALL_FOLDER}/Jamoma/support"
 				COMPONENT JamomaMax)
+                install(TARGETS ${PROJECT_NAME}
+                                DESTINATION "${JAMOMAMAX_MODULAR_INSTALL_FOLDER}/Jamoma/support"
+                                COMPONENT JamomaMaxModularOnly)
 	endif()
 endFunction()


improved OCE include path detection

improved OCE include path detection

--- contrib/FindOpenCASCADE.cmake
+++ contrib/FindOpenCASCADE.cmake
@@ -31,7 +31,7 @@
     ENDIF( CMAKE_SIZEOF_VOID_P EQUAL 4 )

   IF(UNIX)
-    set( _incsearchpath /usr/include/opencascade /opt/occ/inc $ENV{CASROOT}/inc $ENV{CASROOT}/include/oce)
+    set( _incsearchpath /usr/include/opencascade /usr/include/oce /opt/occ/inc $ENV{CASROOT}/inc $ENV{CASROOT}/include/oce)
     if (APPLE)
       set( _testlibname libTKernel.dylib )
     else (APPLE)
@@ -41,7 +41,7 @@
   ELSE(UNIX)
     IF (WIN32)
       # MESSAGE("************ FindOpenCASCADE.cmake has not been tried on windows and may or may not work! *************")
-      set( _incsearchpath $ENV{CASROOT}\\inc C:\\OpenCASCADE6.3.0\\ros\\inc )
+      set( _incsearchpath $ENV{CASROOT}\\inc $ENV{CASROOT}\\include\\oce)
       set( _testlibname TKernel.lib )
 	  set( _testdllname TKernel.dll )
       set( _libsearchpath $ENV{CASROOT}\\win32\\lib $ENV{CASROOT}\\win${BITS}\\vc9\\lib $ENV{CASROOT}\\win${BITS}\\vc10\\lib C:\\OpenCASCADE6.3.0\\ros\\win32\\lib )


ERR: need to specify include paths for expat.

--- itkIncludeDirectories.cmake
+++ itkIncludeDirectories.cmake
@@ -19,6 +19,8 @@
   ${ITK_SOURCE_DIR}/Utilities/MetaIO
   ${ITK_SOURCE_DIR}/Utilities/MetaIO/SpatialObject
   ${ITK_SOURCE_DIR}/Utilities/DICOMParser
+  ${ITK_BINARY_DIR}/Utilities/expat
+  ${ITK_SOURCE_DIR}/Utilities/expat
   ${ITK_BINARY_DIR}/Utilities
 )


CI: change build name and export short SHA to cdash

--- CI/main_ci.cmake
+++ CI/main_ci.cmake
@@ -30,13 +30,14 @@
 set(ci_profile wip)
 set(ci_mr_source "$ENV{CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}")
 set(ci_mr_target "$ENV{CI_MERGE_REQUEST_TARGET_BRANCH_NAME}")
+set(ci_mr_iid "$ENV{CI_MERGE_REQUEST_IID}")
 set(ci_ref_name "$ENV{CI_COMMIT_REF_NAME}")
 set (CTEST_BUILD_NAME "$ENV{CI_COMMIT_SHORT_SHA}")
-if(ci_mr_source AND ci_mr_target)
-  set (CTEST_BUILD_NAME "${CTEST_BUILD_NAME} (${ci_mr_source} to ${ci_mr_target})")
+if(ci_mr_source AND ci_mr_target AND ci_mr_iid)
+  set (CTEST_BUILD_NAME "${ci_mr_source} (MR ${ci_mr_iid})")
   set(ci_profile mr)
 elseif(ci_ref_name)
-  set (CTEST_BUILD_NAME "${CTEST_BUILD_NAME} (${ci_ref_name})")
+  set (CTEST_BUILD_NAME "${ci_ref_name}")
   if("${ci_ref_name}" STREQUAL "develop")
     set(ci_profile develop)
   elseif("${ci_ref_name}" MATCHES "^release-[0-9]+\\.[0-9]+\$")
@@ -64,10 +65,18 @@
 set (CONFIGURE_OPTIONS  "")
 include ( "${CMAKE_CURRENT_LIST_DIR}/configure_option.cmake" )

+# Sources are already checked out : do nothing for update
+set(CTEST_GIT_UPDATE_CUSTOM echo No update)
+
+# Look for a GIT command-line client.
+find_program(CTEST_GIT_COMMAND NAMES git git.cmd)
+
 # End of configuration

 ctest_start (Experimental TRACK Experimental)
+
+ctest_update()

 ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}"
     SOURCE "${OTB_SOURCE_DIR}"


minor fix

minor fix

--- testing/run_tests.sh.cmake
+++ testing/run_tests.sh.cmake
@@ -19,7 +19,7 @@
 fi
 ###############################################################
 set -u
-set -e
+#set -e
 TIMESTAMP=$(date +%m-%d-%Y_%H-%M-%S)
 LOGFILE=$PWD/run_tests.log.$TIMESTAMP
 WD=$WD/$TIMESTAMP
@@ -164,7 +164,7 @@
     local target=$2
     case $target in
 	mpi)
-	    target==ref
+	    target=ref
 	    ;;
 	mpi-cuda)
 	    target=cuda
@@ -222,6 +222,9 @@
 	    exit_error "Unsupported target: $2"
 	    ;;
     esac
+    if [ $? -ne 0 ]; then
+	return 1
+    fi
     execute_reference $1 $2
     local ref_output=$(get_reference_exe_name $1 $2).out
     if [ -f "$ref_output" ]; then


ENH: Add a proper bugtracking link

ENH: Add a proper bugtracking link

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -25,7 +25,7 @@
 SET (CVS_WEB_CVSROOT "VTK")
 SET (USE_DOXYGEN "On")
 SET (DOXYGEN_URL "http://www.vtk.org/doc/nightly/html/" )
-SET (GNATS_WEB_URL "http://public.kitware.com/Bug/bug.php")
+SET (GNATS_WEB_URL "http://public.kitware.com/Bug/index.php")
 SET (USE_GNATS "On")

 # copy over the testing logo


fix bug for debug mode.

fix bug for debug mode.

--- FindRTMaps.cmake
+++ FindRTMaps.cmake
@@ -1,7 +1,7 @@

 if(RTMAPS_VERSION MATCHES "RTMAPS_4")
 	SET(RTMAPS_DIR $ENV{RTMAPS_SDKDIR})
-	SET(RTMAPS_LINK_FLAGS "/INCLUDE:_MAPSPckInit /INCLUDE:_MAPSGetModulesDefStruct /NODEFAULTLIB:MSVCRTD")
+	SET(RTMAPS_LINK_FLAGS "/INCLUDE:_MAPSPckInit /INCLUDE:_MAPSGetModulesDefStruct")
 else()
 	SET(RTMAPS_DIR $ENV{RTMAPS_INSTDIR})
 	if (NOT DEFINED RTMAPS_VERSION)


Update hunter gate

Update hunter gate

--- HunterGate.cmake
+++ HunterGate.cmake
@@ -14,8 +14,8 @@

 cmake_minimum_required(VERSION 2.8.10)

-set(HUNTER_MINIMUM_VERSION "0.3.0")
-set(HUNTER_MINIMUM_VERSION_HASH f9550a0bf6209d4da5fdee7736816b182d655f5f)
+set(HUNTER_MINIMUM_VERSION "0.3.4")
+set(HUNTER_MINIMUM_VERSION_HASH 6d3d74ee229b2c3c738a6ddb25677a611ba0beda)

 # Set HUNTER_ROOT cmake variable to suitable value.
 # Info about variable can be found in HUNTER_ROOT_INFO.


Remove invalid warning types

Remove invalid warning types

--- src/csapex_core/cmake/csapex-extras.cmake
+++ src/csapex_core/cmake/csapex-extras.cmake
@@ -1,9 +1,7 @@
 if(WIN32)
 #add_definitions(-Wall)
 else()
-add_definitions(-W -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -Wno-unused-function
-    -Wno-deprecated-register -Wno-deprecated-register
-    -pedantic)
+add_definitions(-W -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -Wno-unused-function -pedantic)
 endif()


Don't check if OpenGL ES 2 was found when looking for EglContext.

Missed in 7e62a19401d0e30efb0ee849936447b3219529a2.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -109,7 +109,7 @@
         if(${component} STREQUAL EglContext)
             find_package(EGL)
             find_package(X11)
-            if(NOT OPENGLES2_FOUND OR NOT EGL_FOUND OR NOT X11_FOUND)
+            if(NOT EGL_FOUND OR NOT X11_FOUND)
                 unset(MAGNUM_${_COMPONENT}_LIBRARY)
             endif()
         endif()


Never cache INCLUDE_DIRS and LIBRARIES variables as it has been done..

The problem is that calling set(... CACHE ...) without FORCE doesn't overwrite
the result. For further details:
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/readme.txt

--- core/cmake/FindMulaCore.cmake
+++ core/cmake/FindMulaCore.cmake
@@ -70,7 +70,6 @@
     ${MULA_CORE_INCLUDE_DIR}
     ${QT_INCLUDES}
     ${EIGEN2_INCLUDE_DIR}
-    CACHE PATHS "Includes required for Mula Core"
 )

 find_library(MULA_CORE_LIBRARY
@@ -84,7 +83,6 @@
     ${MULA_CORE_LIBRARY}
     ${QT_QTCORE_LIBRARY}
     ${QT_QTGUI_LIBRARY}
-    CACHE PATHS "Libraries required for Mula Core"
 )

 include(FindPackageHandleStandardArgs)


FIX: windows build

FIX: windows build

--- external/UseOsgEarth.cmake
+++ external/UseOsgEarth.cmake
@@ -106,12 +106,12 @@
 			-DOSGWIDGET_LIBRARY:PATH=${osgWidget_LIBRARY}
 			-DOSGWIDGET_LIBRARY_DEBUG:PATH=${osgWidget_LIBRARY_DEBUG}
 			#CURL
-			-DCURL_INCLUDE_DIR:PATH=${CMAKE_BINARY_DIR}/gdal/include/curl
-			-DCURL_LIBRARY:PATH=${CMAKE_BINARY_DIR}/gdal/lib/libcurl_imp.lib
-			-DCURL_LIBRARY_DEBUG:PATH=${CMAKE_BINARY_DIR}/gdal/lib/libcurl_imp.lib
+			-DCURL_INCLUDE_DIR:PATH=${CMAKE_BINARY_DIR}/3rdparty/gdal/include/curl
+			-DCURL_LIBRARY:PATH=${CMAKE_BINARY_DIR}/3rdparty/gdal/lib/libcurl_imp.lib
+			-DCURL_LIBRARY_DEBUG:PATH=${CMAKE_BINARY_DIR}/3rdparty/gdal/lib/libcurl_imp.lib
 			#ZLIB
-			-DZLIB_INCLUDE_DIR:PATH=${CMAKE_BINARY_DIR}/gdal/include/
-			-DZLIB_LIBRARY:PATH=${CMAKE_BINARY_DIR}/gdal/lib/zlib.lib
+			-DZLIB_INCLUDE_DIR:PATH=${CMAKE_BINARY_DIR}/3rdparty/gdal/include/
+			-DZLIB_LIBRARY:PATH=${CMAKE_BINARY_DIR}/3rdparty/gdal/lib/zlib.lib
 		${OSGEARTH_ARGS}
     )
 endif(WIN32)


Fixed build s.t. it hopefully works on Windows again.

--- misc/CMake-Modules/FindGDCM.cmake
+++ misc/CMake-Modules/FindGDCM.cmake
@@ -45,6 +45,12 @@
 				PATH_SUFFIXES "gdcm/${GDCM_FIND_VERSION}/bin"
 				DOC "GDCM-msff library (release)")

+find_library(	GDCM_LIBRARY_EXPAT_RELEASE
+				NAMES "gdcmexpat-${GDCM_FIND_VERSION}" gdcmexpat
+				PATHS ENV MEDITEC_LIBS
+				PATH_SUFFIXES "gdcm/${GDCM_FIND_VERSION}/bin"
+				DOC "GDCM-expat library (release)")
+
 find_library(	GDCM_LIBRARY_JPEG12_RELEASE
 				NAMES "gdcmjpeg12-${GDCM_FIND_VERSION}" gdcmjpeg12
 				PATHS ENV MEDITEC_LIBS
@@ -57,6 +63,12 @@
 				PATH_SUFFIXES "gdcm/${GDCM_FIND_VERSION}/bin"
 				DOC "GDCM-jpeg8 library (release)")

+find_library(	GDCM_LIBRARY_ZLIB_RELEASE
+				NAMES "gdcmzlib-${GDCM_FIND_VERSION}" gdcmzlib
+				PATHS ENV MEDITEC_LIBS
+				PATH_SUFFIXES "gdcm/${GDCM_FIND_VERSION}/bin"
+				DOC "GDCM-zlib library (release)")
+
 find_library(	GDCM_LIBRARY_DICT_RELEASE
 				NAMES "gdcmDICT-${GDCM_FIND_VERSION}" gdcmDICT
 				PATHS ENV MEDITEC_LIBS
@@ -69,11 +81,29 @@
 				PATH_SUFFIXES "gdcm/${GDCM_FIND_VERSION}/bin"
 				DOC "GDCM-iod library (release)")

+find_library(	GDCM_LIBRARY_CHARLS_RELEASE
+				NAMES "gdcmcharls-${GDCM_FIND_VERSION}" gdcmcharls
+				PATHS ENV MEDITEC_LIBS
+				PATH_SUFFIXES "gdcm/${GDCM_FIND_VERSION}/bin"
+				DOC "GDCM-charls library (release)")
+
+find_library(	GDCM_LIBRARY_GETOPT_RELEASE
+				NAMES "gdcmgetopt-${GDCM_FIND_VERSION}" gdcmgetopt
+				PATHS ENV MEDITEC_LIBS
+				PATH_SUFFIXES "gdcm/${GDCM_FIND_VERSION}/bin"
+				DOC "GDCM-getopt library (release)")
+
 find_library(	GDCM_LIBRARY_JPEG16_RELEASE
 				NAMES "gdcmjpeg16-${GDCM_FIND_VERSION}" gdcmjpeg16
 				PATHS ENV MEDITEC_LIBS
 				PATH_SUFFIXES "gdcm/${GDCM_FIND_VERSION}/bin"
 				DOC "GDCM-jpeg16 library (release)")
+
+find_library(	GDCM_LIBRARY_OPENJPEG_RELEASE
+				NAMES "gdcmopenjpeg-${GDCM_FIND_VERSION}" gdcmopenjpeg
+				PATHS ENV MEDITEC_LIBS
+				PATH_SUFFIXES "gdcm/${GDCM_FIND_VERSION}/bin"
+				DOC "GDCM-openjpeg library (release)")

 ############################################
 # Find DEBUG libraries
@@ -97,6 +127,12 @@
 				PATH_SUFFIXES "gdcm/${GDCM_FIND_VERSION}/bin"
 				DOC "GDCM-msff library (debug)")

+find_library(	GDCM_LIBRARY_EXPAT_DEBUG
+				NAMES "gdcmexpat-${GDCM_FIND_VERSION}d" gdcmexpatd
+				PATHS ENV MEDITEC_LIBS
+				PATH_SUFFIXES "gdcm/${GDCM_FIND_VERSION}/bin"
+				DOC "GDCM-expat library (debug)")
+
 find_library(	GDCM_LIBRARY_JPEG12_DEBUG
 				NAMES "gdcmjpeg12-${GDCM_FIND_VERSION}d" gdcmjpeg12d
 				PATHS ENV MEDITEC_LIBS
@@ -109,6 +145,12 @@
 				PATH_SUFFIXES "gdcm/${GDCM_FIND_VERSION}/bin"
 				DOC "GDCM-jpeg8 library (debug)")

+find_library(	GDCM_LIBRARY_ZLIB_DEBUG
+				NAMES "gdcmzlib-${GDCM_FIND_VERSION}d" gdcmzlibd
+				PATHS ENV MEDITEC_LIBS
+				PATH_SUFFIXES "gdcm/${GDCM_FIND_VERSION}/bin"
+				DOC "GDCM-zlib library (debug)")
+
 find_library(	GDCM_LIBRARY_DICT_DEBUG
 				NAMES "gdcmDICT-${GDCM_FIND_VERSION}d" gdcmDICTd
 				PATHS ENV MEDITEC_LIBS
@@ -121,11 +163,29 @@
 				PATH_SUFFIXES "gdcm/${GDCM_FIND_VERSION}/bin"
 				DOC "GDCM-iod library (debug)")

+find_library(	GDCM_LIBRARY_CHARLS_DEBUG
+				NAMES "gdcmcharls-${GDCM_FIND_VERSION}d" gdcmcharlsd
+				PATHS ENV MEDITEC_LIBS
+				PATH_SUFFIXES "gdcm/${GDCM_FIND_VERSION}/bin"
+				DOC "GDCM-charls library (debug)")
+
+find_library(	GDCM_LIBRARY_GETOPT_DEBUG
+				NAMES "gdcmgetopt-${GDCM_FIND_VERSION}d" gdcmgetoptd
+				PATHS ENV MEDITEC_LIBS
+				PATH_SUFFIXES "gdcm/${GDCM_FIND_VERSION}/bin"
+				DOC "GDCM-getopt library (debug)")
+
 find_library(	GDCM_LIBRARY_JPEG16_DEBUG
 				NAMES "gdcmjpeg16-${GDCM_FIND_VERSION}d" gdcmjpeg16d
 				PATHS ENV MEDITEC_LIBS
 				PATH_SUFFIXES "gdcm/${GDCM_FIND_VERSION}/bin"
 				DOC "GDCM-jpeg16 library (debug)")
+
+find_library(	GDCM_LIBRARY_OPENJPEG_DEBUG
+				NAMES "gdcmopenjpeg-${GDCM_FIND_VERSION}d" gdcmopenjpegd
+				PATHS ENV MEDITEC_LIBS
+				PATH_SUFFIXES "gdcm/${GDCM_FIND_VERSION}/bin"
+				DOC "GDCM-openjpeg library (debug)")

 # handles REQUIRED, QUIET and version-related
 # arguments and also sets the _FOUND variable
@@ -140,40 +200,43 @@
 	GDCM_LIBRARY_IOD_RELEASE
 	GDCM_LIBRARY_JPEG16_RELEASE )

-# use RELEASE builds for both 'optmized' and 'debug' if the DEBUG builds have not
-# been found, e.g. as it is usual on Linux systems
-macro( set_if_not_set_yet var value )
-    if( NOT ${var} )
-        set(${var} ${value})
-    endif()
-endmacro()
-
-set_if_not_set_yet( GDCM_LIBRARY_COMMON_DEBUG   ${GDCM_LIBRARY_COMMON_RELEASE} )
-set_if_not_set_yet( GDCM_LIBRARY_DSED_DEBUG     ${GDCM_LIBRARY_DSED_RELEASE} )
-set_if_not_set_yet( GDCM_LIBRARY_MSFF_DEBUG     ${GDCM_LIBRARY_MSFF_RELEASE} )
-set_if_not_set_yet( GDCM_LIBRARY_JPEG12_DEBUG   ${GDCM_LIBRARY_JPEG12_RELEASE} )
-set_if_not_set_yet( GDCM_LIBRARY_JPEG8_DEBUG    ${GDCM_LIBRARY_JPEG8_RELEASE} )
-set_if_not_set_yet( GDCM_LIBRARY_DICT_DEBUG     ${GDCM_LIBRARY_DICT_RELEASE} )
-set_if_not_set_yet( GDCM_LIBRARY_IOD_DEBUG      ${GDCM_LIBRARY_IOD_RELEASE} )
-set_if_not_set_yet( GDCM_LIBRARY_JPEG16_DEBUG   ${GDCM_LIBRARY_JPEG16_RELEASE} )
-
-# set-up additional dependencies on Windows systems
-if( WIN32 )
-	set( GDCM_EXTRA_DEPENDENCY_LIBRARIES Ws2_32 rpcrt4 )
-else()
-	set( GDCM_EXTRA_DEPENDENCY_LIBRARIES "" )
-endif()
-
 # set paths to library files
 if( GDCM_FOUND )
-	set( GDCM_LIBRARIES
-			optimized	${GDCM_LIBRARY_COMMON_RELEASE}		debug	${GDCM_LIBRARY_COMMON_DEBUG}
-			optimized	${GDCM_LIBRARY_DSED_RELEASE}		debug	${GDCM_LIBRARY_DSED_DEBUG}
-			optimized	${GDCM_LIBRARY_MSFF_RELEASE}		debug	${GDCM_LIBRARY_MSFF_DEBUG}
-			optimized	${GDCM_LIBRARY_JPEG12_RELEASE}		debug	${GDCM_LIBRARY_JPEG12_DEBUG}
-			optimized	${GDCM_LIBRARY_JPEG8_RELEASE}		debug	${GDCM_LIBRARY_JPEG8_DEBUG}
-			optimized	${GDCM_LIBRARY_DICT_RELEASE}		debug	${GDCM_LIBRARY_DICT_DEBUG}
-			optimized	${GDCM_LIBRARY_IOD_RELEASE}			debug	${GDCM_LIBRARY_IOD_DEBUG}
-			optimized	${GDCM_LIBRARY_JPEG16_RELEASE}		debug	${GDCM_LIBRARY_JPEG16_DEBUG}
-			${GDCM_EXTRA_DEPENDENCY_LIBRARIES} )
+
+	set( GDCM_LIBRARIES "" )
+
+    # set-up additional dependencies on Windows systems
+    if( WIN32 )
+        list( APPEND GDCM_LIBRARIES Ws2_32 rpcrt4 )
+    endif()
+
+	macro( add_gdcm_library lib )
+	    if( ${${lib}_DEBUG} )
+    	    list( APPEND GDCM_LIBRARIES optimized ${${lib}_RELEASE} debug ${${lib}_DEBUG} )
+	    else()
+	        list( APPEND GDCM_LIBRARIES ${${lib}_RELEASE} )
+	    endif()
+	endmacro()
+
+	add_gdcm_library( GDCM_LIBRARY_COMMON )
+	add_gdcm_library( GDCM_LIBRARY_DSED )
+	add_gdcm_library( GDCM_LIBRARY_MSFF )
+	add_gdcm_library( GDCM_LIBRARY_JPEG12 )
+	add_gdcm_library( GDCM_LIBRARY_JPEG8 )
+	add_gdcm_library( GDCM_LIBRARY_DICT )
+	add_gdcm_library( GDCM_LIBRARY_IOD )
+	add_gdcm_library( GDCM_LIBRARY_JPEG16 )
+
+	macro( add_gdcm_library_optional lib)
+	    if( ${${lib}_RELEASE} )
+	        add_gdcm_library( ${lib} )
+	    endif()
+	endmacro()
+
+	add_gdcm_library_optional( GDCM_LIBRARY_EXPAT )
+	add_gdcm_library_optional( GDCM_LIBRARY_ZLIB )
+	add_gdcm_library_optional( GDCM_LIBRARY_CHARLS )
+	add_gdcm_library_optional( GDCM_LIBRARY_GETOPT )
+	add_gdcm_library_optional( GDCM_LIBRARY_OPENJPEG )
+
 endif()


cmake: fix issue with handling of EXCLUDE_SRCS

--- tools/cmake/component.cmake
+++ tools/cmake/component.cmake
@@ -271,7 +271,7 @@
         if(__EXCLUDE_SRCS)
             foreach(src ${__EXCLUDE_SRCS})
                 get_filename_component(src "${src}" ABSOLUTE)
-                list(REMOVE_ITEM source "${src}")
+                list(REMOVE_ITEM sources "${src}")
             endforeach()
         endif()
     endif()
@@ -551,4 +551,4 @@
 # Wrapper around target_compile_definitions that passes the component name
 function(component_compile_definitions)
     target_compile_definitions(${COMPONENT_LIB} PRIVATE ${ARGV})
-endfunction()+endfunction()


Fix CLAW XcodeML jar name

Fix CLAW XcodeML jar name


fixed #297

fixed #297

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -197,7 +197,7 @@

 # If building STIR and CUDA present, offer to build NiftyPET
 if (CUDA_FOUND AND NOT USE_SYSTEM_STIR)
-  set(USE_NIFTYPET ON CACHE BOOL "Build STIR with NiftyPET's projectors" FORCE)
+  #set(USE_NIFTYPET ON CACHE BOOL "Build STIR with NiftyPET's projectors" FORCE)
   if (USE_NIFTYPET)
     option(USE_SYSTEM_NIFTYPET "Build using an external version of NiftyPET" OFF)
   endif()


Fix CMake warnings associated with Visomics configure step

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -59,11 +59,11 @@
 #-----------------------------------------------------------------------------

 SET(project_cmake_boolean_args
-  BUILD_DOCUMENTATION
+  #BUILD_DOCUMENTATION # Not used
   BUILD_TESTING
   BUILD_SHARED_LIBS
   WITH_COVERAGE
-  WITH_MEMCHECK
+  #WITH_MEMCHECK # Not used
   )

 SET(project_superbuild_boolean_args)
@@ -77,6 +77,15 @@
 # ENDFOREACH()

 #-----------------------------------------------------------------------------
+# Define list of additional options used to configure Visomics
+#------------------------------------------------------------------------------
+set(project_superbuild_extra_args)
+
+if(DEFINED CTEST_CONFIGURATION_TYPE)
+  list(APPEND project_superbuild_extra_args -DCTEST_CONFIGURATION_TYPE:STRING=${CTEST_CONFIGURATION_TYPE})
+endif()
+
+#-----------------------------------------------------------------------------
 # Configure and build the project
 #------------------------------------------------------------------------------

@@ -87,16 +96,16 @@
   CMAKE_GENERATOR ${gen}
   PREFIX ${proj}${ep_suffix}
   CMAKE_ARGS
+    ${project_superbuild_extra_args}
     ${project_superbuild_boolean_args}
     -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
     -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
     -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
     -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-    -DGIT_EXECUTABLE:FILEPATH=${GIT_EXECUTABLE}
+    #-DGIT_EXECUTABLE:FILEPATH=${GIT_EXECUTABLE} # Not used
     -DVisomics_SUPERBUILD:BOOL=OFF
     -DVisomics_C_FLAGS:STRING=${Visomics_C_FLAGS}
     -DVisomics_CXX_FLAGS:STRING=${Visomics_CXX_FLAGS}
-    -DCTEST_CONFIGURATION_TYPE:STRING=${CTEST_CONFIGURATION_TYPE}
     # QtPropertyBrowser
     -DQtPropertyBrowser_DIR:PATH=${QtPropertyBrowser_DIR}
     # VisomicsData


added tests

added tests

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -91,7 +91,9 @@
 set(SIRF_SRC_PATH ${CMAKE_CURRENT_LIST_DIR}/SIRF)
 set(CCPPETMR_INSTALL ${SUPERBUILD_INSTALL_DIR})
 configure_file(env_ccppetmr.sh.in ${CCPPETMR_INSTALL}/bin/env_ccppetmr.sh)
-<<<<<<< HEAD
+configure_file(env_ccppetmr.csh.in ${CCPPETMR_INSTALL}/bin/env_ccppetmr.csh)
+
+# Creates sirfrc and appends to the bashrc

 if (EXISTS $ENV{HOME}/.sirfrc)
    # copy new version of the env veriables to the file
@@ -110,6 +112,14 @@
 if(NOT EXISTS "${CCPPETMR_INSTALL}/share/gadgetron/config/gadgetron.xml")
    configure_file(${CCPPETMR_INSTALL}/share/gadgetron/config/gadgetron.xml.example ${CCPPETMR_INSTALL}/share/gadgetron/config/gadgetron.xml)
 endif()
-=======
-configure_file(env_ccppetmr.csh.in ${CCPPETMR_INSTALL}/bin/env_ccppetmr.csh)
->>>>>>> ca1927c44e024422b06eb62937eee4e49f89c1db
+
+# add tests
+enable_testing()
+add_test(NAME MR_FULLY_SAMPLED
+         COMMAND bash tests/MR_test1.sh)
+
+add_test(NAME MR_UNDER_SAMPLED
+         COMMAND bash tests/MR_test2.sh)
+
+add_test(NAME PET_TEST1
+         COMMAND bash tests/PET_test1.sh)


CI: clean dirs after superbuild on macOS

--- CI/prepare_superbuild.cmake
+++ CI/prepare_superbuild.cmake
@@ -359,3 +359,9 @@
   message( "push_out = ${push_out}" )
   message( "push_err = ${push_err}" )
 endif()
+
+# MacOS cleanup
+if(APPLE)
+  file(REMOVE_RECURSE CTEST_INSTALL_DIRECTORY)
+  file(REMOVE_RECURSE CI_PROJ_DIR)
+endif()


COMP: explicitly deactivated QT_OPENGL support since this is not necessarily available anywhere

--- CMakeExternals/OpenCV.cmake
+++ CMakeExternals/OpenCV.cmake
@@ -26,7 +26,7 @@
     if(MITK_USE_QT)
       list(APPEND additional_cmake_args
            -DWITH_QT:BOOL=ON
-           -DWITH_QT_OPENGL:BOOL=ON
+           -DWITH_QT_OPENGL:BOOL=OFF
            -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
           )
     endif()


- Fix Snappy packaging error

- Fix Snappy packaging error

--- cmake/Packaging/LinuxSnappyBuild.cmake
+++ cmake/Packaging/LinuxSnappyBuild.cmake
@@ -90,9 +90,7 @@
     set ( SNAPPY_PKG_DIR "${SNAPPY_DEPLOY_DIRECTORY}/${TARGET}" )
     set ( SNAPPY_FINAL_SNAP "${SNAPPY_OUTPUT_DIRECTORY}/${SNAPPY_PACKAGE_NAME}_${VERSION}_all.snap" )
     set ( SNAPPY_ARCH_DATA
-        "amd64) ARCH_STRING=\"x86_64-linux-gnu\" ;;"
-        "i386) ARCH_STRING=\"i386-linux-gnu\" ;;"
-        "armhf) ARCH_STRING=\"arm-linux-gnueabihf\" ;;"
+        "amd64) ARCH_STRING=\"x86_64-linux-gnu\" ;;\ni386) ARCH_STRING=\"i386-linux-gnu\" ;;\narmhf) ARCH_STRING=\"arm-linux-gnueabihf\" ;;"
     )

     set ( SNAPCRAFT_FILE "${SNAPPY_PKG_DIR}/snapcraft.yaml" )


Removed FC_ADD_ON dependency for qurt release build

Signed-off-by: Mark Charlebois <f1891e7fc976ae1bd489627e2954fb730751d728@gmail.com>

--- cmake/configs/qurt_eagle_release.cmake
+++ cmake/configs/qurt_eagle_release.cmake
@@ -1,10 +1,4 @@
 include(qurt/px4_impl_qurt)
-
-#if ("$ENV{EAGLE_ADDON_ROOT}" STREQUAL "")
-#	message(FATAL_ERROR "Enviroment variable EAGLE_ADDON_ROOT must be set")
-#else()
-#	set(EAGLE_ADDON_ROOT $ENV{EAGLE_ADDON_ROOT})
-#endif()

 if ("$ENV{HEXAGON_SDK_ROOT}" STREQUAL "")
 	message(FATAL_ERROR "Enviroment variable HEXAGON_SDK_ROOT must be set")
@@ -34,16 +28,6 @@

 set(CONFIG_SHMEM "1")

-#-L${EAGLE_ADDON_ROOT}/flight_controller/hexagon/libs
-# For Actual flight we need to link against the driver dynamic libraries
-set(target_libraries
-	mpu9x50
-	uart_esc
-	csr_gps
-	rc_receiver
-	)
-
-
 set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
 include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)

@@ -53,10 +37,10 @@
 	#
 	drivers/device
 	modules/sensors
-	#${EAGLE_DRIVERS_SRC}/mpu9x50
+	${EAGLE_DRIVERS_SRC}/mpu9x50
 	${EAGLE_DRIVERS_SRC}/uart_esc
-	#${EAGLE_DRIVERS_SRC}/rc_receiver
-	#${EAGLE_DRIVERS_SRC}/csr_gps
+	${EAGLE_DRIVERS_SRC}/rc_receiver
+	${EAGLE_DRIVERS_SRC}/csr_gps

 	#
 	# System commands


replace standard_project with project override

--- standard/StandardProject.cmake
+++ standard/StandardProject.cmake
@@ -16,22 +16,37 @@

 include(CMakeParseArguments) # Backwards compatibility

-# This must be a macro since project defines scope-local variables
-# that we generally rely on being in the root context.
 # IMPORTANT: Note that if there is no *direct* call to 'project' in the root CMakeLists.txt
 # file, CMake will automatically inject one with the default languages of C and CXX.
 # This will cause the toolchain file to be parsed multiple times, and will
 # make much of the work done in standard_project_preinit useless.
 macro(standard_project project_name)
-  cmake_parse_arguments(standard "" "VERSION" ${ARGN})
+  message(AUTHOR_WARNING "Standard_project has been replaced by an override of project.")
+  project(${ARGV})
+endmacro()

-  if(NOT standard_VERSION)
-    message(FATAL_ERROR "Standard compliant projects must specify a version")
+if(NOT DEFINED standard_project_OVERRIDE)
+  set(standard_project_OVERRIDE ON)
+endif()
+
+# This must be a macro since project defines scope-local variables
+# that we generally rely on being in the root context.
+macro(project project_name)
+  if(standard_project_OVERRIDE)
+    cmake_parse_arguments(standard "" "VERSION" "" ${ARGN})
+
+    if(NOT standard_VERSION)
+      message(FATAL_ERROR "Standard compliant projects must specify a version")
+    endif()
+
+    standard_project_preinit()
+    _project(${project_name} VERSION ${standard_VERSION} ${standard_UNPARSED_ARGUMENTS})
+    standard_project_postinit()
+
+    set(standard_project_OVERRIDE OFF) #we generally only want to modify the root project.
+  else()
+    _project(${ARGV})
   endif()
-
-  standard_project_preinit()
-  project(${project_name} VERSION ${standard_VERSION} ${standard_UNPARSED_ARGUMENTS})
-  standard_project_postinit()
 endmacro()

 function(standard_project_preinit)


Get rid of last module name for now...

Get rid of last module name for now...

--- CPM.cmake
+++ CPM.cmake
@@ -717,11 +717,11 @@

   # Setup module interface definition. This is the name the module is using
   # to identify itself in it's headers.
-  if (DEFINED CPM_LAST_MODULE_NAME)
-    _cpm_check_and_add_preproc(${name} ${CPM_LAST_MODULE_NAME} ${__CPM_FULL_UNID})
-  else()
-    message(FATAL_ERROR "A ${CPM_LAST_MODULE_NAME} module (${__CPM_MODULE_SOURCE_DIR}) failed to define its name!")
-  endif()
+  #if (DEFINED CPM_LAST_MODULE_NAME)
+  #  _cpm_check_and_add_preproc(${name} ${CPM_LAST_MODULE_NAME} ${__CPM_FULL_UNID})
+  #else()
+  #  message(FATAL_ERROR "A ${CPM_LAST_MODULE_NAME} module (${__CPM_MODULE_SOURCE_DIR}) failed to define its name!")
+  #endif()

   # Set the appropriate preprocessor definition for this module and populate
   # our namespace header file.


CHG: added dependency to QmitkTransferFunctionWidget

--- QFunctionalities/QmitkVolumeVisualization/QmitkVolumeVisualization.cmake
+++ QFunctionalities/QmitkVolumeVisualization/QmitkVolumeVisualization.cmake
@@ -1,6 +1,7 @@
 INCLUDE_DIRECTORIES( ${IP_ROOT}/Functionalities/QmitkVolumeVisualization)

 # VolumeVisualization
+INCLUDE(${IP_ROOT}/AppModules/QmitkTransferFunctionWidget/QmitkTransferFunctionWidget.cmake)

 SET( APPMOD_H ${APPMOD_H} ${IP_ROOT}/Functionalities/QmitkVolumeVisualization/QmitkVolumeVisualization.h )
 SET( APPMOD_MOC_H ${APPMOD_MOC_H} ${IP_ROOT}/Functionalities/QmitkVolumeVisualization/QmitkVolumeVisualization.h )


[CMake][Python] The Python installation directory is now the standard one.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -113,8 +113,6 @@
   # Offer the user the choice of overriding the installation directories
   set (INSTALL_LIB_DIR ${LIBDIR} CACHE PATH
 	"Installation directory for libraries")
-  set (INSTALL_PY_LIB_DIR ${LIBDIR}/python${PYTHONLIBS_VERSION}/${PROJECT_NAME}
-	CACHE PATH "Installation directory for Python libraries")
   set (INSTALL_BIN_DIR bin CACHE PATH "Installation directory for executables")
   set (INSTALL_LIBEXEC_DIR CACHE PATH
 	"Installation directory for internal executables")
@@ -498,7 +496,11 @@
       PYTHONLIBS_VERSION "${PYTHONLIBS_LIB_FILENAME}")
 	message (STATUS "Found PythonLibs ${PYTHONLIBS_VERSION}")

-    # Update the list of include directories for the project
+	# Set the Python installation directory
+	set (INSTALL_PY_LIB_DIR ${INSTALL_LIB_DIR}/python${PYTHONLIBS_VERSION}/site-packages/libpy${PROJECT_NAME}
+	  CACHE PATH "Installation directory for Python libraries")
+
+	# Update the list of include directories for the project
     include_directories (${PYTHON_INCLUDE_DIRS})

     # Update the list of dependencies for the project
@@ -1420,7 +1422,7 @@
   set (exec_prefix   ${prefix})
   set (bindir        ${exec_prefix}/bin)
   set (libdir        ${exec_prefix}/${LIBDIR})
-  set (pylibdir	     ${libdir}/python${PYTHONLIBS_VERSION}/${PACKAGE})
+  set (pylibdir	     ${libdir}/python${PYTHONLIBS_VERSION}/site-packages/libpy${PACKAGE})
   set (libexecdir    ${exec_prefix}/libexec)
   set (sbindir       ${exec_prefix}/sbin)
   set (sysconfdir    ${prefix}/etc)


[Build] Re-instated the CMake support for Xapian (which had unfortunately disappeared after a Git merge).

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -279,6 +279,10 @@
       get_boost (${_arg_version})
     endif (${_arg_lower} STREQUAL "boost")

+    if (${_arg_lower} STREQUAL "xapian")
+      get_xapian (${_arg_version})
+    endif (${_arg_lower} STREQUAL "xapian")
+
     if (${_arg_lower} STREQUAL "readline")
       get_readline (${_arg_version})
     endif (${_arg_lower} STREQUAL "readline")
@@ -469,6 +473,28 @@
   endif (Boost_FOUND)

 endmacro (get_boost)
+
+# ~~~~~~~~~~ Xapian ~~~~~~~~~
+macro (get_xapian)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires Xapian-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires Xapian without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (Xapian ${_required_version} REQUIRED)
+
+  if (XAPIAN_FOUND)
+    # Update the list of include directories for the project
+    include_directories (${XAPIAN_INCLUDE_DIR})
+
+    # Update the list of dependencies for the project
+    list (APPEND PROJ_DEP_LIBS_FOR_LIB ${XAPIAN_LIBRARIES})
+  endif (XAPIAN_FOUND)
+
+endmacro (get_xapian)

 # ~~~~~~~~~~ Readline ~~~~~~~~~
 macro (get_readline)
@@ -1883,6 +1909,17 @@
     message (STATUS "  - Boost required libraries ... : ${BOOST_REQUIRED_LIBS}")
   endif (Boost_FOUND)
 endmacro (display_boost)
+
+# Xapian
+macro (display_xapian)
+  if (XAPIAN_FOUND)
+    message (STATUS)
+	message (STATUS "* Xapian:")
+	message (STATUS "  - XAPIAN_VERSION ............. : ${XAPIAN_VERSION}")
+	message (STATUS "  - XAPIAN_LIBRARIES ........... : ${XAPIAN_LIBRARIES}")
+	message (STATUS "  - XAPIAN_INCLUDE_DIR ......... : ${XAPIAN_INCLUDE_DIR}")
+  endif (XAPIAN_FOUND)
+endmacro (display_xapian)

 # Readline
 macro (display_readline)
@@ -2170,6 +2207,7 @@
   display_python ()
   display_zeromq ()
   display_boost ()
+  display_xapian ()
   display_readline ()
   display_mysql ()
   display_soci ()