Fix find script

Fix find script

--- tastefulserver-config.cmake
+++ tastefulserver-config.cmake
@@ -1,32 +1,32 @@

-# TASTEFUL_SERVER_FOUND
+# TASTEFULSERVER_FOUND

-# TASTEFUL_SERVER_INCLUDES
-# TASTEFUL_SERVER_LIBRARIES
+# TASTEFULSERVER_INCLUDES
+# TASTEFULSERVER_LIBRARIES

-# TASTEFUL_SERVER_LIBRARY
-# TASTEFUL_SERVER_LIBRARY_RELEASE
-# TASTEFUL_SERVER_LIBRARY_DEBUG
-# TASTEFUL_SERVER_INCLUDE_DIR
+# TASTEFULSERVER_LIBRARY
+# TASTEFULSERVER_LIBRARY_RELEASE
+# TASTEFULSERVER_LIBRARY_DEBUG
+# TASTEFULSERVER_INCLUDE_DIR

 include(FindPackageHandleStandardArgs)

 if(CMAKE_CURRENT_LIST_FILE)
-    get_filename_component(TASTEFUL_SERVER_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
+    get_filename_component(TASTEFULSERVER_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
 endif()

 file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ENVPROGRAMFILES)
-file(TO_CMAKE_PATH "$ENV{TASTEFUL_SERVER_DIR}" ENVTASTEFUL_SERVER_DIR)
+file(TO_CMAKE_PATH "$ENV{TASTEFULSERVER_DIR}" ENVTASTEFULSERVER_DIR)

 set(LIB_PATHS
-    ${TASTEFUL_SERVER_DIR}/build
-    ${TASTEFUL_SERVER_DIR}/build/Release
-    ${TASTEFUL_SERVER_DIR}/build/Debug
-    ${TASTEFUL_SERVER_DIR}/build-release
-    ${TASTEFUL_SERVER_DIR}/build-debug
-    ${ENVTASTEFUL_SERVER_DIR}/lib
-    ${TASTEFUL_SERVER_DIR}/lib
-    ${ENVPROGRAMFILES}/tasteful-server/lib
+    ${TASTEFULSERVER_DIR}/build
+    ${TASTEFULSERVER_DIR}/build/Release
+    ${TASTEFULSERVER_DIR}/build/Debug
+    ${TASTEFULSERVER_DIR}/build-release
+    ${TASTEFULSERVER_DIR}/build-debug
+    ${ENVTASTEFULSERVER_DIR}/lib
+    ${TASTEFULSERVER_DIR}/lib
+    ${ENVPROGRAMFILES}/tastefulserver/lib
     /usr/lib
     /usr/local/lib
     /sw/lib
@@ -40,20 +40,20 @@
 macro (find LIB_NAME HEADER)
     set(HINT_PATHS ${ARGN})

-    if (${LIB_NAME} STREQUAL "tasteful-server")
-        set(LIB_NAME_UPPER TASTEFUL_SERVER)
-        set(LIBNAME tasteful-server)
+    if (${LIB_NAME} STREQUAL "tastefulserver")
+        set(LIB_NAME_UPPER TASTEFULSERVER)
+        set(LIBNAME tastefulserver)
     else()
-        string(TOUPPER TASTEFUL_SERVER_${LIB_NAME} LIB_NAME_UPPER)
-        set(LIBNAME tasteful-server-${LIB_NAME})
+        string(TOUPPER TASTEFULSERVER_${LIB_NAME} LIB_NAME_UPPER)
+        set(LIBNAME tastefulserver-${LIB_NAME})
     endif()

     find_path(${LIB_NAME_UPPER}_INCLUDE_DIR ${HEADER}
-        ${ENVTASTEFUL_SERVER_DIR}/include
-        ${ENVTASTEFUL_SERVER_DIR}/source/${LIBNAME}/include
-        ${TASTEFUL_SERVER_DIR}/include
-        ${TASTEFUL_SERVER_DIR}/source/${LIBNAME}/include
-        ${ENVPROGRAMFILES}/tasteful-server/include
+        ${ENVTASTEFULSERVER_DIR}/include
+        ${ENVTASTEFULSERVER_DIR}/source/${LIBNAME}/include
+        ${TASTEFULSERVER_DIR}/include
+        ${TASTEFULSERVER_DIR}/source/${LIBNAME}/include
+        ${ENVPROGRAMFILES}/tastefulserver/include
         /usr/include
         /usr/local/include
         /sw/include
@@ -77,8 +77,8 @@
         set(${LIB_NAME_UPPER}_LIBRARY ${${LIB_NAME_UPPER}_LIBRARY_DEBUG})
     endif()

-    set(TASTEFUL_SERVER_INCLUDES  ${TASTEFUL_SERVER_INCLUDES}  ${${LIB_NAME_UPPER}_INCLUDE_DIR})
-    set(TASTEFUL_SERVER_LIBRARIES ${TASTEFUL_SERVER_LIBRARIES} ${${LIB_NAME_UPPER}_LIBRARY})
+    set(TASTEFULSERVER_INCLUDES  ${TASTEFULSERVER_INCLUDES}  ${${LIB_NAME_UPPER}_INCLUDE_DIR})
+    set(TASTEFULSERVER_LIBRARIES ${TASTEFULSERVER_LIBRARIES} ${${LIB_NAME_UPPER}_LIBRARY})

     # DEBUG
     #message("${LIB_NAME_UPPER}_INCLUDE_DIR     = ${${LIB_NAME_UPPER}_INCLUDE_DIR}")
@@ -88,11 +88,11 @@

 endmacro()

-find(tasteful-server   tasteful-server/tasteful-server_api.h             ${LIB_PATHS})
+find(tastefulserver   tastefulserver/tastefulserver_api.h             ${LIB_PATHS})

 # DEBUG
-#message("TASTEFUL_SERVER_INCLUDES  = ${TASTEFUL_SERVER_INCLUDES}")
-#message("TASTEFUL_SERVER_LIBRARIES = ${TASTEFUL_SERVER_LIBRARIES}")
+#message("TASTEFULSERVER_INCLUDES  = ${TASTEFULSERVER_INCLUDES}")
+#message("TASTEFULSERVER_LIBRARIES = ${TASTEFULSERVER_LIBRARIES}")

-find_package_handle_standard_args(TASTEFUL_SERVER DEFAULT_MSG TASTEFUL_SERVER_LIBRARIES TASTEFUL_SERVER_INCLUDES)
-mark_as_advanced(TASTEFUL_SERVER_FOUND)
+find_package_handle_standard_args(TASTEFULSERVER DEFAULT_MSG TASTEFULSERVER_LIBRARIES TASTEFULSERVER_INCLUDES)
+mark_as_advanced(TASTEFULSERVER_FOUND)


update superbuild to reference upstream vtk and fix compile error

--- distro/superbuild/cmake/externals.cmake
+++ distro/superbuild/cmake/externals.cmake
@@ -267,8 +267,8 @@

 if(NOT USE_SYSTEM_VTK)
   ExternalProject_Add(vtk
-    GIT_REPOSITORY https://github.com/liangfok/VTK.git
-    GIT_TAG ec43254 # vtk 5.10 with fixes for Visual Studio 2013 and GLX_GLXEXT_LEGACY.
+    GIT_REPOSITORY git://vtk.org/VTK.git
+    GIT_TAG v5.10.1
     CMAKE_CACHE_ARGS
       ${default_cmake_args}
       ${python_args}
@@ -281,6 +281,7 @@
       -DVTK_WRAP_PYTHON:BOOL=ON
       -DVTK_WRAP_TCL:BOOL=OFF
       -DVTK_USE_TK:BOOL=OFF
+      -DCMAKE_CXX_FLAGS:STRING=-DGLX_GLXEXT_LEGACY # fixes compile error on ubuntu 16.04
     )

   set(vtk_args -DVTK_DIR:PATH=${install_prefix}/lib/vtk-5.10)


Always update git and svn repos after cache copy.

This amounts to a simple sanity check.

--- CPM.cmake
+++ CPM.cmake
@@ -992,6 +992,8 @@
         # write to the cache directory.
         message(STATUS "Found cached version of ${repo}.")

+        # Todo: We really shouldn't update the tag in the cache directory.
+        #       Simply fetching the contents would suffice.
         if (NOT DEFINED CPM_MODULE_CACHE_NO_WRITE)
           _cpm_update_git_repo(${__CPM_ENSURE_CACHE_DIR} ${tag})
         endif()
@@ -1000,10 +1002,10 @@
         # updated. Copy it.
         file(COPY "${__CPM_ENSURE_CACHE_DIR}/" DESTINATION ${dir})

-        if (DEFINED CPM_MODULE_CACHE_NO_WRITE)
-          # Update git repo once it is in the target directory.
-          _cpm_update_git_repo(${dir} ${tag})
-        endif()
+        # Update git repo once more when it is in the target directory.
+        # We will need this call to set the correct tag if we fix the todo
+        # item above.
+        _cpm_update_git_repo(${dir} ${tag})
       else()
         message(STATUS "Creating cached version of ${repo}.")
         # If we can write to the cache directory, then clone it, update it,
@@ -1016,6 +1018,7 @@
           _cpm_clone_git_repo(${repo} ${__CPM_ENSURE_CACHE_DIR} ${tag})
           _cpm_update_git_repo(${__CPM_ENSURE_CACHE_DIR} ${tag})
           file(COPY "${__CPM_ENSURE_CACHE_DIR}/" DESTINATION ${dir})
+          _cpm_update_git_repo(${dir} ${tag}) # Sanity
         endif()
       endif()

@@ -1139,6 +1142,7 @@
         # write to the cache directory.
         message(STATUS "Found cached version of ${repo}.")

+        # Update cached version of repo.
         if (NOT DEFINED CPM_MODULE_CACHE_NO_WRITE)
           _cpm_update_svn_repo(${__CPM_ENSURE_CACHE_DIR} ${revision} ${trustCert} ${svn_user_pw_args})
         endif()
@@ -1147,10 +1151,7 @@
         # updated. Copy it.
         file(COPY "${__CPM_ENSURE_CACHE_DIR}/" DESTINATION ${dir})

-        if (DEFINED CPM_MODULE_CACHE_NO_WRITE)
-          # Update git repo once it is in the target directory.
-          _cpm_update_svn_repo(${dir} ${revision} ${trustCert} ${svn_user_pw_args})
-        endif()
+        _cpm_update_svn_repo(${dir} ${revision} ${trustCert} ${svn_user_pw_args})
       else()
         message(STATUS "Creating cached version of ${repo}.")
         # If we can write to the cache directory, then clone it, update it,
@@ -1163,6 +1164,7 @@
           _cpm_clone_svn_repo(${repo} ${__CPM_ENSURE_CACHE_DIR} ${revision} ${trustCert} ${svn_user_pw_args})
           _cpm_update_svn_repo(${__CPM_ENSURE_CACHE_DIR} ${revision} ${trustCert} ${svn_user_pw_args})
           file(COPY "${__CPM_ENSURE_CACHE_DIR}/" DESTINATION ${dir})
+          _cpm_update_svn_repo(${dir} ${revision} ${trustCert} ${svn_user_pw_args})
         endif()
       endif()


Update ITK along the 5.1 RC development

Update ITK along the 5.1 RC development

This updated include further changes in ITK to use strong enum types
and changes to the typenames of the enum types. The LEGACY_REMOVE flag
is disable so that legacy enum types can still be used.

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -53,7 +53,7 @@
 sitk_legacy_naming(ITK_GIT_REPOSITORY ITK_REPOSITORY)

 # post v5.1rc01
-set(_DEFAULT_ITK_GIT_TAG "ad99ff401d058a624866820180c904e57342ab16")
+set(_DEFAULT_ITK_GIT_TAG "9d0f5f7398287c24d5c926a214582d53b81f4596")
 set(ITK_GIT_TAG "${_DEFAULT_ITK_GIT_TAG}" CACHE STRING "Tag in ITK git repo")
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")
@@ -76,10 +76,8 @@

 if( ITK_GIT_TAG STREQUAL _DEFAULT_ITK_GIT_TAG )
-  # only remove legacy with the tested, and predefined version of ITK
-  list( APPEND ep_itk_args
-    "-DITK_LEGACY_REMOVE:BOOL=ON"
-    )
+  # Unable to use ITK_LEGACY_REMOVE due to change in the enum types.
+  # list( APPEND ep_itk_args "-DITK_LEGACY_REMOVE:BOOL=ON" )
 endif()

 file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt" "${ep_itk_cache}\n${ep_common_cache}" )


COMP: ImageViewer depends on ITK.

COMP: ImageViewer depends on ITK.

--- CMake/Superbuild/External_ImageViewer.cmake
+++ CMake/Superbuild/External_ImageViewer.cmake
@@ -33,13 +33,11 @@

 # Sanity checks.
 if( DEFINED ${proj}_DIR AND NOT EXISTS ${${proj}_DIR} )
-  message( FATAL_ERROR "The ${proj}_DIR variable is defined, but corresponds to a nonexistent directory" )
+  message( FATAL_ERROR
+   "${proj}_DIR is defined, but corresponds to a nonexistent directory" )
 endif( DEFINED ${proj}_DIR AND NOT EXISTS ${${proj}_DIR} )

-set( ${proj}_DEPENDENCIES "" )
-if( NOT TubeTK_BUILD_SLICER_EXTENSION )
-  set( ${proj}_DEPENDENCIES "ITK" )
-endif( NOT TubeTK_BUILD_SLICER_EXTENSION )
+set( ${proj}_DEPENDENCIES "ITK" )

 # Include dependent projects, if any.
 TubeTKMacroCheckExternalProjectDependency( ${proj} )


Minor code comment. Test [ci package] [ci only: Emscripten].

--- CMake/Toolchains/emscripten.toolchain.cmake
+++ CMake/Toolchains/emscripten.toolchain.cmake
@@ -45,7 +45,7 @@
 if (NOT EMCC_VERSION)
     execute_process (COMMAND ${EMSCRIPTEN_ROOT_PATH}/emcc --version RESULT_VARIABLE EXIT_CODE OUTPUT_VARIABLE EMCC_VERSION ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
     if (EXIT_CODE EQUAL 0)
-        string (REGEX MATCH "[^ .]+\\.[^.]+\\.[^ ]+" EMCC_VERSION "${EMCC_VERSION}")
+        string (REGEX MATCH "[^ .]+\\.[^.]+\\.[^ ]+" EMCC_VERSION "${EMCC_VERSION}")    # Stringify as it could be empty when an error has occured
     else ()
         message (FATAL_ERROR "Could not determine the emcc version. Make sure you have installed and activated the Emscripten SDK correctly.")
     endif ()


include support for PLURALS!

include support for PLURALS!

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@1282 5b2332b8-efa3-11de-8684-7d64432d61a3

--- CMakeModules/Sagase.cmake
+++ CMakeModules/Sagase.cmake
@@ -44,25 +44,25 @@
     #    set (normal_path_prefixes ${normal_path_prefixes} ${p})
     #endforeach ()

+    set (include_names "include" "includes")
+    set (lib_names "lib" "libs" "bin" "bins" "dll" "dlls")
+
     # add prefix+name paths
     foreach (prefix ${path_prefixes})
         foreach (pkgname ${path_names})
-            #foreach (subpkgname ${path_names})
-
+
+            foreach (inclname ${path_names})
                 set (includes ${includes}
-                    ${prefix}/${pkgname}/include
-                    ${prefix}/include/${pkgname})
-                    #${prefix}/${pkgname}/include/${subpkgname})
-
+                    ${prefix}/${pkgname}/${inclname}
+                    ${prefix}/${inclname}/${pkgname})
+                endforeach ()
+
+            foreach (libname ${lib_names})
                 set (libraries ${libraries}
-                    ${prefix}/${pkgname}/lib ${prefix}/lib/${pkgname}
-                    ${prefix}/${pkgname}/bin ${prefix}/bin/${pkgname}
-                    ${prefix}/${pkgname}/dll ${prefix}/dll/${pkgname})
-                    #${prefix}/${pkgname}/lib/${subpkgname}
-                    #${prefix}/${pkgname}/bin/${subpkgname}
-                    #${prefix}/${pkgname}/dll/${subpkgname})
-
-                #endforeach ()
+                    ${prefix}/${pkgname}/${libname}
+                    ${prefix}/${libname}/${pkgname})
+                endforeach ()
+
         endforeach ()
     endforeach ()


Remove unused build option

Remove unused build option

--- CMake_build_options.cmake
+++ CMake_build_options.cmake
@@ -1,11 +1,4 @@
 # Maintainer: joaander
-
-#################################
-## Optional static build
-## ENABLE_STATIC is an option to control whether HOOMD is built as a statically linked exe or as a python module.
-OPTION(ENABLE_STATIC "Link as many libraries as possible statically, cannot be changed after the first run of CMake" OFF)
-
-mark_as_advanced(ENABLE_STATIC)

 #################################
 ## Optional single/double precision build


changing findRTT cmake logic

changing findRTT cmake logic

--- lib/orogen/templates/config/FindOrocosCORBA.cmake
+++ lib/orogen/templates/config/FindOrocosCORBA.cmake
@@ -1,20 +1,20 @@
-IF (NOT OrocosRTT_FOUND)
-    FIND_PACKAGE(OrocosRTT REQUIRED)
-ENDIF(NOT OrocosRTT_FOUND)
+IF (NOT OROCOS-RTT_FOUND)
+    FIND_PACKAGE(OROCOS-RTT REQUIRED)
+ENDIF(NOT OROCOS-RTT_FOUND)

-pkg_check_modules(OrocosCORBA "orocos-rtt-corba-${OROCOS_TARGET}>=1.99.4")
-IF(NOT OrocosCORBA_FOUND)
+#pkg_check_modules(OrocosCORBA "orocos-rtt-corba-${OROCOS_TARGET}>=1.99.4")
+IF(NOT OROCOS-RTT_CORBA_FOUND)
     IF (OrocosCORBA_FIND_REQUIRED)
 	MESSAGE(FATAL_ERROR "RTT has not been built with CORBA support")
     ELSEIF(NOT OrocosCORBA_FIND_QUIETLY)
 	MESSAGE(STATUS "RTT has not been built with CORBA support")
     ENDIF (OrocosCORBA_FIND_REQUIRED)

-ELSE(NOT OrocosCORBA_FOUND)
+ELSE(NOT OROCOS-RTT_CORBA_FOUND)
     LIST(APPEND OROCOS_COMPONENT_INCLUDE ${OrocosCORBA_INCLUDE_DIRS})

     # First, find the actual implementation of the used ORB (TAO or OMNIORB)
-    FIND_FILE( OrocosCORBA_config rtt/transports/corba/rtt-corba-config.h ${OrocosRTT_INCLUDE_DIRS})
+    FIND_FILE( OrocosCORBA_config rtt/transports/corba/rtt-corba-config.h ${OROCOS-RTT_INCLUDE_DIRS})
     FILE(STRINGS ${OrocosCORBA_config} CORBA_IMPLEMENTATION
         REGEX "define RTT_CORBA_IMPLEMENTATION ")
     STRING(STRIP ${CORBA_IMPLEMENTATION} CORBA_IMPLEMENTATION)
@@ -66,5 +66,5 @@
             MESSAGE(FATAL_ERROR "unknown Corba implementation ${CORBA_IMPLEMENTATION}")
         ENDIF (CORBA_IMPLEMENTATION STREQUAL "TAO")
     ENDIF (_orocos_corba_typekit)
-ENDIF(NOT OrocosCORBA_FOUND)
+ENDIF(NOT OROCOS-RTT_CORBA_FOUND)


BUG: Check for modified headers not needed

--- Code/BasicFilters/SourceCodeGenerator.cmake
+++ Code/BasicFilters/SourceCodeGenerator.cmake
@@ -30,6 +30,7 @@
 # clear the include files
 file ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/SimpleITKBasicFiltersGeneratedHeaders.h "" )
 file ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/SimpleITKBasicFiltersGeneratedHeaders.i "" )
