Add build now that ssh is working

Add build now that ssh is working

--- CI/prepare_superbuild.cmake
+++ CI/prepare_superbuild.cmake
@@ -147,12 +147,12 @@
 ####################################
 # Back to build

-# ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}"
-#             TARGET "OTB_DEPENDS"
-#             RETURN_VALUE _build_rv
-#             NUMBER_ERRORS _build_nb_err
-#             CAPTURE_CMAKE_ERROR _build_error
-#             )
+ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}"
+            TARGET "OTB_DEPENDS"
+            RETURN_VALUE _build_rv
+            NUMBER_ERRORS _build_nb_err
+            CAPTURE_CMAKE_ERROR _build_error
+            )

 if ( DEBUG )
   message( "Status for build:" )
@@ -161,10 +161,10 @@
   message("_build_error=${_build_error}")
 endif()

-# if ( ( NOT ${_build_nb_err} EQUAL 0 ) OR ( ${_build_error} EQUAL -1 ))
-#   ctest_submit()
-#   message( FATAL_ERROR "An error occurs during ctest_build.")
-# endif()
+if ( ( NOT ${_build_nb_err} EQUAL 0 ) OR ( ${_build_error} EQUAL -1 ))
+  ctest_submit()
+  message( FATAL_ERROR "An error occurs during ctest_build.")
+endif()

 ctest_submit()

@@ -198,7 +198,7 @@
 # -F /dev/null so the agent is not taking a default file ~/.ssh/..
 execute_process(
   COMMAND ${GIT} "config" "core.sshCommand"
-  "ssh -o StrictHostKeyChecking=no -F /dev/null"
+  "ssh -o StrictHostKeyChecking=no"
   WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
   RESULT_VARIABLE ssh_res
   OUTPUT_VARIABLE ssh_out
@@ -346,19 +346,19 @@
 # push
 # we should be able to do a simple : git push origin $BRANCH_NAME
 # execute_process(
-#   COMMAND ${GIT} "push" "${REPOSITORY_GIT_URL}" "${BRANCH_NAME}"
-#   WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
-#   RESULT_VARIABLE push_res
-#   OUTPUT_VARIABLE push_out
-#   ERROR_VARIABLE push_err
-#   )
-
-# if ( DEBUG )
-#   message( "Step 7: push")
-#   message( "push_res = ${push_res}" )
-#   message( "push_out = ${push_out}" )
-#   message( "push_err = ${push_err}" )
-# endif()
+  COMMAND ${GIT} "push" "${REPOSITORY_GIT_URL}" "${BRANCH_NAME}"
+  WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
+  RESULT_VARIABLE push_res
+  OUTPUT_VARIABLE push_out
+  ERROR_VARIABLE push_err
+  )
+
+if ( DEBUG )
+  message( "Step 7: push")
+  message( "push_res = ${push_res}" )
+  message( "push_out = ${push_out}" )
+  message( "push_err = ${push_err}" )
+endif()

 # MacOS cleanup
 if(APPLE)


COMP: Do not enable remote module examples when building Doxygen docs

With CMake 3.20.4, this causes some sort of cache / module enablement
recursion issue resulting in the backtrace:

  CMake Error at CMake/ITKModuleAPI.cmake:78 (message):
    No such module: "ITKIOPNG"
  Call Stack (most recent call first):
    CMake/ITKModuleAPI.cmake:31 (itk_module_load)
    CMake/ITKModuleAPI.cmake:129 (_itk_module_config_recurse)
    /home/kitware/Dashboards/Tests/ITK-build/CMakeTmp/ITKConfig.cmake:47 (itk_module_config)
    Modules/Remote/AnisotropicDiffusionLBR/examples/CMakeLists.txt:5 (find_packag

We do not need the remote module examples for the Doxygen build, so do
not enable them by default in this case.

--- CMake/ITKModuleMacros.cmake
+++ CMake/ITKModuleMacros.cmake
@@ -337,7 +337,7 @@
   cmake_dependent_option(Module_${itk-module}_BUILD_EXAMPLES
     "Build the examples for Module_${itk-module}"
     ON
-    "BUILD_EXAMPLES OR ITK_BUILD_EXAMPLES;Module_${itk-module}"
+    "BUILD_EXAMPLES OR ITK_BUILD_EXAMPLES;Module_${itk-module};NOT ITK_BUILD_DOCUMENTATION"
     OFF
   )
   if(Module_${itk-module}_BUILD_EXAMPLES)


Update FindZLIB.cmake to version 2.6.1 + add MSYS path.

--- CMakeModules/FindZLIB.cmake
+++ CMakeModules/FindZLIB.cmake
@@ -1,3 +1,7 @@
+#
+# From CMake 2.6.1 + some path changes
+#
+
 # - Find zlib
 # Find the native ZLIB includes and library
 #
@@ -16,38 +20,20 @@
   SET(ZLIB_FIND_QUIETLY TRUE)
 ENDIF (ZLIB_INCLUDE_DIR)

-FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
-  /usr/local/include
-  /usr/include
-  ${ZLIB_DIR_SEARCH}/local/include
-)
+FIND_PATH(ZLIB_INCLUDE_DIR zlib.h PATHS ${ZLIB_DIR_SEARCH}/local/include)

 SET(ZLIB_NAMES z zlib zdll)
-FIND_LIBRARY(ZLIB_LIBRARY
-  NAMES ${ZLIB_NAMES}
-  PATHS /usr/lib /usr/local/lib ${ZLIB_DIR_SEARCH}/local/lib
-)
+FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} PATHS ${ZLIB_DIR_SEARCH}/local/lib)

-IF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
-   SET(ZLIB_FOUND TRUE)
-    SET( ZLIB_LIBRARIES ${ZLIB_LIBRARY} )
-ELSE (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
-   SET(ZLIB_FOUND FALSE)
-   SET( ZLIB_LIBRARIES )
-ENDIF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
+# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_LIBRARY ZLIB_INCLUDE_DIR)

-IF (ZLIB_FOUND)
-   IF (NOT ZLIB_FIND_QUIETLY)
-      MESSAGE(STATUS "Found ZLIB: ${ZLIB_LIBRARY}")
-   ENDIF (NOT ZLIB_FIND_QUIETLY)
-ELSE (ZLIB_FOUND)
-   IF (ZLIB_FIND_REQUIRED)
-      MESSAGE(STATUS "Looked for Z libraries named ${ZLIBS_NAMES}.")
-      MESSAGE(FATAL_ERROR "Could NOT find z library")
-   ENDIF (ZLIB_FIND_REQUIRED)
-ENDIF (ZLIB_FOUND)
+IF(ZLIB_FOUND)
+  SET( ZLIB_LIBRARIES ${ZLIB_LIBRARY} )
+ELSE(ZLIB_FOUND)
+  SET( ZLIB_LIBRARIES )
+ENDIF(ZLIB_FOUND)

-MARK_AS_ADVANCED(
-  ZLIB_LIBRARY
-  ZLIB_INCLUDE_DIR
-  )
+MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR )


HDFS-14394: Add -std=c99 / -std=gnu99 to libhdfs compile flags

Signed-off-by: Todd Lipcon <2c763d726a8c2f6afda9be7e0e56a2caa6bb5e6b@apache.org>

--- hadoop-common-project/hadoop-common/HadoopCommon.cmake
+++ hadoop-common-project/hadoop-common/HadoopCommon.cmake
@@ -193,7 +193,6 @@
 elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
     # Solaris flags. 64-bit compilation is mandatory, and is checked earlier.
     hadoop_add_compiler_flags("-m64 -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS")
-    set(CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")
     set(CMAKE_CXX_FLAGS "-std=gnu++98 ${CMAKE_CXX_FLAGS}")
     hadoop_add_linker_flags("-m64")

@@ -211,3 +210,6 @@
         message(FATAL_ERROR "Unrecognised CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR}")
     endif()
 endif()
+
+# Set GNU99 as the C standard to use
+set(CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")


BUG: /share/SHARK -> /share/Shark

BUG: /share/SHARK -> /share/Shark

--- SuperBuild/CMake/External_shark.cmake
+++ SuperBuild/CMake/External_shark.cmake
@@ -26,4 +26,4 @@
   CMAKE_COMMAND ${SB_CMAKE_COMMAND}
   )

-set(_SB_SHARK_DIR ${SB_INSTALL_PREFIX}/share/SHARK)
+set(_SB_SHARK_DIR ${SB_INSTALL_PREFIX}/share/Shark)


STYLE: remove tabs

STYLE: remove tabs

--- CMake/FindFFMPEG.cmake
+++ CMake/FindFFMPEG.cmake
@@ -122,9 +122,9 @@
           ${FFMPEG_avformat_LIBRARY}
           ${FFMPEG_avutil_LIBRARY}
           )
-
-        # swscale is always a part of newer ffmpeg distros
-		IF(FFMPEG_swscale_LIBRARY)
+
+        # swscale is always a part of newer ffmpeg distros
+        IF(FFMPEG_swscale_LIBRARY)
           LIST(APPEND FFMPEG_BASIC_LIBRARIES ${FFMPEG_swscale_LIBRARY})
         ENDIF(FFMPEG_swscale_LIBRARY)


update

update

--- cmake/DCS08961_SetupVariables.cmake
+++ cmake/DCS08961_SetupVariables.cmake
@@ -37,7 +37,7 @@
   set(GLM_ROOT_DIR "C:/Tools/glm/glm-git")
 elseif(UNIX)
   set(GLI_ROOT_DIR "~/Projects/others/gli-git")
-  set(GLM_ROOT_DIR "~/Projects/others/glm-git")
+  set(GLM_ROOT_DIR "~/Projects/others/glm-regnirpsj-git")
 endif()

 # OGLplus


Update FindHinnantDate.cmake script.

Update FindHinnantDate.cmake script.

--- cmake/Modules/FindHinnantDate.cmake
+++ cmake/Modules/FindHinnantDate.cmake
@@ -13,7 +13,7 @@
 #
 # and the following imported targets::
 #
-#   HinnantDate::Date   - The target to use date.h
+#   HinnantDate::Date   - The target to use date/date.h
 #
 # You can set HinnantDate_ROOT_DIR as hint to the location of the library.
 #
@@ -53,7 +53,7 @@
 Maybe you need to adjust the search paths or HinnantDate_ROOT_DIR.")

 find_file(HinnantDate_INCLUDE_FILE
-    date.h date/date.h include/date/date.h
+    date/date.h include/date/date.h
     HINTS
       ${HinnantDate_ROOT_DIR}
       ${HinnantDate_ROOT_DIR}/include
@@ -72,7 +72,10 @@
         unset(HinnantDate_INCLUDE_FILE CACHE)
     else()
         # Check succeeded, create target
-        get_filename_component(HinnantDate_INCLUDE_DIR "${HinnantDate_INCLUDE_FILE}" DIRECTORY CACHE)
+        # remove filename
+        get_filename_component(HinnantDate_INCLUDE_DIR "${HinnantDate_INCLUDE_FILE}" DIRECTORY)
+        # remove date dir
+        get_filename_component(HinnantDate_INCLUDE_DIR "${HinnantDate_INCLUDE_DIR}" DIRECTORY)
         mark_as_advanced(HinnantDate_INCLUDE_DIR)
         set(HinnantDate_ROOT_DIR "${HinnantDate_INCLUDE_DIR}")
         unset(HinnantDate_NOT_FOUND_MESSAGE)


Fix detection of 32bit ARM builds on Aarch64

It is perfectly possible to compile ARM binaries on Aarch64. Generalize
the code to no only swap X86 with X86_64, but also ARM and AARCH64.

Signed-off-by: Stefan Brüns <b980df664a7347f0704c962d2fe252e14402e921@rwth-aachen.de>

--- cmake/OpenCVDetectCXXCompiler.cmake
+++ cmake/OpenCVDetectCXXCompiler.cmake
@@ -83,6 +83,7 @@
   endif()
 endif()

+message(STATUS "Detected processor: ${CMAKE_SYSTEM_PROCESSOR}")
 if(MSVC64 OR MINGW64)
   set(X86_64 1)
 elseif(MINGW OR (MSVC AND NOT CMAKE_CROSSCOMPILING))
@@ -101,11 +102,17 @@
   set(PPC64 1)
 endif()

-# Workaround for 32-bit operating systems on 64-bit x86_64 processor
-if(X86_64 AND CMAKE_SIZEOF_VOID_P EQUAL 4 AND NOT FORCE_X86_64)
-  message(STATUS "sizeof(void) = 4 on x86 / x86_64 processor. Assume 32-bit compilation mode (X86=1)")
-  unset(X86_64)
-  set(X86 1)
+# Workaround for 32-bit operating systems on x86_64/aarch64 processor
+if(CMAKE_SIZEOF_VOID_P EQUAL 4 AND NOT FORCE_X86_64)
+  message(STATUS "sizeof(void) = 4 on 64 bit processor. Assume 32-bit compilation mode")
+  if (X86_64)
+    unset(X86_64)
+    set(X86 1)
+  endif()
+  if (AARCH64)
+    unset(AARCH64)
+    set(ARM 1)
+  endif()
 endif()

 # Similar code exists in OpenCVConfig.cmake


install_package.cmake work n progress

install_package.cmake work n progress

--- cmake_modules/install_package.cmake
+++ cmake_modules/install_package.cmake
@@ -10,7 +10,7 @@

 #
 # install_package - Takes a package name and the following optional named arguments:
-#  PKG_NAME <name of the package for pkg-config>
+#  PKG_NAME <name of the package for pkg-config>, usually the same as ${PROJECT_NAME}
 #  LIB_NAME <name of a library to build, if any>
 #  VERSION <version>
 #  INSTALL_HEADERS <header files to install, if any>
@@ -49,6 +49,7 @@
     "${ARGN}"
     )

+
   # clean things up
   if( PACKAGE_LINK_DIRS )
     list( REMOVE_DUPLICATES PACKAGE_LINK_DIRS )
@@ -68,7 +69,6 @@
     list( APPEND PACKAGE_LINK_LIBS ${CMAKE_INSTALL_PREFIX}/lib/${_lib} )
   endif()

-
   # construct Cflags arguments for pkg-config file
   string( CONCAT PACKAGE_CFLAGS ${PACKAGE_CFLAGS} ${CMAKE_C_FLAGS} )
   foreach(var IN LISTS PACKAGE_INCLUDE_DIRS )
@@ -79,7 +79,7 @@
   foreach(var IN LISTS PACKAGE_LINK_DIRS )
     string( CONCAT PACKAGE_LIBS ${PACKAGE_LIBS} " -L${var}" )
   endforeach()
-  foreach(var IN LISTS PACKAGE_LIBS )
+  foreach(var IN LISTS PACKAGE_LINK_LIBS )
     if( EXISTS ${var} OR  ${var} MATCHES "-framework*" )
       string( CONCAT PACKAGE_LIBS ${PACKAGE_LIBS} " ${var}" )
     else() # assume it's just a -l call??
