Cache ITK use file variable for Dataflow build in case it doesn't get propagated by the build.

--- itkGenerateITKConfig.cmake
+++ itkGenerateITKConfig.cmake
@@ -38,6 +38,7 @@

 # The "use" file.
 SET(ITK_USE_FILE ${ITK_BINARY_DIR}/UseITK.cmake)
+SET(SCI_ITK_USE_FILE ${ITK_USE_FILE} CACHE INTERNAL "Path to generated ITK CMake use file" FORCE)

 # The build settings file.
 SET(ITK_BUILD_SETTINGS_FILE ${ITK_BINARY_DIR}/ITKBuildSettings.cmake)


eigen version workarounds

eigen version workarounds

Change-Id: I256f045b607457ddaa2ff17420e8f0bf5ca6eafd

--- VAD_Eigen3.cmake
+++ VAD_Eigen3.cmake
@@ -13,9 +13,26 @@
   if (NOT EIGEN_VERSION AND Eigen3_VERSION)
     vad_add_var(EIGEN_VERSION ${Eigen3_VERSION})
   endif()
+  if (NOT EIGEN_VERSION AND EIGEN3_VERSION)
+    vad_add_var(EIGEN_VERSION ${EIGEN3_VERSION})
+  endif()
+  foreach(_vvar "STRING" "MAJOR" "MINOR" "PATCH")
+    if (NOT Eigen3_VERSION_${_vvar} AND EIGEN3_VERSION_${_vvar})
+      vad_add_var(Eigen3_VERSION_${_vvar} ${EIGEN3_VERSION_${_vvar}})
+      message("set Eigen3_VERSION_${_vvar} ${EIGEN3_VERSION_${_vvar}}")
+    else()
+      message("found Eigen3_VERSION_${_vvar} ${Eigen3_VERSION_${_vvar}}")
+    endif()
+  endforeach()
   if (NOT EIGEN_INCLUDE_DIRS AND EIGEN3_INCLUDE_DIRS)
     vad_add_var(EIGEN_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIRS})
   endif()
+
+  if (NOT TARGET Eigen3::Eigen)
+    add_library(Eigen3::Eigen INTERFACE IMPORTED)
+    set_target_properties(Eigen3::Eigen PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${EIGEN3_INCLUDE_DIRS}")
+  endif()
+
   make_imported_targets_global()
 endfunction()

@@ -33,7 +50,8 @@
   set_target_properties(Eigen3::Eigen PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${EIGEN_INCLUDE_DIRS}")

   # FIXME HACK
-  set(EIGEN_VERSION "3.3.1" CACHE STRING "" FORCE)
-  set(EIGEN_FOUND TRUE CACHE INTERNAL "")
-  set(EIGEN3_FOUND TRUE CACHE INTERNAL "")
+  vad_add_var(EIGEN_VERSION "3.3.1")
+  vad_add_var(EIGEN3_VERSION "3.3.1")
+  vad_add_var(EIGEN_FOUND TRUE)
+  vad_add_var(EIGEN3_FOUND TRUE)
 endfunction()


fix RPM dependeces syntax

fix RPM dependeces syntax

--- packaging/linux/LinuxPackaging.cmake
+++ packaging/linux/LinuxPackaging.cmake
@@ -55,7 +55,7 @@
     "dcmtk-inria, itk-inria-build, medinria-plugins, medinria-plugins-asclepios, medinria-visages-plugins, vtk-inria-build"
     )#TODO When we will not support old fedora it will not be necessary anymore.
   set(CPACK_RPM_PACKAGE_PROVIDES
-    "${CPACK_PACKAGE_NAME} =${CPACK_PACKAGE_VERSION}"
+    "${CPACK_PACKAGE_NAME} = ${CPACK_PACKAGE_VERSION}"
     )
   set(CPACK_RPM_PACKAGE_LICENSE BSD)
   set (CPACK_RPM_PACKAGE_ARCHITECTURE ${ARCH})


Some minor cleaning up.

Some minor cleaning up.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -42,7 +42,6 @@

         IF(WIN32)
             SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DNDEBUG /MD /O2 /Ob2")
-            SET(LINK_FLAGS_PROPERTIES "${LINK_FLAGS_PROPERTIES}")
         ELSE()
             SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -ffast-math")
         ENDIF()


Travis-CI: trying to understand why the tests don't pass on OS X while they do locally.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -88,9 +88,9 @@

     # Keep track of some information about Qt

-    GET_FILENAME_COMPONENT(QT_BINARY_DIR ${_qt5Widgets_install_prefix}/bin REALPATH)
-    GET_FILENAME_COMPONENT(QT_LIBRARY_DIR ${_qt5Widgets_install_prefix}/lib REALPATH)
-    GET_FILENAME_COMPONENT(QT_PLUGINS_DIR ${_qt5Widgets_install_prefix}/plugins REALPATH)
+    SET(QT_BINARY_DIR ${_qt5Widgets_install_prefix}/bin)
+    SET(QT_LIBRARY_DIR ${_qt5Widgets_install_prefix}/lib)
+    SET(QT_PLUGINS_DIR ${_qt5Widgets_install_prefix}/plugins)
     SET(QT_VERSION_MAJOR ${Qt5Widgets_VERSION_MAJOR})
     SET(QT_VERSION_MINOR ${Qt5Widgets_VERSION_MINOR})
     SET(QT_VERSION_PATCH ${Qt5Widgets_VERSION_PATCH})
@@ -980,12 +980,21 @@

     # Make sure that the Qt file refers to our embedded version of its Qt
     # dependencies
+    # Note: on Travis CI, QT_LIBRARY_DIR points to a symbolic path. That
+    #       symbolic path is used by some libraries, but not all. Some libraries
+    #       use the real path instead. So, we need to handle both cases...
+
+    GET_FILENAME_COMPONENT(REAL_QT_LIBRARY_DIR ${QT_LIBRARY_DIR} REALPATH)

     FOREACH(DEPENDENCY ${ARGN})
         SET(DEPENDENCY_FILENAME ${DEPENDENCY}.framework/Versions/${QT_VERSION_MAJOR}/${DEPENDENCY})

         ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
                            COMMAND install_name_tool -change ${QT_LIBRARY_DIR}/${DEPENDENCY_FILENAME}
+                                                             @rpath/${DEPENDENCY_FILENAME}
+                                                             ${FULL_FILENAME})
+        ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
+                           COMMAND install_name_tool -change ${REAL_QT_LIBRARY_DIR}/${DEPENDENCY_FILENAME}
                                                              @rpath/${DEPENDENCY_FILENAME}
                                                              ${FULL_FILENAME})
     ENDFOREACH()


Slight improvement to our CMake code for retrieving a binary file.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -1078,12 +1078,14 @@
         SET(REAL_COMPRESSED_FILENAME ${REAL_DIRNAME}/${COMPRESSED_FILENAME})

         FILE(DOWNLOAD "http://www.opencor.ws/binaries/${DIRNAME}/${COMPRESSED_FILENAME}" ${REAL_COMPRESSED_FILENAME}
-             SHOW_PROGRESS)
+             SHOW_PROGRESS STATUS STATUS)

         # Uncompress the file, should we have managed to retrieve its
         # uncompressed version

-        IF(EXISTS ${REAL_COMPRESSED_FILENAME})
+        LIST(GET STATUS 0 STATUS_CODE)
+
+        IF(${STATUS_CODE} EQUAL 0)
             EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar zxvf ${REAL_COMPRESSED_FILENAME}
                             WORKING_DIRECTORY ${REAL_DIRNAME} OUTPUT_QUIET)
             FILE(REMOVE ${REAL_COMPRESSED_FILENAME})
@@ -1103,6 +1105,8 @@
                 MESSAGE(FATAL_ERROR "The file does not have the expected SHA-1 value...")
             ENDIF()
         ELSE()
+            FILE(REMOVE ${REAL_COMPRESSED_FILENAME})
+
             MESSAGE(FATAL_ERROR "The file could not be uncompressed...")
         ENDIF()
     ENDIF()


use release tag

use release tag

--- cmake/libigl.cmake
+++ cmake/libigl.cmake
@@ -6,6 +6,6 @@
 FetchContent_Declare(
     libigl
     GIT_REPOSITORY https://github.com/libigl/libigl.git
-    GIT_TAG 10b3cd442e69e0a4e0287387453f7f0bf60ae4b2
+    GIT_TAG v2.4.0
 )
 FetchContent_MakeAvailable(libigl)


revert the change for auto-rpm-packages for plugins. galera tree should only build galera-server package

--- cmake/plugin.cmake
+++ cmake/plugin.cmake
@@ -207,17 +207,7 @@
     SET_TARGET_PROPERTIES(${target} PROPERTIES
       OUTPUT_NAME "${ARG_MODULE_OUTPUT_NAME}")
     # Install dynamic library
-    IF(ARG_COMPONENT)
-      IF(RPM AND NOT CPACK_COMPONENTS_ALL MATCHES ${ARG_COMPONENT})
-        SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} ${ARG_COMPONENT} PARENT_SCOPE)
-        SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_REQUIRES "MariaDB-server" PARENT_SCOPE)
-
-        # workarounds for cmake issues #13248 and #12864:
-        SET(CPACK_RPM_${ARG_COMPONENT}_USER_FILELIST ${ignored} PARENT_SCOPE)
-        SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_PROVIDES "cmake_bug_13248" PARENT_SCOPE)
-        SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_OBSOLETES "cmake_bug_13248" PARENT_SCOPE)
-      ENDIF()
-    ELSE()
+    IF(NOT ARG_COMPONENT)
       SET(ARG_COMPONENT Server)
     ENDIF()
     MYSQL_INSTALL_TARGETS(${target} DESTINATION ${INSTALL_PLUGINDIR} COMPONENT ${ARG_COMPONENT})


added hooks for including .cmake file prior to each run, to
support building with custom toolchain

git-svn-id: ed337ca7cdb08c0ba29d8fe58632bb7686892c2d@178 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6

--- suite/runsuite.cmake
+++ suite/runsuite.cmake
@@ -28,17 +28,19 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 # DAMAGE.

-# Unfinished features in i#66:
+# Unfinished features in i#66 (now under i#121):
 # * have a list of known failures and label w/ " (known: i#XX)"
-# * use the features in the latest CTest: -W, -j
 # * ssh support for running on remote machines: copy, disable pdbs, run
+# * i#111: use the features in the latest CTest: -W, -j

 cmake_minimum_required (VERSION 2.2)

 # arguments are a ;-separated list (must escape as \; from ctest_run_script())
-set(arg_nightly OFF)
-set(arg_long OFF)
-set(arg_include "")
+set(arg_nightly OFF)  # whether to report the results
+set(arg_long OFF)     # whether to run the long suite
+set(arg_include "")   # cmake file to include up front
+set(arg_preload "")   # cmake file to include prior to each 32-bit build
+set(arg_preload64 "") # cmake file to include prior to each 64-bit build

 foreach (arg ${CTEST_SCRIPT_ARG})
   if (${arg} STREQUAL "nightly")
@@ -50,6 +52,12 @@
   if (${arg} MATCHES "^include=")
     string(REGEX REPLACE "^include=" "" arg_include "${arg}")
   endif (${arg} MATCHES "^include=")
+  if (${arg} MATCHES "^preload=")
+    string(REGEX REPLACE "^preload=" "" arg_preload "${arg}")
+  endif (${arg} MATCHES "^preload=")
+  if (${arg} MATCHES "^preload64=")
+    string(REGEX REPLACE "^preload64=" "" arg_preload64 "${arg}")
+  endif (${arg} MATCHES "^preload64=")
 endforeach (arg)

 # allow setting the base cache variables via an include file
@@ -156,6 +164,20 @@
 # returns the build dir in "last_build_dir"
 function(testbuild_ex name is64 initial_cache build_args)
   set(CTEST_BUILD_NAME "${name}")
+  # Support other VC installations than VS2005 via pre-build include file.
+  # Preserve path so include file can simply prepend each time.
+  set(pre_path "$ENV{PATH}")
+  if (is64)
+    set(preload_file "${arg_preload64}")
+  else (is64)
+    set(preload_file "${arg_preload}")
+  endif (is64)
+  if (preload_file)
+    # Command-style CTest (i.e., using ctest_configure(), etc.) does
+    # not support giving args to CTEST_CMAKE_COMMAND so we are forced
+    # to do an include() instead of -C
+    include("${preload_file}")
+  endif (preload_file)
   # support "make install"
   set(CTEST_BUILD_COMMAND "${CTEST_BUILD_COMMAND_BASE} ${build_args}")
   set(CTEST_BINARY_DIRECTORY "${BINARY_BASE}/build_${CTEST_BUILD_NAME}")
@@ -170,6 +192,9 @@
   file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" "${CTEST_INITIAL_CACHE}")

   if (WIN32)
+    # If other compilers also on path ensure we pick cl
+    set(ENV{CC} "cl")
+    set(ENV{CXX} "cl")
     # Convert env vars to run proper compiler.
     # Note that this is fragile and won't work with non-standard
     # directory layouts: we assume standard VS2005 or SDK.
@@ -224,6 +249,7 @@
   if (DO_SUBMIT)
     ctest_submit()
   endif (DO_SUBMIT)
+  set(ENV{PATH} "${pre_path}")
 endfunction(testbuild_ex)

 function(testbuild name is64 initial_cache)


Fix embedding of Mercurial version for non-C locales.

Replace cmake-based parsing of potentially localized hg tip output by explicit template-based hg output.

--- tools/cmake/HGVersion.cmake
+++ tools/cmake/HGVersion.cmake
@@ -1,24 +1,24 @@
 cmake_minimum_required (VERSION 2.8)

 macro ( ReadProjectRevisionStatus )
-#message(STATUS "GETTING HG VERSION")
+message(STATUS "GETTING HG VERSION")
 #message( STATUS PROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} )

 #exec_program( hg ${PROJECT_SOURCE_DIR} ARGS paths OUTPUT_VARIABLE ${PROJECT_NAME}_HGPATHS )
 #message( STATUS "${PROJECT_NAME}_HGPATHS=${${PROJECT_NAME}_HGPATHS}}" )
-exec_program( hg ${PROJECT_SOURCE_DIR} ARGS tip OUTPUT_VARIABLE __HGTIP__ )
-#message(STATUS "__HGTIP__=${__HGTIP__}")
+exec_program( hg ${PROJECT_SOURCE_DIR} ARGS tip --template='{rev}:{node|short}\n' OUTPUT_VARIABLE __HGTIP__ )
+message(STATUS "__HGTIP__=${__HGTIP__}")

-SET( CHANGESET  "\""  "\"" )
+SET( CHANGESET  "\"" ${__HGTIP__} "\"" )

-string( REPLACE "\n" ";" __HGTIP__ ${__HGTIP__} )
-foreach(HGTIP ${__HGTIP__})
-    string(SUBSTRING "${HGTIP}" 0 11 HGTIPSTART)
-    if (HGTIPSTART MATCHES "changeset: ")
-        SET( CHANGESET  "\"" ${HGTIP} "\"" )
-        message(STATUS "${HGTIP}")
-    endif()
-endforeach()
+#string( REPLACE "\n" ";" __HGTIP__ ${__HGTIP__} )
+#foreach(HGTIP ${__HGTIP__})
+#    string(SUBSTRING "${HGTIP}" 0 11 HGTIPSTART)
+#    if (HGTIPSTART MATCHES "changeset: ")
+#        SET( CHANGESET  "\"" ${HGTIP} "\"" )
+#        message(STATUS "${HGTIP}")
+#    endif()
+#endforeach()

 add_custom_target(buildheader ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/buildtime.h)
 file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/buildtime.h )


cmake(plugins): build without opencv_*.so on OSX

--- cmake/OpenCVPluginStandalone.cmake
+++ cmake/OpenCVPluginStandalone.cmake
@@ -78,8 +78,10 @@
     set_target_properties(${OPENCV_PLUGIN_NAME} PROPERTIES PREFIX "${OPENCV_PLUGIN_MODULE_PREFIX}")
   endif()

