Partly revert change to "FindFreetype.cmake" made by commit "9f273b4" so as not to break builds that use the old version.

--- cmake/FindFreetype.cmake
+++ cmake/FindFreetype.cmake
@@ -3,7 +3,7 @@
 ################################################################################
 include(FindPackageHandleStandardArgs)

-find_path(FREETYPE_H_PATH_ft2build NAMES ft2build.h PATH_SUFFIXES freetype2)
+find_path(FREETYPE_H_PATH_ft2build NAMES ft2build.h PATH_SUFFIXES include/freetype2 include freetype2)
 find_path(FREETYPE_H_PATH_ftconfig NAMES freetype/config/ftconfig.h PATH_SUFFIXES freetype2)
 if (NOT FREETYPE_H_PATH_ftconfig)
     find_path(FREETYPE_H_PATH_ftconfig NAMES config/ftconfig.h PATH_SUFFIXES freetype2)


remove CMake find script for reactive

remove CMake find script for reactive

--- cmake/FindReactive.cmake
+++ cmake/FindReactive.cmake
@@ -1,19 +0,0 @@
-# - Try to find libREACTIVE
-# Once done this will define
-#  REACTIVE_FOUND
-#  REACTIVE_INCLUDE_DIRS
-#  REACTIVE_LIBRARIES
-
-find_path(REACTIVE_INCLUDE_DIR "reactive/config.hpp" HINTS "/usr/local/include" "/usr/include")
-find_library(REACTIVE_LIBRARY "libreactive.a" HINTS "/usr/local/lib" "/usr/lib")
-
-set(REACTIVE_LIBRARIES ${REACTIVE_LIBRARY})
-set(REACTIVE_INCLUDE_DIRS ${REACTIVE_INCLUDE_DIR} ${REACTIVE_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-# handle the QUIETLY and REQUIRED arguments and set LIBREACTIVE_FOUND to TRUE
-# if all listed variables are TRUE
-find_package_handle_standard_args(LibREACTIVE  DEFAULT_MSG
-                                  REACTIVE_LIBRARY REACTIVE_INCLUDE_DIR)
-
-mark_as_advanced(REACTIVE_INCLUDE_DIR REACTIVE_LIBRARY)


update FindSamtools to look for /usr/include/bam.h

--- cmake/FindSamtools.cmake
+++ cmake/FindSamtools.cmake
@@ -9,6 +9,7 @@
     ${SAMTOOLS_SEARCH_DIRS}
     $ENV{SAMTOOLS_ROOT}
     /gsc/pkg/bio/samtools
+    /usr
 )

 set(_samtools_ver_path "samtools-${Samtools_FIND_VERSION}")
@@ -19,7 +20,7 @@

 # Include dir
 find_path(Samtools_INCLUDE_DIR
-    NAMES sam.h #bgzf.h faidx.h glf.h ksort.h kstring.h
+    NAMES bam.h #bgzf.h faidx.h glf.h ksort.h kstring.h
     PATHS ${SAMTOOLS_SEARCH_DIRS}
     PATH_SUFFIXES include ${_samtools_ver_path}
     HINTS ENV SAMTOOLS_ROOT


cmake: Added missing extra modules warning

--- cmake/OpenCVModule.cmake
+++ cmake/OpenCVModule.cmake
@@ -248,31 +248,40 @@
   foreach(__path ${ARGN})
     if("${__path}" STREQUAL "EXTRA")
       set(OPENCV_PROCESSING_EXTRA_MODULES 1)
-    endif()
-    get_filename_component(__path "${__path}" ABSOLUTE)
-
-    list(FIND __directories_observed "${__path}" __pathIdx)
-    if(__pathIdx GREATER -1)
-      message(FATAL_ERROR "The directory ${__path} is observed for OpenCV modules second time.")
-    endif()
-    list(APPEND __directories_observed "${__path}")
-
-    file(GLOB __ocvmodules RELATIVE "${__path}" "${__path}/*")
-    if(__ocvmodules)
-      list(SORT __ocvmodules)
-      foreach(mod ${__ocvmodules})
-        get_filename_component(__modpath "${__path}/${mod}" ABSOLUTE)
-        if(EXISTS "${__modpath}/CMakeLists.txt")
-
-          list(FIND __directories_observed "${__modpath}" __pathIdx)
-          if(__pathIdx GREATER -1)
-            message(FATAL_ERROR "The module from ${__modpath} is already loaded.")
+    else()
+      get_filename_component(__path "${__path}" ABSOLUTE)
+
+      list(FIND __directories_observed "${__path}" __pathIdx)
+      if(__pathIdx GREATER -1)
+        message(FATAL_ERROR "The directory ${__path} is observed for OpenCV modules second time.")
+      endif()
+      list(APPEND __directories_observed "${__path}")
+
+      set(__count 0)
+      file(GLOB __ocvmodules RELATIVE "${__path}" "${__path}/*")
+      if(__ocvmodules)
+        list(SORT __ocvmodules)
+        foreach(mod ${__ocvmodules})
+          get_filename_component(__modpath "${__path}/${mod}" ABSOLUTE)
+          if(EXISTS "${__modpath}/CMakeLists.txt")
+
+            list(FIND __directories_observed "${__modpath}" __pathIdx)
+            if(__pathIdx GREATER -1)
+              message(FATAL_ERROR "The module from ${__modpath} is already loaded.")
+            endif()
+            list(APPEND __directories_observed "${__modpath}")
+
+            add_subdirectory("${__modpath}" "${CMAKE_CURRENT_BINARY_DIR}/${mod}/.${mod}")
+
+            if (DEFINED OPENCV_MODULE_opencv_${mod}_LOCATION)
+              math(EXPR __count "${__count} + 1")
+            endif()
           endif()
-          list(APPEND __directories_observed "${__modpath}")
-
-          add_subdirectory("${__modpath}" "${CMAKE_CURRENT_BINARY_DIR}/${mod}/.${mod}")
-        endif()
-      endforeach()
+        endforeach()
+      endif()
+      if (OPENCV_PROCESSING_EXTRA_MODULES AND ${__count} LESS 1)
+        message(SEND_ERROR "No extra modules found in folder: ${__path}\nPlease provide path to 'opencv_contrib/modules' folder.")
+      endif()
     endif()
   endforeach()
   ocv_clear_vars(__ocvmodules __directories_observed __path __modpath __pathIdx)


explicit list of files to format

explicit list of files to format

--- cmake/clang-format.cmake
+++ cmake/clang-format.cmake
@@ -1,6 +1,9 @@
 file(GLOB_RECURSE
      ALL_CXX_SOURCE_FILES
-     ${CMAKE_CURRENT_SOURCE_DIR}/*/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/*/*.h
+     ${CMAKE_CURRENT_SOURCE_DIR}/utils/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/utils/*.h
+     ${CMAKE_CURRENT_SOURCE_DIR}/vdfs/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/vdfs/*.h
+     ${CMAKE_CURRENT_SOURCE_DIR}/zenload/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/zenload/*.h
+     ${CMAKE_CURRENT_SOURCE_DIR}/daedalus/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/daedalus/*.h
      )

 find_program(CLANG_FORMAT "clang-format")


Use PaddlePaddle fork of any

Use PaddlePaddle fork of any

--- cmake/external/any.cmake
+++ cmake/external/any.cmake
@@ -7,7 +7,7 @@
 ExternalProject_Add(
     extern_lib_any
     ${EXTERNAL_PROJECT_LOG_ARGS}
-    GIT_REPOSITORY  "https://github.com/thelink2012/any.git"
+    GIT_REPOSITORY  "https://github.com/PaddlePaddle/any.git"
     GIT_TAG         "8fef1e93710a0edf8d7658999e284a1142c4c020"
     PREFIX          ${ANY_SOURCE_DIR}
     UPDATE_COMMAND  ""


CMake: path fix

CMake: path fix

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -98,10 +98,12 @@
 # Set Common Variables
 get_filename_component(IVW_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR} PATH)
 set(IVW_INCLUDE_DIR ${IVW_ROOT_DIR}/include)
-set(IVW_CORE_INCLUDE_DIR ${IVW_ROOT_DIR}/core/include)
-set(IVW_QT_INCLUDE_DIR ${IVW_ROOT_DIR}/qt/include)
+set(IVW_CORE_INCLUDE_DIR ${IVW_ROOT_DIR}/include/inviwo/core)
+set(IVW_QT_INCLUDE_DIR ${IVW_ROOT_DIR}/include/inviwo/qt)
 set(IVW_MODULE_DIR ${IVW_ROOT_DIR}/modules)
 set(IVW_SOURCE_DIR ${IVW_ROOT_DIR}/src)
+set(IVW_CORE_SOURCE_DIR ${IVW_ROOT_DIR}/src/core)
+set(IVW_QT_SOURCE_DIR ${IVW_ROOT_DIR}/src/qt)
 set(IVW_APPLICATION_DIR ${IVW_ROOT_DIR}/apps)
 set(IVW_RESOURCES_DIR ${IVW_ROOT_DIR}/resources)
 set(IVW_EXTENSIONS_DIR ${IVW_ROOT_DIR}/ext)


[3rdParty] changed used versions of boost (1.56 -> 1.58) and glew (1.11 -> 1.12)

Change-Id: I2da95cc0d83a08d62d62ccafd50deac8a5530391
Reviewed-on: http://git-master/r/764864
Reviewed-by: Markus Tavenrath <68799dff7f0e6a7e6c140fe152c2ad98a61f10a8@nvidia.com>
Tested-by: Markus Tavenrath <68799dff7f0e6a7e6c140fe152c2ad98a61f10a8@nvidia.com>

--- 3rdPartyBuild.cmake
+++ 3rdPartyBuild.cmake
@@ -74,14 +74,14 @@

 macro(boost)
     message("Building Boost.")
-    if (NOT EXISTS "${DOWNLOAD_DIR}/boost_1_56_0.tar.bz2")
+    if (NOT EXISTS "${DOWNLOAD_DIR}/boost_1_58_0.tar.bz2")
       message("Downloading Boost. This might take a while.")
-      file(DOWNLOAD "http://downloads.sourceforge.net/project/boost/boost/1.56.0/boost_1_56_0.tar.bz2" "${DOWNLOAD_DIR}/boost_1_56_0.tar.bz2" STATUS downloaded)
+      file(DOWNLOAD "http://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.tar.bz2" "${DOWNLOAD_DIR}/boost_1_58_0.tar.bz2" STATUS downloaded)
     endif()
-    execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf "${DOWNLOAD_DIR}/boost_1_56_0.tar.bz2" WORKING_DIRECTORY "${SOURCE_DIR}")
+    execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf "${DOWNLOAD_DIR}/boost_1_58_0.tar.bz2" WORKING_DIRECTORY "${SOURCE_DIR}")

-    execute_process(COMMAND cmd.exe "/C" "bootstrap.bat" WORKING_DIRECTORY "${SOURCE_DIR}/boost_1_56_0")
-    execute_process(COMMAND cmd.exe /C b2 -j "$ENV{NUMBER_OF_PROCESSORS}" --toolset=msvc-11.0 address-model=64 install --prefix=${CMAKE_INSTALL_PREFIX}/boost/ WORKING_DIRECTORY "${SOURCE_DIR}/boost_1_56_0")
+    execute_process(COMMAND cmd.exe "/C" "bootstrap.bat" WORKING_DIRECTORY "${SOURCE_DIR}/boost_1_58_0")
+    execute_process(COMMAND cmd.exe /C b2 -j "$ENV{NUMBER_OF_PROCESSORS}" --toolset=msvc-11.0 address-model=64 install --prefix=${CMAKE_INSTALL_PREFIX}/boost/ WORKING_DIRECTORY "${SOURCE_DIR}/boost_1_58_0")
 endmacro()

 macro(devil)
@@ -102,9 +102,9 @@

 macro(glew)
     message("downloading GLEW")
-    set(FILENAME "glew-1.11.0-win32.zip")
+    set(FILENAME "glew-1.12.0-win32.zip")
     if (NOT EXISTS "${DOWNLOAD_DIR}/${FILENAME}")
-        file(DOWNLOAD "http://downloads.sourceforge.net/project/glew/glew/1.11.0/${FILENAME}" "${DOWNLOAD_DIR}/${FILENAME}" STATUS downloaded)
+        file(DOWNLOAD "http://downloads.sourceforge.net/project/glew/glew/1.12.0/${FILENAME}" "${DOWNLOAD_DIR}/${FILENAME}" STATUS downloaded)
     endif()
     execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf "${DOWNLOAD_DIR}/${FILENAME}" WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}")

@@ -113,7 +113,7 @@
       execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_INSTALL_PREFIX}/glew")
     endif()

-    file(RENAME "${CMAKE_INSTALL_PREFIX}/glew-1.11.0" "${CMAKE_INSTALL_PREFIX}/glew")
+    file(RENAME "${CMAKE_INSTALL_PREFIX}/glew-1.12.0" "${CMAKE_INSTALL_PREFIX}/glew")
 endmacro()

 lib3ds()


- updated FindPNG module to the new version of libpng.

--- CMake/FindPNG.cmake
+++ CMake/FindPNG.cmake
@@ -8,7 +8,7 @@
 set(PNG_SEARCH_PATHS
 	${CERBER_GAME_ENGINE_DEPS_DIR}/lib
 	${CERBER_GAME_ENGINE_DEPS_DIR}/include
-	${CERBER_GAME_ENGINE_DEPS_DIR}/include/libpng15
+	${CERBER_GAME_ENGINE_DEPS_DIR}/include/libpng16
 )

 set(MSVC_YEAR_NAME)
@@ -37,7 +37,7 @@
 )

 find_library(PNG_LIBRARY
-	NAMES png libpng png15 libpng15 libpng15_static
+	NAMES png libpng png16 libpng16 libpng16_static
 	HINTS
 	NO_DEFAULT_PATH
 	NO_CMAKE_ENVIRONMENT_PATH
@@ -50,7 +50,7 @@

 # First search for d-suffixed libs
 find_library(PNG_LIBRARY_DEBUG
-	NAMES pngd libpngd png15d libpng15d libpng15_staticd
+	NAMES pngd libpngd png16d libpng16d libpng16_staticd
 	HINTS
 	NO_DEFAULT_PATH
 	NO_CMAKE_ENVIRONMENT_PATH
@@ -64,7 +64,7 @@
 if(NOT PNG_LIBRARY_DEBUG)
 	# Then search for non suffixed libs if necessary, but only in debug dirs
 	find_library(PNG_LIBRARY_DEBUG
-		NAMES png libpng png15 libpng15 libpng15_static
+		NAMES png libpng png16 libpng16 libpng16_static
 		HINTS
 		NO_DEFAULT_PATH
 		NO_CMAKE_ENVIRONMENT_PATH


Setup {DY,}LD_LIBRARY_PATH in clazy shell script

Summary:
This allows us to launch clazy from the build folder without
installing it first. It also allows us to install clazy into
some path and launch it from there directly, without first having
to setup the environment manually.

Test Plan:
- launched clazy without installation from build dir
- installed clazy into an arbitrary path and launched from there

Reviewers: smartins

Reviewed By: smartins

Differential Revision: https://phabricator.kde.org/D5298

--- clazy.cmake
+++ clazy.cmake
@@ -76,4 +76,18 @@
   exit
 fi

-${CLANGXX:-clang++} -Qunused-arguments -Xclang -load -Xclang ClangLazy@CMAKE_SHARED_LIBRARY_SUFFIX@ -Xclang -add-plugin -Xclang clang-lazy $@
+ClangLazyLib=ClangLazy@CMAKE_SHARED_LIBRARY_SUFFIX@
+
+if ( test -f "$libdir/$ClangLazyLib" )
+then
+    # find plugin libraries in install dir
+    export LD_LIBRARY_PATH=$libdir:$LD_LIBRARY_PATH
+    export DYLD_LIBRARY_PATH=$libdir:$DYLD_LIBRARY_PATH
+elif ( test -f "$(dirname $0)/lib/$ClangLazyLib" )
+then
+    # find plugin libraries in build dir
+    export LD_LIBRARY_PATH=$(dirname $0)/lib:$LD_LIBRARY_PATH
+    export DYLD_LIBRARY_PATH=$(dirname $0)/lib:$DYLD_LIBRARY_PATH
+fi
+
+${CLANGXX:-clang++} -Qunused-arguments -Xclang -load -Xclang $ClangLazyLib -Xclang -add-plugin -Xclang clang-lazy $@


adapt to COMPILE_STATIC_CCTAG_LIBRARY change

--- mpg-2014-20.cmake
+++ mpg-2014-20.cmake
@@ -12,4 +12,6 @@
 set(CMAKE_CXX_FLAGS_DEBUG   "${CMAKE_CXX_FLAGS_DEBUG}   -DTHIS_IS_DEBUG_MODE")
 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DTHIS_IS_RELEASE_MODE")

+SET(COMPILE_STATIC_CCTAG_LIBRARY true)
+
 set(USE_CUDA true)


CMake: use separate folder for each configuration for combined static libraries (close #290)

--- BuildUtils.cmake
+++ BuildUtils.cmake
@@ -312,12 +312,15 @@

     if(MSVC)
         add_custom_command(
-            OUTPUT ${COMBINED_LIB_NAME}
-            COMMAND lib.exe /OUT:${COMBINED_LIB_NAME} ${COMBINED_LIB_TARGET_FILES}
+            OUTPUT "$<CONFIG>/${COMBINED_LIB_NAME}"
+            COMMAND lib.exe /OUT:"$<CONFIG>/${COMBINED_LIB_NAME}" ${COMBINED_LIB_TARGET_FILES}
             DEPENDS ${LIBS_LIST}
             COMMENT "Combining libraries..."
         )
-        add_custom_target(${CUSTOM_TARGET_NAME} ALL DEPENDS ${COMBINED_LIB_NAME})
+        add_custom_target(${CUSTOM_TARGET_NAME} ALL DEPENDS "$<CONFIG>/${COMBINED_LIB_NAME}")
+        install(FILES "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/${COMBINED_LIB_NAME}"
+                DESTINATION ${INSTALL_DESTINATION}
+        )
     else()

         if(PLATFORM_WIN32)
@@ -354,15 +357,15 @@
             )

             add_custom_target(${CUSTOM_TARGET_NAME} ALL DEPENDS ${COMBINED_LIB_NAME})
+            install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${COMBINED_LIB_NAME}"
+                    DESTINATION ${INSTALL_DESTINATION}
+            )
         else()
             message("ar command is not found")
         endif()
     endif()

     if(TARGET ${CUSTOM_TARGET_NAME})
-        install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${COMBINED_LIB_NAME}"
-                DESTINATION ${INSTALL_DESTINATION}
-        )
         set_target_properties(${CUSTOM_TARGET_NAME} PROPERTIES
             FOLDER ${CUSTOM_TARGET_FOLDER}
         )


Mise à jour du nom de build. Il faut désormais le paramétrer à la main.

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -2,7 +2,7 @@
 # the specified NIGHLY_START_TIME. Time is specified in 24 hour format.
 SET (NIGHTLY_START_TIME "01:00:00 CET")

-SET (BUILDNAME "${BUILDNAME}${CMAKE_BUILD_TYPE}")
+SET (BUILDNAME "${BUILDNAME}")

 # Dart server to submit results (used by client)


ENH (#1731): Edited DartConfig.cmake for use with internal cdash on mbits.

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -1,22 +1,19 @@
 OPTION(USE_KITWARE_DARTBOARD "Use the Kitware Dartboard for Build Submissions." OFF)

+# internal cdash
+set(CTEST_PROJECT_NAME "MITK")
+set(CTEST_NIGHTLY_START_TIME "21:00:00 CET")

-# never use kitware dashboard, since it doesn't work at the moment (10.10.2007)
-SET (DROP_METHOD xmlrpc)
-SET (DROP_SITE "http://makalu:8081")
-SET (DROP_LOCATION "MITK-public")
-SET (NIGHTLY_START_TIME "21:00:00 CET")
-SET (DART_TESTING_TIMEOUT 900)
+set(CTEST_DROP_METHOD "http")
+set(CTEST_DROP_SITE "mbits")
+set(CTEST_DROP_LOCATION "/cdash/submit.php?project=MITK")
+set(CTEST_DROP_SITE_CDASH TRUE)

 # configure dart for submission to kitware
 IF(USE_KITWARE_DARTBOARD)
 #
 # Dart server to submit results (used by client)
 #
-    SET(DROP_METHOD "http")
-    SET(DROP_SITE "my.cdash.org")
-    SET(DROP_LOCATION "/submit.php?project=MITK")
-
     SET(CTEST_DROP_METHOD "http")
     SET(CTEST_DROP_SITE "my.cdash.org")
     SET(CTEST_DROP_LOCATION "/submit.php?project=MITK")


Remove obsolete file

Remove obsolete file

--- FindServus.cmake
+++ FindServus.cmake
@@ -1,77 +0,0 @@
-#
-# Copyright 2012 Stefan Eilemann <eile@eyescale.ch>
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#
-#  - Redistributions of source code must retain the above copyright notice, this
-#    list of conditions and the following disclaimer.
-#  - Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#  - Neither the name of Eyescale Software GmbH nor the names of its
-#    contributors may be used to endorse or promote products derived from this
-#    software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-#==================================
-#
-# - Find Servus
-# This module searches for the Servus library
-#    See https://github.com/Eyescale/servus
-#
-#==================================
-#
-# The following environment variables are respected for finding Servus.
-# CMAKE_PREFIX_PATH can also be used for this (see find_library() CMake
-# documentation).
-#
-#    SERVUS_ROOT
-#    EQ_ROOT
-#
-# This module defines the following output variables:
-#
-#    SERVUS_FOUND - Was Servus and all of the specified components found?
-#
-#    SERVUS_VERSION - The version of Servus which was found
-#
-#    SERVUS_VERSION_ABI - The DSO version of Servus which was found
-#
-#    SERVUS_INCLUDE_DIRS - Where to find the headers
-#
-#    SERVUS_LIBRARIES - The Servus libraries
-#
-#==================================
-# Example Usage:
-#
-#  find_package(Servus 0.3.0 REQUIRED)
-#  include_directories(${SERVUS_INCLUDE_DIRS})
-#
-#  add_executable(foo foo.cc)
-#  target_link_libraries(foo ${SERVUS_LIBRARIES})
-#
-#==================================
-# Naming convention:
-#  Local variables of the form _servus_foo
-#  Input variables of the form Servus_FOO
-#  Output variables of the form SERVUS_FOO
-#
-
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/FindServus)
-include(FindLibraryPackage)
-include(FindPackageHandleStandardArgs)
-
-find_library_package(servus)
-find_package_handle_standard_args(Servus DEFAULT_MSG
-                                  SERVUS_LIBRARIES SERVUS_INCLUDE_DIRS)


Relax EQUALIZER_DEB_DEPENDENCIES

Relax EQUALIZER_DEB_DEPENDENCIES

[ ] May break build
[ ] May break existing applications (see CHANGES.txt)
[ ] Bugfix
[ ] New Feature
[x] Cleanup
[ ] Optimization
[ ] Documentation

--- FindEqualizer.cmake
+++ FindEqualizer.cmake
@@ -219,7 +219,7 @@
   if(EQUALIZER_VERSION_ABI LESS 110)
     set(EQUALIZER_DEB_DEPENDENCIES "equalizer (>=${EQUALIZER_VERSION})")
   else()
-    set(EQUALIZER_DEB_DEPENDENCIES "equalizer${EQUALIZER_VERSION_ABI}")
+    set(EQUALIZER_DEB_DEPENDENCIES "equalizer${EQUALIZER_VERSION_ABI}-eqlib")
   endif()
 endif()


Shaders are now recompiled if any of there includes change.

--- sigma_setup.cmake
+++ sigma_setup.cmake
@@ -3,6 +3,31 @@
 set(MATERIAL_COMPILER scmaterial)
 set(MODEL_COMPILER scmodel)
 set(REFLECTION_COMPILER screflect)
+
+set(SIGMA_SHADER_INCLUDE_REGEX "#[ \t]*include[ \t]*[<\"]([^>\"]*)[>\"]\n")
+
+function(get_file_depends filename output)
+    file(READ ${filename} source)
+    string(REGEX MATCHALL ${SIGMA_SHADER_INCLUDE_REGEX} included_files "${source}")
+    set(my_deps)
+    foreach(include_file ${included_files})
+        string(REGEX REPLACE ${SIGMA_SHADER_INCLUDE_REGEX} "\\1" inc "${include_file}")
+        get_filename_component(dir ${inc} DIRECTORY)
+        get_filename_component(name ${inc} NAME)
+        find_path(file_path NAMES ${name} PATHS ${ARGN} PATH_SUFFIXES ${dir} NO_DEFAULT_PATH)
+        if(dir STREQUAL "")
+            set(my_deps ${my_deps} "${file_path}/${name}")
+        else()
+            set(my_deps ${my_deps} "${file_path}/${dir}/${name}")
+        endif()
+    endforeach()
+    foreach(dep ${my_deps})
+        if(NOT dep IN_LIST ${output})
+            get_file_depends(${dep} ${output} ${ARGN})
+        endif()
+        set(${output} ${${output}} ${dep} PARENT_SCOPE)
+    endforeach()
+endfunction()

 function(generate_type_regex_and_glob name)
     set(globs)
@@ -84,11 +109,14 @@
             get_filename_component(directory ${shader_time_stamp} DIRECTORY)
             file(MAKE_DIRECTORY ${directory})

+            get_file_depends(${shader} include_deps ${include_dirs})
+
             add_custom_command(
                 OUTPUT "${shader_time_stamp}"
                 COMMAND ${SHADER_COMPILER} ARGS --output="${CMAKE_BINARY_DIR}/data" ${include_args} "${shader}"
                 COMMAND ${CMAKE_COMMAND} ARGS -E touch "${shader_time_stamp}"
                 MAIN_DEPENDENCY "${shader}"
+                DEPENDS ${include_deps}
                 WORKING_DIRECTORY "${package_PACKAGE_ROOT}"
                 COMMENT ""
                 SOURCES "${shader}"


bump dev version

bump dev version

--- conan.cmake
+++ conan.cmake
@@ -33,7 +33,7 @@
 # but it is only necessary on the end-user side. It is not necessary to create conan
 # packages, in fact it shouldn't be use for that. Check the project documentation.

-# version: 0.17.0-dev
+# version: 0.18.0-dev

 include(CMakeParseArguments)


Patch [3427552] - FindOpenGLES.cmake doesn't support OpenGL ES 1.1 spec

--HG--
branch : v1-8

--- CMake/Packages/FindOpenGLES.cmake
+++ CMake/Packages/FindOpenGLES.cmake
@@ -42,17 +42,14 @@

   ELSE(APPLE)

-
-
     FIND_PATH(OPENGLES_INCLUDE_DIR GLES/gl.h
       /usr/openwin/share/include
       /opt/graphics/OpenGL/include /usr/X11R6/include
       /usr/include
     )

-
     FIND_LIBRARY(OPENGLES_gl_LIBRARY
-      NAMES GLES_CM
+      NAMES GLES_CM GLESv1_CM
       PATHS /opt/graphics/OpenGL/lib
             /usr/openwin/lib
             /usr/shlib /usr/X11R6/lib
@@ -62,16 +59,13 @@
     # On Unix OpenGL most certainly always requires X11.
     # Feel free to tighten up these conditions if you don't
     # think this is always true.
-    # It's not true on OSX.

     IF (OPENGLES_gl_LIBRARY)
       IF(NOT X11_FOUND)
         INCLUDE(FindX11)
       ENDIF(NOT X11_FOUND)
       IF (X11_FOUND)
-        IF (NOT APPLE)
-          SET (OPENGLES_LIBRARIES ${X11_LIBRARIES})
-        ENDIF (NOT APPLE)
+        SET (OPENGLES_LIBRARIES ${X11_LIBRARIES})
       ENDIF (X11_FOUND)
     ENDIF (OPENGLES_gl_LIBRARY)

@@ -99,4 +93,4 @@
   set(CMAKE_PREFIX_PATH ${CMAKE_SYSYEM_OUT_DIR})
   FIND_LIBRARY(OPENGLES_gl_LIBRARY libgles_cm )
   set(CMAKE_PREFIX_PATH ${ORIGINAL_CMAKE_PREFIX_PATH})
-endif()+endif()


Fix common_package() cache bug wrt NAME_FOUND

In the chaos of find_package and common_package, called by SubProject,
PackageConfig and each project, it cannot be reliably assumed that
NAME_FOUND guarantees to have NAME_LIBRARIES and other variables be
still set. Hence a find_package is always performed while calling
common_package() to avoid remedy sideffects.

--- CommonPackage.cmake
+++ CommonPackage.cmake
@@ -48,6 +48,7 @@
   set(__args ${ARGN}) # ARGN is not a list. make one.

   # SYSTEM specified?
+  set(__is_system_package)
   if(__args)
     string(REGEX MATCH "SYSTEM?" __is_system_package ${__args})
     list(REMOVE_ITEM __args "SYSTEM")
@@ -58,54 +59,41 @@
     set(__is_system_package ON)
   endif()

-  # COMPONENTS specified?
+  # Get (optional) version from argument
+  set(__package_version)
   if(__args)
-    string(REGEX MATCH "COMPONENTS?" __has_components ${__args})
-    if(__has_components)
-      set(__has_components ON)
-    else()
-      set(__has_components)
-    endif()
-  endif()
-
-  # OPT: only forward to find_package if not found or component find (tbd
-  # implement found_components check)
-  if((NOT ${Package_Name}_FOUND AND NOT ${PACKAGE_NAME}_FOUND) OR __has_components)
-    set(__package_version)
-    if(__args)
-      list(GET __args 0 __package_version)
-      if(__package_version MATCHES "^[0-9.]+$") # is a version
-        set(__package_version ">=${__package_version}")
-      else()
-        set(__package_version)
-      endif()
-    endif()
-
-    if(COMMON_PACKAGE_USE_QUIET)
+    list(GET __args 0 __package_version)
+    if(__package_version MATCHES "^[0-9.]+$") # is a version
+      set(__package_version ">=${__package_version}")
+    endif()
+  endif()
+
+  # QUIET either via as global option or as argument
+  set(__find_quiet)
+  if(COMMON_PACKAGE_USE_QUIET)
+    set(__find_quiet "QUIET")
+  else()
+    list(FIND __args "QUIET" __quiet_pos)
+    if(NOT __quiet_pos EQUAL -1)
       set(__find_quiet "QUIET")
-    else()
-      list(FIND __args "QUIET" __quiet_pos)
-      if(__quiet_pos EQUAL -1)
-        set(__find_quiet)
-      else()
-        set(__find_quiet "QUIET")
-      endif()
-    endif()
-
-    list(FIND __args "REQUIRED" __is_required)
-    if(__is_required EQUAL -1) # Optional find
-      find_package(${Package_Name} ${__find_quiet} ${__args}) # try standard cmake way
-      if((NOT ${Package_Name}_FOUND) AND (NOT ${PACKAGE_NAME}_FOUND) AND PKG_CONFIG_EXECUTABLE)
-        pkg_check_modules(${Package_Name} ${Package_Name}${__package_version}
-          ${__find_quiet}) # try pkg_config way
-      endif()
-    else() # required find
-      list(REMOVE_AT __args ${__is_required})
-      find_package(${Package_Name} ${__find_quiet} ${__args}) # try standard cmake way
-      if((NOT ${Package_Name}_FOUND) AND (NOT ${PACKAGE_NAME}_FOUND) AND PKG_CONFIG_EXECUTABLE)
-        pkg_check_modules(${Package_Name} REQUIRED ${Package_Name}${__package_version}
-          ${__find_quiet}) # try pkg_config way (and fail if needed)
-      endif()
+    endif()
+  endif()
+
+  list(FIND __args "REQUIRED" __is_required)
+  # Optional find
+  if(__is_required EQUAL -1)
+    find_package(${Package_Name} ${__find_quiet} ${__args}) # try standard cmake way
+    if((NOT ${Package_Name}_FOUND) AND (NOT ${PACKAGE_NAME}_FOUND) AND PKG_CONFIG_EXECUTABLE)
+      pkg_check_modules(${Package_Name} ${Package_Name}${__package_version}
+        ${__find_quiet}) # try pkg_config way
+    endif()
+  # required find
+  else()
+    list(REMOVE_AT __args ${__is_required})
+    find_package(${Package_Name} ${__find_quiet} ${__args}) # try standard cmake way
+    if((NOT ${Package_Name}_FOUND) AND (NOT ${PACKAGE_NAME}_FOUND) AND PKG_CONFIG_EXECUTABLE)
+      pkg_check_modules(${Package_Name} REQUIRED ${Package_Name}${__package_version}
+        ${__find_quiet}) # try pkg_config way (and fail if needed)
     endif()
   endif()

@@ -120,21 +108,28 @@
     set(${Package_Name}_name ${Package_Name})
     set(${PACKAGE_NAME}_FOUND TRUE)
   else()
+    # for common_package_post()
     set(${PROJECT_NAME}_FIND_PACKAGES_NOTFOUND
       "${${PROJECT_NAME}_FIND_PACKAGES_NOTFOUND} ${Package_Name}")
   endif()
   if(${Package_Name}_name)
+    # for common_package_post()
+    set(${PROJECT_NAME}_FIND_PACKAGES_FOUND
+      "${${PROJECT_NAME}_FIND_PACKAGES_FOUND} ${Package_Name}")
+
+    # for defines.h
     set(__use_package_define "${UPPER_PROJECT_NAME}_USE_${PACKAGE_NAME}")
     string(REGEX REPLACE "-" "_" __use_package_define ${__use_package_define})
     list(APPEND COMMON_PACKAGE_DEFINES ${__use_package_define})
+
+    # for PackageConfig.cmake
     if(NOT COMMON_LIBRARY_TYPE MATCHES "SHARED")
       list(APPEND ${UPPER_PROJECT_NAME}_DEPENDENT_LIBRARIES ${Package_Name})
     endif()
-    set(${PROJECT_NAME}_FIND_PACKAGES_FOUND
-      "${${PROJECT_NAME}_FIND_PACKAGES_FOUND} ${Package_Name}")
+
+    # setup link_ and include_directories
     set(__library_dirs ${Package_Name}_LIBRARY_DIRS ${PACKAGE_NAME}_LIBRARY_DIRS)
-    link_directories( ${__library_dirs} )
-    set(__include_dirs)
+    link_directories(${__library_dirs})
     if(NOT "${${Package_Name}_INCLUDE_DIRS}" MATCHES "-NOTFOUND")
       list(APPEND __include_dirs ${${Package_Name}_INCLUDE_DIRS})
     endif()


Fix Equalizer finder

Fix Equalizer finder

--- FindEqualizer.cmake
+++ FindEqualizer.cmake
@@ -178,7 +178,11 @@

 # Inform the users with an error message based on what version they
 # have vs. what version was required.
-if(_eq_version_not_high_enough)
+if(NOT EQUALIZER_VERSION)
+  set(_eq_EPIC_FAIL TRUE)
+  find_package_handle_standard_args(Equalizer DEFAULT_MSG
+                                    _eq_LIBRARY _eq_INCLUDE_DIR)
+elseif(_eq_version_not_high_enough)
   set(_eq_EPIC_FAIL TRUE)
   message(${_eq_version_output_type}
     "Version ${Equalizer_FIND_VERSION} or higher of Equalizer is required. "
@@ -228,7 +232,7 @@
   find_package(Collage "${_eq_coVersion_${EQUALIZER_VERSION}}" EXACT
                ${_eq_required} ${_eq_quiet})
   if(NOT COLLAGE_FOUND)
-    set(_eq_EPIC_FAIL 1)
+    set(_eq_EPIC_FAIL TRUE)
   endif()
   if(NOT _eq_EPIC_FAIL)
     # GLEW_MX
@@ -250,7 +254,7 @@
     else()
       find_package(GLEW_MX ${_eq_required} ${_eq_quiet})
       if(NOT GLEW_MX_FOUND)
-        set(_eq_EPIC_FAIL 1)
+        set(_eq_EPIC_FAIL TRUE)
       endif()
     endif()
   endif()


CetCMakeUtilities: Support Boost imported targets

Support usage of new Boost imported targets in
set_boost_unit_properties. Allow continued usage of old style variables
but always use imported targets if present.

NB: Could also replace function call with creation of custom
interface target in CetTest. That might be cleaner.

--- Modules/CetCMakeUtilities.cmake
+++ Modules/CetCMakeUtilities.cmake
@@ -179,14 +179,11 @@

   These settings assume that Boost has been located using CMake's
   builtin :cmake:module:`FindBoost <cmake:module:FindBoost>` module
-  before being called. If the CMake variables ``Boost_FOUND`` or
-  ``Boost_UNIT_TEST_FRAMEWORK_LIBRARY`` are not set, the function
+  before being called. If the CMake variable ``Boost_FOUND`` is not
+  set or no Boost Unit Test Framework library is supplied via the
+  ``Boost::unit_test_framework`` imported target or ``Boost_UNIT_TEST_FRAMEWORK_LIBRARY`` variable, the function
   raises a FATAL_ERROR. At present, no checking of Release vs Debug
   Boost libraries is performed.
-
-  .. todo::
-
-    Review usage of imported targets in CMake 3.5's FindBoost!

 #]]
 function(set_boost_unit_properties _target)
@@ -203,9 +200,10 @@
       "before using this function"
       )
   endif()
-  if(NOT Boost_UNIT_TEST_FRAMEWORK_LIBRARY)
+  if((NOT TARGET Boost::unit_test_framework)
+     OR (NOT Boost_UNIT_TEST_FRAMEWORK_LIBRARY))
     message(FATAL_ERROR
-      "set_boost_unit_properties: No Boost_UNIT_TEST_FRAMEWORK_LIBRARY found\n"
+      "set_boost_unit_properties: No Target of Variable found for Boost's Unite Test Framework\n"
       "Ensure the project calls\n"
       "find_package(Boost REQUIRED unit_test_framework)\n"
       "before using this function"
@@ -224,9 +222,13 @@

   # PRIVATE incs/libs for now as is assumed tests will not be installed
   # include directories - make private for now
-  target_include_directories(${_target} PRIVATE ${Boost_INCLUDE_DIRS})
   # libs to link - can't specify link rule here as others may use it.
-  target_link_libraries(${_target} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
+  if(TARGET Boost::unit_test_framework)
+    target_link_libraries(${_target} Boost::unit_test_framework)
+  else()
+    target_include_directories(${_target} PRIVATE ${Boost_INCLUDE_DIRS})
+    target_link_libraries(${_target} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
+  endif()
 endfunction()


Denoise

Denoise

--- SubProject.cmake
+++ SubProject.cmake
@@ -76,7 +76,7 @@
     string(TOUPPER ${name} NAME)
     if(NOT ${NAME}_FOUND)
       if(NOT EXISTS ${CMAKE_SOURCE_DIR}/${name})
-        find_package(${name})
+        find_package(${name} QUIET)
       endif()
       if(NOT ${NAME}_FOUND)
         git_external(${CMAKE_SOURCE_DIR}/${name} ${url} ${tag})


BUG: Declaring and filling COMMON_BUILD_OPTIONS_FOR_EXTERNALPACKAGES after finding Slicer package was creating compilation errors on linux

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -12,60 +12,10 @@
 else()
   set(gen "${CMAKE_GENERATOR}")
 endif()
-
-
-#===================================================================================
-# Slicer Extension
-option( DTIAtlasBuilder_BUILD_SLICER_EXTENSION "Build DTIAtlasBuilder as a Slicer extension" OFF )
-if( DTIAtlasBuilder_BUILD_SLICER_EXTENSION )
-
-  set(EXTENSION_NAME DTIAtlasBuilder)
-  set(EXTENSION_HOMEPAGE "http://www.nitrc.org/projects/dtiatlasbuilder")
-  set(EXTENSION_CATEGORY "Diffusion")
-  set(EXTENSION_CONTRIBUTORS "Adrien Kaiser (UNC)")
-  set(EXTENSION_DESCRIPTION "A tool to create a DTI Atlas Image from a set of DTI Images")
-  set(EXTENSION_ICONURL "http://www.nitrc.org/project/screenshot.php?group_id=636&screenshot_id=607")
-  set(EXTENSION_SCREENSHOTURLS "http://www.slicer.org/slicerWiki/images/0/02/DTIAtlasBuilder_Interface.png")
-  set(EXTENSION_STATUS Beta)
-  set(EXTENSION_BUILD_SUBDIRECTORY DTIAtlasBuilder-build)
-
-  set(MODULE_NAME DTIAtlasBuilder)
-
-  find_package(Slicer REQUIRED)
-  include(${Slicer_USE_FILE})
-
-  # SlicerExecutionModel_DEFAULT_CLI_RUNTIME_OUTPUT_DIRECTORY and SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION defined in Slicer_USE_FILE
-  # SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION is [sthg]/cli_module : must contain only CLIs
-  # If build as Slicer Extension, CMAKE_INSTALL_PREFIX is set to [ExtensionsFolder]/DTIAtlaBuilder
-  set(INSTALL_DIR ${SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION}) # Set for DTIAtlasBuilder and other cli modules
-  if(APPLE) # On mac, Ext/cli_modules/DTIAtlasBuilder so Ext/ExternalBin is ../ExternalBin
-    set(NOCLI_INSTALL_DIR ${SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION}/../ExternalBin)
-  elseif(WIN32) # On Windows : idem Linux : Ext/lib/Slicer4.2/cli_modules/DTIAtlasBuilder so Ext/ExternalBin is ../../../ExternalBin
-    set(NOCLI_INSTALL_DIR ${SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION}/../../../ExternalBin)
-  else() # Linux : Ext/lib/Slicer4.2/cli_modules/DTIAtlasBuilder so Ext/ExternalBin is ../../../ExternalBin
-    set(NOCLI_INSTALL_DIR ${SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION}/../../../ExternalBin)
-  endif()
-  if( APPLE )
-    set( CMAKE_EXE_LINKER_FLAGS -Wl,-rpath,@loader_path/../../../../../ )
-  endif()
-else( DTIAtlasBuilder_BUILD_SLICER_EXTENSION )
-
-  option( FORCE_BUILD_ON_MAC_OR_WIN "Force Building on Known failing platforms" OFF )
-  if(NOT FORCE_BUILD_ON_MAC_OR_WIN AND ( APPLE OR WIN32 ) ) # If not Slicer ext, not compile because will fail at run time
-    message(FATAL_ERROR "DTIAtlasBuilder has known issues and will not run on Mac or Windows\nSet -DFORCE_BUILD_ON_MAC_OR_WIN:BOOL=ON to override")
-  endif()
-
-  set(INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
-
-endif( DTIAtlasBuilder_BUILD_SLICER_EXTENSION )
-
-set( COMPILE_PACKAGE ON CACHE BOOL "Compiles all the external projects and tools" )
-
 set(COMMON_BUILD_OPTIONS_FOR_EXTERNALPACKAGES
   -DMAKECOMMAND:STRING=${MAKECOMMAND}
   -DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH}
   -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-  -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
   -DCMAKE_CXX_COMPILER:PATH=${CMAKE_CXX_COMPILER}
   -DCMAKE_CXX_FLAGS_RELEASE:STRING=${CMAKE_CXX_FLAGS_RELEASE}
   -DCMAKE_CXX_FLAGS_DEBUG:STRING=${CMAKE_CXX_FLAGS_DEBUG}
@@ -75,7 +25,6 @@
   -DCMAKE_C_FLAGS_DEBUG:STRING=${CMAKE_C_FLAGS_DEBUG}
   -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
   -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
-  -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
   -DCMAKE_LINKER_FLAGS:STRING=${CMAKE_LINKER_FLAGS}
   -DCMAKE_MODULE_LINKER_FLAGS:STRING=${CMAKE_MODULE_LINKER_FLAGS}
   -DCMAKE_GENERATOR:STRING=${CMAKE_GENERATOR}
@@ -90,6 +39,59 @@
   -DMEMORYCHECK_COMMAND:PATH=${MEMORYCHECK_COMMAND}
   -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
   -DCMAKE_MODULE_LINKER_FLAGS:STRING=${CMAKE_MODULE_LINKER_FLAGS}
+)
+
+#===================================================================================
+# Slicer Extension
+option( DTIAtlasBuilder_BUILD_SLICER_EXTENSION "Build DTIAtlasBuilder as a Slicer extension" OFF )
+if( DTIAtlasBuilder_BUILD_SLICER_EXTENSION )
+
+  set(EXTENSION_NAME DTIAtlasBuilder)
+  set(EXTENSION_HOMEPAGE "http://www.nitrc.org/projects/dtiatlasbuilder")
+  set(EXTENSION_CATEGORY "Diffusion")
+  set(EXTENSION_CONTRIBUTORS "Adrien Kaiser (UNC)")
+  set(EXTENSION_DESCRIPTION "A tool to create a DTI Atlas Image from a set of DTI Images")
+  set(EXTENSION_ICONURL "http://www.nitrc.org/project/screenshot.php?group_id=636&screenshot_id=607")
+  set(EXTENSION_SCREENSHOTURLS "http://www.slicer.org/slicerWiki/images/0/02/DTIAtlasBuilder_Interface.png")
+  set(EXTENSION_STATUS Beta)
+  set(EXTENSION_BUILD_SUBDIRECTORY DTIAtlasBuilder-build)
+
+  set(MODULE_NAME DTIAtlasBuilder)
+
+  find_package(Slicer REQUIRED)
+  include(${Slicer_USE_FILE})
+
+  # SlicerExecutionModel_DEFAULT_CLI_RUNTIME_OUTPUT_DIRECTORY and SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION defined in Slicer_USE_FILE
+  # SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION is [sthg]/cli_module : must contain only CLIs
+  # If build as Slicer Extension, CMAKE_INSTALL_PREFIX is set to [ExtensionsFolder]/DTIAtlaBuilder
+  set(INSTALL_DIR ${SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION}) # Set for DTIAtlasBuilder and other cli modules
+  if(APPLE) # On mac, Ext/cli_modules/DTIAtlasBuilder so Ext/ExternalBin is ../ExternalBin
+    set(NOCLI_INSTALL_DIR ${SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION}/../ExternalBin)
+  elseif(WIN32) # On Windows : idem Linux : Ext/lib/Slicer4.2/cli_modules/DTIAtlasBuilder so Ext/ExternalBin is ../../../ExternalBin
+    set(NOCLI_INSTALL_DIR ${SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION}/../../../ExternalBin)
+  else() # Linux : Ext/lib/Slicer4.2/cli_modules/DTIAtlasBuilder so Ext/ExternalBin is ../../../ExternalBin
+    set(NOCLI_INSTALL_DIR ${SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION}/../../../ExternalBin)
+  endif()
+  if( APPLE )
+    set( CMAKE_EXE_LINKER_FLAGS -Wl,-rpath,@loader_path/../../../../../ )
+  endif()
+  set( BUILD_SHARED_LIBS OFF CACHE BOOL "Builds shared libs")
+else( DTIAtlasBuilder_BUILD_SLICER_EXTENSION )
+
+  option( FORCE_BUILD_ON_MAC_OR_WIN "Force Building on Known failing platforms" OFF )
+  if(NOT FORCE_BUILD_ON_MAC_OR_WIN AND ( APPLE OR WIN32 ) ) # If not Slicer ext, not compile because will fail at run time
+    message(FATAL_ERROR "DTIAtlasBuilder has known issues and will not run on Mac or Windows\nSet -DFORCE_BUILD_ON_MAC_OR_WIN:BOOL=ON to override")
+  endif()
+
+  set(INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
+
+endif( DTIAtlasBuilder_BUILD_SLICER_EXTENSION )
+
+set( COMPILE_PACKAGE ON CACHE BOOL "Compiles all the external projects and tools" )
+
+list( APPEND COMMON_BUILD_OPTIONS_FOR_EXTERNALPACKAGES
+  -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+  -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
 )


Python dev path

Python dev path

--- Targets/Linux.cmake
+++ Targets/Linux.cmake
@@ -5,6 +5,6 @@
 set(CMAKE_Fortran_COMPILER mpif90)
 set(CMAKE_CXX_COMPILER mpicxx)

-set(PYTHON_INCLUDE_PATH "/usr/include/python2.6/")
+#set(PYTHON_INCLUDE_PATH "/usr/include/python2.6/")
 set(CXX_TOOLCHAINFLAGS "-O3 -openmp -lgomp")
 set(F_TOOLCHAINFLAGS "-O3 -cpp -openmp")


correct support of BG/Q detection

correct support of BG/Q detection

--- Common.cmake
+++ Common.cmake
@@ -135,6 +135,10 @@
   set(TRAVIS ON)
 endif()

+if(IS_DIRECTORY "/bgsys")
+    set(BGQ_A2 TRUE)
+endif()
+
 include(CommonApplication)
 include(CommonCode)
 include(CommonDocumentation)


CSharp: Make linux builds work again.

CSharp: Make linux builds work again.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -281,7 +281,7 @@
         set (SWIG_EXECUTABLE ${CMAKE_BINARY_DIR}/swig-dist/${SWIG_PLATFORM}/bin/swig${CMAKE_EXECUTABLE_SUFFIX})
         # Get SWIG version
         execute_process(COMMAND ${SWIG_EXECUTABLE} -version OUTPUT_VARIABLE SWIG_VERSION)
-        string(REGEX MATCH "SWIG Version ([0-9\\.]+)" SWIG_VERSION ${SWIG_VERSION})
+        string(REGEX MATCH "SWIG Version ([0-9\\.]+)" SWIG_VERSION "${SWIG_VERSION}")
         string(REPLACE "SWIG Version " "" SWIG_VERSION "${SWIG_VERSION}")
         string(STRIP "${SWIG_VERSION}" SWIG_VERSION)
         # Swig library path is embeded into executable. We extracted swig somewhere else other than prefix path so we
@@ -349,16 +349,14 @@

 macro (add_target_csharp TARGET PROJECT_FILE)
     if (WIN32 AND NOT URHO3D_WITH_MONO)
-        include_external_msproject(${TARGET} ${PROJECT_FILE} TYPE FAE04EC0-301F-11D3-BF4B-00C04F79EFBC NugetRestore ${ARGN})
+        include_external_msproject(${TARGET} ${PROJECT_FILE} TYPE FAE04EC0-301F-11D3-BF4B-00C04F79EFBC)
     else ()
         add_custom_target(${TARGET}
-            COMMAND ${TERM_WORKAROUND} ${MSBUILD} ${PROJECT_FILE} ${ARGN} ${MSBUILD_COMMON_PARAMETERS}
+            COMMAND ${TERM_WORKAROUND} ${MSBUILD} ${PROJECT_FILE} ${MSBUILD_COMMON_PARAMETERS}
             WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
         set_target_properties(${TARGET} PROPERTIES EXCLUDE_FROM_ALL OFF)
-        if (TARGET NugetRestore)
-            add_dependencies(${TARGET} ${ARGN} NugetRestore)
-        endif ()
-    endif ()
+    endif ()
+    add_dependencies(${TARGET} ${ARGN} NugetRestore)
 endmacro ()

 macro (csharp_bind_target)


ios: Disable Bitcode support for simulator targets

--- platforms/ios-clang/ios.cmake
+++ platforms/ios-clang/ios.cmake
@@ -109,12 +109,14 @@
         endif()
 elseif (IOS_PLATFORM STREQUAL "SIMULATOR")
         set (XCODE_IOS_PLATFORM "iphonesimulator")
+        set (ENABLE_BITCODE OFF)

         if (NOT IOS_ARCH)
                 set (IOS_ARCH "i386")
         endif()
 elseif (IOS_PLATFORM STREQUAL "SIMULATOR64")
         set (XCODE_IOS_PLATFORM "iphonesimulator")
+        set (ENABLE_BITCODE OFF)

         if (NOT IOS_ARCH)
                 set (IOS_ARCH "x86_64")
@@ -127,6 +129,7 @@
         endif()
 elseif (IOS_PLATFORM STREQUAL "SIMULATOR_TVOS")
         set (XCODE_IOS_PLATFORM "appletvsimulator")
+        set (ENABLE_BITCODE OFF)

         if (NOT IOS_ARCH)
                 set (IOS_ARCH "x86_64")


Fix #149: unset CPPCHECK_EXECUTABLE correctly

--- Findcppcheck.cmake
+++ Findcppcheck.cmake
@@ -41,7 +41,7 @@
 set(CMAKE_FIND_APPBUNDLE NEVER)

 if(CPPCHECK_EXECUTABLE AND NOT EXISTS "${CPPCHECK_EXECUTABLE}")
-	set(CPPCHECK_EXECUTABLE "notfound" CACHE PATH FORCE "")
+  set(CPPCHECK_EXECUTABLE "notfound" CACHE PATH "" FORCE)
 endif()

 # If we have a custom path, look there first.


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -6,21 +6,31 @@
 	set(CMAKI_PATH ${CMAKE_MODULE_PATH})
 ENDIF()

+IF(NOT DEFINED DEPENDS_PATH)
+	set(DEPENDS_PATH ${CMAKI_PATH}/../depends)
+ENDIF()
+
 IF(NOT DEFINED CMAKE_PREFIX_PATH)
-	set(CMAKE_PREFIX_PATH ${CMAKI_PATH}/../depends/cmakefiles)
+	set(CMAKE_PREFIX_PATH ${DEPENDS_PATH}/cmakefiles)
 ENDIF()

 IF(NOT DEFINED ARTIFACTS_PATH)
 	set(ARTIFACTS_PATH ${CMAKI_PATH}/../cmaki_generator)
 ENDIF()

-if(DEFINED CMAKI_DEBUG)
-	MESSAGE("CMAKI_PATH = ${CMAKI_PATH}")
-	MESSAGE("ARTIFACTS_PATH = ${ARTIFACTS_PATH}")
-	MESSAGE("CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}")
-	MESSAGE("CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}")
-	MESSAGE(FATAL_ERROR)
-endif()
+IF(NOT DEFINED DEPENDS_PATHFILE)
+	# rename to ".cmaki.yml" ?
+	set(DEPENDS_PATHFILE ${CMAKI_PATH}/../depends.json)
+ENDIF()
+
+# if(DEFINED CMAKI_DEBUG)
+MESSAGE("CMAKI_PATH = ${CMAKI_PATH}")
+MESSAGE("DEPENDS_PATH = ${DEPENDS_PATH}")
+MESSAGE("CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}")
+MESSAGE("ARTIFACTS_PATH = ${ARTIFACTS_PATH}")
+MESSAGE("DEPENDS_PATHFILE = ${DEPENDS_PATHFILE}")
+# MESSAGE(FATAL_ERROR)
+# endif()

 IF(WIN32)
 	if(MSVC14)
@@ -74,7 +84,7 @@

 	# 1. obtener la version actual (o ninguno en caso de no tener el artefacto)
 	execute_process(
-		COMMAND python ${ARTIFACTS_PATH}/get_package.py --name=${PACKAGE} --depends=${CMAKI_PATH}/../depends.json
+		COMMAND python ${ARTIFACTS_PATH}/get_package.py --name=${PACKAGE} --depends=${DEPENDS_PATHFILE}
 		WORKING_DIRECTORY "${ARTIFACTS_PATH}"
 		OUTPUT_VARIABLE RESULT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
 	if(RESULT_VERSION)
@@ -117,7 +127,7 @@
 	#######################################################

 	# 3. si no tengo los ficheros de cmake, los intento descargar
-	set(depends_dir "${CMAKI_PATH}/../depends")
+	set(depends_dir "${DEPENDS_PATH}")
 	set(depends_bin_package "${depends_dir}/${PACKAGE}-${VERSION}")
 	set(depends_package "${CMAKE_PREFIX_PATH}/${PACKAGE}-${VERSION}")
 	if(NOT EXISTS "${depends_package}" OR "${NO_USE_CACHE_LOCAL}")
@@ -146,7 +156,7 @@
 			# 5. compilo y genera el paquete en local
 			message("Generating artifact ${PACKAGE} ...")
 			execute_process(
-				COMMAND python ${ARTIFACTS_PATH}/build.py ${PACKAGE} --depends=${CMAKI_PATH}/../depends.json --cmakefiles=${CMAKI_PATH} --prefix=${CMAKE_PREFIX_PATH} --third-party-dir=${CMAKE_PREFIX_PATH}
+				COMMAND python ${ARTIFACTS_PATH}/build.py ${PACKAGE} --depends=${DEPENDS_PATHFILE} --cmakefiles=${CMAKI_PATH} --prefix=${CMAKE_PREFIX_PATH} --third-party-dir=${CMAKE_PREFIX_PATH}
 				WORKING_DIRECTORY "${ARTIFACTS_PATH}"
 				RESULT_VARIABLE artifacts_result
 				)
@@ -208,7 +218,6 @@

 			# 9. subir artefactos
 			message("-- uploading ${package_generated_file}")
-			message("python ${ARTIFACTS_PATH}/upload_package.py --url=${CMAKI_REPOSITORY}/upload.php --filename=${package_generated_file}")
 			execute_process(
 				COMMAND python ${ARTIFACTS_PATH}/upload_package.py --url=${CMAKI_REPOSITORY}/upload.php --filename=${package_generated_file}
 				WORKING_DIRECTORY "${ARTIFACTS_PATH}"
@@ -223,7 +232,6 @@
 				file(REMOVE "${package_generated_file}")
 			endif()
 			message("-- uploading ${package_cmake_generated_file}")
-			message("python ${ARTIFACTS_PATH}/upload_package.py --url=${CMAKI_REPOSITORY}/upload.php --filename=${package_cmake_generated_file}")
 			execute_process(
 				COMMAND python ${ARTIFACTS_PATH}/upload_package.py --url=${CMAKI_REPOSITORY}/upload.php --filename=${package_cmake_generated_file}
 				WORKING_DIRECTORY "${ARTIFACTS_PATH}"
@@ -259,7 +267,7 @@

 	# 11. Guardar nuestra version en uso
 	execute_process(
-		COMMAND python ${ARTIFACTS_PATH}/save_package.py --name=${PACKAGE} --version=${VERSION} --depends=${CMAKI_PATH}/../depends.json
+		COMMAND python ${ARTIFACTS_PATH}/save_package.py --name=${PACKAGE} --version=${VERSION} --depends=${DEPENDS_PATHFILE}
 		WORKING_DIRECTORY "${ARTIFACTS_PATH}"
 		RESULT_VARIABLE artifacts_result)
 	if(artifacts_result)
@@ -368,7 +376,7 @@
 	# URL implicita
 	# strip implicito

-	set(depends_dir "${CMAKI_PATH}/../depends")
+	set(depends_dir "${DEPENDS_PATH}")
 	get_filename_component(depends_dir "${depends_dir}" ABSOLUTE)
 	set(package_compessed "${depends_dir}/${package_name}.tar.gz")
 	set(package_uncompressed_dir "${depends_dir}/${package_name}.tmp")


Only convert clientroot to Linux-style path once.

--- test/remote/SvnPackage.cmake
+++ test/remote/SvnPackage.cmake
@@ -172,17 +172,18 @@
                    --query "data(info/entry/@path)"
                    --context-item "${chgdir}/svn-info.xml"
                    OUTPUT_VARIABLE clientroot)
+  # clientroot and the filepaths below are absolute paths from the
+  # client, which might be Windows-style paths with drive letters. The
+  # following is a horrific hack which lets us get the remote path
+  # component no matter which platform they came from. (Note: This
+  # only works on Linux, which is the platform the remote queue runs
+  # on. If we ever have a Windows remote queue machine, this will
+  # die.)
+  # 1. Stick a leading / on them, so Linux thinks they're absolute.
+  # 2. Convert to "CMake paths", which have forward-slashes.
+  # 3. Do relative_path as normal.
+  file (TO_CMAKE_PATH "/${clientroot}" clientroot)
   foreach (filepath ${deletefiles})
-    # These are absolute paths from the client, which might be
-    # Windows-style paths with drive letters. The following is a
-    # horrific hack which lets us get the remote path component no
-    # matter which platform they came from. (Note: This only works on
-    # Linux, which is the platform the remote queue runs on. If we
-    # ever have a Windows remote queue machine, this will die.)
-    # 1. Stick a leading / on them, so Linux thinks they're absolute.
-    # 2. Convert to "CMake paths", which have forward-slashes.
-    # 3. Do relative_path as normal.
-    file (TO_CMAKE_PATH "/${clientroot}" clientroot)
     file (TO_CMAKE_PATH "/${filepath}" filepath)
     file (RELATIVE_PATH relpath "${clientroot}" "${filepath}")
     execute_process (COMMAND "${svn}" delete "${svndir}/${relpath}"


cmake: Add -fvisibility=hidden by default. Fixes #141

--- .cmake/Modules/Properties.cmake
+++ .cmake/Modules/Properties.cmake
@@ -26,9 +26,9 @@
     set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-no-undefined")
   endif ()

-  set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -g -std=gnu99")
+  set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -g -std=gnu99 -fvisibility=hidden")
   if (CMAKE_CXX_COMPILER_WORKS)
-    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -g ${CXX11_FLAG}")
+    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -g ${CXX11_FLAG} -fvisibility=hidden")
   endif ()
 endif ()


SVN_SILENT made messages (.desktop file)

--- plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
+++ plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
@@ -2,18 +2,22 @@
 Encoding=UTF-8
 Comment=Custom account configuration user interface for accounts using the sipe connection manager.
 Comment[de]=Eigene Benutzeroberfläche zum Einrichten von Zugängen, die die Sipe-Verbindungsverwaltung verwenden.
+Comment[fi]=Sipe-yhteyshallintaa käyttävien tilien mukautettu hallintakäyttöliittymä.
 Comment[nl]=Gebruikersinterface voor aangepaste accountconfiguratie voor accounts die de Sipe verbindingenbeheerder gebruiken.
 Comment[pt]=Interface de utilizador de configuração de contas personalizadas com o gestor de ligações Sipe.
 Comment[pt_BR]=Interface de configuração de contas personalizadas usando o gerenciador de conexões Sipe.
+Comment[sk]=Vlastné používateľské rozhranie konfigurácie účtu pre účty používajúce správcu pripojení Sipe.
 Comment[sv]=Användargränssnitt för anpassad kontoinställning av konton som använder anslutningshanteraren Sipe.
 Comment[uk]=Інтерфейс користувача для нетипового налаштовування облікового запису за допомогою керування з’єднаннями sipe.
 Comment[x-test]=xxCustom account configuration user interface for accounts using the sipe connection manager.xx
 Icon=blockdevice
 Name=Sipe Account Configuration User Interface
 Name[de]=Benutzeroberfläche zur Einrichtung von Sipe-Zugängen
+Name[fi]=Sipe-tilinmäärityksen käyttöliittymä
 Name[nl]=Gebruikersinterface voor Sipe accountconfiguratie
 Name[pt]=Interface de Configuração de Contas do Sipe
 Name[pt_BR]=Interface de configuração de contas do Sipe
+Name[sk]=Používateľské rozhranie konfigurácie účtu Sipe
 Name[sv]=Användargränssnitt för inställning av Sipe-konton
 Name[uk]=Інтерфейс користувача для налаштовування sipe
 Name[x-test]=xxSipe Account Configuration User Interfacexx


ENH: make 'module'-all depend on 'module'HeaderTest*

That way all the tests in of a module can be built by building the
'module'-all target.

Change-Id: I152a9ed16400c8acc16b09d580ffdab7e0b2844c

--- CMake/ITKModuleHeaderTest.cmake
+++ CMake/ITKModuleHeaderTest.cmake
@@ -64,6 +64,7 @@
         )
       add_executable( ${_test_name} ${_header_test_src} )
       target_link_libraries( ${_test_name} ITKCommon )
+      add_dependencies(${_name}-all ${_test_name})
       math( EXPR _test_num "${_test_num} + 1" )
     endforeach()
   endif()


expands the maximum size of the precompiled header.

--- lib/http/http.cmake
+++ lib/http/http.cmake
@@ -23,6 +23,10 @@
 set(HRYKY_PCH_SOURCE src/${module_name}.cpp)

 hryky_build_library()
+
+if(MSVC)
+	add_definitions(-Zm131)
+endif()

 hryky_use_openssl()
 hryky_use_boost(asio)


Add float support to printf.

Add float support to printf.

--- backends/cmake/arm-none-eabi-gcc.cmake
+++ backends/cmake/arm-none-eabi-gcc.cmake
@@ -64,8 +64,8 @@
 SET(CMAKE_CXX_FLAGS_RELEASE "-O${OPTIM_LEVEL} ${COMPIL_FLAGS_LTO}")
 SET(CMAKE_ASM_FLAGS_RELEASE "")

-SET(CMAKE_CXX_LINK_FLAGS "${MCFLAGS} -T${LDSCRIPT} -Wl,--gc-sections --specs=nano.specs ${LINK_FLAGS_LTO}")
-SET(CMAKE_C_LINK_FLAGS "${MCFLAGS} -T${LDSCRIPT} -Wl,--gc-sections --specs=nano.specs ${LINK_FLAGS_LTO}")
+SET(CMAKE_CXX_LINK_FLAGS "${MCFLAGS} -T${LDSCRIPT} -Wl,--gc-sections --specs=nano.specs -u _printf_float ${LINK_FLAGS_LTO}")
+SET(CMAKE_C_LINK_FLAGS "${MCFLAGS} -T${LDSCRIPT} -Wl,--gc-sections --specs=nano.specs -u _printf_float ${LINK_FLAGS_LTO}")

 SET(CMAKE_CROSSCOMPILING TRUE)


boost build ZLIB_BINARY updated name

boost build ZLIB_BINARY updated name

* windows OUTPUT_NAME libz instead of zlibstatic (consistent with unix platforms)
* zlib commit https://github.com/smanders/zlib/commit/0aa5c30513d1782eac92604ed8ba24fb98b8af9e
* issue https://github.com/smanders/externpro/issues/266

--- projects/boost.cmake
+++ projects/boost.cmake
@@ -254,7 +254,7 @@
     xpSetPostfix()
     # TRICKY: BINARY (zlibstatic, bz2) needs to be the name of the binary,
     # not including the file extension, or the "lib" prefix on UNIX
-    list(APPEND boost_BUILD -s ZLIB_BINARY=zlibstatic_${zlibVer}${CMAKE_RELEASE_POSTFIX})
+    list(APPEND boost_BUILD -s ZLIB_BINARY=libz_${zlibVer}${CMAKE_RELEASE_POSTFIX})
     list(APPEND boost_BUILD -s BZIP2_BINARY=bz2_${bzip2Ver}${CMAKE_RELEASE_POSTFIX})
   endif()
   set(boost_INSTALL install --libdir=${STAGE_DIR}/lib --includedir=${STAGE_DIR}/include)


COMP: tracking device tests timeout, disabled test

--- Modules/IGT/Testing/files.cmake
+++ Modules/IGT/Testing/files.cmake
@@ -18,6 +18,6 @@
    mitkTimeStampTest.cpp
    #mitkTrackingDeviceSourceTest.cpp
    mitkTrackingVolumeTest.cpp
-   mitkTrackingDeviceTest.cpp
+   #mitkTrackingDeviceTest.cpp
    mitkTrackingToolTest.cpp
 )


Disable ObjectLocator script for library targets when building for Android or iOS.

--- cmake/Modules/Urho3D-CMake-magic.cmake
+++ cmake/Modules/Urho3D-CMake-magic.cmake
@@ -264,7 +264,7 @@
     add_library (${TARGET_NAME} ${LIB_TYPE} ${SOURCE_FILES})
     setup_target ()

-    if (CMAKE_PROJECT_NAME STREQUAL Urho3D AND NOT LIB_TYPE STREQUAL SHARED)
+    if (CMAKE_PROJECT_NAME STREQUAL Urho3D AND NOT LIB_TYPE STREQUAL SHARED AND NOT IOS AND NOT ANDROID)
         set (STATIC_LIBRARY_TARGETS ${STATIC_LIBRARY_TARGETS} ${TARGET_NAME} PARENT_SCOPE)
         if (URHO3D_BUILD_TYPE STREQUAL SHARED)
             set_target_properties (${TARGET_NAME} PROPERTIES COMPILE_DEFINITIONS URHO3D_EXPORTS)


Trivial commit.

Trivial commit.

--- cmake/TbagModule/TbagProjectGLog.cmake
+++ cmake/TbagModule/TbagProjectGLog.cmake
@@ -2,10 +2,6 @@
 #/// @brief  Google-glog project module.
 #/// @author zer0
 #/// @date   2016-06-02
-
-if (WIN32)
-    message (WARNING "Not supported Windows OS.")
-endif ()

 if (NOT GLog_FOUND)
     message (WARNING "Not found Google-glog.")


Install to python prefix by default

Install to python prefix by default

Retain old installation behavior when CMAKE_INSTALL_PREFIX is set on the command line

--- CMake/hoomd/HOOMDPythonSetup.cmake
+++ CMake/hoomd/HOOMDPythonSetup.cmake
@@ -9,11 +9,27 @@
 # find_package(pybind11 NO_MODULE)
 include(pybind11Tools)

-# set python installation location
-if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
-    execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import site; print(site.getsitepackages()[0], end='')"
-                    OUTPUT_VARIABLE _python_site_dir)
-    set(CMAKE_INSTALL_PREFIX ${_python_site_dir} CACHE PATH "HOOMD installation path" FORCE)
-endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+# when no CMAKE_INSTALL_PREFIX is set, default to python's install prefix
+if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND PYTHON_SITE_PACKAGES)
+    string(LENGTH "${PYTHON_PREFIX}" _python_prefix_len)
+    string(SUBSTRING "${PYTHON_SITE_PACKAGES}" 0 ${_python_prefix_len} _python_site_package_prefix)
+    math(EXPR _shart_char "${_python_prefix_len}+1")
+    string(SUBSTRING "${PYTHON_SITE_PACKAGES}" ${_shart_char} -1 _python_site_package_rel)
+    string(COMPARE EQUAL "${_python_site_package_prefix}" "${PYTHON_PREFIX}" _prefix_equal)
+    if (NOT _prefix_equal)
+        message(STATUS "Python site packages (${PYTHON_SITE_PACKAGES}) does not start with python prefix (${PYTHON_PREFIX})")
+        message(STATUS "HOOMD may not install to the correct location")
+    endif()

-set(PYTHON_SITE_INSTALL_DIR "hoomd")
+    set(CMAKE_INSTALL_PREFIX "${PYTHON_PREFIX}" CACHE PATH "HOOMD installation path" FORCE)
+endif()
+
+# when the user specifies CMAKE_INSTALL_PREFIX, install to "hoomd" under that prefix
+if (_python_site_package_rel)
+    set(PYTHON_SITE_INSTALL_DIR "${_python_site_package_rel}/hoomd")
+else()
+    set(PYTHON_SITE_INSTALL_DIR "hoomd")
+endif()
+
+message(STATUS "PYTHON_SITE_INSTALL_DIR: ${PYTHON_SITE_INSTALL_DIR}")
+message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")


Added TKXCAF to find package list

Added TKXCAF to find package list

--- CMakeModules/FindOpenCascade.cmake
+++ CMakeModules/FindOpenCascade.cmake
@@ -99,6 +99,7 @@
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXmlTObj TKXmlTObj)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXmlXCAF TKXmlXCAF)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXSBase TKXSBase)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXCAF TKXCAF)

 set (OPENCASCADE_LIBRARY_TYPE_DESCR
 "Specifies the type of library to be used. 'Shared' libraries


added missing files to installer

added missing files to installer

--- Modules/IGT/MITKIGTHardware.cmake
+++ Modules/IGT/MITKIGTHardware.cmake
@@ -8,13 +8,16 @@
   FIND_PATH(MITK_MICRON_TRACKER_INCLUDE_DIR MTC.h ${MICRON_TRACKER_SDK_DIR} DOC  "Include directory of the MT2.")
   FIND_PATH(MITK_MICRON_TRACKER_TEMP_DIR . DOC "Any temporary directory which can be used by the MicronTracker2.")
   FIND_PATH(MITK_MICRON_TRACKER_CALIBRATION_DIR BumbleBee_6400420.calib DOC "Path which contains the MT2 calibration file.")
+  MITK_INSTALL(FILES ${MICRON_TRACKER_SDK_DIR}/MTC.dll  CONFIGURATIONS Release)
+  MITK_INSTALL(FILES ${MICRON_TRACKER_SDK_DIR}/MTInterfaceDotNet.dll  CONFIGURATIONS Release)
+  MITK_INSTALL(FILES ${MICRON_TRACKER_SDK_DIR}/PGRFlyCapture.dll  CONFIGURATIONS Release)
 ENDIF(MITK_USE_MICRON_TRACKER)
 #End MicronTracker Hardware

 # only on Win32
 IF(WIN32)
-
+
   #Begin Ascension MicroBird Hardware
   OPTION(MITK_USE_MICROBIRD_TRACKER "Enable support for Ascension MicroBird tracker hardware" OFF)
   IF(MITK_USE_MICROBIRD_TRACKER)
@@ -25,4 +28,4 @@
   ENDIF(MITK_USE_MICROBIRD_TRACKER)
   #End MicroBird Hardware

-ENDIF(WIN32)
+ENDIF(WIN32)


it's time for 0.0.1.0

it's time for 0.0.1.0

--- PluginConfig.cmake
+++ PluginConfig.cmake
@@ -8,7 +8,7 @@
 set(PLUGIN_NAME "FBVLC")
 set(PLUGIN_PREFIX "FBVLC")
 set(COMPANY_NAME "RSATom")
-set(PLUGIN_VERSION "0.0.0.8")
+set(PLUGIN_VERSION "0.0.1.0")

 #if you want embed vlc into FBVLC distribution:
 # 1) place vlc into FBVLC\Win\WiX\vlc-${VLC_VERSION}


Caches creation of virtualenv in build dir

The virtual env is created only once.
There is no check that it has not been deleted outside cmake.
Reduces problem with concurrent make processes trying to acces the same file.

--- scripts/PythonVirtualEnv.cmake
+++ scripts/PythonVirtualEnv.cmake
@@ -1,9 +1,5 @@
 # Creates a python virtual environment in the build directory
 # See https://github.com/UCL/GreatCMakeCookOff/wiki for information
-if(VIRTUALENV_WAS_CREATED)
-  return()
-endif()
-
 find_package(PythonInterp)
 include(Utilities)
 include(PythonPackage)
@@ -14,94 +10,103 @@
 endfunction()

-function(_create_virtualenv_from_exec call)
+if(NOT VIRTUALENV_WAS_CREATED)
+    function(_create_virtualenv_from_exec call)
+        execute_process(COMMAND
+            ${call} ${VIRTUALENV_DIRECTORY}
+            RESULT_VARIABLE RESULT
+            ERROR_VARIABLE ERROR
+            OUTPUT_VARIABLE OUTPUT
+        )
+        if(NOT "${RESULT}" STREQUAL "0")
+            message(STATUS "${RESULT}")
+            message(STATUS "${OUTPUT}")
+            message(STATUS "${ERROR}")
+            message(FATAL_ERROR "Could not create virtual environment")
+        endif()
+    endfunction()
+    function(_create_virtualenv_from_package PACKAGE)
+        execute_process(COMMAND
+            ${PYTHON_EXECUTABLE} -m ${PACKAGE} ${VIRTUALENV_DIRECTORY}
+            RESULT_VARIABLE RESULT
+            ERROR_VARIABLE ERROR
+            OUTPUT_VARIABLE OUTPUT
+        )
+        if(NOT "${RESULT}" STREQUAL "0")
+            message(STATUS "${RESULT}")
+            message(STATUS "${OUTPUT}")
+            message(STATUS "${ERROR}")
+            message(FATAL_ERROR "Could not create virtual environment")
+        endif()
+    endfunction()
+
+    # First check if we have venv in the same directory as python.
+    # Canopy makes things more difficult.
+    get_filename_component(python_bin "${PYTHON_EXECUTABLE}" PATH)
+    find_program(venv_EXECUTABLE venv PATHS "${python_bin}" NO_DEFAULT_PATH)
+    find_python_package(venv QUIET)
+    find_python_package(virtualenv QUIET)
+
+    set(VIRTUALENV_DIRECTORY "${CMAKE_BINARY_DIR}/external/virtualenv"
+        CACHE INTERNAL "Path to virtualenv" )
+    if(venv_EXECUTABLE)
+      _create_virtualenv_from_exec("${venv_EXECUTABLE}")
+    elseif(venv_FOUND)
+      _create_virtualenv_from_package("venv")
+    elseif(virtualenv_FOUND)
+      _create_virtualenv_from_package("virtualenv")
+    else()
+      message(FATAL_ERROR "Could find neither venv nor virtualenv")
+    endif()
+
+    set(_LOCAL_PYTHON_EXECUTABLE
+        "${VIRTUALENV_DIRECTORY}/bin/python"
+        CACHE PATH
+        "Path to python executable in build virtual environment"
+    )
+    # Adds a bash script to call python with all the right paths set
+    # Makes it easy to debug and test
+    set(LOCAL_PYTHON_EXECUTABLE
+        "${PROJECT_BINARY_DIR}/localpython.sh"
+        CACHE PATH "Path to proxy for executing python script in build dir"
+    )
+    create_environment_script(
+        EXECUTABLE "${_LOCAL_PYTHON_EXECUTABLE}"
+        PATH "${PROJECT_BINARY_DIR}/localpython.sh"
+    )
+
+    # Add current python paths to a path.pth file
+    execute_process(
+        COMMAND ${PYTHON_EXECUTABLE} -c
+           "from sys import path;print(';'.join([u for u in path if len(u)]))"
+        ${PROJECT_BINARY_DIR}/CMakeFiles/pypaths.py
+        OUTPUT_VARIABLE output
+    )
+    foreach(pypath ${output})
+        file(APPEND "${PROJECT_BINARY_DIR}/paths/system.pth" "${pypath}\n")
+    endforeach()
+    # Makes sure the path.pth file is picked up
     execute_process(COMMAND
-        ${call} ${VIRTUALENV_DIRECTORY}
-        RESULT_VARIABLE RESULT
-        ERROR_VARIABLE ERROR
-        OUTPUT_VARIABLE OUTPUT
+        ${_LOCAL_PYTHON_EXECUTABLE} -c "import site; print(site.__file__)"
+        OUTPUT_VARIABLE sitedir
+        ERROR_VARIABLE error
+        RESULT_VARIABLE result
     )
-    if(NOT "${RESULT}" STREQUAL "0")
-        message(STATUS "${RESULT}")
-        message(STATUS "${OUTPUT}")
-        message(STATUS "${ERROR}")
-        message(FATAL_ERROR "Could not create virtual environment")
+    if("${result}" STREQUAL "0")
+        string(STRIP sitedir "${sitedir}")
+        get_filename_component(sitedir "${sitedir}" PATH)
+        file(WRITE "${sitedir}/sitecustomize.py"
+            "from site import addsitedir\n"
+            "addsitedir('${PROJECT_BINARY_DIR}/paths')\n"
+        )
+    else()
+        message("error: ${error}")
+        message("out: ${sitedir}")
+        message(FATAL_ERROR "script failed")
     endif()
-endfunction()
-function(_create_virtualenv_from_package PACKAGE)
-    execute_process(COMMAND
-        ${PYTHON_EXECUTABLE} -m ${PACKAGE} ${VIRTUALENV_DIRECTORY}
-        RESULT_VARIABLE RESULT
-        ERROR_VARIABLE ERROR
-        OUTPUT_VARIABLE OUTPUT
-    )
-    if(NOT "${RESULT}" STREQUAL "0")
-        message(STATUS "${RESULT}")
-        message(STATUS "${OUTPUT}")
-        message(STATUS "${ERROR}")
-        message(FATAL_ERROR "Could not create virtual environment")
-    endif()
-endfunction()
-
-# First check if we have venv in the same directory as python.
-# Canopy makes things more difficult.
-get_filename_component(python_bin "${PYTHON_EXECUTABLE}" PATH)
-find_program(venv_EXECUTABLE venv PATHS "${python_bin}" NO_DEFAULT_PATH)
-find_python_package(venv QUIET)
-find_python_package(virtualenv QUIET)
-
-set(VIRTUALENV_DIRECTORY "${CMAKE_BINARY_DIR}/external/virtualenv"
-    CACHE INTERNAL "Path to virtualenv" )
-if(venv_EXECUTABLE)
-  _create_virtualenv_from_exec("${venv_EXECUTABLE}")
-elseif(venv_FOUND)
-  _create_virtualenv_from_package("venv")
-elseif(virtualenv_FOUND)
-  _create_virtualenv_from_package("virtualenv")
-else()
-  message(FATAL_ERROR "Could find neither venv nor virtualenv")
+
+    set(VIRTUALENV_WAS_CREATED TRUE CACHE INTERNAL "Virtualenv has been created")
 endif()
-
-set(_LOCAL_PYTHON_EXECUTABLE "${VIRTUALENV_DIRECTORY}/bin/python")
-# Adds a bash script to call python with all the right paths set
-# Makes it easy to debug and test
-set(LOCAL_PYTHON_EXECUTABLE "${PROJECT_BINARY_DIR}/localpython.sh")
-create_environment_script(
-    EXECUTABLE "${_LOCAL_PYTHON_EXECUTABLE}"
-    PATH "${PROJECT_BINARY_DIR}/localpython.sh"
-)
-
-# Add current python paths to a path.pth file
-execute_process(
-    COMMAND ${PYTHON_EXECUTABLE} -c
-       "from sys import path;print(';'.join([u for u in path if len(u)]))"
-    ${PROJECT_BINARY_DIR}/CMakeFiles/pypaths.py
-    OUTPUT_VARIABLE output
-)
-foreach(pypath ${output})
-    file(APPEND "${PROJECT_BINARY_DIR}/paths/system.pth" "${pypath}\n")
-endforeach()
-# Makes sure the path.pth file is picked up
-execute_process(COMMAND
-    ${_LOCAL_PYTHON_EXECUTABLE} -c "import site; print(site.__file__)"
-    OUTPUT_VARIABLE sitedir
-    ERROR_VARIABLE error
-    RESULT_VARIABLE result
-)
-if("${result}" STREQUAL "0")
-    string(STRIP sitedir "${sitedir}")
-    get_filename_component(sitedir "${sitedir}" PATH)
-    file(WRITE "${sitedir}/sitecustomize.py"
-        "from site import addsitedir\n"
-        "addsitedir('${PROJECT_BINARY_DIR}/paths')\n"
-    )
-else()
-    message("error: ${error}")
-    message("out: ${sitedir}")
-    message(FATAL_ERROR "script failed")
-endif()
-
-set(VIRTUALENV_WAS_CREATED TRUE CACHE INTERNAL "Virtualenv has been created")

 function(add_package_to_virtualenv PACKAGE)
     find_python_package(${PACKAGE} LOCAL)


Version: Update development date

Version: Update development date

--- src/Version.cmake
+++ src/Version.cmake
@@ -1,7 +1,7 @@
 # CastXML version number components.
 set(CastXML_VERSION_MAJOR 0)
 set(CastXML_VERSION_MINOR 3)
-set(CastXML_VERSION_PATCH 20200714)
+set(CastXML_VERSION_PATCH 20200820)
 set(CastXML_VERSION_RC 0)
 set(CastXML_VERSION_IS_DIRTY 0)


Re-enabled virgl

Re-enabled virgl

--- platform/x86_64/pc/flags.cmake
+++ platform/x86_64/pc/flags.cmake
@@ -34,6 +34,6 @@
     COMMAND qemu-img create -f raw disk.img 128M)

 add_custom_target(run
-    COMMAND qemu-system-x86_64 --enable-kvm -m 1G -machine q35, -cpu host -smp 3 -d int,cpu_reset,guest_errors -drive id=disk,file=disk.img,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -net nic,model=virtio -device ich9-intel-hda -device hda-output -device ich9-usb-uhci3 -cdrom "ISO/os.iso" -boot d -device virtio-vga,virgl=on
+    COMMAND qemu-system-x86_64 --enable-kvm -m 1G -machine q35, -cpu host -smp 3 -d int,cpu_reset,guest_errors -drive id=disk,file=disk.img,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -net nic,model=virtio -device ich9-intel-hda -device hda-output -device ich9-usb-uhci3 -cdrom "ISO/os.iso" -boot d -device virtio-vga,virgl=on -display gtk,gl=on
     DEPENDS image
     DEPENDS disk.img)


add new test file name, for kepler to cartesian converter

--- ProjectFiles.cmake
+++ ProjectFiles.cmake
@@ -4,6 +4,7 @@

 # Set project source files.
 set(SRC
+  "${SRC_PATH}/factorial.cpp"
   "${SRC_PATH}/ellipsoidSurfacePoints.cpp"
   "${SRC_PATH}/cubicRoot.cpp"
   "${SRC_PATH}/ellipsoidGravitationalAcceleration.cpp"
@@ -18,5 +19,6 @@
 # Set project test source files.
 set(TEST_SRC
   "${TEST_SRC_PATH}/testNaos.cpp"
+  "${TEST_SRC_PATH}/testConvertKeplerToCartesian.cpp"
   "${TEST_SRC_PATH}/testFactorial.cpp"
 )


Remove unused script

Remove unused script

--- scripts/calc-config-sha1.cmake
+++ scripts/calc-config-sha1.cmake
@@ -1,117 +0,0 @@
-# Copyright (c) 2014, Ruslan Baratov
-# All rights reserved.
-
-cmake_minimum_required(VERSION 3.0)
-
-# This script will include DEFAULT_CONFIG and USER_CONFIG files with
-# hunter_config(...) commands and return a unified version of result file
-
-# Add hunter_config module
-if(NOT HUNTER_SELF)
-  message(FATAL_ERROR "HUNTER_SELF is not defined")
-endif()
-
-list(APPEND CMAKE_MODULE_PATH "${HUNTER_SELF}/cmake/modules")
-
-include(hunter_config)
-
-# Include DEFAULT_CONFIG
-if(NOT DEFAULT_CONFIG)
-  message(FATAL_ERROR "DEFAULT_CONFIG is not defined")
-endif()
-
-if(NOT EXISTS "${DEFAULT_CONFIG}")
-  message(FATAL_ERROR "File `${DEFAULT_CONFIG}` not exists")
-endif()
-
-set(HUNTER_ALLOW_CONFIG_LOADING YES)
-include("${DEFAULT_CONFIG}")
-set(HUNTER_ALLOW_CONFIG_LOADING NO)
-
-# Include USER_CONFIG
-if(NOT USER_CONFIG)
-  message(FATAL_ERROR "USER_CONFIG is not defined")
-endif()
-
-if(NOT EXISTS "${USER_CONFIG}")
-  message(FATAL_ERROR "File `${USER_CONFIG}` not exists")
-endif()
-
-set(HUNTER_ALLOW_CONFIG_LOADING YES)
-include("${USER_CONFIG}")
-set(HUNTER_ALLOW_CONFIG_LOADING NO)
-
-# Create list of the projects
-if(NOT DIRECTORY_WITH_PROJECTS)
-  message(FATAL_ERROR "DIRECTORY_WITH_PROJECTS not defined")
-endif()
-
-if(NOT EXISTS "${DIRECTORY_WITH_PROJECTS}")
-  message(FATAL_ERROR "Directory `${DIRECTORY_WITH_PROJECTS}` not exists")
-endif()
-
-if(NOT IS_DIRECTORY "${DIRECTORY_WITH_PROJECTS}")
-  message(FATAL_ERROR "Path `${DIRECTORY_WITH_PROJECTS}` is not a directory")
-endif()
-
-file(
-    GLOB projects
-    RELATIVE "${DIRECTORY_WITH_PROJECTS}"
-    "${DIRECTORY_WITH_PROJECTS}/*"
-)
-
-if(NOT projects)
-  message(FATAL_ERROR "No projects found")
-endif()
-
-set(real_projects "")
-foreach(x ${projects})
-  if(IS_DIRECTORY "${DIRECTORY_WITH_PROJECTS}/${x}")
-    list(APPEND real_projects "${x}")
-  endif()
-endforeach()
-
-if(NOT real_projects)
-  message(FATAL_ERROR "No projects found")
-endif()
-
-set(projects "${real_projects}")
-list(SORT projects)
-
-# Create unified version
-if(NOT TEMP_DIRECTORY)
-  message(FATAL_ERROR "TEMP_DIRECTORY is not defined")
-endif()
-
-if(NOT EXISTS "${TEMP_DIRECTORY}")
-  message(FATAL_ERROR "${TEMP_DIRECTORY} not exists")
-endif()
-
-set(input_file "${TEMP_DIRECTORY}/config.cmake")
-file(WRITE "${input_file}" "include(hunter_config)\n")
-foreach(x ${projects})
-  set(version "${HUNTER_${x}_VERSION}")
-  if(version)
-    file(
-        APPEND
-        "${input_file}"
-        "hunter_config(${x} "
-        "VERSION ${version}"
-    )
-    string(COMPARE NOTEQUAL "${HUNTER_${x}_CMAKE_ARGS}" "" have_args)
-    if(have_args)
-      file(APPEND "${input_file}" " CMAKE_ARGS")
-      foreach(y ${HUNTER_${x}_CMAKE_ARGS})
-        file(APPEND "${input_file}" " ${y}")
-      endforeach()
-    endif()
-    string(COMPARE NOTEQUAL "${HUNTER_${x}_CONFIGURATION_TYPES}" "" have_types)
-    if(have_types)
-      file(APPEND "${input_file}" " CONFIGURATION_TYPES")
-      foreach(y ${HUNTER_${x}_CONFIGURATION_TYPES})
-        file(APPEND "${input_file}" " ${y}")
-      endforeach()
-    endif()
-    file(APPEND "${input_file}" ")\n")
-  endif()
-endforeach()


[CMake] Don't use comma as an alternate separator

Using comma can break in cases when we're passing flags that already
use comma as a separator.

Fixes PR35504.

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

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

--- cmake/modules/LLVMExternalProjectUtils.cmake
+++ cmake/modules/LLVMExternalProjectUtils.cmake
@@ -95,7 +95,7 @@
   foreach(prefix ${ARG_PASSTHROUGH_PREFIXES})
     foreach(variableName ${variableNames})
       if(variableName MATCHES "^${prefix}")
-        string(REPLACE ";" "," value "${${variableName}}")
+        string(REPLACE ";" "|" value "${${variableName}}")
         list(APPEND PASSTHROUGH_VARIABLES
           -D${variableName}=${value})
       endif()
@@ -160,7 +160,7 @@
     USES_TERMINAL_CONFIGURE 1
     USES_TERMINAL_BUILD 1
     USES_TERMINAL_INSTALL 1
-    LIST_SEPARATOR ,
+    LIST_SEPARATOR |
     )

   if(ARG_USE_TOOLCHAIN)


Restore default search path to FindRAPTOR module

--- source/raptor/FindRAPTOR.cmake
+++ source/raptor/FindRAPTOR.cmake
@@ -48,9 +48,7 @@
               /usr/include/raptor2
              NO_DEFAULT_PATH)

-    if (NOT RAPTOR_INCLUDE_DIR)
-        find_path(RAPTOR_INCLUDE_DIR raptor2.h)
-    endif ()
+    find_path(RAPTOR_INCLUDE_DIR raptor2.h)

     find_library(RAPTOR_LIBRARY
         NAMES raptor2 libraptor2


Modify test for 64-bit cl compiler in FindSSE.cmake.

The previous test (using CMAKE_CL_64) is not working with the latest version of Visual Studio.
Replace to a test based on CMAKE_SIZEOF_VOID_P.

Indeed, when compiling for x64 with VS, the flag "/arch:SSE2" is not needed anymore (it's automatic) and its explicit definition resulted in many cl warnings.

--- cmake/FindSSE.cmake
+++ cmake/FindSSE.cmake
@@ -166,7 +166,7 @@
 if(_SSE_TEST_20)
   if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
     set(CMAKE_REQUIRED_FLAGS "-msse2")
-  elseif(MSVC AND NOT CMAKE_CL_64)
+  elseif(MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 4)
     set(CMAKE_REQUIRED_FLAGS "/arch:SSE2")
   endif()
   check_cxx_source_runs("
@@ -193,7 +193,7 @@
 if(_SSE_TEST_10)
   if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
     set(CMAKE_REQUIRED_FLAGS "-msse")
-  elseif(MSVC AND NOT CMAKE_CL_64)
+  elseif(MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 4)
     set(CMAKE_REQUIRED_FLAGS "/arch:SSE")
   endif()
   check_cxx_source_runs("
@@ -257,7 +257,7 @@
   endif()
 elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
   set(SSE_FLAGS "-xHost")
-elseif(MSVC)
+elseif(MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 4)
   if(DETECTED_SSE_20)
      set(SSE_FLAGS "${SSE_FLAGS} /arch:SSE2")
   elseif(DETECTED_SSE_10)


Fix Python Link Order Error (#46259)

Fix Python Link Order Error (#46259)

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -388,7 +388,8 @@
           target_link_libraries(${TARGET_NAME} "-Wl,-undefined,dynamic_lookup")
         endif()
       endif()
-      target_link_libraries(${TARGET_NAME} ${cc_library_DEPS})
+      target_link_libraries(${TARGET_NAME} ${cc_library_DEPS}
+                            ${PYTHON_LIBRARIES})
       common_link(${TARGET_NAME})
     endif()


CI: use ninja

CI: use ninja

--- CI/main_ci.cmake
+++ CI/main_ci.cmake
@@ -24,7 +24,7 @@

 # Build Configuration : Release, Debug..
 set (CTEST_BUILD_CONFIGURATION "Release")
-set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
+set (CTEST_CMAKE_GENERATOR "Ninja")

 set (CTEST_BUILD_NAME "$ENV{CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}_to_$ENV{CI_MERGE_REQUEST_TARGET_BRANCH_NAME}")
 set (CTEST_SITE "${IMAGE_NAME}")
@@ -37,10 +37,6 @@

 # Ctest command value
 set (CMAKE_COMMAND "cmake")
-set (CTEST_BUILD_FLAGS "-j8") # number of thread used for compilation
-set (CTEST_BUILD_COMMAND "make ${CTEST_BUILD_FLAGS}")
-
-

 # Data directory setting
 set (OTB_DATA_ROOT "${OTB_SOURCE_DIR}/otb-data/") # todo
@@ -79,4 +75,4 @@

 # ctest_test(PARALLEL_LEVEL 8])

-ctest_submit()+ctest_submit()


Increment the hard coded version

Increment the hard coded version

This should not be used, but incrementing in case it as a fallback.

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

-set (hardcoded_tomviz_version "0.4.1")
+set (hardcoded_tomviz_version "0.5.0")

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


wxwidgets_gc.cpp is also included in the build automatically.

svn path=/trunk/; revision=8433

--- cmake/modules/drivers-finish.cmake
+++ cmake/modules/drivers-finish.cmake
@@ -44,6 +44,7 @@
           ${CMAKE_SOURCE_DIR}/drivers/${DRIVER}.cpp
 	        ${CMAKE_SOURCE_DIR}/drivers/${DRIVER}_app.cpp
           ${CMAKE_SOURCE_DIR}/drivers/${DRIVER}_dc.cpp
+          ${CMAKE_SOURCE_DIR}/drivers/${DRIVER}_gc.cpp
           ${${DRIVER}_SOURCE}
 	      )
         if(HAVE_AGG)


#244 skip jemalloc build if it is not in the third party directory

--- cmake_modules/TokuThirdParty.cmake
+++ cmake_modules/TokuThirdParty.cmake
@@ -3,35 +3,34 @@
 if (NOT DEFINED LIBJEMALLOC)
     ## add jemalloc with an external project
     set(JEMALLOC_SOURCE_DIR "${TokuDB_SOURCE_DIR}/third_party/jemalloc" CACHE FILEPATH "Where to find jemalloc sources.")
-    if (NOT EXISTS "${JEMALLOC_SOURCE_DIR}/configure")
-        message(FATAL_ERROR "Can't find jemalloc sources.  Please check them out to ${JEMALLOC_SOURCE_DIR} or modify JEMALLOC_SOURCE_DIR.")
-    endif ()
-    set(jemalloc_configure_opts "CC=${CMAKE_C_COMPILER}" "--with-jemalloc-prefix=" "--with-private-namespace=tokudb_jemalloc_internal_" "--enable-cc-silence")
-    option(JEMALLOC_DEBUG "Build jemalloc with --enable-debug." OFF)
-    if (JEMALLOC_DEBUG)
-        list(APPEND jemalloc_configure_opts --enable-debug)
-    endif ()
-    ExternalProject_Add(build_jemalloc
-        PREFIX jemalloc
-        SOURCE_DIR "${JEMALLOC_SOURCE_DIR}"
-        CONFIGURE_COMMAND
-            "${JEMALLOC_SOURCE_DIR}/configure" ${jemalloc_configure_opts}
-            "--prefix=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc"
-    )
+    if (EXISTS "${JEMALLOC_SOURCE_DIR}/configure")
+        set(jemalloc_configure_opts "CC=${CMAKE_C_COMPILER}" "--with-jemalloc-prefix=" "--with-private-namespace=tokudb_jemalloc_internal_" "--enable-cc-silence")
+        option(JEMALLOC_DEBUG "Build jemalloc with --enable-debug." OFF)
+        if (JEMALLOC_DEBUG)
+            list(APPEND jemalloc_configure_opts --enable-debug)
+        endif ()
+        ExternalProject_Add(build_jemalloc
+            PREFIX jemalloc
+            SOURCE_DIR "${JEMALLOC_SOURCE_DIR}"
+            CONFIGURE_COMMAND
+                "${JEMALLOC_SOURCE_DIR}/configure" ${jemalloc_configure_opts}
+                "--prefix=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc"
+        )

-    add_library(jemalloc STATIC IMPORTED GLOBAL)
-    set_target_properties(jemalloc PROPERTIES IMPORTED_LOCATION
-        "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib/libjemalloc_pic.a")
-    add_dependencies(jemalloc build_jemalloc)
-    add_library(jemalloc_nopic STATIC IMPORTED GLOBAL)
-    set_target_properties(jemalloc_nopic PROPERTIES IMPORTED_LOCATION
-        "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib/libjemalloc.a")
-    add_dependencies(jemalloc_nopic build_jemalloc)
+        add_library(jemalloc STATIC IMPORTED GLOBAL)
+        set_target_properties(jemalloc PROPERTIES IMPORTED_LOCATION
+            "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib/libjemalloc_pic.a")
+        add_dependencies(jemalloc build_jemalloc)
+        add_library(jemalloc_nopic STATIC IMPORTED GLOBAL)
+        set_target_properties(jemalloc_nopic PROPERTIES IMPORTED_LOCATION
+            "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib/libjemalloc.a")
+        add_dependencies(jemalloc_nopic build_jemalloc)

-    # detect when we are being built as a subproject
-    if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
-        install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib" DESTINATION .
-          COMPONENT tokukv_libs_extra)
+        # detect when we are being built as a subproject
+        if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
+            install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib" DESTINATION .
+                COMPONENT tokukv_libs_extra)
+        endif ()
     endif ()
 endif ()


Set compiler for snappy external project

--- cmake_modules/TokuThirdParty.cmake
+++ cmake_modules/TokuThirdParty.cmake
@@ -119,6 +119,8 @@
         cp -a "${SNAPPY_ALL_FILES}" "<SOURCE_DIR>/"
     CMAKE_ARGS
         -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
+        -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+        -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
         -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
         -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
         -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}


BUG: Remove if condition, always find VTK package

During superbuild, the VTK components might differ from the ones needed by DTIProcess. If the variable VTK_FOUND is set the component vtkCommonDataModel won't be found

--- DTIProcess.cmake
+++ DTIProcess.cmake
@@ -95,14 +95,14 @@

-if(NOT VTK_FOUND)
-    find_package(VTK COMPONENTS
-      vtkIOLegacy
-      vtkIOXML
-      vtkCommonDataModel
-      REQUIRED)
-    include(${VTK_USE_FILE})
-endif(NOT VTK_FOUND)
+
+find_package(VTK COMPONENTS
+  vtkIOLegacy
+  vtkIOXML
+  vtkCommonDataModel
+  REQUIRED)
+include(${VTK_USE_FILE})
+

 INCLUDE_DIRECTORIES(


MOD: Added the possibility to find OIS if stored as Ogre dependency

--- cmake/FindOIS.cmake
+++ cmake/FindOIS.cmake
@@ -14,17 +14,23 @@

 find_path(OIS_H_PATH NAMES OIS.h
-        PATHS ${OIS_PREFIX_PATH}
-        PATH_SUFFIXES OIS include includes)
+          PATHS ${OIS_PREFIX_PATH}
+          PATH_SUFFIXES OIS include includes)
+
+if(NOT OIS_H_PATH)
+    find_path(OIS_H_PATH NAMES OIS.h
+              PATHS ${OIS_PREFIX_PATH}
+              PATH_SUFFIXES OIS include include/OIS)
+endif()

 find_library(OIS_LIB NAMES OIS libOIS
-        PATHS ${OIS_PREFIX_PATH}
-        PATH_SUFFIXES Release lib/Release
-        )
+             PATHS ${OIS_PREFIX_PATH}
+             PATH_SUFFIXES Release lib/Release)
+
 find_library(OIS_LIB_DBG NAMES OIS_d libOIS_d
-        PATHS ${OIS_PREFIX_PATH}
-        PATH_SUFFIXES Debug lib/Debug
-        )
+             PATHS ${OIS_PREFIX_PATH}
+             PATH_SUFFIXES Debug lib/Debug)
+
 mark_as_advanced(OIS_H_PATH OIS_LIB OIS_LIB_DBG)

 find_package_handle_standard_args(OIS DEFAULT_MSG OIS_LIB OIS_H_PATH)


finx tbb malloc proxy

finx tbb malloc proxy

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -14,11 +14,12 @@
 #
 # The following variables are set
 #
-# TBB_FOUND                 - TRUE if TBB is found and work correctly
-# TBB_INCLUDE_DIR           - The directory containing TBB headers
-# TBB_LINK_LIBRARIES        - TBB libraries that shall be linked to
-# TBB_MALLOC_LINK_LIBRARIES - TBB malloc libraries that shall be linked to
-# TBB_DEFINITIONS           - TBB compile time definitions
+# TBB_FOUND                       - TRUE if TBB is found and work correctly
+# TBB_INCLUDE_DIR                 - The directory containing TBB headers
+# TBB_LINK_LIBRARIES              - TBB libraries that shall be linked to
+# TBB_MALLOC_LINK_LIBRARIES       - TBB malloc libraries
+# TBB_MALLOC_PROXY_LINK_LIBRARIES - TBB malloc proxy libraries
+# TBB_DEFINITIONS                 - TBB compile time definitions
 #
 # The following variables affect the behavior of this module
 #
@@ -102,6 +103,52 @@
     ENDIF (TBB_MALLOC_LINK_LIBRARIES_RELEASE_FOUND AND
         TBB_MALLOC_LINK_LIBRARIES_DEBUG_FOUND)
 ENDIF (NOT DEFINED TBB_MALLOC_LINK_LIBRARIES)
+
+IF (NOT DEFINED TBB_MALLOC_PROXY_LINK_LIBRARIES)
+    FIND_LIBRARY (TBB_MALLOC_PROXY_LINK_LIBRARIES_RELEASE_FOUND
+        tbbmalloc_proxy
+        PATHS ${TBB_LIB_PATH} ENV LIBRARY_PATH ENV LIB NO_DEFAULT_PATH)
+    FIND_LIBRARY (TBB_MALLOC_PROXY_LINK_LIBRARIES_RELEASE_FOUND
+        tbbmalloc_proxy)
+    FIND_LIBRARY (TBB_MALLOC_PROXY_LINK_LIBRARIES_DEBUG_FOUND
+        tbbmalloc_proxy_debug
+        PATHS ${TBB_LIB_PATH} ENV LIBRARY_PATH ENV LIB NO_DEFAULT_PATH)
+    FIND_LIBRARY (TBB_MALLOC_PROXY_LINK_LIBRARIES_DEBUG_FOUND
+        tbbmalloc_proxy_debug)
+    IF (TBB_MALLOC_PROXY_LINK_LIBRARIES_RELEASE_FOUND AND
+            TBB_MALLOC_PROXY_LINK_LIBRARIES_DEBUG_FOUND)
+        SET (TBB_MALLOC_PROXY_LINK_LIBRARIES
+            optimized ${TBB_MALLOC_PROXY_LINK_LIBRARIES_RELEASE_FOUND}
+            debug ${TBB_MALLOC_PROXY_LINK_LIBRARIES_DEBUG_FOUND}
+            ${CMAKE_THREAD_LIBS_INIT} CACHE STRING
+            "Link to TBB malloc proxy")
+        SET (TBB_MALLOC_PROXY_LINK_LIBRARIES_RELEASE
+            ${TBB_MALLOC_PROXY_LINK_LIBRARIES_RELEASE_FOUND}
+            ${CMAKE_THREAD_LIBS_INIT} CACHE STRING
+            "Link to TBB malloc proxy Release")
+        SET (TBB_MALLOC_PROXY_LINK_LIBRARIES_DEBUG
+            ${TBB_MALLOC_PROXY_LINK_LIBRARIES_DEBUG_FOUND}
+            ${CMAKE_THREAD_LIBS_INIT} CACHE STRING
+            "Link to TBB malloc proxy Debug")
+        MESSAGE (STATUS
+            "Found TBB malloc proxy libraries: ${TBB_MALLOC_PROXY_LINK_LIBRARIES}")
+    ELSEIF (TBB_MALLOC_PROXY_LINK_LIBRARIES_RELEASE_FOUND)
+        SET (TBB_MALLOC_PROXY_LINK_LIBRARIES
+            ${TBB_MALLOC_PROXY_LINK_LIBRARIES_RELEASE_FOUND}
+            ${CMAKE_THREAD_LIBS_INIT} CACHE STRING
+            "Link to TBB malloc proxy")
+        SET (TBB_MALLOC_PROXY_LINK_LIBRARIES_RELEASE
+            ${TBB_MALLOC_PROXY_LINK_LIBRARIES_RELEASE_FOUND}
+            ${CMAKE_THREAD_LIBS_INIT} CACHE STRING
+            "Link to TBB malloc proxy Release")
+        MESSAGE (STATUS
+            "Found TBB malloc proxy libraries: ${TBB_MALLOC_PROXY_LINK_LIBRARIES}")
+    ELSE (TBB_MALLOC_PROXY_LINK_LIBRARIES_RELEASE_FOUND AND
+            TBB_MALLOC_PROXY_LINK_LIBRARIES_DEBUG_FOUND)
+        MESSAGE (STATUS "NOT Found TBB malloc proxy libraries")
+    ENDIF (TBB_MALLOC_PROXY_LINK_LIBRARIES_RELEASE_FOUND AND
+        TBB_MALLOC_PROXY_LINK_LIBRARIES_DEBUG_FOUND)
+ENDIF (NOT DEFINED TBB_MALLOC_PROXY_LINK_LIBRARIES)

 IF (NOT DEFINED TBB_INCLUDE_DIR)
     FIND_PATH (TBB_INCLUDE_DIR tbb/tbb.h


clang on windows needs FU=''

clang on windows needs FU=''

--- cmake/c_check.cmake
+++ cmake/c_check.cmake
@@ -28,6 +28,8 @@
 set(FU "")
 if(APPLE)
 set(FU "_")
+elseif(MSVC AND ${CMAKE_C_COMPILER_ID} MATCHES "Clang")
+set(FU "")
 elseif(MSVC)
 set(FU "_")
 elseif(UNIX)


Proper default folder permissions for RPMs

--- cmake/package.cmake
+++ cmake/package.cmake
@@ -191,6 +191,7 @@
     #SET(CPACK_RPM_CHANGELOG_FILE "") # ChangeLog of the RPM; also CHANGELOG.md is not in the required format
     SET(CPACK_RPM_PACKAGE_ARCHITECTURE x86_64)
     SET(CPACK_RPM_PACKAGE_URL http://www.ospray.org/)
+    SET(CPACK_RPM_DEFAULT_DIR_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)

     # post install and uninstall scripts
     SET(CPACK_RPM_lib_POST_INSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/scripts/rpm_ldconfig.sh)


Find yder version number in the right place

--- cmake-modules/FindOrcania.cmake
+++ cmake-modules/FindOrcania.cmake
@@ -48,7 +48,7 @@
     set(ORCANIA_VERSION_STRING ${PC_ORCANIA_VERSION})
 elseif (ORCANIA_INCLUDE_DIR AND EXISTS "${ORCANIA_INCLUDE_DIR}/orcania.h")
     set(regex_orcania_version "^#define[ \t]+ORCANIA_VERSION[ \t]+([^\"]+).*")
-    file(STRINGS "${ORCANIA_INCLUDE_DIR}/orcania.h" orcania_version REGEX "${regex_orcania_version}")
+    file(STRINGS "${ORCANIA_INCLUDE_DIR}/orcania-cfg.h" orcania_version REGEX "${regex_orcania_version}")
     string(REGEX REPLACE "${regex_orcania_version}" "\\1" ORCANIA_VERSION_STRING "${orcania_version}")
     unset(regex_orcania_version)
     unset(orcania_version)
@@ -63,4 +63,4 @@
     set(ORCANIA_LIBRARIES ${ORCANIA_LIBRARY})
     set(ORCANIA_INCLUDE_DIRS ${ORCANIA_INCLUDE_DIR})
 endif ()
-mark_as_advanced(ORCANIA_INCLUDE_DIR ORCANIA_LIBRARY)+mark_as_advanced(ORCANIA_INCLUDE_DIR ORCANIA_LIBRARY)


Don't link shared zlib when it built w/ superbuild

The build-in module does not support zlibstatic, so it finds
zlib.lib/dll on the second pass, which we do not want to link
when building with superbuild (e.g. for binding libraries).

--- cmake/Modules/FindZlib_EP.cmake
+++ cmake/Modules/FindZlib_EP.cmake
@@ -36,8 +36,13 @@
 # Search the path set during the superbuild for the EP.
 set(ZLIB_PATHS ${TILEDB_EP_INSTALL_PREFIX})

-# First try the builtin find module.
-find_package(ZLIB QUIET ${TILEDB_DEPS_NO_DEFAULT_PATH})
+# Try the builtin find module unless built w/ EP superbuild
+#  Built-in module only supports shared zlib, so using it
+#  w/in superbuild we end up linking zlib.dll.
+#  https://gitlab.kitware.com/cmake/cmake/issues/18029)
+if (NOT TILEDB_ZLIB_EP_BUILT)
+  find_package(ZLIB QUIET ${TILEDB_DEPS_NO_DEFAULT_PATH})
+endif()

 # Next try finding the superbuild external project
 if (NOT ZLIB_FOUND)


Added option to select the x86 OpenCL SDK on machines that have both the x64 and x86 versions. This is done by defining the OPENCL_X86 CMake variable

--- cmake/Packages/FindOpenCL.cmake
+++ cmake/Packages/FindOpenCL.cmake
@@ -42,7 +42,11 @@
 	PATH_SUFFIXES ${OPENCL_INC_SUFFIXES}
 	DOC "The directory where CL/opencl.h resides")
 SET(OPENCL_NAMES_REL opencl OpenCL)
-SET(OPENCL_LIB_SUFFIXES "" lib/x86_64 lib/x86 lib64 lib Lib lib/opencl Libs Dist Release Debug lib/x64 lib/Win32)
+IF ( OPENCL_X86 )
+  SET(OPENCL_LIB_SUFFIXES "" lib/x86 lib Lib lib/opencl Libs Dist Release Debug lib/Win32)
+ELSE()
+  SET(OPENCL_LIB_SUFFIXES "" lib/x86_64 lib64 lib Lib lib/opencl Libs Dist Release Debug lib/x64)
+ENDIF()
 SET(OPENCL_LIB_SUFFIXES_REL)
 SET(OPENCL_LIB_SUFFIXES_DBG)
 FOREACH(i ${OPENCL_LIB_SUFFIXES})


arch/x86_64: cmake: Make libgcc detection optional

Host toolchains don't tend to provide an x32 libgcc.  But we don't
actually need one for existing code.  This is fragile, but better to
work for all but obscure cases than break outright.

Signed-off-by: Andy Ross <c70f9a6bf6ee0cd69c8af4ce5e6b131945769315@intel.com>

--- cmake/compiler/gcc/target.cmake
+++ cmake/compiler/gcc/target.cmake
@@ -85,20 +85,22 @@
       )
   endif()

-  execute_process(
-    COMMAND ${CMAKE_C_COMPILER} ${TOOLCHAIN_C_FLAGS} --print-libgcc-file-name
-    OUTPUT_VARIABLE LIBGCC_FILE_NAME
-    OUTPUT_STRIP_TRAILING_WHITESPACE
-    )
+  if(NOT no_libgcc)
+    execute_process(
+      COMMAND ${CMAKE_C_COMPILER} ${TOOLCHAIN_C_FLAGS} --print-libgcc-file-name
+      OUTPUT_VARIABLE LIBGCC_FILE_NAME
+      OUTPUT_STRIP_TRAILING_WHITESPACE
+      )

-  assert_exists(LIBGCC_FILE_NAME)
+    assert_exists(LIBGCC_FILE_NAME)

-  get_filename_component(LIBGCC_DIR ${LIBGCC_FILE_NAME} DIRECTORY)
+    get_filename_component(LIBGCC_DIR ${LIBGCC_FILE_NAME} DIRECTORY)

-  assert_exists(LIBGCC_DIR)
+    assert_exists(LIBGCC_DIR)

-  LIST(APPEND LIB_INCLUDE_DIR "-L\"${LIBGCC_DIR}\"")
-  LIST(APPEND TOOLCHAIN_LIBS gcc)
+    LIST(APPEND LIB_INCLUDE_DIR "-L\"${LIBGCC_DIR}\"")
+    LIST(APPEND TOOLCHAIN_LIBS gcc)
+  endif()

   if(SYSROOT_DIR)
     # The toolchain has specified a sysroot dir that we can use to set


Added recurse option for Arduino Ethernet library, otherwise linking fails

--- cmake/modules/FindArduino.cmake
+++ cmake/modules/FindArduino.cmake
@@ -349,6 +349,7 @@

 # For known libraries can list recurse here
 set(Wire_RECURSE True)
+set(Ethernet_RECURSE True)
 function(setup_arduino_library VAR_NAME BOARD_ID LIB_PATH)
     set(LIB_TARGETS)


[CMake] Remove unnecessary guard for standalone overlay builds

These should install the swiftmodule and swiftdoc files too.

--- cmake/modules/SwiftSource.cmake
+++ cmake/modules/SwiftSource.cmake
@@ -333,12 +333,9 @@
     endif()
   endif()

-  # If we want to build a single overlay, don't install the swiftmodule and swiftdoc files.
-  if(NOT BUILD_STANDALONE)
-    swift_install_in_component("${SWIFTFILE_INSTALL_IN_COMPONENT}"
-        FILES "${module_file}" "${module_doc_file}"
-        DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/${library_subdir}")
-  endif()
+  swift_install_in_component("${SWIFTFILE_INSTALL_IN_COMPONENT}"
+    FILES "${module_file}" "${module_doc_file}"
+    DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/${library_subdir}")

   set(line_directive_tool "${SWIFT_SOURCE_DIR}/utils/line-directive")
   set(swift_compiler_tool "${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/swiftc")


[Config] Added support for Python 3.10

[Config] Added support for Python 3.10

--- config/FindPython/Support.cmake
+++ config/FindPython/Support.cmake
@@ -25,7 +25,7 @@
   message (FATAL_ERROR "FindPython: INTERNAL ERROR")
 endif()
 if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 3)
-  set(_${_PYTHON_PREFIX}_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+  set(_${_PYTHON_PREFIX}_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
 elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 2)
   set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
 else()


CMake: use relative paths when installing the MSVC SDK

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -13,15 +13,10 @@

 if (WIN32)
   set(OGRE_MEDIA_PATH "Media")
-  if (WINDOWS_STORE OR WINDOWS_PHONE)
-    set(OGRE_MEDIA_DIR_REL "${OGRE_MEDIA_PATH}")
-    set(OGRE_TEST_MEDIA_DIR_REL "${OGRE_MEDIA_PATH}")
-  else()
-    set(OGRE_MEDIA_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_MEDIA_PATH}")
-    set(OGRE_TEST_MEDIA_DIR_REL "../Tests/${OGRE_MEDIA_PATH}")
-  endif()
+  set(OGRE_MEDIA_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_MEDIA_PATH}")
+  set(OGRE_TEST_MEDIA_DIR_REL "../Tests/${OGRE_MEDIA_PATH}")
   set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/bin")
-  set(OGRE_SAMPLES_DIR_REL "${CMAKE_INSTALL_PREFIX}/bin")
+  set(OGRE_SAMPLES_DIR_REL ".")
   set(OGRE_CFG_INSTALL_PATH "bin")
 elseif (APPLE)
   set(OGRE_MEDIA_PATH "Media")
@@ -51,6 +46,18 @@
 # generate OgreConfigPaths.h
 configure_file(${OGRE_TEMPLATES_DIR}/OgreConfigPaths.h.in ${OGRE_BINARY_DIR}/include/OgreConfigPaths.h @ONLY)

+if(WIN32)
+  # we want relative paths inside the SDK
+  set(OGRE_PLUGIN_DIR_REL ".")
+  if (WINDOWS_STORE OR WINDOWS_PHONE)
+    set(OGRE_MEDIA_DIR_REL "${OGRE_MEDIA_PATH}")
+    set(OGRE_TEST_MEDIA_DIR_REL "${OGRE_MEDIA_PATH}")
+  else()
+    set(OGRE_MEDIA_DIR_REL "../${OGRE_MEDIA_PATH}")
+    set(OGRE_TEST_MEDIA_DIR_REL "../Tests/${OGRE_MEDIA_PATH}")
+  endif()
+endif()
+
 # configure plugins.cfg
 if (NOT OGRE_BUILD_RENDERSYSTEM_D3D9)
   set(OGRE_COMMENT_RENDERSYSTEM_D3D9 "#")


Manually install PythonQt

Manually install PythonQt

--- CMake/mitkInstallRules.cmake
+++ CMake/mitkInstallRules.cmake
@@ -4,23 +4,38 @@
   "${MITK_SOURCE_DIR}/mitk.ico"
   "${MITK_SOURCE_DIR}/mitk.bmp")

+# Helper vars
+
+if(WIN32)
+  set(_prefix "")
+  set(_ext ".dll")
+elseif(UNIX)
+  set(_prefix "lib")
+  if(APPLE)
+    set(_ext ".dylib")
+  else()
+    set(_ext ".so")
+  endif()
+endif()
+
+# Install PythonQt
+
+if(MITK_USE_Python3 AND PythonQt_DIR)
+  set(_python_qt_lib "${PythonQt_DIR}/")
+  if(WIN32)
+    set(_python_qt_lib "${_python_qt_lib}bin")
+  else()
+    set(_python_qt_lib "${_python_qt_lib}lib")
+  endif()
+  set(_python_qt_lib "${_python_qt_lib}/${_prefix}PythonQt${_ext}")
+  MITK_INSTALL(FILES ${_python_qt_lib})
+endif()
+
 # Install Qt plugins

 if(MITK_USE_Qt5)
   get_property(_qmake_location TARGET ${Qt5Core_QMAKE_EXECUTABLE} PROPERTY IMPORT_LOCATION)
   get_filename_component(_qmake_path ${_qmake_location} DIRECTORY)
-
-  if(WIN32)
-    set(_prefix "")
-    set(_ext ".dll")
-  elseif(UNIX)
-    set(_prefix "lib")
-    if(APPLE)
-      set(_ext ".dylib")
-    else()
-      set(_ext ".so")
-    endif()
-  endif()

   set(_install_DESTINATION "plugins/sqldrivers")
   MITK_INSTALL(FILES "${_qmake_path}/../plugins/sqldrivers/${_prefix}qsqlite${_ext}")


Make sure only one library is found in fixup process

--- CMake/mitkMacroInstall.cmake
+++ CMake/mitkMacroInstall.cmake
@@ -46,6 +46,10 @@
         # item with relative path or embedded path pointing to some build dir
         set(full_path \"full_path-NOTFOUND\")
         file(GLOB_RECURSE full_path \${CMAKE_INSTALL_PREFIX}/${_bundle_dest_dir}/\${_item_name} )
+        list(LENGTH full_path full_path_length)
+        if(full_path_length GREATER 1)
+          list(GET full_path 0 full_path)
+        endif()
         get_filename_component(_item_path \"\${full_path}\" PATH)
       endif()


Remove deprecated midas3 from external download URLs

--- CMake/sitkExternalData.cmake
+++ CMake/sitkExternalData.cmake
@@ -39,9 +39,6 @@
     # Data published on Girder
     "https://data.kitware.com:443/api/v1/file/hashsum/%(algo)/%(hash)/download"

-    # Data published by MIDAS
-    "https://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"
-
     # Data published by developers using git-gerrit-push.
     "https://insightsoftwareconsortium.github.io/ITKTestingData/%(algo)/%(hash)"
     "https://itk.org/files/ExternalData/%(algo)/%(hash)"


Minimize dependecies when generating wrapping hierarchies.

vtkWrapHierarchy used ${vtk-module}_DEPENDS to decide what other modules a
module depends on for wrap-hiearchy. .._DEPENDS is not the correct variable. All
modules specified under "DEPENDS" and "COMPILE_DEPENDS" for a vtk_module(...)
call  are collected in that single variable. "_LINK_DEPENDS" is the variable
that directly corresponds to the modules specified under "DEPENDS" in the
vtk_module(...) call.

Allowing this enables creation of modules that merely enable other modules
without linking against them. This fix probably extends to other wrapping codes
as well, but taking one step at a time.

Change-Id: I7df3a8d8f87fb7004d5018a58ac1c14b2caecf50

--- CMake/vtkWrapHierarchy.cmake
+++ CMake/vtkWrapHierarchy.cmake
@@ -119,7 +119,11 @@
   # search through the deps to find modules we depend on
   set(OTHER_HIERARCHY_FILES)
   set(OTHER_HIERARCHY_TARGETS)
-  foreach(dep ${${vtk-module}_DEPENDS})
+  # Don't use ${vtk-module}_DEPENDS. That list also includes COMPILE_DEPENDS,
+  # which aren't library dependencies, merely dependencies for generators and
+  # such. The dependecies specified under "DEPENDS" in the vtk_module(..) macro
+  # call are located under _LINK_DEPENDS.
+  foreach(dep ${${vtk-module}_LINK_DEPENDS})
     if(NOT "${vtk-module}" STREQUAL "${dep}")
       if(NOT ${dep}_EXCLUDE_FROM_WRAPPING AND DEFINED ${dep}_BINARY_DIR)
         list(APPEND OTHER_HIERARCHY_FILES


Added a check if install prefix is set

Added a check if install prefix is set

--- build/Triplet.cmake
+++ build/Triplet.cmake
@@ -45,7 +45,11 @@
 set(extern_source_dir ${CMAKE_CURRENT_LIST_DIR}/../extern/${tri_triplet}/src/)
 set(extern_lib_dir ${CMAKE_CURRENT_LIST_DIR}/../extern/${tri_triplet}/lib/)
 set(extern_include_dir ${CMAKE_CURRENT_LIST_DIR}/../extern/${tri_triplet}/include)
-set(CMAKE_INSTALL_PREFIX ${install_dir})
+
+if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+  message(FATAL_ERROR "Set install dir ${install_dir}")
+  set(CMAKE_INSTALL_PREFIX ${install_dir})
+endif()

 message(STATUS "Building for ${tri_triplet}")
 message(STATUS "Extern include dir: ${extern_include_dir}")