@@ -116,7 +116,42 @@
   # _installed_ files.
   configure_file( ${modules_dir}/FindPackage.cmake.in Find${PACKAGE_PKG_NAME}.cmake @ONLY )
   install( FILES ${CMAKE_CURRENT_BINARY_DIR}/Find${PACKAGE_PKG_NAME}.cmake
-       DESTINATION ${CMAKE_INSTALL_PREFIX}/share/cmake/Modules )
+       DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake/${PACKAGE_PKG_NAME}/ )
+
+  #######################################################
+  # Export library for easy inclusion from other cmake projects. APPEND allows
+  # call to function even as subdirectory of larger project.
+  FILE(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake")
+  export( TARGETS ${LIBRARY_NAME}
+      APPEND FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake" )
+#  install( EXPORT ${PROJECT_NAME}Targets DESTINATION ${CMAKECONFIG_INSTALL_DIR} )
+#  install(TARGETS ${LIBRARY_NAME}
+#      EXPORT ${PROJECT_NAME}Targets DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
+#      )
+
+  # Version information.  So find_package( XXX version ) will work.
+  configure_file( ${CMAKE_SOURCE_DIR}/cmake_modules/PackageConfigVersion.cmake.in
+      "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" @ONLY )
+
+  # Build tree config.  So some folks can use the built package (e.g., any of our
+  # own examples or applcations in this project.
+  configure_file( ${CMAKE_SOURCE_DIR}/cmake_modules/PackageConfig.cmake.in
+      ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake @ONLY )
+
+  #  # Install tree config.  NB we DO NOT use this.  We install using brew or
+  #  set( EXPORT_LIB_INC_DIR ${LIB_INC_DIR} )
+  #  pkg-config.
+  #  set( EXPORT_LIB_INC_DIR "\${PROJECT_CMAKE_DIR}/${REL_INCLUDE_DIR}" )
+  #  configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in
+  #      ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PROJECT_NAME}Config.cmake @ONLY )
+
+  # Add package to CMake package registery for use from the build tree. RISKY.
+  option( EXPORT_${PROJECT_NAME}
+      "Should the ${PROJECT_NAME} package be exported for use by other software" OFF )
+  if( EXPORT_${PROJECT_NAME} )
+    export( PACKAGE ${PROJECT_NAME} )
+  endif()
+

 endfunction()


boards: arm: nrf5340pdk: add deprecation warning for old board names

Add a deprecation warning for nrf5340 PDK when the old name,
nrf5340_dk_nrf5340, is used instead of the new board name.
For nRF5340 SoC: do this for both secure and non-secure board
targets, and for both Application and Network MCU.

Signed-off-by: Ioannis Glaropoulos <5921cc8bab7e1d4329f52fd8f6268f9692e3de80@nordicsemi.no>

--- boards/deprecated.cmake
+++ boards/deprecated.cmake
@@ -17,6 +17,9 @@
 set(nrf52840_pca10056_DEPRECATED nrf52840dk_nrf52840)
 set(nrf52840_pca10059_DEPRECATED nrf52840dongle_nrf52840)
 set(nrf52811_pca10056_DEPRECATED nrf52840dk_nrf52811)
+set(nrf5340_dk_nrf5340_cpuapp_DEPRECATED nrf5340pdk_nrf5340_cpuapp)
+set(nrf5340_dk_nrf5340_cpuappns_DEPRECATED nrf5340pdk_nrf5340_cpuappns)
+set(nrf5340_dk_nrf5340_cpunet_DEPRECATED nrf5340pdk_nrf5340_cpunet)
 set(nrf9160_pca10090_DEPRECATED nrf9160dk_nrf9160)
 set(nrf9160_pca10090ns_DEPRECATED nrf9160dk_nrf9160ns)
 set(nrf52840_pca10090_DEPRECATED nrf9160dk_nrf52840)


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

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

--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -71,7 +71,7 @@
 Comment[en_GB]=Phonon VLC backend
 Comment[es]=Motor VLC para Phonon
 Comment[et]=Phononi VLC taustaprogramm
-Comment[eu]=Phonon-en VLC bizkarraldekoa
+Comment[eu]=Phonon VLC bizkarraldekoa
 Comment[fa]=پسانه‌ی وی‌ال‌سی برای فنون (Phonon VLC backend)
 Comment[fi]=Phonon VLC -taustajärjestelmä
 Comment[fr]=Module VLC pour Phonon


add licensing comment

add licensing comment

--- test/EnableMaxWarnings.cmake
+++ test/EnableMaxWarnings.cmake
@@ -1,3 +1,5 @@
+# --- This file is distributed under the MIT Open Source License, as detailed
+# in the file "LICENSE.TXT" in the root of this repository ---

 macro(EnableMaxWarnings target)


forgot to commit

forgot to commit

--- cmake/macros.cmake
+++ cmake/macros.cmake
@@ -17,9 +17,9 @@
 FUNCTION(ADD_CAP_PYTHON_TEST TEST_NAME)
     ADD_CUSTOM_COMMAND(
         OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}.py
-        DEPENDS ${PROJECT_SOURCE_DIR}/python/${TEST_NAME}.py
+        DEPENDS ${CMAKE_SOURCE_DIR}/python/test/${TEST_NAME}.py
         COMMAND ${CMAKE_COMMAND}
-        ARGS -E copy ${PROJECT_SOURCE_DIR}/python/${TEST_NAME}.py ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}.py
+        ARGS -E copy ${CMAKE_SOURCE_DIR}/python/source/${TEST_NAME}.py ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}.py
         COMMENT "Copying ${TEST_NAME}.py"
     )
     ADD_CUSTOM_TARGET(


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

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


boards: nrf52840_papyr: support nrfjprog flash runner

Add JLink via nrfjprog as an alternative to Black Magic.

Signed-off-by: Peter A. Bigot <650538893330be855f76604594b4820eb226769e@pabigot.com>

--- boards/arm/nrf52840_papyr/board.cmake
+++ boards/arm/nrf52840_papyr/board.cmake
@@ -1,3 +1,5 @@
 # SPDX-License-Identifier: Apache-2.0

+board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
 include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
+include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)


Fix git revision extraction for non-git and submodule builds (closes #41)

--- cmake/GetGitRevisionDescription.cmake
+++ cmake/GetGitRevisionDescription.cmake
@@ -41,18 +41,31 @@

 function(get_git_head_revision _refspecvar _hashvar)
     set(GIT_PARENT_DIR "${CMAKE_SOURCE_DIR}")
-    set(GIT_DIR "${GIT_PARENT_DIR}/.git")
-    while(NOT EXISTS "${GIT_DIR}/HEAD")  # .git dir not found, search parent directories
+
+    while(NOT EXISTS "${GIT_PARENT_DIR}/.git")  # .git dir not found, search parent directories
         set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}")
         get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} DIRECTORY)
         if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT)
             # We have reached the root directory, we are not in git
-            set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
-            set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
+            set(${_refspecvar} "000000000000" PARENT_SCOPE)
+            set(${_hashvar} "000000000000" PARENT_SCOPE)
             return()
         endif()
-        set(GIT_DIR "${GIT_PARENT_DIR}/.git")
     endwhile()
+
+    if (IS_DIRECTORY "${GIT_PARENT_DIR}/.git")
+	# common case
+	set(GIT_DIR "${GIT_PARENT_DIR}/.git")
+    else()
+	# submodule case
+	file(STRINGS "${GIT_PARENT_DIR}/.git" contents LIMIT_COUNT 1)
+	message(STATUS "${contents}")
+	string(SUBSTRING "${contents}" 8 -1 SUBMODULE_GIT_DIR)
+	message(STATUS "${SUBMODULE_GIT_DIR}")
+	set(GIT_DIR "${GIT_PARENT_DIR}/${SUBMODULE_GIT_DIR}")
+	message(STATUS "${GIT_DIR}")
+    endif()
+
     set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data")
     if(NOT EXISTS "${GIT_DATA}")
         file(MAKE_DIRECTORY "${GIT_DATA}")


- Remove printing from AndroidApkBuild.cmake

--- cmake/Packaging/AndroidApkBuild.cmake
+++ cmake/Packaging/AndroidApkBuild.cmake
@@ -54,8 +54,6 @@
         Dependency_Libs
         Icon_File )

-    message ( "-- Generating ${Pkg_Name} (${Api_Arch})" )
-
     set ( ANDROID_PACKAGE_NAME ${Pkg_Name} )

     # For SDL2-enabled programs
@@ -298,21 +296,18 @@
             )

         if(ANDROID_NATIVE_API_LEVEL GREATER 19)
-            message ( "-- Using Android Lollipop Java code" )
             configure_file (
                 "${ANDROID_PROJECT_CONFIG_DIR}/sdl2/SDLActivity.java.lollipop.in"
                 "${BUILD_OUTDIR}/src/org/libsdl/app/SDLActivity.java"
                 @ONLY
                 )
         elseif(ANDROID_NATIVE_API_LEVEL EQUAL 19)
-            message ( "-- Using Android Kitkat Java code" )
             configure_file (
                 "${ANDROID_PROJECT_CONFIG_DIR}/sdl2/SDLActivity.java.kitkat.in"
                 "${BUILD_OUTDIR}/src/org/libsdl/app/SDLActivity.java"
                 @ONLY
                 )
         else()