-  # Hack for Windows only, Linux/MacOS uses global symbol table (without exact .so binding)
-  if(WIN32)
+  if(APPLE)
+    set_target_properties(${OPENCV_PLUGIN_NAME} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
+  elseif(WIN32)
+    # Hack for Windows only, Linux/MacOS uses global symbol table (without exact .so binding)
     find_package(OpenCV REQUIRED ${module} ${OPENCV_PLUGIN_DEPS})
     target_link_libraries(${OPENCV_PLUGIN_NAME} PRIVATE ${OpenCV_LIBRARIES})
   endif()


feature: update eigen version to 3.3.9

feature: update eigen version to 3.3.9

--- cmake/external/DownloadEigen.cmake
+++ cmake/external/DownloadEigen.cmake
@@ -6,7 +6,7 @@

 ExternalProject_Add(eigen
                     GIT_REPOSITORY "https://gitlab.com/libeigen/eigen.git"
-                    GIT_TAG "3.3.8"
+                    GIT_TAG "3.3.9"
                     SOURCE_DIR "${PROJECT_SOURCE_DIR}/third_party/eigen3"
                     BINARY_DIR "${CMAKE_BINARY_DIR}/eigen-build"
                     CONFIGURE_COMMAND ""


New version has been added (and old returned)

--- cmake/projects/ZeroMQ/hunter.cmake
+++ cmake/projects/ZeroMQ/hunter.cmake
@@ -14,13 +14,24 @@
   PACKAGE_NAME
   ZeroMQ
   VERSION
-  "4.1.4"
+  "4.1.4-p2"
   URL
   "https://github.com/hunter-packages/zeromq4-1/archive/v4.1.4-hunter-p2.tar.gz"
   SHA1
   a3f39b9bbc23cf896cb78b3b33e3b46a45177eb5
   )

+hunter_add_version(
+  PACKAGE_NAME
+  ZeroMQ
+  VERSION
+  "4.1.4"
+  URL
+  "https://github.com/hunter-packages/zeromq4-1/archive/v4.1.4-hunter-p1.tar.gz"
+  SHA1
+  be57db45f4f998c04d1804132b1302f923405fa4
+  )
+
 hunter_cmake_args(ZeroMQ CMAKE_ARGS ZMQ_BUILD_TESTS=OFF)
 hunter_pick_scheme(DEFAULT url_sha1_cmake)
 hunter_cacheable(ZeroMQ)


cmake: fix dts fixup file location for external SOC

The board is done correctly, but there's a missing SOC_DIR.

Signed-off-by: Marti Bolivar <fd5da480b758a78208111e6ae5c6806e1f887137@foundries.io>

--- cmake/dts.cmake
+++ cmake/dts.cmake
@@ -140,7 +140,7 @@
   # Run extract_dts_includes.py for the header file
   # generated_dts_board.h
   set_ifndef(DTS_BOARD_FIXUP_FILE ${BOARD_DIR}/dts_fixup.h)
-  set_ifndef(DTS_SOC_FIXUP_FILE   ${PROJECT_SOURCE_DIR}/soc/${ARCH}/${SOC_PATH}/dts_fixup.h)
+  set_ifndef(DTS_SOC_FIXUP_FILE   ${SOC_DIR}/${ARCH}/${SOC_PATH}/dts_fixup.h)

   list(APPEND dts_fixups
     ${DTS_BOARD_FIXUP_FILE}


dts: Allow users to pass extra flags to DTC

Allow application build scripts to pass extra flags to DTC, this could
for instance be done to enable/disable warnings.

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/dts.cmake
+++ cmake/dts.cmake
@@ -111,8 +111,8 @@
     -O dts
     -o ${BOARD}.dts_compiled
     -b 0
-	${EXTRA_DTC_FLAGS} # User settable
     -E unit_address_vs_reg
+    ${EXTRA_DTC_FLAGS} # User settable
     ${BOARD}.dts.pre.tmp
     WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
     RESULT_VARIABLE ret


Added boost installation in RelWithDebInfo

--- cmake/dev/boost_libraries.cmake
+++ cmake/dev/boost_libraries.cmake
@@ -70,7 +70,7 @@
                     install(DIRECTORY ${BOOST_LIBRARYDIR_NORMALIZE}/
                         DESTINATION ${BIN_INSTALL_DIR}${DIR_EXTENSION}
                         COMPONENT libraries_${MSVC_ARCH}
-                        CONFIGURATIONS Release
+                        CONFIGURATIONS Release RelWithDebInfo
                         FILES_MATCHING
                         PATTERN "boost_${arg_}-${BOOST_ARCH}-mt*.dll"
                         PATTERN "boost_${arg_}-${BOOST_ARCH}-mt-gd*.dll" EXCLUDE
@@ -90,7 +90,7 @@
                     install(DIRECTORY ${BOOST_LIBRARYDIR_NORMALIZE}/
                         DESTINATION ${LIB_INSTALL_DIR}${DIR_EXTENSION}
                         COMPONENT libraries_${MSVC_ARCH}
-                        CONFIGURATIONS Release
+                        CONFIGURATIONS Release RelWithDebInfo
                         FILES_MATCHING
                         PATTERN "boost_${arg_}-${BOOST_ARCH}-mt*.lib"
                         PATTERN "boost_${arg_}-${BOOST_ARCH}-mt-gd*.lib" EXCLUDE


Add support for libjsoncpp-dev Debian package to FindJSONCPP.cmake.

--- cmake/modules/FindJSONCPP.cmake
+++ cmake/modules/FindJSONCPP.cmake
@@ -76,6 +76,7 @@
 	${_jsoncppnames}
 	PATHS
 	"${JSONCPP_ROOT_DIR}/libs"
+	/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
 	PATH_SUFFIXES
 	${_pathsuffixes})

@@ -84,6 +85,7 @@
 	json/json.h
 	PATHS
 	"${JSONCPP_ROOT_DIR}"
+	/usr/include/jsoncpp
 	PATH_SUFFIXES
 	include)


Don't use ExternalProject when using system version of eigen

--- cmakemodules/script_eigen.cmake
+++ cmakemodules/script_eigen.cmake
@@ -3,24 +3,8 @@
 SET(EIGEN_MATRIXBASE_PLUGIN "<mrpt/math/eigen_plugins.h>" CACHE STRING "Eigen plugin header")
 SET(EIGEN_MATRIXBASE_PLUGIN_POST_IMPL "<mrpt/math/eigen_plugins_impl.h>" CACHE STRING "Eigen plugin implementation header")

-# download Eigen from bitbucket
-include(ExternalProject)
-ExternalProject_Add(eigen3
-  URL               "https://bitbucket.org/eigen/eigen/get/3.3.3.tar.bz2"
-  URL_MD5           "b2ddade41040d9cf73b39b4b51e8775b"
-  SOURCE_DIR        "${MRPT_SOURCE_DIR}/otherlibs/eigen3/"
-  CONFIGURE_COMMAND ""
-  BUILD_COMMAND     ""
-  INSTALL_COMMAND   ""
-  TEST_COMMAND      ""
-)
-
-
-SET(EIGEN_EMBEDDED_INCLUDE_DIR "${MRPT_SOURCE_DIR}/otherlibs/eigen3/" CACHE PATH "Eigen path for embedded use")
-
 MARK_AS_ADVANCED(EIGEN_MATRIXBASE_PLUGIN)
 MARK_AS_ADVANCED(EIGEN_MATRIXBASE_PLUGIN_POST_IMPL)
-MARK_AS_ADVANCED(EIGEN_EMBEDDED_INCLUDE_DIR)

 # By default: Use system version if pkg-config says it exists:
 SET(DEFAULT_EIGEN_USE_EMBEDDED_VERSION ON)
@@ -36,6 +20,21 @@
 SET(EIGEN_USE_EMBEDDED_VERSION ${DEFAULT_EIGEN_USE_EMBEDDED_VERSION} CACHE BOOL "Use embedded Eigen3 version or system version")
 IF (EIGEN_USE_EMBEDDED_VERSION)
 	# Include embedded version headers:
+	include(ExternalProject)
+	# download Eigen from bitbucket
+	ExternalProject_Add(eigen3
+	  URL               "https://bitbucket.org/eigen/eigen/get/3.3.3.tar.bz2"
+	  URL_MD5           "b2ddade41040d9cf73b39b4b51e8775b"
+	  SOURCE_DIR        "${MRPT_SOURCE_DIR}/otherlibs/eigen3/"
+	  CONFIGURE_COMMAND ""
+	  BUILD_COMMAND     ""
+	  INSTALL_COMMAND   ""
+	  TEST_COMMAND      ""
+	)
+
+	SET(EIGEN_EMBEDDED_INCLUDE_DIR "${MRPT_SOURCE_DIR}/otherlibs/eigen3/" CACHE PATH "Eigen path for embedded use")
+	MARK_AS_ADVANCED(EIGEN_EMBEDDED_INCLUDE_DIR)
+
 	SET(MRPT_EIGEN_INCLUDE_DIR "${EIGEN_EMBEDDED_INCLUDE_DIR}")
 ELSE(EIGEN_USE_EMBEDDED_VERSION)
 	# Find Eigen headers in the system:


Fixed libdir

Fixed libdir

--- libcmime.pc.cmake
+++ libcmime.pc.cmake
@@ -1,6 +1,6 @@
 prefix=@CMAKE_INSTALL_PREFIX@
 exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+libdir=@CMAKE_INSTALL_LIBDIR@
 includedir=${prefix}/include

 Name: libcmime


Fix linux build

Fix linux build

--- modules/fmt.cmake
+++ modules/fmt.cmake
@@ -1,4 +1,4 @@
 if(NOT TARGET fmt)
-  option(FMT_USE_CPP11 "Enable the addition of C++11 compiler flags." ON)
-  add_subdirectory("fmt/fmt")
+  option(FMT_USE_CPP11 "Disable the addition check for C++11 compiler flags." OFF)
+  add_subdirectory("fmt")
 endif()


Cmake detects path to Qt plugins folder.

--- cmake/deps.cmake
+++ cmake/deps.cmake
@@ -21,5 +21,16 @@
 find_package(Qt5Core REQUIRED)
 find_package(Qt5Gui REQUIRED)

+# Detect path to Qt plugins.
+find_path(
+  QT_PLUGINS "plugins"
+  PATHS "${Qt5Core_DIR}/../../../"
+  NO_DEFAULT_PATH
+  )
+
+if (${QT_PLUGINS} MATCHES "NOTFOUND")
+  message(FATAL_ERROR "Could not find Qt plugins folder!")
+endif()
+
 # OpenCV
 find_package(OpenCV REQUIRED)


CTest puts in the configuration automatically

--- cmake/test.cmake
+++ cmake/test.cmake
@@ -154,7 +154,7 @@
   add_test(
     NAME    test-${testname}-${instance}
     COMMAND ${test_runner}
-            "${test_output_path}/test-${testname}"
+            "${test_base_output_path}/test-${testname}"
             ${instance}
             ${ARGN})
   set_tests_properties(test-${testname}-${instance}


Add helgrind targets

Add helgrind targets

--- cmake/test.cmake
+++ cmake/test.cmake
@@ -51,6 +51,7 @@

   add_custom_target(valgrind)
   add_custom_target(callgrind)
+  add_custom_target(helgrind)
   add_custom_target(ptrcheck)
 endif (VALGRIND_EXECUTABLE)

@@ -77,11 +78,14 @@
   if (VALGRIND_EXECUTABLE)
     add_custom_target(valgrind-${testname})
     add_custom_target(callgrind-${testname})
+    add_custom_target(helgrind-${testname})
     add_custom_target(ptrcheck-${testname})
     add_dependencies(valgrind
       valgrind-${testname})
     add_dependencies(callgrind
       callgrind-${testname})
+    add_dependencies(helgrind
+      helgrind-${testname})
     add_dependencies(ptrcheck
       ptrcheck-${testname})
   endif (VALGRIND_EXECUTABLE)
@@ -160,6 +164,21 @@
       COMMENT "Running callgrind on test \"${testname}\" instance \"${instance}\"")
     add_dependencies(callgrind-${testname}
       callgrind-${testname}-${instance})
+    add_custom_target(helgrind-${testname}-${instance})
+    add_custom_command(
+      TARGET  helgrind-${testname}-${instance}
+      COMMAND "${VALGRIND_EXECUTABLE}"
+              --tool=helgrind
+              --log-file="${EXECUTABLE_OUTPUT_PATH}/helgrind.log.${testname}.${instance}"
+              ${TEST_RUNNER}
+              "${EXECUTABLE_OUTPUT_PATH}/test-${testname}"
+              ${instance}
+              ${ARGN}
+      WORKING_DIRECTORY
+              "${TEST_WORKING_DIRECTORY}"
+      COMMENT "Running helgrind on test \"${testname}\" instance \"${instance}\"")
+    add_dependencies(helgrind-${testname}
+      helgrind-${testname}-${instance})
     add_custom_target(ptrcheck-${testname}-${instance})
     add_custom_command(
       TARGET  ptrcheck-${testname}-${instance}


add sm_75 support (#15198)

add sm_75 support (#15198)

test=develop

--- cmake/cuda.cmake
+++ cmake/cuda.cmake
@@ -2,7 +2,7 @@
     return()
 endif()

-set(paddle_known_gpu_archs "30 35 50 52 60 61 70")
+set(paddle_known_gpu_archs "30 35 50 52 60 61 70 75")
 set(paddle_known_gpu_archs7 "30 35 50 52")
 set(paddle_known_gpu_archs8 "30 35 50 52 60 61")

@@ -59,7 +59,7 @@
 #   select_nvcc_arch_flags(out_variable)
 function(select_nvcc_arch_flags out_variable)
   # List of arch names
-  set(archs_names "Kepler" "Maxwell" "Pascal" "All" "Manual")
+  set(archs_names "Kepler" "Maxwell" "Pascal" "Volta" "Turing" "All" "Manual")
   set(archs_name_default "All")
   if(NOT CMAKE_CROSSCOMPILING)
     list(APPEND archs_names "Auto")
@@ -93,6 +93,8 @@
     set(cuda_arch_bin "60 61")
   elseif(${CUDA_ARCH_NAME} STREQUAL "Volta")
     set(cuda_arch_bin "70")
+  elseif(${CUDA_ARCH_NAME} STREQUAL "Turing")
+    set(cuda_arch_bin "75")
   elseif(${CUDA_ARCH_NAME} STREQUAL "All")
     set(cuda_arch_bin ${paddle_known_gpu_archs})
   elseif(${CUDA_ARCH_NAME} STREQUAL "Auto")


Bugfix

Bugfix

git-svn-id: 59f82343654cec32357d3b049d399063e4e4cfc7@30548 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/macros/macro_deal_ii_pickup_tests.cmake
+++ deal.II/cmake/macros/macro_deal_ii_pickup_tests.cmake
@@ -43,7 +43,7 @@
         SET(_configuration)
       ENDIF()

-      STRING(REGEX REPLACE "\\..*" "." _test ${_test})
+      STRING(REGEX REPLACE "\\..*" "" _test ${_test})
       DEAL_II_ADD_TEST(${_category} ${_test} ${_configuration})
     ENDIF()


cmake: some cleanup

cmake: some cleanup

--- cmake/DetectOpenCV.cmake
+++ cmake/DetectOpenCV.cmake
@@ -25,39 +25,18 @@
         find_package(PkgConfig)
         pkg_check_modules(OpenCV opencv)

-#   <XPREFIX>_LIBRARIES      ... only the libraries (w/o the '-l')
-#   <XPREFIX>_LIBRARY_DIRS   ... the paths of the libraries (w/o the '-L')
-#   <XPREFIX>_LDFLAGS        ... all required linker flags
-#   <XPREFIX>_LDFLAGS_OTHER  ... all other linker flags
-#   <XPREFIX>_INCLUDE_DIRS   ... the '-I' preprocessor flags (w/o the '-I')
-#   <XPREFIX>_CFLAGS         ... all required cflags
-#   <XPREFIX>_CFLAGS_OTHER   ... the other compiler flags
-#
-#   <XPREFIX> = <PREFIX>        for common case
-#   <XPREFIX> = <PREFIX>_STATIC for static linking
-#
-# There are some special variables whose prefix depends on the count
-# of given modules. When there is only one module, <PREFIX> stays
-# unchanged. When there are multiple modules, the prefix will be
-# changed to <PREFIX>_<MODNAME>:
-#   <XPREFIX>_VERSION    ... version of the module
-#   <XPREFIX>_PREFIX     ... prefix-directory of the module
-#   <XPREFIX>_INCLUDEDIR ... include-dir of the module
-#   <XPREFIX>_LIBDIR     ... lib-dir of the module
-
         message(STATUS "OpenCV_PREFIX=${OpenCV_PREFIX}")
-        message(STATUS "OpenCV_CFLAGS=${OpenCV_CFLAGS}")

         message(STATUS "Prepending CFLAGS with ${OpenCV_CFLAGS}")
         set(CMAKE_C_FLAGS "${OpenCV_CFLAGS} ${CMAKE_C_FLAGS}")

         #message(STATUS "OpenCV_LIBS=${OpenCV_LIBS}")
         #message(STATUS "OpenCV_Libs=${OpenCV_Libs}")
-        #message(STATUS "OpenCV_LIBRARIES=${OpenCV_LIBRARIES}")
-        #message(STATUS "OpenCV_LIBRARY_DIRS=${OpenCV_LIBRARY_DIRS}")
-        #message(STATUS "OpenCV_LDFLAGS=${OpenCV_LDFLAGS}")
-        #message(STATUS "OpenCV_LDFLAGS_OTHER=${OpenCV_LDFLAGS_OTHER}")
-        #message(STATUS "OpenCV_LIBDIR=${OpenCV_LIBDIR}")
+        #message(STATUS "OpenCV_LIBRARIES=${OpenCV_LIBRARIES}")         # <XPREFIX>_LIBRARIES...only the libraries (w/o the '-l')
+        #message(STATUS "OpenCV_LIBRARY_DIRS=${OpenCV_LIBRARY_DIRS}")   # <XPREFIX>_LIBRARY_DIRS...the paths of the libraries (w/o the '-L')
+        #message(STATUS "OpenCV_LDFLAGS=${OpenCV_LDFLAGS}")             # <XPREFIX>_LDFLAGS...all required linker flags
+        #message(STATUS "OpenCV_LDFLAGS_OTHER=${OpenCV_LDFLAGS_OTHER}") # <XPREFIX>_LDFLAGS_OTHER...all other linker flags
+        #message(STATUS "OpenCV_LIBDIR=${OpenCV_LIBDIR}")               # <XPREFIX>_LIBDIR...lib-dir of the module

         message(STATUS "Prepending linker flags with ${OpenCV_LDFLAGS}")
         set(CMAKE_EXE_LINKER_FLAGS "${OpenCV_CFLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
@@ -66,7 +45,6 @@
         list(APPEND OpenCV_LIBS ${OpenCV_LIBRARIES})

     else(OpenCV_DIR_EXT STREQUAL ".pc")
-
         find_package(OpenCV REQUIRED ${OpenCV_REQUIRED_MODULES} PATHS ${OpenCV_DIR})
     endif(OpenCV_DIR_EXT STREQUAL ".pc")

@@ -84,7 +62,7 @@
     if(NOT DEFINED OpenCV_LIBRARY_DIR)

     message(STATUS "a")
-        if(DEFINED OpenCV_LIBDIR)
+        if(DEFINED OpenCV_LIBDIR AND NOT "${OpenCV_LIBDIR}" STREQUAL "")

     message(STATUS "b")
             set(OpenCV_LIBRARY_DIR ${OpenCV_LIBDIR})


cmake fix if statement

cmake fix if statement

--- cmake/DetectOpenCV.cmake
+++ cmake/DetectOpenCV.cmake
@@ -61,18 +61,18 @@
     # Define OpenCV_LIBRARY_DIR if missing
     if(NOT DEFINED OpenCV_LIBRARY_DIR)

-    message(STATUS "a")
+        message(STATUS "a")
         if(DEFINED OpenCV_LIBDIR AND NOT "${OpenCV_LIBDIR}" STREQUAL "")

-    message(STATUS "b")
+            message(STATUS "b")
             set(OpenCV_LIBRARY_DIR ${OpenCV_LIBDIR})
-        else(DEFINED OpenCV_LIBDIR)
+        else(DEFINED OpenCV_LIBDIR  AND NOT "${OpenCV_LIBDIR}" STREQUAL "")

     message(STATUS "c")
             # Append lib to prefix
             file(TO_CMAKE_PATH ${OpenCV_PREFIX}/lib OpenCV_LIBRARY_DIR)
     message(STATUS "OpenCV_LIBRARY_DIR=${OpenCV_LIBRARY_DIR}")
-        endif(DEFINED OpenCV_LIBDIR)
+        endif(DEFINED OpenCV_LIBDIR AND NOT "${OpenCV_LIBDIR}" STREQUAL "")

     endif(NOT DEFINED OpenCV_LIBRARY_DIR)


request OpenCV's ml module

request OpenCV's ml module

--- cmake/DetectOpenCV.cmake
+++ cmake/DetectOpenCV.cmake
@@ -7,7 +7,7 @@
 # Force the user to tell us which OpenCV they want (otherwise find_package can find the wrong one, cache it and changes to OpenCV_DIR are ignored)

 if(DEFINED OpenCV_DIR)
-    find_package(OpenCV REQUIRED core highgui imgproc PATHS ${OpenCV_DIR})
+    find_package(OpenCV REQUIRED core highgui imgproc ml PATHS ${OpenCV_DIR})
     if(OpenCV_FOUND)
         list(APPEND ${ROOT_PROJECT}_INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
         list(APPEND ${ROOT_PROJECT}_LIBS ${OpenCV_LIBS})


Removed unnecessary MSVC check.

Removed unnecessary MSVC check.

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -159,9 +159,9 @@
   else(EIGEN_COVERAGE_TESTING)
     set(COVERAGE_FLAGS "")
   endif(EIGEN_COVERAGE_TESTING)
-  if((EIGEN_TEST_RVALUE_REF_SUPPORT OR EIGEN_TEST_C++0x) AND NOT MSVC)
+  if(EIGEN_TEST_RVALUE_REF_SUPPORT OR EIGEN_TEST_C++0x)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
-  endif((EIGEN_TEST_RVALUE_REF_SUPPORT OR EIGEN_TEST_C++0x) AND NOT MSVC)
+  endif(EIGEN_TEST_RVALUE_REF_SUPPORT OR EIGEN_TEST_C++0x)
   if(CMAKE_SYSTEM_NAME MATCHES Linux)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_FLAGS} -g2")
     set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COVERAGE_FLAGS} -O2 -g2")


Renamed MANTELLA_VERSION to MANTELLA_VERSION_STRING

--- cmake/FindMantella.cmake
+++ cmake/FindMantella.cmake
@@ -16,13 +16,13 @@
     unset(MANTELLA_HEADER_CONTENTS)
   endif()

-  set(MANTELLA_VERSION_STRING "${MANTELLA_VERSION_MAJOR}.${MANTELLA_VERSION_MINOR}.${MANTELLA_VERSION_PATCH}")
+  set(MANTELLA_VERSION "${MANTELLA_VERSION_MAJOR}.${MANTELLA_VERSION_MINOR}.${MANTELLA_VERSION_PATCH}")
 endif ()

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(Mantella
   REQUIRED_VARS MANTELLA_LIBRARIES MANTELLA_INCLUDE_DIR
-  VERSION_VAR MANTELLA_VERSION_STRING)
+  VERSION_VAR MANTELLA_VERSION)

 mark_as_advanced(
   MANTELLA_LIBRARIES


improve script

improve script

--- cmake/ctest_script.cmake
+++ cmake/ctest_script.cmake
@@ -451,7 +451,12 @@
   set(CTEST_BUILD_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR} ${CTEST_CMAKE_GENERATOR}-${CTEST_CONFIGURATION_TYPE}-${cxxnamewe}${smHead}")
 endif()
 STRING(REPLACE " " "_" CTEST_BUILD_NAME "${CTEST_BUILD_NAME}")
-message("NAME: ${CTEST_BUILD_NAME}")
+
+#Output details
+message("Site: ${CTEST_SITE}")
+message("Build Name: ${CTEST_BUILD_NAME}")
+string(TIMESTAMP TODAY "%Y-%m-%d")
+message("Date: ${TODAY}")

 if(NOT CTEST_BUILD_JOBS)
   include(ProcessorCount)
@@ -674,7 +679,6 @@
   endif()
   run_ctests(res)

-  string(TIMESTAMP TODAY "%Y-%m-%d")
   message("CDASH LINK:\nhttps://cdash-ci.inria.fr/index.php?project=${CTEST_PROJECT_NAME}&date=${TODAY}&filtercount=2&showfilters=1&filtercombine=and&field1=buildname&compare1=61&value1=${CTEST_BUILD_NAME}&field2=site&compare2=65&value2=${CTEST_SITE}")

   if(NOT res EQUAL 0)


Added nddscpp libraries

Added nddscpp libraries

--- connext_cmake_module/cmake/Modules/FindConnext.cmake
+++ connext_cmake_module/cmake/Modules/FindConnext.cmake
@@ -219,12 +219,12 @@
   find_package(nddscpp)
   find_package(rticonnextmsgcpp)
   if(nddscpp_FOUND AND rticonnextmsgcpp_FOUND)
-    message(STATUS "Found RTI Connext: ${nddscpp_DIR}")
-    set(Connext_INCLUDE_DIRS ${nddscpp_INCLUDE_DIRS})
-    set(Connext_LIBRARIES ${rticonnextmsgcpp_LIBRARIES})
+    message(STATUS "Found RTI Connext: ${nddscpp_DIR} ${rticonnextmsgcpp_DIR}")
+    set(Connext_INCLUDE_DIRS ${nddscpp_INCLUDE_DIRS} ${rticonnextmsgcpp_INCLUDE_DIRS})
+    set(Connext_LIBRARIES ${nddscpp_LIBRARIES} ${rticonnextmsgcpp_LIBRARIES})
     set(Connext_LIBRARY_DIRS "")
     set(Connext_LIBRARY_DIR "")
-    set(Connext_DEFINITIONS ${nddscpp_DEFINITIONS})
+    set(Connext_DEFINITIONS ${nddscpp_DEFINITIONS} ${rticonnextmsgcpp_DEFINITIONS})
     set(Connext_DDSGEN2 "/usr/bin/rtiddsgen2")
     set(Connext_FOUND TRUE)


Have core depend on CMake's Threads package so that pthreads are linked in on Linux.

--- CMake/RealmCore.cmake
+++ CMake/RealmCore.cmake
@@ -18,7 +18,9 @@

 include(ExternalProject)
 include(ProcessorCount)
+
 find_package(PkgConfig)
+find_package(Threads)

 if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
     set(MAKE_EQUAL_MAKE "MAKE=$(MAKE)")
@@ -110,6 +112,8 @@
     set_property(TARGET realm PROPERTY IMPORTED_LOCATION_RELEASE ${core_library_release})
     set_property(TARGET realm PROPERTY IMPORTED_LOCATION ${core_library_release})

+    set_property(TARGET realm PROPERTY INTERFACE_LINK_LIBRARIES Threads::Threads)
+
     set(REALM_CORE_INCLUDE_DIR ${core_directory}/include PARENT_SCOPE)
 endfunction()

@@ -131,6 +135,8 @@
     set_property(TARGET realm PROPERTY IMPORTED_LOCATION_COVERAGE ${core_library_debug})
     set_property(TARGET realm PROPERTY IMPORTED_LOCATION_RELEASE ${core_library_release})
     set_property(TARGET realm PROPERTY IMPORTED_LOCATION ${core_library_release})
+
+    set_property(TARGET realm PROPERTY INTERFACE_LINK_LIBRARIES Threads::Threads)

     set(REALM_CORE_INCLUDE_DIR ${core_directory}/src PARENT_SCOPE)
 endmacro()


add pf MPI test

add pf MPI test

--- user_options_sample.cmake
+++ user_options_sample.cmake
@@ -11,6 +11,7 @@
 SET (Boost_NO_SYSTEM_PATHS OFF CACHE BOOL "Do not use system Boost search")
 # Use Boost static libraries (vSMC itself does not use Boost runtime)
 SET (Boost_USE_STATIC_LIBS ON CACHE BOOL "Boost use static libraries")
+SET (Boost_USE_STATIC_RUNTIME ON CACHE BOOL "Boost use static runtime")

 # For additional Boost related variables see the CMake official FindBoost.cmake


- Fixed SQLite3 package name

- Fixed SQLite3 package name

--- dependencies.cmake
+++ dependencies.cmake
@@ -54,5 +54,5 @@
 clever_add_lib(SQLITE3
 	LIBS sqlite3
 	INCS sqlite3.h
-	PKGS libsqlite3)
+	PKGS sqlite3)


Improved GCC version detection logic.

Improved GCC version detection logic.

--- system_definitions.cmake
+++ system_definitions.cmake
@@ -77,6 +77,8 @@
                 OUTPUT_VARIABLE GCC_VERSION)
         if(GCC_VERSION VERSION_EQUAL 4.4 OR GCC_VERSION VERSION_GREATER 4.4 )
             set(CMAKE_CXX_FLAGS "-std=c++0x")
+        elseif(GCC_VERSION VERSION_GREATER 4.2.1 AND GCC_VERSION VERSION_LESS 4.4 )
+            set(CMAKE_CXX_FLAGS "-ansi")
         elseif(GCC_VERSION VERSION_LESS 4.2.2)
             message(FATAL "g++ ${GCC_VERSION} is unsupported. Version must be >= 4.2.2")
         endif()


Remove set_property calls

Remove set_property calls

--- 3rdparty/3rdparty.cmake
+++ 3rdparty/3rdparty.cmake
@@ -76,12 +76,8 @@
 # Hide unnecessary targets from all #
 #####################################

-set_property(TARGET glslang::glslang PROPERTY EXCLUDE_FROM_ALL True)
-set_property(TARGET glslang::OGLCompiler PROPERTY EXCLUDE_FROM_ALL True)
-set_property(TARGET glslang::OSDependent PROPERTY EXCLUDE_FROM_ALL True)
 set_property(TARGET SPIRV PROPERTY EXCLUDE_FROM_ALL True)
 set_property(TARGET SPVRemapper PROPERTY EXCLUDE_FROM_ALL True)
-set_property(TARGET glslang::HLSL PROPERTY EXCLUDE_FROM_ALL True)
 set_property(TARGET spirv-remap PROPERTY EXCLUDE_FROM_ALL True)

 set_property(TARGET spirv-tools-build-version PROPERTY EXCLUDE_FROM_ALL True)


Support custom baselines in tests

Support custom baselines in tests

Change-Id: I0a5df3d25ec33ffc272e33a032a19af38689d938

--- CMake/vtkTestingMacros.cmake
+++ CMake/vtkTestingMacros.cmake
@@ -86,6 +86,7 @@
 function(vtk_add_test_mpi exename tests)
   set(mpi_options
     TESTING_DATA
+    CUSTOM_BASELINES
     )
   _vtk_test_parse_args("${mpi_options}" "cxx" ${ARGN})
   _vtk_test_set_options("${mpi_options}" "" ${options})
@@ -114,7 +115,11 @@
     if(local_TESTING_DATA)
       set(_D -D ${data_dir})
       set(_T -T ${VTK_BINARY_DIR}/Testing/Temporary)
-      set(_V -V "DATA{${baseline_dir}/${name}.png,:}")
+      if(local_CUSTOM_BASELINES)
+        set(_V -V "${data_dir}/Baseline")
+      else()
+        set(_V -V "DATA{${baseline_dir}/${name}.png,:}")
+      endif()
     endif()

     set(numprocs ${default_numprocs})
@@ -174,6 +179,7 @@
     NO_DATA
     NO_VALID
     NO_OUTPUT
+    CUSTOM_BASELINES
     )
   _vtk_test_parse_args("${cxx_options}" "cxx" ${ARGN})
   _vtk_test_set_options("${cxx_options}" "" ${options})
@@ -211,7 +217,11 @@

     set(_V "")
     if(NOT local_NO_VALID)
-      set(_V -V "DATA{${baseline_dir}/${name}.png,:}")
+      if(local_CUSTOM_BASELINES)
+        set(_V -V "${data_dir}/Baseline")
+      else()
+        set(_V -V "DATA{${baseline_dir}/${name}.png,:}")
+      endif()
     endif()

     ExternalData_add_test(VTKData


Fix the linker error.

Fix the linker error.

--- libtbag/project.cmake
+++ libtbag/project.cmake
@@ -33,7 +33,7 @@

 ## whole-archive files.
 tbag_modules__include_project (WholeArchiveOn)
-list (APPEND TBAG_PROJECT_LDFLAGS -llua -luv ${TBAG_DEP_ICU_ARCHIVES})
+list (APPEND TBAG_PROJECT_LDFLAGS lua uv ${TBAG_DEP_ICU_ARCHIVES})
 tbag_modules__include_project (WholeArchiveOff)

 #tbag_modules__include_project (PCH ${CMAKE_SOURCE_DIR}/libtbag/config.h)


itk: Added segmentation module.

itk: Added segmentation module.

--- itk.cmake
+++ itk.cmake
@@ -48,6 +48,7 @@
         -DITK_BUILD_DEFAULT_MODULES=0
         -DBUILD_EXAMPLES=0
         -DITKGroup_Core=1
+        -DITKGroup_Segmentation=1
         -DModule_ITKConvolution=1
         -DModule_ITKEigen=1


ENH: Bump cppcheck to eliminate g++ compiler version requirements

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -26,7 +26,7 @@

 # Cppcheck
 set( Cppcheck_URL ${github_protocol}://github.com/KitwareMedical/cppcheck.git )
-set( Cppcheck_HASH_OR_TAG 3795c5d567db7381f42bb90078a7daae3197713a )
+set( Cppcheck_HASH_OR_TAG 683ba53fbe87e67fe1cca8ebecb8c2f73d55a4c9 )

 # TubeTK Image Viewer
 set( ImageViewer_URL


add SystemConfiguration.framework to the linker flags

--- CMake/RealmCore.cmake
+++ CMake/RealmCore.cmake
@@ -37,18 +37,22 @@
 if(APPLE)
     find_library(FOUNDATION_FRAMEWORK Foundation)
     find_library(SECURITY_FRAMEWORK Security)
+	find_library(SYSTEM_CONFIGURATION_FRAMEWORK SystemConfiguration)

     set(CRYPTO_LIBRARIES "")
     set(SSL_LIBRARIES ${FOUNDATION_FRAMEWORK} ${SECURITY_FRAMEWORK})
+	set(REACHABILITY_LIBRARIES ${SYSTEM_CONFIGURATION_FRAMEWORK})
 elseif(REALM_PLATFORM STREQUAL "Android")
     # The Android core and sync libraries include the necessary portions of OpenSSL.
     set(CRYPTO_LIBRARIES "")
     set(SSL_LIBRARIES "")
+	set(REACHABILITY_LIBRARIES "")
 else()
     find_package(OpenSSL REQUIRED)

     set(CRYPTO_LIBRARIES OpenSSL::Crypto)
     set(SSL_LIBRARIES OpenSSL::SSL)
+	set(REACHABILITY_LIBRARIES "")
 endif()

@@ -304,7 +308,7 @@
     set_property(TARGET realm-sync PROPERTY IMPORTED_LOCATION_RELEASE ${sync_library_release})
     set_property(TARGET realm-sync PROPERTY IMPORTED_LOCATION ${sync_library_release})

-    set_property(TARGET realm-sync PROPERTY INTERFACE_LINK_LIBRARIES ${SSL_LIBRARIES})
+    set_property(TARGET realm-sync PROPERTY INTERFACE_LINK_LIBRARIES ${SSL_LIBRARIES} ${REACHABILITY_LIBRARIES})

     # Sync server library is built as part of the sync library build
     set(sync_server_library_debug ${sync_directory}/src/realm/librealm-server-dbg.a)


cmake: Fix ntohll and htonll macro detection.

BUG: https://red.libssh.org/issues/164

Thanks to Ryan Schmidt!

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

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -104,8 +104,8 @@
 check_function_exists(poll HAVE_POLL)
 check_function_exists(select HAVE_SELECT)
 check_function_exists(getaddrinfo HAVE_GETADDRINFO)
-check_function_exists(ntohll HAVE_NTOHLL)
-check_function_exists(htonll HAVE_HTONLL)
+check_symbol_exists(ntohll arpa/inet.h HAVE_NTOHLL)
+check_symbol_exists(htonll arpa/inet.h HAVE_HTONLL)

 if (WIN32)
     check_function_exists(_strtoui64 HAVE__STRTOUI64)


Add executable suffix.

Add executable suffix.

--- external/CapnProto.cmake
+++ external/CapnProto.cmake
@@ -61,7 +61,7 @@
   set(CAPNP_LIBRARIES ${LIB_KJ} ${LIB_CAPNP} ${LIB_CAPNPC})
   set(CAPNP_LIBRARIES_LITE ${LIB_KJ} ${LIB_CAPNP})
   set(CAPNP_INCLUDE_DIRS ${INCLUDE_PRE})
-  set(CAPNP_EXECUTABLE ${BIN_PRE}/capnp)
+  set(CAPNP_EXECUTABLE ${BIN_PRE}/capnp${CMAKE_EXECUTABLE_SUFFIX})
   set(CAPNPC_CXX_EXECUTABLE ${BIN_PRE}/capnpc-c++)
 else()
   # Create a dummy target to depend on.


updated FindMKL

updated FindMKL

--- CMakeModules/FindMKL.cmake
+++ CMakeModules/FindMKL.cmake
@@ -1,339 +1,280 @@
-# CMake script to detect Intel(R) Math Kernel Library (MKL)
-#
-# This will try to find Intel MKL libraries, and include path by automatic
-# search through typical install locations and if failed it will
-# examine MKLROOT environment variable.
-# Note, MKLROOT is not set by IPP installer, it should be set manually.
-#
-# Usage example:
-#   set(MKL_USE_STATIC_LIBS ON)
-#   find_package(MKL)
-#   if (MKL_FOUND)
-#      include_directories(${MKL_INCLUDE_DIRS})
-#      add_executable(foo foo.cc)
-#      target_link_libraries(foo ${MKL_LIBRARIES})
-#   endif()
-#
-# Variables used by this module, they can change the default behaviour and
-# need to be set before calling find_package:
-#
-#   MKL_ADDITIONAL_VERSIONS      A list of version numbers to use for searching
-#                                the MKL include directory.
-#
-#   MKL_USE_STATIC_LIBS          Can be set to ON to force the use of the static
-#                                boost libraries. Defaults to OFF.
-#
-#   MKL_FIND_DEBUG               Set this to TRUE to enable debugging output
-#                                of FindMKL.cmake if you are having problems.
-#
-# On return this will define:
-#   MKL_FOUND                   Indicates whether MKL was found (True/False)
-#   MKL_INCLUDE_DIRS            MKL include folder
-#   MKL_LIBRARY_DIRS            MKL libraries folder
-#   MKL_LIBRARIES               MKL libraries names
-#
-# NOTE: this script has only been tested with Intel(R) Parallel Studio XE 2011
-# and may need changes for compatibility with older versions.
-#
-# Adapted from OpenCV IPP detection script
-#   https://code.ros.org/trac/opencv/browser/trunk/opencv/OpenCVFindIPP.cmake
-# Many portions taken from FindBoost.cmake
-
-# TODO:
-# - caller needs to link with libiomp5md.lib or /Qopenmp...
-# - runtime DLLs:
-#   <Composer XE directory> -> C:\Program Files\Intel\ComposerXE-2011
-#     redist\ia32\mkl
-#     redist\intel64\mkl
-
-set(_MKL_IA32 FALSE)
-set(_MKL_INTEL64 FALSE)
-if (CMAKE_SIZEOF_VOID_P EQUAL 4)
-    set(_MKL_IA32 TRUE)
-elseif (CMAKE_SIZEOF_VOID_P EQUAL 8)
-    set(_MKL_INTEL64 TRUE)
+# Copyright (c) 2018, ArrayFire
+# All rights reserved.
+#
+# This file is distributed under 3-clause BSD license. The complete license
+# agreement can be obtained at: http://arrayfire.com/licenses/BSD-3-Clause
+#
+# A FindMKL script based on the recommendations by the Intel's Link Line
+# Advisor. It currently only tested on the 2018 version of MKL on Windows,
+# Linux, and OSX but it should work on older versions.
+#
+# To use this module call the mklvars.(sh,bat) script before you call cmake. This
+# script is located in the bin folder of your mkl installation. This will set the
+# MKLROOT environment variable which will be used to find the libraries on your system.
+#
+# Example:
+# set(MKL_THREAD_LAYER "TBB")
+# find_package(MKL)
+#
+# add_executable(myapp main.cpp)
+# target_link_libraries(myapp PRIVATE MKL::MKL)
+#
+# This module bases its behavior based on the following variables:
+#
+# ``MKL_THREAD_LAYER``
+#   The threading layer that needs to be used by the MKL library. This
+#   Defines which library will be used to parallelize the MKL kernels. Possible
+#   options are TBB(Default), GNU OpenMP, Intel OpenMP, Sequential
+#
+# This module provides the following :prop_tgt:'IMPORTED' targets:
+#
+# ``MKL::MKL``
+#   Target used to define and link all MKL libraries required by Intel's Link
+#   Line Advisor. This usually the only thing you need to link against unless
+#   you want to link against the single dynamic library version of MKL
+#   (libmkl_rt.so)
+#
+#  Optional:
+#
+# ``MKL::ThreadLayer{_STATIC}``
+#   Target used to define the threading layer(TBB, OpenMP, etc.) based on
+#   MKL_THREAD_LAYER variable.
+#
+# ``MKL::ThreadingLibrary``
+#   Target used to define the threading library(libtbb, libomp, etc) that the
+#   application will need to link against.
+#
+# ``MKL::Interface``
+#   Target used to determine which interface library to use(32bit int or 64bit
+#   int).
+#
+# ``MKL::Core``
+#   Target for the dynamic library dispatcher
+#
+# ``MKL::RT``
+#   Target for the single dynamic library
+#
+# ``MKL::{mkl_def;mkl_mc;mkl_mc3;mkl_avx;mkl_avx2;mkl_avx512}{_STATIC}``
+#   Targets for MKL kernel libraries.
+
+include(CheckTypeSize)
+
+check_type_size("int" INT_SIZE
+  BUILTIN_TYPES_ONLY LANGUAGE C)
+
+set(MKL_THREAD_LAYER "TBB" CACHE STRING "The thread layer to choose for MKL")
+set_property(CACHE MKL_THREAD_LAYER PROPERTY STRINGS "TBB" "GNU OpenMP" "Intel OpenMP" "Sequential")
+
+if(NOT MKL_THREAD_LAYER STREQUAL MKL_THREAD_LAYER_LAST)
+  unset(MKL::ThreadLayer CACHE)
+  unset(MKL::ThreadingLibrary CACHE)
+  unset(MKL_ThreadLayer_LINK_LIBRARY CACHE)
+  unset(MKL_ThreadLayer_STATIC_LINK_LIBRARY CACHE)
+  unset(MKL_ThreadLayer_DLL_LIBRARY CACHE)
+  unset(MKL_ThreadingLibrary_LINK_LIBRARY CACHE)
+  unset(MKL_ThreadingLibrary_STATIC_LINK_LIBRARY CACHE)
+  unset(MKL_ThreadingLibrary_DLL_LIBRARY CACHE)
+  set(MKL_THREAD_LAYER_LAST ${MKL_THREAD_LAYER} CACHE INTERNAL "" FORCE)
+endif()
+
+find_path(MKL_INCLUDE_DIR
+  NAMES
+    mkl.h
+    mkl_blas.h
+    mkl_cblas.h
+  PATHS
+    /opt/intel
+    /opt/intel/mkl
+    $ENV{MKLROOT}
+    /opt/intel/compilers_and_libraries/linux/mkl
+  PATH_SUFFIXES
+    include
+    IntelSWTools/compilers_and_libraries/windows/mkl/include
+    )
+mark_as_advanced(MKL_INCLUDE_DIR)
+
+find_path(MKL_FFTW_INCLUDE_DIR
+  NAMES
+    fftw3_mkl.h
+  HINTS
+    ${MKL_INCLUDE_DIR}/fftw)
+mark_as_advanced(MKL_FFTW_INCLUDE_DIR)
+
+
+if(WIN32)
+  if(${MSVC_VERSION} GREATER_EQUAL 1900)
+    set(msvc_dir "vc_mt")
+    set(shared_suffix "_dll")
+    set(md_suffix "md")
+  else()
+    message(WARNING "MKL: MS Version not supported for MKL")
+  endif()
+endif()
+
+# Finds and creates libraries for MKL with the MKL:: prefix
+#
+# Parameters:
+#    NAME:         A variable name describing the library
+#    LIBRARY_NAME: The library that needs to be searched
+#
+# Output Libraries:
+#    MKL::${NAME}
+#    MKL::${NAME}_STATIC
+#
+# Output Variables
+#    MKL_INCLUDE_DIR:                Include directory for MKL
+#    MKL_FFTW_INCLUDE_DIR:           Include directory for the MKL FFTW interface
+#    MKL_${NAME}_LINK_LIBRARY:        on Unix: *.so on Windows *.lib
+#    MKL_${NAME}_STATIC_LINK_LIBRARY: on Unix: *.a  on Windows *.lib
+#    MKL_${NAME}_DLL_LIBRARY:         on Unix: ""   on Windows *.dll
+function(find_mkl_library)
+  set(options "")
+  set(single_args NAME LIBRARY_NAME)
+  set(multi_args "")
+
+  cmake_parse_arguments(mkl_args "${options}" "${single_args}" "${multi_args}" ${ARGN})
+
+  add_library(MKL::${mkl_args_NAME}        SHARED IMPORTED)
+  add_library(MKL::${mkl_args_NAME}_STATIC SHARED IMPORTED)
+  find_library(MKL_${mkl_args_NAME}_LINK_LIBRARY
+    NAMES
+      ${mkl_args_LIBRARY_NAME}${shared_suffix}
+      ${mkl_args_LIBRARY_NAME}${md_suffix}
+      lib${mkl_args_LIBRARY_NAME}${md_suffix}
+      ${mkl_args_LIBRARY_NAME}
+    PATHS
+      /opt/intel/mkl/lib
+      /opt/intel/tbb/lib
+      /opt/intel/lib
+      $ENV{MKLROOT}/lib
+      /opt/intel/compilers_and_libraries/linux/mkl/lib
+    PATH_SUFFIXES
+      IntelSWTools/compilers_and_libraries/windows/mkl/lib/intel64
+      IntelSWTools/compilers_and_libraries/windows/compiler/lib/intel64
+      IntelSWTools/compilers_and_libraries/windows/tbb/lib/intel64/${msvc_dir}
+      ""
+      intel64
+      intel64/gcc4.7)
+  mark_as_advanced(MKL_${mkl_args_NAME}_LINK_LIBRARY)
+
+  #message(STATUS "NAME: ${mkl_args_NAME} LIBNAME: ${mkl_args_LIBRARY_NAME} MKL_${mkl_args_NAME}_LINK_LIBRARY  ${MKL_${mkl_args_NAME}_LINK_LIBRARY}")
+
+  # The rt library does not have a static library
+  if(NOT ${mkl_args_NAME} STREQUAL "rt")
+    find_library(MKL_${mkl_args_NAME}_STATIC_LINK_LIBRARY
+      NAMES
+        ${CMAKE_STATIC_LIBRARY_PREFIX}${mkl_args_LIBRARY_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
+      PATHS
+        /opt/intel/mkl/lib
+        /opt/intel/tbb/lib
+        /opt/intel/lib
+        $ENV{MKLROOT}/lib
+        /opt/intel/compilers_and_libraries/linux/mkl/lib
+      PATH_SUFFIXES
+        ""
+        intel64
+        intel64/gcc4.7
+        IntelSWTools/compilers_and_libraries/windows/mkl/lib/intel64
+        IntelSWTools/compilers_and_libraries/windows/compiler/lib/intel64
+        IntelSWTools/compilers_and_libraries/windows/tbb/lib/intel64/${msvc_dir}
+        )
+      mark_as_advanced(MKL_${mkl_args_NAME}_STATIC_LINK_LIBRARY)
+    endif()
+
+    set_target_properties(MKL::${mkl_args_NAME}
+      PROPERTIES
+        INTERFACE_INCLUDE_DIRECTORIES "${MKL_INCLUDE_DIR}"
+        IMPORTED_LOCATION "${MKL_${mkl_args_NAME}_LINK_LIBRARY}"
+        IMPORTED_NO_SONAME TRUE)
+    if(WIN32)
+      find_file(MKL_${mkl_args_NAME}_DLL_LIBRARY
+        NAMES
+          ${CMAKE_SHARED_LIBRARY_PREFIX}${mkl_args_LIBRARY_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
+          ${CMAKE_SHARED_LIBRARY_PREFIX}${mkl_args_LIBRARY_NAME}${md_suffix}${CMAKE_SHARED_LIBRARY_SUFFIX}
+          lib${mkl_args_LIBRARY_NAME}${md_suffix}${CMAKE_SHARED_LIBRARY_SUFFIX}
+        PATH_SUFFIXES
+          IntelSWTools/compilers_and_libraries/windows/redist/intel64/mkl
+          IntelSWTools/compilers_and_libraries/windows/redist/intel64/compiler
+          IntelSWTools/compilers_and_libraries/windows/redist/intel64/tbb/${msvc_dir}
+        NO_SYSTEM_ENVIRONMENT_PATH)
+
+      set_target_properties(MKL::${mkl_args_NAME}
+        PROPERTIES
+          IMPORTED_LOCATION "${MKL_${mkl_args_NAME}_DLL_LIBRARY}"
+          IMPORTED_IMPLIB "${MKL_${mkl_args_NAME}_LINK_LIBRARY}")
+
+      mark_as_advanced(MKL_${mkl_args_NAME}_DLL_LIBRARY)
+    endif()
+endfunction()
+
+
+find_mkl_library(NAME Core LIBRARY_NAME mkl_core)
+find_mkl_library(NAME RT LIBRARY_NAME mkl_rt)
+
+# MKL can link against Intel OpenMP, GNU OpenMP, TBB, and Sequential
+if(MKL_THREAD_LAYER STREQUAL "Intel OpenMP")
+  find_mkl_library(NAME ThreadLayer LIBRARY_NAME mkl_intel_thread)
+  find_mkl_library(NAME ThreadingLibrary LIBRARY_NAME iomp5)
+elseif(MKL_THREAD_LAYER STREQUAL "GNU OpenMP")
+  find_package(OpenMP REQUIRED)
+  find_mkl_library(NAME ThreadLayer LIBRARY_NAME mkl_gnu_thread)
+  add_library(MKL::ThreadingLibrary SHARED IMPORTED)
+  set_target_properties(MKL::ThreadingLibrary
+    PROPERTIES
+      IMPORTED_LOCATION "${OpenMP_gomp_LIBRARY}"
+      INTERFACE_LINK_LIBRARIES OpenMP::OpenMP_CXX)
+elseif(MKL_THREAD_LAYER STREQUAL "TBB")
+  find_mkl_library(NAME ThreadLayer LIBRARY_NAME mkl_tbb_thread)
+  find_mkl_library(NAME ThreadingLibrary LIBRARY_NAME tbb)
+elseif(MKL_THREAD_LAYER STREQUAL "Sequential")
+  find_mkl_library(NAME ThreadLayer LIBRARY_NAME mkl_sequential)
+endif()
+
+if("${INT_SIZE}" EQUAL 4)
+  find_mkl_library(NAME Interface LIBRARY_NAME mkl_intel_lp64)
 else()
-    message(FATAL_ERROR "Unsupported 'void *' size (${SIZEOF_VOID_P})")
-endif()
-
-# Versions should be listed is decreasing order of preference
-set(_MKL_TEST_VERSIONS ${MKL_ADDITIONAL_VERSIONS}
-    "2011"
-    # alternative form: "2011.xxx.y"
-    # (y is the release-update number and xxx is the package number)
-)
-
-if (MKL_FIND_VERSION AND NOT MKL_FIND_QUIETLY)
-    message(WARNING "Requesting a specific version of Intel(R) MKL is not supported")
-endif()
-
-# Use environment variables from Intel build scripts, if available
-if (NOT MKL_ROOT AND NOT $ENV{MKLROOT} STREQUAL "")
-  set(MKL_ROOT $ENV{MKLROOT})
-endif()
-
-if (MKL_ROOT)
-  file(TO_CMAKE_PATH ${MKL_ROOT} MKL_ROOT)
-endif()
-
-if (NOT INTEL_ROOT AND NOT $ENV{INTELROOT} STREQUAL "")
-  set(INTEL_ROOT $ENV{INTELROOT})
-endif()
-
-if (INTEL_ROOT)
-  file(TO_CMAKE_PATH ${INTEL_ROOT} INTEL_ROOT)
-endif()
-
-if (MKL_FIND_DEBUG)
-    message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                   "_MKL_TEST_VERSIONS = ${_MKL_TEST_VERSIONS}")
-    message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                   "MKL_ADDITIONAL_VERSIONS = ${MKL_ADDITIONAL_VERSIONS}")
-    message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                   "MKL_USE_STATIC_LIBS = ${MKL_USE_STATIC_LIBS}")
-    message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                   "MKL_ROOT = ${MKL_ROOT}")
-    message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                   "INTEL_ROOT = ${INTEL_ROOT}")
-endif()
-
-# Find MKL include directory
-
-set(_MKL_ROOT_SEARCH_DIRS
-  ${MKL_ROOT}
-)
-
-foreach (_MKL_VER ${_MKL_TEST_VERSIONS})
-    if (WIN32)
-        list(APPEND _MKL_ROOT_SEARCH_DIRS "$ENV{ProgramFiles}/Intel/Composer XE/mkl")
-    else()
-        list(APPEND _MKL_ROOT_SEARCH_DIRS "/opt/intel/composerxe-${_MKL_VER}/mkl")
-    endif()
+  find_mkl_library(NAME Interface LIBRARY_NAME mkl_intel_ilp64)
+endif()
+
+set(MKL_RUNTIME_KERNEL_LIBRARIES "" CACHE FILEPATH "MKL kernel libraries targeting different CPU architectures")
+set(MKL_KernelLibraries "mkl_def;mkl_mc;mkl_mc3;mkl_avx;mkl_avx2;mkl_avx512")
+
+foreach(lib ${MKL_KernelLibraries})
+  find_mkl_library(NAME ${lib} LIBRARY_NAME ${lib})
+  if(MKL_${lib}_LINK_LIBRARY OR MKL_${lib}_DLL_LIBRARY)
+    list(APPEND MKL_RUNTIME_KERNEL_LIBRARIES $<TARGET_FILE:MKL::${lib}>)
+  endif()
 endforeach()
-
-if (MKL_FIND_DEBUG)
-    message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                   "_MKL_ROOT_SEARCH_DIRS = ${_MKL_ROOT_SEARCH_DIRS}")
-endif()
-
-find_path(MKL_INCLUDE_DIR
-    NAMES mkl.h
-    PATHS ${_MKL_ROOT_SEARCH_DIRS}
-    PATH_SUFFIXES include
-    DOC "The path to Intel(R) MKL header files"
-)
-
-if (MKL_INCLUDE_DIR)
-    if (MKL_FIND_DEBUG)
-        message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                       "location of mkl.h: ${MKL_INCLUDE_DIR}/mkl.h")
-    endif()
-else()
-    if (MKL_FIND_DEBUG)
-        message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                       "unable to find Intel(R) MKL header files. Please set MKLROOT"
-                       " to the root directory containing MKL.")
-    endif()
-endif()
-
-# Find MKL library directory
-
-set(_INTEL_LIBRARY_DIR_SUFFIXES "lib")
-if (_MKL_IA32)
-    list(APPEND _INTEL_LIBRARY_DIR_SUFFIXES "lib/ia32")
-elseif (_MKL_INTEL64)
-    list(APPEND _INTEL_LIBRARY_DIR_SUFFIXES "lib/intel64")
-else()
-    message(FATAL_ERROR "unreachable")
-endif()
-
-set(_MKL_LIBRARY_SEARCH_DIRS ${_MKL_ROOT_SEARCH_DIRS})
-if (MKL_INCLUDE_DIR)
-    list(APPEND _MKL_LIBRARY_SEARCH_DIRS "${MKL_INCLUDE_DIR}/..")
-endif()
-
-if (MKL_FIND_DEBUG)
-    message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                   "_INTEL_LIBRARY_DIR_SUFFIXES = ${_INTEL_LIBRARY_DIR_SUFFIXES}")
-    message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                   "_MKL_LIBRARY_SEARCH_DIRS = ${_MKL_LIBRARY_SEARCH_DIRS}")
-endif()
-
-set(MKL_LIB_PREFIX "mkl_")
-if (MKL_USE_STATIC_LIBS)
-    if (_MKL_IA32)
-        if (WIN32)
-            set(_MKL_LIBRARIES intel_c)
-        else()
-            set(_MKL_LIBRARIES intel)
-        endif()
-    elseif (_MKL_INTEL64)
-        set(_MKL_LIBRARIES intel_lp64)
-    else()
-        message(FATAL_ERROR "unreachable")
-    endif()
-
-    list(APPEND _MKL_LIBRARIES intel_thread)
-    list(APPEND _MKL_LIBRARIES core)
-else()
-    set(_MKL_LIBRARIES rt)
-endif()
-
-set(_MKL_MISSING_LIBRARIES "")
-set(MKL_LIBRARIES "")
-set(MKL_LIBRARY_DIRS "")
-# Find MKL libraries
-foreach (_MKL_LIB_RAW ${_MKL_LIBRARIES})
-    set(_MKL_LIB ${MKL_LIB_PREFIX}${_MKL_LIB_RAW})
-    string(TOUPPER ${_MKL_LIB} _MKL_LIB_UPPER)
-
-    find_library(${_MKL_LIB_UPPER}_LIBRARY
-        NAMES ${_MKL_LIB}
-        PATHS ${_MKL_LIBRARY_SEARCH_DIRS}
-        PATH_SUFFIXES ${_INTEL_LIBRARY_DIR_SUFFIXES}
-        DOC "The path to Intel(R) MKL ${_MKL_LIB_RAW} library"
-    )
-    mark_as_advanced(${_MKL_LIB_UPPER}_LIBRARY)
-
-    if (NOT ${_MKL_LIB_UPPER}_LIBRARY)
-        list(APPEND _MKL_MISSING_LIBRARIES ${_MKL_LIB})
-    else()
-        list(APPEND MKL_LIBRARIES ${${_MKL_LIB_UPPER}_LIBRARY})
-        if (MKL_FIND_DEBUG)
-            message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                           "Found ${_MKL_LIB}: ${${_MKL_LIB_UPPER}_LIBRARY}")
-        endif()
-
-        get_filename_component(_MKL_LIB_PATH "${${_MKL_LIB_UPPER}_LIBRARY}" PATH)
-        list(APPEND MKL_LIBRARY_DIRS ${_MKL_LIB_PATH})
-    endif()
-endforeach()
-
-## Find OpenMP, pthread and math libraries
-
-set(_INTEL_LIBRARY_SEARCH_DIRS
-  ${INTEL_ROOT}
-  ${INTEL_ROOT}/compiler
-)
-
-foreach(_MKL_DIR ${_MKL_ROOT_SEARCH_DIRS})
-    list(APPEND _INTEL_LIBRARY_SEARCH_DIRS "${_MKL_DIR}/..")
-    list(APPEND _INTEL_LIBRARY_SEARCH_DIRS "${_MKL_DIR}/../compiler")
-endforeach()
-
-if (MKL_FIND_DEBUG)
-    message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                   "_INTEL_LIBRARY_SEARCH_DIRS = ${_INTEL_LIBRARY_SEARCH_DIRS}")
-endif()
-
-if (NOT WIN32)
-    find_library(PTHREAD_LIBRARY pthread DOC "Path to POSIX threads library")
-endif()
-
-set(_IOMP5_LIB iomp5)
-if (WIN32)
-  if (MKL_USE_STATIC_LIBS)
-      list(APPEND _IOMP5_LIB libiomp5mt.lib)
+mark_as_advanced(MKL_RUNTIME_KERNEL_LIBRARIES)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(MKL
+  REQUIRED_VARS MKL_INCLUDE_DIR MKL_Core_LINK_LIBRARY)
+if(NOT WIN32)
+  find_library(M_LIB m)
+  mark_as_advanced(M_LIB)
+endif()
+if(MKL_FOUND)
+  add_library(MKL::MKL SHARED IMPORTED)
+  if(MKL_THREAD_LAYER STREQUAL "Sequential")
+    set_target_properties(MKL::MKL
+      PROPERTIES
+        IMPORTED_LOCATION "${MKL_Core_LINK_LIBRARY}"
+        INTERFACE_LINK_LIBRARIES "MKL::Interface;MKL::ThreadLayer;${CMAKE_DL_LIBS};${M_LIB}"
+        INTERFACE_INCLUDE_DIRECTORIES "${MKL_INCLUDE_DIR};${MKL_FFTW_INCLUDE_DIR}"
+        IMPORTED_NO_SONAME TRUE)
   else()