+
 foreach ( filter ${GENERATED_FILTER_LIST} )
   file ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/SimpleITKBasicFiltersGeneratedHeaders.h "#include \"sitk${filter}ImageFilter.h\"\n" )
   file ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/SimpleITKBasicFiltersGeneratedHeaders.i "%include \"sitk${filter}ImageFilter.h\"\n" )


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


BUG: Bump SplitComponents remote module to 2018-07-18

Shortlog:

 Jon Haitz Legarreta Gorroño (1):
       ENH: Add CI configuration files.

 Matt McCormick (4):
       COMP: Fix Python wrapping
       BUG: Add missing CTestConfig.cmake
       DOC: Update the build instructions
       BUG: Add missing ITK_TEMPLATE_EXPORT

Change-Id: Ie1f3625a2529b6d8b5fb7e4aee2e89977df2c1b8

--- Modules/Remote/SplitComponents.remote.cmake
+++ Modules/Remote/SplitComponents.remote.cmake
@@ -5,5 +5,5 @@
 itk::Image of, for example, itk::Vector, itk::CovariantVector, or
 itk::SymmetricSecondRankTensor. https://hdl.handle.net/10380/3230"
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSplitComponents.git
-  GIT_TAG c579808cb9dbd37da6b3122bb25e0af05dc3fc18
+  GIT_TAG f52bef3212f764a25c8e1398c170b599d3490f6d
   )


Squashed 'cmake/yacma/' changes from 19ed5f95..9b555308

9b555308 More YACMA bits.
8d4e2917 yacma fix for recent CMake versions.
4942670c Merge commit '9dd6fbba6dc9283ac77899901e6c026d0b016e23' into pr/dates
a0fa858c Update copyright dates for 2020.

git-subtree-dir: cmake/yacma
git-subtree-split: 9b5553088aba21f8deab536aae3551f09cce4e49

--- YACMACompilerLinkerSettings.cmake
+++ YACMACompilerLinkerSettings.cmake
@@ -44,36 +44,32 @@

 # Enable conditionally a CXX flag, if supported by the compiler.
 # This is for flags intended to be enabled in all configurations.
-# NOTE: we use macros and go through temporary private variables
-# because it's apparently impossible to append to an internal
+# NOTE: we use macros because it's apparently impossible to append to an internal
 # CACHEd list.
 macro(_YACMA_CHECK_ENABLE_CXX_FLAG flag)
     set(CMAKE_REQUIRED_QUIET TRUE)
-    check_cxx_compiler_flag("${flag}" YACMA_CHECK_CXX_FLAG)
+    check_cxx_compiler_flag("${flag}" YACMA_CHECK_CXX_FLAG::${flag})
     unset(CMAKE_REQUIRED_QUIET)
-    if(YACMA_CHECK_CXX_FLAG)
+    if(YACMA_CHECK_CXX_FLAG::${flag})
         message(STATUS "'${flag}': flag is supported by the compiler, enabling.")
         list(APPEND _YACMA_CXX_FLAGS "${flag}")
     else()
         message(STATUS "'${flag}': flag is not supported by the compiler.")
     endif()
-    # NOTE: check_cxx_compiler stores variables in the cache.
-    unset(YACMA_CHECK_CXX_FLAG CACHE)
 endmacro()

 # Enable conditionally a debug CXX flag, is supported by the compiler.
 # This is for flags intended to be enabled in debug mode.
 macro(_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG flag)
     set(CMAKE_REQUIRED_QUIET TRUE)
-    check_cxx_compiler_flag("${flag}" YACMA_CHECK_DEBUG_CXX_FLAG)
+    check_cxx_compiler_flag("${flag}" YACMA_CHECK_DEBUG_CXX_FLAG::${flag})
     unset(CMAKE_REQUIRED_QUIET)
-    if(YACMA_CHECK_DEBUG_CXX_FLAG)
+    if(YACMA_CHECK_DEBUG_CXX_FLAG::${flag})
         message(STATUS "'${flag}': debug flag is supported by the compiler, enabling.")
         list(APPEND _YACMA_CXX_FLAGS_DEBUG "${flag}")
     else()
         message(STATUS "'${flag}': debug flag is not supported by the compiler.")
     endif()
-    unset(YACMA_CHECK_DEBUG_CXX_FLAG CACHE)
 endmacro()

 # What we want to avoid is to re-run the expensive flag checks. We will set cache variables
@@ -86,6 +82,8 @@
     # Configuration bits specific for GCC.
     if(YACMA_COMPILER_IS_GNUCXX)
         _YACMA_CHECK_ENABLE_CXX_FLAG(-fdiagnostics-color=auto)
+        # New in GCC 9.
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Waddress-of-packed-member)
     endif()

     # Configuration bits specific for clang.
@@ -94,7 +92,26 @@
         # for the time being.
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wshadow)
         # Clang is better at this flag than GCC.
-        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Werror)
+        # NOTE: enable unconditionally, as it seems like the CMake
+        # machinery for detecting this fails. Perhaps the source code
+        # used for checking the flag emits warnings?
+        list(APPEND _YACMA_CXX_FLAGS_DEBUG "-Werror")
+        # New warnings in clang 8.
+        # NOTE: a few issues with macros here, let's disable for now.
+        # _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wextra-semi-stmt)
+        # New warnings in clang 10.
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wtautological-overlap-compare)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wtautological-compare)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wtautological-bitwise-compare)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wbitwise-conditional-parentheses)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wrange-loop-analysis)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wmisleading-indentation)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wc99-designator)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wreorder-init-list)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsizeof-pointer-div)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsizeof-array-div)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wxor-used-as-pow)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wfinal-dtor-non-final-class)
     endif()

     # Common configuration for GCC, clang and Intel.


Correcting grouping issue with platform and platform family source files [Issue #2]

--- _cmake/AddLibrary/AddSource.cmake
+++ _cmake/AddLibrary/AddSource.cmake
@@ -150,13 +150,13 @@
 	endforeach(source_group)

 	foreach(source_group ${platform_source_groups})
-		add_base_dir(source_group_${source_group} PATHS ${platform_source_group_${source_group}} BASE_DIR "${BASE_DIR}/src/platform/${platform}")
+		add_base_dir(platform_source_group_${source_group} PATHS ${platform_source_group_${source_group}} BASE_DIR "${BASE_DIR}/src/platform/${platform}")
 		source_group(${source_group} FILES ${platform_source_group_${source_group}})
 		unset(platform_source_group_${source_group})
 	endforeach(source_group)

 	foreach(source_group ${platform_family_source_groups})
-		add_base_dir(platform_family_source_groups_${source_group} PATHS ${platform_family_source_group_${source_group}} BASE_DIR "${BASE_DIR}/src/platform/${platform_family}")
+		add_base_dir(platform_family_source_group_${source_group} PATHS ${platform_family_source_group_${source_group}} BASE_DIR "${BASE_DIR}/src/platform/${platform_family}")
 		source_group(${source_group} FILES ${platform_family_source_group_${source_group}})
 		unset(platform_family_source_group_${source_group})
 	endforeach(source_group)
@@ -167,7 +167,6 @@
 	add_base_dir(header_files PATHS ${header_files} BASE_DIR ${BASE_DIR})
 	add_base_dir(platform_headers PATHS ${platform_headers} BASE_DIR ${BASE_DIR}/platform/${platform})
 	if(EXISTS ${BASE_DIR}/platform/${platform_family})
-		message("Adding base dir to platform family headers")
 		add_base_dir(platform_family_headers PATHS ${platform_family_headers} BASE_DIR ${BASE_DIR}/platform/${platform_family})
 	endif()


Removed inheriting include paths in hopes of improving compilation performance and better tracking dependency encapsulation.

--- scripts/project.cmake
+++ scripts/project.cmake
@@ -29,9 +29,9 @@
     add_project(${target})
   endif ()

-  if (MINGW)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wreturn-type")
-  endif ()
+#  if (MINGW)
+#    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wreturn-type")
+#  endif ()

   if ("${ARGN}" STREQUAL "")
     if (IOS)
@@ -262,6 +262,10 @@
   if (LOCAL_TARGET)
     get_dependency_hierarchy("${ARGN}" all_dependencies)

+    foreach (library_name ${ARGN})
+      include_project(${library_name})
+    endforeach ()
+
     if (IS_EXECUTABLE)
       foreach (library_name ${all_dependencies})
         if (TARGET ${library_name})
@@ -271,7 +275,7 @@
     endif ()

     foreach (library_name ${all_dependencies})
-      include_project(${library_name})
+#      include_project(${library_name})

       if (TARGET ${library_name} AND IS_EXECUTABLE)

@@ -318,7 +322,10 @@

   list(APPEND "${CURRENT_TARGET}_dependencies" "${ARGN}")
   set(${CURRENT_TARGET}_dependencies ${${CURRENT_TARGET}_dependencies} PARENT_SCOPE)
-
+  get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
+#  foreach(dir ${dirs})
+#    message(STATUS "${CURRENT_TARGET} - '${dir}'")
+#  endforeach()
 endmacro()

 macro(doctor varname path name extension)


Now CMake projects are only created for executables but it doesn't seem to make a difference.

--- scripts/project.cmake
+++ scripts/project.cmake
@@ -88,6 +88,9 @@
 endmacro(create_library)

 macro(create_executable target)
+  if (NOT "${PROJECT_NAME}" STREQUAL ${target})
+    project(${target})
+  endif ()
   create_target(${target} TRUE)
 endmacro(create_executable)

@@ -120,7 +123,6 @@
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
   endif ()

-  project(${project_name})
   if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/${project_name}-config.cmake")
     set(${project_name}_project_path ${CMAKE_CURRENT_LIST_DIR})
     set(${project_name}_project_path ${CMAKE_CURRENT_LIST_DIR} PARENT_SCOPE)


Set paths to absolute paths, added found message

--- src/cmake/ResourcePackerConfig.cmake
+++ src/cmake/ResourcePackerConfig.cmake
@@ -7,3 +7,10 @@
 set(ResourcePacker_INCLUDE_DIRS ${SELF_DIR}/../../../include)
 set(ResourcePacker_LIBRARY ${SELF_DIR}/../../../lib/libResourcePacker.so)
 set(ResourcePacker_LIBRARIES ${SELF_DIR}/../../../lib/libResourcePacker.so)
+
+get_filename_component(ResourcePacker_INCLUDE_DIR ${ResourcePacker_INCLUDE_DIR} ABSOLUTE)
+get_filename_component(ResourcePacker_INCLUDE_DIRS ${ResourcePacker_INCLUDE_DIRS} ABSOLUTE)
+get_filename_component(ResourcePacker_LIBRARY ${ResourcePacker_LIBRARY} ABSOLUTE)
+get_filename_component(ResourcePacker_LIBRARIES ${ResourcePacker_LIBRARIES} ABSOLUTE)
+
+message(STATUS "Found ResourcePacker at ${ResourcePacker_INCLUDE_DIR}")


More attempts to get the FindHypertable to work correctly

--- lib/FindHyperTable.cmake
+++ lib/FindHyperTable.cmake
@@ -21,10 +21,7 @@
 )

 # Look for the libraries