-            message ( "-- Using Android legacy Java code" )
             configure_file (
                 "${ANDROID_PROJECT_CONFIG_DIR}/sdl2/SDLActivity.java.in"
                 "${BUILD_OUTDIR}/src/org/libsdl/app/SDLActivity.java"


Fix for pkg config name (when different from component) (#55)

--- cmake/layers/install_pkg_config.cmake
+++ cmake/layers/install_pkg_config.cmake
@@ -1,4 +1,5 @@
 # No include guard - may be reloaded
+include(bde_pkgconfig_utils)

 bde_prefixed_override(pkgconfig uor_install)
 function(pkgconfig_uor_install uor listFile installOpts)
@@ -42,14 +43,17 @@

     bde_struct_get_field(pc_depends ${uor} DEPENDS)
     string(REPLACE ";" " " uor_pc_depends "${pc_depends}")
+
+    bde_uor_to_pkgconfig_name(pkgconfig_name ${component})
+
     configure_file(
         ${pkgConfigFile}
-        "${PROJECT_BINARY_DIR}/${component}.pc"
+        "${PROJECT_BINARY_DIR}/${pkgconfig_name}.pc"
         @ONLY
     )

     install(
-        FILES "${PROJECT_BINARY_DIR}/${component}.pc"
+        FILES "${PROJECT_BINARY_DIR}/${pkgconfig_name}.pc"
         DESTINATION "${pkgConfigInstallDir}"
         COMPONENT "${component}-pkgconfig"
     )


updated boost to 1.65.1 for Gadgetron

updated boost to 1.65.1 for Gadgetron

--- version_config.cmake
+++ version_config.cmake
@@ -22,10 +22,11 @@
 #=========================================================================

 ## BOOST
-set(Boost_VERSION 1.64.0)
-set(Boost_REQUIRED_VERSION 1.64.0)
-set(Boost_URL http://downloads.sourceforge.net/project/boost/boost/1.64.0/boost_1_64_0.zip)
-set(Boost_MD5 36093e4018aecd5b0e31e80457ac5fc1)
+# Gadgetron needs 1.65
+set(Boost_VERSION 1.65.1)
+set(Boost_REQUIRED_VERSION 1.65.1)
+set(Boost_URL http://downloads.sourceforge.net/project/boost/boost/1.65.1/boost_1_65_1.zip)
+set(Boost_MD5 9824a7a3e25c9d4fdf2def07bce8651c)

 ## Armadillo
 set(Armadillo_URL   https://downloads.sourceforge.net/project/arma/armadillo-7.800.2.tar.xz)
@@ -94,12 +95,6 @@

 set(DEFAULT_SIRF_URL https://github.com/CCPPETMR/SIRF )
 if (DEVEL_BUILD)
-
-  # Gadgetron needs 1.65
-  set(Boost_VERSION 1.65.1)
-  set(Boost_REQUIRED_VERSION 1.65.1)
-  set(Boost_URL http://downloads.sourceforge.net/project/boost/boost/1.65.1/boost_1_65_1.zip)
-  set(Boost_MD5 9824a7a3e25c9d4fdf2def07bce8651c)

   set (DEFAULT_SIRF_TAG origin/master)
   ## STIR


set DEVEL_BUILD of Gadgetron and ISMRMRD to stable version

As opposed to going for `master`, pick a recent release. This prevents us
being sensitive to Gadgetron bugs that we don't really want to see.

Closes #134

--- version_config.cmake
+++ version_config.cmake
@@ -117,7 +117,8 @@

   ## Gadgetron
   set(DEFAULT_Gadgetron_URL https://github.com/gadgetron/gadgetron )
-  set(DEFAULT_Gadgetron_TAG origin/master)
+  #set(DEFAULT_Gadgetron_TAG origin/master)
+  set (DEFAULT_Gadgetron_TAG v3.17.0)

   ## siemens_to_ismrmrd
   set(DEFAULT_siemens_to_ismrmrd_URL https://github.com/ismrmrd/siemens_to_ismrmrd )
@@ -125,7 +126,8 @@

   ## ISMRMRD
   set(DEFAULT_ISMRMRD_URL https://github.com/ismrmrd/ismrmrd )
-  set(DEFAULT_ISMRMRD_TAG origin/master)
+  #set(DEFAULT_ISMRMRD_TAG origin/master)
+  set (DEFAULT_ISMRMRD_TAG v1.4.0)

   ## petmr-rd-tools
   set(DEFAULT_petmr_rd_tools_URL https://github.com/UCL/petmr-rd-tools )


libmfx.pc: add additional libraries required to link to libmfx

In order for other projects to link to libmfx, -lstdc++ and
-ldl are required.  Thus, specify this in the package config
spec file.

Signed-off-by: U. Artie Eoff <32aece0d55055227b44d04b7d0051cf3d04ee871@intel.com>

--- api/opensource/mfx_dispatch/pkg-config.pc.cmake
+++ api/opensource/mfx_dispatch/pkg-config.pc.cmake
@@ -5,5 +5,5 @@
 prefix=@CMAKE_INSTALL_PREFIX@
 libdir=@CMAKE_INSTALL_FULL_LIBDIR@
 includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
-Libs: -L${libdir} -lmfx
+Libs: -L${libdir} -lmfx -lstdc++ -ldl
 Cflags: -I${includedir}


adjust config for FOLLY_SUPPLY_MISSING_INT128_TRAITS

Summary:
* remove the redundant `!defined(_WIN32)` condition;
* llvm added traits for (u)int128 in
  https://reviews.llvm.org/D2917; and std::hash in
  https://reviews.llvm.org/rL266587.

Reviewed By: nbronson

Differential Revision: D7111138

fbshipit-source-id: 91a05354846575677eddd48c8b8f4e05c53b01cb

--- CMake/FollyConfigChecks.cmake
+++ CMake/FollyConfigChecks.cmake
@@ -123,11 +123,16 @@
 if (NOT INT128_SIZE STREQUAL "")
   set(FOLLY_HAVE_INT128_T ON)
   check_cxx_source_compiles("
+    #include <functional>
     #include <type_traits>
+    #include <utility>
     static_assert(
       ::std::is_same<::std::make_signed<unsigned __int128>::type,
                      __int128>::value,
       \"signed form of 'unsigned __uint128' must be '__int128'.\");
+    static_assert(
+        sizeof(::std::hash<__int128>{}(0)) > 0, \"std::hash<__int128> is
+        disabled.\");
     int main() { return 0; }"
     HAVE_INT128_TRAITS
   )


[OGRE-201] Update FindOgre.cmake after OGRE-181

--HG--
branch : v1-9

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -559,6 +559,7 @@
   Media
   media
   share/OGRE/media
+  share/OGRE/Media
 )

 clear_if_changed(OGRE_PREFIX_WATCH OGRE_MEDIA_DIR)


fix empty OGRE_FRAMEWORK_INCLUDES variable

--HG--
branch : v1-9

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -240,7 +240,7 @@
   set(OGRE_LIBRARY "NOTFOUND")
 endif ()

-if(${OGRE_FRAMEWORK_INCLUDES} STREQUAL NOTFOUND)
+if("${OGRE_FRAMEWORK_INCLUDES}" STREQUAL NOTFOUND)
   unset(OGRE_FRAMEWORK_INCLUDES CACHE)
 endif()
 set(OGRE_INCLUDE_DIR ${OGRE_CONFIG_INCLUDE_DIR} ${OGRE_INCLUDE_DIR} ${OGRE_FRAMEWORK_INCLUDES})


CMake: Make FindOgre script useable on OSX with static builds

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -68,14 +68,13 @@
   set(OGRE_LIB_SUFFIX "")
 endif ()

-
-if(APPLE AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
+if(APPLE AND NOT OGRE_STATIC)
 	set(OGRE_LIBRARY_NAMES "Ogre${OGRE_LIB_SUFFIX}")
 else()
     set(OGRE_LIBRARY_NAMES "OgreMain${OGRE_LIB_SUFFIX}")
 endif()
 get_debug_names(OGRE_LIBRARY_NAMES)
-
+
 # construct search paths from environmental hints and
 # OS specific guesses
 if (WIN32)
@@ -145,7 +144,7 @@
 set(OGRE_PREFIX_WATCH ${OGRE_PREFIX_PATH} ${OGRE_PREFIX_SOURCE} ${OGRE_PREFIX_BUILD})
 clear_if_changed(OGRE_PREFIX_WATCH ${OGRE_RESET_VARS})

-if(NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
+if(NOT OGRE_STATIC)
 	# try to locate Ogre via pkg-config
 	use_pkgconfig(OGRE_PKGC "OGRE${OGRE_LIB_SUFFIX}")

@@ -383,11 +382,9 @@
 # look for Overlay component
 ogre_find_component(Overlay OgreOverlaySystem.h)

-
 #########################################################
 # Find Ogre plugins
-#########################################################
-
+#########################################################
 macro(ogre_find_plugin PLUGIN HEADER)
   # On Unix, the plugins might have no prefix
   if (CMAKE_FIND_LIBRARY_PREFIXES)
@@ -411,9 +408,9 @@
   get_debug_names(OGRE_${PLUGIN}_LIBRARY_NAMES)
   set(OGRE_${PLUGIN}_LIBRARY_FWK ${OGRE_LIBRARY_FWK})
   find_library(OGRE_${PLUGIN}_LIBRARY_REL NAMES ${OGRE_${PLUGIN}_LIBRARY_NAMES}
-    HINTS ${OGRE_LIBRARY_DIRS} PATH_SUFFIXES "" OGRE opt release release/opt relwithdebinfo relwithdebinfo/opt minsizerel minsizerel/opt)
+    HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} PATH_SUFFIXES "" OGRE opt release release/opt relwithdebinfo relwithdebinfo/opt minsizerel minsizerel/opt)
   find_library(OGRE_${PLUGIN}_LIBRARY_DBG NAMES ${OGRE_${PLUGIN}_LIBRARY_NAMES_DBG}
-    HINTS ${OGRE_LIBRARY_DIRS} PATH_SUFFIXES "" OGRE opt debug debug/opt)
+    HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} PATH_SUFFIXES "" OGRE opt debug debug/opt)
   make_library_set(OGRE_${PLUGIN}_LIBRARY)

   if (OGRE_${PLUGIN}_LIBRARY OR OGRE_${PLUGIN}_INCLUDE_DIR)
@@ -446,9 +443,9 @@
           PATH_SUFFIXES "" bin bin/debug debug)
       elseif (UNIX)
         get_filename_component(OGRE_PLUGIN_DIR_TMP ${OGRE_${PLUGIN}_LIBRARY_REL} PATH)
-        set(OGRE_PLUGIN_DIR_REL ${OGRE_PLUGIN_DIR_TMP} CACHE STRING "Ogre plugin dir (release)")
-        get_filename_component(OGRE_PLUGIN_DIR_TMP ${OGRE_${PLUGIN}_LIBRARY_DBG} PATH)
-        set(OGRE_PLUGIN_DIR_DBG ${OGRE_PLUGIN_DIR_TMP} CACHE STRING "Ogre plugin dir (debug)")
+        set(OGRE_PLUGIN_DIR_REL ${OGRE_PLUGIN_DIR_TMP} CACHE STRING "Ogre plugin dir (release)" FORCE)
+	    get_filename_component(OGRE_PLUGIN_DIR_TMP ${OGRE_${PLUGIN}_LIBRARY_DBG} PATH)
+        set(OGRE_PLUGIN_DIR_DBG ${OGRE_PLUGIN_DIR_TMP} CACHE STRING "Ogre plugin dir (debug)" FORCE)
       endif ()
     endif ()

@@ -479,7 +476,7 @@
 ogre_find_plugin(RenderSystem_GLES2 OgreGLES2RenderSystem.h RenderSystems/GLES2/include)
 ogre_find_plugin(RenderSystem_Direct3D9 OgreD3D9RenderSystem.h RenderSystems/Direct3D9/include)
 ogre_find_plugin(RenderSystem_Direct3D11 OgreD3D11RenderSystem.h RenderSystems/Direct3D11/include)
-
+
 if (OGRE_STATIC)
   # check if dependencies for plugins are met
   if (NOT DirectX_FOUND)


vtkPythonPackages: use IN LISTS syntax in foreach

Change-Id: I1f8d50890be7c948b8c2cec50cae5a546cadfec5

--- CMake/vtkPythonPackages.cmake
+++ CMake/vtkPythonPackages.cmake
@@ -17,7 +17,7 @@
   set (label "Copying files")

   set (doing "")
-  foreach (arg ${ARGN})
+  foreach (arg IN LISTS ARGN)
     if (arg MATCHES "^(DESTINATION|REGEX|OUTPUT|LABEL)$")
       set (doing "${arg}")
     elseif ("${doing}" STREQUAL "DESTINATION")


Updated mitk-data hash tag

Updated mitk-data hash tag

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -12,7 +12,7 @@
 set(MITK-Data_DEPENDS ${proj})

 if(BUILD_TESTING)
-  set(revision_tag f6201a82) # first 8 characters of hash-tag
+  set(revision_tag 4752c143) # first 8 characters of hash-tag
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


Don't use -std compiler flag if CMAKE_CXX_STANDARD is specified (#366)

--- support/cmake/cxx11.cmake
+++ support/cmake/cxx11.cmake
@@ -37,6 +37,11 @@
   endif ()
 endif ()

+if (CMAKE_CXX_STANDARD)
+  # Don't use -std compiler flag if CMAKE_CXX_STANDARD is specified.
+  set(CPP11_FLAG )
+endif ()
+
 set(CMAKE_REQUIRED_FLAGS ${CPP11_FLAG})

 # Check if variadic templates are working and not affected by GCC bug 39653:


Warning flags block MSVC

Warning flags block MSVC

--- tools/cmake/FindOptions.cmake
+++ tools/cmake/FindOptions.cmake
@@ -37,8 +37,9 @@
 set(CXXSTD_FLAGS "-std=c++11 -fPIC")
 endif()

-set(WARNING_FLAGS "-Wall -Wextra -Wsign-compare  -Wshadow  -Wwrite-strings  -Wpointer-arith -Winit-self ")
+set(WARNING_FLAGS "-Wall")
 if(NOT MSVC)
+set(WARNING_FLAGS "${WARNING_FLAGS} -Wextra -Wsign-compare -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self")
 set(CMAKE_C_FLAGS_DEBUG "-ggdb")
 set(CMAKE_C_FLAGS_RELEASE "-O3")
 endif()


fix: mirtk_target_dependencies DLL path check [CMake]

--- CMake/Modules/mirtkTargetDependencies.cmake
+++ CMake/Modules/mirtkTargetDependencies.cmake
@@ -65,10 +65,10 @@
           get_filename_component(dep_path "${dep_name}" PATH)
           if (CMAKE_HOST_WIN32)
             get_filename_component(dll_name "${dep_name}" NAME_WE)
-            string(REPLACE "/lib/" "/bin/" dll_path "${dep_path}")
+            string(REPLACE "/lib/" "/bin/" dll_path "${dep_path}/")
             string(REPLACE "/Lib/" "/Bin/" dll_path "${dll_path}")
-            if (EXISTS "${dll_path}/${dll_name}.dll")
-              set(dep_path "${dll_path}")
+            if (EXISTS "${dll_path}${dll_name}.dll")
+              string(REGEX REPLACE "/+$" "" dep_path "${dll_path}")
             endif ()
           endif ()
           list(APPEND ldpath "${dep_path}")


Dont show "-Debug" on flatpak

Dont show "-Debug" on flatpak

Fixes https://github.com/jasp-stats/jasp-issues/issues/1748

--- Tools/CMake/JASP.cmake
+++ Tools/CMake/JASP.cmake
@@ -69,7 +69,8 @@
 endif()

 # This one is GLOBAL
-if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+# should be off for flatpak though because it is always build in debug mode (but the symbols are split off)
+if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT FLATPAK_USED)
   add_definitions(-DJASP_DEBUG)
 endif()


COMP: include( CTest ) in the Superbuild.

Fixes Dash5 CMake configuration error.

Change-Id: I51853a1ccee6bb21d080fc8179374ceac47bf5a4

--- Superbuild/Superbuild.cmake
+++ Superbuild/Superbuild.cmake
@@ -56,6 +56,7 @@
   endif()
 endif()

+include( CTest )
 option( BUILD_TESTING "Build testing" OFF )

 ExternalProject_Add( ITKExamples


Bugfix

Bugfix

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

--- tests/run_testsuite.cmake
+++ tests/run_testsuite.cmake
@@ -355,19 +355,23 @@

 CTEST_START(Experimental TRACK ${TRACK})

-CTEST_CONFIGURE(OPTIONS "${_options}")
-
-CTEST_BUILD(TARGET RETURN_VALUE _res) # run all target
-
-IF("${_res}" STREQUAL "0")
-  # Only run tests if the build succeeded:
-
-  EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND}
-    --build ${CTEST_BINARY_DIRECTORY} --target setup_test
-    OUTPUT_QUIET
-    )
-
-  CTEST_TEST()
+CTEST_CONFIGURE(OPTIONS "${_options}" RETURN_VALUE _res)
+
+IF("${_res}" STEQUAL "0")
+  # Only run the build stage if configure was successful:
+
+  CTEST_BUILD(TARGET RETURN_VALUE _res)
+
+  IF("${_res}" STREQUAL "0")
+    # Only run tests if the build was successful:
+
+    EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND}
+      --build ${CTEST_BINARY_DIRECTORY} --target setup_test
+      OUTPUT_QUIET
+      )
+
+    CTEST_TEST()
+  ENDIF()
 ENDIF()

 CTEST_SUBMIT()


SVN_SILENT made messages (.desktop file)

--- vlc/vlc.desktop.cmake
+++ vlc/vlc.desktop.cmake
@@ -38,7 +38,7 @@
 Comment[ca@valencia]=Dorsal del VLC pel Phonon
 Comment[cs]=Podpůrná vrstva VLC
 Comment[da]=Phonon VLC-motor
-Comment[de]=Phonon-Back-End für VLC
+Comment[de]=Phonon-Treiber für VLC
 Comment[es]=Motor VLC para Phonon
 Comment[et]=Phononi VLC taustaprogramm
 Comment[hu]=Phonon VLC-backend


Update CodeCoverage.cmake

Update CodeCoverage.cmake

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -22,7 +22,7 @@
 ENDIF() # NOT GENHTML_PATH

 SET(COVERAGE_CXX_FLAGS
-    "--coverage -fprofile-arcs -ftest-coverage"
+    "-g --coverage -fprofile-arcs -ftest-coverage"
     CACHE STRING "Flags used by the C++ compiler during coverage builds."
     FORCE
 )


[changed] to BOTG_AddTPL

[changed] to BOTG_AddTPL

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -1,4 +1 @@
-TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
-  LIB_REQUIRED_PACKAGES
-    BootsOnTheGround_GTest
-)
+BOTG_AddTPL( LIB REQUIRED GTest )


more debug messages

more debug messages

--- cmake/DetectOpenCV.cmake
+++ cmake/DetectOpenCV.cmake
@@ -6,7 +6,7 @@
 # ----------------------------------------------------------------------------
 if(DEFINED OpenCV_DIR)
     get_filename_component(OpenCV_DIR_TYPE ${OpenCV_DIR} EXT)
-
+    message(STATUS "OpenCV_DIR_EXT${OpenCV_DIR_EXT}")
     if(OpenCV_DIR_EXT STREQUAL ".pc")

         message(STATUS "PC file ${OpenCV_DIR}")
@@ -18,10 +18,14 @@
         pkg_check_modules(OpenCV opencv)

     else(OpenCV_DIR_EXT STREQUAL ".pc")
+
+    message(STATUS "OpenCV_DIR not .pc")
         find_package(OpenCV REQUIRED core highgui imgproc ml PATHS ${OpenCV_DIR})
     endif(OpenCV_DIR_EXT STREQUAL ".pc")

 else(DEFINED OpenCV_DIR)
+
+    message(STATUS "OpenCV_DIR not defined")
     find_package(OpenCV REQUIRED core highgui imgproc ml)
 endif(DEFINED OpenCV_DIR)


Bug 1054: Use set(EIGEN_CXX_FLAG_VERSION "/version") only for Intel compilers on Windows. Also removed code calling `head -n1` and always use integrated REGEX functionality.

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -367,23 +367,15 @@
     # on all other system we rely on ${CMAKE_CXX_COMPILER}
     # supporting a "--version" or "/version" flag

-    if(WIN32 AND NOT CYGWIN AND NOT MINGW)
+    if(WIN32 AND ${CMAKE_CXX_COMPILER_ID} EQUAL "Intel")
       set(EIGEN_CXX_FLAG_VERSION "/version")
     else()
       set(EIGEN_CXX_FLAG_VERSION "--version")
     endif()

-    # check whether the head command exists
-    find_program(HEAD_EXE head NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_CMAKE_SYSTEM_PATH)
-    if(HEAD_EXE)
-      execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${EIGEN_CXX_FLAG_VERSION}
-                      COMMAND head -n 1
-                      OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
-    else()
-      execute_process(COMMAND ${CMAKE_CXX_COMPILER}  ${EIGEN_CXX_FLAG_VERSION}
-                      OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
-      string(REGEX REPLACE "[\n\r].*"  ""  eigen_cxx_compiler_version_string  ${eigen_cxx_compiler_version_string})
-    endif()
+    execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${EIGEN_CXX_FLAG_VERSION}
+                    OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
+    string(REGEX REPLACE "[\n\r].*"  ""  eigen_cxx_compiler_version_string  ${eigen_cxx_compiler_version_string})

     ei_get_compilerver_from_cxx_version_string("${eigen_cxx_compiler_version_string}" CNAME CVER)
     set(${VAR} "${CNAME}-${CVER}")


CMake: Fix path for including standard module

--- cmake/FindFreetype.cmake
+++ cmake/FindFreetype.cmake
@@ -146,7 +146,7 @@

 # handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if
 # all listed variables are TRUE
-include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(FindPackageHandleStandardArgs)

 find_package_handle_standard_args(
   Freetype


[cmake] Make it possible to disable ccache

--- cmake/SiconosSetup.cmake
+++ cmake/SiconosSetup.cmake
@@ -216,9 +216,11 @@
 ENDIF()

 # =========== use ccache if available ===========
-find_program(CCACHE_FOUND ccache)
-if(CCACHE_FOUND)
-  set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
-  set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
-endif(CCACHE_FOUND)
-
+OPTION (WITH_CCACHE "Use ccache" ON)
+IF(WITH_CCACHE)
+  find_program(CCACHE_FOUND ccache)
+  if(CCACHE_FOUND)
+    set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
+    set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
+  endif(CCACHE_FOUND)
+ENDIF()


[cmake] make compile_with(ONLY ..) a multi-value arg

--- cmake/SiconosTools.cmake
+++ cmake/SiconosTools.cmake
@@ -131,11 +131,11 @@
 # with the same 'options' as find_package
 # (see http://www.cmake.org/cmake/help/v3.0/command/find_package.html?highlight=find_package)
 MACRO(COMPILE_WITH)
-
+
   set(options REQUIRED)
-  set(oneValueArgs ONLY)
-  set(multiValueArgs COMPONENTS)
-
+  set(oneValueArgs)
+  set(multiValueArgs COMPONENTS ONLY)
+
   cmake_parse_arguments(COMPILE_WITH "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )

   set(_NAME)
@@ -209,9 +209,11 @@
     list(REMOVE_DUPLICATES _LINK_LIBRARIES)
   endif()
   if(COMPILE_WITH_ONLY)
-    set(_sico_component ${COMPILE_WITH_ONLY})
-    set(${_sico_component}_LINK_LIBRARIES ${${_sico_component}_LINK_LIBRARIES}
-      ${_LINK_LIBRARIES} CACHE INTERNAL "List of external libraries for ${_sico_component}.")
+    FOREACH(_O ${COMPILE_WITH_ONLY})
+      set(_sico_component ${_O})
+      set(${_sico_component}_LINK_LIBRARIES ${${_sico_component}_LINK_LIBRARIES}
+        ${_LINK_LIBRARIES} CACHE INTERNAL "List of external libraries for ${_sico_component}.")
+    ENDFOREACH()
   else()
     set(SICONOS_LINK_LIBRARIES ${SICONOS_LINK_LIBRARIES}
       ${_LINK_LIBRARIES} CACHE INTERNAL "List of external libraries.")


Unmangle DML preview package filenames

Unmangle DML preview package filenames

--- cmake/external/dml.cmake
+++ cmake/external/dml.cmake
@@ -43,15 +43,66 @@
   set(DML_PACKAGE_DIR ${PACKAGES_DIR}/Microsoft.AI.DirectML.Preview.1.9.0-dev2b57b4f738b1d0dcc2dd31ecd502e36f4e3ea5a0)
   set(DML_SHARED_LIB DirectML.dll)

-  # Restore nuget packages, which will pull down the DirectML redist package
+  # If using the preview package, extract the SHA-1 from the path so we can unmangle the filenames later.
+  # e.g. "Microsoft.AI.DirectML.Preview.1.9.0-dev2b57b4f738b1d0dcc2dd31ecd502e36f4e3ea5a0"
+  if(DML_PACKAGE_DIR MATCHES ".*Preview.*-dev(.*)")
+    set(DML_PREVIEW_FILENAME_SUFFIX ".${CMAKE_MATCH_1}")
+  endif()
+
+  # Restore nuget packages, which will pull down the DirectML redist package.
   add_custom_command(
-    OUTPUT ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.lib ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.lib ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.lib ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.lib
-    DEPENDS ${PACKAGES_CONFIG} ${NUGET_CONFIG}
+    OUTPUT
+      ${DML_PACKAGE_DIR}/bin/x64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib
+      ${DML_PACKAGE_DIR}/bin/x86-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib
+      ${DML_PACKAGE_DIR}/bin/arm-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib
+      ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib
+    DEPENDS
+      ${PACKAGES_CONFIG}
+      ${NUGET_CONFIG}
     COMMAND ${CMAKE_CURRENT_BINARY_DIR}/nuget/src/nuget restore ${PACKAGES_CONFIG} -PackagesDirectory ${PACKAGES_DIR} -ConfigFile ${NUGET_CONFIG}
-    VERBATIM)
+    VERBATIM
+  )
+
+  # If using a preview package, unmangle the filenames from the nuget so they're useable.
+  # e.g. Map DirectML.2b57b4f738b1d0dcc2dd31ecd502e36f4e3ea5a0.dll -> DirectML.dll
+  if(DEFINED DML_PREVIEW_FILENAME_SUFFIX)
+    add_custom_command(
+      OUTPUT
+        ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.lib
+        ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.lib
+        ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.lib
+        ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.lib
+      DEPENDS
+        ${DML_PACKAGE_DIR}/bin/x64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib
+        ${DML_PACKAGE_DIR}/bin/x86-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib
+        ${DML_PACKAGE_DIR}/bin/arm-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib
+        ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.dll    ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.dll
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib    ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.lib
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.pdb    ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.pdb
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x86-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.dll    ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.dll
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x86-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib    ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.lib
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x86-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.pdb    ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.pdb
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.dll    ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.dll
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib    ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.lib
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.pdb    ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.pdb
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.dll  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.dll
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.lib
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.pdb  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.pdb
+      VERBATIM
+    )
+  endif()

   include_directories(BEFORE "${DML_PACKAGE_DIR}/include")
-  add_custom_target(RESTORE_PACKAGES ALL DEPENDS ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.lib ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.lib ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.lib ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.lib)
+  add_custom_target(
+    RESTORE_PACKAGES ALL
+    DEPENDS
+      ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.lib
+      ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.lib
+      ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.lib
+      ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.lib
+  )
+
   add_dependencies(RESTORE_PACKAGES nuget)
 else()
   if (dml_EXTERNAL_PROJECT)


Correct wrong default.

Correct wrong default.

--- cmake/externals/Qt.cmake
+++ cmake/externals/Qt.cmake
@@ -9,7 +9,7 @@
     endif()

     #PackageInit(Qt Qt4 QT ${default})
-    PackageInit(Qt Qt4 QT OFF)
+    PackageInit(Qt Qt4 QT ON)
     if (TARGET Qt)
         return()
     endif()


fix abi for apk creation

fix abi for apk creation

--- cmake/fips_android.cmake
+++ cmake/fips_android.cmake
@@ -11,6 +11,7 @@
         COMMAND python ${FIPS_ROOT_DIR}/tools/android-create-apk.py
         --path ${CMAKE_CURRENT_BINARY_DIR}
         --name ${target}
+        --abi ${CMAKE_ANDROID_ARCH_ABI}
         --package org.fips.${target}
         --deploy ${FIPS_DEPLOY_DIR}/${FIPS_PROJECT_NAME}/${FIPS_CONFIG})
 endmacro()


Linux fix

Linux fix

--- cmake/pumex-config.cmake
+++ cmake/pumex-config.cmake
@@ -9,8 +9,18 @@
 if(_IMPORT_PREFIX STREQUAL "/")
   set(_IMPORT_PREFIX "")
 endif()
+
+set( _FTINCLUDEDIRS )
+if(UNIX AND NOT APPLE)
+  find_package(Freetype)
+  set( _FTINCLUDEDIRS "${FREETYPE_INCLUDE_DIRS}" )
+else()
+  set( _FTINCLUDEDIRS "${_IMPORT_PREFIX}/include;${_IMPORT_PREFIX}/include/freetype2;" )
+endif()
+
 set_target_properties(pumex::pumexlib PROPERTIES
-  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;${_IMPORT_PREFIX}/include/freetype2"
+  INTERFACE_INCLUDE_DIRECTORIES "${_FTINCLUDEDIRS}"
 )
 # Cleanup temporary variables.
-set(_IMPORT_PREFIX)  +set( _FTINCLUDEDIRS )
+set( _IMPORT_PREFIX )


Make SWIFT_STDLIB_ENABLE_LTO flag apply LTO to C/C++ compile flags too (#38959)

--- stdlib/cmake/modules/AddSwiftStdlib.cmake
+++ stdlib/cmake/modules/AddSwiftStdlib.cmake
@@ -1150,9 +1150,7 @@
     set(analyze_code_coverage "${SWIFT_ANALYZE_CODE_COVERAGE}")
   endif()

-  if (NOT SWIFTLIB_SINGLE_TARGET_LIBRARY)
-    set(lto_type "${SWIFT_STDLIB_ENABLE_LTO}")
-  endif()
+  set(lto_type "${SWIFT_STDLIB_ENABLE_LTO}")

   _add_target_variant_c_compile_flags(
     SDK "${SWIFTLIB_SINGLE_SDK}"


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

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


Epic Bugfix: Omit "=" in target names so that Unix Makefiles actually run an mpi test...

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

--- tests/cmake/macros/macro_add_test.cmake
+++ tests/cmake/macros/macro_add_test.cmake
@@ -87,7 +87,7 @@
         SET(_run_command ${_target}) # the command to issue
         SET(_n_cpu 1) # set it to one, we'll still occupy one processor to run a test ;-)
       ELSE()
-        SET(_diff_target ${_category}-${_test_name}.mpirun=${_n_cpu}.${_build_lowercase}.diff) # diff target name
+        SET(_diff_target ${_category}-${_test_name}.mpirun${_n_cpu}.${_build_lowercase}.diff) # diff target name
         SET(_test_full ${_category}/${_test_name}.mpirun=${_n_cpu}.${_build_lowercase}) # full test name
         SET(_test_directory ${CMAKE_CURRENT_BINARY_DIR}/${_test_short}/mpirun=${_n_cpu}) # directory to run the test in
         SET(_run_command mpirun -np ${_n_cpu} ${CMAKE_CURRENT_BINARY_DIR}/${_test_short}/${_target}) # the command to issue


COMP: Bump ImageViewer refspec.

COMP: Bump ImageViewer refspec.

This fixes older Linux dashboard build errors.

Change-Id: If5d28f9683bcc0284e562022778beee59b25e99c

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -373,7 +373,7 @@
 set( proj ImageViewer )
 ExternalProject_Add( ImageViewer
   GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/TubeTK/ImageViewer.git"
-  GIT_TAG "907f4616cfef89bb69edc06936eed9d96f578da1"
+  GIT_TAG "361e639e999d2d8f3aa093a6611398798099c89c"
   SOURCE_DIR "${CMAKE_BINARY_DIR}/ImageViewer"
   BINARY_DIR ImageViewer-Build
   CMAKE_GENERATOR ${gen}


ENH: Bump ITK_VERSION_MINOR to 4

ENH: Bump ITK_VERSION_MINOR to 4

--- CMake/itkVersion.cmake
+++ CMake/itkVersion.cmake
@@ -1,4 +1,4 @@
 # ITK version number components.
 set(ITK_VERSION_MAJOR "5")
-set(ITK_VERSION_MINOR "3")
+set(ITK_VERSION_MINOR "4")
 set(ITK_VERSION_PATCH "0")


update vtk version

update vtk version

--- superbuild/versions.cmake
+++ superbuild/versions.cmake
@@ -87,7 +87,7 @@

 add_revision(vtk
   GIT_REPOSITORY git://vtk.org/VTK.git
-  GIT_TAG fa9ca03e2fb4ee413e3070e05cff2206170177c4 )
+  GIT_TAG ab8ae4f12d947487d956fa834b49362d30562ae2 )

 if (UNIX)
   add_revision(mpi


supress string to char* warning

supress string to char* warning

--- config/IRTKInclude.cmake
+++ config/IRTKInclude.cmake
@@ -114,7 +114,7 @@
   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /TP /Ze /W0")
   ADD_DEFINITIONS(-DvtkCommon_EXPORTS)
 ELSE (WIN32)
-  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -ffloat-store -Wall -O2")
+  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffloat-store -Wall -O2 -Wno-deprecated -Wno-write-strings")
 ENDIF (WIN32)

 # Option to wrap python.


BUG: fixing dashboard

BUG: fixing dashboard

--- src/Testing/Dashboard/elxDashboardCommon.cmake
+++ src/Testing/Dashboard/elxDashboardCommon.cmake
@@ -59,7 +59,7 @@

 # Select git source to use.
 if( NOT DEFINED dashboard_git_url )
-  set( dashboard_git_url "git://github.com/SuperElastix/elastix.git" )
+  set( dashboard_git_url "https://github.com/SuperElastix/elastix.git" )
 endif()

 # Select branch to use
@@ -69,7 +69,7 @@

 # Select a source directory name.
 if( NOT DEFINED CTEST_SOURCE_DIRECTORY )
-  set( CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}" )
+  set( CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/elastix/src" )
 endif()

 # Select a build directory name.
@@ -80,8 +80,8 @@

 # Look for a Subversion command-line client.
 if( NOT DEFINED CTEST_UPDATE_COMMAND )
-  find_program( CTEST_UPDATE_COMMAND svn
-    HINTS "C:/cygwin/bin/" )
+  find_program( CTEST_UPDATE_COMMAND git git.cmd
+    HINTS "C:/Program Files/Git/bin/" )
 endif()

 # Look for a GIT command-line client.
@@ -111,7 +111,7 @@

   # Assume git version 1.6.5 or higher, which has git clone -b option.
   set( CTEST_CHECKOUT_COMMAND
-     "\"${CTEST_GIT_COMMAND}\" clone -b ${dashboard_git_branch} \"${dashboard_git_url}\" \"${CTEST_ITKTOOLS_DIRECTORY}\"" )
+     "\"${CTEST_GIT_COMMAND}\" clone -b ${dashboard_git_branch} \"${dashboard_git_url}\" \"${CTEST_DASHBOARD_ROOT}/elastix\"" )

   # CTest delayed initialization is broken, so we copy the
   # CTestConfig.cmake info here.


Reduce verbosity of core build process.

Reduce verbosity of core build process.

--- build/cmake/core.cmake
+++ build/cmake/core.cmake
@@ -9,7 +9,7 @@
     ${STAMP_DIR}/core-web-app-bundle
     ${STAMP_DIR}/core-lua-deps
   COMMAND mkdir -p ${CORE_SHARED_BUILD_DIR}/vendor
-  COMMAND rsync -av --delete-after ${VENDOR_DIR}/ ${CORE_SHARED_BUILD_DIR}/vendor/
+  COMMAND rsync -a --delete-after ${VENDOR_DIR}/ ${CORE_SHARED_BUILD_DIR}/vendor/
   COMMAND touch -c ${CORE_SHARED_BUILD_DIR}/vendor
 )

@@ -18,7 +18,7 @@
   OUTPUT ${CORE_SHARED_BUILD_DIR}/src/api-umbrella/web-app/public/web-assets
   DEPENDS ${STAMP_DIR}/core-web-app-assets-precompiled
   COMMAND mkdir -p ${CORE_SHARED_BUILD_DIR}/src/api-umbrella/web-app/public/web-assets
-  COMMAND rsync -av --delete-after ${WORK_DIR}/src/web-app/public/web-assets/ ${CORE_SHARED_BUILD_DIR}/src/api-umbrella/web-app/public/web-assets/
+  COMMAND rsync -a --delete-after ${WORK_DIR}/src/web-app/public/web-assets/ ${CORE_SHARED_BUILD_DIR}/src/api-umbrella/web-app/public/web-assets/
   COMMAND touch -c ${CORE_SHARED_BUILD_DIR}/src/api-umbrella/web-app/public/web-assets
 )

@@ -45,7 +45,7 @@
 add_custom_command(
   OUTPUT ${STAMP_DIR}/core-build-release-dir-${RELEASE_TIMESTAMP}
   COMMAND mkdir -p ${CORE_RELEASE_BUILD_DIR}
-  COMMAND rsync -av --delete-after --delete-excluded "--filter=:- ${CMAKE_SOURCE_DIR}/.gitignore" --include=/templates/etc/perp/.boot --exclude=.* --exclude=/templates/etc/test-env* --exclude=/templates/etc/perp/test-env* --exclude=/src/api-umbrella/web-app/spec --exclude=/src/api-umbrella/web-app/app/assets --exclude=/src/api-umbrella/hadoop-analytics --include=/bin/*** --include=/config/*** --include=/LICENSE.txt --include=/templates/*** --include=/src/*** --exclude=* ${CMAKE_SOURCE_DIR}/ ${CORE_RELEASE_BUILD_DIR}/
+  COMMAND rsync -a --delete-after --delete-excluded "--filter=:- ${CMAKE_SOURCE_DIR}/.gitignore" --include=/templates/etc/perp/.boot --exclude=.* --exclude=/templates/etc/test-env* --exclude=/templates/etc/perp/test-env* --exclude=/src/api-umbrella/web-app/spec --exclude=/src/api-umbrella/web-app/app/assets --exclude=/src/api-umbrella/hadoop-analytics --include=/bin/*** --include=/config/*** --include=/LICENSE.txt --include=/templates/*** --include=/src/*** --exclude=* ${CMAKE_SOURCE_DIR}/ ${CORE_RELEASE_BUILD_DIR}/
   COMMAND rm -f ${STAMP_DIR}/core-build-release-dir*
   COMMAND touch ${STAMP_DIR}/core-build-release-dir-${RELEASE_TIMESTAMP}
 )
@@ -116,7 +116,7 @@
   OUTPUT ${STAGE_EMBEDDED_DIR}/apps/core/shared
   DEPENDS ${STAMP_DIR}/core-build-shared
   COMMAND mkdir -p ${STAGE_EMBEDDED_DIR}/apps/core/shared
-  COMMAND rsync -av --delete-after ${CORE_SHARED_BUILD_DIR}/ ${STAGE_EMBEDDED_DIR}/apps/core/shared/
+  COMMAND rsync -a --delete-after ${CORE_SHARED_BUILD_DIR}/ ${STAGE_EMBEDDED_DIR}/apps/core/shared/
   COMMAND touch -c ${STAGE_EMBEDDED_DIR}/apps/core/shared
 )


Fix misprint

Fix misprint

--- cmake/modules/hunter_pack_git_submodule.cmake
+++ cmake/modules/hunter_pack_git_submodule.cmake
@@ -45,8 +45,8 @@
         RESULT_VARIABLE result
         OUTPUT_VARIABLE output
         ERROR_VARIABLE output
-        OUTPUT_STRIP_TRAILING_WHITESPACES
-        ERROR_STRIP_TRAILING_WHITESPACES
+        OUTPUT_STRIP_TRAILING_WHITESPACE
+        ERROR_STRIP_TRAILING_WHITESPACE
     )
     if(result EQUAL "0")
       if(output MATCHES "^git version [0-9]")


CMake support for VS_STARTUP_PROJECT

CMake support for VS_STARTUP_PROJECT

--- Tools/CMake/torque3d.cmake
+++ Tools/CMake/torque3d.cmake
@@ -554,6 +554,11 @@
 ###############################################################################
 ###############################################################################

+# Set Visual Studio startup project
+if((${CMAKE_VERSION} VERSION_EQUAL 3.6.0) OR (${CMAKE_VERSION} VERSION_GREATER 3.6.0) AND MSVC)
+set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${TORQUE_APP_NAME})
+endif()
+
 message(STATUS "writing ${projectSrcDir}/torqueConfig.h")
 CONFIGURE_FILE("${cmakeDir}/torqueConfig.h.in" "${projectSrcDir}/torqueConfig.h")


Removed debug output.

Removed debug output.

Signed-off-by: Étienne Schmitt <25d5031dc1a1d443222aec9a4e916501ae23c255@inria.fr>

--- cmake/CompilerOptions.cmake
+++ cmake/CompilerOptions.cmake
@@ -115,7 +115,6 @@

 	CGOGN_CHECK_FOR_SSE()
 	add_flags(CMAKE_CXX_FLAGS ${CGOGN_SSE_FLAGS})
-        message("TEEEEEST : ${CGOGN_SSE_FLAGS}")
 	add_flags(CMAKE_C_FLAGS ${CGOGN_SSE_FLAGS})
 	add_definitions(${CGOGN_SSE_DEFINITIONS})


Bug: JPEG missing windows .lib file during linking

--- cmake/ExternalLibJPEG.cmake
+++ cmake/ExternalLibJPEG.cmake
@@ -10,6 +10,8 @@
         CONFIGURE_COMMAND ""
         BUILD_COMMAND ""
         INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/libjpeg/src/libjpeg/LibJPEG/9d/bin/libjpeg.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
+            ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/libjpeg/src/libjpeg/LibJPEG/9d/lib/libjpeg.lib ${FAST_EXTERNAL_INSTALL_DIR}/lib/ COMMAND
             ${CMAKE_COMMAND} -E copy_directory ${FAST_EXTERNAL_BUILD_DIR}/libjpeg/src/libjpeg/LibJPEG/9d/include/ ${FAST_EXTERNAL_INSTALL_DIR}/include/
-)
+    )
+    list(APPEND LIBRARIES libjpeg.lib)
 endif()


- Remove FORCE keyword from FindOpenAL.cmake

--- cmake/Find/FindOpenAL.cmake
+++ cmake/Find/FindOpenAL.cmake
@@ -67,10 +67,10 @@
     set ( OPENAL_INCLUDE_DIR "${OPENAL_INCLUDE_DIR}" CACHE PATH "OpenAL include directory" )
 endif()
 if(OPENAL_LIBRARY_TMP)
-    set ( OPENAL_LIBRARY "${OPENAL_LIBRARY_TMP}" CACHE FILEPATH "OpenAL library file" FORCE )
+    set ( OPENAL_LIBRARY "${OPENAL_LIBRARY_TMP}" CACHE FILEPATH "OpenAL library file" )
 endif()
 if(OPENAL_EFX_LIBRARY_TMP)
-    set ( OPENAL_EFX_LIBRARY "${OPENAL_EFX_LIBRARY_TMP}" CACHE FILEPATH "OpenAL EFX library file" FORCE )
+    set ( OPENAL_EFX_LIBRARY "${OPENAL_EFX_LIBRARY_TMP}" CACHE FILEPATH "OpenAL EFX library file" )
 endif()

 INCLUDE(FindPackageHandleStandardArgs)


fix documentation on FindOSCISystemC

fix documentation on FindOSCISystemC

--- cmake/FindOSCISystemC.cmake
+++ cmake/FindOSCISystemC.cmake
@@ -28,7 +28,7 @@
   The version of the SystemC library which was found.
 ``SystemC_INCLUDE_DIRS``
   Include directories needed to use SystemC.
-``SystemC_LIBRARIES``
+``SystemC_LIBRARY``
   Libraries needed to link to SystemC.
 ``SCV_FOUND``
   True if the system has the SCV library.
@@ -36,7 +36,7 @@
   The version of the SCV library which was found.
 ``SCV_INCLUDE_DIRS``
   Include directories needed to use SCV.
-``SCV_LIBRARIES``
+``SCV_LIBRARY``
   Libraries needed to link to SCV.
 ``CCI_FOUND``
   True if the system has the CCI library.
@@ -44,8 +44,8 @@
   The version of the CCI library which was found.
 ``CCI_INCLUDE_DIRS``
   Include directories needed to use CCI.
-``CCI_LIBRARIES``
-  Libraries needed to link to CCI.
+``CCI_LIBRARY``
+  Library needed to link to CCI.

 #]=======================================================================]


cmake: Show usage when an invalid board is given

Print the usage when an invalid board is given, this somewhat
allievates the catch-22 where you need to run CMake to know what
boards exist, but you need a board to run CMake.

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

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -155,7 +155,8 @@
 # e.g. zephyr/boards/arm/96b_carbon_nrf51/96b_carbon_nrf51_defconfig. When
 # found, use that path to infer the ARCH we are building for.
 find_path(BOARD_DIR NAMES "${BOARD}_defconfig" PATHS $ENV{ZEPHYR_BASE}/boards/*/* NO_DEFAULT_PATH)
-assert(BOARD_DIR "No board named '${BOARD}' found")
+
+assert_with_usage(BOARD_DIR "No board named '${BOARD}' found")

 get_filename_component(BOARD_ARCH_DIR ${BOARD_DIR} DIRECTORY)
 get_filename_component(ARCH ${BOARD_ARCH_DIR} NAME)


Use wild card *_PX4_* for upload

Use wild card *_PX4_* for upload

Compliments the Bootloader change To simplify the ripple effect on the tools, we will be using  /dev/serial/by-id/*_PX4_* to locate PX4 devices. Therefore  moving forward all Bootloaders must contain the prefix "PX4 BL "  in the USBDEVICESTRING

--- cmake/common/px4_base.cmake
+++ cmake/common/px4_base.cmake
@@ -510,6 +510,7 @@
 	set(serial_ports)
 	if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
 		list(APPEND serial_ports
+			/dev/serial/by-id/*_PX4_*
 			/dev/serial/by-id/usb-3D_Robotics*
 			/dev/serial/by-id/usb-The_Autopilot*
 			/dev/serial/by-id/usb-Bitcraze*


[CMake] AddLLVM.cmake: Tweak the corner case that "check-all" doesn't have any tests.

"check-all" can be executed with 0 status, "check-all does nothing, no tools built."

LLVM_EXTERNAL_CLANG_BUILD=OFF LLVM_BUILD_TOOLS=OFF can reproduce this.
Oscar Fuentes reported this. Thank you.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -279,11 +279,17 @@
   foreach(param ${ARG_PARAMS})
     list(APPEND LIT_COMMAND --param ${param})
   endforeach()
-  add_custom_target(${target}
-    COMMAND ${LIT_COMMAND} ${ARG_DEFAULT_ARGS}
-    COMMENT "${comment}"
-    )
-  add_dependencies(${target} ${ARG_DEPENDS})
+  if( ARG_DEPENDS )
+    add_custom_target(${target}
+      COMMAND ${LIT_COMMAND} ${ARG_DEFAULT_ARGS}
+      COMMENT "${comment}"
+      )
+    add_dependencies(${target} ${ARG_DEPENDS})
+  else()
+    add_custom_target(${target}
+      COMMAND cmake -E echo "${target} does nothing, no tools built.")
+    message(STATUS "${target} does nothing.")
+  endif()
 endfunction()

 # A function to add a set of lit test suites to be driven through 'check-*' targets.


update re2c to 1.2

update re2c to 1.2

--- cmake/modules/GetRE2C.cmake
+++ cmake/modules/GetRE2C.cmake
@@ -11,16 +11,16 @@
     download_project(
             PROJ                re2c
             GIT_REPOSITORY      https://github.com/skvadrik/re2c.git
-            GIT_TAG             1.1.1
+            GIT_TAG             1.2
             GIT_PROGRESS        1
     )

     set(RE2C_BIN "${re2c_BINARY_DIR}/re2c")

-    if(NOT EXISTS "${re2c_SOURCE_DIR}/re2c/configure")
-        execute_process(COMMAND ./autogen.sh WORKING_DIRECTORY ${re2c_SOURCE_DIR}/re2c)
+    if(NOT EXISTS "${re2c_SOURCE_DIR}/configure")
+        execute_process(COMMAND ./autogen.sh WORKING_DIRECTORY ${re2c_SOURCE_DIR})
     endif()

-    execute_process(COMMAND ${re2c_SOURCE_DIR}/re2c/configure WORKING_DIRECTORY ${re2c_BINARY_DIR})
+    execute_process(COMMAND ${re2c_SOURCE_DIR}/configure WORKING_DIRECTORY ${re2c_BINARY_DIR})
     execute_process(COMMAND make WORKING_DIRECTORY ${re2c_BINARY_DIR})
 endmacro()


Reorganize CMake logic in preparation for implementing
DOCBOOK_XML_BACKEND option.

Tested by Alan W. Irwin <airwin@users.sourceforge.net> using
-DBUILD_DOC=ON cmake option and clean followed by all target in doc/docbook/src.

svn path=/trunk/; revision=12484

--- cmake/modules/docbook.cmake
+++ cmake/modules/docbook.cmake
@@ -63,19 +63,11 @@

 # Check for required programs and perl libraries.
 if(BUILD_DOC)
-  # EC_PDFTEX needed to configure pdftex.map which is used in general for
-  # the documentation build.  The specific location in
-  # /usr/share/texmf/dvips/base is used in Debian sarge and may cover other
-  # distributions which still use tetex.
-  find_file(EC_ENC_NAME EC.enc /usr/share/texmf/dvips/base)
-  if(EC_ENC_NAME)
-    # Value appropriate for tetex
-    set(EC_PDFTEX EC)
-  else(EC_ENC_NAME)
-    # Value appropriate for texlive
-    set(EC_PDFTEX ec)
-  endif(EC_ENC_NAME)
-
+
+  option(DOCBOOK_XML_BACKEND "Use DocBook XML/XSLT backend tools to generate our documentation from DocBook source" OFF)
+
+  # The info backend is implemented only with perl and XML/XSLT regardless of
+  # DOCBOOK_XML_BACKEND.
   find_program(DB2X_TEXIXML db2x_texixml)
   if(NOT DB2X_TEXIXML)
     message(STATUS "WARNING: db2x_texixml not found")
@@ -84,147 +76,169 @@
   if(NOT DB2X_XSLTPROC)
     message(STATUS "WARNING: db2x_xsltproc not found")
   endif(NOT DB2X_XSLTPROC)
-  find_program(OPENJADE openjade)
-  if(NOT OPENJADE)
-    message(STATUS "WARNING: openjade not found")
-  endif(NOT OPENJADE)
-  find_program(JADETEX jadetex)
-  if(NOT JADETEX)
-    message(STATUS "WARNING: jadetex not found")
-  endif(NOT JADETEX)
-  find_program(PDFJADETEX pdfjadetex)
-  if(NOT PDFJADETEX)
-    message(STATUS "WARNING: pdfjadetex not found")
-  endif(NOT PDFJADETEX)
-  find_program(DVIPS dvips)
-  if(NOT DVIPS)
-    message(STATUS "WARNING: dvips not found")
-  endif(NOT DVIPS)
   find_program(MAKEINFO makeinfo)
   if(NOT MAKEINFO)
     message(STATUS "WARNING: makeinfo not found")
   endif(NOT MAKEINFO)
-  # Use include style here since FindUnixCommands is a simple module and
-  # clearly not meant to be an official FindXXX module.
-  include(FindUnixCommands)
-  find_program(MKDIR mkdir)
-
-  # Check requirements for different doc types
-  set(BUILD_INFO ON)
-  set(BUILD_MAN ON)
-  set(BUILD_HTML ON)
-  set(BUILD_PRINT ON)
-
-  if(NOT PERL_FOUND OR NOT DB2X_TEXIXML OR NOT DB2X_XSLTPROC OR NOT MAKEINFO)
+  if(PERL_FOUND AND DB2X_TEXIXML AND DB2X_XSLTPROC AND MAKEINFO)
+    set(BUILD_INFO ON)
+  else(PERL_FOUND AND DB2X_TEXIXML AND DB2X_XSLTPROC AND MAKEINFO)
     set(BUILD_INFO OFF)
     message(STATUS
     "WARNING: Not building info documentation - "
     "required programs are missing"
     )
-  endif(NOT PERL_FOUND OR NOT DB2X_TEXIXML OR NOT DB2X_XSLTPROC OR NOT MAKEINFO)
-
-  if(NOT PERL_FOUND OR NOT PERL_XML_PARSER OR NOT PERL_XML_DOM)
+  endif(PERL_FOUND AND DB2X_TEXIXML AND DB2X_XSLTPROC AND MAKEINFO)
+
+  # The man backend is implemented only with perl and XML regardless of
+  # DOCBOOK_XML_BACKEND.
+  if(PERL_FOUND AND PERL_XML_PARSER AND PERL_XML_DOM)
+    set(BUILD_MAN ON)
+  else(PERL_FOUND AND PERL_XML_PARSER AND PERL_XML_DOM)
     set(BUILD_MAN OFF)
     message(STATUS
     "WARNING: Not building man documentation - "
     "required programs are missing"
     )
-  endif(NOT PERL_FOUND OR NOT PERL_XML_PARSER OR NOT PERL_XML_DOM)
-
-  if(NOT OPENJADE)
-    set(BUILD_HTML OFF)
-    message(STATUS
-    "WARNING: Not building html documentation - "
-    "required programs are missing"
-    )
-  endif(NOT OPENJADE)
-
-  if(NOT OPENJADE OR NOT JADETEX OR NOT PDFJADETEX OR NOT DVIPS OR NOT GZIP)
-    set(BUILD_PRINT OFF)
-    message(STATUS
-    "WARNING: Not building print documentation - "
-    "required programs are missing"
-    )
-  endif(NOT OPENJADE OR NOT JADETEX OR NOT PDFJADETEX OR NOT DVIPS OR NOT GZIP)
-
-  set(JADELOG "jadeout.log")
-
-  # DTD definitions
-  set(DSSSL_DTD_PUBID "-//James Clark//DTD DSSSL Style Sheet//EN")
-  set(DB_SS_HTML_PUBID "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN")
-  set(DB_SS_PRINT_PUBID "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN")
-
-  # Check public identifiers
-  include(CheckDTD)
-
-  CheckDTD(HAVE_DSSSL_DTD
-  "DSSSL Style Sheet DTD"
-  ""
-  ""
-  ""
-  "[<!ELEMENT book - O (#PCDATA)>]"
-  "sgml"
-  "\"${DSSSL_DTD_PUBID}\""
-  "style-sheet.dtd"
-  "jade"
-  )
-
-  CheckDTD(HAVE_HTML_SS
-  "DocBook HTML Stylesheet"
-  "[<!ENTITY dbstyle PUBLIC \"${DB_SS_HTML_PUBID}\" CDATA DSSSL>]"
-  "use=\"docbook\""
-  "<external-specification id=\"docbook\" document=\"dbstyle\">"
-  "[<!ELEMENT book - O (#PCDATA)>]"
-  "sgml"
-  "\"${DB_SS_HTML_PUBID}\""
-  "html/docbook.dsl"
-  "docbook-stylesheets"
-  )
-
-  CheckDTD(HAVE_PRINT_SS
-  "DocBook Print Stylesheet"
-  "[<!ENTITY dbstyle PUBLIC \"${DB_SS_PRINT_PUBID}\" CDATA DSSSL>]"
-  "use=\"docbook\""
-  "<external-specification id=\"docbook\" document=\"dbstyle\">"
-  "[<!ELEMENT book - O (#PCDATA)>]"
-  "tex"
-  "\"${DB_SS_PRINT_PUBID}\""
-  "print/docbook.dsl"
-  "docbook-stylesheets"
-  )
-
-  CheckDTD(HAVE_DB_DTD
-  "DocBook DTD"
-  ""
-  ""
-  ""
-  "PUBLIC \"${DOCBOOK_DTD_PUBID}\""
-  "sgml"
-  "\"${DOCBOOK_DTD_PUBID}\""
-  "docbookx.dtd"
-  "docbook-xml (DTD version 3.1.3)"
-  )
-
-  if(BUILD_PRINT)
-    if(NOT HAVE_DSSSL_DTD OR NOT HAVE_PRINT_SS OR NOT HAVE_DB_DTD)
+  endif(PERL_FOUND AND PERL_XML_PARSER AND PERL_XML_DOM)
+
+  if(DOCBOOK_XML_BACKEND)
+    message(STATUS "DOCBOOK_XML_BACKEND not implemented yet")
+  else(DOCBOOK_XML_BACKEND)
+    # Deprecated SGML/DSSSL backends to generate html and print documentation.
+
+    # These JADELOG and EC_PDFTEX variables used during course of
+    # SGML/DSSSL builds
+    set(JADELOG "jadeout.log")
+
+    # EC_PDFTEX needed to configure pdftex.map which is used in general for
+    # the documentation build.  The specific location in
+    # /usr/share/texmf/dvips/base is used in Debian sarge and may cover other
+    # distributions which still use tetex.
+    find_file(EC_ENC_NAME EC.enc /usr/share/texmf/dvips/base)
+    if(EC_ENC_NAME)
+      # Value appropriate for tetex
+      set(EC_PDFTEX EC)
+    else(EC_ENC_NAME)
+      # Value appropriate for texlive
+      set(EC_PDFTEX ec)
+    endif(EC_ENC_NAME)
+
+    # Find programmes required for SGML/DSSSL builds.
+    find_program(OPENJADE openjade)
+    if(NOT OPENJADE)
+      message(STATUS "WARNING: openjade not found")
+    endif(NOT OPENJADE)
+    find_program(JADETEX jadetex)
+    if(NOT JADETEX)
+      message(STATUS "WARNING: jadetex not found")
+    endif(NOT JADETEX)
+    find_program(PDFJADETEX pdfjadetex)
+    if(NOT PDFJADETEX)
+      message(STATUS "WARNING: pdfjadetex not found")
+    endif(NOT PDFJADETEX)
+    find_program(DVIPS dvips)
+    if(NOT DVIPS)
+      message(STATUS "WARNING: dvips not found")
+    endif(NOT DVIPS)
+    # Use include style here since FindUnixCommands is a simple module and
+    # clearly not meant to be an official FindXXX module.
+    include(FindUnixCommands)
+    find_program(MKDIR mkdir)
+
+    # These DSSSL stylesheets needed for SGML/DSSSL builds.
+    set(DSSSL_DTD_PUBID "-//James Clark//DTD DSSSL Style Sheet//EN")
+    set(DB_SS_HTML_PUBID "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN")
+    set(DB_SS_PRINT_PUBID "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN")
+
+    # Check public identifiers
+    include(CheckDTD)
+
+    CheckDTD(HAVE_DSSSL_DTD
+      "DSSSL Style Sheet DTD"
+      ""
+      ""
+      ""
+      "[<!ELEMENT book - O (#PCDATA)>]"
+      "sgml"
+      "\"${DSSSL_DTD_PUBID}\""
+      "style-sheet.dtd"
+      "jade"
+      )
+
+    CheckDTD(HAVE_HTML_SS
+      "DocBook HTML Stylesheet"
+      "[<!ENTITY dbstyle PUBLIC \"${DB_SS_HTML_PUBID}\" CDATA DSSSL>]"
+      "use=\"docbook\""
+      "<external-specification id=\"docbook\" document=\"dbstyle\">"
+      "[<!ELEMENT book - O (#PCDATA)>]"
+      "sgml"
+      "\"${DB_SS_HTML_PUBID}\""
+      "html/docbook.dsl"
+      "docbook-stylesheets"
+      )
+
+    CheckDTD(HAVE_PRINT_SS
+      "DocBook Print Stylesheet"
+      "[<!ENTITY dbstyle PUBLIC \"${DB_SS_PRINT_PUBID}\" CDATA DSSSL>]"
+      "use=\"docbook\""
+      "<external-specification id=\"docbook\" document=\"dbstyle\">"
+      "[<!ELEMENT book - O (#PCDATA)>]"
+      "tex"
+      "\"${DB_SS_PRINT_PUBID}\""
+      "print/docbook.dsl"
+      "docbook-stylesheets"
+      )
+
+    CheckDTD(HAVE_DB_DTD
+      "DocBook DTD"
+      ""
+      ""
+      ""
+      "PUBLIC \"${DOCBOOK_DTD_PUBID}\""
+      "sgml"
+      "\"${DOCBOOK_DTD_PUBID}\""
+      "docbookx.dtd"
+      "docbook-xml (DTD version 3.1.3)"
+      )
+
+    if(OPENJADE)
+      if(HAVE_DSSSL_DTD AND HAVE_HTML_SS AND HAVE_DB_DTD)
+	set(BUILD_HTML ON)
+      else(HAVE_DSSSL_DTD AND HAVE_HTML_SS AND HAVE_DB_DTD)
+	set(BUILD_HTML OFF)
+	message(STATUS
+	  "WARNING: Not building html documentation - "
+	  "dtd files / style sheets are missing"
+	  )
+      endif(HAVE_DSSSL_DTD AND HAVE_HTML_SS AND HAVE_DB_DTD)
+    else(OPENJADE)
+      set(BUILD_HTML OFF)
+      message(STATUS
+	"WARNING: Not building html documentation - "
+	"required programs are missing"
+	)
+    endif(OPENJADE)
+
+    if(OPENJADE AND JADETEX AND PDFJADETEX AND DVIPS AND GZIP)
+      if(HAVE_DSSSL_DTD AND HAVE_PRINT_SS AND HAVE_DB_DTD)
+	set(BUILD_PRINT ON)
+      else(HAVE_DSSSL_DTD AND HAVE_PRINT_SS AND HAVE_DB_DTD)
+	set(BUILD_PRINT OFF)
+	message(STATUS
+	  "WARNING: Not building print documentation - "
+	  "dtd files / style sheets are missing"
+	  )
+      endif(HAVE_DSSSL_DTD AND HAVE_PRINT_SS AND HAVE_DB_DTD)
+    else(OPENJADE AND JADETEX AND PDFJADETEX AND DVIPS AND GZIP)
       set(BUILD_PRINT OFF)
       message(STATUS
-      "WARNING: Not building print documentation - "
-      "dtd files / style sheets are missing"
-      )
-    endif(NOT HAVE_DSSSL_DTD OR NOT HAVE_PRINT_SS OR NOT HAVE_DB_DTD)
-  endif(BUILD_PRINT)
-
-  if(BUILD_HTML)
-    if(NOT HAVE_DSSSL_DTD OR NOT HAVE_HTML_SS OR NOT HAVE_DB_DTD)
-      set(BUILD_HTML OFF)
-      message(STATUS
-      "WARNING: Not building html documentation - "
-      "dtd files / style sheets are missing"
-      )
-    endif(NOT HAVE_DSSSL_DTD OR NOT HAVE_HTML_SS OR NOT HAVE_DB_DTD)
-  endif(BUILD_HTML)
-
+	"WARNING: Not building print documentation - "
+	"required programs are missing"
+	)
+    endif(OPENJADE AND JADETEX AND PDFJADETEX AND DVIPS AND GZIP)
+
+  endif(DOCBOOK_XML_BACKEND)
 endif(BUILD_DOC)

 if(BUILD_DOC OR PREBUILT_DOC)


Disable Eigen tests

Disable Eigen tests

--- cmake/submoduleEigen3.cmake
+++ cmake/submoduleEigen3.cmake
@@ -21,6 +21,7 @@
     -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
     -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
     -DEIGEN_TEST_CXX11=ON
+    -DBUILD_TESTING=OFF
     STEP_TARGETS install
     EXCLUDE_FROM_ALL TRUE
     )


ISSUE #262 update cmake for validated versions of teigha

--- cmake_modules/FindODA.cmake
+++ cmake_modules/FindODA.cmake
@@ -19,7 +19,7 @@
 #ODA_LIBRARIES will point to the libraries

 set(ODA_LIB_NAMES
-	TD_ExamplesCommon TG_ExamplesCommon TG_Db TD_DbRoot TD_Gs TD_Gi TD_Ge TD_Root sisl TD_Alloc)
+	TD_ExamplesCommon TG_ExamplesCommon TG_Db TD_DbRoot TD_Gs TD_Gi TD_Ge TD_Root TD_Alloc)

 if(DEFINED ENV{ODA_LIB_DIR})
 	set(ODA_LIB_DIR $ENV{ODA_LIB_DIR})


Update FW: - support for camera modules with IMX380 sensor id, reusing IMX378 driver (some Arducam IMX577(?)) - soft-reset the sensor before config, to fix streaming with some Arducam modules

--- 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 "d4c86b3b232f37796293cf0c995d61fa276b9837")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "25e22d27838d599121d1b6d9fc131456efc49a46")

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


MindPX: Start send_events handler in MindPX (#6875)

--- cmake/configs/nuttx_mindpx-v2_default.cmake
+++ cmake/configs/nuttx_mindpx-v2_default.cmake
@@ -94,6 +94,7 @@
 	# General system control
 	#
 	modules/commander
+	modules/events
 	modules/load_mon
 	modules/navigator
 	modules/mavlink


px4fmu-v2: Build individual distance sensors

We are running out of flash memory in px4fmu-v2 so removing all the
distance sensors from binary and adding then individually.
Right now only LeddarOne is not being buid.

--- cmake/configs/nuttx_px4fmu-v2_default.cmake
+++ cmake/configs/nuttx_px4fmu-v2_default.cmake
@@ -8,7 +8,6 @@
 	#
 	#drivers/barometer
 	drivers/differential_pressure
-	drivers/distance_sensor
 	#drivers/magnetometer

 	#drivers/adis16448
@@ -48,6 +47,17 @@
 	drivers/stm32/tone_alarm
 	#drivers/tap_esc
 	drivers/vmount
+
+	# distance sensors
+	drivers/distance_sensor/ll40ls
+	drivers/distance_sensor/mb12xx
+	drivers/distance_sensor/sf0x
+	drivers/distance_sensor/sf1xx
+	drivers/distance_sensor/srf02
+	drivers/distance_sensor/srf02_i2c
+	drivers/distance_sensor/teraranger
+	drivers/distance_sensor/tfmini
+	drivers/distance_sensor/ulanding
 	modules/sensors

 	#


Do not disable ssl when OpenSSL is actually found

This is a bug that has been introduced by commit
8e7439cb37bcf897db1deb0516462fbb5ef00672.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -583,12 +583,14 @@
     find_package(OpenSSL REQUIRED)
   else()
     find_package(OpenSSL)
-    if(NOT OPENSSL_FOUND AND NOT WIN32) # builtin OpenSSL does not work on Windows
-      message(STATUS "OpenSSL not found, switching ON 'builtin_openssl' option.")
-      set(builtin_openssl ON CACHE BOOL "" FORCE)
-    else()
-      message(STATUS "Switching OFF 'ssl' option.")
-      set(ssl OFF CACHE BOOL "" FORCE)
+    if(NOT OPENSSL_FOUND)
+      if(WIN32) # builtin OpenSSL does not work on Windows
+        message(STATUS "Switching OFF 'ssl' option.")
+        set(ssl OFF CACHE BOOL "" FORCE)
+      else()
+        message(STATUS "OpenSSL not found, switching ON 'builtin_openssl' option.")
+        set(builtin_openssl ON CACHE BOOL "" FORCE)
+      endif()
     endif()
   endif()
 endif()


Do not enable builtin_freetype if fail-on-missing=ON

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -68,14 +68,20 @@
 #---Check for Freetype---------------------------------------------------------------
 if(NOT builtin_freetype)
   message(STATUS "Looking for Freetype")
-  find_package(Freetype)
+  if(fail-on-missing)
+    find_package(Freetype REQUIRED)
+  else()
+    find_package(Freetype)
+    if(NOT FREETYPE_FOUND)
+      message(STATUS "FreeType not found. Switching on builtin_freetype option")
+      set(builtin_freetype ON CACHE BOOL "" FORCE)
+    endif()
+  endif()
   if(FREETYPE_FOUND)
     set(FREETYPE_INCLUDE_DIR ${FREETYPE_INCLUDE_DIR_freetype2})
-  else()
-    message(STATUS "FreeType not found. Switching on builtin_freetype option")
-    set(builtin_freetype ON CACHE BOOL "" FORCE)
-  endif()
-endif()
+  endif()
+endif()
+
 if(builtin_freetype)
   set(freetype_version 2.6.1)
   message(STATUS "Building freetype version ${freetype_version} included in ROOT itself")


Fix for builtin_zlib and Windows

Fix for builtin_zlib and Windows

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -23,9 +23,9 @@
    endif()
 endif()
 if(builtin_zlib)
-  set(ZLIB_LIBRARY)
-  set(ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/core/zip/inc)
-  set(ZLIB_FOUND 1)
+  if(WIN32)
+    set(ZLIB_LIBRARY "")
+  endif()
 endif()

 #---Check for Freetype---------------------------------------------------------------


Deprecate afdsmgrd bonjour castor geocad globus gviz hdfs krb5 ldap memstat odbc qt qtgsi rfio table:

This emits a warning when the module is enabled.
We have no tests for these modules, we expect no actual usage of them, and there are better alternatives.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1637,3 +1637,9 @@
   endif()
 endforeach()

+#---Report deprecated options---------------------------------------------------
+foreach(opt afdsmgrd bonjour castor geocad globus gviz hdfs krb5 ldap memstat odbc qt qtgsi rfio table)
+  if(${opt})
+    message(DEPRECATION ">>> Option '${opt}' is deprecated and will be removed in ROOT v6.18. Please inform rootdev@cern.ch should you still need it.")
+  endif()
+endforeach()


Update builtin version of Vc to 1.4.0

Update builtin version of Vc to 1.4.0

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1299,7 +1299,7 @@
 endif()

 if(vc AND NOT Vc_FOUND)
-  set(Vc_VERSION "1.3.3")
+  set(Vc_VERSION "1.4.0")
   set(Vc_PROJECT "Vc-${Vc_VERSION}")
   set(Vc_SRC_URI "${lcgpackages}/${Vc_PROJECT}.tar.gz")
   set(Vc_DESTDIR "${CMAKE_BINARY_DIR}/externals")
@@ -1309,7 +1309,7 @@

   ExternalProject_Add(VC
     URL     ${Vc_SRC_URI}
-    URL_HASH SHA256=08c629d2e14bfb8e4f1a10f09535e4a3c755292503c971ab46637d2986bdb4fe
+    URL_HASH SHA256=e6cfc056eb3a72a57751e768ba63236ebf2711d267fbd1dc0acfee0ac16fdf68
     BUILD_IN_SOURCE 0
     BUILD_BYPRODUCTS ${Vc_LIBRARY}
     LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1


OpenSSL iOS bitcode & deployment SDK version support (Updated!)

--- cmake/modules/hunter_dump_cmake_flags.cmake
+++ cmake/modules/hunter_dump_cmake_flags.cmake
@@ -33,7 +33,7 @@
       set(CMAKE_C_FLAGS "-miphoneos-version-min=${IOS_DEPLOYMENT_SDK_VERSION}")
     endif()

-    if(XCODE AND CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE)
+    if(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE)
       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fembed-bitcode")
       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fembed-bitcode")
     endif()


Added: Tree gui for the html documentation created when the documentaion
is created separately for each library.

The html tree is a html/javascript solution.  The tree separates the
libraries by Core, and Contrib specifications.  The code for the tree
structure is configured by the cmake build configuration.

--- CMake/BuildFunctions.cmake
+++ CMake/BuildFunctions.cmake
@@ -2477,8 +2477,8 @@
 ##########################################################################
 # Add Tutorial builds as tests
 #
-MACRO(OSG_ADD_TUTORIAL_TESTS TUTORIAL_SOURCE_DIR)
-    IF(NOT ${OSG_CMAKE_PASS} STREQUAL "OSGSETUPUNITTEST")
+MACRO(OSG_ADD_TUTORIAL_TESTS TUTORIALS_NAME TUTORIAL_SOURCE_DIR)
+    IF(NOT OSGBUILD_UNITTESTS)
         RETURN()
     ENDIF()

@@ -2496,7 +2496,7 @@
         SET(TUTORIAL_NAME ${CMAKE_MATCH_1})

         #Add a test to see if the tutorial exists
-        ADD_TEST(NAME "${PROJECT_NAME}-${TUTORIAL_NAME}"
+        ADD_TEST(NAME "${TUTORIALS_NAME}-${TUTORIAL_NAME}"
                  COMMAND test -e ${TUTORIAL_EXE_PATH})
     ENDFOREACH()
 ENDMACRO()


On MSVC, enable intrinsics explicitly to avoid linker error on __InterlockedCompareExchange16 in debug mode when threading enabled

--HG--
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/trunk%40820

--- CMake/ConfigureBuild.cmake
+++ CMake/ConfigureBuild.cmake
@@ -142,6 +142,12 @@
   set(CMAKE_SUPPRESS_REGENERATION true)
 endif()

+if (MSVC)
+  # Enable intrinsics on MSVC in debug mode
+  # Not actually necessary in release mode since /O2 implies /Oi but can't easily add this per build type?
+  add_definitions(/Oi)
+endif (MSVC)
+
 ### Commented because the FindOGRE script can currently fill this role better ###
 # # Create the CMake package files
 # if (WIN32)


ENH: Sync with CMake CVS, patch from Pat Marion.

Sync the VTK copy of the FindPythonLibs module with CVS head. Main
change is a patch from Pat Marion to improve the Python modules macro.

--- CMake/FindPythonLibs.cmake
+++ CMake/FindPythonLibs.cmake
@@ -111,11 +111,11 @@

 FUNCTION(PYTHON_ADD_MODULE _NAME )
   OPTION(PYTHON_ENABLE_MODULE_${_NAME} "Add module ${_NAME}" TRUE)
-  OPTION(PYTHON_MODULE_${_NAME}_BUILD_SHARED "Add module ${_NAME} shared" ${_TARGET_SUPPORTS_SHARED_LIBS})
+  OPTION(PYTHON_MODULE_${_NAME}_BUILD_SHARED
+    "Add module ${_NAME} shared" ${_TARGET_SUPPORTS_SHARED_LIBS})

   # Mark these options as advanced
-  MARK_AS_ADVANCED(
-    PYTHON_ENABLE_MODULE_${_NAME}
+  MARK_AS_ADVANCED(PYTHON_ENABLE_MODULE_${_NAME}
     PYTHON_MODULE_${_NAME}_BUILD_SHARED)

   IF(PYTHON_ENABLE_MODULE_${_NAME})
@@ -139,13 +139,13 @@

   GET_FILENAME_COMPONENT(_name "${_filename}" NAME)
   STRING(REPLACE "." "_" _name "${_name}")
-  STRING(TOUPPER ${_name} _name)
+  STRING(TOUPPER ${_name} _nameUpper)

   SET(_filenameTmp "${_filename}.in")
   FILE(WRITE ${_filenameTmp} "/*Created by cmake, do not edit, changes will be lost*/\n")
   FILE(APPEND ${_filenameTmp}
-"#ifndef ${_name}
-#define ${_name}
+"#ifndef ${_nameUpper}
+#define ${_nameUpper}

 #include <Python.h>

@@ -171,11 +171,12 @@
     FILE(APPEND ${_filenameTmp} "int CMakeLoadPythonModule_${_currentModule}(void) \n{\n  static char name[]=\"${PYTHON_MODULE_PREFIX}${_currentModule}\"; return PyImport_AppendInittab(name, init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n")
   ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST})

-  FILE(APPEND ${_filenameTmp} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n")
+  FILE(APPEND ${_filenameTmp} "void ${_name}_LoadAllPythonModules(void)\n{\n")
   FOREACH(_currentModule ${PY_STATIC_MODULES_LIST})
     FILE(APPEND ${_filenameTmp} "  CMakeLoadPythonModule_${_currentModule}();\n")
   ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST})
-  FILE(APPEND ${_filenameTmp} "}\n#endif\n\n#endif\n")
+  FILE(APPEND ${_filenameTmp} "}\n\n")
+  FILE(APPEND ${_filenameTmp} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n  ${_name}_LoadAllPythonModules();\n}\n#endif\n\n#endif\n")

 # with CONFIGURE_FILE() cmake complains that you may not use a file created using FILE(WRITE) as input file for CONFIGURE_FILE()
   EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_filenameTmp}" "${_filename}" OUTPUT_QUIET ERROR_QUIET)


move REPLACE command before IF

move REPLACE command before IF

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -8,6 +8,8 @@
   if(DEFINED BOOST_ROOT AND NOT EXISTS ${BOOST_ROOT})
     message(FATAL_ERROR "BOOST_ROOT variable is defined but corresponds to non-existing directory")
   endif()
+
+  string(REPLACE "^^" ";" MITK_USE_Boost_LIBRARIES "${MITK_USE_Boost_LIBRARIES}")

   set(proj Boost)
   set(proj_DEPENDENCIES )
@@ -24,7 +26,6 @@
       set(BOOST_ROOT "${CMAKE_CURRENT_BINARY_DIR}/${proj}-install")

       # We need binary boost libraries
-      string(REPLACE "^^" ";" MITK_USE_Boost_LIBRARIES "${MITK_USE_Boost_LIBRARIES}")
       foreach(_boost_lib ${MITK_USE_Boost_LIBRARIES})
         set(_boost_libs ${_boost_libs} --with-${_boost_lib})
       endforeach()


Build only release mode Boost libraries if build type is Release.

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -29,6 +29,8 @@
       ELSE()
         IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
           SET(_boost_variant "variant=debug")
+        ELSE()
+          SET(_boost_variant "variant=release")
         ENDIF()
         SET(_shell_extension .sh)
       ENDIF()


Enforce CXX 14 in DCMQI

Enforce CXX 14 in DCMQI

--- CMakeExternals/DCMQI.cmake
+++ CMakeExternals/DCMQI.cmake
@@ -40,6 +40,7 @@
         -DITK_DIR:PATH=${ITK_DIR}
         -DITK_NO_IO_FACTORY_REGISTER_MANAGER:BOOL=ON
         -DDCMQI_SUPERBUILD:BOOL=OFF
+        -DDCMQI_CMAKE_CXX_STANDARD:STRING=14
       CMAKE_CACHE_ARGS
         ${ep_common_cache_args}
       CMAKE_CACHE_DEFAULT_ARGS


CI: fix "JSON_MultipleHeaders" option spelling (#3555)

--- cmake/ci.cmake
+++ cmake/ci.cmake
@@ -595,7 +595,7 @@
 add_custom_target(ci_test_single_header
     COMMAND CXX=${GCC_TOOL} CXXFLAGS="${GCC_CXXFLAGS}" ${CMAKE_COMMAND}
         -DCMAKE_BUILD_TYPE=Debug -GNinja
-        -DJSON_BuildTests=ON -DJSON_MultipleHeader=OFF -DJSON_FastTests=ON
+        -DJSON_BuildTests=ON -DJSON_MultipleHeaders=OFF -DJSON_FastTests=ON
         -S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_single_header
     COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_single_header
     COMMAND cd ${PROJECT_BINARY_DIR}/build_single_header && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure


ENH: Update SphinxExamples to lastest master branch

This updates the support for ITKv5.0.0, update python to 3.6 support,
updates submodules to working hashes, updates documentation warnings,
uses https vs http for websites that support it, and updates http addresses
that are are permanently redirected.

--- Modules/Remote/SphinxExamples.remote.cmake
+++ Modules/Remote/SphinxExamples.remote.cmake
@@ -2,5 +2,5 @@
 itk_fetch_module(SphinxExamples
   "This module builds the examples found at https://itk.org/ITKExamples/"
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKExamples.git
-  GIT_TAG 3966234dc803b269a8acad2dcdc8ef9ffbda4940
+  GIT_TAG abaac79d3380b23a6cd38ac772c91302463ed3c3
   )


Fail the CMake run if download project fails

Fixes: #13

--- DownloadProject.cmake
+++ DownloadProject.cmake
@@ -139,12 +139,20 @@
     configure_file("${_DownloadProjectDir}/DownloadProject.CMakeLists.cmake.in"
                    "${DL_ARGS_DOWNLOAD_DIR}/CMakeLists.txt")
     execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
+                    RESULT_VARIABLE result
                     ${OUTPUT_QUIET}
                     WORKING_DIRECTORY "${DL_ARGS_DOWNLOAD_DIR}"
     )
+    if(result)
+        message(FATAL_ERROR "CMake step for ${DL_ARGS_PROJ} failed: ${result}")
+    endif()
     execute_process(COMMAND ${CMAKE_COMMAND} --build .
+                    RESULT_VARIABLE result
                     ${OUTPUT_QUIET}
                     WORKING_DIRECTORY "${DL_ARGS_DOWNLOAD_DIR}"
     )
+    if(result)
+        message(FATAL_ERROR "Build step for ${DL_ARGS_PROJ} failed: ${result}")
+    endif()

 endfunction()


fix an emscripten SDK regression about missing shell.html

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -34,7 +34,7 @@
 option(FIPS_EMSCRIPTEN_USE_LTO "enable link-time optimization" ON)
 set(FIPS_EMSCRIPTEN_INITIAL_MEMORY 33554432 CACHE STRING "initial heap size in bytes")
 set(FIPS_EMSCRIPTEN_MEM_INIT_METHOD 1 CACHE STRING "how to represent initial memory content (0..2)")
-set(FIPS_EMSCRIPTEN_SHELL_HTML "shell.html" CACHE STRING "path to shell html file")
+set(FIPS_EMSCRIPTEN_SHELL_HTML "" CACHE STRING "path to shell html file")
 set(FIPS_EMSCRIPTEN_POSTFIX ".html" CACHE STRING "emscripten output postfix")

 if (FIPS_EMSCRIPTEN_RELATIVE_SHELL_HTML)
@@ -136,7 +136,9 @@
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s MINIMAL_RUNTIME=2 -s ENVIRONMENT=web")
 endif()

-set(EMSC_EXE_LINKER_FLAGS "${EMSC_EXE_LINKER_FLAGS} --shell-file ${FIPS_EMSCRIPTEN_SHELL_HTML}")
+if (NOT FIPS_EMSCRIPTEN_SHELL_HTML STREQUAL "")
+    set(EMSC_EXE_LINKER_FLAGS "${EMSC_EXE_LINKER_FLAGS} --shell-file ${FIPS_EMSCRIPTEN_SHELL_HTML}")
+endif()

 set(CMAKE_SYSTEM_NAME Generic)
 set(CMAKE_SYSTEM_VERSION 1)


emscripten: enable -s WASM=0 for non-wasm builds

Reason is that emscripten has now switched to emit wasm by default.

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -134,8 +134,10 @@
     set(EMSC_CXX_FLAGS "${EMSC_CXX_FLAGS} -fno-rtti")
 endif()
 set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE} --llvm-lto ${FIPS_EMSCRIPTEN_LTO_LEVEL}")
-if (NOT FIPS_EMSCRIPTEN_USE_WASM)
-    set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE} -s OUTLINING_LIMIT=${FIPS_EMSCRIPTEN_OUTLINING_LIMIT}")
+if (FIPS_EMSCRIPTEN_USE_WASM)
+    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s WASM=1 -s \"BINARYEN_METHOD='native-wasm'\"")
+else()
+    set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE} -s WASM=0 -s OUTLINING_LIMIT=${FIPS_EMSCRIPTEN_OUTLINING_LIMIT}")
 endif()
 if (FIPS_EMSCRIPTEN_USE_CLOSURE)
     set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE} --closure 1")
