build

build

--- modules/zlib.cmake
+++ modules/zlib.cmake
@@ -43,12 +43,11 @@
   if(MSVC)
     # C4127: conditional expression is constant
     # C4131: 'function' : uses old-style declarator
-    # C4210: nonstandard extension used : function given file scope
     # C4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data
     # C4245: 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch
     # C4267: 'var' : conversion from 'size_t' to 'type', possible loss of data
     set(${SOURCE_FILES} "zlib/contrib/masmx64/inffas8664.c" "zlib/contrib/masmx64/inffas8664.c")
-    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} /wd4127 /wd4131 /wd4210 /wd4244 /wd4245 /wd4267")
+    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} /wd4127 /wd4131 /wd4244 /wd4245 /wd4267")
   else()
     set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} -Wno-implicit-function-declaration -Wno-shift-negative-value")
   endif()


ENH: OTB-297 : check if GDAL has Jpeg2000 support

--- CMake/ImportGdal.cmake
+++ CMake/ImportGdal.cmake
@@ -36,6 +36,15 @@
        message(STATUS "CHECK_GDAL_BUILT_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_BUILT_WITH_HDF 0 CACHE INTERNAL "GDAL_BUILT_WITH_HDF" FORCE)
     endif()
+
+    # Detect if gdal supports JPEG2000 format
+    if ((${GDAL_FORMATS} MATCHES "openjpeg") OR
+        (${GDAL_FORMATS} MATCHES "jp2kak"))
+      message(STATUS "  GDAL is built with a suitable Jpeg2000 driver (OpenJpeg, Kakadu).")
+    else()
+      message(WARNING "GDAL has no suitable Jpeg2000 driver (compatible drivers are : OpenJpeg, Kakadu).")
+    endif()
+
   else()
     # For WIN32 platform, we suppose that GDAL is built with HDF support (case with OSGeo4W)
     set(CHECK_GDAL_BUILT_WITH_HDF 1 CACHE INTERNAL "GDAL_BUILT_WITH_HDF" FORCE)


CMake: folly-deps: gflags is gflags-shared on Fedora #753

Summary:
This targets Fedora specifically. More details are available in #753

I personally do not think this is the best way to handle this, but it's something (and works). Still, there might be a chance for this to get merged in? Thank you!

/cc yfeldblum
Closes https://github.com/facebook/folly/pull/789

Reviewed By: simpkins

Differential Revision: D7111531

Pulled By: yfeldblum

fbshipit-source-id: 508aeeeb7bfaf2402150cd33f7d6c8b726539053

--- CMake/folly-deps.cmake
+++ CMake/folly-deps.cmake
@@ -26,7 +26,13 @@
 if (gflags_FOUND)
   message(STATUS "Found gflags from package config")
   set(FOLLY_HAVE_LIBGFLAGS ON)
-  set(FOLLY_SHINY_DEPENDENCIES ${FOLLY_SHINY_DEPENDENCIES} gflags)
+  if (TARGET gflags-shared)
+    set(FOLLY_SHINY_DEPENDENCIES ${FOLLY_SHINY_DEPENDENCIES} gflags-shared)
+  elseif (TARGET gflags)
+    set(FOLLY_SHINY_DEPENDENCIES ${FOLLY_SHINY_DEPENDENCIES} gflags)
+  else()
+    message(FATAL_ERROR "Unable to determine the target name for the GFlags package.")
+  endif()
   list(APPEND CMAKE_REQUIRED_LIBRARIES ${GFLAGS_LIBRARIES})
   list(APPEND CMAKE_REQUIRED_INCLUDES ${GFLAGS_INCLUDE_DIR})
 else()


Fix build issues with external projects

Fix build issues with external projects

--- CMake/MITKDashboardDriverScript.cmake
+++ CMake/MITKDashboardDriverScript.cmake
@@ -286,34 +286,41 @@
       foreach(external_project_with_build_dir ${CTEST_PROJECT_EXTERNALS})

         string(REPLACE "^^" ";" external_project_with_build_dir_list "${external_project_with_build_dir}")
-        list(GET external_project_with_build_dir_list 0 external_project)
-        list(GET external_project_with_build_dir_list 1 external_project_test_dir)
-        list(GET external_project_with_build_dir_list 2 external_project_build_dir)
-        list(GET external_project_with_build_dir_list 3 external_project_extra_target)
-
-        if (NOT external_project_build_dir)
-          set(external_project_build_dir ${external_project_test_dir})
+        list(GET external_project_with_build_dir_list 0 external_project_name)
+        list(GET external_project_with_build_dir_list 1 external_project_builddir)
+        list(GET external_project_with_build_dir_list 2 external_project_superbuilddir)
+        list(GET external_project_with_build_dir_list 3 external_project_buildtarget)
+
+        set_property(GLOBAL PROPERTY SubProject ${external_project_name})
+        set_property(GLOBAL PROPERTY Label ${external_project_name})
+
+        message("----------- [ Build ${external_project_name} ] -----------")
+
+        func_build_target("${external_project_name}" "${CTEST_BINARY_DIRECTORY}")
+
+        # The next func_build_target calls are for continuous clients, to make sure
+        # the external project is completely build (targets added with ExternalProject_Add
+        # are not rebuild automatically if their sources changed
+        if(NOT build_errors AND external_project_superbuilddir)
+          func_build_target("" "${CTEST_BINARY_DIRECTORY}/${external_project_superbuilddir}")
         endif()
-
-        set_property(GLOBAL PROPERTY SubProject ${external_project})
-        set_property(GLOBAL PROPERTY Label ${external_project})
-
-        message("----------- [ Build ${external_project} ] -----------")

-        # Build the "all" target for the external project
-        func_build_target("" "${CTEST_BINARY_DIRECTORY}/${external_project_build_dir}")
-        if(external_project_extra_target)
-          func_build_target("${external_project_extra_target}" "${CTEST_BINARY_DIRECTORY}/${external_project_build_dir}")
+        if(NOT build_errors)
+          func_build_target("" "${CTEST_BINARY_DIRECTORY}/${external_project_builddir}")
         endif()

+        if(NOT build_errors AND external_project_buildtarget)
+          func_build_target("${external_project_buildtarget}" "${CTEST_BINARY_DIRECTORY}/${external_project_builddir}")
+        endif()
+
         # HACK Unfortunately ctest_coverage ignores the build argument, try to force it...
-        file(READ "${CTEST_BINARY_DIRECTORY}/${external_project_test_dir}/CMakeFiles/TargetDirectories.txt" mitk_build_coverage_dirs)
+        file(READ "${CTEST_BINARY_DIRECTORY}/${external_project_builddir}/CMakeFiles/TargetDirectories.txt" mitk_build_coverage_dirs)
         file(APPEND "${CTEST_BINARY_DIRECTORY}/CMakeFiles/TargetDirectories.txt" "${mitk_build_coverage_dirs}")

-        message("----------- [ Test ${external_project} ] -----------")
-
-        # runs only tests that have a LABELS property matching "${external_project}"
-        func_test(${external_project} "${CTEST_BINARY_DIRECTORY}/${external_project_test_dir}")
+        message("----------- [ Test ${external_project_name} ] -----------")
+
+        # runs only tests that have a LABELS property matching "${external_project_name}"
+        func_test(${external_project_name} "${CTEST_BINARY_DIRECTORY}/${external_project_builddir}")

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


Disable SCM polling in continuous mode

Disable SCM polling in continuous mode

--- CMake/MITKDashboardDriverScript.cmake
+++ CMake/MITKDashboardDriverScript.cmake
@@ -503,14 +503,4 @@

 endfunction()

-if(SCRIPT_MODE STREQUAL "continuous")
-  while(1)
-    run_ctest()
-    # Loop no faster than once every 5 minutes
-    message("Wait for 5 minutes ...")
-    ctest_sleep(300)
-  endwhile()
-else()
-  run_ctest()
-endif()
-
+run_ctest()


opengm.cmake: Compile with hdf5, boost, and python

--- opengm.cmake
+++ opengm.cmake
@@ -11,6 +11,10 @@
 include (BuildSupport)
 include (PatchSupport)

+include (boost)
+include (hdf5)
+include (python)
+
 external_git_repo (opengm
     576dc472324a5dce40b7e9bb4c270afbd9b3da37
     https://github.com/opengm/opengm)
@@ -21,7 +25,7 @@

 message ("Installing ${opengm_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
 ExternalProject_Add(${opengm_NAME}
-    DEPENDS             ${boost_NAME}
+    DEPENDS             ${boost_NAME} ${hdf5_NAME} ${python_NAME}
     PREFIX              ${BUILDEM_DIR}
     GIT_REPOSITORY      ${opengm_URL}
     GIT_TAG             ${opengm_TAG}
@@ -33,6 +37,9 @@
         -DCMAKE_PREFIX_PATH=${BUILDEM_DIR}
         -DWITH_CPLEX=ON
         -DWITH_BOOST=ON
+        -DWITH_HDF5=ON
+        -DBUILD_PYTHON_WRAPPER=ON
+        -DWITH_OPENMP=OFF # Mac doesn't support OpenMP
         ${CMAKE_CPLEX_ROOT_DIR}

     BUILD_COMMAND       ${BUILDEM_ENV_STRING} $(MAKE)


cmake config fixes

cmake config fixes

--- libunistd-config.cmake
+++ libunistd-config.cmake
@@ -11,26 +11,32 @@
 message("--- Found libunistd! ---")
 message("  CMAKE_CURRENT_LIST_DIR = ${CMAKE_CURRENT_LIST_DIR}")

-set(LIBUNISTD_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/unistd)
-set(LIBUNISTD_LIBRARIES libunistd.lib)
-set(LIBUNISTD_LIB_DIRS ${CMAKE_CURRENT_LIST_DIR})
-
-if (NOT DEFINED CMAKE_STATIC_LIBRARY_SUFFIX)
+#if (NOT DEFINED CMAKE_STATIC_LIBRARY_SUFFIX)
     if (WIN32)
+        set(CMAKE_STATIC_LIBRARY_PREFIX "")
         set(CMAKE_STATIC_LIBRARY_SUFFIX ".lib")
     else()
         set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
         set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
     endif()
-endif()
+#endif()
+
+set(LIBUNISTD_LIBRARIES ${CMAKE_STATIC_LIBRARY_PREFIX}unistd${CMAKE_STATIC_LIBRARY_SUFFIX})

 if(${LIBUNISTD_DOWNLOAD})
+	set(LIBUNISTD_LIB_DIRS ${CMAKE_CURRENT_LIST_DIR})
+	set(LIBUNISTD_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/unistd)
+# Adjusting LIBUNISTD_DOWNLOAD path
+#   C:/Code/gitlab/ccLater/build/win64/libunistd/libunistd-src...
+#   /c/code/gitlab/cclater/build/win64/build/win64/libunistd/libunistd-src/unistd/Debug/libunistd.lib
 	message("Adjusting LIBUNISTD_DOWNLOAD path ${LIBUNISTD_LIB_DIRS}...")
 	set(LIBUNISTD_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR})
 	set(LIBUNISTD_LIB_DIRS
 		debug ${LIBUNISTD_LIB_DIRS}/build/win64/unistd/Debug
 		optimized ${LIBUNISTD_LIB_DIRS}/build/win64/unistd/Release )
 else(${LIBUNISTD_DOWNLOAD})
+	set(LIBUNISTD_LIB_DIRS ${CMAKE_CURRENT_LIST_DIR})
+	set(LIBUNISTD_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR})
 	set(LIBUNISTD_LIB_DIRS
 		debug ${LIBUNISTD_LIB_DIRS}/unistd/Debug
 		optimized ${LIBUNISTD_LIB_DIRS}/unistd/Release )


osx: bundle ITK again, something change in CMake config

--- projects/apple/tomviz.bundle.cmake
+++ projects/apple/tomviz.bundle.cmake
@@ -2,6 +2,12 @@

 set(CPACK_GENERATOR DragNDrop)
 include(CPack)
+
+if(itk_ENABLED)
+  set(itk_condition_variable 1)
+else()
+  set(itk_condition_variable 0)
+endif()

 install(CODE "
     # Install the app first.
@@ -26,7 +32,7 @@
          USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
          \"${install_location}/lib/python2.7/site-packages/\")

-    if(${itk_ENABLED})
+    if(${itk_condition_variable})
         message(\"Installing ITK\")
         file(INSTALL DESTINATION \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/tomviz.app/Contents/Libraries\"
              USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES


BUG: forgot a rename of includet

BUG: forgot a rename of includet

--- Modules/CommandLine/CommandLine.cmake
+++ Modules/CommandLine/CommandLine.cmake
@@ -33,7 +33,7 @@

 # Module source files
 set( COMMANDLINE_SOURCE_FILES
-  ${COMMANDLINE_SOURCE_DIR}/src/CommandLine.cxx
+  ${COMMANDLINE_SOURCE_DIR}/src/selxCommandLine.cxx
 )

 message(STATUS "BOOST_LIBRARYDIR: ${BOOST_LIBRARYDIR}")


modules: updated FindSDL2.cmake from Magnum repository.

--- modules/FindSDL2.cmake
+++ modules/FindSDL2.cmake
@@ -37,7 +37,13 @@
 if(CORRADE_TARGET_EMSCRIPTEN)
     set(_SDL2_PATH_SUFFIXES SDL)
 else()
-    find_library(SDL2_LIBRARY SDL2
+    find_library(SDL2_LIBRARY
+        # Compiling SDL2 from scratch on OSX creates dead libSDL2.so symlink
+        # which CMake somehow prefers before the SDL2-2.0.dylib file. Making
+        # the dylib first so it is preferred.
+        NAMES SDL2-2.0 SDL2
+
+        # Precompiled libraries for Windows are in x86/x64 subdirectories
         PATH_SUFFIXES lib/x86 lib/x64)
     set(SDL2_LIBRARY_NEEDED SDL2_LIBRARY)
     set(_SDL2_PATH_SUFFIXES SDL2)


Don't clobber CMAKE_REQUIRED_FLAGS, it ends up being used in
C compilations as well and these flags don't make any sense there.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -29,6 +29,8 @@
     # version of libstdc++ directly. Instead we test for a known bug in
     # libstdc++4.6 that is fixed in libstdc++4.7.
     if(NOT LLVM_ENABLE_LIBCXX)
+      set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
+      set(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
       set(CMAKE_REQUIRED_FLAGS "-std=c++0x")
       if (ANDROID)
         set(CMAKE_REQUIRED_LIBRARIES "atomic")
@@ -41,6 +43,8 @@
       if(NOT LLVM_NO_OLD_LIBSTDCXX)
         message(FATAL_ERROR "Host Clang must be able to find libstdc++4.7 or newer!")
       endif()
+      set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
+      set(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES})
     endif()
   elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
     if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0)


Fix wrong include path for iOS build.

Fix wrong include path for iOS build.

--- Source/CMake/Modules/FindUrho3D.cmake
+++ Source/CMake/Modules/FindUrho3D.cmake
@@ -79,7 +79,12 @@
             list (APPEND URHO3D_INCLUDE_DIR ${URHO3D_HOME}/raspi-Build/Engine)
             set (URHO3D_LIB_SEARCH_PATH ${URHO3D_HOME}/Lib-CC)
         else ()
-            list (APPEND URHO3D_INCLUDE_DIR ${URHO3D_HOME}/Build/Engine)
+            if (IOS)
+                set (BUILD_DIR ios-Build)
+            else ()
+                set (BUILD_DIR Build)
+            endif ()
+            list (APPEND URHO3D_INCLUDE_DIR ${URHO3D_HOME}/${BUILD_DIR}/Engine)
             set (URHO3D_LIB_SEARCH_PATH ${URHO3D_HOME}/Lib)
         endif ()
         if (TARGET Urho3D)


Avoid noexcept-type in GCC 7.1 for test code

Fixes https://github.com/google/shaderc/issues/334

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -103,6 +103,11 @@
       if (MINGW)
         target_compile_options(${TEST_NAME} PRIVATE -DSHADERC_DISABLE_THREADED_TESTS)
       endif()
+      if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+        # Disable this warning, which is useless in test code.
+        # Fixes https://github.com/google/shaderc/issues/334
+        target_compile_options(${TEST_NAME} PRIVATE -Wno-noexcept-type)
+      endif()
       if (PARSED_ARGS_LINK_LIBS)
         target_link_libraries(${TEST_NAME} PRIVATE
         ${PARSED_ARGS_LINK_LIBS})


SuperBuild: ossim: add NOMINIMAX flag for msvc

--- SuperBuild/CMake/External_ossim.cmake
+++ SuperBuild/CMake/External_ossim.cmake
@@ -21,7 +21,7 @@
 set(OSSIM_CXX_FLAGS  -D__STDC_CONSTANT_MACROS)

 if(MSVC)
-  set(OSSIM_CXX_FLAGS /EHsc)
+  set(OSSIM_CXX_FLAGS "/EHsc /DNOMINMAX")
 endif()

 # archive version


Remove ParaView from the DMG

Remove ParaView from the DMG

--- projects/apple/matviz.bundle.cmake
+++ projects/apple/matviz.bundle.cmake
@@ -16,17 +16,3 @@
                \"${install_location}/plugins\")
    "
    COMPONENT superbuild)
-
-install(CODE "
-     file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}\" USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
-          \"${install_location}/Applications/paraview.app\")
-
-     file(WRITE \"\${CMAKE_INSTALL_PREFIX}/paraview.app/Contents/Resources/qt.conf\"
-                \"\")
-     execute_process(
-       COMMAND ${CMAKE_CURRENT_LIST_DIR}/fixup_bundle.py
-               \"\${CMAKE_INSTALL_PREFIX}/paraview.app\"
-               \"${install_location}/lib\"
-               \"${install_location}/plugins\")
-   "
-   COMPONENT superbuild)


ENH: Add remote modules if they are loaded.

--- module.cmake
+++ module.cmake
@@ -50,6 +50,24 @@
   vtkViewsInfovis
   )

+if(${Powercrust_LOADED})
+  list(APPEND DEPENDS
+    Powercrust
+  )
+endif()
+
+if(${SplineDrivenImageSlicer_LOADED})
+  list(APPEND DEPENDS
+    SplineDrivenImageSlicer
+  )
+endif()
+
+if(${PoissonReconstruction_LOADED})
+  list(APPEND DEPENDS
+    PoissonReconstruction
+  )
+endif()
+
 if(Module_vtkGUISupportQtOpenGL)
   list(APPEND DEPENDS
     vtkGUISupportQtOpenGL


Updated FindTBB.cmake to correctly identify the version of Visual Studio used

--HG--
branch : v1-7

--- CMake/Packages/FindTBB.cmake
+++ CMake/Packages/FindTBB.cmake
@@ -49,13 +49,16 @@
 # to detect the "best" version to use. The user will have to manually
 # select the right files. (Chances are the distributions are shipping their
 # custom version of tbb, anyway, so the problem is probably nonexistant.)
-if (WIN32)
+if (WIN32 AND MSVC)
   set(COMPILER_PREFIX "vc7.1")
-  if (MSVC80)
+  if (MSVC_VERSION EQUAL 1400)
     set(COMPILER_PREFIX "vc8")
   endif ()
-  if (MSVC90)
+  if (MSVC_VERSION EQUAL 1500)
     set(COMPILER_PREFIX "vc9")
+  endif ()
+  if (MSVC_VERSION EQUAL 1600)
+    set(COMPILER_PREFIX "vc10")
   endif ()

   # for each prefix path, add ia32/64\${COMPILER_PREFIX}\lib to the lib search path


COMP: Superbuild - CTKData_DIR is now set using ep_source_dir

CTKDATA_DIR was wrongly set using "${ep_build_dir}/${proj"

Since CTKData is just downloaded its content will be available
using the corresponding source directory

--- CMakeExternals/CTKData.cmake
+++ CMakeExternals/CTKData.cmake
@@ -19,6 +19,6 @@
         BUILD_COMMAND ""
         INSTALL_COMMAND ""
         )
-	  SET(CTKData_DIR ${ep_build_dir}/${proj})
+	  SET(CTKData_DIR ${ep_source_dir}/${proj})
   ENDIF()
 ENDIF()


gitscript.cmake: better clean up

gitscript.cmake: better clean up

--- CMakeModules/gitscript.cmake
+++ CMakeModules/gitscript.cmake
@@ -23,5 +23,6 @@
 string(REGEX REPLACE "#TOOLS_GIT_ID#" "${THIS_GIT_ID}" NEW_CONTENT "${CONTENT}")
 file(WRITE "${OUTPUT}.tmp" "${NEW_CONTENT}")
 file(COPY "${OUTPUT}.tmp" DESTINATION "${OUTPUT}.tmp.x" FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
-execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${OUTPUT}.tmp.x ${OUTPUT})
-execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${OUTPUT}.tmp ${OUTPUT}.tmp.x)
+execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${OUTPUT}.tmp.x/${OUTPUT}.tmp ${OUTPUT})
+execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${OUTPUT}.tmp ${OUTPUT}.tmp.x/${OUTPUT}.tmp)
+execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ${OUTPUT}.tmp.x)