-FIND_LIBRARY(HYPERTABLE_LIBRARY
-	NAMES
-		HyperCommon
-	PATHS
+set(HYPER_LIB_PATHS
 		/usr/lib
 		/usr/local/lib
 		/usr/hypertable/0.9.2.4/lib
@@ -32,11 +29,22 @@
 		/opt/hypertable/0.9.2.4/lib
 )

+FIND_LIBRARY(HYPERTABLE_LIBRARY NAMES HyperCommon PATHS ${HYPER_LIB_PATHS})
+FIND_LIBRARY(HYPER_DFS_BROKER NAMES HyperDfsBroker PATHS ${HYPER_LIB_PATHS})
+
+# XXX Unclear -- do we need to find *all* of these?
+# libHyperCommon.so  libHyperDfsBroker.so  libHyperRanger.so  libHypertable.so
+# libHyperComm.so    libHyperDfsCmds.so    libHyperspace.so   libHyperTools.so
+
+
 # Copy the results to the output variables.
 IF(HYPERTABLE_INCLUDE_DIR AND HYPERTABLE_LIBRARY)
 	SET(HYPERTABLE_FOUND 1)
-	SET(HYPERTABLE_LIBRARIES ${HYPERTABLE_LIBRARY})
+	SET(HYPERTABLE_LIBRARIES ${HYPERTABLE_LIBRARY} ${HYPER_DFS_BROKER})
 	SET(HYPERTABLE_INCLUDE_DIRS ${HYPERTABLE_INCLUDE_DIR})
+
+	MESSAGE(STATUS "Found these hypertable libs: ${HYPERTABLE_LIBRARIES}")
+
 ELSE(HYPERTABLE_INCLUDE_DIR AND HYPERTABLE_LIBRARY)
 	SET(HYPERTABLE_FOUND 0)
 	SET(HYPERTABLE_LIBRARIES)


Needed more files for running vespa-start-services

--- install_java.cmake
+++ install_java.cmake
@@ -24,6 +24,7 @@
 install_fat_java_artifact(config-model-api)
 install_fat_java_artifact(config-model)
 install_fat_java_artifact(config-provisioning)
+install_fat_java_artifact(config-proxy)
 install_fat_java_artifact(configdefinitions)
 install_fat_java_artifact(configserver)
 install_fat_java_artifact(container-disc)
@@ -42,6 +43,8 @@
 install_fat_java_artifact(zkfacade)

 vespa_install_script(jdisc_core/src/main/perl/jdisc_logfmt bin)
+vespa_install_script(config-proxy/src/main/sh/config-ctl bin)
+
 install(FILES jdisc_core/src/main/perl/jdisc_logfmt.1 DESTINATION man/man1)

 install(FILES


Update the SimpleITK version the Super Examples use.

Change-Id: Ic914e7d182f0e857998e48d929015438b477b6f3

--- SuperBuild/External_SimpleITKExamples.cmake
+++ SuperBuild/External_SimpleITKExamples.cmake
@@ -20,7 +20,7 @@
       --no-warn-unused-cli
       -C "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt"
       ${ep_common_args}
-      -DSimpleITK_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/SimpleITK-0.10/
+      -DSimpleITK_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/SimpleITK-0.11/
       -DCMAKE_SKIP_RPATH:BOOL=ON
       -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
     BUILD_COMMAND ${BUILD_COMMAND_STRING}


BUG: Associate "archive" library install rules with Development component.

This will prevent static libraries from being installed when we are
only interested in the TubeTK applications and dependent shared libraries.

--- CMake/TubeTKMacroInstallPlugins.cmake
+++ CMake/TubeTKMacroInstallPlugins.cmake
@@ -26,5 +26,5 @@
   install( TARGETS ${ARGN}
     RUNTIME DESTINATION ${TubeTK_INSTALL_PLUGINS_BIN_DIR} COMPONENT RuntimeLibraries
     LIBRARY DESTINATION ${TubeTK_INSTALL_PLUGINS_LIB_DIR} COMPONENT RuntimeLibraries
-    ARCHIVE DESTINATION ${TubeTK_INSTALL_PLUGINS_LIB_DIR} COMPONENT RuntimeLibraries )
+    ARCHIVE DESTINATION ${TubeTK_INSTALL_PLUGINS_LIB_DIR} COMPONENT Development  )
 endmacro( TubeTKMacroInstallPlugins )


Include both SDK folders in error message.

--- cmake/mac.cmake
+++ cmake/mac.cmake
@@ -5,7 +5,7 @@

 IF (NOT EXISTS "${DEV_SDK}" AND NOT IS_DIRECTORY "${DEV_SDK}")
   IF (NOT EXISTS "${DEV_SDK2}" AND NOT IS_DIRECTORY "${DEV_SDK2}")
-    MESSAGE("Could not find Mac OSX SDK at: ${DEV_SDK}")
+    MESSAGE("Could not find Mac OSX SDK at: ${DEV_SDK} or ${DEV_SDK2}")
     MESSAGE("Aborting!")
     RETURN()
   ELSE()


small cmake style change

small cmake style change

--- cmake/mpi.cmake
+++ cmake/mpi.cmake
@@ -20,7 +20,7 @@
   include_directories(SYSTEM ${MPI_C_INCLUDE_PATH})
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_C_COMPILE_FLAGS}")
   set(SPLATT_LIBS ${SPLATT_LIBS} ${MPI_C_LIBRARIES})
-  SET(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_C_LINK_FLAGS}" )
+  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_C_LINK_FLAGS}")
 else()
   set(MPI_SOURCES "")
 endif()


Updated python detection for windows, not relying on cmake.  Correctly finds python 2.7 32 bit.

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -78,35 +78,98 @@

 # To find python in Windows we will use alternate technique
 if(NOT WINDOWS AND NOT CONDOR_PLATFORM MATCHES "Fedora19")
-#if(NOT WINDOWS AND NOT CONDOR_PLATFORM MATCHES "Fedora19")
-include (FindPythonLibs)
-# As of cmake 2.8.8, the variable below is defined by FindPythonLibs.
-# This helps ensure we get the same version of the libraries and python
-# on systems with both python2 and python3.
-if (DEFINED PYTHONLIBS_VERSION_STRING)
-  set(PythonInterp_FIND_VERSION "${PYTHONLIBS_VERSION_STRING}")
-  set(PythonInterp_FIND_VERSION_EXACT ON)
-endif()
-include (FindPythonInterp)
+	include (FindPythonLibs)
+	# As of cmake 2.8.8, the variable below is defined by FindPythonLibs.
+	# This helps ensure we get the same version of the libraries and python
+	# on systems with both python2 and python3.
+	if (DEFINED PYTHONLIBS_VERSION_STRING)
+		set(PythonInterp_FIND_VERSION "${PYTHONLIBS_VERSION_STRING}")
+		set(PythonInterp_FIND_VERSION_EXACT ON)
+	endif()
+	include (FindPythonInterp)
 else()
-	#turning off until link issues resolved with win8 batlab machine
-	#only for Visual Studio 2012
-	#if(NOT (MSVC_VERSION LESS 1700))
-		#message(STATUS "Searching for python installation")
-		#set(Python_ADDITIONAL_VERSIONS 2.7 2.6)
-		#find_package(PythonLibs 2.7)
-	  	#if(NOT PYTHONLIBS_FOUND)
-	  		#message(STATUS "PYTHONLIBS NOT FOUND")
-	  	#else()
-		    #find_package(PythonInterp)
-		    #if(PYTHONINTERP_FOUND)
-		    	#execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import sys;sys.stdout.write(sys.version[:3])" OUTPUT_VARIABLE PYTHON_VERSION)
-		    	#message(STATUS "Found Python interpreter version ${PYTHON_VERSION}")
-		    	#execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import sys;sys.stdout.write(sys.prefix)" OUTPUT_VARIABLE PYTHON_PREFIX)
-		    	#set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${PYTHON_PREFIX})
-		 	#endif()
- 		#endif()
- 	#endif()
+	if(WINDOWS)
+		#only for Visual Studio 2012
+		if(NOT (MSVC_VERSION LESS 1700))
+			message(STATUS "=======================================================")
+			message(STATUS "Searching for python installation")
+			#look at registry for 32-bit view of 64-bit registry first
+			get_filename_component(PYTHON_INSTALL_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Python\\PythonCore\\2.7\\InstallPath;]" REALPATH)
+			#when registry reading fails cmake returns with c:\registry
+
+			if("${PYTHON_INSTALL_DIR}" MATCHES "registry") #look at native 32bit path if not found
+				get_filename_component(PYTHON_INSTALL_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath;]" REALPATH)
+			endif()
+
+			if("${PYTHON_INSTALL_DIR}" MATCHES "registry")
+				message(STATUS "Suppored python installation not found on this system")
+				unset(PYTHONINTERP_FOUND)
+			else()
+				set(PYTHON_EXECUTABLE "${PYTHON_INSTALL_DIR}\\python.exe")
+				message(STATUS "PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}")
+				message(STATUS "testing it for validity")
+				set(PYTHONINTERP_FOUND TRUE)
+			endif()
+
+
+			if(PYTHONINTERP_FOUND)
+				set(PYTHON_QUERY_PART_01 "from distutils import sysconfig as s;")
+				set(PYTHON_QUERY_PART_02 "import sys;")
+				set(PYTHON_QUERY_PART_03 "import struct;")
+				set(PYTHON_QUERY_PART_04 "print('.'.join(str(v) for v in sys.version_info));")
+				set(PYTHON_QUERY_PART_05 "print(sys.prefix);")
+				set(PYTHON_QUERY_PART_06 "print(s.get_python_inc(plat_specific=True));")
+				set(PYTHON_QUERY_PART_07 "print(s.get_python_lib(plat_specific=True));")
+				set(PYTHON_QUERY_PART_08 "print(s.get_config_var('SO'));")
+				set(PYTHON_QUERY_PART_09 "print(hasattr(sys, 'gettotalrefcount')+0);")
+				set(PYTHON_QUERY_PART_10 "print(struct.calcsize('@P'));")
+				set(PYTHON_QUERY_PART_11 "print(s.get_config_var('LDVERSION') or s.get_config_var('VERSION'));")
+
+				set(PYTHON_QUERY_COMMAND "${PYTHON_QUERY_PART_01}${PYTHON_QUERY_PART_02}${PYTHON_QUERY_PART_03}${PYTHON_QUERY_PART_04}${PYTHON_QUERY_PART_05}${PYTHON_QUERY_PART_06}${PYTHON_QUERY_PART_07}${PYTHON_QUERY_PART_08}${PYTHON_QUERY_PART_09}${PYTHON_QUERY_PART_10}${PYTHON_QUERY_PART_11}")
+
+				execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "${PYTHON_QUERY_COMMAND}"
+								RESULT_VARIABLE _PYTHON_SUCCESS
+								OUTPUT_VARIABLE _PYTHON_VALUES
+								ERROR_VARIABLE _PYTHON_ERROR_VALUE
+								OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+				# Convert the process output into a list
+				string(REGEX REPLACE ";" "\\\\;" _PYTHON_VALUES ${_PYTHON_VALUES})
+				string(REGEX REPLACE "\n" ";" _PYTHON_VALUES ${_PYTHON_VALUES})
+				list(GET _PYTHON_VALUES 0 _PYTHON_VERSION_LIST)
+				list(GET _PYTHON_VALUES 1 PYTHON_PREFIX)
+				list(GET _PYTHON_VALUES 2 PYTHON_INCLUDE_DIR)
+				list(GET _PYTHON_VALUES 3 PYTHON_SITE_PACKAGES)
+				list(GET _PYTHON_VALUES 4 PYTHON_MODULE_EXTENSION)
+				list(GET _PYTHON_VALUES 5 PYTHON_IS_DEBUG)
+				list(GET _PYTHON_VALUES 6 PYTHON_SIZEOF_VOID_P)
+				list(GET _PYTHON_VALUES 7 PYTHON_LIBRARY_SUFFIX)
+
+				#check version (only 2.7 works for now)
+				if(NOT "${PYTHON_LIBRARY_SUFFIX}" STREQUAL "27")
+					message(STATUS "Wrong python library version detected.  Only 2.7.x supported ${PYTHON_LIBRARY_SUFFIX} detected")
+					unset(PYTHONINTERP_FOUND)
+				else()
+					# Test for 32bit python by making sure that Python has the same pointer-size as the chosen compiler
+					if(NOT "${PYTHON_SIZEOF_VOID_P}" STREQUAL "${CMAKE_SIZEOF_VOID_P}")
+						message(STATUS "Python bit version failure: Python is ${PYTHON_SIZEOF_VOID_P}-bit for size of void, chosen compiler is ${CMAKE_SIZEOF_VOID_P}-bit for size of void")
+						message(STATUS "Only 32bit python supported. If multiple versions installed ensure they are in different locations")
+					else()
+						message(STATUS "Valid Python version and bitdepth detected")
+						#we build the path to the library by hand to not be confused in multipython installations
+						set(PYTHON_LIBRARIES "${PYTHON_PREFIX}\\libs\\python${PYTHON_LIBRARY_SUFFIX}.lib")
+						set(PYTHON_LIBRARY ${PYTHON_LIBRARIES})
+						set(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}")
+						set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
+						message(STATUS "PYTHON_LIBRARIES=${PYTHON_LIBRARIES}")
+						set(PYTHONLIBS_FOUND TRUE)
+						set(PYTHONINTERP_FOUND TRUE)
+					endif()
+				endif()
+			endif()
+			message(STATUS "=======================================================")
+		endif()
+	endif()
 endif()
 include (FindThreads)
 include (GlibcDetect)


Set default versions for dependencies

Set default versions for dependencies

--- configure.cmake
+++ configure.cmake
@@ -1,5 +1,9 @@
 # Copyright (c) 2011, Christian Rorvik
 # Distributed under the Simplified BSD License (See accompanying file LICENSE.txt)