-      list(APPEND _IOMP5_LIB libiomp5md.lib)
-  endif()
-endif()
-
-find_library(IOMP5_LIBRARY
-    NAMES ${_IOMP5_LIB}
-    PATHS ${_INTEL_LIBRARY_SEARCH_DIRS}
-    PATH_SUFFIXES ${_INTEL_LIBRARY_DIR_SUFFIXES}
-    DOC "Path to OpenMP runtime library"
-)
-
-if (NOT IOMP5_LIBRARY)
-    # we could instead fallback to default library (via FindOpenMP.cmake)
-    list(APPEND _MKL_MISSING_LIBRARIES IOMP5)
-else()
-    list(APPEND MKL_LIBRARIES ${IOMP5_LIBRARY})
-    if (MKL_FIND_DEBUG)
-        message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                       "Found IOMP5_LIBRARY: ${IOMP5_LIBRARY}")
-    endif()
-
-    get_filename_component(_MKL_LIB_PATH "${IOMP5_LIBRARY}" PATH)
-    list(APPEND MKL_LIBRARY_DIRS ${_MKL_LIB_PATH})
-endif()
-
-# Optimized math library (optional)
-set(_MATH_LIB imf)  # linked by default with Intel compiler
-if (WIN32)
-  if (MKL_USE_STATIC_LIBS)
-    list(APPEND _MATH_LIB libmmds.lib)  # assumes (/MD) otherwise libmmt.lib (for /MT)
-  else()
-      list(APPEND _MATH_LIB libmmd.lib)
-  endif()
-endif()
-
-find_library(MATH_LIBRARY
-    NAMES ${_MATH_LIB}
-    PATHS ${_INTEL_LIBRARY_SEARCH_DIRS}
-    PATH_SUFFIXES ${_INTEL_LIBRARY_DIR_SUFFIXES}
-    DOC "Path to optimized math library"
-)
-
-if (NOT MATH_LIBRARY)
-    # we could instead fallback to default library (via FindOpenMP.cmake)
-    list(APPEND _MKL_MISSING_LIBRARIES MATH)
-else()
-    list(APPEND MKL_LIBRARIES ${MATH_LIBRARY})
-    if (MKL_FIND_DEBUG)
-        message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                       "Found MATH_LIBRARY: ${MATH_LIBRARY}")
-    endif()
-
-    get_filename_component(_MKL_LIB_PATH "${MATH_LIBRARY}" PATH)
-    list(APPEND MKL_LIBRARY_DIRS ${_MKL_LIB_PATH})
-endif()
-
-# Check all required libraries are available
-list(REMOVE_DUPLICATES MKL_LIBRARY_DIRS)
-
-set(MKL_INCLUDE_DIRS
-    ${MKL_INCLUDE_DIR}
-)
-
-set(MKL_FOUND TRUE)
-if (NOT MKL_INCLUDE_DIR)
-    set(MKL_FOUND FALSE)
-    if (MKL_FIND_DEBUG)
-        message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                       "MKL not found - MKL_INCLUDE_DIR was empty")
-    endif()
-elseif (_MKL_MISSING_LIBRARIES)
-    set(MKL_FOUND FALSE)
-    if (MKL_FIND_DEBUG)
-        message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                       "MKL not found - the following libraries are missing: "
-                       "${_MKL_MISSING_LIBRARIES}")
-    endif()
-endif()
-
-if (MKL_FOUND)
-    if (NOT MKL_FIND_QUIETLY OR MKL_FIND_DEBUG)
-        message(STATUS
-            "Intel(R) MKL was found:\n"
-            "  MKL_INCLUDE_DIRS: ${MKL_INCLUDE_DIRS}\n"
-            "  MKL_LIBRARY_DIRS: ${MKL_LIBRARY_DIRS}\n"
-            "  MKL_LIBRARIES: ${MKL_LIBRARIES}"
-        )
-    endif()
-else()
-    if (MKL_FIND_REQUIRED)
-        message(SEND_ERROR "Intel(R) MKL could not be found.")
-    else()
-        message(STATUS "Intel(R) MKL could not be found.")
-    endif()
-endif()
-
-mark_as_advanced(
-    MKL_INCLUDE_DIR
-    MKL_INCLUDE_DIRS
-    MKL_LIBRARY_DIRS
-)
-
+    set_target_properties(MKL::MKL
+      PROPERTIES
+        IMPORTED_LOCATION "${MKL_Core_LINK_LIBRARY}"
+        INTERFACE_LINK_LIBRARIES "MKL::Interface;MKL::ThreadLayer;MKL::ThreadingLibrary;${CMAKE_DL_LIBS};${M_LIB}"
+        INTERFACE_INCLUDE_DIRECTORIES "${MKL_INCLUDE_DIR};${MKL_FFTW_INCLUDE_DIR}"
+        IMPORTED_NO_SONAME TRUE)
+  endif()
+  if(WIN32)
+    set_target_properties(MKL::MKL
+      PROPERTIES
+        IMPORTED_LOCATION "${MKL_Core_DLL_LIBRARY}"
+        IMPORTED_IMPLIB "${MKL_Core_LINK_LIBRARY}")
+  endif()
+endif()