@@ -144,9 +146,6 @@
 endif()
 set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE} -s ASSERTIONS=0")

-if (FIPS_EMSCRIPTEN_USE_WASM)
-    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s WASM=1 -s \"BINARYEN_METHOD='native-wasm'\"")
-endif()
 set(EMSC_EXE_LINKER_FLAGS "${EMSC_EXE_LINKER_FLAGS} --shell-file ${FIPS_EMSCRIPTEN_SHELL_HTML}")

 set(CMAKE_SYSTEM_NAME Linux)


Update FW - [ImageManip][bug fix][setCropRotatedRect] Adding a fix for the case when the center of the rectangle crop is very close to the image border

--- 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 "35d2c8c5f2b082326334c982d54ae16908f1315d")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "69f4a4f521e5f3029d30582a5e6ad4352340d12a")

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


cmake configs : add camera_feedback module

--- cmake/configs/nuttx_mindpx-v2_default.cmake
+++ cmake/configs/nuttx_mindpx-v2_default.cmake
@@ -99,6 +99,7 @@
 	modules/gpio_led
 	modules/uavcan
 	modules/land_detector
+	modules/camera_feedback

 	#
 	# Estimation modules


[CMake][ROOT-9739] Upgrade VDT built-in version from 0.4.1 to 0.4.2