+
+vpm_set_default_versions(
+  boost proxy
+  crunch.base trunk)

 vpm_depend(
   boost


Bug #53445 Build with -Wall and fix warnings that it generates
Post-push fix: -Wall implies -Wunused on some platforms,
which will generate thousands of warnings about unused parameters.

configure.cmake:
  Do not warn about unused parameters in C++

--- configure.cmake
+++ configure.cmake
@@ -56,7 +56,7 @@

 # Always enable -Wall for gnu C/C++
 IF(CMAKE_COMPILER_IS_GNUCXX)
-  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
+  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused-parameter")
 ENDIF()
 IF(CMAKE_COMPILER_IS_GNUCC)
   SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")


- Minor fix?

- Minor fix?

--- toolchain/cmake/Modules/SubprojectFunctions.cmake
+++ toolchain/cmake/Modules/SubprojectFunctions.cmake
@@ -199,11 +199,11 @@
 ################################################################################

 macro( IMPORT_COFFEE_LIB LIBNAME DEPENDENCY )
-    if( ${${LIBNAME}_DIR} )
+    if( DEFINED ${LIBNAME}_DIR )
         include( ${${LIBNAME}_DIR}/${LIBNAME}Config.cmake )
         return()
     endif()
-    if( ${COFFEE_ROOT_DIR} )
+    if( DEFINED COFFEE_ROOT_DIR )
         include( ${COFFEE_ROOT_DIR}/share/${LIBNAME}Config.cmake )
         return()
     endif()


Changed MITK version number for 2012-06 release

--- CMake/mitkSetupVariables.cmake
+++ CMake/mitkSetupVariables.cmake
@@ -6,8 +6,8 @@

 # MITK_VERSION
 set(MITK_VERSION_MAJOR "2012")
-set(MITK_VERSION_MINOR "02")
-set(MITK_VERSION_PATCH "99")
+set(MITK_VERSION_MINOR "06")
+set(MITK_VERSION_PATCH "00")
 set(MITK_VERSION_STRING "${MITK_VERSION_MAJOR}.${MITK_VERSION_MINOR}.${MITK_VERSION_PATCH}")
 if(MITK_VERSION_PATCH STREQUAL "99")
   set(MITK_VERSION_STRING "${MITK_VERSION_STRING}-${MITK_REVISION_SHORTID}")


small update to resolve conflicts with kdewin32

svn path=/trunk/kdesupport/strigi/; revision=643890

--- src/streams/compat/jstreamsconfig.h.cmake
+++ src/streams/compat/jstreamsconfig.h.cmake
@@ -123,13 +123,23 @@
 #endif

 #if !@HAVE_SIZE_T@
- typedef int size_t;
- #define HAVE_SIZE_T 1
+ #ifndef _SIZE_T_DEFINED
+  #ifndef HAVE_SIZE_T
+   typedef unsigned int size_t;
+   #define HAVE_SIZE_T 1
+  #endif
+  #define _SIZE_T_DEFINED 1     // kdewin32 define
+ #endif
 #endif

 #if !@HAVE_SSIZE_T@
- typedef signed int ssize_t;
- #define HAVE_SSIZE_T 1
+ #ifndef _SSIZE_T_DEFINED
+  #ifndef HAVE_SSIZE_T
+   typedef signed int ssize_t;
+   #define HAVE_SSIZE_T 1
+  #endif
+  #define _SSIZE_T_DEFINED 1    // kdewin32 define
+ #endif
 #endif

 #cmakedefine __STRIGI_HAVE_GCC_VISIBILITY


activate cxx11 for gcc

activate cxx11 for gcc

--- cmake/CMakeCompilerSettings.cmake
+++ cmake/CMakeCompilerSettings.cmake
@@ -1,6 +1,8 @@
 # Set necessary compile and link flags

+
 if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 	set(CMAKE_CXX_FLAGS_DEBUG   "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra -Wnon-virtual-dtor -fprofile-arcs -ftest-coverage -fPIC -O0")
 elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
 # TODO figure clang stuff to enable test-coverage


[cxxmodules] Fix path to module file in CMake

Currently CMake has the wrong path to check for this file, which
means it always regenerates the modules with runtime_cxxmodules
enabled as it never sees the generated file (which is in another
path).

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -342,7 +342,7 @@
       set(rootmap_name ${library_output_dir}/${libprefix}${ARG_MODULE}.rootmap)
       if(runtime_cxxmodules)
         set(cpp_module ${ARG_MODULE})
-        set(cpp_module_file ${cpp_module}.pcm)
+        set(cpp_module_file ${library_output_dir}/${cpp_module}.pcm)
       endif()
     endif()
   else()


Revert "Added dependency on builtins from object libraries."

This reverts commit a5c32464ad8834b1a1ee6118cb56f10fa3724ff1.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -648,9 +648,6 @@
     foreach(arg1 ${ARG_BUILTINS})
       if(${arg1}_TARGET)
         add_dependencies(${library} ${${arg1}_TARGET})
-        if(TARGET ${library}_OBJS)
-            add_dependencies(${library}_OBJS ${${arg1}_TARGET})
-        endif()
       endif()
     endforeach()
   endif()


cmake: compat: handle old REQUIRED flag.

--- cmake/qibuild/compat/compat.cmake
+++ cmake/qibuild/compat/compat.cmake
@@ -227,6 +227,30 @@
     ")
   endif()

+  cmake_parse_arguments(ARG "REQUIRED" "" "" ${ARGN})
+  if(ARG_REQUIRED)
+    qi_warning("using use_lib() with a REQUIRED flag
+    is no longer necessary.
+
+    Note: optional dependencies are NOT supported in qibuild.
+
+    Use something like:
+
+        find_package(FOO)
+        if(FOO_FOUND)
+          qi_use_lib(bar foo)
+        endif()
+
+    if you really need optional dependencies.
+
+    Note: the REQUIRED keyword is not used by use_lib() anyway ....
+    "
+    )
+    qi_use_lib(${ARG_UNPARSED_ARGUMENTS})
+    return()
+  endif()
+
+
   qi_use_lib(${ARGN})

 endfunction()


Fix essential MSI naming.

Fix essential MSI naming.

--- packaging/WiX/CPackWixConfig.cmake
+++ packaging/WiX/CPackWixConfig.cmake
@@ -4,7 +4,7 @@
  SET(CPACK_COMPONENTS_USED "Server;Client;DataFiles")
  SET(CPACK_WIX_UI "WixUI_InstallDir")
  MATH(EXPR bits ${CMAKE_SIZEOF_VOID_P}*8)
- SET(CPACK_PACKAGE_FILE_NAME  "mysql-essentials-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH}-win${bits}")
+ SET(CPACK_PACKAGE_FILE_NAME  "mysql-essential-${VERSION}-win${bits}")
 ELSE()
   SET(CPACK_COMPONENTS_USED
     "Server;Client;DataFiles;Development;SharedLibraries;Embedded;Debuginfo;Documentation;IniFiles;Readme;Server_Scripts")


headers now use pass3 orig

headers now use pass3 orig

--- CMake/UseCyclus.cmake
+++ CMake/UseCyclus.cmake
@@ -30,13 +30,14 @@
   ENDIF()

   # process header
+  SET(ORIG "--pass3-use-orig")
   SET(HIN "${CMAKE_CURRENT_SOURCE_DIR}/${_name}.h")
   SET(HOUT "${BUILD_DIR}/${_name}.h")
   SET(HFLAG "-o=${HOUT}")
   IF(EXISTS "${HIN}")
     IF(NOT EXISTS ${HOUT})
-      MESSAGE(STATUS "Executing ${CYCPP} ${HIN} ${PREPROCESSOR} ${HFLAG} ${INCL_ARGS}")
-      EXECUTE_PROCESS(COMMAND ${CYCPP} ${HIN} ${PREPROCESSOR} ${HFLAG} ${INCL_ARGS})
+      MESSAGE(STATUS "Executing ${CYCPP} ${HIN} ${PREPROCESSOR} ${HFLAG} ${ORIG} ${INCL_ARGS}")
+      EXECUTE_PROCESS(COMMAND ${CYCPP} ${HIN} ${PREPROCESSOR} ${HFLAG} ${ORIG} ${INCL_ARGS})
     ENDIF(NOT EXISTS ${HOUT})
   ENDIF(EXISTS "${HIN}")

@@ -44,7 +45,6 @@
   SET(CCIN "${CMAKE_CURRENT_SOURCE_DIR}/${_name}.cc")
   SET(CCOUT "${BUILD_DIR}/${_name}.cc")
   SET(CCFLAG "-o=${CCOUT}")
-  SET(ORIG "--pass3-use-orig")
   IF(NOT EXISTS ${CCOUT})
     MESSAGE(STATUS "Executing ${CYCPP} ${CCIN} ${PREPROCESSOR} ${CCFLAG} ${ORIG} ${INCL_ARGS}")
     EXECUTE_PROCESS(COMMAND ${CYCPP} ${CCIN} ${PREPROCESSOR} ${CCFLAG} ${ORIG} ${INCL_ARGS})
@@ -61,7 +61,7 @@
       OUTPUT ${HOUT}
       COMMAND ${CYCPP} ${HIN} ${PREPROCESSOR} ${HFLAG} ${ORIG} ${INCL_ARGS}
       DEPENDS ${HIN}
-      COMMENT "Executing ${CYCPP} ${HIN} ${PREPROCESSOR} ${HFLAG} ${INCL_ARGS}"
+      COMMENT "Executing ${CYCPP} ${HIN} ${PREPROCESSOR} ${HFLAG} ${ORIG} ${INCL_ARGS}"
       )
     ADD_CUSTOM_COMMAND(
       OUTPUT ${CCOUT}


COMP: Use a writeable location for temp file

--- CMake/MITKDashboardDriverScript.cmake
+++ CMake/MITKDashboardDriverScript.cmake
@@ -38,7 +38,7 @@
 endforeach()

 # Check if "mbits" is reachable
-file(DOWNLOAD "http://mbits" "${CTEST_BINARY_DIR}/mbits.html" TIMEOUT 2 STATUS _status)
+file(DOWNLOAD "http://mbits" "${CTEST_SCRIPT_DIRECTORY}/mbits.html" TIMEOUT 2 STATUS _status)
 list(GET _status 0 _status_code)
 if (_status_code EQUAL 6) # couldn't resovle host name
   set(MBITS_AVAILABLE 1)


Cleaner build for windows

Cleaner build for windows

--- CMakeModules/KlamptDependencies.cmake
+++ CMakeModules/KlamptDependencies.cmake
@@ -16,30 +16,18 @@
 SET(KLAMPT_DEPENDENCIES "${KLAMPT_CPP_ROOT}/Dependencies" CACHE PATH "Klamp't C++ dependencies" FORCE)

 IF(WIN32)
-  #Assume binaries for KrisLibrary, ODE, GLPK, GLEW, tinyxml are in the library
-  #directory as given by the prebuilt binary package.
-  #Assume ode is double
-  SET(KRISLIBRARY_ROOT ${KLAMPT_DEPENDENCIES})
-  SET(KLAMPT_DEFINITIONS -DHAVE_GLUI=0 -DHAVE_GLUT=0 -DHAVE_TIXML=1 -DTIXML_USE_STL -DdDOUBLE -DNOMINMAX -DHAVE_GLEW=1)
-
-  include(FindPackageHandleStandardArgs)
-  FIND_PATH(KRISLIBRARY_INCLUDE_DIR KrisLibrary/myfile.h
-    PATHS ${KRISLIBRARY_ROOT}  )
-  FIND_LIBRARY(KRISLIBRARY_LIBRARY_DEBUG
-	NAMES KrisLibraryd
-	PATHS ${KRISLIBRARY_ROOT})
-  FIND_LIBRARY(KRISLIBRARY_LIBRARY_RELEASE
-	NAMES KrisLibrary
-	PATHS ${KRISLIBRARY_ROOT})
-  find_package_handle_standard_args(KRISLIBRARY
-	DEFAULT_MSG
-	KRISLIBRARY_INCLUDE_DIR
-	KRISLIBRARY_LIBRARY_DEBUG
-	KRISLIBRARY_LIBRARY_RELEASE)
-  if(NOT KRISLIBRARY_FOUND)
-    MESSAGE("KrisLibrary not found!")
-  endif( )
-
+  SET(KRISLIBRARY_ROOT ${KLAMPT_DEPENDENCIES} CACHE PATH "KrisLibrary parent directory" FORCE)
+  SET(OPENGL_LIBRARY_DIR ${KLAMPT_DEPENDENCIES})  #this is needed for glut32.lib / glui32.lib to be found in Cpp/Dependencies
+  #some weird windows setting regarding QT
+  if(POLICY CMP0020)
+	cmake_policy(SET CMP0020 OLD)
+  endif()
+
+  FIND_PACKAGE(KrisLibrary REQUIRED)
+  SET(KLAMPT_DEFINITIONS ${KRISLIBRARY_DEFINITIONS})
+  SET(KLAMPT_INCLUDE_DIRS ${KRISLIBRARY_INCLUDE_DIRS})
+  SET(KLAMPT_LIBRARIES ${KRISLIBRARY_LIBRARIES})
+
   FIND_PATH(ODE_INCLUDE_DIR ode/ode.h
     PATHS ${KRISLIBRARY_ROOT}/ode-0.14/include  )
   FIND_LIBRARY(ODE_LIBRARY_DEBUG
@@ -56,73 +44,11 @@
   if(NOT ODE_FOUND)
     MESSAGE("ODE not found!")
   endif( )
+  SET(ODE_DEFINITIONS "-DdDOUBLE" CACHE STRING "Open Dynamics Engine defines" FORCE)
+  SET(KLAMPT_DEFINITIONS ${KLAMPT_DEFINITIONS} ${ODE_DEFINITIONS})
+  SET(KLAMPT_LIBRARIES ${KLAMPT_LIBRARIES} debug ${ODE_LIBRARY_DEBUG} optimized ${ODE_LIBRARY_RELEASE} opengl32 Ws2_32 winmm Gdiplus )
+  SET(KLAMPT_INCLUDE_DIRS  ${KLAMPT_INCLUDE_DIRS} ${ODE_INCLUDE_DIR} )

-  FIND_PATH(GLPK_INCLUDE_DIR glpk.h
-	PATHS ${KRISLIBRARY_ROOT}/glpk-4.61/src  )
-  FIND_LIBRARY(GLPK_LIBRARY
-	NAMES glpk_4_61
-	PATHS ${KRISLIBRARY_ROOT})
-  find_package_handle_standard_args(GLPK
-	DEFAULT_MSG
-	GLPK_INCLUDE_DIR
-	GLPK_LIBRARY)
-  if(NOT GLPK_FOUND)
-    MESSAGE("GLPK not found!")
-  endif( )
-
-  FIND_PATH(TINYXML_INCLUDE_DIR tinyxml.h
-	PATHS ${KRISLIBRARY_ROOT}/tinyxml )
-  FIND_LIBRARY(TINYXML_LIBRARY_DEBUG
-	NAMES tinyxmld_STL
-	PATHS ${KRISLIBRARY_ROOT})
-  FIND_LIBRARY(TINYXML_LIBRARY_RELEASE
-	NAMES tinyxml_STL
-	PATHS ${KRISLIBRARY_ROOT})
-  find_package_handle_standard_args(TINYXML
-	DEFAULT_MSG
-	TINYXML_INCLUDE_DIR
-	TINYXML_LIBRARY_DEBUG
-	TINYXML_LIBRARY_RELEASE)
-  if(NOT TINYXML_FOUND)
-    MESSAGE("TinyXML not found!")
-  endif( )
-
-  SET(KLAMPT_LIBRARIES debug ${KRISLIBRARY_LIBRARY_DEBUG} optimized ${KRISLIBRARY_LIBRARY_RELEASE} debug ${ODE_LIBRARY_DEBUG} optimized ${ODE_LIBRARY_RELEASE} ${GLPK_LIBRARY} debug ${TINYXML_LIBRARY_DEBUG} optimized ${TINYXML_LIBRARY_RELEASE} ${KRISLIBRARY_ROOT}/glut32.lib opengl32 Ws2_32 winmm Gdiplus )
-  SET(KLAMPT_INCLUDE_DIRS ${KRISLIBRARY_INCLUDE_DIR} ${ODE_INCLUDE_DIR} ${GLPK_INCLUDE_DIR}  ${TINYXML_INCLUDE_DIR})
-
-  #GL Extension Wrangler package (GLEW)
-  SET(GLEW_INCLUDE_DIR ${KRISLIBRARY_ROOT}/glew-2.0.0/include CACHE PATH "GLEW include directory" FORCE)
-  SET(GLEW_LIB ${KRISLIBRARY_ROOT}/glew32.lib CACHE PATH "GLEW library" FORCE)
-  SET(KLAMPT_INCLUDE_DIRS ${KLAMPT_INCLUDE_DIRS} ${GLEW_INCLUDE_DIR})
-  SET(KLAMPT_LIBRARIES ${KLAMPT_LIBRARIES} ${GLEW_LIB})
-
-  #Optional: Assimp package
-  IF(NOT ASSIMP_ROOT)
-    SET(ASSIMP_ROOT "${KRISLIBRARY_ROOT}/assimp--3.0.1270-sdk"
-       CACHE PATH
-       "Root of Assimp package"
-       FORCE
-    )
-  ENDIF(NOT ASSIMP_ROOT)
-  FIND_PACKAGE(Assimp)
-  IF(ASSIMP_FOUND)
-    SET(KLAMPT_INCLUDE_DIRS ${KLAMPT_INCLUDE_DIRS} ${ASSIMP_INCLUDE_DIR})
-    SET(KLAMPT_LIBRARIES ${KLAMPT_LIBRARIES} ${ASSIMP_LIBRARY})
-  ENDIF(ASSIMP_FOUND)
-
-  IF(NOT LOG4CXX_ROOT)
-    SET(LOG4CXX_ROOT "${KRISLIBRARY_ROOT}/log4cxx"
-       CACHE PATH
-       "Root of Log4Cxx package"
-       FORCE
-    )
-  ENDIF(NOT LOG4CXX_ROOT)
-  FIND_PACKAGE(LOG4CXX )
-  IF(LOG4CXX_FOUND)
-	MESSAGE("LOG4CXX has been  found")
-    SET(KLAMPT_INCLUDE_DIRS ${KLAMPT_INCLUDE_DIRS} ${KRISLIBRARY_ROOT}/log4cxx/include)
-	SET(KLAMPT_LIBRARIES ${KLAMPT_LIBRARIES} ${LOG4CXX_LIBRARIES})
-  ENDIF(LOG4CXX_FOUND)

 ELSE(WIN32)


modules: updated FindMagnum.cmake from Magnum repository.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -7,9 +7,10 @@
 #  MAGNUM_LIBRARIES             - Magnum library and dependent libraries
 #  MAGNUM_INCLUDE_DIRS          - Root include dir and include dirs of
 #   dependencies
-#  MAGNUM_PLUGINS_DIR           - Base directory with plugins. You can modify
-#   it (e.g. set it to `.` when deploying on Windows with plugins stored
-#   relatively to the executable), the following MAGNUM_PLUGINS_*_DIR
+#  MAGNUM_PLUGINS_DIR           - Base directory with plugins, defaults to
+#   `magnum/` subdirectory of dir where Magnum library was found. You can
+#   modify it (e.g. set it to `.` when deploying on Windows with plugins
+#   stored relatively to the executable), the following MAGNUM_PLUGINS_*_DIR
 #   variables depend on it.
 #  MAGNUM_PLUGINS_FONT_DIR      - Directory with font plugins
 #  MAGNUM_PLUGINS_FONTCONVERTER_DIR - Directory with font converter plugins
@@ -244,7 +245,7 @@
         if(${component} STREQUAL GlutApplication)
             find_package(GLUT)
             if(GLUT_FOUND)
-                set(_MAGNUM_${_COMPONENT}_LIBRARIES ${GLUT_LIBRARIES} ${_WINDOWCONTEXT_MAGNUM_LIBRARIES_DEPENDENCY})
+                set(_MAGNUM_${_COMPONENT}_LIBRARIES ${GLUT_glut_LIBRARY} ${_WINDOWCONTEXT_MAGNUM_LIBRARIES_DEPENDENCY})
             else()
                 unset(MAGNUM_${_COMPONENT}_LIBRARY)
             endif()
@@ -404,7 +405,9 @@
     set(MAGNUM_PLUGINS_INCLUDE_DIR ${MAGNUM_INCLUDE_DIR}/MagnumPlugins)
 endif()

-set(MAGNUM_PLUGINS_DIR ${MAGNUM_PLUGINS_INSTALL_DIR}
+# Get base plugin directory from main library location
+get_filename_component(_MAGNUM_LIBRARY_PATH ${MAGNUM_LIBRARY} PATH)
+set(MAGNUM_PLUGINS_DIR ${_MAGNUM_LIBRARY_PATH}/magnum
     CACHE PATH "Base directory where to look for Magnum plugins")

 # Plugin directories


Refs #2315. Fixed error

Refs #2315. Fixed error

--- cmake/dev/eprosima_libraries.cmake
+++ cmake/dev/eprosima_libraries.cmake
@@ -15,11 +15,10 @@
 macro(find_eprosima_package package)
     if(NOT (EPROSIMA_INSTALLER AND (MSVC OR MSVC_IDE)))
         if(THIRDPARTY)
-            set(EPROSIMA_PACKAGE_EXTERNAL_DIR "" CACHE STRING "External directory to compile eprosima libraries")
-
-            if("${EPROSIMA_PACKAGE_EXTERNAL_DIR}" STREQUAL "")
-                set(${package}ExternalDir ${PROJECT_BINARY_DIR}/external/${package})
-            else()
+            set(EPROSIMA_PACKAGE_EXTERNAL_DIR "" CACHE PATH "External directory to compile eprosima libraries")
+            set(${package}ExternalDir ${PROJECT_BINARY_DIR}/external/${package})
+
+            if(NOT "${EPROSIMA_PACKAGE_EXTERNAL_DIR}" STREQUAL "")
                 set(${package}ExternalDir ${EPROSIMA_PACKAGE_EXTERNAL_DIR}/${package})
             endif()


Add SHA's for macOS 12.1 and Ubuntu 22.04.


Cleaned up CUDA architecture flags to generate code for Fermi and Kepler devices by default, unless otherwise specified.

--- cmake/oskar_compiler_options.cmake
+++ cmake/oskar_compiler_options.cmake
@@ -204,17 +204,16 @@
     endif ()

     message("===============================================================================")
-    if (NOT DEFINED CUDA_ARCH)
-        # TODO change to a fail in the case device is not set?
-        message("-- INFO: Building CUDA device code for architecture 2.0.")
-        message("-- INFO: The target CUDA architecture can be changed by using the option:")
+    if (NOT DEFINED CUDA_ARCH OR CUDA_ARCH MATCHES ALL|[Aa]ll)
+        message("-- INFO: Building CUDA device code for all Fermi and Kepler architectures")
+        message("-- INFO: The target CUDA architecture can be specified by using the option:")
         message("-- INFO:   -DCUDA_ARCH=<arch>")
         message("-- INFO: where <arch> is one of:")
         message("-- INFO:   1.3, 2.0, 2.1, 3.0, 3.5, or ALL.")
         list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_20,code=sm_20)
-    elseif (CUDA_ARCH MATCHES 1.1)
-        message("-- INFO: Building CUDA device code for architecture 1.1")
-        list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_11,code=sm_11)
+        list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_20,code=sm_21)
+        list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_30,code=sm_30)
+        list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_35,code=sm_35)
     elseif (CUDA_ARCH MATCHES 1.3)
         message("-- INFO: Building CUDA device code for architecture 1.3")
         list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_13,code=sm_13)