patch: copy patchbld_DIR to STAGE_DIR

patch: copy patchbld_DIR to STAGE_DIR

* these changes will copy the patch executable and dll on Windows
* the changes copy the entire directory to STAGE_DIR
* STAGE_DIR is what's included in the installer
* issue https://github.com/smanders/externpro/issues/298

--- projects/patch.cmake
+++ projects/patch.cmake
@@ -64,12 +64,11 @@
   configure_file(${PRO_DIR}/use/usexp-patch-config.cmake ${STAGE_DIR}/share/cmake/
     @ONLY NEWLINE_STYLE LF
     )
-  get_filename_component(patchExe ${PATCH_EXE} NAME)
   ExternalProject_Add(patch_bld DEPENDS patch
     DOWNLOAD_COMMAND "" DOWNLOAD_DIR ${NULL_DIR} CONFIGURE_COMMAND ""
     SOURCE_DIR ${NULL_DIR} BINARY_DIR ${NULL_DIR} INSTALL_DIR ${NULL_DIR}
-    BUILD_COMMAND ${CMAKE_COMMAND} -E copy_if_different
-      ${PATCH_EXE} ${STAGE_DIR}/bin/${patchExe}
+    BUILD_COMMAND ${CMAKE_COMMAND} -Dsrc:STRING=${patchbld_DIR} -Ddst:STRING=${STAGE_DIR}
+      -P ${MODULES_DIR}/cmscopyfiles.cmake
     INSTALL_COMMAND ""
     )
   set_property(TARGET patch_bld PROPERTY FOLDER ${bld_folder})