Add style testing to the Python tests

Add style testing to the Python tests

--- plugin.cmake
+++ plugin.cmake
@@ -18,12 +18,14 @@
   python_static_analysis_HistomicsTK_api
   "${PROJECT_SOURCE_DIR}/plugins/HistomicsTK/server"
 )
-
+add_python_style_test(
+  python_static_analysis_HistomicsTK_tests
+  "${PROJECT_SOURCE_DIR}/plugins/HistomicsTK/plugin_tests"
+)
 add_python_style_test(
   python_static_analysis_HistomicsTK_algorithms
   "${PROJECT_SOURCE_DIR}/plugins/HistomicsTK/histomicstk"
 )
-
 add_python_style_test(
   python_static_analysis_HistomicsTK_examples
   "${PROJECT_SOURCE_DIR}/plugins/HistomicsTK/examples"


Recursively invoke cmake --build ${TARGET}_scannable.

This ensures that we don't always run the ${TARGET}_scannable
dependency - only when ${TARGET}.stamp is out of date

--- PolysquareCommon.cmake
+++ PolysquareCommon.cmake
@@ -613,13 +613,23 @@
     add_custom_target (${TARGET}_scannable
                        SOURCES ${SOURCES_SOURCES})

+    # Recursively invoke the build system to build the ${TARGET}_scannable
+    # target. The second command will not be run if ${SOURCES_SCANNED_STAMP}
+    # exists and is up to date.
+    #
+    # This is probably a horrible hack, however the target depdencies
+    # of this custom command are unconditionally run otherwise.
     add_custom_command (OUTPUT ${SOURCES_SCANNED_STAMP}
                         COMMAND
                         ${CMAKE_COMMAND} -E touch ${SOURCES_SCANNED_STAMP}
+                        COMMAND
+                        ${CMAKE_COMMAND}
+                        --build ${CMAKE_BINARY_DIR}
+                        --target ${TARGET}_scannable
                         DEPENDS
-                        ${TARGET}_scannable
                         ${SOURCES_SOURCES}
-                        COMMENT "Checking source group: ${TARGET}")
+                        COMMENT "Checking source group: ${TARGET}"
+                        WORKING_DIRECTORY ${CMAKE_BINARY_DIR})

     add_custom_target (${TARGET} ALL
                        DEPENDS ${SOURCES_SCANNED_STAMP})


updated date

updated date

--- SuperBuild/External_CCPi-FrameworkPlugins.cmake
+++ SuperBuild/External_CCPi-FrameworkPlugins.cmake
@@ -2,8 +2,8 @@
 # Author: Benjamin A Thomas
 # Author: Kris Thielemans
 # Author: Edoardo Pasca
-# Copyright 2017 University College London
-# Copyright 2017 STFC
+# Copyright 2018 University College London
+# Copyright 2018 STFC
 #
 # This file is part of the CCP PETMR Synergistic Image Reconstruction Framework (SIRF) SuperBuild.
 #


COMP: Set CTEST_GIT_UPDATE_CUSTOM, hopefully fixing "Cannot find UpdateCommand or GITCommand configuration key" at https://stingray.researchlumc.nl/job/SuperElastix/job/SuperElastix/job/SELX-163-GitHub-CDash-Jenkins-integration/7/consoleText

--- SuperBuild/CTest.cmake
+++ SuperBuild/CTest.cmake
@@ -36,6 +36,11 @@
     OUTPUT_VARIABLE SELX_GIT_BRANCH_NAME
 )

+if(NOT DEFINED CTEST_GIT_COMMAND)
+  find_program(CTEST_GIT_COMMAND NAMES git git.cmd)
+endif()
+set(CTEST_GIT_UPDATE_CUSTOM "${CTEST_GIT_COMMAND}" pull origin)
+
 set(CTEST_BUILD_NAME "${SELX_GIT_BRANCH_NAME};Build;commit=SHA\\:${SELX_GIT_COMMIT_SHA}")

 set(CTEST_CMAKE_GENERATOR "Unix Makefiles")


[CMake] LLVMProcessSources.cmake: Add include(CMakeParseArguments).

I didn't realize that cmake_parse_arguments() would require explicit inclusion.

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

--- cmake/modules/LLVMProcessSources.cmake
+++ cmake/modules/LLVMProcessSources.cmake
@@ -1,4 +1,5 @@
 include(AddFileDependencies)
+include(CMakeParseArguments)

 function(llvm_replace_compiler_option var old new)
   # Replaces a compiler option or switch `old' in `var' by `new'.


write debug output

write debug output

--- cmake/megamol_build_info/megamol_build_info_script.cmake
+++ cmake/megamol_build_info/megamol_build_info_script.cmake
@@ -92,3 +92,10 @@

 # Write to sourcefile
 configure_file(${INFO_SRC_DIR}/megamol_build_info_buildtime.cpp.in ${CMAKE_BINARY_DIR}/megamol_build_info/megamol_build_info_buildtime.cpp @ONLY)
+
+# Debug
+file(READ ${CMAKE_BINARY_DIR}/megamol_build_info/megamol_build_info_buildtime.cpp FILE_DEBUG)
+message("########################################")
+message(${FILE_DEBUG})
+message("########################################")
+string_split_lines(MM_CMAKE_CACHE "${MM_CMAKE_CACHE}")


bug-5919-CorrespondingPointSetsWidget adding missing cmake entry

--- Modules/QmitkExt/files.cmake
+++ Modules/QmitkExt/files.cmake
@@ -97,6 +97,9 @@
  QmitkPointListView.cpp
  QmitkPointListWidget.cpp
  QmitkPointListViewWidget.cpp
+ QmitkCorrespondingPointSetsView.cpp
+ QmitkCorrespondingPointSetsModel.cpp
+ QmitkCorrespondingPointSetsWidget.cpp
  QmitkVideoBackground.cpp
  QmitkHotkeyLineEdit.cpp
  QmitkErodeToolGUI.cpp
@@ -192,6 +195,9 @@
  QmitkPointListView.h
  QmitkPointListWidget.h
  QmitkPointListViewWidget.h
+ QmitkCorrespondingPointSetsView.h
+ QmitkCorrespondingPointSetsModel.h
+ QmitkCorrespondingPointSetsWidget.h
  QmitkHistogramWidget.h
  QmitkVideoBackground.h
  QmitkFileChooser.h


Remove Robust and Descriptive statistics.

They were for the most part unused in the main library, and caused some
interop problems because of the use of RNGs. This gets rid of a
significant amount of LoC (~1k), as well as the only uses of
std::normal_distribution and std::poisson_distribution.

Also converts the benchmarks in gauss_blur_test to use gbench.

No BPP or pnorm changes.

```
Encoding      kPixels    Bytes          BPP  E MP/s  D MP/s     Max norm        pnorm       BPP*pnorm   Bugs
------------------------------------------------------------------------------------------------------------
jxl:d0.7        13270  3401128    2.0503469   3.860  23.290   1.47008669   0.48388256  0.992127114835      0
jxl:d1          13270  2682333    1.6170262   4.023  24.737   1.78285837   0.61856733  1.000239584869      0
jxl:d2          13270  1693780    1.0210838   4.286  25.686   3.12266779   0.98560314  1.006383363499      0
jxl:d4          13270  1017240    0.6132362   3.840  19.237   5.74765110   1.58872606  0.974264363420      0
jxl:d8          13270   580162    0.3497467   3.691  18.627   9.35825157   2.58073121  0.902602273036      0
Aggregate:      13270  1555941    0.9379884   3.935  22.126   3.37857946   1.03878140  0.974364851568      0

Encoding      kPixels    Bytes          BPP  E MP/s  D MP/s     Max norm        pnorm       BPP*pnorm   Bugs
------------------------------------------------------------------------------------------------------------
jxl:d0.7        13270  3401128    2.0503469   3.714  24.224   1.47008669   0.48388256  0.992127114835      0
jxl:d1          13270  2682333    1.6170262   3.867  25.641   1.78285837   0.61856733  1.000239584869      0
jxl:d2          13270  1693780    1.0210838   4.263  24.652   3.12266779   0.98560314  1.006383363499      0
jxl:d4          13270  1017240    0.6132362   3.731  20.015   5.74765110   1.58872606  0.974264363420      0
jxl:d8          13270   580162    0.3497467   3.645  18.540   9.35825157   2.58073121  0.902602273036      0
Aggregate:      13270  1555941    0.9379884   3.838  22.434   3.37857946   1.03878140  0.974364851568      0
```

--- lib/jxl_tests.cmake
+++ lib/jxl_tests.cmake
@@ -1,5 +1,3 @@
-# Copyright (c) the JPEG XL Project Authors. All rights reserved.
-#
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.