this new VDT version does not assume that the Python interpreter is called
python but rather relies on CMake to invoke the right executable.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1458,13 +1458,13 @@
     endif()
   endif()
   if(builtin_vdt)
-    set(vdt_version 0.4.1)
+    set(vdt_version 0.4.2)
     set(VDT_FOUND True)
     set(VDT_LIBRARIES ${CMAKE_BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}vdt${CMAKE_SHARED_LIBRARY_SUFFIX})
     ExternalProject_Add(
       VDT
       URL ${lcgpackages}/vdt-${vdt_version}.tar.gz
-      URL_HASH SHA256=020ae76518d67476c3cb9a3fdf0683ee982d6b1a5898739000072ce34063072c
+      URL_HASH SHA256=643136a38d6890c1cf18074bd494f99a4f269429ac552c57907e28c0091df8e6
       INSTALL_DIR ${CMAKE_BINARY_DIR}
       CMAKE_ARGS
         -DSSE=OFF # breaks on ARM without this


[Exp PyROOT] Unset search for Python related variables only if -Dpyroot_experimental is specified

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -495,9 +495,12 @@
 #---Check for Python installation-------------------------------------------------------

 message(STATUS "Looking for python")
-unset(PYTHON_INCLUDE_DIR CACHE)
-unset(PYTHON_LIBRARY CACHE)
-unset(CMAKE_INSTALL_PYROOTDIR)
+
+if(pyroot_experimental)
+  unset(PYTHON_INCLUDE_DIR CACHE)
+  unset(PYTHON_LIBRARY CACHE)
+  unset(CMAKE_INSTALL_PYROOTDIR)
+endif()

 # Python is required by header and manpage generation


BUG: fix bug 245. check GDALCONFIG_EXECUTABLE file existence before continuing

--- CMake/ImportGdal.cmake
+++ CMake/ImportGdal.cmake
@@ -20,44 +20,39 @@
   INCLUDE_DIRECTORIES(${GDAL_INCLUDE_DIR})

   IF (NOT GDAL_LIBRARY)
-  MESSAGE(FATAL_ERROR
-           "Cannot find GDAL library. Please set GDAL_LIBRARY.")
+    MESSAGE(FATAL_ERROR
+             "Cannot find GDAL library. Please set GDAL_LIBRARY.")
   ENDIF (NOT GDAL_LIBRARY)
   MESSAGE(STATUS "  GDAL includes : ${GDAL_INCLUDE_DIR}")
   MESSAGE(STATUS "  GDAL library  : ${GDAL_LIBRARY}")

-  # Find gdal version
-  FIND_PROGRAM(GDALCONFIG_EXECUTABLE gdal-config)
-  IF (GDALCONFIG_EXECUTABLE)
-      EXECUTE_PROCESS(COMMAND ${GDALCONFIG_EXECUTABLE} --version
-      OUTPUT_VARIABLE GDAL_VERSION
-      OUTPUT_STRIP_TRAILING_WHITESPACE)
-      MESSAGE(STATUS "  GDAL version is " ${GDAL_VERSION})
-      SET(GDAL_VERSION ${GDAL_VERSION} CACHE STRING "GDAL version" FORCE)
-      MARK_AS_ADVANCED(GDAL_VERSION)
-  ELSE (GDALCONFIG_EXECUTABLE)
-      MESSAGE(STATUS "  gdal-config not found")
-  ENDIF (GDALCONFIG_EXECUTABLE)
-
-  # Detect if gdal support hdf format
   IF(NOT WIN32)
-  FIND_PROGRAM(GDALCONFIG_EXECUTABLE gdal-config)
-  IF (GDALCONFIG_EXECUTABLE)
-     EXECUTE_PROCESS(COMMAND ${GDALCONFIG_EXECUTABLE} --formats
-                     OUTPUT_VARIABLE GDAL_FORMATS
-                     OUTPUT_STRIP_TRAILING_WHITESPACE
-                    )
-      IF ( ${GDAL_FORMATS} MATCHES "hdf" )
-         SET(CHECK_GDAL_BUILDED_WITH_HDF 1 CACHE INTERNAL "GDAL_BUILDED_WITH_HDF" FORCE)
-      ELSE ( ${GDAL_FORMATS} MATCHES "hdf")
-         MESSAGE(WARNING "CHECK_GDAL_BUILDED_WITH_HDF test failed : your GDAL is not builded with a hdf library. So the HDF tests will be deactivated. Formats supported by your GDAL: " [ ${GDAL_FORMATS} ] )
-         SET(CHECK_GDAL_BUILDED_WITH_HDF 0 CACHE INTERNAL "GDAL_BUILDED_WITH_HDF" FORCE)
-      ENDIF(${GDAL_FORMATS} MATCHES "hdf")
-  ELSE (GDALCONFIG_EXECUTABLE)
-    MESSAGE(WARNING "gdal-config not found")
-  ENDIF (GDALCONFIG_EXECUTABLE)
+    # Find gdal version with gdal-config
+    FIND_PROGRAM(GDALCONFIG_EXECUTABLE gdal-config)
+    IF (NOT EXISTS ${GDALCONFIG_EXECUTABLE})
+      MESSAGE(FATAL_ERROR "gdal-config not found or set to a wrong path. Please check GDALCONFIG_EXECUTABLE")
+    ENDIF(NOT EXISTS ${GDALCONFIG_EXECUTABLE})
+
+    EXECUTE_PROCESS(COMMAND ${GDALCONFIG_EXECUTABLE} --version
+                    OUTPUT_VARIABLE GDAL_VERSION
+                    OUTPUT_STRIP_TRAILING_WHITESPACE)
+    MESSAGE(STATUS "  GDAL version is " ${GDAL_VERSION})
+    SET(GDAL_VERSION ${GDAL_VERSION} CACHE STRING "GDAL version" FORCE)
+    MARK_AS_ADVANCED(GDAL_VERSION)
+
+    # Detect if gdal support hdf format
+    EXECUTE_PROCESS(COMMAND ${GDALCONFIG_EXECUTABLE} --formats
+                    OUTPUT_VARIABLE GDAL_FORMATS
+                    OUTPUT_STRIP_TRAILING_WHITESPACE )
+    IF ( ${GDAL_FORMATS} MATCHES "hdf" )
+       SET(CHECK_GDAL_BUILDED_WITH_HDF 1 CACHE INTERNAL "GDAL_BUILDED_WITH_HDF" FORCE)
+    ELSE ( ${GDAL_FORMATS} MATCHES "hdf")
+       MESSAGE(WARNING "CHECK_GDAL_BUILDED_WITH_HDF test failed : GDAL is not built with hdf support. So the HDF tests will be deactivated. Formats supported by your GDAL: " [ ${GDAL_FORMATS} ] )
+       SET(CHECK_GDAL_BUILDED_WITH_HDF 0 CACHE INTERNAL "GDAL_BUILDED_WITH_HDF" FORCE)
+    ENDIF(${GDAL_FORMATS} MATCHES "hdf")
+
   ELSE (NOT WIN32)
-  	# For WIN32 platform, GDAL is automatically build with HDF support.
+  	# For WIN32 platform, GDAL is automatically built with HDF support.
     SET(CHECK_GDAL_BUILDED_WITH_HDF 1 CACHE INTERNAL "GDAL_BUILDED_WITH_HDF" FORCE)
   ENDIF (NOT WIN32)


fix for CYCLUS_ROOT_DIR, closes #993

fix for CYCLUS_ROOT_DIR, closes #993

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

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


FindCython doesn't find local cython.

FindCython doesn't find local cython.

Detect the cython executable in the same path as the python
executable used in a local installation.

Reported by Paul Romano.

--- cmake/FindCython.cmake
+++ cmake/FindCython.cmake
@@ -22,7 +22,21 @@
 # limitations under the License.
 #=============================================================================

-find_program( CYTHON_EXECUTABLE NAMES cython cython.bat )
+# Use the Cython executable that lives next to the Python executable
+# if it is a local installation.
+find_package( PythonInterp )
+if( PYTHONINTERP_FOUND )
+  get_filename_component( _python_path ${PYTHON_EXECUTABLE} PATH )
+  find_program( CYTHON_EXECUTABLE
+    NAMES cython cython.bat
+    HINTS ${_python_path}
+    )
+else()
+  find_program( CYTHON_EXECUTABLE
+    NAMES cython cython.bat
+    )
+endif()
+

 include( FindPackageHandleStandardArgs )
 FIND_PACKAGE_HANDLE_STANDARD_ARGS( Cython REQUIRED_VARS CYTHON_EXECUTABLE )


add OpenAL ARGS fix install command: openal.dll is wrong it's OpenAL32.dll and OpenAL64.dll

--- cmake/get-openal.cmake
+++ cmake/get-openal.cmake
@@ -25,8 +25,8 @@
         CONFIGURE_COMMAND ""
         BUILD_COMMAND ""
         INSTALL_COMMAND
-            COMMAND ${CMAKE_COMMAND} -E copy "${DEPENDENCY_EXTRACT_DIR}/src/openal/bin/Win32/soft_oal.dll" "${DEPENDENCY_EXTRACT_DIR}/src/openal/bin/Win32/openal.dll"
-            COMMAND ${CMAKE_COMMAND} -E copy "${DEPENDENCY_EXTRACT_DIR}/src/openal/bin/Win64/soft_oal.dll" "${DEPENDENCY_EXTRACT_DIR}/src/openal/bin/Win64/openal.dll"
+            COMMAND ${CMAKE_COMMAND} -E copy "${DEPENDENCY_EXTRACT_DIR}/src/openal/bin/Win32/soft_oal.dll" "${DEPENDENCY_EXTRACT_DIR}/src/openal/bin/Win32/OpenAL32.dll"
+            COMMAND ${CMAKE_COMMAND} -E copy "${DEPENDENCY_EXTRACT_DIR}/src/openal/bin/Win64/soft_oal.dll" "${DEPENDENCY_EXTRACT_DIR}/src/openal/bin/Win64/OpenAL64.dll"
             COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDENCY_EXTRACT_DIR}/src/openal/bin     ${DEPENDENCY_INSTALL_DIR}/bin
             COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDENCY_EXTRACT_DIR}/src/openal/lib     ${DEPENDENCY_INSTALL_DIR}/lib
             COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDENCY_EXTRACT_DIR}/src/openal/include ${DEPENDENCY_INSTALL_DIR}/include/openal
@@ -43,6 +43,11 @@
         -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
         -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
         -DCMAKE_DEBUG_POSTFIX=d
+        -DALSOFT_CONFIG=OFF
+        -DALSOFT_EXAMPLES=OFF
+        -DALSOFT_NO_CONFIG_UTIL=ON
+        -DALSOFT_UTILS=OFF
+        #-DLIBTYPE=STATIC
     )

     ExternalProject_Add(