* The name of the macro for finding QtDBus via cmake is QT_QTDBUS_FOUND and
  it's set to "1" if true

svn path=/trunk/KDE/kdebindings/smoke/; revision=633651

--- qt/generate.pl.cmake
+++ qt/generate.pl.cmake
@@ -29,7 +29,7 @@
  $qscintilla_headerlistpath = "$here/$qscintilla_headerlist";
 }

-if("@QT_DBUS_FOUND@" eq "YES")
+if("@QT_QTDBUS_FOUND@" eq "1")
 {
  $qtdbus_headerlist = "@CMAKE_CURRENT_SOURCE_DIR@/qtdbus_header_list";
  $qtdbus_headerlistpath = "$here/$qtdbus_headerlist";
@@ -48,7 +48,7 @@
  $qscintilla_headerlistpath = $qscintilla_headerlist if ($qscintilla_headerlist =~ /^\//);
 }

-if("@QT_DBUS_FOUND@" eq "YES")
+if("@QT_QTDBUS_FOUND@" eq "1")
 {
  $qtdbus_headerlistpath = $qtdbus_headerlist if ($qtdbus_headerlist =~ /^\//);
 }
@@ -120,7 +120,7 @@
  close HEADERS;
 }

-if("@QT_DBUS_FOUND@" eq "YES")
+if("@QT_QTDBUS_FOUND@" eq "1")
 {
  open(HEADERS, $qtdbus_headerlistpath) or die "Couldn't open $qtdbus_headerlistpath: $!\n";
  map { chomp ; $includes{$_} = 1 } <HEADERS>;


fix cmake

fix cmake

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -21,16 +21,7 @@
 FIND_PACKAGE(wiselib REQUIRED)
 FIND_PACKAGE(lalib REQUIRED)
 FIND_PACKAGE(imllib REQUIRED)
-# find libxml2
-SET(libxml2_FOUND FALSE)
-IF(IS_DIRECTORY "$ENV{LIBXML2}")
-	SET(libxml2_FOUND TRUE)
-	SET(libxml2_INCLUDE_DIRS "$ENV{LIBXML2}")
-ENDIF(IS_DIRECTORY "$ENV{LIBXML2}")
-
-IF(NOT libxml2_FOUND)
-	MESSAGE(FATAL_ERROR "cannot found libxml2, please set env variable LIBXML2 (e.g. -DLIBXML2=/usr/include/libxml2)")
-ENDIF(NOT libxml2_FOUND)
+FIND_PACKAGE(xml2 REQUIRED)

 ##################################################
 # Other Libraries


Add a warning if wspiapi.h doesn't exist.

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -25,6 +25,9 @@
 check_include_file(terminos.h HAVE_TERMIOS_H)
 if (WIN32)
   check_include_file(wspiapi.h HAVE_WSPIAPI_H)
+  if (NOT HAVE_WSPIAPI_H)
+    message(STATUS "WARNING: Without wspiapi.h, this build will only work on Windows XP and newer versions")
+  endif (NOT HAVE_WSPIAPI_H)
   set(HAVE_GETADDRINFO TRUE)
   set(HAVE_GETHOSTBYNAME TRUE)
   set(HAVE_SELECT TRUE)


COMP (#5529): removing double entry of file

--- Core/Code/files.cmake
+++ Core/Code/files.cmake
@@ -139,7 +139,6 @@
   Interactions/mitkInteractor.cpp
   Interactions/mitkMouseMovePointSetInteractor.cpp
   Interactions/mitkMoveSurfaceInteractor.cpp
-  Interactions/mitkMoveSurfaceInteractor.cpp
   Interactions/mitkPointSetInteractor.cpp
   Interactions/mitkPositionEvent.cpp
   Interactions/mitkPositionTracker.cpp


CMake Is The Devil

CMake Is The Devil

Former-commit-id: 7a5c83f2623603d78aaf76327b8bf8c650bc2f37

--- HalideGenerator.cmake
+++ HalideGenerator.cmake
@@ -71,13 +71,13 @@
   set(FILTER_HDR "${args_GENERATED_FUNCTION}.h")

   set(generator_exec_args "-o" "${SCRATCH_DIR}")
-  if (${args_GENERATED_FUNCTION})
+  if (NOT ${args_GENERATED_FUNCTION} STREQUAL "")
     list(APPEND generator_exec_args "-f" "${args_GENERATED_FUNCTION_NAMESPACE}${args_GENERATED_FUNCTION}" )
   endif()
-  if (${args_GENERATOR_NAME})
+  if (NOT ${args_GENERATOR_NAME} STREQUAL "")
     list(APPEND generator_exec_args "-g" "${args_GENERATOR_NAME}")
   endif()
-  if (${args_GENERATOR_OUTPUTS})
+  if (NOT ${args_GENERATOR_OUTPUTS} STREQUAL "")
     list(APPEND generator_exec_args "-e" ${args_GENERATOR_OUTPUTS})
   endif()
   # GENERATOR_ARGS always come last


Avoid CMake warnings by updating naming of found variable (#2578)

Signed-off-by: Larry Gritz <f0a1ce6f80112d72f7276457fd261d671b827567@larrygritz.com>

--- src/cmake/modules/FindOpenImageIO.cmake
+++ src/cmake/modules/FindOpenImageIO.cmake
@@ -12,7 +12,7 @@
 # CMake module to find OpenImageIO
 #
 # This module will set
-#   OPENIMAGEIO_FOUND          True, if found
+#   OpenImageIO_FOUND          True, if found
 #   OPENIMAGEIO_INCLUDES       directory where headers are found
 #   OPENIMAGEIO_LIBRARIES      libraries for OIIO
 #   OPENIMAGEIO_LIBRARY_DIRS   library dirs for OIIO
@@ -87,13 +87,14 @@

 include (FindPackageHandleStandardArgs)
 find_package_handle_standard_args (OpenImageIO
-    FOUND_VAR     OPENIMAGEIO_FOUND
+    FOUND_VAR     OpenImageIO_FOUND
     REQUIRED_VARS OPENIMAGEIO_INCLUDE_DIR OPENIMAGEIO_LIBRARY
                   OPENIMAGEIO_VERSION
     VERSION_VAR   OPENIMAGEIO_VERSION
     )
+set (OPENIMAGEIO_FOUND ${OpenImageIO_FOUND})  # Old name

-if (OPENIMAGEIO_FOUND)
+if (OpenImageIO_FOUND)
     set (OPENIMAGEIO_INCLUDES ${OPENIMAGEIO_INCLUDE_DIR})
     set (OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY})
     get_filename_component (OPENIMAGEIO_LIBRARY_DIRS "${OPENIMAGEIO_LIBRARY}" DIRECTORY)


Some minor cleaning up [ci skip].

Some minor cleaning up [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -87,12 +87,12 @@

     # Keep track of some information about Qt

-    SET(QT_VERSION ${Qt5Widgets_VERSION})
-    SET(QT_VERSION_MAJOR ${Qt5Widgets_VERSION_MAJOR})
-    SET(QT_VERSION_MINOR ${Qt5Widgets_VERSION_MINOR})
-    SET(QT_VERSION_PATCH ${Qt5Widgets_VERSION_PATCH})
-
-    SET(QT_DIR ${_qt5Widgets_install_prefix})
+    SET(QT_VERSION ${Qt5Core_VERSION})
+    SET(QT_VERSION_MAJOR ${Qt5Core_VERSION_MAJOR})
+    SET(QT_VERSION_MINOR ${Qt5Core_VERSION_MINOR})
+    SET(QT_VERSION_PATCH ${Qt5Core_VERSION_PATCH})
+
+    SET(QT_DIR ${_qt5Core_install_prefix})
     SET(QT_BINARY_DIR ${QT_DIR}/bin)
     SET(QT_LIBRARY_DIR ${QT_DIR}/lib)
     SET(QT_PLUGINS_DIR ${QT_DIR}/plugins)


Changed a little headers install location

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -59,7 +59,7 @@
 		file(RELATIVE_PATH dir ${_BASE_HEADERS_DIR} ${file})
 		get_filename_component(dir ${dir} DIRECTORY)
 		install(FILES ${file} DESTINATION ${_PLATFORM}/include/${dir} CONFIGURATIONS Release)
-		install(FILES ${file} DESTINATION ${_PLATFORM}/debug/include/${dir} CONFIGURATIONS Debug)
+		install(FILES ${file} DESTINATION ${_PLATFORM}/include/debug/${dir} CONFIGURATIONS Debug)
 	endforeach()
 endfunction()


Fix syntax error (missing quote).

Fix syntax error (missing quote).

--- cmake/os/AIX.cmake
+++ cmake/os/AIX.cmake
@@ -28,6 +28,6 @@
 # The following is required to export all symbols
 # (also with leading underscore)
 STRING(REPLACE  "-bexpall" "-bexpfull" CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS
-  ${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS}")
+  "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS}")
 STRING(REPLACE  "-bexpall" "-bexpfull" CMAKE_SHARED_LIBRARY_LINK_C_FLAGS
-  "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}")+  "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}")


RETURN doesn't exactly return from the macro...

--- cmake/plugin.cmake
+++ cmake/plugin.cmake
@@ -32,16 +32,15 @@

 MACRO(PLUGIN_APPEND_COLLECTIONS plugin)
   SET(fcopied "${CMAKE_CURRENT_SOURCE_DIR}/tests/collections/FilesCopied")
-  IF(EXISTS ${fcopied})
-    RETURN()
-  ENDIF()
-  FILE(GLOB collections ${CMAKE_CURRENT_SOURCE_DIR}/tests/collections/*)
-  FOREACH(cfile ${collections})
-    FILE(READ ${cfile} contents)
-    GET_FILENAME_COMPONENT(fname ${cfile} NAME)
-    FILE(APPEND ${CMAKE_SOURCE_DIR}/mysql-test/collections/${fname} "${contents}")
-    FILE(APPEND ${fcopied} "${fname}\n")
-  ENDFOREACH()
+  IF(NOT EXISTS ${fcopied})
+    FILE(GLOB collections ${CMAKE_CURRENT_SOURCE_DIR}/tests/collections/*)
+    FOREACH(cfile ${collections})
+      FILE(READ ${cfile} contents)
+      GET_FILENAME_COMPONENT(fname ${cfile} NAME)
+      FILE(APPEND ${CMAKE_SOURCE_DIR}/mysql-test/collections/${fname} "${contents}")
+      FILE(APPEND ${fcopied} "${fname}\n")
+    ENDFOREACH()
+  ENDIF()
 ENDMACRO()

 MACRO(MYSQL_ADD_PLUGIN)


- Add Maemo libraries, they were missing

--- cmake/Find/FindStandardLibs.cmake
+++ cmake/Find/FindStandardLibs.cmake
@@ -12,7 +12,7 @@

 if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND NOT ANDROID AND NOT NACL)
     # Used for thread details
-    list ( APPEND CORE_EXTRA_LIBRARIES rt )
+    list ( APPEND CORE_EXTRA_LIBRARIES rt EGL )
 endif()

 if(NOT WIN32 AND NOT MINGW AND NOT MSYS AND NOT NACL)
@@ -132,6 +132,13 @@
         )
 endif()

+if(MAEMO)
+    list ( APPEND CORE_EXTRA_LIBRARIES
+        GLES_CM GLESv2
+        EGL IMGegl
+        )
+endif()
+
 set ( STANDARDLIBS_LIBRARIES "${CORE_EXTRA_LIBRARIES}" CACHE STRING "" )
 set ( STANDARDLIBS_INCLUDE_DIR "${CORE_INCLUDE_DIR}" CACHE STRING "" )


- Disable manual .app creation for iOS, using MACOSX_BUNDLE

--- cmake/Packaging/MacAppBuild.cmake
+++ cmake/Packaging/MacAppBuild.cmake
@@ -3,9 +3,9 @@
 endif()

 macro( MACFRAMEWORK_PACKAGE
-	TARGET LINKOPT
-	VERSION_CODE COPYRIGHT COMPANY
-	SOURCES BUNDLE_RSRCS BUNDLE_HEADERS)
+        TARGET LINKOPT
+        VERSION_CODE COPYRIGHT COMPANY
+        SOURCES BUNDLE_RSRCS BUNDLE_HEADERS)

     set ( VERSION_STD_CODE "1.0.0" )
     set ( VERSION_COMP_CODE "1.0.0" )
@@ -13,27 +13,27 @@
     add_definitions( -DCOFFEE_APPLICATION_LIBRARY )

     if(NOT IOS)
-        add_library("${TARGET}" SHARED "${SOURCES}")
+        add_library("${TARGET}" ${LINKOPT} "${SOURCES}")
     else()
         add_library("${TARGET}" STATIC "${SOURCES}")
     endif()

-    set_target_properties("${TARGET}" PROPERTIES
+    set_target_properties("${TARGET}" PROPERTIES
         POSITION_INDEPENDENT_CODE TRUE
         FRAMEWORK TRUE
         MACOSX_FRAMEWORK_IDENTIFIER org.coffeecutie-dev.${TARGET}
         MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${VERSION_CODE}
         MACOSX_FRAMEWORK_BUNDLE_VERSION ${VERSION_CODE}
-	VERSION ${VERSION_STD_CODE}
-	SOVERSION ${VERSION_COMP_CODE}
+        VERSION ${VERSION_STD_CODE}
+        SOVERSION ${VERSION_COMP_CODE}
         )

     # TODO: Process resource files
     # TODO: Process header files

     install(
-	TARGETS
-	"${TARGET}"
+        TARGETS
+        "${TARGET}"

         LIBRARY DESTINATION
         lib
@@ -42,10 +42,10 @@
         lib

         FRAMEWORK DESTINATION
-	frameworks
+        frameworks
         COMPONENT
         bin
-	)
+        )
 endmacro()

 macro( MACAPP_PACKAGE
@@ -92,70 +92,74 @@
         message ( "Framework: ${fw}" )
     endforeach()

-    if(NOT IOS)
-        add_executable(${TARGET} MACOSX_BUNDLE
-            ${BUNDLE_FILES} ${OSX_ICON}
-            ${SOURCES}
-            )
+    #    if(NOT IOS)
+    add_executable(${TARGET} MACOSX_BUNDLE
+        ${BUNDLE_FILES} ${OSX_ICON}
+        ${SOURCES}
+        )

-        # Lots of properties!
-        set_target_properties(${TARGET} PROPERTIES
-            MACOSX_BUNDLE_BUNDLE_NAME "${TITLE}"
-            MACOSX_BUNDLE_GUI_IDENTIFIER "${TITLE}"
-            MACOSX_BUNDLE_ICON_FILE "${OSX_ICON_NAME}"
+    if(IOS)

-            MACOSX_BUNDLE_COPYRIGHT "${COPYRIGHT}"
-            MACOSX_BUNDLE_INFO_STRING "${INFO_STRING}"
+    endif()

-            MACOSX_BUNDLE_BUNDLE_VERSION "${COFFEE_BUILD_STRING}"
-            MACOSX_BUNDLE_SHORT_VERSION_STRING "${COFFEE_VERSION_CODE}"
-            MACOSX_BUNDLE_LONG_VERSION_STRING "${COFFEE_BUILD_STRING}"
-            )
+    # Lots of properties!
+    set_target_properties(${TARGET} PROPERTIES
+        MACOSX_BUNDLE_BUNDLE_NAME "${TITLE}"
+        MACOSX_BUNDLE_GUI_IDENTIFIER "${TITLE}"
+        MACOSX_BUNDLE_ICON_FILE "${OSX_ICON_NAME}"

-        install(
-            TARGETS
-            ${TARGET}
+        MACOSX_BUNDLE_COPYRIGHT "${COPYRIGHT}"
+        MACOSX_BUNDLE_INFO_STRING "${INFO_STRING}"

-            DESTINATION
-            ${CMAKE_PACKAGED_OUTPUT_PREFIX}/apple-osx
-            )
-    else()
-        set ( APP_DIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TITLE}.app" )
+        MACOSX_BUNDLE_BUNDLE_VERSION "${COFFEE_BUILD_STRING}"
+        MACOSX_BUNDLE_SHORT_VERSION_STRING "${COFFEE_VERSION_CODE}"
+        MACOSX_BUNDLE_LONG_VERSION_STRING "${COFFEE_BUILD_STRING}"
+        )

-        set ( IOS_NAME "${TITLE}" )
-        set ( IOS_IDENTIFIER "${TITLE}" )
-        set ( IOS_INFO "${INFO_STRING}" )
+    install(
+        TARGETS
+        ${TARGET}

-        set ( IOS_BUNDLEVER "${COFFEE_BUILD_STRING}" )
-        set ( IOS_SHORTVER "${COFFEE_VERSION_CODE}" )
-        set ( IOS_LONGVER "${COFFEE_BUILD_STRING}" )
+        DESTINATION
+        ${CMAKE_PACKAGED_OUTPUT_PREFIX}/apple-osx
+        )
+    #    else()
+    #        set ( APP_DIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TITLE}.app" )

-        set ( IOS_EXEC "${TITLE}" )
-        set ( IOS_LANG "English" )
-        set ( IOS_LAUNCH_IMG "Default")
-        set ( IOS_HIDE_STATUSBAR "true" )
-        set ( IOS_PRERENDER_ICON "true" )
+    #        set ( IOS_NAME "${TITLE}" )
+    #        set ( IOS_IDENTIFIER "${TITLE}" )
+    #        set ( IOS_INFO "${INFO_STRING}" )

-        set ( IOS_ORIENTATION "UIInterfaceOrientationLandscapeLeft" )
+    #        set ( IOS_BUNDLEVER "${COFFEE_BUILD_STRING}" )
+    #        set ( IOS_SHORTVER "${COFFEE_VERSION_CODE}" )
+    #        set ( IOS_LONGVER "${COFFEE_BUILD_STRING}" )

-        set ( IOS_SIGNATURE "..." )
+    #        set ( IOS_EXEC "${TITLE}" )
+    #        set ( IOS_LANG "English" )
+    #        set ( IOS_LAUNCH_IMG "Default")
+    #        set ( IOS_HIDE_STATUSBAR "true" )
+    #        set ( IOS_PRERENDER_ICON "true" )

-        add_executable ( ${TARGET} ${SOURCES} )
+    #        set ( IOS_ORIENTATION "UIInterfaceOrientationLandscapeLeft" )

-        add_custom_command (
-            TARGET "${TARGET}"
-            POST_BUILD
-            COMMAND "${CMAKE_COMMAND}" -E make_directory "${APP_DIR}"
-            )
-        add_custom_command (
-            TARGET "${TARGET}"
-            POST_BUILD
-            COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:${TARGET}>" "${APP_DIR}/${TITLE}"
-            )
-        configure_file (
-            "${COFFEE_DESKTOP_DIRECTORY}/osx/ios/Info.plist.xml"
-            "${APP_DIR}/Info.plist"
-            @ONLY
-            )
-    endif()
+    #        set ( IOS_SIGNATURE "..." )
+
+    #        add_executable ( ${TARGET} ${SOURCES} )
+
+    #        add_custom_command (
+    #            TARGET "${TARGET}"
+    #            POST_BUILD
+    #            COMMAND "${CMAKE_COMMAND}" -E make_directory "${APP_DIR}"
+    #            )
+    #        add_custom_command (
+    #            TARGET "${TARGET}"
+    #            POST_BUILD
+    #            COMMAND "${CMAKE_COMMAND}" -E copy "$<TARGET_FILE:${TARGET}>" "${APP_DIR}/${TITLE}"
+    #            )
+    #        configure_file (
+    #            "${COFFEE_DESKTOP_DIRECTORY}/osx/ios/Info.plist.xml"
+    #            "${APP_DIR}/Info.plist"
+    #            @ONLY
+    #            )
+    #    endif()
 endmacro()


[CMake] Explicitly list Linux targets for Fuchsia toolchain

Not all Linux targets use the ${arch}-linux-gnu spelling, so instead
specify the list of Linux explicitly.

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

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

--- cmake/caches/Fuchsia-stage2.cmake
+++ cmake/caches/Fuchsia-stage2.cmake
@@ -33,41 +33,41 @@
   list(APPEND RUNTIME_TARGETS "default")
 endif()

-foreach(target i386;x86_64;armhf;aarch64)
+foreach(target i386-linux-gnu;x86_64-linux-gnu;arm-linux-gnueabi;aarch64-linux-gnu)
   if(LINUX_${target}_SYSROOT)
     # Set the per-target builtins options.
-    list(APPEND BUILTIN_TARGETS "${target}-linux-gnu")
-    set(BUILTINS_${target}-linux-gnu_CMAKE_SYSTEM_NAME Linux CACHE STRING "")
-    set(BUILTINS_${target}-linux-gnu_CMAKE_BUILD_TYPE Release CACHE STRING "")
-    set(BUILTINS_${target}-linux-gnu_CMAKE_SYSROOT ${LINUX_${target}_SYSROOT} CACHE STRING "")
-    set(BUILTINS_${target}-linux-gnu_CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
-    set(BUILTINS_${target}-linux-gnu_CMAKE_MODULE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
-    set(BUILTINS_${target}-linux-gnu_CMAKE_EXE_LINKER_FLAG "-fuse-ld=lld" CACHE STRING "")
+    list(APPEND BUILTIN_TARGETS "${target}")
+    set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Linux CACHE STRING "")
+    set(BUILTINS_${target}_CMAKE_BUILD_TYPE Release CACHE STRING "")
+    set(BUILTINS_${target}_CMAKE_SYSROOT ${LINUX_${target}_SYSROOT} CACHE STRING "")
+    set(BUILTINS_${target}_CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
+    set(BUILTINS_${target}_CMAKE_MODULE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
+    set(BUILTINS_${target}_CMAKE_EXE_LINKER_FLAG "-fuse-ld=lld" CACHE STRING "")

     # Set the per-target runtimes options.
-    list(APPEND RUNTIME_TARGETS "${target}-linux-gnu")
-    set(RUNTIMES_${target}-linux-gnu_CMAKE_SYSTEM_NAME Linux CACHE STRING "")
-    set(RUNTIMES_${target}-linux-gnu_CMAKE_BUILD_TYPE Release CACHE STRING "")
-    set(RUNTIMES_${target}-linux-gnu_CMAKE_SYSROOT ${LINUX_${target}_SYSROOT} CACHE STRING "")
-    set(RUNTIMES_${target}-linux-gnu_CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
-    set(RUNTIMES_${target}-linux-gnu_CMAKE_MODULE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
-    set(RUNTIMES_${target}-linux-gnu_CMAKE_EXE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
-    set(RUNTIMES_${target}-linux-gnu_LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
-    set(RUNTIMES_${target}-linux-gnu_LIBUNWIND_ENABLE_SHARED OFF CACHE BOOL "")
-    set(RUNTIMES_${target}-linux-gnu_LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "")
-    set(RUNTIMES_${target}-linux-gnu_LIBUNWIND_INSTALL_LIBRARY OFF CACHE BOOL "")
-    set(RUNTIMES_${target}-linux-gnu_LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "")
-    set(RUNTIMES_${target}-linux-gnu_LIBCXXABI_ENABLE_SHARED OFF CACHE BOOL "")
-    set(RUNTIMES_${target}-linux-gnu_LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "")
-    set(RUNTIMES_${target}-linux-gnu_LIBCXXABI_ENABLE_STATIC_UNWINDER ON CACHE BOOL "")
-    set(RUNTIMES_${target}-linux-gnu_LIBCXXABI_INSTALL_LIBRARY OFF CACHE BOOL "")
-    set(RUNTIMES_${target}-linux-gnu_LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
-    set(RUNTIMES_${target}-linux-gnu_LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
-    set(RUNTIMES_${target}-linux-gnu_LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
-    set(RUNTIMES_${target}-linux-gnu_LIBCXX_ABI_VERSION 2 CACHE STRING "")
-    set(RUNTIMES_${target}-linux-gnu_SANITIZER_CXX_ABI "libc++" CACHE STRING "")
-    set(RUNTIMES_${target}-linux-gnu_SANITIZER_CXX_ABI_INTREE ON CACHE BOOL "")
-    set(RUNTIMES_${target}-linux-gnu_COMPILER_RT_USE_BUILTINS_LIBRARY ON CACHE BOOL "")
+    list(APPEND RUNTIME_TARGETS "${target}")
+    set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Linux CACHE STRING "")
+    set(RUNTIMES_${target}_CMAKE_BUILD_TYPE Release CACHE STRING "")
+    set(RUNTIMES_${target}_CMAKE_SYSROOT ${LINUX_${target}_SYSROOT} CACHE STRING "")
+    set(RUNTIMES_${target}_CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
+    set(RUNTIMES_${target}_CMAKE_MODULE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
+    set(RUNTIMES_${target}_CMAKE_EXE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
+    set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
+    set(RUNTIMES_${target}_LIBUNWIND_ENABLE_SHARED OFF CACHE BOOL "")
+    set(RUNTIMES_${target}_LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "")
+    set(RUNTIMES_${target}_LIBUNWIND_INSTALL_LIBRARY OFF CACHE BOOL "")
+    set(RUNTIMES_${target}_LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "")
+    set(RUNTIMES_${target}_LIBCXXABI_ENABLE_SHARED OFF CACHE BOOL "")
+    set(RUNTIMES_${target}_LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "")
+    set(RUNTIMES_${target}_LIBCXXABI_ENABLE_STATIC_UNWINDER ON CACHE BOOL "")
+    set(RUNTIMES_${target}_LIBCXXABI_INSTALL_LIBRARY OFF CACHE BOOL "")
+    set(RUNTIMES_${target}_LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
+    set(RUNTIMES_${target}_LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
+    set(RUNTIMES_${target}_LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
+    set(RUNTIMES_${target}_LIBCXX_ABI_VERSION 2 CACHE STRING "")
+    set(RUNTIMES_${target}_SANITIZER_CXX_ABI "libc++" CACHE STRING "")
+    set(RUNTIMES_${target}_SANITIZER_CXX_ABI_INTREE ON CACHE BOOL "")
+    set(RUNTIMES_${target}_COMPILER_RT_USE_BUILTINS_LIBRARY ON CACHE BOOL "")
   endif()
 endforeach()


remove misspelled flag

remove misspelled flag

Based on https://github.com/darktable-org/rawspeed/pull/344 , remove misspelled old-style-cast flag instead of correcting its spelling.

--- cmake/compiler-warnings-gcc.cmake
+++ cmake/compiler-warnings-gcc.cmake
@@ -13,7 +13,6 @@
   "extra-semi"
   "format=2"
 #  "missing-prototypes"
-  "old-style-casts"
   "pointer-arith"
 #  "strict-prototypes"
 #  "suggest-attribute=const"


cmake: fix indentation

cmake: fix indentation

--- cmake/external_dependencies.cmake
+++ cmake/external_dependencies.cmake
@@ -84,8 +84,8 @@
           json[0] = 1;
           return 0;
         }")
-	check_cxx_source_compiles("${CHECK_SOURCE}" SYSTEM_nlohmann_json_WORKS)
-	if (SYSTEM_nlohmann_json_WORKS)
+    check_cxx_source_compiles("${CHECK_SOURCE}" SYSTEM_nlohmann_json_WORKS)
+    if (SYSTEM_nlohmann_json_WORKS)
         add_library(nlohmann_json INTERFACE)
     else()
         FetchContent_Declare(nlohmann_json


Install tbb (#2430)

Install tbb (#2430)

--- cmake/external_tbb_prebuilt.cmake
+++ cmake/external_tbb_prebuilt.cmake
@@ -57,6 +57,9 @@
         COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SOURCE_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}${TBB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} ${NGRAPH_BUILD_DIR}
         COMMENT "Move tbb libraries to ngraph build directory"
     )
+
+    install(FILES ${NGRAPH_BUILD_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${TBB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
+            DESTINATION ${NGRAPH_INSTALL_LIB})
 endif()


Work around ccache issue 8118.

Work around ccache issue 8118.

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -32,6 +32,11 @@
   string(REGEX REPLACE "^.*[ ]version[ ][0-9]+\\.([0-9]+).*" "\\1" CLANG_MINOR "${_clang_version_info}")
   message(STATUS "Found Clang. Major version ${CLANG_MAJOR}, minor version ${CLANG_MINOR}")
   set(COMPILER_VERSION clang${CLANG_MAJOR}${CLANG_MINOR})
+  if(ccache)
+    # https://bugzilla.samba.org/show_bug.cgi?id=8118 and color.
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -fcolor-diagnostics")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments -fcolor-diagnostics")
+  endif()
 else()
   set(CLANG_MAJOR 0)
   set(CLANG_MINOR 0)


Fix for ROOT-6183

Fix for ROOT-6183

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -87,10 +87,13 @@
 endif()

 if(cxx11)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-deprecated-declarations")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+  if(CMAKE_COMPILER_IS_GNUCXX)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
+  endf()
 endif()
 if(libcxx)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
 endif()
 if(gnuinstall)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DR__HAVE_CONFIG")


ROOT-7402 - Fix the inconsistency in ROOT_LINKER_LIBRARY() macro between 5 and 6 versions

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -359,10 +359,11 @@

 #---------------------------------------------------------------------------------------------------
-#---ROOT_LINKER_LIBRARY( <name> source1 source2 ...[TYPE STATIC|SHARED] [DLLEXPORT] LIBRARIES library1 library2 ...)
+#---ROOT_LINKER_LIBRARY( <name> source1 source2 ...[TYPE STATIC|SHARED] [DLLEXPORT]
+#                        [NOINSTALL] LIBRARIES library1 library2 ...)
 #---------------------------------------------------------------------------------------------------
 function(ROOT_LINKER_LIBRARY library)
-  CMAKE_PARSE_ARGUMENTS(ARG "DLLEXPORT;CMAKENOEXPORT;TEST" "TYPE" "LIBRARIES;DEPENDENCIES"  ${ARGN})
+  CMAKE_PARSE_ARGUMENTS(ARG "DLLEXPORT;CMAKENOEXPORT;TEST;NOINSTALL" "TYPE" "LIBRARIES;DEPENDENCIES"  ${ARGN})
   ROOT_GET_SOURCES(lib_srcs src ${ARG_UNPARSED_ARGUMENTS})
   if(NOT ARG_TYPE)
     set(ARG_TYPE SHARED)
@@ -438,7 +439,7 @@
   set_target_properties(${library} PROPERTIES OUTPUT_NAME ${library_name})
   set_target_properties(${library} PROPERTIES LINK_INTERFACE_LIBRARIES "${ARG_DEPENDENCIES}")
   #----Installation details-------------------------------------------------------
-  if(NOT ARG_TEST AND CMAKE_LIBRARY_OUTPUT_DIRECTORY)
+  if(NOT ARG_TEST AND NOT ARG_NOINSTALL AND CMAKE_LIBRARY_OUTPUT_DIRECTORY)
     if(ARG_CMAKENOEXPORT)
       install(TARGETS ${library} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
                                  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries


For roottest, implement NO_ROOTMAP option in REFLEX_GENERATE_DICTIONARY.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -163,8 +163,15 @@
   endif()

   set(gensrcdict ${dictionary}.cxx)
-  set(rootmapname ${dictionary}Dict.rootmap)
-  set(rootmapopts --rootmap=${rootmapname} --rootmap-lib=${libprefix}${dictionary}Dict)
+
+  #---roottest compability---------------------------------
+  if(CMAKE_ROOTTEST_NOROOTMAP)
+    set(rootmapname )
+    set(rootmapopts )
+  else()
+    set(rootmapname ${dictionary}Dict.rootmap)
+    set(rootmapopts --rootmap=${rootmapname} --rootmap-lib=${libprefix}${dictionary}Dict)
+  endif()

   set(include_dirs -I${CMAKE_CURRENT_SOURCE_DIR})
   get_directory_property(incdirs INCLUDE_DIRECTORIES)


set global lib and test source variables

--- CMake/UseCyclus.cmake
+++ CMake/UseCyclus.cmake
@@ -87,6 +87,10 @@
     COMPONENT ${_dir}
     )

+  SET("Lib${_dir}" "${_dir}"
+    CACHE INTERNAL "CMake is really silly, the silliest, in fact" FORCE
+    )
+
   # install headers
   IF(EXISTS "${HOUT}")
     install(FILES ${HOUT}
@@ -97,9 +101,11 @@

   # add tests
   IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_name}_tests.cc")
-    SET(TestSource ${TestSource}
-      ${CMAKE_CURRENT_SOURCE_DIR}/${_name}_tests.cc
-      PARENT_SCOPE)
+    SET("${_dir}TestSource"
+      "${CMAKE_CURRENT_SOURCE_DIR}/${_name}_tests.cc"
+      "${CMAKE_CURRENT_SOURCE_DIR}/${_name}.cc"
+      CACHE INTERNAL "CMake is really silly, the silliest, in fact" FORCE
+      )
   ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_name}_tests.cc")

   MESSAGE(STATUS "Finished construction of build files for agent: ${_dir}")


GC HAVE_LINK_EXPORT_DYNAMIC.

GC HAVE_LINK_EXPORT_DYNAMIC.

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

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -122,9 +122,6 @@

 /* Define to 1 if you have the <link.h> header file. */
 #cmakedefine HAVE_LINK_H ${HAVE_LINK_H}
-
-/* Define if you can use -rdynamic. */
-#define HAVE_LINK_EXPORT_DYNAMIC 1

 /* Define if you can use -Wl,-R. to pass -R. to the linker, in order to add
    the current directory to the dynamic linker search path. */


GC HAVE_DYLD, HAVE_PRELOADED_SYMBOLS and HAVE_SHL_LOAD

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

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -57,9 +57,6 @@
 /* Define if dlopen() is available on this platform. */
 #cmakedefine HAVE_DLOPEN ${HAVE_DLOPEN}

-/* Define if you have the _dyld_func_lookup function. */
-#undef HAVE_DYLD
-
 /* Define to 1 if you have the <errno.h> header file. */
 #cmakedefine HAVE_ERRNO_H ${HAVE_ERRNO_H}

@@ -191,9 +188,6 @@
 /* Define to 1 if you have the `pread' function. */
 #cmakedefine HAVE_PREAD ${HAVE_PREAD}

-/* Define if libtool can extract symbol lists from object files. */
-#undef HAVE_PRELOADED_SYMBOLS
-
 /* Define to have the %a format string */
 #undef HAVE_PRINTF_A

@@ -220,9 +214,6 @@

 /* Define to 1 if you have the `setrlimit' function. */
 #cmakedefine HAVE_SETRLIMIT ${HAVE_SETRLIMIT}
-
-/* Define if you have the shl_load function. */
-#undef HAVE_SHL_LOAD

 /* Define to 1 if you have the `sigaltstack' function. */
 #cmakedefine HAVE_SIGALTSTACK ${HAVE_SIGALTSTACK}


COMP: find numpy package if python wrapping is enabled

Signed-off-by: Rashad Kanavath <dfaabf3cab15546e5cff71568005e992c6a52e8b@c-s.fr>

--- Modules/Wrappers/SWIG/otb-module-init.cmake
+++ Modules/Wrappers/SWIG/otb-module-init.cmake
@@ -25,6 +25,7 @@
   check_PIC_flag ( Python )
   find_package ( PythonLibs REQUIRED )
   find_package ( PythonInterp REQUIRED )
+  find_package ( Numpy )
 endif()

 #


FBX_VERSION config variable.

FBX_VERSION config variable.

--- FindFBX.cmake
+++ FindFBX.cmake
@@ -9,10 +9,13 @@
 #
 # Accepts the following variables as input:
 #
+#    FBX_VERSION - as a CMake variable, e.g. 2014.1
 #    FBX_ROOT - (as a CMake or environment variable)
 #               The root directory of the FBX SDK install

-set(FBX_VERSION 2013.3)
+if(NOT FBX_VERSION)
+    set(FBX_VERSION 2013.3)
+endif()

 set(FBX_MAC_LOCATIONS
     "/Applications/Autodesk/FBX\ SDK/${FBX_VERSION}"


Fix install of .xml files on windows

Fix install of .xml files on windows

--- Superbuild/Projects/win32/veloview.bundle.cmake
+++ Superbuild/Projects/win32/veloview.bundle.cmake
@@ -53,9 +53,8 @@
         COMPONENT ${AppName}
         PATTERN "*.lib" EXCLUDE)

-install(DIRECTORY "${install_location}/share"
+install(FILES "${install_location}/share/HDL-32.xml" "${install_location}/share/VLP-16.xml"
         DESTINATION "share"
-        USE_SOURCE_PERMISSIONS
         COMPONENT ${AppName})

 install(FILES "${wpcap_library_dir}/wpcap.dll"  "${wpcap_library_dir}/Packet.dll"


Remove tabs from git revision lines (#2703)

Precommit tests will fail if Git adds tabs to the revision lines in the
diff. This is already handled for SVN, this change does the equivalent
for Git.

--- suite/runsuite.cmake
+++ suite/runsuite.cmake
@@ -126,6 +126,8 @@
         RESULT_VARIABLE git_result
         ERROR_VARIABLE git_err
         OUTPUT_VARIABLE diff_contents)
+      # Remove tabs from the revision lines
+      string(REGEX REPLACE "\n(---|\\+\\+\\+)[^\n]*\t" "" diff_contents "${diff_contents}")
       if (git_result OR git_err)
         if (git_err MATCHES "unknown revision")
           # It may be a cloned branch


fix hdmarker_FOUND

fix hdmarker_FOUND

Change-Id: Ibcf7f70febf41f6ffd245fef000752a2ee4bea71

--- VAD_hdmarker.cmake
+++ VAD_hdmarker.cmake
@@ -3,7 +3,7 @@
 set(GIT_REPO "http://hci-repo.iwr.uni-heidelberg.de/hsiedelm/hdmarker.git")

 function(vad_system)
-  vad_system_default(${ARGN} NO_CMAKE_BUILDS_PATH)
+  vad_add_var(hdmarker_FOUND false)
 endfunction()

 function(vad_deps)
@@ -12,7 +12,7 @@
 endfunction()

 function(vad_live)
-  message("run VAD_LIVE for hdmarker")
+  message("run VAD_LIVE for hdmarker (${ARGN})")

   vad_deps(${ARGN})

@@ -27,4 +27,5 @@

   set_target_properties(hdmarker PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}/external/hdmarker/include")

+  set(hdmarker_FOUND true CACHE BOOL "" FORCE)
 endfunction()


Fixes https://github.com/zeromq/cppzmq/issues/361, by incorperating Ferdnyc's changes in OpenShot/libopenshot, previously cppzmq was not looking for the correct names, and rejected valid static library names when looking for zmq on windows, this fix aims to include those other names

--- libzmq-pkg-config/FindZeroMQ.cmake
+++ libzmq-pkg-config/FindZeroMQ.cmake
@@ -3,24 +3,32 @@
 pkg_check_modules(PC_LIBZMQ QUIET libzmq)

 set(ZeroMQ_VERSION ${PC_LIBZMQ_VERSION})
-find_library(ZeroMQ_LIBRARY NAMES libzmq.so libzmq.dylib libzmq.dll
-             PATHS ${PC_LIBZMQ_LIBDIR} ${PC_LIBZMQ_LIBRARY_DIRS})
-find_library(ZeroMQ_STATIC_LIBRARY NAMES libzmq-static.a libzmq.a libzmq.dll.a
-             PATHS ${PC_LIBZMQ_LIBDIR} ${PC_LIBZMQ_LIBRARY_DIRS})

-if(ZeroMQ_LIBRARY OR ZeroMQ_STATIC_LIBRARY)
+find_path(ZeroMQ_INCLUDE_DIR zmq.h
+        PATHS ${ZeroMQ_DIR}/include
+        ${PC_LIBZMQ_INCLUDE_DIRS})
+
+find_library(ZeroMQ_LIBRARY
+        NAMES zmq
+        PATHS ${ZeroMQ_DIR}/lib
+        ${PC_LIBZMQ_LIBDIR}
+        ${PC_LIBZMQ_LIBRARY_DIRS})
+
+if(ZeroMQ_LIBRARY)
     set(ZeroMQ_FOUND ON)
 endif()

-if (TARGET libzmq)
-    # avoid errors defining targets twice
-    return()
+set ( ZeroMQ_LIBRARIES ${ZeroMQ_LIBRARY} )
+set ( ZeroMQ_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIR} )
+
+if(NOT TARGET libzmq)
+    add_library(libzmq UNKNOWN IMPORTED)
+    set_target_properties(libzmq PROPERTIES
+            IMPORTED_LOCATION ${ZeroMQ_LIBRARIES}
+            INTERFACE_INCLUDE_DIRECTORIES ${ZeroMQ_INCLUDE_DIRS})
 endif()

-add_library(libzmq SHARED IMPORTED)
-set_property(TARGET libzmq PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PC_LIBZMQ_INCLUDE_DIRS})
-set_property(TARGET libzmq PROPERTY IMPORTED_LOCATION ${ZeroMQ_LIBRARY})
-
-add_library(libzmq-static STATIC IMPORTED ${PC_LIBZMQ_INCLUDE_DIRS})
-set_property(TARGET libzmq-static PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PC_LIBZMQ_INCLUDE_DIRS})
-set_property(TARGET libzmq-static PROPERTY IMPORTED_LOCATION ${ZeroMQ_STATIC_LIBRARY})
+include ( FindPackageHandleStandardArgs )
+# handle the QUIETLY and REQUIRED arguments and set ZMQ_FOUND to TRUE
+# if all listed variables are TRUE
+find_package_handle_standard_args ( ZeroMQ DEFAULT_MSG ZeroMQ_LIBRARIES ZeroMQ_INCLUDE_DIRS )


emscripten: add FIPS_EMSCRIPTEN_USE_CWRAP cmake option to export cwrap/ccall functions due to size-optimizations in latest emscripten incoming

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -47,6 +47,7 @@
 set(FIPS_POSIX 1)

 # tweakable options
+option(FIPS_EMSCRIPTEN_USE_CWRAP "emscripten: enable cwrap/ccall functions" OFF)
 option(FIPS_EMSCRIPTEN_USE_FS "emscripten: enable FS module" OFF)
 option(FIPS_EMSCRIPTEN_USE_DFE "emscripten: enable Duplicate Function Elimination" OFF)
 option(FIPS_EMSCRIPTEN_USE_WASM "emscripten: enable WebAssembly (experimental)" OFF)
@@ -80,6 +81,9 @@
 set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s ERROR_ON_UNDEFINED_SYMBOLS=1")
 set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s NO_EXIT_RUNTIME=1")

+if (FIPS_EMSCRIPTEN_USE_CWRAP)
+    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s \"EXTRA_EXPORTED_RUNTIME_METHODS=['cwrap','ccall']\"")
+endif()
 if (FIPS_PROFILING)
     set(EMSC_TRACING 1)
     set(EMSC_COMMON_FLAGS "${EMSC_COMMON_FLAGS} --tracing")


Update FW

Update FW

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "4cdecf221d5d4b0ab1821034a2f26b14c1bfe787")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "95ddfb1f9ac932b662f279e8714e16c322400ac9")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Force LLVM and CLING to have the same compiler of ROOT in all cases

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -593,6 +593,8 @@
                  -DLLVM_TARGETS_TO_BUILD=X86
                  -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
                  -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