@@ -229,14 +228,6 @@
         list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_30,code=sm_30)
     elseif (CUDA_ARCH MATCHES 3.5)
         message("-- INFO: Building CUDA device code for architecture 3.5")
-        list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_35,code=sm_35)
-    elseif (CUDA_ARCH MATCHES ALL|[Aa]ll)
-        message("-- INFO: Building CUDA device code all supported architectures")
-        list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_11,code=sm_11)
-        list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_13,code=sm_13)
-        list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_20,code=sm_20)
-        list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_20,code=sm_21)
-        list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_30,code=sm_30)
         list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_35,code=sm_35)
     else()
         message(FATAL_ERROR "-- CUDA_ARCH ${CUDA_ARCH} not recognised!")


refs #6566 Cleanup xz subproject in cmake. xz now copies sources into the cmake build directory to prevent unnecessary churn (configure is run directly on sources)

--- cmake_modules/TokuThirdParty.cmake
+++ cmake_modules/TokuThirdParty.cmake
@@ -46,39 +46,39 @@
   list(APPEND xz_configure_opts --enable-debug)
 endif ()

-set(XZ_SOURCE_DIR "${TOKU_SVNROOT}/xz-4.999.9beta" CACHE FILEPATH "Where to find sources for xz (lzma).")
+set(XZ_SOURCE_DIR "${TokuDB_SOURCE_DIR}/third_party/xz-4.999.9beta" CACHE FILEPATH "Where to find sources for xz (lzma).")
 if (NOT EXISTS "${XZ_SOURCE_DIR}/configure")
-  message(FATAL_ERROR "Can't find the xz sources.  Please check them out to ${XZ_SOURCE_DIR} or modify TOKU_SVNROOT (${TOKU_SVNROOT}) or XZ_SOURCE_DIR.")
+    message(FATAL_ERROR "Can't find the xz sources.  Please check them out to ${XZ_SOURCE_DIR} or modify XZ_SOURCE_DIR.")
 endif ()

 if (CMAKE_GENERATOR STREQUAL Ninja)
   ## ninja doesn't understand "$(MAKE)"
-  ExternalProject_Add(build_lzma
-    PREFIX xz
-    SOURCE_DIR "${XZ_SOURCE_DIR}"
-    CONFIGURE_COMMAND
-        "${XZ_SOURCE_DIR}/configure" ${xz_configure_opts}
-        "--prefix=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/xz"
-    BUILD_COMMAND
-        make -C src/liblzma
-    INSTALL_COMMAND
-        make -C src/liblzma install
-    )
+  set(SUBMAKE_COMMAND make)
 else ()
   ## use "$(MAKE)" for submakes so they can use the jobserver, doesn't
   ## seem to break Xcode...