[Build] Towards a unique CMake support file for all the projects. In more details, the AirSched component has been renamed into AirTSP.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -2,7 +2,7 @@
 ## CMake Macros for an embeddable project
 ##
 ## Author: Denis Arnaud
-## Date: June 2013
+## Date: July 2011
 #######################################################################

@@ -69,6 +69,7 @@
 #  * INSTALL_LIB_DIR     - Installation directory for the libraries
 #  * INSTALL_PY_LIB_DIR  - Installation directory for the Python libraries
 #  * INSTALL_BIN_DIR     - Installation directory for the binaries
+#  * INSTALL_LIBEXEC_DIR - Installation directory for the internal executables
 #  * INSTALL_INCLUDE_DIR - Installation directory for the header files
 #  * INSTALL_DATA_DIR    - Installation directory for the data files
 #  * INSTALL_SAMPLE_DIR  - Installation directory for the (CSV) sample files
@@ -111,10 +112,12 @@

   # Offer the user the choice of overriding the installation directories
   set (INSTALL_LIB_DIR ${LIBDIR} CACHE PATH
-    "Installation directory for libraries")
+	"Installation directory for libraries")
   set (INSTALL_PY_LIB_DIR ${LIBDIR}/python${PYTHONLIBS_VERSION}/${PROJECT_NAME}
 	CACHE PATH "Installation directory for Python libraries")
   set (INSTALL_BIN_DIR bin CACHE PATH "Installation directory for executables")
+  set (INSTALL_LIBEXEC_DIR CACHE PATH
+	"Installation directory for internal executables")
   set (INSTALL_INCLUDE_DIR include CACHE PATH
     "Installation directory for header files")
   set (INSTALL_DATA_DIR share CACHE PATH "Installation directory for data files")
@@ -126,15 +129,15 @@
   option (RUN_GCOV "Set to OFF to skip code coverage" ${_run_gcov})

   # Make relative paths absolute (needed later on)