+                 -DCMAKE_CC_COMPILER=${CMAKE_CC_COMPILER}
+                 -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
                  -DLLVM_NOCLING=ON
     )
     #---The list of libraires is optatined by runnning 'llvm-config --libs'
@@ -663,7 +665,9 @@
     CMAKE_ARGS -DCLING_PATH_TO_LLVM_SOURCE=${CMAKE_SOURCE_DIR}/interpreter/llvm/src
                -DCLING_PATH_TO_LLVM_BUILD=${CMAKE_BINARY_DIR}/LLVM-install
                -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-               -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
+               -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
+               -DCMAKE_CC_COMPILER=${CMAKE_CC_COMPILER}
+               -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
     )
     set(CLING_INCLUDE_DIR ${CMAKE_BINARY_DIR}/CLING-install/include)
     set(CLING_LIBRARIES ${CMAKE_BINARY_DIR}/CLING-install/lib/libclingInterpreter.a


Revert "Fix builtin_gsl on suse LEAP 42.2"

This reverts commit b16aa827eb0a3ec7815b8778a30ae01721893e0f.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -397,7 +397,7 @@
     set(gsl_version 2.1)
     message(STATUS "Downloading and building GSL version ${gsl_version}")
     foreach(l gsl gslcblas)
-      list(APPEND GSL_LIBRARIES ${CMAKE_BINARY_DIR}/${_LIBDIR_DEFAULT}/${CMAKE_STATIC_LIBRARY_PREFIX}${l}${CMAKE_STATIC_LIBRARY_SUFFIX})
+      list(APPEND GSL_LIBRARIES ${CMAKE_BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${l}${CMAKE_STATIC_LIBRARY_SUFFIX})
     endforeach()
     ExternalProject_Add(
       GSL