-  ExternalProject_Add(build_lzma
+  set(SUBMAKE_COMMAND $(MAKE))
+endif ()
+
+FILE(GLOB XZ_ALL_FILES ${XZ_SOURCE_DIR}/*)
+ExternalProject_Add(build_lzma
     PREFIX xz
-    SOURCE_DIR "${XZ_SOURCE_DIR}"
+    DOWNLOAD_COMMAND
+        cp -au "${XZ_ALL_FILES}" "<SOURCE_DIR>/"
     CONFIGURE_COMMAND
-        "${XZ_SOURCE_DIR}/configure" ${xz_configure_opts}
+        "<SOURCE_DIR>/configure" ${xz_configure_opts}
         "--prefix=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/xz"
     BUILD_COMMAND
-        $(MAKE) -C src/liblzma
+        ${SUBMAKE_COMMAND} -C src/liblzma
     INSTALL_COMMAND
-        $(MAKE) -C src/liblzma install
-    )
-endif ()
+        ${SUBMAKE_COMMAND} -C src/liblzma install
+)
+FILE(GLOB_RECURSE XZ_ALL_FILES_RECURSIVE ${XZ_SOURCE_DIR}/*)
+ExternalProject_Add_Step(build_lzma reclone_src # Names of project and custom step
+    COMMENT "(re)cloning xz source..."     # Text printed when step executes
+    DEPENDERS download configure   # Steps that depend on this step
+    DEPENDS   ${XZ_ALL_FILES_RECURSIVE}   # Files on which this step depends
+)

 set_source_files_properties(
   "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/xz/include/lzma.h"


Parallelize the core build

Parallelize the core build

--- CMake/RealmCore.cmake
+++ CMake/RealmCore.cmake
@@ -17,6 +17,7 @@
 ###########################################################################

 include(ExternalProject)
+include(ProcessorCount)

 if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
     set(MAKE_EQUAL_MAKE "MAKE=$(MAKE)")
@@ -26,6 +27,11 @@

 if(SANITIZER_FLAGS)
   set(MAKE_FLAGS ${MAKE_FLAGS} "EXTRA_CFLAGS=${SANITIZER_FLAGS}" "EXTRA_LDFLAGS=${SANITIZER_FLAGS}")
+endif()
+
+ProcessorCount(NUM_JOBS)
+if(NOT NUM_JOBS EQUAL 0)
+    set(MAKE_FLAGS ${MAKE_FLAGS} "-j${NUM_JOBS}")
 endif()

 if (${CMAKE_VERSION} VERSION_GREATER "3.4.0")


Also install gsl at the same level as ATK. Should probably also do this for Eigen and libsimdpp

--- CMake/Utilities.cmake
+++ CMake/Utilities.cmake
@@ -192,6 +192,11 @@
   DESTINATION ${CMAKE_INSTALL_PREFIX}/share/cmake
 )

+FILE(GLOB GSL_HEADERS ${PROJECT_SOURCE_DIR}/3rdParty/gsl/include/gsl/*)
+INSTALL(FILES ${GSL_HEADERS}
+  DESTINATION ${CMAKE_INSTALL_PREFIX}/include/gsl
+)
+
 include(CheckCXXCompilerFlag)

 if(CMAKE_CXX_COMPILER_ID MATCHES "Apple")


Enabling CompareFilter in CMake

Enabling CompareFilter in CMake

--- Core/Code/files.cmake
+++ Core/Code/files.cmake
@@ -75,6 +75,7 @@

 set(CPP_FILES
   Algorithms/mitkBaseDataSource.cpp
+  Algorithms/mitkCompareImageFilter.cpp
   Algorithms/mitkDataNodeSource.cpp
   Algorithms/mitkGeometry2DDataToSurfaceFilter.cpp
   Algorithms/mitkHistogramGenerator.cpp


Fixed CMake error due to missing check_include_files.

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -1,4 +1,5 @@
 include(CheckIncludeFile)
+include(CheckIncludeFiles)
 include(CheckSymbolExists)
 include(CheckFunctionExists)
 include(CheckLibraryExists)
@@ -106,6 +107,8 @@

 if (WIN32)
     check_function_exists(_strtoui64 HAVE__STRTOUI64)
+    check_function_exists(strtoull HAVE_STRTOULL)
+    check_function_exists(__strtoull HAVE___STRTOULL)

     check_function_exists(_vsnprintf_s HAVE__VSNPRINTF_S)
     check_function_exists(_vsnprintf HAVE__VSNPRINTF)


Changes to try debugging Travis failure

Changes to try debugging Travis failure

--- HalideGenerator.cmake
+++ HalideGenerator.cmake
@@ -33,6 +33,7 @@
     DEPENDS ${args_GENERATOR_TARGET}
     COMMAND ${EXEC_PATH} ${args_GENERATOR_ARGS}
     WORKING_DIRECTORY ${args_GENFILES_DIR}
+    COMMENT "Executing Generator ${args_GENERATOR_TARGET} with args ${args_GENERATOR_ARGS}..."
   )

   add_custom_target(${EXEC_TARGET} DEPENDS ${args_OUTPUTS})
@@ -104,6 +105,7 @@
     GENFILES_DIR     ${GENFILES_DIR}
     OUTPUTS          "${GENFILES_DIR}/${FILTER_LIB}" "${GENFILES_DIR}/${FILTER_HDR}"
   )
+  set_source_files_properties("${GENFILES_DIR}/${FILTER_HDR}" PROPERTIES GENERATED TRUE)
 endfunction(halide_add_aot_library)

 # Usage:


Ensure CMAKE_MAKE_PROGRAM is passed through

If the make program is not findable on the PATH, the configuring of the
sub-build won’t succeed. This change ensures it receives the same
make program as the main build.

--- DownloadProject.cmake
+++ DownloadProject.cmake
@@ -142,9 +142,13 @@
     # Create and build a separate CMake project to carry out the download.
     # If we've already previously done these steps, they will not cause
     # anything to be updated, so extra rebuilds of the project won't occur.
+    # Make sure to pass through CMAKE_MAKE_PROGRAM in case the main project
+    # has this set to something not findable on the PATH.
     configure_file("${_DownloadProjectDir}/DownloadProject.CMakeLists.cmake.in"
                    "${DL_ARGS_DOWNLOAD_DIR}/CMakeLists.txt")
-    execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
+    execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
+                        -D "CMAKE_MAKE_PROGRAM:FILE=${CMAKE_MAKE_PROGRAM}"
+                        .
                     RESULT_VARIABLE result
                     ${OUTPUT_QUIET}
                     WORKING_DIRECTORY "${DL_ARGS_DOWNLOAD_DIR}"


[Build] Improved PythonLibs support on RedHat/CentOS/EPEL.

--- config/FindPythonLibsWrapper.cmake
+++ config/FindPythonLibsWrapper.cmake
@@ -2,8 +2,16 @@
 # script. Indeed, that latter does not work well on EPEL 5, where only the Python
 # static library is searched. In that latter case, the Python dynamic library is
 # searched, and the PYTHON_LIBRARIES variable re-set accordingly.
+# Moreover, on EPEL 5 and 6, only PYTHON_INCLUDE_PATH is defined, where as
+# PYTHON_INCLUDE_DIRS is expected to be set.
+
 #
+if (PYTHON_INCLUDE_PATH AND "${PYTHON_INCLUDE_DIRS}" STREQUAL "")
+  set (PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH} PARENT_SCOPE)
+  set (PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH})
+endif ()

+#
 if ("${PYTHON_LIBRARIES}" MATCHES "libpython[1-9.]*.a")
   # The PythonLibs finder has found only the static library
   message (STATUS "The Python static library has been found by the regular PythonLibs finder: ${PYTHON_LIBRARIES}")


Patch 3517455 - Rename the COPYING file due to CPack not allowing files without extensions.

--- CMake/Packaging.cmake
+++ CMake/Packaging.cmake
@@ -18,7 +18,11 @@
 set(CPACK_PACKAGE_NAME "OGRE")
 set(CPACK_PACKAGE_VENDOR "Torus Knot Software")

-set(CPACK_RESOURCE_FILE_LICENSE "${OGRE_SOURCE_DIR}/COPYING")
+# CPack won't allow file without recognized extension to be used as
+# license file.
+configure_file("${OGRE_SOURCE_DIR}/COPYING" "${OGRE_BINARY_DIR}/COPYING.txt" COPYONLY)
+set(CPACK_RESOURCE_FILE_LICENSE "${OGRE_BINARY_DIR}/COPYING.txt")
+
 #set(CPACK_PACKAGE_ICON "${OGRE_SOURCE_DIR}\\\\ogrelogo.gif")

 set(CPACK_PACKAGE_CONTACT "OGRE Team <sinbad@ogre3d.org>")


Adress model is needed for all windows

Adress model is needed for all windows

--- SuperBuild/CMake/External_boost.cmake
+++ SuperBuild/CMake/External_boost.cmake
@@ -51,21 +51,20 @@
     --with-${lib})
 endforeach(lib)

-# I think that this is already handled by boost.
-# if(OTB_TARGET_SYSTEM_ARCH_IS_X64)
-#   set(BOOST_SB_CONFIG
-#     ${BOOST_SB_CONFIG}
-#     address-model=64)
-# endif()
-
-# This is needed because otherwise boost is building both x32 and x64 lib,
-# and during packages on win32 we are installing all libs.
+# This is needed because otherwise boost is building both x32 and x64 lib
+# (on wndows) and during packages on win32 we are installing all libs.
 # See Packaging/install_importlibs.cmake

 if ( WIN32 )
-  set(BOOST_SB_CONFIG
-    ${BOOST_SB_CONFIG}
-    address-model=32)
+  if(OTB_TARGET_SYSTEM_ARCH_IS_X64)
+    set(BOOST_SB_CONFIG
+      ${BOOST_SB_CONFIG}
+      address-model=64)
+  elseif()()
+    set(BOOST_SB_CONFIG
+      ${BOOST_SB_CONFIG}
+      address-model=32)
+  endif()
 endif()

 set(BOOST_SB_CONFIG


ENH: do not build any ossim binairies. just libossim.so

--- SuperBuild/CMake/External_ossim.cmake
+++ SuperBuild/CMake/External_ossim.cmake
@@ -48,7 +48,7 @@
   ExternalProject_Add(${proj}
     PREFIX ${proj}
     URL "https://www.orfeo-toolbox.org/packages/ossim-minimal-r23537.tar.gz"
-    URL_MD5 40f406c0da9cc188092582b3bdb20a80
+    URL_MD5 1a37403053711447a8f174bb875cca6b
     BINARY_DIR ${OSSIM_SB_BUILD_DIR}
     INSTALL_DIR ${SB_INSTALL_PREFIX}
     DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
@@ -60,13 +60,15 @@
     -DBUILD_OSSIM_MPI_SUPPORT:BOOL=OFF
     -DBUILD_OSSIM_FREETYPE_SUPPORT:BOOL=ON
     -DBUILD_OSSIM_APPS:BOOL=OFF
+    -DBUILD_OSSIM_TEST_APPS:BOOL=OFF
     -DBUILD_OSSIM_FRAMEWORKS:BOOL=OFF
+    -DBUILD_WMS:BOOL=OFF
     -DINSTALL_ARCHIVE_DIR:STRING=lib
     -DINSTALL_LIBRARY_DIR:STRING=lib
     -DCMAKE_PREFIX_PATH:STRING=${SB_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
     ${OSSIM_SB_CONFIG}
     DEPENDS ${${proj}_DEPENDENCIES}
-    CONFIGURE_COMMAND ${SB_CMAKE_COMMAND} ${OSSIM_SB_SRC}/ossim
+    CMAKE_COMMAND ${SB_CMAKE_COMMAND}
     )

   set(_SB_${proj}_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)


Added SDL include directory into header search path.

--- Source/cmake/Modules/FindUrho3D.cmake
+++ Source/cmake/Modules/FindUrho3D.cmake
@@ -56,7 +56,8 @@
             ${BUILD_TREE_PATH}/Scene
             ${BUILD_TREE_PATH}/Script
             ${BUILD_TREE_PATH}/UI
-            ${BUILD_TREE_PATH}/../Extras/LuaScript)
+            ${BUILD_TREE_PATH}/../Extras/LuaScript
+            ${BUILD_TREE_PATH}/../ThirdParty/SDL/include)

         if (RASPI AND CMAKE_CROSSCOMPILING)
             set (URHO3D_INCLUDE_DIR ${URHO3D_INCLUDE_DIR} ${URHO3D_HOME}/raspi-Build/Engine)


COMP: patch install directory for expat

COMP: patch install directory for expat

--- SuperBuild/CMake/External_expat.cmake
+++ SuperBuild/CMake/External_expat.cmake
@@ -41,4 +41,9 @@
   LOG_INSTALL 1
   )

-SUPERBUILD_UPDATE_CMAKE_VARIABLES(EXPAT FALSE)
+set(_SB_EXPAT_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
+if(WIN32)
+  set(_SB_EXPAT_LIBRARY ${SB_INSTALL_PREFIX}/lib/expat.lib)
+elseif(UNIX)
+  set(_SB_EXPAT_LIBRARY ${SB_INSTALL_PREFIX}/lib/libexpat${CMAKE_SHARED_LIBRARY_SUFFIX})
+endif()


fix ossim configure command and md5sum

fix ossim configure command and md5sum

--- SuperBuild/CMake/External_ossim.cmake
+++ SuperBuild/CMake/External_ossim.cmake
@@ -49,7 +49,7 @@
   ExternalProject_Add(${proj}
     PREFIX ${proj}
     URL "https://www.orfeo-toolbox.org/packages/ossim-minimal-r23537.tar.gz"
-    URL_MD5 40f406c0da9cc188092582b3bdb20a80
+    URL_MD5 f77d574ab2817bcc36633f77824facb5
     BINARY_DIR ${OSSIM_SB_BUILD_DIR}
     INSTALL_DIR ${SB_INSTALL_PREFIX}
     DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
@@ -67,8 +67,9 @@
     -DCMAKE_PREFIX_PATH:STRING=${SB_INSTALL_PREFIX}
     ${OSSIM_SB_CONFIG}
     DEPENDS ${${proj}_DEPENDENCIES}
-    CONFIGURE_COMMAND ${SB_CMAKE_COMMAND} ${OSSIM_SB_SRC}/ossim
+    CMAKE_COMMAND ${SB_CMAKE_COMMAND}
     )
+

   set(_SB_${proj}_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
   if(WIN32)


 - added install GLES and EGL dll in release output dir

git-svn-id: 41bd7e47c31e4d43f97241d7529f6785d233c6d8@12447 23f926e6-80f1-49ca-85a0-60d4a27bb3ac

--- rdo/packages/cmake/trunk/win32.install.cmake
+++ rdo/packages/cmake/trunk/win32.install.cmake
@@ -69,6 +69,8 @@
     ${DLL_R_QT_CORE}
     ${DLL_R_QT_CUI}
     ${DLL_R_QT_WIDGETS}
+    ${DLL_GLES}
+    ${DLL_EGL}
     ${DLL_R_QWINDOWS}
     ${DLL_R_QMINIMAL}
     ${DLL_R_MSVCR}


core: libevent: import version detection fix from libevent (#312)

libevent's CMakeLists.txt is buggy. In particular, when an
annotated tag is attached to a commit, the build process crashes.

For example, if we do:

    % cd fluent-bit/build/
    % git tag -a v1.5
    % cmake ..
    % cmake --build .

... it results in the following error:

    event-config.h(14): error C2001: newline in constant

Luckly this bug is already fixed in the upstream project. This
ports the relevant fix to mk_core/deps/libevent.

Link: https://github.com/libevent/libevent/commit/a9aa2b36
LInk: https://github.com/libevent/libevent/commit/d65e3e1d
Signed-off-by: Fujimoto Seiji <ef879192bb1e41d519c82cf76440dc8e9a530806@ceptord.net>

--- mk_core/deps/libevent/cmake/VersionViaGit.cmake
+++ mk_core/deps/libevent/cmake/VersionViaGit.cmake
@@ -2,9 +2,8 @@
 # git to determine the parent tag. And if found the macro
 # will attempt to parse them in the github tag fomat
 #
-# Usful for auto-versionin in ou CMakeLists
+# Useful for auto-versioning in our CMakeLists
 #
-#  EVENT_GIT___VERSION_FOUND - Version variables foud
 #  EVENT_GIT___VERSION_MAJOR - Major version.
 #  EVENT_GIT___VERSION_MINOR - Minor version
 #  EVENT_GIT___VERSION_STAGE - Stage version
@@ -12,7 +11,6 @@
 # Example usage:
 #
 # event_fuzzy_version_from_git()
-# if (EVENT_GIT___VERSION_FOUND)
 #    message("Libvent major=${EVENT_GIT___VERSION_MAJOR}")
 #    message("        minor=${EVENT_GIT___VERSION_MINOR}")
 #    message("        patch=${EVENT_GIT___VERSION_PATCH}")
@@ -22,32 +20,47 @@
 include(FindGit)

 macro(event_fuzzy_version_from_git)
-	set(EVENT_GIT___VERSION_FOUND FALSE)
-
 	# set our defaults.
 	set(EVENT_GIT___VERSION_MAJOR 2)
-	set(EVENT_GIT___VERSION_MINOR 1)
-	set(EVENT_GIT___VERSION_PATCH 7)
-	set(EVENT_GIT___VERSION_STAGE "beta")
+	set(EVENT_GIT___VERSION_MINOR 2)
+	set(EVENT_GIT___VERSION_PATCH 0)
+	set(EVENT_GIT___VERSION_STAGE "alpha-dev")

 	find_package(Git)

 	if (GIT_FOUND)
 		execute_process(
 			COMMAND
-				${GIT_EXECUTABLE} describe --abbrev=0
+				${GIT_EXECUTABLE} describe --abbrev=0 --always
 			WORKING_DIRECTORY
 				${PROJECT_SOURCE_DIR}
 			RESULT_VARIABLE
 				GITRET
 			OUTPUT_VARIABLE
-				GITVERSION)
+				GITVERSION
+			OUTPUT_STRIP_TRAILING_WHITESPACE
+		)

-			if (GITRET EQUAL 0)
-				string(REGEX REPLACE "^release-([0-9]+)\\.([0-9]+)\\.([0-9]+)-(.*)"       "\\1" EVENT_GIT___VERSION_MAJOR ${GITVERSION})
-				string(REGEX REPLACE "^release-([0-9]+)\\.([0-9]+)\\.([0-9]+)-(.*)"       "\\2" EVENT_GIT___VERSION_MINOR ${GITVERSION})
-				string(REGEX REPLACE "^release-([0-9]+)\\.([0-9]+)\\.([0-9]+)-(.*)"       "\\3" EVENT_GIT___VERSION_PATCH ${GITVERSION})
-				string(REGEX REPLACE "^release-([0-9]+)\\.([0-9]+)\\.([0-9]+)-([aA-zZ]+)" "\\4" EVENT_GIT___VERSION_STAGE ${GITVERSION})
+		string(REGEX REPLACE "[\\._-]" ";" VERSION_LIST "${GITVERSION}")
+		if(VERSION_LIST)
+			list(LENGTH VERSION_LIST VERSION_LIST_LENGTH)
+		endif()
+
+		if ((GITRET EQUAL 0) AND (VERSION_LIST_LENGTH EQUAL 5))
+			list(GET VERSION_LIST 1 _MAJOR)
+			list(GET VERSION_LIST 2 _MINOR)
+			list(GET VERSION_LIST 3 _PATCH)
+			list(GET VERSION_LIST 4 _STAGE)
+
+			set(_DEFAULT_VERSION "${EVENT_GIT___VERSION_MAJOR}.${EVENT_GIT___VERSION_MINOR}.${EVENT_GIT___VERSION_PATCH}-${EVENT_GIT___VERSION_STAGE}")
+			set(_GIT_VERSION     "${_MAJOR}.${_MINOR}.${_PATCH}-${_STAGE}")
+
+			if (${_DEFAULT_VERSION} VERSION_LESS ${_GIT_VERSION})
+				set(EVENT_GIT___VERSION_MAJOR ${_MAJOR})
+				set(EVENT_GIT___VERSION_MINOR ${_MINOR})
+				set(EVENT_GIT___VERSION_PATCH ${_PATCH})
+				set(EVENT_GIT___VERSION_STAGE ${_STAGE})
 			endif()
 		endif()
+	endif()
 endmacro()


ugly hack for glfw so files

ugly hack for glfw so files

--- CMakeExternals.cmake
+++ CMakeExternals.cmake
@@ -210,12 +210,16 @@
       set(GLFW_LIB "bin/glfw3.dll")
     else()
       set(GLFW_LIB "${CMAKE_INSTALL_LIBDIR}/libglfw.so")
+      # This is a try to fix #544 at least for GLFW. I found no nicer solution, probably this needs some major refactoring of the externals system.
+      # It is probably a very ugly hack, but hopefully this whole dynamic linking stuff dies anytime soon.
+      set(GLFW_LIB2 "${CMAKE_INSTALL_LIBDIR}/libglfw.so.3")
+      set(GLFW_LIB3 "${CMAKE_INSTALL_LIBDIR}/libglfw.so.3.3")
     endif()

     add_external_project(glfw SHARED
       GIT_REPOSITORY https://github.com/glfw/glfw.git
       GIT_TAG "3.3.2"
-      BUILD_BYPRODUCTS "<INSTALL_DIR>/${GLFW_LIB}" "<INSTALL_DIR>/${GLFW_IMPORT_LIB}"
+      BUILD_BYPRODUCTS "<INSTALL_DIR>/${GLFW_LIB}" "<INSTALL_DIR>/${GLFW_LIB2}" "<INSTALL_DIR>/${GLFW_LIB3}" "<INSTALL_DIR>/${GLFW_IMPORT_LIB}"
       CMAKE_ARGS
         -DBUILD_SHARED_LIBS=ON
         -DGLFW_BUILD_EXAMPLES=OFF


option in CMake to disable joystick support

--- CMakeOlxCommon.cmake
+++ CMakeOlxCommon.cmake
@@ -33,6 +33,7 @@
 OPTION(OPTIM_PROJECTILES "Enable optimisations for projectiles" Yes)
 OPTION(MEMSTATS "Enable memory statistics and debugging" No)
 OPTION(BREAKPAD "Google Breakpad support" Yes)
+OPTION(DISABLE_JOYSTICK "Disable joystick support" No)

 IF (DEBUG)
 	SET(CMAKE_BUILD_TYPE Debug)
@@ -161,6 +162,10 @@
 	ADD_DEFINITIONS(-DNBREAKPAD)
 ENDIF (BREAKPAD)

+IF (DISABLE_JOYSTICK)
+	ADD_DEFINITIONS(-DDISABLE_JOYSTICK)
+ENDIF (DISABLE_JOYSTICK)
+
 IF (GCOREDUMPER)
 	INCLUDE_DIRECTORIES(${OLXROOTDIR}/libs/coredumper/src)
 	ADD_DEFINITIONS(-DGCOREDUMPER)


Automatically make test-* targets; different script working dir.

Test script working directory changed to CMAKE_CURRENT_BINARY_DIR
for consistency with the rest of the test infrastructure.

add_test_label(NAME labels...) will automatically create test-LABEL
targets for each LABEL in labels...

add_test_class will not try and create a test-* target if the
target already exists.

--- TestScriptUtils.cmake
+++ TestScriptUtils.cmake
@@ -35,46 +35,52 @@
 #          ${NAME}_TEST_PREFIX takes priority over TEST_PREFIX.

 function(add_test_label NAME)
-  set_property(TEST ${NAME} APPEND PROPERTY LABELS ${ARGN})
+    set_property(TEST ${NAME} APPEND PROPERTY LABELS ${ARGN})
+    # create test classes for each label
+    foreach(L ${ARGN})
+        add_test_class(${L})
+    endforeach()
 endfunction()

 function(add_test_script NAME SCRIPT INTERP)
-  set(RUN_PREFIX ${TEST_PREFIX})
-  if(${NAME}_TEST_PREFIX)
-    set(RUN_PREFIX ${${NAME}_TEST_PREFIX})
-  endif()
+    set(RUN_PREFIX ${TEST_PREFIX})
+    if(${NAME}_TEST_PREFIX)
+        set(RUN_PREFIX ${${NAME}_TEST_PREFIX})
+    endif()

-  if(NOT INTERP)
-    set(INTERP "/bin/sh")
-  endif()
+    if(NOT INTERP)
+        set(INTERP "/bin/sh")
+    endif()

-  set(RUN_ARGS ${TEST_ARGS})
-  if (${NAME}_TEST_ARGS)
-    set(RUN_ARGS ${${NAME}_TEST_ARGS})
-  endif()
+    set(RUN_ARGS ${TEST_ARGS})
+    if (${NAME}_TEST_ARGS)
+        set(RUN_ARGS ${${NAME}_TEST_ARGS})
+    endif()

-  add_test(NAME ${NAME}
-           COMMAND ${RUN_PREFIX} ${INTERP} "${CMAKE_CURRENT_SOURCE_DIR}/${SCRIPT}" ${RUN_ARGS}
-           WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
+    add_test(NAME ${NAME}
+        COMMAND ${RUN_PREFIX} ${INTERP} "${CMAKE_CURRENT_SOURCE_DIR}/${SCRIPT}" ${RUN_ARGS}
+        WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")

-  # Add test labels
-  set(TEST_LABELS ${TEST_LABEL} ${${NAME}_TEST_LABEL})
-  if (TEST_LABELS)
-    add_test_label(${NAME} ${TEST_LABELS})
-  endif()
+    # Add test labels
+    set(TEST_LABELS ${TEST_LABEL} ${${NAME}_TEST_LABEL})
+    if (TEST_LABELS)
+        add_test_label(${NAME} ${TEST_LABELS})
+    endif()

-  if(TEST_ENVIRONMENT)
-    set_property(TEST ${NAME} PROPERTY ENVIRONMENT ${TEST_ENVIRONMENT})
-  endif()
+    if(TEST_ENVIRONMENT)
+        set_property(TEST ${NAME} PROPERTY ENVIRONMENT ${TEST_ENVIRONMENT})
+    endif()
 endfunction()

 function(add_test_class)
-  string(REPLACE ";" "-" TEST_SUFFIX "${ARGN}")
-  string(REPLACE ";" "$$;-L;^" TEST_LOPTS "${ARGN}")
+    string(REPLACE ";" "-" TEST_SUFFIX "${ARGN}")
+    string(REPLACE ";" "$$;-L;^" TEST_LOPTS "${ARGN}")

-  add_custom_target("test-${TEST_SUFFIX}"
-    COMMAND ${CMAKE_CTEST_COMMAND} -L ^${TEST_LOPTS}$$
-    WORKING_DIRECTORY ${${CMAKE_PROJECT_NAME}_BINARY_DIR}
-    COMMENT "Running all ${ARGN} tests")
+    if(NOT TARGET test-${TEST_SUFFIX})
+        add_custom_target("test-${TEST_SUFFIX}"
+            COMMAND ${CMAKE_CTEST_COMMAND} -L ^${TEST_LOPTS}$$
+            WORKING_DIRECTORY ${${CMAKE_PROJECT_NAME}_BINARY_DIR}
+            COMMENT "Running all ${ARGN} tests")
+    endif()
 endfunction()


Added macro: PACK_RPM_GET_ARCH

Added macro: PACK_RPM_GET_ARCH

--- Modules/PackRPM.cmake
+++ Modules/PackRPM.cmake
@@ -129,6 +129,14 @@
     SET(PACK_SOURCE_IGNORE_FILES ${PACK_SOURCE_IGNORE_FILES}
 	${RPM_IGNORE_FILES})

+    MACRO(PACK_RPM_GET_ARCH var spec_in)
+	SETTING_FILE_GET_VARIABLE(_archStr BuildArch ${spec_in} ":")
+	IF(NOT _archStr STREQUAL "noarch")
+	    SET(_archStr ${CMAKE_HOST_SYSTEM_PROCESSOR})
+	ENDIF(NOT _archStr STREQUAL "noarch")
+	SET(${var} ${_archStr})
+    ENDMACRO(PACK_RPM_GET_ARCH var spec_in)
+
     MACRO(PACK_RPM var spec_in sourcePackage)
 	IF(NOT EXISTS ${spec_in})
 	    MESSAGE(FATAL_ERROR "File ${spec_in} not found!")
@@ -157,7 +165,6 @@
 	    CONFIGURE_FILE(${_specInDir}/RPM-ChangeLog.in ${RPM_BUILD_SPECS}/RPM-ChangeLog)

 	    # Generate spec
-	    SET(SOURCE_PACKAGE ${sourcePackage})
 	    CONFIGURE_FILE(${spec_in} ${RPM_BUILD_SPECS}/${PROJECT_NAME}.spec)
 	    #SET_SOURCE_FILES_PROPERTIES(${RPM_BUILD_SPECS}/${PROJECT_NAME}.spec
 	    #	${RPM_BUILD_SPECS}/RPM-ChangeLog
@@ -205,7 +212,6 @@
 		)

 	    ADD_CUSTOM_TARGET(rpm
-		COMMAND ${CMAKE_COMMAND} -E make_directory ${RPM_BUILD_SRPMS}
 		COMMAND ${RPMBUILD} -ba --buildroot ${RPM_BUILD_BUILDROOT} ${RPM_BUILD_SPECS}/${PROJECT_NAME}.spec
 		--define '_sourcedir ${RPM_BUILD_SOURCES}'
 		--define '_builddir ${RPM_BUILD_BUILD}'
@@ -252,6 +258,13 @@

 	    ADD_DEPENDENCIES(clean_rpm clean_old_rpm)
 	    ADD_DEPENDENCIES(clean_pkg clean_rpm clean_pack_src)
+
+	    #	    ADD_CUSTOM_TARGET(install_rpms
+	    #	    find ${RPM_BUILD_RPMS}
+	    #	    -name '${PROJECT_NAME}*-${PRJ_VER}-${PRJ_RELEASE_NO}.*.rpm'
+	    #	    -print -exec rpm --upgrade --hash --verbose '{}' '\\;'
+	    #	    DEPENDS ${_prj_srpm_path}
+	    #	    )
 	ENDIF(${RPMBUILD} STREQUAL "RPMBUILD-NOTFOUND")
     ENDMACRO(PACK_RPM var spec_in sourcePackage)

@@ -260,22 +273,22 @@
 	IF(MOCK STREQUAL "MOCK-NOTFOUND")
 	    MESSAGE("mock is not found in PATH, mock support disabled.")
 	ELSE(MOCK STREQUAL "MOCK-NOTFOUND")
-	    IF(NOT DEFINED MOCK_RPM_DIST_TAG)
-		STRING(REGEX MATCH "^fc([1-9][0-9]*)"  _fedora_mock_dist "${RPM_DIST_TAG}")
-		STRING(REGEX MATCH "^el([1-9][0-9]*)"  _el_mock_dist "${RPM_DIST_TAG}")
-
-		IF (_fedora_mock_dist)
-		    STRING(REGEX REPLACE "^fc([1-9][0-9]*)" "fedora-\\1" MOCK_RPM_DIST_TAG "${RPM_DIST_TAG}")
-		ELSEIF (_el_mock_dist)
-		    STRING(REGEX REPLACE "^el([1-9][0-9]*)" "epel-\\1" MOCK_RPM_DIST_TAG "${RPM_DIST_TAG}")
-		ELSE (_fedora_mock_dist)
-		    SET(MOCK_RPM_DIST_TAG "fedora-devel")
-		ENDIF(_fedora_mock_dist)
+	    PACK_RPM_GET_ARCH(_archStr ${spec_in})
+	    IF(NOT _archStr STREQUAL "noarch")
+		IF(NOT DEFINED MOCK_RPM_DIST_TAG)
+		    STRING(REGEX MATCH "^fc([1-9][0-9]*)"  _fedora_mock_dist "${RPM_DIST_TAG}")
+		    STRING(REGEX MATCH "^el([1-9][0-9]*)"  _el_mock_dist "${RPM_DIST_TAG}")
+
+		    IF (_fedora_mock_dist)
+			STRING(REGEX REPLACE "^fc([1-9][0-9]*)" "fedora-\\1" MOCK_RPM_DIST_TAG "${RPM_DIST_TAG}")
+		    ELSEIF (_el_mock_dist)
+			STRING(REGEX REPLACE "^el([1-9][0-9]*)" "epel-\\1" MOCK_RPM_DIST_TAG "${RPM_DIST_TAG}")
+		    ELSE (_fedora_mock_dist)
+			SET(MOCK_RPM_DIST_TAG "fedora-devel")
+		    ENDIF(_fedora_mock_dist)
+		ENDIF(NOT DEFINED MOCK_RPM_DIST_TAG)
+
 		#MESSAGE ("MOCK_RPM_DIST_TAG=${MOCK_RPM_DIST_TAG}")
-	    ENDIF(NOT DEFINED MOCK_RPM_DIST_TAG)
-
-	    SETTING_FILE_GET_VARIABLE(_archStr BuildArch ${spec_in} ":")
-	    IF(NOT _archStr STREQUAL "noarch")
 		SET(_prj_srpm_path "${RPM_BUILD_SRPMS}/${PROJECT_NAME}-${PRJ_VER}-${PRJ_RELEASE}.src.rpm")
 		ADD_CUSTOM_TARGET(rpm_mock_i386
 		    COMMAND ${CMAKE_COMMAND} -E make_directory ${RPM_BUILD_RPMS}/i386
@@ -288,7 +301,6 @@
 		    COMMAND ${MOCK} -r  "${MOCK_RPM_DIST_TAG}-x86_64" --resultdir="${RPM_BUILD_RPMS}/x86_64" ${_prj_srpm_path}
 		    DEPENDS ${_prj_srpm_path}
 		    )
-
 	    ENDIF(NOT _archStr STREQUAL "noarch")
 	ENDIF(MOCK STREQUAL "MOCK-NOTFOUND")


ffmpeg/3.4: update FFmpeg wrapper

ffmpeg/3.4: update FFmpeg wrapper

--- 3rdparty/ffmpeg/ffmpeg.cmake
+++ 3rdparty/ffmpeg/ffmpeg.cmake
@@ -1,8 +1,8 @@
-# Binaries branch name: ffmpeg/3.4_20190612
-# Binaries were created for OpenCV: 1c661e754812d3423e8c15ccb9cdab57fc122c44
-ocv_update(FFMPEG_BINARIES_COMMIT "d284fd09e76966e95f08e1ac3a1a28b227447501")
-ocv_update(FFMPEG_FILE_HASH_BIN32 "a7032bf6cc1cb010dc055f352277792c")
-ocv_update(FFMPEG_FILE_HASH_BIN64 "40d1a38b83a0413a3fcf9df1044fff2a")
+# Binaries branch name: ffmpeg/3.4_20190905
+# Binaries were created for OpenCV: fafada28ebc0f2e5423a7d8ece425574ef01ff60
+ocv_update(FFMPEG_BINARIES_COMMIT "bf1730f4c4ba1996bed1fe268b52e4e942151cd6")
+ocv_update(FFMPEG_FILE_HASH_BIN32 "6899624f88cb4cbb1604edc5e12b18ab")
+ocv_update(FFMPEG_FILE_HASH_BIN64 "4729c052cb0c53ab56e9a0eed91559df")
 ocv_update(FFMPEG_FILE_HASH_CMAKE "3b90f67f4b429e77d3da36698cef700c")

 function(download_win_ffmpeg script_var)


From Hady: Fix spelling of CppUnit in CMake build file.

git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@24750 27541ba8-7e3a-0410-8455-c3a389f83636

--- cint/reflex/cmake/modules/FindCppUnit.cmake
+++ cint/reflex/cmake/modules/FindCppUnit.cmake
@@ -16,15 +16,15 @@
 IF (CPPUNIT_FOUND)

    # show which CppUnit was found only if not quiet
-   IF (NOT CPPUNIT_FIND_QUIETLY)
+   IF (NOT CppUnit_FIND_QUIETLY)
       MESSAGE(STATUS "Found CppUnit: ${CPPUNIT_LIBRARY}")
-   ENDIF (NOT CPPUNIT_FIND_QUIETLY)
+   ENDIF (NOT CppUnit_FIND_QUIETLY)

 ELSE (CPPUNIT_FOUND)

    # fatal error if CppUnit is required but not found
-   IF (CPPUNIT_FIND_REQUIRED)
+   IF (CppUnit_FIND_REQUIRED)
       MESSAGE(FATAL_ERROR "Could not find CppUnit")
-   ENDIF (CPPUNIT_FIND_REQUIRED)
+   ENDIF (CppUnit_FIND_REQUIRED)

 ENDIF (CPPUNIT_FOUND)


Fix scope of return var in nf_utils cmake

***NO_CI***

--- CMake/Modules/NF_Utils.cmake
+++ CMake/Modules/NF_Utils.cmake
@@ -9,9 +9,9 @@
 macro(NF_DIRECTORY_EXISTS_NOT_EMPTY path pathExists)

     if(EXISTS "${path}")
-        set(${pathExists} ON)
+        set(${pathExists} TRUE PARENT_SCOPE)
     else()
-        set(${pathExists} OFF)
+        set(${pathExists} FALSE PARENT_SCOPE)
     endif()

 endmacro()


hgversion.cmake avoid the case the .hg is not there

--- CMakeModules/hgversion.cmake
+++ CMakeModules/hgversion.cmake
@@ -1,12 +1,12 @@
 set(CMAKE_MODULE_PATH ${TOP_SOURCE_DIR}/CMakeModules)
 find_package(Mercurial)
-if (MERCURIAL_FOUND)
+if (MERCURIAL_FOUND AND IS_DIRECTORY ${TOP_SOURCE_DIR}/.hg)
   MERCURIAL_HG_INFO(${TOP_SOURCE_DIR} TOOLS)
   MESSAGE("Current revision is ${TOOLS_HG_ID}")
   set (TOOLS_HG_ID "hgid: ${TOOLS_HG_ID}")
-else(MERCURIAL_FOUND)
+else (MERCURIAL_FOUND AND IS_DIRECTORY ${TOP_SOURCE_DIR}/.hg)
   set (TOOLS_HG_ID)
-endif(MERCURIAL_FOUND)
+endif (MERCURIAL_FOUND AND IS_DIRECTORY ${TOP_SOURCE_DIR}/.hg)
 set (HG_HEADER "hgversion.h")
 set (NEW_HG_HEADER "new_hgversion.h")
 file(WRITE ${NEW_HG_HEADER} "static const std::string hgversion = \"${TOOLS_HG_ID}\";\n")


Adding FreeImage support

Adding FreeImage support

--- CMakeModules/KrisLibraryDependencies.cmake
+++ CMakeModules/KrisLibraryDependencies.cmake
@@ -166,6 +166,20 @@
   ENDIF(OMPL_FOUND)
 ENDIF(USE_OMPL)

+# FreeImage
+OPTION(USE_FREE_IMAGE "Build with FreeImage support" ON)
+IF(USE_FREE_IMAGE)
+  FIND_PACKAGE(FreeImage)
+  IF(FREE_IMAGE_FOUND)
+    MESSAGE("FreeImage library found")
+    SET(KRISLIBRARY_DEFINITIONS ${KRISLIBRARY_DEFINITIONS} -DHAVE_FREE_IMAGE=1)
+    SET(KRISLIBRARY_INCLUDE_DIRS ${KRISLIBRARY_INCLUDE_DIRS} ${FREE_IMAGE_INCLUDE_DIR})
+    SET(KRISLIBRARY_LIBRARIES ${KRISLIBRARY_LIBRARIES} ${FREE_IMAGE_LIBRARY})
+  ELSE(FREE_IMAGE_FOUND)
+    MESSAGE("FreeImage library not found, setting HAVE_FREE_IMAGE=0")
+  ENDIF(FREE_IMAGE_FOUND)
+ENDIF(USE_FREE_IMAGE)
+
 IF(WIN32)
   SET(KRISLIBRARY_DEFINITIONS ${KRISLIBRARY_DEFINITIONS} -DNOMINMAX -DGLUI_NO_LIB_PRAGMA)
   SET(KRISLIBRARY_LIBRARIES ${KRISLIBRARY_LIBRARIES} Ws2_32.lib Winmm.lib)


Unset CMAKE_OSX_DEPLOYMENT_TARGET to fix build with Xcode

--- iOS.cmake
+++ iOS.cmake
@@ -6,6 +6,16 @@
 else()
   set(POLLY_IOS_CMAKE 1)
 endif()
+
+# Error while building using 'ExternalProject_Add':
+
+#CMake Error at /.../share/cmake/Modules/Platform/Darwin.cmake:211 (message):
+#  CMAKE_OSX_DEPLOYMENT_TARGET is '10.9' but CMAKE_OSX_SYSROOT:
+#   "iphoneos"
+#  is not set to a MacOSX SDK with a recognized version.  Either set
+#  CMAKE_OSX_SYSROOT to a valid SDK or set CMAKE_OSX_DEPLOYMENT_TARGET to
+#  empty.
+set(ENV{CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "" FORCE)

 set(POLLY_TOOLCHAIN_NAME "iOS")
 set(POLLY_TOOLCHAIN_PREFIX "ios")


Update FW: optimize depth align, make it work with subpixel/U16 (still not optimized)

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "80b63be3ce97dc177df17865da85403ff08348ca")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "3c19d5edec86d1b7709e5a4224a9019f5e695d32")

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


Update FW: StereoDepth: Fix ImgFrame metadata width and height when decimation filter is enabled

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "7a7ea51a555cf4c5ff6fd453ea4701ee7e2d470d")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "f734632a981d4b918fbb6b52f077e729b1a74d45")

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


Added new option 'builtin_ssl' to build OpenSSL (static libraries) internally. This is useful for Mac OS X 10.11.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -403,14 +403,14 @@
       OPENSSL
       URL ${repository_tarfiles}/openssl-${openssl_version}.tar.gz
       CONFIGURE_COMMAND ${openssl_config_cmd} no-shared --prefix=<INSTALL_DIR>
-      BUILD_COMMAND make -j1 CC=${CMAKE_C_COMPILER}
+      BUILD_COMMAND make -j1 CC=${CMAKE_C_COMPILER}\ -fPIC
       INSTALL_COMMAND make install_sw
       BUILD_IN_SOURCE 1
       LOG_BUILD 1 LOG_CONFIGURE 1 LOG_DOWNLOAD 1 LOG_INSTALL 1
     )
     ExternalProject_Get_Property(OPENSSL INSTALL_DIR)
     set(OPENSSL_INCLUDE_DIR ${INSTALL_DIR}/include)
-    set(OPENSSL_LIBRARIES ${INSTALL_DIR}/lib/libcrypto.a ${INSTALL_DIR}/lib/libssl.a)
+    set(OPENSSL_LIBRARIES ${INSTALL_DIR}/lib/libssl.a ${INSTALL_DIR}/lib/libcrypto.a ${CMAKE_DL_LIBS})
     set(OPENSSL_PREFIX ${INSTALL_DIR})
     set(ssl ON CACHE BOOL "" FORCE)
   else()


Change the order of LLVM libraries to fix the build problem with latest inter rated version (CMake)

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -636,7 +636,6 @@
                        ${CMAKE_BINARY_DIR}/LLVM-install/lib/libLLVMipo.a
                        ${CMAKE_BINARY_DIR}/LLVM-install/lib/libLLVMVectorize.a
                        ${CMAKE_BINARY_DIR}/LLVM-install/lib/libLLVMBitWriter.a
-                       ${CMAKE_BINARY_DIR}/LLVM-install/lib/libLLVMBitReader.a
                        ${CMAKE_BINARY_DIR}/LLVM-install/lib/libLLVMTableGen.a
                        ${CMAKE_BINARY_DIR}/LLVM-install/lib/libLLVMX86Disassembler.a
                        ${CMAKE_BINARY_DIR}/LLVM-install/lib/libLLVMX86AsmParser.a
@@ -664,6 +663,7 @@
                        ${CMAKE_BINARY_DIR}/LLVM-install/lib/libLLVMTarget.a
                        ${CMAKE_BINARY_DIR}/LLVM-install/lib/libLLVMMC.a
                        ${CMAKE_BINARY_DIR}/LLVM-install/lib/libLLVMObject.a
+                       ${CMAKE_BINARY_DIR}/LLVM-install/lib/libLLVMBitReader.a
                        ${CMAKE_BINARY_DIR}/LLVM-install/lib/libLLVMCore.a
                        ${CMAKE_BINARY_DIR}/LLVM-install/lib/libLLVMSupport.a )
     file(READ ${LLVM_SOURCE_DIR}/configure _filestr)


fbcode_builder: minor fixup to normalize python installation paths

Summary:
This just strips off a trailing '/' from the `INSTALL_DIR` property that we
set on python targets, to avoid having double-slashes in the paths that we use
during installation.  This shouldn't really have any material difference other
than cleaning up the paths that get printed during the installation phase.

Reviewed By: chadaustin

Differential Revision: D17089207

fbshipit-source-id: ab36bb76c19fa60fe037f7a5290ccfd6bdbf13b0

--- build/fbcode_builder/CMake/FBPythonBinary.cmake
+++ build/fbcode_builder/CMake/FBPythonBinary.cmake
@@ -326,6 +326,7 @@
   if(NOT IS_ABSOLUTE "${abs_install_dir}")
     set(abs_install_dir "${CMAKE_INSTALL_PREFIX}/${abs_install_dir}")
   endif()
+  string(REGEX REPLACE "/$" "" abs_install_dir "${abs_install_dir}")
   set_target_properties(
     "${LIB_NAME}.py_lib_install"
     PROPERTIES


Add variables to ios toolchain

Add variables to ios toolchain

--- ios.cmake
+++ ios.cmake
@@ -78,5 +78,54 @@
   polly_fatal_error("iOS version not found, tested: [${IOS_SDK_VERSIONS}]")
 endif()

+# iPhone simulator root
+set(
+    IPHONESIMULATOR_ROOT
+    "${XCODE_DEVELOPER_ROOT}/Platforms/iPhoneSimulator.platform/Developer"
+)
+if(NOT EXISTS "${IPHONESIMULATOR_ROOT}")
+  polly_fatal_error(
+      "IPHONESIMULATOR_ROOT not found (${IPHONESIMULATOR_ROOT})\n"
+      "XCODE_DEVELOPER_ROOT: ${XCODE_DEVELOPER_ROOT}\n"
+  )
+endif()
+
+# iPhone simulator SDK root
+set(
+    IPHONESIMULATOR_SDK_ROOT
+    "${IPHONESIMULATOR_ROOT}/SDKs/iPhoneSimulator${IOS_SDK_VERSION}.sdk"
+)
+
+if(NOT EXISTS ${IPHONESIMULATOR_SDK_ROOT})
+  polly_fatal_error(
+      "IPHONESIMULATOR_SDK_ROOT not found (${IPHONESIMULATOR_SDK_ROOT})\n"
+      "IPHONESIMULATOR_ROOT: ${IPHONESIMULATOR_ROOT}\n"
+      "IOS_SDK_VERSION: ${IOS_SDK_VERSION}\n"
+  )
+endif()
+
+# iPhone root
+set(
+    IPHONEOS_ROOT
+    "${XCODE_DEVELOPER_ROOT}/Platforms/iPhoneOS.platform/Developer"
+)
+if(NOT EXISTS "${IPHONEOS_ROOT}")
+  polly_fatal_error(
+      "IPHONEOS_ROOT not found (${IPHONEOS_ROOT})\n"
+      "XCODE_DEVELOPER_ROOT: ${XCODE_DEVELOPER_ROOT}\n"
+  )
+endif()
+
+# iPhone SDK root
+set(IPHONEOS_SDK_ROOT "${IPHONEOS_ROOT}/SDKs/iPhoneOS${IOS_SDK_VERSION}.sdk")
+
+if(NOT EXISTS ${IPHONEOS_SDK_ROOT})
+  hunter_fatal_error(
+      "IPHONEOS_SDK_ROOT not found (${IPHONEOS_SDK_ROOT})\n"
+      "IPHONEOS_ROOT: ${IPHONEOS_ROOT}\n"
+      "IOS_SDK_VERSION: ${IOS_SDK_VERSION}\n"
+  )
+endif()
+
 # support for hunter (github.com/ruslo/hunter)
 set(HUNTER_CMAKE_GENERATOR Xcode)


Update ITK version to fix broken HFD5-deflate plugin, which fixes support for MINC with internal compression


Use consolidated MPU driver

Use consolidated MPU driver

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

--- cmake/configs/qurt_eagle_release.cmake
+++ cmake/configs/qurt_eagle_release.cmake
@@ -37,7 +37,7 @@
 	#
 	drivers/device
 	modules/sensors
-	${EAGLE_DRIVERS_SRC}/mpu9x50
+	${EAGLE_DRIVERS_SRC}/mpu_spi
 	${EAGLE_DRIVERS_SRC}/uart_esc
 	${EAGLE_DRIVERS_SRC}/rc_receiver
 	${EAGLE_DRIVERS_SRC}/csr_gps


added ~/.local to the hints

added ~/.local to the hints

--- src/CMake/Findcycluscore.cmake
+++ src/CMake/Findcycluscore.cmake
@@ -12,14 +12,12 @@
     MESSAGE(STATUS "\t\tThe defined cmake variable CYCLUS_ROOT_DIR: ${CYCLUS_ROOT_DIR}")
     MESSAGE(STATUS "\t\tThe environment variable CYCLUS_ROOT_DIR: $ENV{CYCLUS_ROOT_DIR}")
   ENDIF(NOT DEFINED CYCLUS_ROOT_DIR)
+ELSE(DEFINED ENV{CYCLUS_ROOT_DIR})
+  SET(CYCLUS_ROOT_DIR "$ENV{HOME}/.local")
 ENDIF(DEFINED ENV{CYCLUS_ROOT_DIR})

 # Let the user know if we're using a hint
-IF(DEFINED CYCLUS_ROOT_DIR)
-  MESSAGE(STATUS "CYCLUS_ROOT_DIR hint is : ${CYCLUS_ROOT_DIR}")
-ELSE(DEFINED CYCLUS_ROOT_DIR)
-  MESSAGE(STATUS "No hint is used for CYCLUS_ROOT_DIR")
-ENDIF(DEFINED CYCLUS_ROOT_DIR)
+MESSAGE(STATUS "Using ${CYCLUS_ROOT_DIR} as CYCLUS_ROOT_DIR.")

 # Set the include dir, this will be the future basis for other
 # defined dirs
@@ -27,7 +25,7 @@
   HINTS "${CYCLUS_ROOT_DIR}" "${CYCLUS_ROOT_DIR}/cyclus"
   "${CYCLUS_ROOT_DIR}/include"
   "${CYCLUS_ROOT_DIR}/include/cyclus"
-  /usr/local/cyclus /opt/local/cyclus
+  /usr/local/cyclus /opt/local/cyclus
   PATH_SUFFIXES cyclus/include include include/cyclus)

 # Add the root dir to the hints


Remove automatic code signing

Remove automatic code signing

Fixes #86

CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM needs to be set by the user anyway
All a default value does is forcing the usage of a code signature on
targets.
Simply remove the default value should be sufficient to solve #86
without even breaking any existing usage.

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -365,9 +365,6 @@
 # Set Xcode property for SDKROOT as well if Xcode generator is used
 if(USED_CMAKE_GENERATOR MATCHES "Xcode")
   set(CMAKE_OSX_SYSROOT "${SDK_NAME}" CACHE INTERNAL "")
-  if(NOT DEFINED CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM)
-    set(CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "123456789A")
-  endif()
 endif()

 # Specify minimum version of deployment target.


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

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

--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -94,7 +94,7 @@
 Comment[pt_BR]=Infraestrutura do VLC para o Phonon
 Comment[ro]=Suportul VLC pentru Phonon
 Comment[ru]=Механизм VLC для Phonon
-Comment[sk]=Backend Phonon VLC
+Comment[sk]=Phonon VLC backend
 Comment[sl]=Zaledje VLC za Phonon
 Comment[sr]=ВЛЦ као позадина Фонона
 Comment[sr@ijekavian]=ВЛЦ као позадина Фонона


Fixes T19998, do not presume resolvable to mean available

--- CMake/MITKDashboardDriverScript.cmake
+++ CMake/MITKDashboardDriverScript.cmake
@@ -40,10 +40,10 @@
 # Check if "mbits" is reachable
 file(DOWNLOAD "http://mbits" "${CTEST_SCRIPT_DIRECTORY}/mbits.html" TIMEOUT 2 STATUS _status)
 list(GET _status 0 _status_code)
-if(_status_code EQUAL 6) # couldn't resovle host name
+if(_status_code EQUAL 0) # successful completion
+  set(MBITS_AVAILABLE 1)
+else()
   set(MBITS_AVAILABLE 0)
-else()
-  set(MBITS_AVAILABLE 1)
 endif()

 #


[Conf] Fixed a typo in the reporting message

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -2585,7 +2585,7 @@
     message (STATUS "  - Boost_LIB_VERSION ............. : ${Boost_LIB_VERSION}")
     message (STATUS "  - Boost_HUMAN_VERSION ........... : ${Boost_HUMAN_VERSION}")
     message (STATUS "  - Boost_INCLUDE_DIRS ............ : ${Boost_INCLUDE_DIRS}")
-    message (STATUS "  - Boost_PYTHON_VERSIONi ......... : ${Boost_PYTHON_VERSION}")
+    message (STATUS "  - Boost_PYTHON_VERSION .......... : ${Boost_PYTHON_VERSION}")
     message (STATUS "  - Boost required components ..... : ${BOOST_REQUIRED_COMPONENTS}")
     message (STATUS "  - Boost required libraries ...... : ${BOOST_REQUIRED_LIBS}")
     message (STATUS "  - Boost required libs for lib ... : ${PROJ_DEP_LIBS_FOR_LIB}")


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -22,6 +22,7 @@
 Name[mr]=त्वरित संदेश संपर्क
 Name[nb]=Lynmeldingskontakter
 Name[nl]=Contactpersonen van Instant Messaging
+Name[pa]=ਤੁਰੰਤ ਸੁਨੇਹਾ ਸੰਪਰਕ
 Name[pl]=Kontakty komunikatorów internetowych
 Name[pt]=Contactos das Mensagens Instantâneas
 Name[pt_BR]=Contatos de mensagens instantâneas
@@ -63,6 +64,7 @@
 Comment[mr]=तुमच्या आयएम संपर्कातील कोणाशीही गप्पा मारा
 Comment[nb]=Start en prat med en av dine LM-kontakter
 Comment[nl]=Begin een chat met een van uw IM-contactpersonen
+Comment[pa]=ਆਪਣੇ ਕਿਸੇ ਆਈਐਮ ਸੰਪਰਕ ਨਾਲ ਗੱਲ ਸ਼ੁਰੂ ਕਰੋ
 Comment[pl]=Rozpocznij rozmowę z kimkolwiek z twoich kontaktów z komunikatora
 Comment[pt]=Iniciar uma conversa com qualquer um dos seus contactos MI
 Comment[pt_BR]=Inicia um bate-papo com qualquer um dos seus contatos de MI


Add CMP0075

Add CMP0075


COMP: Set boost configure specific options when building with clang on unix systems

--- SuperBuild/CMake/External_boost.cmake
+++ SuperBuild/CMake/External_boost.cmake
@@ -47,9 +47,17 @@
   --with-thread
   )

+set(BOOST_BOOTSTRAP_OPTIONS "")
+
 if(UNIX)
   set(BOOST_BOOTSTRAP_FILE "./bootstrap.sh")
   set(BOOST_B2_EXE "./b2")
+  if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+    set(BOOST_SB_CONFIG
+        ${BOOST_SB_CONFIG}
+        toolset=clang)
+    set(BOOST_BOOTSTRAP_OPTIONS "--with-toolset=clang")
+  endif()
 else()
   set(BOOST_BOOTSTRAP_FILE "bootstrap.bat")
   set(BOOST_B2_EXE "b2.exe")
@@ -57,7 +65,7 @@

 set(BOOST_CONFIGURE_COMMAND ${CMAKE_COMMAND}
   -E chdir ${BOOST_SB_SRC}
-  ${BOOST_BOOTSTRAP_FILE}
+  ${BOOST_BOOTSTRAP_FILE} ${BOOST_BOOTSTRAP_OPTIONS}
   --prefix=${SB_INSTALL_PREFIX}
   )


Fix typo

Fix typo

--- SuperBuild/CMake/External_boost.cmake
+++ SuperBuild/CMake/External_boost.cmake
@@ -60,7 +60,7 @@
     set(BOOST_SB_CONFIG
       ${BOOST_SB_CONFIG}
       address-model=64)
-  elseif()()
+  else()
     set(BOOST_SB_CONFIG
       ${BOOST_SB_CONFIG}
       address-model=32)


Fix PR26622 - Make CheckLibcxxAtomic.cmake use the libc++ headers.

git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@261383 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/CheckLibcxxAtomic.cmake
+++ cmake/Modules/CheckLibcxxAtomic.cmake
@@ -9,9 +9,9 @@

 function(check_cxx_atomics varname)
   set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
-  set(CMAKE_REQUIRED_FLAGS "-std=c++11")
+  set(CMAKE_REQUIRED_FLAGS "-std=c++11 -nostdinc++ -isystem ${LIBCXX_SOURCE_DIR}/include")
   if (${LIBCXX_GCC_TOOLCHAIN})
-    set(CMAKE_REQUIRED_FLAGS "-std=c++11 --gcc-toolchain=${LIBCXX_GCC_TOOLCHAIN}")
+    set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} --gcc-toolchain=${LIBCXX_GCC_TOOLCHAIN}")
   endif()
   check_cxx_source_compiles("
 #include <cstdint>


add thirdparty directory to CMAKE_REFIX_PATH only if THIRDPARTY option is specified

--- cmake/common/eprosima_libraries.cmake
+++ cmake/common/eprosima_libraries.cmake
@@ -85,10 +85,10 @@
             else()
                 message(FATAL_ERROR "Cannot configure Git submodule ${package}")
             endif()
+            set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${PROJECT_SOURCE_DIR}/thirdparty/${thirdparty_name})
+            set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${PROJECT_SOURCE_DIR}/thirdparty/${thirdparty_name}/${thirdparty_name})
         endif()

-        set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${PROJECT_SOURCE_DIR}/thirdparty/${thirdparty_name})
-        set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${PROJECT_SOURCE_DIR}/thirdparty/${thirdparty_name}/${thirdparty_name})
         find_package(${package} REQUIRED QUIET)

     endif()