-  foreach (_path_type LIB PY_LIB BIN INCLUDE DATA SAMPLE)
+  foreach (_path_type LIB PY_LIB BIN LIBEXEC INCLUDE DATA SAMPLE)
     set (var INSTALL_${_path_type}_DIR)
     if (NOT IS_ABSOLUTE "${${var}}")
       set (${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
     endif ()
   endforeach (_path_type)

-  # When the install directory is the canonical one (i.e., /usr), the
-  # run-path/rpath must be set in all the (executable and library)
+  # When the install directory is not the canonical one (i.e., /usr),
+  # the run-path/rpath must be set in all the (executable and library)
   # binaries, so that the dynamic loader can find the dependencies
   # without the user having to set the LD_LIBRARY_PATH environment
   # variable.
@@ -162,7 +165,7 @@
     unset (DOC_NEWS_FILE)
   endif (NOT EXISTS ${DOC_NEWS_FILE})
   set (BASICDOC_FILES AUTHORS ${DOC_NEWS_FILE} README ${DOC_INSTALL_FILE})
-  set (BASICDOC_PATH "share/doc/${PACKAGE}-${PACKAGE_VERSION}")
+  set (BASICDOC_PATH "share/doc/${PACKAGE}")

 endmacro (set_project_options)

@@ -358,6 +361,10 @@
       get_curses (${_arg_version})
     endif (${_arg_lower} STREQUAL "curses")

+    if (${_arg_lower} STREQUAL "sqlite")
+      get_sqlite (${_arg_version})
+    endif (${_arg_lower} STREQUAL "sqlite")
+
     if (${_arg_lower} STREQUAL "mysql")
       get_mysql (${_arg_version})
     endif (${_arg_lower} STREQUAL "mysql")
@@ -590,12 +597,21 @@
   set (Boost_USE_STATIC_LIBS OFF)
   set (Boost_USE_MULTITHREADED ON)
   set (Boost_USE_STATIC_RUNTIME OFF)
-  set (BOOST_REQUIRED_COMPONENTS
-    regex program_options date_time iostreams serialization filesystem
-    unit_test_framework python)
+  set (BOOST_REQUIRED_COMPONENTS_FOR_LIB
+    date_time random iostreams serialization filesystem system
+	locale python regex)
+  set (BOOST_REQUIRED_COMPONENTS_FOR_BIN program_options)
+  set (BOOST_REQUIRED_COMPONENTS_FOR_TST unit_test_framework)
+  set (BOOST_REQUIRED_COMPONENTS ${BOOST_REQUIRED_COMPONENTS_FOR_LIB}
+	${BOOST_REQUIRED_COMPONENTS_FOR_BIN} ${BOOST_REQUIRED_COMPONENTS_FOR_TST})

   # The first check is for the required components.
   find_package (Boost COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
+
+  # Fix a bug for some old CMake package finder scripts (e.g., on Fedora 15)
+  if (Boost_VERSION)
+    set (Boost_FOUND ON)
+  endif (Boost_VERSION)

   # The second check is for the required version (FindBoostWrapper.cmake is
   # provided by us). Indeed, the Fedora/RedHat FindBoost.cmake does not seem
@@ -606,21 +622,21 @@
     # Update the list of include directories for the project
     include_directories (${Boost_INCLUDE_DIRS})

-    # Update the list of dependencies for the project
-    list (APPEND PROJ_DEP_LIBS_FOR_LIB
-      ${Boost_REGEX_LIBRARY} ${Boost_IOSTREAMS_LIBRARY}
-	  ${Boost_SERIALIZATION_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}
-	  ${Boost_DATE_TIME_LIBRARY} ${Boost_PYTHON_LIBRARY})
-    list (APPEND PROJ_DEP_LIBS_FOR_BIN
-	  ${Boost_REGEX_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY})
-    list (APPEND PROJ_DEP_LIBS_FOR_TST ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
-
-    # For display purposes
-    set (BOOST_REQUIRED_LIBS
-      ${Boost_REGEX_LIBRARY} ${Boost_IOSTREAMS_LIBRARY}
-	  ${Boost_SERIALIZATION_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}
-	  ${Boost_DATE_TIME_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}
-	  ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${Boost_PYTHON_LIBRARY})
+	# For display purposes
+    set (BOOST_REQUIRED_LIBS "")
+
+    # Update the list of library dependencies for the project
+	register_boost_lib ("PROJ_DEP_LIBS_FOR_LIB"
+	  "${BOOST_REQUIRED_COMPONENTS_FOR_LIB}")
+
+    # Update the list of binary dependencies for the project
+	register_boost_lib ("PROJ_DEP_LIBS_FOR_BIN"
+	  "${BOOST_REQUIRED_COMPONENTS_FOR_BIN}")
+
+    # Update the list of test dependencies for the project
+	register_boost_lib ("PROJ_DEP_LIBS_FOR_TST"
+	  "${BOOST_REQUIRED_COMPONENTS_FOR_TST}")
+
   endif (Boost_FOUND)

 endmacro (get_boost)
@@ -675,28 +691,28 @@
 #    if the debug one is specified also include debug/optimized keywords
 #    in *_LIBRARIES variable
 function(_protobuf_find_libraries name filename)
-   find_library(${name}_LIBRARY
-       NAMES ${filename}
-       PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Release)
-   mark_as_advanced(${name}_LIBRARY)
-
-   find_library(${name}_LIBRARY_DEBUG
-       NAMES ${filename}
-       PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Debug)
-   mark_as_advanced(${name}_LIBRARY_DEBUG)
-
-   if(NOT ${name}_LIBRARY_DEBUG)
-      # There is no debug library
-      set(${name}_LIBRARY_DEBUG ${${name}_LIBRARY} PARENT_SCOPE)
-      set(${name}_LIBRARIES     ${${name}_LIBRARY} PARENT_SCOPE)
-   else()
-      # There IS a debug library
-      set(${name}_LIBRARIES
-          optimized ${${name}_LIBRARY}
-          debug     ${${name}_LIBRARY_DEBUG}
-          PARENT_SCOPE
+  find_library(${name}_LIBRARY
+    NAMES ${filename}
+    PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Release)
+  mark_as_advanced(${name}_LIBRARY)
+
+  find_library(${name}_LIBRARY_DEBUG
+    NAMES ${filename}
+    PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Debug)
+  mark_as_advanced(${name}_LIBRARY_DEBUG)
+
+  if(NOT ${name}_LIBRARY_DEBUG)
+    # There is no debug library
+    set(${name}_LIBRARY_DEBUG ${${name}_LIBRARY} PARENT_SCOPE)
+    set(${name}_LIBRARIES     ${${name}_LIBRARY} PARENT_SCOPE)
+  else()
+    # There IS a debug library
+    set(${name}_LIBRARIES
+      optimized ${${name}_LIBRARY}
+      debug     ${${name}_LIBRARY_DEBUG}
+      PARENT_SCOPE
       )
-   endif()
+  endif()
 endfunction()

 # ~~~~~~~~~~ Protobuf ~~~~~~~~~
@@ -811,6 +827,28 @@
   endif (CURSES_FOUND)

 endmacro (get_curses)
+
+# ~~~~~~~~~~ SQLite3 ~~~~~~~~~
+macro (get_sqlite)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires SQLite3-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires SQLite3 without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (SQLite3 ${_required_version} REQUIRED)
+  if (SQLITE3_FOUND)
+
+    # Update the list of include directories for the project
+    include_directories (${SQLITE3_INCLUDE_DIR})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${SQLITE3_LIBRARIES})
+  endif (SQLITE3_FOUND)
+
+endmacro (get_sqlite)

 # ~~~~~~~~~~ MySQL ~~~~~~~~~
 macro (get_mysql)
@@ -1337,10 +1375,10 @@
   #    will set CMAKE_CXX_FLAGS as being equal to -O2.
   if (NOT CMAKE_CXX_FLAGS)
 	#set (CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -Werror")
-        if (${RUN_GCOV} STREQUAL "ON")
+    if (${RUN_GCOV} STREQUAL "ON")
 	  set (CMAKE_CXX_FLAGS "-Wall -Werror -fprofile-arcs -ftest-coverage")
-        else (${RUN_GCOV} STREQUAL "ON")
-          set (CMAKE_CXX_FLAGS "-Wall -Werror")
+    else (${RUN_GCOV} STREQUAL "ON")
+      set (CMAKE_CXX_FLAGS "-Wall -Werror")
 	endif (${RUN_GCOV} STREQUAL "ON")
   endif (NOT CMAKE_CXX_FLAGS)
   # Tell the source code the version of Boost (only once)
@@ -1382,6 +1420,7 @@
   set (exec_prefix   ${prefix})
   set (bindir        ${exec_prefix}/bin)
   set (libdir        ${exec_prefix}/${LIBDIR})
+  set (pylibdir	     ${libdir}/python${PYTHONLIBS_VERSION}/${PACKAGE})
   set (libexecdir    ${exec_prefix}/libexec)
   set (sbindir       ${exec_prefix}/sbin)
   set (sysconfdir    ${prefix}/etc)
@@ -1456,7 +1495,7 @@
   if (EXISTS ${PROJ_PATH_CFG_SRC})
     set (PROJ_PATH_CFG ${PROJ_PATH_CFG_DIR}/${MODULE_NAME}-paths.hpp)
     configure_file (${PROJ_PATH_CFG_SRC} ${PROJ_PATH_CFG} @ONLY)
-
+
     # Add the 'hdr_cfg_${MODULE_NAME}' target, depending on the converted header
     add_custom_target (hdr_cfg_${MODULE_NAME} ALL DEPENDS ${PROJ_PATH_CFG})

@@ -1554,6 +1593,10 @@
       set (_layer_dir_name "")
     endif ("${_layer_dir_name}" STREQUAL "./")

+	# Generate the Protobuf stubs/skeletons for that layer
+	layer_generate_protobuf ("${_layer_dir_name}")
+
+	#
     file (GLOB ${MODULE_LIB_TARGET}_${_layer_name}_HEADERS
       RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${_layer_dir_name}*.hpp)
     list (APPEND ${MODULE_LIB_TARGET}_HEADERS
@@ -1690,10 +1733,21 @@

   ##
   # Installation of the library
-  install (TARGETS ${_lib_target}
-    EXPORT ${LIB_DEPENDENCY_EXPORT}
-    LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT runtime)
-
+  string (SUBSTRING ${_lib_short_name} 0 2 _lib_prefix)
+  if ("${_lib_prefix}" STREQUAL "py")
+	# If the library is Python, install it into a dedicated directory
+	message (STATUS "${_lib_short_name} is assumed to be a Python library")
+	install (TARGETS ${_lib_target}
+      EXPORT ${LIB_DEPENDENCY_EXPORT}
+      LIBRARY DESTINATION "${INSTALL_PY_LIB_DIR}" COMPONENT runtime)
+
+  else ("${_lib_prefix}" STREQUAL "py")
+	# Install the library in the standard location
+	install (TARGETS ${_lib_target}
+      EXPORT ${LIB_DEPENDENCY_EXPORT}
+      LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT runtime)
+  endif ("${_lib_prefix}" STREQUAL "py")
+
   # Register, for reporting purpose, the list of libraries to be built
   # and installed for that module
   list (APPEND ${MODULE_NAME}_ALL_LIBS ${_lib_target})
@@ -1814,6 +1868,16 @@
     DESTINATION "${INSTALL_ETC_DIR}" COMPONENT runtime)

 endmacro (module_config_add)
+
+##
+# Installation of Python module scripts (e.g., __init__.py)
+#
+# The parameter is the relative file path of the Python initialiser script
+# to be installed. A typical Python module script is __init__.py
+#
+macro (python_module_add _python_module_file_path)
+  install (FILES ${_python_module_file_path} DESTINATION ${INSTALL_PY_LIB_DIR})
+endmacro (python_module_add)

 ##
 # Add a (Shell, Python, Perl, Ruby, etc) script to be installed.
@@ -2169,7 +2233,7 @@

   ##
   # Installation of the HTML documentation
-  set (DOC_PATH share/doc/${PROJECT_NAME}-${CPACK_PACKAGE_VERSION})
+  set (DOC_PATH share/doc/${PROJECT_NAME})
   # HTML pages
   install (DIRECTORY ${htmldoc_DIR} DESTINATION ${DOC_PATH})
   # PDF reference manual
@@ -2224,9 +2288,9 @@
     foreach (_option_item ${ARGN})
       string (REGEX MATCH "MAN([1-9])" _current_section_tmp "${_option_item}")
       if ("${CMAKE_MATCH_1}" STREQUAL "")
-	list (APPEND _man_arg_MAN${_current_section} ${_option_item})
+		list (APPEND _man_arg_MAN${_current_section} ${_option_item})
       else ("${CMAKE_MATCH_1}" STREQUAL "")
-	set (_current_section "${CMAKE_MATCH_1}")
+		set (_current_section "${CMAKE_MATCH_1}")
       endif ("${CMAKE_MATCH_1}" STREQUAL "")
     endforeach (_option_item ${ARGN})
   endif (${CMAKE_VERSION} VERSION_GREATER 2.8.1)
@@ -2353,6 +2417,7 @@
   set (${PACKAGE_NAME}_INCLUDE_DIRS "${INSTALL_INCLUDE_DIR}")
   set (${PACKAGE_NAME}_BIN_DIR "${INSTALL_BIN_DIR}")
   set (${PACKAGE_NAME}_LIB_DIR "${INSTALL_LIB_DIR}")
+  set (${PACKAGE_NAME}_LIBEXEC_DIR "${INSTALL_LIBEXEC_DIR}")
   set (${PACKAGE_NAME}_PY_LIB_DIR "${INSTALL_PY_LIB_DIR}")
   set (${PACKAGE_NAME}_SAMPLE_DIR "${INSTALL_SAMPLE_DIR}")
   set (${PACKAGE_NAME}_CMAKE_DIR "${LIB_DEPENDENCY_EXPORT_PATH}")
@@ -2398,7 +2463,6 @@
   message (STATUS "  - DOXYGEN_DOT_EXECUTABLE ........ : ${DOXYGEN_DOT_EXECUTABLE}")
   message (STATUS "  - DOXYGEN_DOT_PATH .............. : ${DOXYGEN_DOT_PATH}")
 endmacro (display_doxygen)
-

 # Gcov
 macro (display_gcov)
@@ -2523,6 +2587,17 @@
   endif (CURSES_FOUND)
 endmacro (display_curses)

+# SQLite3
+macro (display_sqlite)
+  if (SQLITE3_FOUND)
+    message (STATUS)
+    message (STATUS "* SQLite3:")
+    message (STATUS "  - SQLITE3_VERSION ................. : ${SQLITE3_VERSION}")
+    message (STATUS "  - SQLITE3_INCLUDE_DIR ............. : ${SQLITE3_INCLUDE_DIR}")
+    message (STATUS "  - SQLITE3_LIBRARIES ............... : ${SQLITE3_LIBRARIES}")
+  endif (SQLITE3_FOUND)
+endmacro (display_sqlite)
+
 # MySQL
 macro (display_mysql)
   if (MYSQL_FOUND)
@@ -2761,14 +2836,14 @@
 ##
 macro (display_doc_generation)
   message (STATUS)
-    message (STATUS "* Documentation to be generated ... :")
-	if (INSTALL_DOC)
-      message (STATUS "  + HTML main page ................ : ${DOXYGEN_OUTPUT_REL}")
-      message (STATUS "  + CSS-related files ............. : ${CSS_ALL_TARGETS}")
-      message (STATUS "  + Image-related files ........... : ${IMG_ALL_TARGETS}")
-      message (STATUS "  + PDF reference manual .......... : ${REFMAN_TEX} => ${REFMAN_PDF}")
-	endif (INSTALL_DOC)
-    message (STATUS "  + Man page sections ............. : ${MAN_ALL_TARGETS}")
+  message (STATUS "* Documentation to be generated ... :")
+  if (INSTALL_DOC)
+    message (STATUS "  + HTML main page ................ : ${DOXYGEN_OUTPUT_REL}")
+    message (STATUS "  + CSS-related files ............. : ${CSS_ALL_TARGETS}")
+    message (STATUS "  + Image-related files ........... : ${IMG_ALL_TARGETS}")
+    message (STATUS "  + PDF reference manual .......... : ${REFMAN_TEX} => ${REFMAN_PDF}")
+  endif (INSTALL_DOC)
+  message (STATUS "  + Man page sections ............. : ${MAN_ALL_TARGETS}")
 endmacro (display_doc_generation)

 ##
@@ -2819,6 +2894,7 @@
   message (STATUS "INSTALL_LIB_DIR ................... : ${INSTALL_LIB_DIR}")
   message (STATUS "INSTALL_PY_LIB_DIR ................ : ${INSTALL_PY_LIB_DIR}")
   message (STATUS "INSTALL_BIN_DIR ................... : ${INSTALL_BIN_DIR}")
+  message (STATUS "INSTALL_LIBEXEC_DIR ............... : ${INSTALL_LIBEXEC_DIR}")
   message (STATUS "CMAKE_INSTALL_RPATH ............... : ${CMAKE_INSTALL_RPATH}")
   message (STATUS "CMAKE_INSTALL_RPATH_USE_LINK_PATH . : ${CMAKE_INSTALL_RPATH_USE_LINK_PATH}")
   message (STATUS "INSTALL_INCLUDE_DIR ............... : ${INSTALL_INCLUDE_DIR}")
@@ -2852,6 +2928,7 @@
   display_xapian ()
   display_readline ()
   display_curses ()
+  display_sqlite ()
   display_mysql ()
   display_soci ()
   display_stdair ()


ENH: CI: PKG: Set CTEST_CMAKE_GENERATOR.

--- CI/main_packages.cmake
+++ CI/main_packages.cmake
@@ -31,7 +31,7 @@
 set ( DEBUG "1" )

 # set ( CTEST_BUILD_CONFIGURATION "Release" )
-# set ( CTEST_CMAKE_GENERATOR "Unix Makefiles" )
+set ( CTEST_CMAKE_GENERATOR "Unix Makefiles" )
 set ( CTEST_BUILD_FLAGS "-j1" )
 set ( CTEST_BUILD_NAME "Packages" )
 set ( CTEST_SITE "${IMAGE_NAME}" )


Now looking for new levmar header file

Now looking for new levmar header file

git-svn-id: 9e9401559e51101c165cdce4d49b411eb20436ed@6111 3d70eeeb-363e-0410-a505-8a46323a89f2

--- CMake/FindLEVMAR.cmake
+++ CMake/FindLEVMAR.cmake
@@ -1,5 +1,6 @@

-FIND_PATH(LEVMAR_INCLUDE_DIR lm.h
+FIND_PATH(LEVMAR_INCLUDE_DIR levmar.h
+  /usr/local/include/levmar
   /usr/local/include
   /usr/include
 )


FindLibRaw: fix access to the version info thanks to LibRaw_INCLUDE_DIR (1749)

According to the includes found in src/raw.imageio/*.cpp, the
LibRaw_INCLUDE_DIR should be a path to 'libraw/libraw_version.h'.

--- src/cmake/modules/FindLibRaw.cmake
+++ src/cmake/modules/FindLibRaw.cmake
@@ -24,7 +24,7 @@
    SET(LibRaw_r_DEFINITIONS ${PC_LIBRAW_R_CFLAGS_OTHER})
 ENDIF()

-FIND_PATH(LibRaw_INCLUDE_DIR libraw.h
+FIND_PATH(LibRaw_INCLUDE_DIR libraw/libraw.h
           HINTS
           ${PC_LIBRAW_INCLUDEDIR}
           ${PC_LibRaw_INCLUDE_DIRS}
@@ -44,7 +44,7 @@
             )

 IF(LibRaw_INCLUDE_DIR)
-   FILE(READ ${LibRaw_INCLUDE_DIR}/libraw_version.h _libraw_version_content)
+   FILE(READ ${LibRaw_INCLUDE_DIR}/libraw/libraw_version.h _libraw_version_content)

    STRING(REGEX MATCH "#define LIBRAW_MAJOR_VERSION[ \t]*([0-9]*)\n" _version_major_match ${_libraw_version_content})
    SET(_libraw_version_major "${CMAKE_MATCH_1}")
@@ -59,7 +59,7 @@
       SET(LibRaw_VERSION_STRING "${_libraw_version_major}.${_libraw_version_minor}.${_libraw_version_patch}")
    ELSE()
       IF(NOT LibRaw_FIND_QUIETLY)
-         MESSAGE(STATUS "Failed to get version information from ${LibRaw_INCLUDE_DIR}/libraw_version.h")
+         MESSAGE(STATUS "Failed to get version information from ${LibRaw_INCLUDE_DIR}/libraw/libraw_version.h")
       ENDIF()
    ENDIF()
 ENDIF()


Update FW: OV9282/9782 img orientation per camera, fix sync mode

--- 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 "078452d0da8f6518880a8a7be4472e8e1aa94585")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "d4c86b3b232f37796293cf0c995d61fa276b9837")

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


px4fmu-v2: disable camera_trigger

px4fmu-v2: disable camera_trigger

due to limited flash space.

--- cmake/configs/nuttx_px4fmu-v2_default.cmake
+++ cmake/configs/nuttx_px4fmu-v2_default.cmake
@@ -27,7 +27,7 @@
 	drivers/barometer/ms5611
 	#drivers/blinkm
 	#drivers/bst
-	drivers/camera_trigger
+	#drivers/camera_trigger
 	#drivers/differential_pressure/ets
 	drivers/differential_pressure/ms4525
 	drivers/differential_pressure/ms5525


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

This reverts commit c0484b6948e139207a3e211b625697872192839f.

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


Fix for ROOT-8967 (bis+)

Fix for ROOT-8967 (bis+)

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -910,6 +910,8 @@
                -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
                -DENABLE_PYTHON=OFF
                -DENABLE_CEPH=OFF
+    INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install
+            COMMAND ${CMAKE_COMMAND} -E copy_directory <INSTALL_DIR>/include/xrootd <INSTALL_DIR>/include
     LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
     BUILD_BYPRODUCTS ${XROOTD_LIBRARIES}
   )


Allow to use builtin-tbb on Windows

Allow to use builtin-tbb on Windows

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1197,24 +1197,53 @@
   elseif(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
     set(_tbb_compiler compiler=gcc)
   endif()
-  ROOT_ADD_CXX_FLAG(_tbb_cxxflags -mno-rtm)
-  set(TBB_LIBRARIES ${CMAKE_BINARY_DIR}/lib/libtbb${CMAKE_SHARED_LIBRARY_SUFFIX})
-  ExternalProject_Add(
-    TBB
-    URL ${lcgpackages}/tbb${tbb_version}.tar.gz
-    URL_HASH SHA256=780baf0ad520f23b54dd20dc97bf5aae4bc562019e0a70f53bfc4c1afec6e545
-    INSTALL_DIR ${CMAKE_BINARY_DIR}
-    CONFIGURE_COMMAND ""
-    BUILD_COMMAND make ${_tbb_compiler} CXXFLAGS=${_tbb_cxxflags} CPLUS=${CMAKE_CXX_COMPILER} CONLY=${CMAKE_C_COMPILER}
-    INSTALL_COMMAND ${CMAKE_COMMAND} -Dinstall_dir=<INSTALL_DIR> -Dsource_dir=<SOURCE_DIR>
-                                     -P ${CMAKE_SOURCE_DIR}/cmake/scripts/InstallTBB.cmake
-    INSTALL_COMMAND ""
-    BUILD_IN_SOURCE 1
-    LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
-    BUILD_BYPRODUCTS ${TBB_LIBRARIES}
-  )
+  if(MSVC)
+    set(TBB_LIBRARIES ${CMAKE_BINARY_DIR}/lib/tbb.lib)
+    set(vsdir "vs2012")
+    ExternalProject_Add(
+      TBB
+      URL ${lcgpackages}/tbb${tbb_version}.tar.gz
+      URL_HASH SHA256=780baf0ad520f23b54dd20dc97bf5aae4bc562019e0a70f53bfc4c1afec6e545
+      INSTALL_DIR ${CMAKE_BINARY_DIR}
+      CONFIGURE_COMMAND devenv.exe /Upgrade build/${vsdir}/makefile.sln
+      BUILD_COMMAND MSBuild.exe build/${vsdir}/makefile.sln /p:Configuration=$<CONFIG> /p:Platform=Win32
+      INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbb.dll ${CMAKE_BINARY_DIR}/bin/
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbbmalloc.dll ${CMAKE_BINARY_DIR}/bin/
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbbmalloc_proxy.dll ${CMAKE_BINARY_DIR}/bin/
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbb.lib ${CMAKE_BINARY_DIR}/lib/
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbbmalloc.lib ${CMAKE_BINARY_DIR}/lib/
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbbmalloc_proxy.lib ${CMAKE_BINARY_DIR}/lib/
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbb.pdb ${CMAKE_BINARY_DIR}/bin/
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbbmalloc.pdb ${CMAKE_BINARY_DIR}/bin/
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/$<CONFIG>/tbbmalloc_proxy.pdb ${CMAKE_BINARY_DIR}/bin/
+              COMMAND ${CMAKE_COMMAND} -Dinstall_dir=<INSTALL_DIR> -Dsource_dir=<SOURCE_DIR>
+                                       -P ${CMAKE_SOURCE_DIR}/cmake/scripts/InstallTBB.cmake
+      BUILD_IN_SOURCE 1
+      LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
+      BUILD_BYPRODUCTS ${TBB_LIBRARIES}
+    )
+    install(DIRECTORY ${CMAKE_BINARY_DIR}/bin/ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries FILES_MATCHING PATTERN "tbb*")
+    install(DIRECTORY ${CMAKE_BINARY_DIR}/lib/ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries FILES_MATCHING PATTERN "tbb*")
+  else()
+    ROOT_ADD_CXX_FLAG(_tbb_cxxflags -mno-rtm)
+    set(TBB_LIBRARIES ${CMAKE_BINARY_DIR}/lib/libtbb${CMAKE_SHARED_LIBRARY_SUFFIX})
+    ExternalProject_Add(
+      TBB
+      URL ${lcgpackages}/tbb${tbb_version}.tar.gz
+      URL_HASH SHA256=780baf0ad520f23b54dd20dc97bf5aae4bc562019e0a70f53bfc4c1afec6e545
+      INSTALL_DIR ${CMAKE_BINARY_DIR}
+      CONFIGURE_COMMAND ""
+      BUILD_COMMAND make ${_tbb_compiler} CXXFLAGS=${_tbb_cxxflags} CPLUS=${CMAKE_CXX_COMPILER} CONLY=${CMAKE_C_COMPILER}
+      INSTALL_COMMAND ${CMAKE_COMMAND} -Dinstall_dir=<INSTALL_DIR> -Dsource_dir=<SOURCE_DIR>
+                                       -P ${CMAKE_SOURCE_DIR}/cmake/scripts/InstallTBB.cmake
+      INSTALL_COMMAND ""
+      BUILD_IN_SOURCE 1
+      LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
+      BUILD_BYPRODUCTS ${TBB_LIBRARIES}
+    )
+    install(DIRECTORY ${CMAKE_BINARY_DIR}/lib/ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries FILES_MATCHING PATTERN "libtbb*")
+  endif()
   set(TBB_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/include)
-  install(DIRECTORY ${CMAKE_BINARY_DIR}/lib/ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries FILES_MATCHING PATTERN "libtbb*")
   set(TBB_TARGET TBB)
 endif()


Make SST dependent on MPI for now

Make SST dependent on MPI for now

--- cmake/DetectOptions.cmake
+++ cmake/DetectOptions.cmake
@@ -126,13 +126,17 @@

 # Sst
 if(ADIOS2_USE_SST STREQUAL AUTO)
-  find_package(EVPATH)
-elseif (ADIOS2_USE_SST)
+  if(ADIOS2_HAVE_MPI)
+    find_package(EVPATH)
+  endif()
+elseif(ADIOS2_USE_SST)
+  if(NOT ADIOS2_HAVE_MPI)
+    message(FATAL_ERROR "SST currently requires MPI to be available")
+  endif()
   find_package(EVPATH REQUIRED)
 endif()
-
-if (EVPATH_FOUND)
-  set (ADIOS2_HAVE_SST TRUE)
+if(EVPATH_FOUND)
+  set(ADIOS2_HAVE_SST TRUE)
 endif()

 #SysV IPC


Updated XLink to tcpip_driver branch

Updated XLink to tcpip_driver branch

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

 hunter_config(
     XLink
-    VERSION "luxonis-2021.2-develop"
-    URL "https://github.com/luxonis/XLink/archive/765a561f3a7201c7780b132e813c2498c37859d5.tar.gz"
-    SHA1 "a95453d70d5e2c08eb39c23547f87510229b6bed"
+    VERSION "luxonis-2021.2-tcpip_driver"
+    URL "https://github.com/luxonis/XLink/archive/e810cf7e9035b31b7ec59fdb48edb271383a4c91.tar.gz"
+    SHA1 "8947073ca31d1d2f94f72c0a249a5dc8a25119fd"
 )

 hunter_config(


relax a too strict assertion in AO derivative evaluation

--- cmake/custom/balboa.cmake
+++ cmake/custom/balboa.cmake
@@ -4,7 +4,7 @@
     balboa
     PREFIX "${PROJECT_BINARY_DIR}/balboa"
     GIT_REPOSITORY https://github.com/bast/balboa.git
-    GIT_TAG c095e8ccf8fa797a55114723b1705e11751158b8
+    GIT_TAG f7c0e4377e50847fadb88c24bc08d53e887f499b
     INSTALL_COMMAND true  # currently no install command
     CMAKE_ARGS "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
     )


don't be so noisy about those symlinks.

don't be so noisy about those symlinks.

--- cmake/enable_python.cmake
+++ cmake/enable_python.cmake
@@ -48,7 +48,7 @@

     foreach(pkg ${${pkg_name}_PACKAGES})
       get_filename_component(name ${pkg} NAME)
-      execute_process(COMMAND /bin/ln -s
+      execute_process(COMMAND /bin/ln -sf
         ${CMAKE_CURRENT_SOURCE_DIR}/${pkg} ${CMAKE_BINARY_DIR}/lib/${name})
     endforeach()

@@ -61,7 +61,7 @@
       endif()
       if(NOT EXISTS ${CMAKE_BINARY_DIR}/bin/${name})
         message(STATUS "   Making toplevel symlink for python script ${name}")
-        execute_process(COMMAND /bin/ln -s
+        execute_process(COMMAND /bin/ln -sf
           ${CMAKE_CURRENT_SOURCE_DIR}/${script} ${CMAKE_BINARY_DIR}/bin/${name})
       endif()
     endforeach()


add more info to version.txt, test=develop (#24551)

--- cmake/inference_lib.cmake
+++ cmake/inference_lib.cmake
@@ -276,11 +276,12 @@
     if(WITH_GPU)
         file(APPEND ${version_file}
                 "CUDA version: ${CUDA_VERSION}\n"
-                "CUDNN version: v${CUDNN_MAJOR_VERSION}\n")
-    endif()
+                "CUDNN version: v${CUDNN_MAJOR_VERSION}.${CUDNN_MINOR_VERSION}\n")
+    endif()
+    file(APPEND ${version_file} "CXX compiler version: ${CMAKE_CXX_COMPILER_VERSION}\n")
     if(TENSORRT_FOUND)
         file(APPEND ${version_file}
-                "WITH_TENSORRT: ${TENSORRT_FOUND}\n")
+                "WITH_TENSORRT: ${TENSORRT_FOUND}\n" "TensorRT version: v${TENSORRT_MAJOR_VERSION}\n")
     endif()

 endfunction()


Build system: Improve DROP_GTK_PLUS_2_BUILDS WARNING messages

epa_builds necessarily drop GTK+2 system components of the build which
clash with GTK+3 that is built and used by epa_build.  Improve warning
messages for this case (which forces, for example, PLD_xcairo to
be disabled).

--- cmake/modules/cairo.cmake
+++ cmake/modules/cairo.cmake
@@ -50,6 +50,7 @@

 # Turn off PLD_xcairo if gtk+2 dependencies need to be dropped.
 if(DROP_GTK_PLUS_2_BUILDS)
+  message(STATUS "DROP_GTK_PLUS_2_BUILDS = ${DROP_GTK_PLUS_2_BUILDS} means must disable PLD_xcairo")
   set(PLD_xcairo OFF CACHE BOOL "Enable xcairo device" FORCE)
 endif(DROP_GTK_PLUS_2_BUILDS)

@@ -122,6 +123,7 @@
     endif(NUMERICAL_PANGOCAIRO_VERSION LESS "${NUMERICAL_PANGOCAIRO_MINIMUM_VERSION}")
     set(cairo_RPATH ${linkdir})
     filter_rpath(cairo_RPATH)
+
     if(PLD_xcairo AND X11_COMPILE_FLAGS)
       # Blank-delimited required.
       string(REGEX REPLACE ";" " "
@@ -129,11 +131,13 @@
         )
       set(cairo_LINK_FLAGS ${linkflags} ${X11_LIBRARIES})
     else(PLD_xcairo AND X11_COMPILE_FLAGS)
-      message(STATUS
-        "WARNING: X windows not found. Setting xcairo driver to OFF."
-        )
-      # Blank-delimited required.
-      set(PLD_xcairo OFF CACHE BOOL "Enable xcairo device" FORCE)
+      if(PLD_xcairo)
+	message(STATUS
+          "WARNING: X windows not found. Setting xcairo driver to OFF."
+          )
+	# Blank-delimited required.
+	set(PLD_xcairo OFF CACHE BOOL "Enable xcairo device" FORCE)
+      endif(PLD_xcairo)
       # now deal with remaining cairo devices.
       string(REGEX REPLACE ";" " " cairo_COMPILE_FLAGS "${cflags}")
       set(cairo_LINK_FLAGS ${linkflags})


Hardening of rosbuild_lite.  Find libraries via find_library so's you've got full paths and can error out at cmake time, not at link time.

--- cmake/rosbuild_lite.cmake
+++ cmake/rosbuild_lite.cmake
@@ -1,36 +1,85 @@
-macro (rospack VAR)
-  if(NOT ${VAR}_CACHED)
-    execute_process(COMMAND /usr/bin/env rospack ${ARGN}
-      OUTPUT_VARIABLE ${VAR}
+find_program(ROSPACK_EXECUTABLE rospack DOC "the rospack executable.")
+
+macro (rospack VAR COMMAND PACKAGE)
+  set(cachevar ROSPACK_${PACKAGE}_${COMMAND})
+  set(${cachevar} "not-run-yet-NOTFOUND" CACHE INTERNAL "")
+  if(NOT ${cachevar})
+    execute_process(COMMAND ${ROSPACK_EXECUTABLE} ${COMMAND} ${PACKAGE}
+      OUTPUT_VARIABLE ROSPACK_OUT
       ERROR_VARIABLE rospack_error
       OUTPUT_STRIP_TRAILING_WHITESPACE
+      ERROR_STRIP_TRAILING_WHITESPACE
       )
+
     if(rospack_error)
-        message(STATUS "Is your path setup correctly for ROS?\nrospack failed:${rospack_error}")
+        message(STATUS "***")
+        message(STATUS "*** rospack ${COMMAND} ${PACKAGE} failed: ${rospack_error}")
+        message(STATUS "***")
+        set(${cachevar} "ROSPACK_${PACKAGE}_${COMMAND}-NOTFOUND"
+          CACHE INTERNAL "rospack output for rospack ${PACKAGE} ${COMMAND}")
     else()
-        unset(${VAR}_NOTFOUND)
-        separate_arguments(${VAR} UNIX_COMMAND ${${VAR}})
-        set(${VAR} ${${VAR}} CACHE STRING "${VAR} value")
-        set(${VAR}_CACHED TRUE CACHE BOOL "${VAR} cached flag")
-        #message(STATUS "Found ${VAR}.")
+        separate_arguments(ROSPACK_SEPARATED UNIX_COMMAND ${ROSPACK_OUT})
+        set(${cachevar} ${ROSPACK_SEPARATED} CACHE INTERNAL "value")
+        set(${VAR} ${ROSPACK_SEPARATED} CACHE INTERNAL "" FORCE)
+        # message("${VAR} == ${${VAR}}")
     endif()
   else()
-    #message(STATUS "BANG! Using cached ${VAR}")
+    set(${VAR} "${${cachevar}}" CACHE INTERNAL "" FORCE)
   endif()
 endmacro()

-macro (find_ros_package NAME)
-  rospack(${NAME}_INCLUDES cflags-only-I ${NAME})
-  if(rospack_error)
-  else()
-    set(${NAME}_FOUND TRUE)
-    include_directories(${${NAME}_INCLUDES})
-    rospack(${NAME}_DEFINITIONS cflags-only-other ${NAME})
-    foreach(DEF ${${NAME}_DEFINITIONS})
+macro (find_ros_package PACKAGE)
+  rospack(${PACKAGE}_DIR find ${PACKAGE})
+
+  if(NOT ${PACKAGE}_DIR)
+    message(STATUS "Could not find package ${PACKAGE} via rosmake")
+  elseif(NOT ${PACKAGE}_FOUND)
+    message(STATUS "Finding ROS package ${PACKAGE} via rospack and ROS environment variables...")
+    rospack(${PACKAGE}_INCLUDE_DIRS cflags-only-I ${PACKAGE})
+    include_directories(${${PACKAGE}_INCLUDE_DIRS})
+    rospack(${PACKAGE}_DEFINITIONS cflags-only-other ${PACKAGE})
+    foreach(DEF ${${PACKAGE}_DEFINITIONS})
       add_definitions(" ${DEF}")
     endforeach()
-    rospack(${NAME}_LIBRARY_DIRS libs-only-L ${NAME})
-    rospack(${NAME}_LIBRARIES libs-only-l ${NAME})
-    link_directories(${${NAME}_LIBRARY_DIRS})
+    rospack(libdirs libs-only-L ${PACKAGE})
+    rospack(libnames libs-only-l ${PACKAGE})
+    set(${PACKAGE}_LIBRARIES "" CACHE STRING "libs to link against when depending on ${PACKAGE}" FORCE)
+
+    # message(STATUS "Finding libraries ${libnames}")
+    # message(STATUS "in directories    ${libdirs}")
+    #foreach(p ${libdirs})
+    #  message("bing=${p}")
+    #endforeach()
+    foreach(libname ${libnames})
+      #message("finding ${libname}")
+      find_library(${libname}_LIBRARY
+        NAMES ${libname}
+        PATHS ${libdirs}
+        NO_DEFAULT_PATH
+        )
+      find_library(${libname}_LIBRARY ${libname})
+      # message("${libname}_LIBRARY ${${libname}_LIBRARY}")
+      if (NOT ${libname}_LIBRARY)
+        message(FATAL_ERROR "uh oh ${PACKAGE} ${libname} found us ${thelib}")
+      endif()
+      list(APPEND ${PACKAGE}_LIBRARIES ${${libname}_LIBRARY})
+      # link_directories(${${PACKAGE}_LIBRARY_DIRS})
+    endforeach()
+    # message("${PACKAGE}_LIBRARIES ${${PACKAGE}_LIBRARIES}")
   endif()
+
+
+  list(LENGTH ${PACKAGE}_LIBRARIES nlibs)
+  list(LENGTH ${PACKAGE}_INCLUDE_DIRS nincludes)
+  list(LENGTH ${PACKAGE}_DEFINITIONS ndefs)
+
+  if (${PACKAGE}_DIR)
+    message(STATUS "+ ${PACKAGE} at ${${PACKAGE}_DIR}")
+    message(STATUS "+   ${nlibs} libraries, ${nincludes} include directories, ${ndefs} compile definitions")
+    set(${PACKAGE}_FOUND TRUE CACHE INTERNAL "" FORCE)
+  else()
+    message(STATUS "+ ${PACKAGE}: NOT FOUND")
+    set(${PACKAGE}_FOUND FALSE CACHE INTERNAL "" FORCE)
+  endif()
+
 endmacro()


Change macro reldir to "share/deal.II/cmake"

--- cmake/setup_deal_ii.cmake
+++ cmake/setup_deal_ii.cmake
@@ -124,7 +124,7 @@
 SET_IF_EMPTY(DEAL_II_LIBRARY_RELDIR "lib${LIB_SUFFIX}")
 SET_IF_EMPTY(DEAL_II_PROJECT_CONFIG_RELDIR "${DEAL_II_LIBRARY_RELDIR}/cmake/${DEAL_II_PROJECT_CONFIG_NAME}")
 SET_IF_EMPTY(DEAL_II_SHARE_RELDIR "share/${DEAL_II_PACKAGE_NAME}")
-SET_IF_EMPTY(DEAL_II_CMAKE_MACROS_RELDIR "${DEAL_II_SHARE_RELDIR}/cmake/macros")
+SET_IF_EMPTY(DEAL_II_CMAKE_MACROS_RELDIR "${DEAL_II_SHARE_RELDIR}/cmake")
 #
 # ... but install the documentation into prominent places:
 #


cmake: fix the creation dummy main to avoid rebuilding

--- tools/cmake/idf_functions.cmake
+++ tools/cmake/idf_functions.cmake
@@ -188,7 +188,10 @@
         # Create a dummy file to work around CMake requirement of having a source
         # file while adding an executable
         add_executable(${exe_target} "${CMAKE_CURRENT_BINARY_DIR}/dummy_main_src.c")
-        file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy_main_src.c)
+        add_custom_command(OUTPUT dummy_main_src.c
+            COMMAND ${CMAKE_COMMAND} -E touch dummy_main_src.c
+            WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+            VERBATIM)

         add_custom_target(dummy_main_src DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/dummy_main_src.c)


Add emitc config

Add emitc config

--- build_tools/cmake/iree_cross_compile.cmake
+++ build_tools/cmake/iree_cross_compile.cmake
@@ -71,6 +71,8 @@
   # LINT.IfChange(iree_cross_compile_options)
   iree_to_bool(config_enable_runtime_tracing "${IREE_${config_name}_ENABLE_RUNTIME_TRACING}")
   iree_to_bool(config_enable_llvm "${IREE_${config_name}_ENABLE_LLVM}")
+  iree_to_bool(config_enable_emitc "${IREE_${config_name}_ENABLE_EMITC}")
+
   iree_to_bool(config_build_compiler "${IREE_${config_name}_BUILD_COMPILER}")
   iree_to_bool(config_build_tests "${IREE_${config_name}_BUILD_TESTS}")
   iree_to_bool(config_build_docs "${IREE_${config_name}_BUILD_DOCS}")
@@ -93,6 +95,7 @@
         -DCMAKE_CXX_COMPILER="${config_cxx_compiler}"
         -DIREE_ENABLE_RUNTIME_TRACING=${config_enable_runtime_tracing}
         -DIREE_ENABLE_LLVM=${config_enable_llvm}
+        -DIREE_ENABLE_EMITC=${config_enable_emitc}
         -DIREE_BUILD_COMPILER=${config_build_compiler}
         -DIREE_BUILD_TESTS=${config_build_tests}
         -DIREE_BUILD_DOCS=${config_build_docs}


More debug messages.

More debug messages.

--- CPM.cmake
+++ CPM.cmake
@@ -419,6 +419,7 @@
   # Use CPM_KV_LIST_MOD_VERSION_MAP to propogate constraints up into the
   # parent CPM_AddModule function's namespace. CPM_AddModule will
   # propogate the versioning information up again to it's parent's namespace.
+  message("PROPOGATING")
   if (NOT CPM_HIERARCHY_LEVEL EQUAL 0)
     foreach(_cpm_kvName IN LISTS CPM_KV_LIST_SOURCE_ADDED_MAP)
       set(CPM_KV_SOURCE_ADDED_MAP_${_cpm_kvName} ${CPM_KV_SOURCE_ADDED_MAP_${_cpm_kvName}} PARENT_SCOPE)


found a way to extract MATLAB_ROOT and MATLAB_CPU from the command line without starting the matlab engine.

git-svn-id: cf55bc44fb097054a32fc70455a459c940dbbffc@6773 c9849af7-e679-4ec6-a44e-fc146a885bd3

--- cmake/mex.cmake
+++ cmake/mex.cmake
@@ -24,15 +24,22 @@
   # sets the variables: MATLAB_ROOT, MATLAB_CPU, MEX, MEX_EXT
   #    as well as all of the mexopts

-  # first run matlab (if necessary) to find matlabroot and cpu path
-  if (NOT EXISTS .matlabroot OR NOT EXISTS .matlabcpu)
-    find_program(matlab matlab)
-    execute_process(COMMAND ${matlab} -nodisplay -r "ptr=fopen('${CMAKE_BINARY_DIR}/.matlabroot','w'); fprintf(ptr,'%s',matlabroot); fclose(ptr); ptr=fopen('${CMAKE_BINARY_DIR}/.matlabcpu','w'); fprintf(ptr,'%s',lower(computer)); fclose(ptr); exit")
-  endif()
+  find_program(matlab matlab)
+  if ( matlab-NOTFOUND )
+     message(FATAL_ERROR "Could not find matlab executable")
+  endif()
+  execute_process(COMMAND ${matlab} -n COMMAND grep "MATLAB " COMMAND cut -d "=" -f2 OUTPUT_VARIABLE _matlab_root)
+  if (NOT _matlab_root)
+    message(FATAL_ERROR "Failed to extract MATLAB_ROOT from running matlab -n")
+  endif()
+  string(STRIP ${_matlab_root} MATLAB_ROOT)

-#  execute_process(COMMAND pwd OUTPUT_VARIABLE pwd OUTPUT_STRIP_TRAILING_WHITESPACE)
-  file(READ ${CMAKE_BINARY_DIR}/.matlabroot MATLAB_ROOT)
-  file(READ ${CMAKE_BINARY_DIR}/.matlabcpu MATLAB_CPU)
+  execute_process(COMMAND ${matlab} -n COMMAND grep "ARCH" COMMAND cut -d "=" -f2 OUTPUT_VARIABLE _matlab_cpu)
+  if (NOT _matlab_cpu)
+    message(FATAL_ERROR "Failed to extract MATLAB_CPU from running matlab -n")
+  endif()
+  string(STRIP ${_matlab_cpu} MATLAB_CPU)
+
   execute_process(COMMAND ${MATLAB_ROOT}/bin/mexext OUTPUT_VARIABLE MEX_EXT OUTPUT_STRIP_TRAILING_WHITESPACE)

   if (NOT MATLAB_ROOT OR NOT MATLAB_CPU OR NOT MEX_EXT)
@@ -91,7 +98,7 @@
   list(REMOVE_AT ARGV 0)

   if (NOT MATLAB_ROOT OR NOT MATLAB_CPU OR NOT MEX_EXT)
-     message(FATAL_ERROR "you must call FindMex first")
+     message(FATAL_ERROR "MATLAB not found (or MATLAB_ROOT/MATLAB_CPU not properly parsed)")
   endif()

   include_directories( ${MATLAB_ROOT}/extern/include ${MATLAB_ROOT}/simulink/include )


ecp5: use $PYTHON_EXECUTABLE for python path

Sometimes the python executable might have a different name.  Cmake
sets the $PYTHON_EXECUTABLE variable to point to the binary path,
so use this variable.

Signed-off-by: Sean Cross <d7e19930cc1f42c2d0781f4d9e6f1fe5891bf9cf@xobs.io>

--- ecp5/family.cmake
+++ ecp5/family.cmake
@@ -41,7 +41,7 @@
             set(DEV_CC_BBA_DB ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/chipdbs/chipdb-${dev}.bba)
             set(DEV_CONSTIDS_INC ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/constids.inc)
             add_custom_command(OUTPUT ${DEV_CC_BBA_DB}
-                COMMAND ${ENV_CMD} python3 ${DB_PY} -p ${DEV_CONSTIDS_INC} ${dev} > ${DEV_CC_BBA_DB}
+                COMMAND ${ENV_CMD} ${PYTHON_EXECUTABLE} ${DB_PY} -p ${DEV_CONSTIDS_INC} ${dev} > ${DEV_CC_BBA_DB}
                 DEPENDS ${DB_PY} ${PREV_DEV_CC_BBA_DB}
                 )
             add_custom_command(OUTPUT ${DEV_CC_DB}
@@ -65,7 +65,7 @@
             set(DEV_CC_BBA_DB ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/chipdbs/chipdb-${dev}.bba)
             set(DEV_CONSTIDS_INC ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/constids.inc)
             add_custom_command(OUTPUT ${DEV_CC_BBA_DB}
-                COMMAND ${ENV_CMD} python3 ${DB_PY} -p ${DEV_CONSTIDS_INC} ${dev} > ${DEV_CC_BBA_DB}.new
+                COMMAND ${ENV_CMD} ${PYTHON_EXECUTABLE} ${DB_PY} -p ${DEV_CONSTIDS_INC} ${dev} > ${DEV_CC_BBA_DB}.new
                 COMMAND mv ${DEV_CC_BBA_DB}.new ${DEV_CC_BBA_DB}
                 DEPENDS ${DB_PY} ${PREV_DEV_CC_BBA_DB}
                 )


Add Qwt CPP flag.

Add Qwt CPP flag.

	* build-aux/cmake/modules/FindQwt.cmake: Do that.

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

--- build-aux/cmake/modules/FindQwt.cmake
+++ build-aux/cmake/modules/FindQwt.cmake
@@ -28,6 +28,7 @@
   find_library(QWT_LIBRARY qwt)
   if(QWT_LIBRARY)
     message(STATUS "Found qwt library: ${QWT_LIBRARY}")
+    add_definitions(-DQWT_DLL)
     set(QWT_FOUND TRUE)
   else(QWT_LIBRARY)
     message(SEND_ERROR "no qwt library found "


Adopt patched version of CMake master branch ExternalProject.cmake

This file was taken from the CMake master branch (commit 2588dca),
then patched with
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9f49ac3d
"ExternalProject: Avoid infinite loop on file download hash mismatch".

This infinite loop fix should get into the next CMake-3.0.x release so
eventually we will no longer need to carry this file with epa_build.
But for now we do carry it as a convenience for our CMake-2.8.x users.

Tested by Alan W. Irwin on Linux with an epa_build of qt5_lite (5.3.1).

--- cmake/epa_build/ExternalProject.cmake
+++ cmake/epa_build/ExternalProject.cmake
@@ -16,15 +16,17 @@
 #    [LIST_SEPARATOR sep]        # Sep to be replaced by ; in cmd lines
 #    [TMP_DIR dir]               # Directory to store temporary files
 #    [STAMP_DIR dir]             # Directory to store step timestamps
+#    [EXCLUDE_FROM_ALL 1]        # The "all" target does not depend on this
 #   #--Download step--------------
 #    [DOWNLOAD_NAME fname]       # File name to store (if not end of URL)
 #    [DOWNLOAD_DIR dir]          # Directory to store downloaded files
 #    [DOWNLOAD_COMMAND cmd...]   # Command to download source tree
+#    [DOWNLOAD_NO_PROGRESS 1]    # Disable download progress reports
 #    [CVS_REPOSITORY cvsroot]    # CVSROOT of CVS repository
 #    [CVS_MODULE mod]            # Module to checkout from CVS repo
 #    [CVS_TAG tag]               # Tag to checkout from CVS repo
 #    [SVN_REPOSITORY url]        # URL of Subversion repo
-#    [SVN_REVISION rev]          # Revision to checkout from Subversion repo
+#    [SVN_REVISION -r<rev>]      # Revision to checkout from Subversion repo
 #    [SVN_USERNAME john ]        # Username for Subversion checkout and update
 #    [SVN_PASSWORD doe ]         # Password for Subversion checkout and update
 #    [SVN_TRUST_CERT 1 ]         # Trust the Subversion server site certificate
@@ -54,6 +56,7 @@
 #    [BINARY_DIR dir]            # Specify build dir location
 #    [BUILD_COMMAND cmd...]      # Command to drive the native build
 #    [BUILD_IN_SOURCE 1]         # Use source dir for build dir
+#    [BUILD_ALWAYS 1]            # No stamp file, build step always runs
 #   #--Install step---------------
 #    [INSTALL_DIR dir]           # Installation prefix
 #    [INSTALL_COMMAND cmd...]    # Command to drive install after build
@@ -117,6 +120,7 @@
 #    [DEPENDERS steps...]    # Steps that depend on this step
 #    [DEPENDS files...]      # Files on which this step depends
 #    [ALWAYS 1]              # No stamp file, step always runs
+#    [EXCLUDE_FROM_MAIN 1]   # Main target does not depend on this step
 #    [WORKING_DIRECTORY dir] # Working directory for command
 #    [LOG 1]                 # Wrap step in script to log output
 #    )
@@ -197,11 +201,11 @@
      LIMIT_COUNT ${_ep_documentation_line_count}
      REGEX "^#  (  \\[[A-Z0-9_]+ [^]]*\\] +#.*$|[A-Za-z0-9_]+\\()")
 foreach(line IN LISTS lines)
-  if("${line}" MATCHES "^#  [A-Za-z0-9_]+\\(")
+  if("${line}" MATCHES "^#  ([A-Za-z0-9_]+)\\(")
     if(_ep_func)
       set(_ep_keywords_${_ep_func} "${_ep_keywords_${_ep_func}})$")
     endif()
-    string(REGEX REPLACE "^#  ([A-Za-z0-9_]+)\\(.*" "\\1" _ep_func "${line}")
+    set(_ep_func "${CMAKE_MATCH_1}")
     #message("function [${_ep_func}]")
     set(_ep_keywords_${_ep_func} "^(")
     set(_ep_keyword_sep)
@@ -452,6 +456,7 @@
   WORKING_DIRECTORY \"${work_dir}\"
   RESULT_VARIABLE error_code
   OUTPUT_VARIABLE head_sha
+  OUTPUT_STRIP_TRAILING_WHITESPACE
   )
 if(error_code)
   message(FATAL_ERROR \"Failed to get the hash for HEAD\")
@@ -470,6 +475,17 @@
   set(is_remote_ref 0)
 endif()

+# Tag is in the form <remote>/<tag> (i.e. origin/master) we must strip
+# the remote from the tag.
+if(\"\${show_ref_output}\" MATCHES \"refs/remotes/${git_tag}\")
+  string(REGEX MATCH \"^([^/]+)/(.+)$\" _unused \"${git_tag}\")
+  set(git_remote \"\${CMAKE_MATCH_1}\")
+  set(git_tag \"\${CMAKE_MATCH_2}\")
+else()
+  set(git_remote \"origin\")
+  set(git_tag \"${git_tag}\")
+endif()
+
 # This will fail if the tag does not exist (it probably has not been fetched
 # yet).
 execute_process(
@@ -477,6 +493,7 @@
   WORKING_DIRECTORY \"${work_dir}\"
   RESULT_VARIABLE error_code
   OUTPUT_VARIABLE tag_sha
+  OUTPUT_STRIP_TRAILING_WHITESPACE
   )

 # Is the hash checkout out that we want?
@@ -490,13 +507,94 @@
     message(FATAL_ERROR \"Failed to fetch repository '${git_repository}'\")
   endif()

-  execute_process(
-    COMMAND \"${git_EXECUTABLE}\" checkout ${git_tag}
-    WORKING_DIRECTORY \"${work_dir}\"
-    RESULT_VARIABLE error_code
-    )
-  if(error_code)
-    message(FATAL_ERROR \"Failed to checkout tag: '${git_tag}'\")
+  if(is_remote_ref)
+    # Check if stash is needed
+    execute_process(
+      COMMAND \"${git_EXECUTABLE}\" status --porcelain
+      WORKING_DIRECTORY \"${work_dir}\"
+      RESULT_VARIABLE error_code
+      OUTPUT_VARIABLE repo_status
+      )
+    if(error_code)
+      message(FATAL_ERROR \"Failed to get the status\")
+    endif()
+    string(LENGTH \"\${repo_status}\" need_stash)
+
+    # If not in clean state, stash changes in order to be able to be able to
+    # perform git pull --rebase
+    if(need_stash)
+      execute_process(
+        COMMAND \"${git_EXECUTABLE}\" stash save --all --quiet
+        WORKING_DIRECTORY \"${work_dir}\"
+        RESULT_VARIABLE error_code
+        )
+      if(error_code)
+        message(FATAL_ERROR \"Failed to stash changes\")
+      endif()
+    endif()
+
+    # Pull changes from the remote branch
+    execute_process(
+      COMMAND \"${git_EXECUTABLE}\" rebase \${git_remote}/\${git_tag}
+      WORKING_DIRECTORY \"${work_dir}\"
+      RESULT_VARIABLE error_code
+      )
+    if(error_code)
+      # Rebase failed: Restore previous state.
+      execute_process(
+        COMMAND \"${git_EXECUTABLE}\" rebase --abort
+        WORKING_DIRECTORY \"${work_dir}\"
+      )
+      if(need_stash)
+        execute_process(
+          COMMAND \"${git_EXECUTABLE}\" stash pop --index --quiet
+          WORKING_DIRECTORY \"${work_dir}\"
+          )
+      endif()
+      message(FATAL_ERROR \"\\nFailed to rebase in: '${work_dir}/${src_name}'.\\nYou will have to resolve the conflicts manually\")
+    endif()
+
+    if(need_stash)
+      execute_process(
+        COMMAND \"${git_EXECUTABLE}\" stash pop --index --quiet
+        WORKING_DIRECTORY \"${work_dir}\"
+        RESULT_VARIABLE error_code
+        )
+      if(error_code)
+        # Stash pop --index failed: Try again dropping the index
+        execute_process(
+          COMMAND \"${git_EXECUTABLE}\" reset --hard --quiet
+          WORKING_DIRECTORY \"${work_dir}\"
+          RESULT_VARIABLE error_code
+          )
+        execute_process(
+          COMMAND \"${git_EXECUTABLE}\" stash pop --quiet
+          WORKING_DIRECTORY \"${work_dir}\"
+          RESULT_VARIABLE error_code
+          )
+        if(error_code)
+          # Stash pop failed: Restore previous state.
+          execute_process(
+            COMMAND \"${git_EXECUTABLE}\" reset --hard --quiet \${head_sha}
+            WORKING_DIRECTORY \"${work_dir}\"
+          )
+          execute_process(
+            COMMAND \"${git_EXECUTABLE}\" stash pop --index --quiet
+            WORKING_DIRECTORY \"${work_dir}\"
+          )
+          message(FATAL_ERROR \"\\nFailed to unstash changes in: '${work_dir}/${src_name}'.\\nYou will have to resolve the conflicts manually\")
+        endif()
+      endif()
+    endif()
+  else()
+    execute_process(
+      COMMAND \"${git_EXECUTABLE}\" checkout ${git_tag}
+      WORKING_DIRECTORY \"${work_dir}\"
+      RESULT_VARIABLE error_code
+      )
+    if(error_code)
+      message(FATAL_ERROR \"Failed to checkout tag: '${git_tag}'\")
+    endif()
   endif()

   execute_process(
@@ -514,13 +612,19 @@

 endfunction(_ep_write_gitupdate_script)

-function(_ep_write_downloadfile_script script_filename remote local timeout hash tls_verify tls_cainfo)
+function(_ep_write_downloadfile_script script_filename remote local timeout no_progress hash tls_verify tls_cainfo)
   if(timeout)
     set(timeout_args TIMEOUT ${timeout})
     set(timeout_msg "${timeout} seconds")
   else()
     set(timeout_args "# no TIMEOUT")
     set(timeout_msg "none")
+  endif()
+
+  if(no_progress)
+    set(show_progress "")
+  else()
+    set(show_progress "SHOW_PROGRESS")
   endif()

   if("${hash}" MATCHES "${_ep_hash_regex}")
@@ -562,7 +666,7 @@
 file(DOWNLOAD
   \"${remote}\"
   \"${local}\"
-  SHOW_PROGRESS
+  ${show_progress}
   ${hash_args}
   ${timeout_args}
   STATUS status
@@ -605,8 +709,9 @@
 Retrying download.
 \")
     file(REMOVE \"\${file}\")
-    execute_process(COMMAND ${CMAKE_COMMAND} -P \"${download_script}\")
-  endif()
+    execute_process(COMMAND \${CMAKE_COMMAND} -P \"${download_script}\")
+  endif()
+  math(EXPR attempt \"\${attempt} + 1\")
 endwhile()

 if(\${succeeded})
@@ -633,7 +738,7 @@
 function(_ep_write_extractfile_script script_filename name filename directory)
   set(args "")

-  if(filename MATCHES "(\\.|=)(bz2|tar\\.gz|tar\\.xz|tgz|zip)$")
+  if(filename MATCHES "(\\.|=)(7z|tar\\.bz2|tar\\.gz|tar\\.xz|tbz2|tgz|txz|zip)$")
     set(args xfz)
   endif()

@@ -642,7 +747,7 @@
   endif()

   if(args STREQUAL "")
-    message(SEND_ERROR "error: do not know how to extract '${filename}' -- known types are .bz2, .tar, .tar.gz, tar.xz, .tgz and .zip")
+    message(SEND_ERROR "error: do not know how to extract '${filename}' -- known types are .7z, .tar, .tar.bz2, .tar.gz, .tar.xz, .tbz2, .tgz, .txz and .zip")
     return()
   endif()

@@ -803,7 +908,8 @@
   set(regex "^([^:]+):([^=]+)=(.*)$")
   set(setArg "")
   foreach(line ${args})
-    if("${line}" MATCHES "^-D")
+    if("${line}" MATCHES "^-D(.*)")
+      set(line "${CMAKE_MATCH_1}")
       if(setArg)
         # This is required to build up lists in variables, or complete an entry
         set(setArg "${setArg}${accumulator}\" CACHE ${type} \"Initial cache\" FORCE)")
@@ -811,9 +917,7 @@
         set(accumulator "")
         set(setArg "")
       endif()
-      string(REGEX REPLACE "^-D" "" line ${line})
       if("${line}" MATCHES "${regex}")
-        string(REGEX MATCH "${regex}" match "${line}")
         set(name "${CMAKE_MATCH_1}")
         set(type "${CMAKE_MATCH_2}")
         set(value "${CMAKE_MATCH_3}")
@@ -1073,6 +1177,8 @@
     _ep_get_step_stampfile(${name} ${step} stamp_file)
     add_custom_target(${name}-${step}
       DEPENDS ${stamp_file})
+    set_property(TARGET ${name}-${step} PROPERTY LABELS ${name})
+    set_property(TARGET ${name}-${step} PROPERTY FOLDER "ExternalProjectTargets/${name}")

     # Depend on other external projects (target-level).
     get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS)
@@ -1090,13 +1196,16 @@
   set(complete_stamp_file "${cmf_dir}${cfgdir}/${name}-complete")
   _ep_get_step_stampfile(${name} ${step} stamp_file)

-  add_custom_command(APPEND
-    OUTPUT ${complete_stamp_file}
-    DEPENDS ${stamp_file}
-    )
-
   _ep_parse_arguments(ExternalProject_Add_Step
                       ${name} _EP_${step}_ "${ARGN}")
+
+  get_property(exclude_from_main TARGET ${name} PROPERTY _EP_${step}_EXCLUDE_FROM_MAIN)
+  if(NOT exclude_from_main)
+    add_custom_command(APPEND
+      OUTPUT ${complete_stamp_file}
+      DEPENDS ${stamp_file}
+      )
+  endif()

   # Steps depending on this step.
   get_property(dependers TARGET ${name} PROPERTY _EP_${step}_DEPENDERS)
@@ -1245,7 +1354,7 @@
   if(cmd_set)
     set(work_dir ${download_dir})
   elseif(cvs_repository)
-    find_package(CVS)
+    find_package(CVS QUIET)
     if(NOT CVS_EXECUTABLE)
       message(FATAL_ERROR "error: could not find cvs for checkout of ${name}")
     endif()
@@ -1272,7 +1381,7 @@
     set(cmd ${CVS_EXECUTABLE} -d ${cvs_repository} -q co ${cvs_tag} -d ${src_name} ${cvs_module})
     list(APPEND depends ${stamp_dir}/${name}-cvsinfo.txt)
   elseif(svn_repository)
-    find_package(Subversion)
+    find_package(Subversion QUIET)
     if(NOT Subversion_SVN_EXECUTABLE)
       message(FATAL_ERROR "error: could not find svn for checkout of ${name}")
     endif()
@@ -1308,7 +1417,7 @@
       --non-interactive ${svn_trust_cert_args} ${svn_user_pw_args} ${src_name})
     list(APPEND depends ${stamp_dir}/${name}-svninfo.txt)
   elseif(git_repository)
-    find_package(Git)
+    find_package(Git QUIET)
     if(NOT GIT_EXECUTABLE)
       message(FATAL_ERROR "error: could not find git for clone of ${name}")
     endif()
@@ -1356,7 +1465,7 @@
     set(cmd ${CMAKE_COMMAND} -P ${tmp_dir}/${name}-gitclone.cmake)
     list(APPEND depends ${stamp_dir}/${name}-gitinfo.txt)
   elseif(hg_repository)
-    find_package(Hg)
+    find_package(Hg QUIET)
     if(NOT HG_EXECUTABLE)
       message(FATAL_ERROR "error: could not find hg for clone of ${name}")
     endif()
@@ -1432,20 +1541,21 @@
         if("x${fname}" STREQUAL "x")
           string(REGEX MATCH "[^/\\?]*$" fname "${url}")
         endif()
-        if(NOT "${fname}" MATCHES "(\\.|=)(bz2|tar|tgz|tar\\.gz|tar\\.xz|zip)$")
-          string(REGEX MATCH "([^/\\?]+(\\.|=)(bz2|tar|tgz|tar\\.gz|tar\\.xz|zip))/.*$" match_result "${url}")
+        if(NOT "${fname}" MATCHES "(\\.|=)(7z|tar|tar\\.bz2|tar\\.gz|tar\\.xz|tbz2|tgz|txz|zip)$")
+          string(REGEX MATCH "([^/\\?]+(\\.|=)(7z|tar|tar\\.bz2|tar\\.gz|tar\\.xz|tbz2|tgz|txz|zip))/.*$" match_result "${url}")
           set(fname "${CMAKE_MATCH_1}")
         endif()
-        if(NOT "${fname}" MATCHES "(\\.|=)(bz2|tar|tgz|tar\\.gz|tar\\.xz|zip)$")
+        if(NOT "${fname}" MATCHES "(\\.|=)(7z|tar|tar\\.bz2|tar\\.gz|tar\\.xz|tbz2|tgz|txz|zip)$")
           message(FATAL_ERROR "Could not extract tarball filename from url:\n  ${url}")
         endif()
         string(REPLACE ";" "-" fname "${fname}")
         set(file ${download_dir}/${fname})
         get_property(timeout TARGET ${name} PROPERTY _EP_TIMEOUT)
+        get_property(no_progress TARGET ${name} PROPERTY _EP_DOWNLOAD_NO_PROGRESS)
         get_property(tls_verify TARGET ${name} PROPERTY _EP_TLS_VERIFY)
         get_property(tls_cainfo TARGET ${name} PROPERTY _EP_TLS_CAINFO)
         set(download_script "${stamp_dir}/download-${name}.cmake")
-        _ep_write_downloadfile_script("${download_script}" "${url}" "${file}" "${timeout}" "${hash}" "${tls_verify}" "${tls_cainfo}")
+        _ep_write_downloadfile_script("${download_script}" "${url}" "${file}" "${timeout}" "${no_progress}" "${hash}" "${tls_verify}" "${tls_cainfo}")
         set(cmd ${CMAKE_COMMAND} -P "${download_script}"
           COMMAND)
         set(retries 3)
@@ -1716,10 +1826,18 @@
     set(log "")
   endif()

+  get_property(build_always TARGET ${name} PROPERTY _EP_BUILD_ALWAYS)
+  if(build_always)
+    set(always 1)
+  else()
+    set(always 0)
+  endif()
+
   ExternalProject_Add_Step(${name} build
     COMMAND ${cmd}
     WORKING_DIRECTORY ${binary_dir}
     DEPENDEES configure
+    ALWAYS ${always}
     ${log}
     )
 endfunction()
@@ -1798,12 +1916,24 @@
   set(cmf_dir ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles)
   set(complete_stamp_file "${cmf_dir}${cfgdir}/${name}-complete")

+  # The "ALL" option to add_custom_target just tells it to not set the
+  # EXCLUDE_FROM_ALL target property. Later, if the EXCLUDE_FROM_ALL
+  # argument was passed, we explicitly set it for the target.
   add_custom_target(${name} ALL DEPENDS ${complete_stamp_file})
   set_property(TARGET ${name} PROPERTY _EP_IS_EXTERNAL_PROJECT 1)
+  set_property(TARGET ${name} PROPERTY LABELS ${name})
+  set_property(TARGET ${name} PROPERTY FOLDER "ExternalProjectTargets/${name}")
+
   _ep_parse_arguments(ExternalProject_Add ${name} _EP_ "${ARGN}")
   _ep_set_directories(${name})
   _ep_get_step_stampfile(${name} "done" done_stamp_file)
   _ep_get_step_stampfile(${name} "install" install_stamp_file)
+
+  # Set the EXCLUDE_FROM_ALL target property if required.
+  get_property(exclude_from_all TARGET ${name} PROPERTY _EP_EXCLUDE_FROM_ALL)
+  if(exclude_from_all)
+    set_property(TARGET ${name} PROPERTY EXCLUDE_FROM_ALL TRUE)
+  endif()

   # The 'complete' step depends on all other steps and creates a
   # 'done' mark.  A dependent external project's 'configure' step


build: add executable suffix for `-fuse-ld=`

The `-fuse-ld=` parameter requires the executable suffix for this to work on
Windows.  This allows us to cross-compile for android on Windows.

--- cmake/modules/DispatchUtilities.cmake
+++ cmake/modules/DispatchUtilities.cmake
@@ -1,15 +1,19 @@

 function(dispatch_set_linker target)
+  if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
+    set(CMAKE_HOST_EXECUTABLE_SUFFIX .exe)
+  endif()
+
   if(USE_GOLD_LINKER)
     set_property(TARGET ${target}
                  APPEND_STRING
                  PROPERTY LINK_FLAGS
-                   -fuse-ld=gold)
+                   -fuse-ld=gold${CMAKE_HOST_EXECUTABLE_SUFFIX})
   endif()
   if(USE_LLD_LINKER)
     set_property(TARGET ${target}
                  APPEND_STRING
                  PROPERTY LINK_FLAGS
-                   -fuse-ld=lld)
+                   -fuse-ld=lld${CMAKE_HOST_EXECUTABLE_SUFFIX})
   endif()
 endfunction()


[cmake] Pass /manifest:no to the linker when asan is enabled

This is a workaround for PR24476.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -456,7 +456,7 @@
     # stack traces.
     add_flag_if_supported("-fno-omit-frame-pointer" FNO_OMIT_FRAME_POINTER)
     if (NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" AND
-	NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO")
+        NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO")
       add_flag_if_supported("-gline-tables-only" GLINE_TABLES_ONLY)
     endif()
     # Use -O1 even in debug mode, otherwise sanitizers slowdown is too large.
@@ -469,6 +469,10 @@
     if (CMAKE_LINKER MATCHES "lld-link.exe")
       # Use DWARF debug info with LLD.
       append("-gdwarf" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+      # Pass /MANIFEST:NO so that CMake doesn't run mt.exe on our binaries.
+      # Adding manifests with mt.exe breaks LLD's symbol tables. See PR24476.
+      append("/MANIFEST:NO"
+        CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
     else()
       # Enable codeview otherwise.
       append("/Z7" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)


Match if / elseif properly

Match if / elseif properly

My last commit fumbled it.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -20,7 +20,7 @@

 set(LLVM_CXX_STD_default "c++14")
 # Preserve behaviour of legacy cache variables
-elseif (LLVM_ENABLE_CXX1Z)
+if (LLVM_ENABLE_CXX1Z)
   set(LLVM_CXX_STD_default "c++1z")
 endif()
 set(LLVM_CXX_STD ${LLVM_CXX_STD_default}


No libkml in superbuild

No libkml in superbuild

--- CI/sb_configure_options.cmake
+++ CI/sb_configure_options.cmake
@@ -23,8 +23,12 @@
 "CMAKE_BUILD_TYPE=${CTEST_BUILD_CONFIGURATION}
 CMAKE_INSTALL_PREFIX:PATH=${CTEST_INSTALL_DIRECTORY}")

+set ( temporary_option
+"OTB_USE_LIBKML=OFF")
+
 set(concat_options
 "${cmake_configure_option}
+${temporary_option}
 ")

 #Transform the previous string in list


ENH: Configure ExternalData local object stores for ITK

Expose ExternalData option ExternalData_OBJECT_STORES as a cache entry
defaulting to the empty string.  If not set, use a directory in the
build tree as the main store.  Either way, add the .ExternalData
directory at the top of the source tree as a local object store.  Remove
the latter from the URL templates list so that the objects can be used
without copying to another local store.

Change-Id: I0b454872ad4855e28bd03351c41b6cd02f107204

--- CMake/ITKExternalData.cmake
+++ CMake/ITKExternalData.cmake
@@ -1,13 +1,23 @@
 get_filename_component(_ITKExternalData_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
 include(${_ITKExternalData_DIR}/ExternalData.cmake)
+
+set(ExternalData_OBJECT_STORES "" CACHE STRING
+  "Semicolon-separated list of local directories holding data objects in the layout %(algo)/%(hash).")
+mark_as_advanced(ExternalData_OBJECT_STORES)
+if(NOT ExternalData_OBJECT_STORES)
+  set(ExternalData_OBJECT_STORES "${CMAKE_BINARY_DIR}/ExternalData/Objects")
+  file(MAKE_DIRECTORY "${ExternalData_OBJECT_STORES}")
+endif()
+list(APPEND ExternalData_OBJECT_STORES
+  # Local data store populated by the ITK pre-commit hook
+  "${CMAKE_SOURCE_DIR}/.ExternalData"
+  )
+
 set(ExternalData_URL_TEMPLATES "" CACHE STRING
   "Additional URL templates for the ExternalData CMake script to look for testing data. E.g.
 file:///var/bigharddrive/%(algo)/%(hash)")
 mark_as_advanced(ExternalData_URL_TEMPLATES)
 list(APPEND ExternalData_URL_TEMPLATES
-  # Local data store populated by the ITK pre-commit hook
-  "file:///${CMAKE_SOURCE_DIR}/.ExternalData/%(algo)/%(hash)"
-
   # Data published by MIDAS
   "http://midas.kitware.com/api/rest/midas.bitstream.by.hash?hash=%(hash)&algorithm=%(algo)"


Disable stripping post build step if CMAKE_STRIP is empty

Change-Id: I5db6e3b5c3e6465f37231d8fb9ab5b6679ecc4c5

--- CMake/sitkStripOption.cmake
+++ CMake/sitkStripOption.cmake
@@ -15,7 +15,7 @@
 separate_arguments(CMAKE_STRIP_FLAGS)

 function(sitk_strip_target tgt)
-  if(NOT SimpleITK_BUILD_STRIP)
+  if(NOT SimpleITK_BUILD_STRIP OR "${CMAKE_STRIP}" STREQUAL "" )
     return()
   endif()
   get_property(type TARGET ${tgt} PROPERTY TYPE)


CMake: Fix GCC_ARM Cortex-M0 support

CMake: Fix GCC_ARM Cortex-M0 support

Add missing toolchain option to specify the CPU core

--- tools/cmake/cores/Cortex-M0.cmake
+++ tools/cmake/cores/Cortex-M0.cmake
@@ -5,6 +5,7 @@
 if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
     list(APPEND common_options
         "-mthumb"
+        "-mcpu=cortex-m0"
     )
 elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
     list(APPEND c_cxx_compile_options


On Cygwin all code is position independent and since gcc issues a warning about using this flag let's remove it

--- cmake/Modules/DefineCompilerFlags.cmake
+++ cmake/Modules/DefineCompilerFlags.cmake
@@ -11,15 +11,17 @@
     endif (WITH_CXX)

     add_definitions(-D_REENTRANT)           # for gmtime_r()
-    add_definitions(-D_XOPEN_SOURCE) 	    # for popen() and pclose()
+    add_definitions(-D_XOPEN_SOURCE)        # for popen() and pclose()
     add_definitions(-D_XOPEN_SOURCE_EXTENDED) # for strdup(), which isn't part of C99
     add_definitions(-D__STDC_FORMAT_MACROS) # for PRI*PTR format macros, required by C99

-    # with -fPIC
-    check_c_compiler_flag("-fPIC" WITH_FPIC)
-    if (WITH_FPIC)
-      add_definitions(-fPIC)
-    endif (WITH_FPIC)
+    if (NOT CYGWIN)
+        # with -fPIC
+        check_c_compiler_flag("-fPIC" WITH_FPIC)
+        if (WITH_FPIC)
+            add_definitions(-fPIC)
+        endif (WITH_FPIC)
+    endif (NOT CYGWIN)

     if (CMAKE_SIZEOF_VOID_P MATCHES "8")
       # with large file support


BUGFIX: Updated sha sum of lib-cpp-pre.

BUGFIX: Updated sha sum of lib-cpp-pre.

--- cmake/projects/lib-cpp-pre/hunter.cmake
+++ cmake/projects/lib-cpp-pre/hunter.cmake
@@ -19,7 +19,7 @@
     PACKAGE_NAME lib-cpp-pre
     VERSION "1.3.2"
     URL "https://github.com/daminetreg/lib-cpp-pre/archive/v1.3.2.tar.gz"
-    SHA1 e91a1364d88087d162b9fb05309cb47702ec25a2
+    SHA1 9f7e2e388cfb2ff2aaccd9c1f4c10ba53ffbbf49
 )

 hunter_pick_scheme(DEFAULT url_sha1_cmake)


cmake: Update android.toolchain.cmake from upstream.

From https://github.com/taka-no-me/android-cmake/commit/763b9f6ec43bf66f3b586669b68b9b6374c8f4b5

Fixes issue #293 for r9* NDKs.

--- cmake/toolchain/android.toolchain.cmake
+++ cmake/toolchain/android.toolchain.cmake
@@ -301,6 +301,8 @@
 #     [+] updated for NDK r9c
 #   - January 2014
 #     [~] fix copying of shared STL
+#   - April 2014
+#     [+] updated for NDK r9d
 # ------------------------------------------------------------------------------

 cmake_minimum_required( VERSION 2.6.3 )
@@ -327,7 +329,7 @@
 # rpath makes low sence for Android
 set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." )

-set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
+set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
 if(NOT DEFINED ANDROID_NDK_SEARCH_PATHS)
  if( CMAKE_HOST_WIN32 )
   file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS )
@@ -1744,7 +1746,7 @@
 #   BUILD_WITH_STANDALONE_TOOLCHAIN : TRUE if standalone toolchain is used
 #   ANDROID_NDK_HOST_SYSTEM_NAME : "windows", "linux-x86" or "darwin-x86" depending on host platform
 #   ANDROID_NDK_ABI_NAME : "armeabi", "armeabi-v7a", "x86" or "mips" depending on ANDROID_ABI
-#   ANDROID_NDK_RELEASE : one of r5, r5b, r5c, r6, r6b, r7, r7b, r7c, r8, r8b, r8c, r8d, r8e, r9, r9b, r9c; set only for NDK
+#   ANDROID_NDK_RELEASE : one of r5, r5b, r5c, r6, r6b, r7, r7b, r7c, r8, r8b, r8c, r8d, r8e, r9, r9b, r9c, r9d; set only for NDK
 #   ANDROID_ARCH_NAME : "arm" or "x86" or "mips" depending on ANDROID_ABI
 #   ANDROID_SYSROOT : path to the compiler sysroot
 #   TOOL_OS_SUFFIX : "" or ".exe" depending on host platform


BUG: Set correct URL scheme in dashboard common script

The HTTPS protocol doesn't serve Git.

Change-Id: I83a93b0b92569e3a8c4bf44a20a842998b50e05f

--- Utilities/Dashboard/itkexamples_common.cmake
+++ Utilities/Dashboard/itkexamples_common.cmake
@@ -134,7 +134,7 @@

 # Select Git source to use.
 if(NOT DEFINED dashboard_git_url)
-  set(dashboard_git_url "https://itk.org/ITKExamples.git")
+  set(dashboard_git_url "git://itk.org/ITKExamples.git")
 endif()
 if(NOT DEFINED dashboard_git_branch)
   #if("${dashboard_model}" STREQUAL "Nightly")


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 12)

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


Update hunter_save_to_cache (use hunter_create_deps_info)

--- cmake/modules/hunter_save_to_cache.cmake
+++ cmake/modules/hunter_save_to_cache.cmake
@@ -1,8 +1,8 @@
-# Copyright (c) 2015, Ruslan Baratov
+# Copyright (c) 2015-2016, Ruslan Baratov
 # All rights reserved.

 include(hunter_create_cache_meta_directory)
-include(hunter_get_dependency_list)
+include(hunter_create_deps_info)
 include(hunter_internal_error)
 include(hunter_lock_directory)
 include(hunter_make_directory)
@@ -97,16 +97,61 @@
   ### create cache.sha1 file in home (before saving dependencies)
   file(WRITE "${HUNTER_PACKAGE_HOME_DIR}/cache.sha1" "${archive_sha1}")

-  # Get package dependencies.
-  # List sorted alphabetically and saved in format:
+  # Get dependencies (non-recursively)
+  if(has_component)
+    hunter_get_package_deps(
+        PACKAGE "${HUNTER_PACKAGE_NAME}"
+        COMPONENT "${HUNTER_PACKAGE_COMPONENT}"
+        RESULT basic_dependencies
+    )
+  else()
+    hunter_get_package_deps(
+        PACKAGE "${HUNTER_PACKAGE_NAME}"
+        RESULT basic_dependencies
+    )
+  endif()
+  set(basic_deps_info "${cache_meta_dir}/basic-deps.info")
+  set(basic_deps_info_temp "${cache_meta_dir}/basic-deps.info-TEMP")
+
+  file(WRITE "${basic_deps_info_temp}" "")
+  list(LENGTH basic_dependencies len)
+  if(len EQUAL 0)
+    hunter_status_debug("No basic dependencies for package: ${human_readable}")
+  else()
+    hunter_status_debug("Basic dependencies for package: ${human_readable}")
+    foreach(x ${basic_dependencies})
+      hunter_status_debug("  ${x}")
+      file(APPEND "${basic_deps_info_temp}" "${x}")
+    endforeach()
+  endif()
+
+  if(EXISTS "${basic_deps_info}")
+    # TEMP and saved should be the same
+    file(SHA1 "${basic_deps_info}" basic_deps_info_sha1)
+    file(SHA1 "${basic_deps_info_temp}" basic_deps_info_temp_sha1)
+    string(
+        COMPARE EQUAL
+        "${basic_deps_info_sha1}" "${basic_deps_info_temp_sha1}"
+        is_equal
+    )
+    if(NOT is_equal)
+      hunter_internal_error("Basic dependencies info mismatch")
+    endif()
+  else()
+    file(RENAME "${basic_deps_info_temp}" "${basic_deps_info}")
+  endif()
+
+  # Get all package dependencies recursively.
+  # List sorted alphabetically and saved in file in format:
   #   <package> <component> <sha1>
   #   <package> <sha1>
-  hunter_get_dependency_list(dep_list)
+  hunter_create_deps_info(temp_deps_info)
+  if(NOT EXISTS "${temp_deps_info}")
+    hunter_internal_error("Dependency list is not created: ${temp_deps_info}")
+  endif()

   # Save package dependencies to file
-  set(deps_info "${HUNTER_PACKAGE_HOME_DIR}/deps.info")
-  file(WRITE "${deps_info}" "")
-
+  file(STRINGS "${temp_deps_info}" dep_list)
   list(LENGTH dep_list len)
   if(len EQUAL 0)
     hunter_status_debug("No dependencies for package: ${human_readable}")
@@ -114,13 +159,13 @@
     hunter_status_debug("Dependencies for package: ${human_readable}")
     foreach(dependency_entry ${dep_list})
       hunter_status_debug("  ${dependency_entry}")
-      file(APPEND "${deps_info}" "${dependency_entry}\n")
     endforeach()
   endif()

-  file(SHA1 "${deps_info}" deps_sha1)
+  file(SHA1 "${temp_deps_info}" deps_sha1)
   hunter_make_directory("${cache_meta_dir}" "${deps_sha1}" cache_meta_dir)
-  file(COPY "${deps_info}" DESTINATION "${cache_meta_dir}")
+  set(deps_info "${cache_meta_dir}/deps.info")
+  file(RENAME "${temp_deps_info}" "${deps_info}")

   hunter_status_debug("Dependencies saved: ${deps_info}")


MDEV-12202 Do not package embedded in MSI

Also get rid of example ini files, they do not provide any value,
just confusion

--- win/packaging/CPackWixConfig.cmake
+++ win/packaging/CPackWixConfig.cmake
@@ -9,7 +9,7 @@
  ENDIF()
 ELSE()
   SET(CPACK_COMPONENTS_USED
-    "Server;Client;Development;SharedLibraries;Embedded;Documentation;IniFiles;Readme;Debuginfo;Common;connect-engine;ClientPlugins;gssapi-server;gssapi-client;aws-key-management")
+    "Server;Client;Development;SharedLibraries;Documentation;Readme;Debuginfo;Common;connect-engine;ClientPlugins;gssapi-server;gssapi-client;aws-key-management")
 ENDIF()

 SET( WIX_FEATURE_MySQLServer_EXTRA_FEATURES "DBInstance;SharedClientServerComponents")


[new] option to quit immediately upon error


fixed bug

fixed bug

--- CMake/mitkMacroInstallPython.cmake
+++ CMake/mitkMacroInstallPython.cmake
@@ -77,7 +77,7 @@
     endif()

     if(_target_lib_release)
-      MITK_FUNCTION_INSTALL_PYTHON_MODULE("${_filepath_release}/$${_target}${CMAKE_SHARED_LIBRARY_SUFFIX}" "Release")
+      MITK_FUNCTION_INSTALL_PYTHON_MODULE("${_filepath_release}/${_target}${CMAKE_SHARED_LIBRARY_SUFFIX}" "Release")
     endif()
   endforeach()