build: remove `DEPLOYMENT_VERSION_*` from `_add_swift_host_library_single`

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -714,10 +714,6 @@
         STATIC)
   set(SWIFTLIB_SINGLE_single_parameter_options
         ARCHITECTURE
-        DEPLOYMENT_VERSION_IOS
-        DEPLOYMENT_VERSION_OSX
-        DEPLOYMENT_VERSION_TVOS
-        DEPLOYMENT_VERSION_WATCHOS
         INSTALL_IN_COMPONENT
         DARWIN_INSTALL_NAME_DIR
         SDK)
@@ -966,10 +962,6 @@
     ENABLE_ASSERTIONS "${enable_assertions}"
     ANALYZE_CODE_COVERAGE "${analyze_code_coverage}"
     ENABLE_LTO "${lto_type}"
-    DEPLOYMENT_VERSION_OSX "${SWIFTLIB_DEPLOYMENT_VERSION_OSX}"
-    DEPLOYMENT_VERSION_IOS "${SWIFTLIB_DEPLOYMENT_VERSION_IOS}"
-    DEPLOYMENT_VERSION_TVOS "${SWIFTLIB_DEPLOYMENT_VERSION_TVOS}"
-    DEPLOYMENT_VERSION_WATCHOS "${SWIFTLIB_DEPLOYMENT_VERSION_WATCHOS}"
     RESULT_VAR_NAME c_compile_flags
     )

@@ -986,10 +978,6 @@
     ANALYZE_CODE_COVERAGE "${analyze_code_coverage}"
     ENABLE_LTO "${lto_type}"
     LTO_OBJECT_NAME "${target}-${SWIFTLIB_SINGLE_SDK}-${SWIFTLIB_SINGLE_ARCHITECTURE}"
-    DEPLOYMENT_VERSION_OSX "${SWIFTLIB_DEPLOYMENT_VERSION_OSX}"
-    DEPLOYMENT_VERSION_IOS "${SWIFTLIB_DEPLOYMENT_VERSION_IOS}"
-    DEPLOYMENT_VERSION_TVOS "${SWIFTLIB_DEPLOYMENT_VERSION_TVOS}"
-    DEPLOYMENT_VERSION_WATCHOS "${SWIFTLIB_DEPLOYMENT_VERSION_WATCHOS}"
     RESULT_VAR_NAME link_flags
     LIBRARY_SEARCH_DIRECTORIES_VAR_NAME library_search_directories
       )


CMake: simplify passing swift driver parameters

Swift SVN r24440

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -184,8 +184,7 @@
   endif()

   if(enable_assertions)
-    list(APPEND result
-        "-Xfrontend" "-D" "-Xfrontend" "INTERNAL_CHECKS_ENABLED")
+    list(APPEND result "-D" "INTERNAL_CHECKS_ENABLED")
   endif()

   set("${result_var_name}" "${result}" PARENT_SCOPE)


[FIX] some build issues on FreeBSD

[FIX] some build issues on FreeBSD

--- util/cmake/FindSeqAn.cmake
+++ util/cmake/FindSeqAn.cmake
@@ -277,6 +277,7 @@
   set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} rt pthread)
 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
   set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} pthread)
+  set (SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} "-D_GLIBCXX_USE_C99=1")
 endif ()

 # libexecinfo -- implicit


Fix copy & paste error

Fix copy & paste error

--- CMake/mitkInstallRules.cmake
+++ CMake/mitkInstallRules.cmake
@@ -167,7 +167,7 @@
       install(FILES "${_qmake_path}/../plugins/iconengines/libqsvgicon.so"
               DESTINATION "bin/plugins/iconengines")
       install(FILES "${_qmake_path}/../plugins/xcbglintegrations/libqxcb-glx-integration.so"
-              DESTINATION "bin/plugins/iconengines")
+              DESTINATION "bin/plugins/xcbglintegrations")

       if(MITK_USE_Qt5_WebEngine)
         MITK_INSTALL_HELPER_APP( EXECUTABLES "${_qmake_path}/../libexec/QtWebEngineProcess")


Glob all "plug-ins" in the install tree.

This includes auto-load modules which are also explicitly installed
since no one has a link-time dependency on them.

--- CMake/mitkMacroInstall.cmake
+++ CMake/mitkMacroInstall.cmake
@@ -36,6 +36,14 @@
 macro(_fixup_target)

   install(CODE "
+
+    set(_bundle_dest_dir \"${_bundle_dest_dir}\")
+    if(_bundle_dest_dir)
+      set(_bin_path \"\${CMAKE_INSTALL_PREFIX}/\${_bundle_dest_dir}\")
+    else()
+      set(_bin_path \"\${CMAKE_INSTALL_PREFIX}/bin\")
+    endif()
+
     macro(gp_item_default_embedded_path_override item default_embedded_path_var)
       get_filename_component(_item_name \"\${item}\" NAME)
       get_filename_component(_item_path \"\${item}\" PATH)
@@ -53,12 +61,7 @@
         get_filename_component(_item_path \"\${full_path}\" PATH)
       endif()

-      set(_bundle_dest_dir \"${_bundle_dest_dir}\")
-      if(_bundle_dest_dir)
-        set(_plugins_path \"\${CMAKE_INSTALL_PREFIX}/\${_bundle_dest_dir}/plugins\")
-      else()
-        set(_plugins_path \"\${CMAKE_INSTALL_PREFIX}/bin/plugins\")
-      endif()
+      set(_plugins_path \"\${_bin_path}/plugins\")

       if(_item_path STREQUAL _plugins_path
          OR (_item_path MATCHES \"\${_plugins_path}/\" AND _item_name MATCHES \"liborg\") # this is for legacy BlueBerry bundle support
@@ -101,18 +104,29 @@
     endif()

     if(\"${_install_GLOB_PLUGINS}\" STREQUAL \"TRUE\")
-      # When installing multiple applications, this will find *all* already installed
-      # and pulled in libraries (except on MacOS). We don't care...
-      file(GLOB_RECURSE GLOBBED_PLUGINS
-        \"\${CMAKE_INSTALL_PREFIX}/${_bundle_dest_dir}/lib*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
+      set(GLOBBED_PLUGINS )
+      set(_bb_osgi_lib \"\${_bin_path}/liborg_blueberry_osgi${CMAKE_SHARED_LIBRARY_SUFFIX}\")
+      if(EXISTS \"\${_bb_osgi_lib}\")
+        list(APPEND GLOBBED_PLUGINS \"\${_bb_osgi_lib}\")
+      endif()
+
+      # Iterate over all sub-directories which contain plug-ins
+      # (BlueBerry plug-ins, Qt plug-ins, and auto-load modules)
+      file(GLOB _children \"\${_bin_path}/*\")
+      foreach(_child \${_children})
+        if(IS_DIRECTORY \${_child})
+          file(GLOB_RECURSE _plugins \"\${_child}/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
+          if(_plugins)
+            list(APPEND GLOBBED_PLUGINS \${_plugins})
+          endif()
+        endif()
+      endforeach()
     endif()

-    set(_qt_plugin_glob_expressions \"\${CMAKE_INSTALL_PREFIX}/${${_target_location}_qt_plugins_install_dir}/plugins/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
+    set(GLOBBED_QT_PLUGINS )
     if(CMAKE_SHARED_MODULE_SUFFIX AND NOT CMAKE_SHARED_MODULE_SUFFIX STREQUAL CMAKE_SHARED_LIBRARY_SUFFIX)
-      list(APPEND _qt_plugin_glob_expressions \"\${CMAKE_INSTALL_PREFIX}/${${_target_location}_qt_plugins_install_dir}/plugins/*${CMAKE_SHARED_MODULE_SUFFIX}\")
+      file(GLOB_RECURSE GLOBBED_QT_PLUGINS \"\${CMAKE_INSTALL_PREFIX}/${${_target_location}_qt_plugins_install_dir}/plugins/*${CMAKE_SHARED_MODULE_SUFFIX}\")
     endif()
-
-    file(GLOB_RECURSE GLOBBED_QT_PLUGINS ${_qt_plugin_glob_expressions})

     set(PLUGINS )
     foreach(_plugin ${_install_PLUGINS} \${GLOBBED_QT_PLUGINS} \${GLOBBED_PLUGINS})


Add https as back up URL for midas test data downloads

Change-Id: Ib240d6e8ece28853a667a02eceebed4000b6393d

--- CMake/sitkExternalData.cmake
+++ CMake/sitkExternalData.cmake
@@ -36,6 +36,7 @@
 list(APPEND ExternalData_URL_TEMPLATES
   # Data published by MIDAS
   "http://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"
+  "https://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"

   # Data published by developers using git-gerrit-push.
   "http://www.itk.org/files/ExternalData/%(algo)/%(hash)"


Fixing install rules generation

Fixing install rules generation

--- Resources/CMake/CMakeMacros.cmake
+++ Resources/CMake/CMakeMacros.cmake
@@ -241,7 +241,7 @@
                         NAMES ${lib_name}.dll
                         PATHS  ${lib_path}/../bin ${lib_path}/.. ${lib_path}/
                         NO_DEFAULT_PATH )
-          message(STATUS "${upperlib}_LIBRARY_DLL_${TYPE}: ${${upperlib}_LIBRARY_DLL_${TYPE}}")
+         # message(STATUS "${upperlib}_LIBRARY_DLL_${TYPE}: ${${upperlib}_LIBRARY_DLL_${TYPE}}")

           if ( ${${upperlib}_LIBRARY_DLL_${TYPE}} STREQUAL  "${upperlib}_LIBRARY_DLL_${TYPE}-NOTFOUND")
             message(FATAL_ERROR "According to how ${upperlib}_LIBRARY_${TYPE} was found the library should"
@@ -282,19 +282,20 @@
           get_filename_component(lib_path ${${upperlib}_LIBRARY_${TYPE}} PATH)
           get_filename_component(lib_name ${${upperlib}_LIBRARY_${TYPE}} NAME_WE)

-          find_path(${upperlib}_LIBRARY_DLL_${TYPE}
-                NAMES ${lib_name}.dll
-                PATHS ${lib_path}/ ${lib_path}/../bin ${lib_path}/..
-                NO_DEFAULT_PATH )
+          find_file(${upperlib}_LIBRARY_DLL_${TYPE}
+                        NAMES ${lib_name}.dll
+                        PATHS  ${lib_path}/../bin ${lib_path}/.. ${lib_path}/
+                        NO_DEFAULT_PATH )
+         # message(STATUS "${upperlib}_LIBRARY_DLL_${TYPE}: ${${upperlib}_LIBRARY_DLL_${TYPE}}")

           if ( ${${upperlib}_LIBRARY_DLL_${TYPE}} STREQUAL  "${upperlib}_LIBRARY_DLL_${TYPE}-NOTFOUND")
-           # message(STATUS "A Companion DLL for ${upperlib}_LIBRARY_${TYPE} was NOT found which usually means"
-           #                     " that the library was NOT built as a DLL. I looked in the "
-           #                     " following locations:  ${lib_path}\n  ${lib_path}/..\n  ${lib_path}/../bin")
+            # message(STATUS "A Companion DLL for ${upperlib}_LIBRARY_${TYPE} was NOT found which usually means"
+            #                    " that the library was NOT built as a DLL. I looked in the "
+            #                    " following locations:  ${lib_path}\n  ${lib_path}/..\n  ${lib_path}/../bin")
           else()
-              set(${upperlib}_LIBRARY_DLL_${TYPE}  ${${upperlib}_LIBRARY_DLL_${TYPE}}/${lib_name}.dll)
+             # set(${upperlib}_LIBRARY_DLL_${TYPE}  ${${upperlib}_LIBRARY_DLL_${TYPE}}/${lib_name}.dll)
              # message(STATUS "${upperlib}_LIBRARY_DLL_${TYPE}: ${${upperlib}_LIBRARY_DLL_${TYPE}}")
-             # message(STATUS "Generating Install Rule for ${btype} Version of ${upperlib}_LIBRARY_${TYPE}")
+              message(STATUS "Generating Install Rule for DLL File for ${upperlib}_LIBRARY_${TYPE}")
               INSTALL(FILES ${${upperlib}_LIBRARY_DLL_${TYPE}}
                 DESTINATION ${destination}
                 CONFIGURATIONS ${BTYPE}


[CMake] Find old pyside2 uic and rcc when they are named pyuic5 and pyrcc5

Found that on ubuntu 20.04 where QT is still at 5.12, these are called pyuic5 and pyrcc5 now and cmake will not find these and then the build fails without this change

--- cMake/FindPySide2Tools.cmake
+++ cMake/FindPySide2Tools.cmake
@@ -27,8 +27,8 @@

 IF(Qt5Core_VERSION VERSION_LESS 5.14)
   # Legacy (< 5.14)
-  FIND_PROGRAM(PYSIDE2UICBINARY NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
-  FIND_PROGRAM(PYSIDE2RCCBINARY NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR})
+  FIND_PROGRAM(PYSIDE2UICBINARY NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} pyuic5 HINTS ${PYSIDE_BIN_DIR})
+  FIND_PROGRAM(PYSIDE2RCCBINARY NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} pyrcc5 HINTS ${PYSIDE_BIN_DIR})
   set(UICOPTIONS "")
   set(RCCOPTIONS "")
 ELSE(Qt5Core_VERSION VERSION_LESS 5.14)


Follow-up for r264162 to fix the CMake build (update LLDBDependencies.cmake).

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@264168 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/LLDBDependencies.cmake
+++ cmake/LLDBDependencies.cmake
@@ -75,6 +75,7 @@
   lldbPluginOSPython
   lldbPluginMemoryHistoryASan
   lldbPluginInstrumentationRuntimeAddressSanitizer
+  lldbPluginInstrumentationRuntimeThreadSanitizer
   lldbPluginSystemRuntimeMacOSX
   lldbPluginProcessElfCore
   lldbPluginJITLoaderGDB


build: use C++14 for Windows builds

build: use C++14 for Windows builds

The Windows SDK headers require C++14 or newer features.  Visual Studio
is lax in enabling these features unlike clang.  Explicitly upgrade to
the higher standard for the Windows cross-compilation.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -856,6 +856,9 @@
   if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "WINDOWS")
     swift_windows_include_for_arch(${SWIFTLIB_SINGLE_ARCHITECTURE} SWIFTLIB_INCLUDE)
     target_include_directories("${target}" SYSTEM PRIVATE ${SWIFTLIB_INCLUDE})
+    set_target_properties(${target}
+                          PROPERTIES
+                            CXX_STANDARD 14)
   endif()

   if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "WINDOWS" AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")


Missed when merging

Missed when merging

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -229,7 +229,7 @@
     list(APPEND result "-lpthread")
   elseif("${LFLAGS_SDK}" STREQUAL "CYGWIN")
     # NO extra libraries required.
-  elseif("${sdk}" STREQUAL "WINDOWS")
+  elseif("${LFLAGS_SDK}" STREQUAL "WINDOWS")
     # No extra libraries required.
   else()
     list(APPEND result "-lobjc")


Pull libswiftStdlibStubs.a, libswiftRuntime.a into libswiftCore.a

libswiftStdlibStubs.a is meant to be an intermediate built product
that's pulled into libswiftCore.a, not its own thing. Add a post-build
step for libswiftCore.a to pull all the object files into it from
libswiftStdlibStubs.a.

<rdar://problem/23621157>

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -615,6 +615,22 @@
   endif()
 endfunction()

+# After target 'dst_target' is built from its own object files, merge the
+# contents of 'src_target' into it. 'dst_target' and 'src_target' must be
+# static-library targets.
+function(_target_merge_static_library dst_target src_target)
+  add_dependencies("${dst_target}" "${src_target}")
+  set(unpack_dir "${CMAKE_BINARY_DIR}/tmp/unpack/${dst_target}")
+  add_custom_command(TARGET "${dst_target}" POST_BUILD
+    COMMAND "${CMAKE_COMMAND}" -E make_directory "${unpack_dir}"
+    COMMAND pushd "${unpack_dir}"
+    COMMAND "${CMAKE_AR}" -x "$<TARGET_FILE:${src_target}>"
+    COMMAND "${CMAKE_AR}" -r "$<TARGET_FILE:${dst_target}>" ./*.o
+    COMMAND popd
+    COMMAND "${CMAKE_COMMAND}" -E remove_directory "${unpack_dir}"
+  )
+endfunction()
+
 # Add a single variant of a new Swift library.
 #
 # Usage:
@@ -1107,6 +1123,15 @@
       LINK_FLAGS " ${link_flags} -L${SWIFTSTATICLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR} -L${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/../lib/swift/${SWIFTLIB_SINGLE_SUBDIR} -L${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/../lib/swift/${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_LIB_SUBDIR}")
     target_link_libraries("${target_static}" PRIVATE
         ${SWIFTLIB_SINGLE_PRIVATE_LINK_LIBRARIES})
+
+    if("${name}" STREQUAL "swiftCore")
+      # Have libswiftCore.a include the contents of the private libraries it
+      # depends on, so statically linking clients don't have to know about
+      # them.
+      foreach(private_link_library ${SWIFTLIB_SINGLE_PRIVATE_LINK_LIBRARIES})
+        _target_merge_static_library("${target_static}" "${private_link_library}")
+      endforeach()
+    endif()
   endif()

   # Do not add code here.


toolchains: fix multilib libc linking with xtools

Fixed linking with multilib toolchains by adjust the path to sysroot.

Signed-off-by: Anas Nashif <0d9952ec84ac43c159f6b7e7ed99a9080c00dd6e@intel.com>

--- cmake/toolchain/xtools.cmake
+++ cmake/toolchain/xtools.cmake
@@ -25,4 +25,4 @@
 set(SYSROOT_TARGET           ${CROSS_COMPILE_TARGET})

 set(CROSS_COMPILE ${TOOLCHAIN_HOME}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-)
-set(SYSROOT_DIR   ${TOOLCHAIN_HOME}/${SYSROOT_TARGET})
+set(SYSROOT_DIR   ${TOOLCHAIN_HOME}/${SYSROOT_TARGET}/${SYSROOT_TARGET})


Use HDF4_ROOT env variable as path hint

Use HDF4_ROOT env variable as path hint

--- cmake_include/FindHDF4.cmake
+++ cmake_include/FindHDF4.cmake
@@ -27,12 +27,12 @@

 set(HDF4_LIBRARIES df mfhdf)

-find_library(HDF4_LIBRARIES NAMES df mfhdf PATH_SUFFIXES hdf)
+find_library(HDF4_LIBRARIES NAMES df mfhdf HINTS ENV HDF4_ROOT PATH_SUFFIXES hdf)

-find_library(_HDF4_DF_LIBRARY NAMES df PATH_SUFFIXES hdf)
+find_library(_HDF4_DF_LIBRARY NAMES df hdf HINTS ENV HDF4_ROOT PATH_SUFFIXES hdf)
 get_filename_component(HDF4_LIBRARY_DIRS ${_HDF4_DF_LIBRARY} PATH)

-find_path ( HDF4_INCLUDE_DIR mfhdf.h PATH /usr/include /usr/include/hdf)
+find_path ( HDF4_INCLUDE_DIR mfhdf.h PATH /usr/include /usr/include/hdf HINTS ENV HDF4_ROOT)

 include ( FindPackageHandleStandardArgs )
 find_package_handle_standard_args( HDF4 DEFAULT_MSG HDF4_LIBRARIES HDF4_INCLUDE_DIR )
@@ -51,6 +51,6 @@
 #------------------------------------------------------------------------------
 # add libraries to the link list for NAPI
 #------------------------------------------------------------------------------
-list(APPEND NAPI_LINK_LIBS  df mfhdf jpeg)
+list(APPEND NAPI_LINK_LIBS  ${_HDF4_DF_LIBRARY} mfhdf jpeg)
 include_directories ( SYSTEM ${HDF4_INCLUDE_DIR} )
 link_directories(${HDF4_LIBRARY_DIRS})


Rearrange lighTest.cmake

Rearrange lighTest.cmake

--- lighTest.cmake
+++ lighTest.cmake
@@ -1,3 +1,11 @@
+function(add_lightests)
+  foreach(LIGHTEST ${ARGN})
+    file(RELATIVE_PATH LIGHTEST_PATH ${CMAKE_SOURCE_DIR}/test ${CMAKE_CURRENT_SOURCE_DIR}/${LIGHTEST})
+    list(APPEND LIGHTESTS ${LIGHTEST_PATH})
+  endforeach()
+  set_property(GLOBAL APPEND PROPERTY LIGHTESTS_PROPERTY ${LIGHTESTS})
+endfunction()
+
 enable_testing()
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)

@@ -12,11 +20,3 @@
     add_test(${LIGHTEST} ${LIGHTEST_ID})
   endforeach()
 endfunction()
-
-function(add_lightests)
-  foreach(LIGHTEST ${ARGN})
-    file(RELATIVE_PATH LIGHTEST_PATH ${CMAKE_SOURCE_DIR}/test ${CMAKE_CURRENT_SOURCE_DIR}/${LIGHTEST})
-    list(APPEND LIGHTESTS ${LIGHTEST_PATH})
-  endforeach()
-  set_property(GLOBAL APPEND PROPERTY LIGHTESTS_PROPERTY ${LIGHTESTS})
-endfunction()


added copy command so that libs can be loaded by numpy

--- numpy_eigen/cmake/add_python_export_library.cmake
+++ numpy_eigen/cmake/add_python_export_library.cmake
@@ -71,7 +71,7 @@
   set(PYTHON_LIB_DIR ${CATKIN_DEVEL_PREFIX}/${PROJECT_NAME}/lib/python2.7/dist-packages)
   add_custom_command(TARGET ${TARGET_NAME}
     POST_BUILD
-    COMMAND cp -v ${PYLIB_OUTPUT_FILE} ${PYTHON_LIB_DIR}/${PYLIB_SO_NAME}
+    COMMAND mdir -p ${PYTHON_LIB_DIR} && cp -v ${PYLIB_OUTPUT_FILE} ${PYTHON_LIB_DIR}/${PYLIB_SO_NAME}
     WORKING_DIRECTORY ${CATKIN_DEVEL_PREFIX}
     COMMENT "Copying library files to python directory" )


[update]

[update]

--- mk/linux.cmake
+++ mk/linux.cmake
@@ -6,7 +6,7 @@
     INCLUDE_DIRECTORIES(/usr/local/include
         ${PROJECT_SOURCE_DIR}/src/include)

-    SET(ExternalLibs ${ExternalLibs} pthread)
+    SET(ExternalLibs ${ExternalLibs} pthread m)

     set (EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin/linux)
     set (LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib/linux)


Suppress warning #1394-D: field of class type without a DLL interface used in a class with a DLL interface from windows CUDA builds.

--- cmake/OpenCVDetectCUDA.cmake
+++ cmake/OpenCVDetectCUDA.cmake
@@ -421,6 +421,10 @@
       set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcompiler -fno-finite-math-only)
     endif()

+    if(WIN32)
+      set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcudafe --display_error_number --diag-suppress 1394,1388)
+    endif()
+
     if(CMAKE_CROSSCOMPILING AND (ARM OR AARCH64))
       set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xlinker --unresolved-symbols=ignore-in-shared-libs)
     endif()


Support WITH_CUDA with clang compiler.

Support WITH_CUDA with clang compiler.

--- cmake/OpenCVDetectCUDA.cmake
+++ cmake/OpenCVDetectCUDA.cmake
@@ -3,7 +3,7 @@
   return()
 endif()

-if(NOT APPLE AND CV_CLANG)
+if(NOT UNIX AND CV_CLANG)
   message(STATUS "CUDA compilation is disabled (due to Clang unsupported on your platform).")
   return()
 endif()
@@ -188,6 +188,13 @@
     foreach(var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG)
       set(${var}_backup_in_cuda_compile_ "${${var}}")

+      if (CV_CLANG)
+        # we remove -Winconsistent-missing-override and -Qunused-arguments
+        # just in case we are compiling CUDA with gcc but OpenCV with clang
+        string(REPLACE "-Winconsistent-missing-override" "" ${var} "${${var}}")
+        string(REPLACE "-Qunused-arguments" "" ${var} "${${var}}")
+      endif()
+
       # we remove /EHa as it generates warnings under windows
       string(REPLACE "/EHa" "" ${var} "${${var}}")


Bug-fix for the scm test runner.

Bug-fix for the scm test runner.

The test runner fails, if the guile module path is not specified
in some way. Specify the install path.

--- cmake/OpenCogFunctions.cmake
+++ cmake/OpenCogFunctions.cmake
@@ -144,7 +144,9 @@
                 ${CMAKE_CURRENT_SOURCE_DIR})
         ENDIF()

-        ADD_TEST(${TEST_NAME} guile --use-srfi=64 ${FILE_PATH}
+        ADD_TEST(${TEST_NAME} guile --use-srfi=64
+            -L ${DATADIR}/scm
+            ${FILE_PATH}
             WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

     ENDIF()


OSX: we must use -fpic in libluxrays for it is linked into dynamic shared library later, also debug also with sse

--- cmake/PlatformSpecific.cmake
+++ cmake/PlatformSpecific.cmake
@@ -157,8 +157,8 @@
 		SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE} CACHE PATH "per configuration" FORCE)
 	endif()
 	#### OSX-flags by jensverwiebe
-	set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3 -ftree-vectorize -msse -msse2 -msse3 -mssse3 -fvariable-expansion-in-unroller")
-	set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
+	set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -fPIC -O3 -ftree-vectorize -msse -msse2 -msse3 -mssse3 -fvariable-expansion-in-unroller")
+	set(CMAKE_CXX_FLAGS_DEBUG "-fPIC -O0 -g -msse -msse2 -msse3 -mssse3")

 	# Do not set "-cl-fast-relaxed-math -cl-mad-enable" as they change the precision and behaviour of floating point math!


try /dev/stdout instead of /dev/tty

try /dev/stdout instead of /dev/tty

--- cmake/clang-cpp-checks.cmake
+++ cmake/clang-cpp-checks.cmake
@@ -11,7 +11,8 @@
 IF(CLANG_FORMAT)
     ADD_CUSTOM_TARGET(
         format
-        COMMAND ${CLANG_FORMAT}
+        COMMAND
+        ${CLANG_FORMAT}
         -i
         -style=file
         ${CHECK_CXX_SOURCE_FILES}
@@ -60,7 +61,7 @@
             check-lint COMMAND !
             ${RUN_CLANG_TIDY} -header-filter=${CMAKE_SOURCE_DIR}
             # WARNING: fix to stop with error if there are problems
-            | tee /dev/tty | grep -c ": error: " > /dev/null
+            | tee /dev/stdout | grep -c ": error: " > /dev/null
             COMMENT "Checking for problems in source files"
         )
     ENDIF()


build: remove `DARWIN_INSTALL_NAME_DIR` from `_add_swift_host_library_single`

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -715,7 +715,6 @@
   set(SWIFTLIB_SINGLE_single_parameter_options
         ARCHITECTURE
         INSTALL_IN_COMPONENT
-        DARWIN_INSTALL_NAME_DIR
         SDK)
   set(SWIFTLIB_SINGLE_multiple_parameter_options
         GYB_SOURCES
@@ -882,10 +881,6 @@
     # Always use @rpath for XCTest
     if(module_name STREQUAL "XCTest")
       set(install_name_dir "@rpath")
-    endif()
-
-    if(SWIFTLIB_SINGLE_DARWIN_INSTALL_NAME_DIR)
-      set(install_name_dir "${SWIFTLIB_SINGLE_DARWIN_INSTALL_NAME_DIR}")
     endif()

     set_target_properties("${target}"


Revert "Most swift targets should depend on SwiftOnoneSupport, except Core and SwiftOnoneSupport"

This reverts commit a374d1b0fa06d0ccd2d18a904379b8ac73ce8362.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1344,18 +1344,13 @@
   # All Swift code depends on the standard library, except for the standard
   # library itself.
   if(SWIFTLIB_TARGET_LIBRARY AND NOT SWIFTLIB_IS_STDLIB_CORE)
-    list(APPEND SWIFTLIB_SWIFT_MODULE_DEPENDS Core SwiftOnoneSupport)
-  endif()
-
-  if("${name}" STREQUAL "swiftSwiftOnoneSupport")
-    list(REMOVE_ITEM SWIFTLIB_SWIFT_MODULE_DEPENDS
-      SwiftOnoneSupport)
+    list(APPEND SWIFTLIB_SWIFT_MODULE_DEPENDS Core)
   endif()

   if((NOT "${SWIFT_BUILD_STDLIB}") AND
      (NOT "${SWIFTLIB_SWIFT_MODULE_DEPENDS}" STREQUAL ""))
     list(REMOVE_ITEM SWIFTLIB_SWIFT_MODULE_DEPENDS
-      Core SwiftOnoneSupport)
+        Core)
   endif()

   translate_flags(SWIFTLIB "${SWIFTLIB_options}")


build: simplify `INSTALL_NAME_DIR` computation in `_add_swift_host_library_single`

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -821,16 +821,9 @@
       LIBRARY_DIR ${SWIFT_LIBRARY_OUTPUT_INTDIR})

   if(SWIFTLIB_SINGLE_SDK IN_LIST SWIFT_APPLE_PLATFORMS)
-    set(install_name_dir "@rpath")
-
-    # Always use @rpath for XCTest
-    if(module_name STREQUAL "XCTest")
-      set(install_name_dir "@rpath")
-    endif()
-
     set_target_properties("${target}"
       PROPERTIES
-      INSTALL_NAME_DIR "${install_name_dir}")
+      INSTALL_NAME_DIR "@rpath")
   elseif("${SWIFTLIB_SINGLE_SDK}" STREQUAL "LINUX")
     set_target_properties("${target}"
       PROPERTIES


Align FindGFAL.cmake with master

Align FindGFAL.cmake with master

--- cmake/modules/FindGFAL.cmake
+++ cmake/modules/FindGFAL.cmake
@@ -6,11 +6,9 @@
 #  GFAL_INCLUDE_DIRS (not cached)
 #  GFAL_LIBRARIES

-find_path(GFAL_INCLUDE_DIR NAMES gfal_api.h
-    HINTS ${GFAL_DIR}/include $ENV{GFAL_DIR}/include
-    PATH_SUFFIXES gfal2)
-find_library(GFAL_LIBRARIES NAMES gfal gfal2 HINTS ${GFAL_DIR}/lib64 $ENV{GFAL_DIR}/lib64)
-find_path(SRM_IFCE_INCLUDE_DIR  gfal_srm_ifce_types.h HINTS ${SRM_IFCE_DIR}/include $ENV{SRM_IFCE_DIR}/include)
+find_path(GFAL_INCLUDE_DIR NAMES gfal_api.h HINTS ${GFAL_DIR}/include $ENV{GFAL_DIR}/include)
+find_library(GFAL_LIBRARIES NAMES gfal gfal2 HINTS ${GFAL_DIR}/lib $ENV{GFAL_DIR}/lib)
+find_path(SRM_IFCE_INCLUDE_DIR  gfal_srm_ifce_types.h HINTS ${SRM_IFCE_DIR}/include $ENV{SRM_IFCE_DIR}/include)

 set(GFAL_INCLUDE_DIRS ${GFAL_INCLUDE_DIR} ${SRM_IFCE_INCLUDE_DIR})


FindNodejs: Updated to find node<version>

Updates to the FindNodejs.cmake module to find newer installs of nodejs
across other distros.  For example openSUSE: /usr/include/node6/node.h

    * Added PATH_SUFFIX to find_path for node.h.
    * Standardized usage of message() (added STATUS)
    * Call find_package_handle_standard_args with version
    * Reformatted to look uniform.

Signed-off-by: Noel Eck <1e36ab6ededef40f3f16bdbc1b09eee72c5d08cf@intel.com>

--- cmake/modules/FindNode.cmake
+++ cmake/modules/FindNode.cmake
@@ -1,69 +1,66 @@
- # Macro to add directory to NODEJS_INCLUDE_DIRS if it exists and is not /usr/include
- macro(add_include_dir dir)
+# Macro to add directory to NODEJS_INCLUDE_DIRS if it exists and is not /usr/include
+macro(add_include_dir dir)
     if (IS_DIRECTORY ${dir} AND NOT ${dir} STREQUAL "/usr/include")
-      set(NODEJS_INCLUDE_DIRS ${NODEJS_INCLUDE_DIRS} ${dir})
+        set(NODEJS_INCLUDE_DIRS ${NODEJS_INCLUDE_DIRS} ${dir})
     endif()
 endmacro()
-

 find_program (NODEJS_EXECUTABLE NAMES node nodejs
     HINTS
     $ENV{NODE_DIR}
     PATH_SUFFIXES bin
-    DOC "Node.js interpreter"
-)
+    DOC "Node.js interpreter")

 include (FindPackageHandleStandardArgs)

 # If compat-libuv package exists, it must be at start of include path
 find_path (UV_ROOT_DIR "uv.h" PATHS /usr/include/compat-libuv010 NO_DEFAULT_PATH)
 if (UV_ROOT_DIR)
-  # set (NODEJS_INCLUDE_DIRS ${UV_ROOT_DIR})
-  add_include_dir(${UV_ROOT_DIR})
+    # set (NODEJS_INCLUDE_DIRS ${UV_ROOT_DIR})
+    add_include_dir(${UV_ROOT_DIR})
 endif()

 # Now look for node. Flag an error if not found
-find_path (NODE_ROOT_DIR "include/node/node.h" "include/src/node.h" "src/node.h"
-  PATHS /usr/include/nodejs /usr/local/include/nodejs /usr/local/include)
+find_path (NODE_ROOT_DIR
+    NAMES node.h
+    PATH_SUFFIXES node node4 node5 node6 node7 node8 nodejs
+    PATHS /usr/include /usr/local/include)
+
 if (NODE_ROOT_DIR)
-  add_include_dir(${NODE_ROOT_DIR}/include/src)
-  add_include_dir(${NODE_ROOT_DIR}/src)
-  add_include_dir(${NODE_ROOT_DIR}/include/node)
-  add_include_dir(${NODE_ROOT_DIR}/include/deps/v8/include)
-  add_include_dir(${NODE_ROOT_DIR}/deps/v8/include)
-  add_include_dir(${NODE_ROOT_DIR}/include/deps/uv/include)
-  add_include_dir(${NODE_ROOT_DIR}/deps/uv/include)
+    add_include_dir(${NODE_ROOT_DIR})
+    add_include_dir(${NODE_ROOT_DIR}/deps/uv/include)
+    add_include_dir(${NODE_ROOT_DIR}/deps/v8/include)
+    add_include_dir(${NODE_ROOT_DIR}/include/deps/uv/include)
+    add_include_dir(${NODE_ROOT_DIR}/include/deps/v8/include)
+    add_include_dir(${NODE_ROOT_DIR}/include/node)
+    add_include_dir(${NODE_ROOT_DIR}/include/src)
+    add_include_dir(${NODE_ROOT_DIR}/src)
 else()
-  unset(NODEJS_INCLUDE_DIRS)
-  message(ERROR " - node.h not found")
+    unset(NODEJS_INCLUDE_DIRS)
+    message(ERROR " - node.h not found")
 endif()

 # Check that v8.h is in NODEJS_INCLUDE_DIRS
 find_path (V8_ROOT_DIR "v8.h" PATHS ${NODEJS_INCLUDE_DIRS})
 if (NOT V8_ROOT_DIR)
-  unset(NODEJS_INCLUDE_DIRS)
-  message(ERROR " - v8.h not found")
+    unset(NODEJS_INCLUDE_DIRS)
+    message(ERROR " - v8.h not found")
 endif()

 # Check that uv.h is in NODEJS_INCLUDE_DIRS
 find_path (UV_ROOT_DIR "uv.h" PATHS ${NODEJS_INCLUDE_DIRS})
 if (NOT UV_ROOT_DIR)
-  unset(NODEJS_INCLUDE_DIRS)
-  message(ERROR " - uv.h not found")
+    unset(NODEJS_INCLUDE_DIRS)
+    message(ERROR " - uv.h not found")
 endif()
-
-find_package_handle_standard_args (Nodejs DEFAULT_MSG
-    NODEJS_EXECUTABLE
-    NODEJS_INCLUDE_DIRS
-)

 if (NODEJS_EXECUTABLE)
     execute_process(COMMAND ${NODEJS_EXECUTABLE} --version
-                    OUTPUT_VARIABLE _VERSION
-                    RESULT_VARIABLE _NODE_VERSION_RESULT)
+        OUTPUT_VARIABLE _VERSION
+        RESULT_VARIABLE _NODE_VERSION_RESULT)
     execute_process(COMMAND ${NODEJS_EXECUTABLE} -e "console.log(process.versions.v8)"
-                    OUTPUT_VARIABLE _V8_VERSION
-                    RESULT_VARIABLE _V8_RESULT)
+        OUTPUT_VARIABLE _V8_VERSION
+        RESULT_VARIABLE _V8_RESULT)
     if (NOT _NODE_VERSION_RESULT AND NOT _V8_RESULT)
         string (REPLACE "v" "" NODE_VERSION_STRING "${_VERSION}")
         string (REPLACE "." ";" _VERSION_LIST "${NODE_VERSION_STRING}")
@@ -88,13 +85,15 @@
         set (V8_VERSION_MINOR "28")
         set (V8_VERSION_PATCH "72")
         set (V8_VERSION_STRING "3.28.72")
-        message ("defaulted to node 0.10.30")
+        message (STATUS "defaulted to node 0.10.30")
     endif ()
     string (REGEX REPLACE "\n" "" NODE_VERSION_STRING ${NODE_VERSION_STRING})
     string (REGEX REPLACE "\n" "" V8_VERSION_STRING ${V8_VERSION_STRING})
-    message (STATUS "Node version is ${NODE_VERSION_STRING}")
-    message (STATUS "Node using v8 ${V8_VERSION_STRING}")
+
     mark_as_advanced (NODEJS_EXECUTABLE)
+
+    find_package_handle_standard_args (Nodejs
+        REQUIRED_VARS NODEJS_EXECUTABLE NODEJS_INCLUDE_DIRS
+        VERSION_VAR NODE_VERSION_STRING)
+    message(STATUS "Found v8: ${V8_ROOT_DIR}/v8.h (found version \"${V8_VERSION_STRING}\")")
 endif ()
-
-mark_as_advanced (NODEJS_EXECUTABLE)


Support detection of new header file path of ROSE edg4x branch

--- cmake/modules/FindROSE.cmake
+++ cmake/modules/FindROSE.cmake
@@ -2,7 +2,7 @@
 # ROSE_LIBRARIES
 # ROSE_FOUND = true if ROSE is found

-FIND_PATH(ROSE_INCLUDE_DIR rose.h NO_SYSTEM_ENVIRONMENT_PATH)
+FIND_PATH(ROSE_INCLUDE_DIR rose.h PATH_SUFFIXES rose NO_SYSTEM_ENVIRONMENT_PATH)
 FIND_LIBRARY(ROSE_LIBRARIES rose  NO_SYSTEM_ENVIRONMENT_PATH)
 FIND_LIBRARY(ROSE_LIBRARIES rose)


Remove btl

Remove btl

--- project.cmake
+++ project.cmake
@@ -35,7 +35,6 @@
         ${listDir}/groups/bbl
         ${listDir}/groups/bdl
         ${listDir}/groups/bsl
-        ${listDir}/groups/btl
     )

     bde_remove_recorded_overrides()


Adding test dependency.

Adding test dependency.

TestGenericClip.cxx test was failing due to unsatisfied dependency.
vtkIOXML module satisfied the requirement.

Change-Id: I065606280d7b42ff19cc146cf78a1e98f93334fa

--- Filters/Generic/module.cmake
+++ Filters/Generic/module.cmake
@@ -5,6 +5,7 @@
     vtkFiltersCore
     vtkFiltersSources
   TEST_DEPENDS
+    vtkIOXML
     vtkRenderingOpenGL
     vtkFiltersModeling
     vtkRenderingLabel


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -24,6 +24,7 @@
 Comment[ca]=Inicia un xat amb qualsevol dels vostres contactes de MI o canvia el vostre estat de MI
 Comment[cs]=Začít rozhovor s kterýmkoliv vaším kontaktem v IM nebo změnit stav na IM
 Comment[da]=Start chat med en af dine IM-kontakter eller skift din IM-status
+Comment[de]=Chats mit ihren Kontakten starten oder Ihren IM-Status ändern
 Comment[es]=Iniciar una conversación con cualquiera de sus contactos de MI o cambiar su estado de MI
 Comment[fi]=Aloita keskustelu muun pikaviestinkäyttäjän kanssa tai vaihda pikaviestintilaasi
 Comment[fr]=Démarre une discussion avec n'importe lequel de vos contacts de messagerie instantanée ou change l'état de celle-ci


Fix output file of CPM_NS_HEADER_FILE.

Fix output file of CPM_NS_HEADER_FILE.

--- CPM.cmake
+++ CPM.cmake
@@ -158,9 +158,9 @@

 # Delete old cpm header file.
 set(CPM_NS_HEADER_FILE "${CPM_DIR_OF_CPM}/include/cpm/cpm.h")
-file(REMOVE CPM_NS_HEADER_FILE)
-file(APPEND CPM_NS_HEADER_FILE "// This file was automatically generated by CPM.\n")
-file(APPEND CPM_NS_HEADER_FILE "// Do not modify it.\n\n")
+file(REMOVE ${CPM_NS_HEADER_FILE})
+file(APPEND ${CPM_NS_HEADER_FILE} "// This file was automatically generated by CPM.\n")
+file(APPEND ${CPM_NS_HEADER_FILE} "// It is used to include all relevant namespaces.\n")

 # Add the cpm include directory to our global variable.
 set(CPM_INCLUDE_DIRS "${CPM_DIR_OF_CPM}/include")


[SwiftSource.cmake] Include the line-directive tool and its input as dependencies of the custom command

--- stdlib/cmake/modules/SwiftSource.cmake
+++ stdlib/cmake/modules/SwiftSource.cmake
@@ -788,6 +788,8 @@
       ${command_touch_standard_outputs}
       OUTPUT ${standard_outputs}
       DEPENDS
+        "${line_directive_tool}"
+        "${file_path}"
         ${swift_compiler_tool_dep}
         ${source_files} ${SWIFTFILE_DEPENDS}
         ${swift_ide_test_dependency}
@@ -827,6 +829,8 @@
         ${command_touch_module_outputs}
         OUTPUT ${module_outputs}
         DEPENDS
+          "${line_directive_tool}"
+          "${file_path}"
           ${swift_compiler_tool_dep}
           ${source_files} ${SWIFTFILE_DEPENDS}
           ${swift_ide_test_dependency}
@@ -883,6 +887,8 @@
         OUTPUT
           ${maccatalyst_module_outputs}
         DEPENDS
+          "${line_directive_tool}"
+          "${file_path}"
           ${swift_compiler_tool_dep}
           ${source_files}
           ${SWIFTFILE_DEPENDS}
@@ -909,6 +915,8 @@
         ${command_touch_sib_outputs}
         OUTPUT ${sib_outputs}
         DEPENDS
+          "${line_directive_tool}"
+          "${file_path}"
           ${swift_compiler_tool_dep}
           ${source_files} ${SWIFTFILE_DEPENDS}
           ${create_dirs_dependency_target}
@@ -926,6 +934,8 @@
         ${command_touch_sibopt_outputs}
         OUTPUT ${sibopt_outputs}
         DEPENDS
+          "${line_directive_tool}"
+          "${file_path}"
           ${swift_compiler_tool_dep}
           ${source_files} ${SWIFTFILE_DEPENDS}
           ${create_dirs_dependency_target}
@@ -944,6 +954,8 @@
         ${command_touch_sibgen_outputs}
         OUTPUT ${sibgen_outputs}
         DEPENDS
+          "${line_directive_tool}"
+          "${file_path}"
           ${swift_compiler_tool_dep}
           ${source_files} ${SWIFTFILE_DEPENDS}
           ${create_dirs_dependency_target}


Turn off SQLITE_ENABLE_JSON1

Turn off SQLITE_ENABLE_JSON1

--- CMake/AddDependencies.cmake
+++ CMake/AddDependencies.cmake
@@ -1,13 +1,12 @@
 function(build_dependencies)
-	# Set options for SQLiteCpp, disable all their tests and lints:
-	set(SQLITECPP_BUILD_EXAMPLES       OFF CACHE BOOL "Build examples.")
-	set(SQLITECPP_BUILD_TESTS          OFF CACHE BOOL "Build and run tests.")
-	set(SQLITECPP_INTERNAL_SQLITE      ON  CACHE BOOL "Add the internal SQLite3 source to the project.")
+	# Set options for SQLiteCpp, disable all their lints and other features we don't need:
+	set(SQLITE_ENABLE_COLUMN_METADATA  OFF CACHE BOOL "Enable Column::getColumnOriginName(). Require support from sqlite3 library.")
+	set(SQLITE_ENABLE_JSON1            OFF CACHE BOOL "Enable JSON1 extension when building internal sqlite3 library.")
+	set(SQLITECPP_INCLUDE_SCRIPT       OFF CACHE BOOL "Include config & script files.")
 	set(SQLITECPP_RUN_CPPCHECK         OFF CACHE BOOL "Run cppcheck C++ static analysis tool.")
 	set(SQLITECPP_RUN_CPPLINT          OFF CACHE BOOL "Run cpplint.py tool for Google C++ StyleGuide.")
-	set(SQLITECPP_RUN_DOXYGEN          OFF CACHE BOOL "Run Doxygen C++ documentation tool.")
 	set(SQLITECPP_USE_STACK_PROTECTION OFF CACHE BOOL "USE Stack Protection hardening.")
-	set(SQLITE_ENABLE_COLUMN_METADATA  OFF CACHE BOOL "Enable Column::getColumnOriginName(). Require support from sqlite3 library.")
+	set(SQLITECPP_USE_STATIC_RUNTIME   OFF CACHE BOOL "Use MSVC static runtime (default for internal googletest).")

 	# Set options for LibEvent, disable all their tests and benchmarks:
 	set(EVENT__DISABLE_OPENSSL   YES CACHE BOOL   "Disable OpenSSL in LibEvent")


ENH: Rename REMOTE_GIT_TAG_${_name} to Module_${_name}_GIT_TAG

The allows the cache variable to appear next to the boolean option to
toggle the remote module.

--- CMake/ITKModuleRemote.cmake
+++ CMake/ITKModuleRemote.cmake
@@ -157,11 +157,11 @@
 #    [GIT_REPOSITORY url]            # URL of git repo
 #    [GIT_TAG tag]                   # Git branch name, commit id or tag
 #
-# An CMake variable REMOTE_GIT_TAG_${_name} can be set
+# An CMake variable Module_${name}_GIT_TAG can be set
 # in to override the value in the remote module configuration file.
-# The intent of the REMOTE_GIT_TAG_${_name} variable override is to
+# The intent of the Module_${name}_GIT_TAG variable override is to
 # facilitate testing of remote module branch behaviors without
-# requiring changes to the ITK code base. If REMOTE_GIT_TAG_${name} is
+# requiring changes to the ITK code base. If Module_${name}_GIT_TAG is
 # "" then no git fetch or update will be performed.
 function(itk_fetch_module _name _description)
   include(CMakeParseArguments)
@@ -215,16 +215,16 @@

     set(REMOTE_GIT_TAG "${_fetch_options_GIT_TAG}")

-    if( DEFINED REMOTE_GIT_TAG_${_name} AND NOT "${REMOTE_GIT_TAG_${_name}}" STREQUAL "${_fetch_options_GIT_TAG}")
+    if( DEFINED Module_${_name}_GIT_TAG AND NOT "${Module_${_name}_GIT_TAG}" STREQUAL "${_fetch_options_GIT_TAG}")
       set(REMOTE_GIT_TAG "${REMOTE_GIT_TAG_${_name}}")
       message(STATUS "NOTE: Using override 'REMOTE_GIT_TAG_${_name}=${REMOTE_GIT_TAG}'\n"
                      "      instead of value 'GIT_TAG=${_fetch_options_GIT_TAG}'\n"
                      "      specified in file ${ITK_SOURCE_DIR}/Modules/Remote/${_name}.remote.cmake'")
     endif()
-    set(REMOTE_GIT_TAG_${_name} "${REMOTE_GIT_TAG}" CACHE STRING "Override default GIT_TAG value for remote module ${_name}")
-    mark_as_advanced(REMOTE_GIT_TAG_${_name})
+    set(Module_${_name}_GIT_TAG "${REMOTE_GIT_TAG}" CACHE STRING "Override default GIT_TAG value for remote module ${_name}")
+    mark_as_advanced(Module_${_name}_GIT_TAG)
     # Show remote module options if building.
-    set_property(CACHE REMOTE_GIT_TAG_${_name} PROPERTY TYPE STRING)
+    set_property(CACHE Module_${_name}_GIT_TAG PROPERTY TYPE STRING)
     if(DEFINED Module_${_name}_BUILD_EXAMPLES)
       set_property(CACHE Module_${_name}_BUILD_EXAMPLES PROPERTY TYPE BOOL)
     endif()


Bump version to 1.3.1

Bump version to 1.3.1

--- CMake_version_options.cmake
+++ CMake_version_options.cmake
@@ -4,7 +4,7 @@
 ## Version information
 set(HOOMD_VERSION_MAJOR "1")
 set(HOOMD_VERSION_MINOR "3")
-set(HOOMD_VERSION_PATCH "0")
+set(HOOMD_VERSION_PATCH "1")
 set(HOOMD_VERSION "${HOOMD_VERSION_MAJOR}.${HOOMD_VERSION_MINOR}.${HOOMD_VERSION_PATCH}")

 # users may not have git installed, or this may be a tarball build - set a dummy version if that is the case


Not install simdpp if no SIMD support

Not install simdpp if no SIMD support

--- CMake/Utilities.cmake
+++ CMake/Utilities.cmake
@@ -191,9 +191,11 @@
   FILES_MATCHING PATTERN "*.cmake"
 )

-INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/3rdParty/gsl/include/gsl ${PROJECT_SOURCE_DIR}/3rdParty/eigen/Eigen ${PROJECT_SOURCE_DIR}/3rdParty/libsimdpp/simdpp
-  DESTINATION ${CMAKE_INSTALL_PREFIX}/include
-)
+if(ENABLE_SIMD)
+  INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/3rdParty/gsl/include/gsl ${PROJECT_SOURCE_DIR}/3rdParty/eigen/Eigen ${PROJECT_SOURCE_DIR}/3rdParty/libsimdpp/simdpp
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/include
+  )
+endif(ENABLE_SIMD)

 include(CheckCXXCompilerFlag)


Update the vtkDICOM remote module to v0.7.1.

For the first time, the remote module tag is an official release.

--- Remote/vtkDICOM.remote.cmake
+++ Remote/vtkDICOM.remote.cmake
@@ -5,6 +5,6 @@
 vtk_fetch_module(vtkDICOM
   "Dicom classes and utilities"
   GIT_REPOSITORY https://github.com/dgobbi/vtk-dicom
-  # vtk-dicom tag v0.7.0 plus 2 (Oct 23, 2015)
-  GIT_TAG e32ec575b084735b90cfacff589db35ce4cfc017
+  # vtk-dicom tag v0.7.1 (Nov 16, 2015)
+  GIT_TAG f51f08a74d82d620850a39be34e11ab1fb009a19
   )


Fix cppcheck invocation for targets with no cpp files

--- CppcheckTargets.cmake
+++ CppcheckTargets.cmake
@@ -22,12 +22,12 @@
 # http://www.boost.org/LICENSE_1_0.txt)

 if(__add_cppcheck)
-	return()
+  return()
 endif()
 set(__add_cppcheck YES)

 if(NOT CPPCHECK_FOUND)
-	find_package(cppcheck 1.53)
+  find_package(cppcheck 1.53)
 endif()

 if(NOT CPPCHECK_FOUND)
@@ -41,178 +41,182 @@
 endif()

 function(add_cppcheck_sources _targetname)
-	if(CPPCHECK_FOUND)
-		set(_cppcheck_args --force -I ${CMAKE_SOURCE_DIR}
-                  --error-exitcode=2 --inline-suppr
-                  --suppress=unmatchedSuppression ${CPPCHECK_EXTRA_ARGS})
-		set(_input ${ARGN})
-		list(FIND _input UNUSED_FUNCTIONS _unused_func)
-		if("${_unused_func}" GREATER "-1")
-			list(APPEND _cppcheck_args ${CPPCHECK_UNUSEDFUNC_ARG})
-			list(REMOVE_AT _input ${_unused_func})
-		endif()
-
-		list(FIND _input STYLE _style)
-		if("${_style}" GREATER "-1")
-			list(APPEND _cppcheck_args ${CPPCHECK_STYLE_ARG})
-			list(REMOVE_AT _input ${_style})
-		endif()
-
-		list(FIND _input POSSIBLE_ERROR _poss_err)
-		if("${_poss_err}" GREATER "-1")
-			list(APPEND _cppcheck_args ${CPPCHECK_POSSIBLEERROR_ARG})
-			list(REMOVE_AT _input ${_poss_err})
-		endif()
-
-		list(FIND _input FAIL_ON_WARNINGS _fail_on_warn)
-		if("${_fail_on_warn}" GREATER "-1")
-			list(APPEND
-				CPPCHECK_FAIL_REGULAR_EXPRESSION
-				${CPPCHECK_WARN_REGULAR_EXPRESSION})
-			list(REMOVE_AT _input ${_fail_on_warn})
-		endif()
-
-		set(_files)
-		foreach(_source ${_input})
-			get_source_file_property(_cppcheck_loc "${_source}" LOCATION)
-			if(_cppcheck_loc)
-				# This file has a source file property, carry on.
-				get_source_file_property(_cppcheck_lang "${_source}" LANGUAGE)
-				if("${_cppcheck_lang}" MATCHES "CXX")
-					list(APPEND _files "${_cppcheck_loc}")
-				endif()
-			else()
-				# This file doesn't have source file properties - figure it out.
-				get_filename_component(_cppcheck_loc "${_source}" ABSOLUTE)
-				if(EXISTS "${_cppcheck_loc}")
-					list(APPEND _files "${_cppcheck_loc}")
-				else()
-					message(FATAL_ERROR
-						"Adding CPPCHECK for file target ${_targetname}: "
-						"File ${_source} does not exist or needs a corrected path location "
-						"since we think its absolute path is ${_cppcheck_loc}")
-				endif()
-			endif()
-		endforeach()
-
-		if("1.${CMAKE_VERSION}" VERSION_LESS "1.2.8.0")
-			# Older than CMake 2.8.0
-			add_test(${_targetname}_cppcheck_test
-				"${CPPCHECK_EXECUTABLE}"
-				${CPPCHECK_TEMPLATE_ARG}
-				${_cppcheck_args}
-				${_files})
-		else()
-			# CMake 2.8.0 and newer
-			add_test(NAME
-				${_targetname}_cppcheck_test
-				COMMAND
-				"${CPPCHECK_EXECUTABLE}"
-				${CPPCHECK_TEMPLATE_ARG}
-				${_cppcheck_args}
-				${_files})
-		endif()
-
-		set_tests_properties(${_targetname}_cppcheck_test
-			PROPERTIES
-			FAIL_REGULAR_EXPRESSION
-			"${CPPCHECK_FAIL_REGULAR_EXPRESSION}")
-
-		add_custom_target(${_targetname}_cppcheck
-			COMMAND
-			${CPPCHECK_EXECUTABLE}
-			${CPPCHECK_QUIET_ARG}
-			${CPPCHECK_TEMPLATE_ARG}
-			${_cppcheck_args}
-			${_files}
-			WORKING_DIRECTORY
-			"${CMAKE_CURRENT_SOURCE_DIR}"
-			COMMENT
-			"${_targetname}_cppcheck: Running cppcheck on target ${_targetname}..."
-			VERBATIM)
-               add_dependencies(cppcheck ${_targetname}_cppcheck)
+  if(CPPCHECK_FOUND)
+    set(_cppcheck_args --force -I ${CMAKE_SOURCE_DIR}
+      --error-exitcode=2 --inline-suppr
+      --suppress=unmatchedSuppression ${CPPCHECK_EXTRA_ARGS})
+    set(_input ${ARGN})
+    list(FIND _input UNUSED_FUNCTIONS _unused_func)
+    if("${_unused_func}" GREATER "-1")
+      list(APPEND _cppcheck_args ${CPPCHECK_UNUSEDFUNC_ARG})
+      list(REMOVE_AT _input ${_unused_func})
+    endif()
+
+    list(FIND _input STYLE _style)
+    if("${_style}" GREATER "-1")
+      list(APPEND _cppcheck_args ${CPPCHECK_STYLE_ARG})
+      list(REMOVE_AT _input ${_style})
+    endif()
+
+    list(FIND _input POSSIBLE_ERROR _poss_err)
+    if("${_poss_err}" GREATER "-1")
+      list(APPEND _cppcheck_args ${CPPCHECK_POSSIBLEERROR_ARG})
+      list(REMOVE_AT _input ${_poss_err})
+    endif()
+
+    list(FIND _input FAIL_ON_WARNINGS _fail_on_warn)
+    if("${_fail_on_warn}" GREATER "-1")
+      list(APPEND
+	CPPCHECK_FAIL_REGULAR_EXPRESSION
+	${CPPCHECK_WARN_REGULAR_EXPRESSION})
+      list(REMOVE_AT _input ${_fail_on_warn})
+    endif()
+
+    set(_files)
+    foreach(_source ${_input})
+      get_source_file_property(_cppcheck_loc "${_source}" LOCATION)
+      if(_cppcheck_loc)
+	# This file has a source file property, carry on.
+	get_source_file_property(_cppcheck_lang "${_source}" LANGUAGE)
+	if("${_cppcheck_lang}" MATCHES "CXX")
+	  list(APPEND _files "${_cppcheck_loc}")
 	endif()
+      else()
+	# This file doesn't have source file properties - figure it out.
+	get_filename_component(_cppcheck_loc "${_source}" ABSOLUTE)
+	if(EXISTS "${_cppcheck_loc}")
+	  list(APPEND _files "${_cppcheck_loc}")
+	else()
+	  message(FATAL_ERROR
+	    "Adding CPPCHECK for file target ${_targetname}: "
+	    "File ${_source} does not exist or needs a corrected path location "
+	    "since we think its absolute path is ${_cppcheck_loc}")
+	endif()
+      endif()
+    endforeach()
+
+    if("1.${CMAKE_VERSION}" VERSION_LESS "1.2.8.0")
+      # Older than CMake 2.8.0
+      add_test(${_targetname}_cppcheck_test
+	"${CPPCHECK_EXECUTABLE}"
+	${CPPCHECK_TEMPLATE_ARG}
+	${_cppcheck_args}
+	${_files})
+    else()
+      # CMake 2.8.0 and newer
+      add_test(NAME
+	${_targetname}_cppcheck_test
+	COMMAND
+	"${CPPCHECK_EXECUTABLE}"
+	${CPPCHECK_TEMPLATE_ARG}
+	${_cppcheck_args}
+	${_files})
+    endif()
+
+    set_tests_properties(${_targetname}_cppcheck_test
+      PROPERTIES
+      FAIL_REGULAR_EXPRESSION
+      "${CPPCHECK_FAIL_REGULAR_EXPRESSION}")
+
+    add_custom_target(${_targetname}_cppcheck
+      COMMAND
+      ${CPPCHECK_EXECUTABLE}
+      ${CPPCHECK_QUIET_ARG}
+      ${CPPCHECK_TEMPLATE_ARG}
+      ${_cppcheck_args}
+      ${_files}
+      WORKING_DIRECTORY
+      "${CMAKE_CURRENT_SOURCE_DIR}"
+      COMMENT
+      "${_targetname}_cppcheck: Running cppcheck on target ${_targetname}..."
+      VERBATIM)
+    add_dependencies(cppcheck ${_targetname}_cppcheck)
+  endif()
 endfunction()

 function(add_cppcheck _name)
-	if(NOT TARGET ${_name})
-		message(FATAL_ERROR
-			"add_cppcheck given a target name that does not exist: '${_name}' !")
-	endif()
-	if(CPPCHECK_FOUND)
-		set(_cppcheck_args --force -I ${CMAKE_SOURCE_DIR}
-                  --error-exitcode=2 --inline-suppr
-                  --suppress=unmatchedSuppression ${CPPCHECK_EXTRA_ARGS})
-
-		list(FIND ARGN UNUSED_FUNCTIONS _unused_func)
-		if("${_unused_func}" GREATER "-1")
-			list(APPEND _cppcheck_args ${CPPCHECK_UNUSEDFUNC_ARG})
-		endif()
-
-		list(FIND ARGN STYLE _style)
-		if("${_style}" GREATER "-1")
-			list(APPEND _cppcheck_args ${CPPCHECK_STYLE_ARG})
-		endif()
-
-		list(FIND ARGN POSSIBLE_ERROR _poss_err)
-		if("${_poss_err}" GREATER "-1")
-			list(APPEND _cppcheck_args ${CPPCHECK_POSSIBLEERROR_ARG})
-		endif()
-
-		list(FIND _input FAIL_ON_WARNINGS _fail_on_warn)
-		if("${_fail_on_warn}" GREATER "-1")
-			list(APPEND
-				CPPCHECK_FAIL_REGULAR_EXPRESSION
-				${CPPCHECK_WARN_REGULAR_EXPRESSION})
-			list(REMOVE_AT _input ${_unused_func})
-		endif()
-
-		get_target_property(_cppcheck_sources "${_name}" SOURCES)
-		set(_files)
-		foreach(_source ${_cppcheck_sources})
-			get_source_file_property(_cppcheck_lang "${_source}" LANGUAGE)
-			get_source_file_property(_cppcheck_loc "${_source}" LOCATION)
-			if("${_cppcheck_lang}" MATCHES "CXX")
-				list(APPEND _files "${_cppcheck_loc}")
-			endif()
-		endforeach()
-
-		if("1.${CMAKE_VERSION}" VERSION_LESS "1.2.8.0")
-			# Older than CMake 2.8.0
-			add_test(${_name}_cppcheck_test
-				"${CPPCHECK_EXECUTABLE}"
-				${CPPCHECK_TEMPLATE_ARG}
-				${_cppcheck_args}
-				${_files})
-		else()
-			# CMake 2.8.0 and newer
-			add_test(NAME
-				${_name}_cppcheck_test
-				COMMAND
-				"${CPPCHECK_EXECUTABLE}"
-				${CPPCHECK_TEMPLATE_ARG}
-				${_cppcheck_args}
-				${_files})
-		endif()
-
-		set_tests_properties(${_name}_cppcheck_test
-			PROPERTIES
-			FAIL_REGULAR_EXPRESSION
-			"${CPPCHECK_FAIL_REGULAR_EXPRESSION}")
-
-		add_custom_target(${_name}_cppcheck
-			COMMAND
-			${CPPCHECK_EXECUTABLE}
-			${CPPCHECK_QUIET_ARG}
-			${CPPCHECK_TEMPLATE_ARG}
-			${_cppcheck_args}
-			${_files}
-			WORKING_DIRECTORY
-			"${CMAKE_CURRENT_SOURCE_DIR}"
-			COMMENT
-			"${_name}_cppcheck: Running cppcheck on target ${_name}..."
-			VERBATIM)
-               add_dependencies(cppcheck ${_name}_cppcheck)
-	endif()
+  if(NOT TARGET ${_name})
+    message(FATAL_ERROR
+      "add_cppcheck given a target name that does not exist: '${_name}' !")
+  endif()
+  if(CPPCHECK_FOUND)
+    set(_cppcheck_args --force -I ${CMAKE_SOURCE_DIR}
+      --error-exitcode=2 --inline-suppr
+      --suppress=unmatchedSuppression ${CPPCHECK_EXTRA_ARGS})
+
+    list(FIND ARGN UNUSED_FUNCTIONS _unused_func)
+    if("${_unused_func}" GREATER "-1")
+      list(APPEND _cppcheck_args ${CPPCHECK_UNUSEDFUNC_ARG})
+    endif()
+
+    list(FIND ARGN STYLE _style)
+    if("${_style}" GREATER "-1")
+      list(APPEND _cppcheck_args ${CPPCHECK_STYLE_ARG})
+    endif()
+
+    list(FIND ARGN POSSIBLE_ERROR _poss_err)
+    if("${_poss_err}" GREATER "-1")
+      list(APPEND _cppcheck_args ${CPPCHECK_POSSIBLEERROR_ARG})
+    endif()
+
+    list(FIND _input FAIL_ON_WARNINGS _fail_on_warn)
+    if("${_fail_on_warn}" GREATER "-1")
+      list(APPEND
+	CPPCHECK_FAIL_REGULAR_EXPRESSION
+	${CPPCHECK_WARN_REGULAR_EXPRESSION})
+      list(REMOVE_AT _input ${_unused_func})
+    endif()
+
+    get_target_property(_cppcheck_sources "${_name}" SOURCES)
+    set(_files)
+    foreach(_source ${_cppcheck_sources})
+      get_source_file_property(_cppcheck_lang "${_source}" LANGUAGE)
+      get_source_file_property(_cppcheck_loc "${_source}" LOCATION)
+      if("${_cppcheck_lang}" MATCHES "CXX")
+	list(APPEND _files "${_cppcheck_loc}")
+      endif()
+    endforeach()
+
+    if(NOT _files) # nothing to check
+      return()
+    endif()
+
+    if("1.${CMAKE_VERSION}" VERSION_LESS "1.2.8.0")
+      # Older than CMake 2.8.0
+      add_test(${_name}_cppcheck_test
+	"${CPPCHECK_EXECUTABLE}"
+	${CPPCHECK_TEMPLATE_ARG}
+	${_cppcheck_args}
+	${_files})
+    else()
+      # CMake 2.8.0 and newer
+      add_test(NAME
+	${_name}_cppcheck_test
+	COMMAND
+	"${CPPCHECK_EXECUTABLE}"
+	${CPPCHECK_TEMPLATE_ARG}
+	${_cppcheck_args}
+	${_files})
+    endif()
+
+    set_tests_properties(${_name}_cppcheck_test
+      PROPERTIES
+      FAIL_REGULAR_EXPRESSION
+      "${CPPCHECK_FAIL_REGULAR_EXPRESSION}")
+
+    add_custom_target(${_name}_cppcheck
+      COMMAND
+      ${CPPCHECK_EXECUTABLE}
+      ${CPPCHECK_QUIET_ARG}
+      ${CPPCHECK_TEMPLATE_ARG}
+      ${_cppcheck_args}
+      ${_files}
+      WORKING_DIRECTORY
+      "${CMAKE_CURRENT_SOURCE_DIR}"
+      COMMENT
+      "${_name}_cppcheck: Running cppcheck on target ${_name}..."
+      VERBATIM)
+    add_dependencies(cppcheck ${_name}_cppcheck)
+  endif()

 endfunction()


Update common.cmake for apple and linux/clang features On apple, link with CoreFoundation to allow for Instrumentation testing via Xcode. On Linux with Clang, use libstdc++. On other platforms use libc++. Link with the project library after all additional libraries to catch cross-dependencies.

--- jdksavdecc-c/common.cmake
+++ jdksavdecc-c/common.cmake
@@ -49,7 +49,11 @@
         set(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE} -O4 -DNDEBUG")
         set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g")

-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
+        if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" )
+            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++")
+        else()
+            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
+        endif()
     elseif(${CMAKE_MAKE_PROGRAM} MATCHES "(msdev|devenv|nmake|MSBuild)")
         add_definitions("/W3")
     else ()


Clang doesn't have a -pthread command-line argument.

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -891,7 +891,7 @@
 		set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lresolv")
 	endif()

-	if (HAVE_PTHREADS)
+	if (HAVE_PTHREADS AND NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
 		set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
 	endif(HAVE_PTHREADS)


Fix naming mismatch

Fix naming mismatch

--- src/cmake/FindUncertaintyTE.cmake
+++ src/cmake/FindUncertaintyTE.cmake
@@ -23,7 +23,7 @@
     include
 )

-FIND_LIBRARY(UNCERTAINTYTE_LIBRARY NAMES uncertainty_shared
+FIND_LIBRARY(UNCERTAINTYTE_LIBRARY NAMES uncertaintyTE
   HINTS
     $ENV{UNCERTAINTYTE_DIR}
     ${UNCERTAINTYTE_DIR}


fix resource lookup

fix resource lookup

--- ament_cmake_index/cmake/ament_index_get_resources.cmake
+++ ament_cmake_index/cmake/ament_index_get_resources.cmake
@@ -19,7 +19,7 @@
       "arguments: ${ARGN}")
   endif()

-  set(paths_to_search $ENV{AMENT_PREFIX_PATH})
+  string(REPLACE ":" ";" paths_to_search "$ENV{AMENT_PREFIX_PATH}")
   # Remove CMAKE_INSTALL_PREFIX if it is in the list of paths to search,
   # and add it to the list at the front
   list(REMOVE_ITEM paths_to_search "${CMAKE_INSTALL_PREFIX}")


Fix qwt args

Fix qwt args

--- Superbuild/QwtExternal.cmake
+++ Superbuild/QwtExternal.cmake
@@ -25,10 +25,23 @@
 #  DEALINGS IN THE SOFTWARE.

 SET_PROPERTY(DIRECTORY PROPERTY "EP_BASE" ${ep_base})
+
+SET(QWT_CACHE_ARGS
+  "-DCMAKE_VERBOSE_MAKEFILE:BOOL=${CMAKE_VERBOSE_MAKEFILE}"
+  "-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}"
+  "-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON"
+  )
 IF(QT5_BUILD)
   SET(qwt_GIT_TAG "origin/qt5-static")
+  LIST(APPEND QWT_CACHE_ARGS
+    "-DQt5_PATH:PATH=${Qt5_PATH}"
+    "-DQt5Core_DIR:PATH=${Qt5Core_DIR}"
+  )
 ELSE()
   SET(qwt_GIT_TAG "origin/static-build")
+  LIST(APPEND QWT_CACHE_ARGS
+    "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}"
+  )
 ENDIF()

 # If CMake ever allows overriding the checkout command or adding flags,
@@ -39,12 +52,7 @@
   PATCH_COMMAND ""
   INSTALL_DIR ""
   INSTALL_COMMAND ""
-  CMAKE_CACHE_ARGS
-    -DCMAKE_VERBOSE_MAKEFILE:BOOL=${CMAKE_VERBOSE_MAKEFILE}
-    -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-    -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
-    -DQt5_PATH:PATH=${Qt5_PATH}
-    -DQt5Core_DIR:PATH=${Qt5Core_DIR}
+  CMAKE_CACHE_ARGS ${QWT_CACHE_ARGS}
 )

 ExternalProject_Get_Property(Qwt_external BINARY_DIR)


Header file without generated GCOV file does not mean they are not covered. But instead, there is nothing to cover (e.g declaration only in the header). Hence, Coveralls should see that as nothing of interest instead of not covered.

--- cmake/CoverallsGenerateGcov.cmake
+++ cmake/CoverallsGenerateGcov.cmake
@@ -251,11 +251,11 @@
       ENDFOREACH()
     ELSE()
       MESSAGE(STATUS "${Esc}[31mNOT COVERED${Esc}[m: ${_COVERAGE_SRC}")
-      # The file is not covered and all these lines are set to 0 (no call)
+      # The file is not covered and all these lines are set to null
       FILE(STRINGS "${COVERAGE_SRC_PATH}/${_COVERAGE_SRC}" SRC_LINES)
       SET(GCOV_FILE_COVERAGE "[")
       FOREACH(SOURCE ${SRC_LINES})
-        SET(GCOV_FILE_COVERAGE "${GCOV_FILE_COVERAGE}0, ")
+        SET(GCOV_FILE_COVERAGE "${GCOV_FILE_COVERAGE}null, ")
       ENDFOREACH()
     ENDIF()
     IF(INC GREATER 1)


Fix condition

Fix condition

--- cmake/LIEFCompilerDetection.cmake
+++ cmake/LIEFCompilerDetection.cmake
@@ -14,7 +14,7 @@
 if (cxx_std_14 IN_LIST CMAKE_CXX_COMPILE_FEATURES)
   if (${MSVC} AND ${MSVC_TOOLSET_VERSION} GREATER_EQUAL 141)
     set(LIEF_SUPPORT_CXX14 1)
-  elseif(NOT ${MSVC})
+  elseif((NOT DEFINED MSVC) OR (NOT ${MSVC}))
     set(LIEF_SUPPORT_CXX14 1)
   endif()
 endif()
@@ -22,7 +22,7 @@
 if (cxx_std_17 IN_LIST CMAKE_CXX_COMPILE_FEATURES)
   if (${MSVC} AND ${MSVC_TOOLSET_VERSION} GREATER_EQUAL 142)
     set(LIEF_SUPPORT_CXX17 1)
-  elseif(NOT ${MSVC})
+  elseif((NOT DEFINED MSVC) OR (NOT ${MSVC}))
     set(LIEF_SUPPORT_CXX17 1)
   endif()
 endif()


[CMake][Fuchsia] Enable x86 relaxation by default

This enables x86 relaxation by default. This depends on a linker new
enough to support the new reloc types but since we default to lld we
don't worry about host system linkers that might be too old to support
the new reloc types.

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

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

--- cmake/caches/Fuchsia-stage2.cmake
+++ cmake/caches/Fuchsia-stage2.cmake
@@ -15,6 +15,7 @@
 set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "")

 set(ENABLE_LINKER_BUILD_ID ON CACHE BOOL "")
+set(ENABLE_X86_RELAX_RELOCATIONS ON CACHE BOOL "")

 set(LLVM_ENABLE_LTO ON CACHE BOOL "")
 if(NOT APPLE)


Added missing include.

Added missing include.

--- cmake/modules/FindInnoSetup.cmake
+++ cmake/modules/FindInnoSetup.cmake
@@ -20,6 +20,8 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.

+include(FindPackageHandleStandardArgs)
+
 # Find the Inno Setup CLI compiler
 find_program(INNOSETUP_EXECUTABLE
     NAMES iscc


Use correct variables names in documentation of macros.
_pkgconfig_unset now done with correct variable names.

svn path=/trunk/; revision=7676

--- cmake/modules/FindPkgConfig.cmake
+++ cmake/modules/FindPkgConfig.cmake
@@ -22,10 +22,10 @@
 #   <XPREFIX>_LIBRARIES      ... only the libraries (w/o the '-l')
 #   <XPREFIX>_LIBRARY_DIRS   ... the paths of the libraries (w/o the '-L')
 #   <XPREFIX>_LDFLAGS        ... all required linker flags
-#   <XPREFIX>_LDFLAGS_OTHERS ... all other linker flags
+#   <XPREFIX>_LDFLAGS_OTHER ... all other linker flags
 #   <XPREFIX>_INCLUDE_DIRS   ... the '-I' preprocessor flags (w/o the '-I')
 #   <XPREFIX>_CFLAGS         ... all required cflags
-#   <XPREFIX>_CFLAGS_OTHERS  ... the other compiler flags
+#   <XPREFIX>_CFLAGS_OTHER  ... the other compiler flags
 #
 #   <XPREFIX> = <PREFIX>        for common case
 #   <XPREFIX> = <PREFIX>_STATIC for static linking
@@ -169,20 +169,19 @@
   _pkgconfig_unset(${_prefix}_PREFIX)
   _pkgconfig_unset(${_prefix}_INCLUDEDIR)
   _pkgconfig_unset(${_prefix}_LIBDIR)
-  _pkgconfig_unset(${_prefix}_LIBS)
-  _pkgconfig_unset(${_prefix}_LIBS_L)
-  _pkgconfig_unset(${_prefix}_LIBS_PATHS)
-  _pkgconfig_unset(${_prefix}_LIBS_OTHER)
+  _pkgconfig_unset(${_prefix}_LIBRARIES)
+  _pkgconfig_unset(${_prefix}_LIBRARY_DIRS)
+  _pkgconfig_unset(${_prefix}_LDFLAGS)
+  _pkgconfig_unset(${_prefix}_LDFLAGS_OTHER)
+  _pkgconfig_unset(${_prefix}_INCLUDE_DIRS)
   _pkgconfig_unset(${_prefix}_CFLAGS)
-  _pkgconfig_unset(${_prefix}_CFLAGS_I)
   _pkgconfig_unset(${_prefix}_CFLAGS_OTHER)
-  _pkgconfig_unset(${_prefix}_STATIC_LIBDIR)
-  _pkgconfig_unset(${_prefix}_STATIC_LIBS)
-  _pkgconfig_unset(${_prefix}_STATIC_LIBS_L)
-  _pkgconfig_unset(${_prefix}_STATIC_LIBS_PATHS)
-  _pkgconfig_unset(${_prefix}_STATIC_LIBS_OTHER)
+  _pkgconfig_unset(${_prefix}_STATIC_LIBRARIES)
+  _pkgconfig_unset(${_prefix}_STATIC_LIBRARY_DIRS)
+  _pkgconfig_unset(${_prefix}_STATIC_LDFLAGS)
+  _pkgconfig_unset(${_prefix}_STATIC_LDFLAGS_OTHER)
+  _pkgconfig_unset(${_prefix}_STATIC_INCLUDE_DIRS)
   _pkgconfig_unset(${_prefix}_STATIC_CFLAGS)
-  _pkgconfig_unset(${_prefix}_STATIC_CFLAGS_I)
   _pkgconfig_unset(${_prefix}_STATIC_CFLAGS_OTHER)

   # create a better addressable variable of the modules and calculate its size


Allow wildcards when defining tests with ROOT_ADD_GTEST(...)

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -1128,8 +1128,8 @@
 function(ROOT_ADD_GTEST test_suite)
   CMAKE_PARSE_ARGUMENTS(ARG "" "" "LIBRARIES" ${ARGN})
   include_directories(${CMAKE_CURRENT_BINARY_DIR} ${GTEST_INCLUDE_DIR} ${GMOCK_INCLUDE_DIR})
-
-  set(source_files ${ARG_UNPARSED_ARGUMENTS})
+
+  ROOT_GET_SOURCES(source_files . ${ARG_UNPARSED_ARGUMENTS})
   # Note we cannot use ROOT_EXECUTABLE without user-specified set of LIBRARIES to link with.
   # The test suites should choose this in their specific CMakeLists.txt file.
   # FIXME: For better coherence we could restrict the libraries the test suite could link


Additional fix for ROOT-8701

Additional fix for ROOT-8701

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -228,7 +228,9 @@

   #---Get the list of include directories------------------
   get_directory_property(incdirs INCLUDE_DIRECTORIES)
-
+  if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/inc)
+    set(localinclude ${CMAKE_CURRENT_SOURCE_DIR}/inc)
+  endif()
   #---Get the list of header files-------------------------
   set(headerfiles)
   set(fullheaderfiles)
@@ -245,7 +247,7 @@
       list(APPEND headerfiles ${fp})
       list(APPEND fullheaderfiles ${fp})
     else()
-      find_file(headerFile ${fp} HINTS ${incdirs})
+      find_file(headerFile ${fp} HINTS ${localinclude} ${incdirs})
       list(APPEND headerfiles ${fp})
       if(headerFile)
         list(APPEND fullheaderfiles ${headerFile})


Fix for ROOT-8698 - CMake build does not ignore previous ROOT installations

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -472,7 +472,7 @@
   if(ARG_TEST) # we are building a test, so add EXCLUDE_FROM_ALL
     set(_all EXCLUDE_FROM_ALL)
   endif()
-  include_directories(${CMAKE_BINARY_DIR}/include)                # This is a copy and certainly should last one
+  include_directories(BEFORE ${CMAKE_BINARY_DIR}/include)
   set(library_name ${library})
   if(TARGET ${library})
     message("Target ${library} already exists. Renaming target name to ${library}_new")
@@ -578,7 +578,7 @@
 function(ROOT_OBJECT_LIBRARY library)
   CMAKE_PARSE_ARGUMENTS(ARG "" "" "BUILTINS"  ${ARGN})
   ROOT_GET_SOURCES(lib_srcs src ${ARG_UNPARSED_ARGUMENTS})
-  include_directories(AFTER ${CMAKE_BINARY_DIR}/include)
+  include_directories(BEFORE ${CMAKE_BINARY_DIR}/include)
   add_library( ${library} OBJECT ${lib_srcs})
   if(lib_srcs MATCHES "(^|/)(G__[^.]*)[.]cxx.*")
      add_dependencies(${library} ${CMAKE_MATCH_2})
@@ -635,7 +635,7 @@
 function(ROOT_MODULE_LIBRARY library)
   CMAKE_PARSE_ARGUMENTS(ARG "" "" "LIBRARIES" ${ARGN})
   ROOT_GET_SOURCES(lib_srcs src ${ARG_UNPARSED_ARGUMENTS})
-  include_directories(${CMAKE_BINARY_DIR}/include)
+  include_directories(BEFORE ${CMAKE_BINARY_DIR}/include)
   add_library( ${library} SHARED ${lib_srcs})
   add_dependencies(${library} move_headers)
   set_target_properties(${library}  PROPERTIES ${ROOT_LIBRARY_PROPERTIES})
@@ -783,7 +783,7 @@
   if(ARG_TEST) # we are building a test, so add EXCLUDE_FROM_ALL
     set(_all EXCLUDE_FROM_ALL)
   endif()
-  include_directories(${CMAKE_BINARY_DIR}/include)
+  include_directories(BEFORE ${CMAKE_BINARY_DIR}/include)
   add_executable( ${executable} ${_all} ${exe_srcs})
   target_link_libraries(${executable} ${ARG_LIBRARIES} )
   if(WIN32 AND ${executable} MATCHES .exe)


Replace hardcoded include path value with the advertised setting. (#3083)

--- cmake/onnxruntime_providers.cmake
+++ cmake/onnxruntime_providers.cmake
@@ -117,8 +117,7 @@
   set_source_files_properties("${ONNXRUNTIME_ROOT}/core/providers/cpu/tensor/where_op.cc" PROPERTIES COMPILE_FLAGS -Wno-deprecated-copy)
 endif()

-set(re2_src ${ONNXRUNTIME_ROOT}/../cmake/external/re2)
-target_include_directories(onnxruntime_providers PRIVATE ${ONNXRUNTIME_ROOT} ${eigen_INCLUDE_DIRS} ${gemmlowp_src} ${re2_src})
+target_include_directories(onnxruntime_providers PRIVATE ${ONNXRUNTIME_ROOT} ${eigen_INCLUDE_DIRS} ${gemmlowp_src} ${RE2_INCLUDE_DIR})
 add_dependencies(onnxruntime_providers onnx ${onnxruntime_EXTERNAL_DEPENDENCIES})
 install(DIRECTORY ${PROJECT_SOURCE_DIR}/../include/onnxruntime/core/providers/cpu  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/onnxruntime/core/providers)
 set_target_properties(onnxruntime_providers PROPERTIES LINKER_LANGUAGE CXX)


working solution (except for multiple initializer in DLL windows)

--- cmakemodules/DeclareMRPTLib.cmake
+++ cmakemodules/DeclareMRPTLib.cmake
@@ -34,12 +34,14 @@
 	IF(NOT ${is_metalib})
 		PROJECT(mrpt-${name})
 	ENDIF(NOT ${is_metalib})
-
+
 	# Optional build-time plugin mechanism:
-	SET(mrpt-${name}_PLUGIN_FILE "" CACHE FILE "Optional CMake file defining additional sources for mrpt-${name}")
-	MARK_AS_ADVANCED(mrpt-${name}_PLUGIN_FILE)
-	IF (EXISTS "${mrpt-${name}_PLUGIN_FILE}")
-		INCLUDE("${mrpt-${name}_PLUGIN_FILE}")
+	SET(PLUGIN_FILE_mrpt-${name} "" CACHE FILEPATH "Optional CMake file defining additional sources for mrpt-${name}")
+	MARK_AS_ADVANCED(PLUGIN_FILE_mrpt-${name})
+	IF (EXISTS "${PLUGIN_FILE_mrpt-${name}}")
+		INCLUDE("${PLUGIN_FILE_mrpt-${name}}")
+		LIST(APPEND ${name}_EXTRA_SRCS	      ${${name}_PLUGIN_SRCS})
+		LIST(APPEND ${name}_EXTRA_SRCS_NAME   ${${name}_PLUGIN_SRCS_NAME})
 	ENDIF()

 	# There is an optional LISTS of extra sources from the caller:
@@ -140,6 +142,8 @@
 	ENDIF (EXISTS "${CMAKE_SOURCE_DIR}/libs/${name}/include/mrpt/${name}.h")

 	IF (NOT ${headers_only})
+		add_definitions(-DBUILDING_mrpt_${name})
+

 		# A libray target:
 		ADD_LIBRARY(mrpt-${name}
@@ -357,9 +361,15 @@
 		SET(mrpt_pkgconfig_NO_INSTALL_SOURCE "${MRPT_SOURCE_DIR}")
 		SET(mrpt_pkgconfig_NO_INSTALL_BINARY "${MRPT_BINARY_DIR}")
 		CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/parse-files/mrpt_template_no_install.pc.in" "${CMAKE_BINARY_DIR}/pkgconfig-no-install/mrpt-${name}.pc" @ONLY)
-
 	ENDIF(UNIX)

+	IF(MRPT_ENABLE_PRECOMPILED_HDRS AND MSVC)
+		FOREACH(_N ${${name}_PLUGIN_SRCS_NAME})
+			#MESSAGE(STATUS "Disabling precomp hdrs for N=${_N}: ${${_N}_FILES}")
+			set_source_files_properties(${${_N}_FILES} PROPERTIES COMPILE_FLAGS "/Y-")
+		ENDFOREACH()
+	ENDIF()
+
 	# --- End of conditional build of module ---
 	ENDIF(BUILD_mrpt-${name})


fix typo in library name!

fix typo in library name!

--- lib/FindLuabind.cmake
+++ lib/FindLuabind.cmake
@@ -19,7 +19,7 @@

 FIND_PATH(LUABIND_INCLUDE_DIR luabind/luabind.hpp)

-FIND_LIBRARY(LUABIND_LIBRARIES NAMES luabindd)
+FIND_LIBRARY(LUABIND_LIBRARIES NAMES luabind)

 IF( LUABIND_INCLUDE_DIR AND LUABIND_LIBRARIES)
    SET(LUABIND_FOUND TRUE)


fix LaunchServices database search

fix LaunchServices database search

--- CMake/Mathematica/FindMathematica.cmake
+++ CMake/Mathematica/FindMathematica.cmake
@@ -355,7 +355,7 @@
 		foreach (_bundleID IN ITEMS ${ARGN})
 			execute_process(
 				COMMAND "${Mathematica_LSRegister_EXECUTABLE}" "-dump"
-				COMMAND "grep" "--before-context=12" "--after-context=12" " ${_bundleID} "
+				COMMAND "grep" "--before-context=20" "--after-context=20" " ${_bundleID} "
 				COMMAND "grep" "--only-matching" "/.*\\.app"
 				TIMEOUT 10 OUTPUT_VARIABLE _queryResult ERROR_QUIET)
 			string (REPLACE ";" "\\;" _queryResult "${_queryResult}")


Fix logo aspect ratio in Emscripten shell page.

--- CMake/Modules/Urho3D-CMake-common.cmake
+++ CMake/Modules/Urho3D-CMake-common.cmake
@@ -1825,7 +1825,7 @@
         if (NOT EXISTS ${CMAKE_BINARY_DIR}/Source/shell.html)
             file (READ ${EMSCRIPTEN_ROOT_PATH}/src/shell.html SHELL_HTML)
             string (REPLACE "<!doctype html>" "\n\n<!doctype html>" SHELL_HTML "${SHELL_HTML}")     # Stringify to preserve semicolons
-            string (REPLACE "" "\n\n\n" SHELL_HTML "${SHELL_HTML}")
+            string (REPLACE "" "\n\n\n" SHELL_HTML "${SHELL_HTML}")
             file (WRITE ${CMAKE_BINARY_DIR}/Source/shell.html "${SHELL_HTML}")
         endif ()
     endif ()


ENH: Added nearly raw raster data format IO

--- itkIncludeDirectories.cmake
+++ itkIncludeDirectories.cmake
@@ -40,11 +40,13 @@
   ${ITK_SOURCE_DIR}/Code/Numerics/Statistics
   ${ITK_SOURCE_DIR}/Code/SpatialObject
   ${ITK_SOURCE_DIR}/Utilities/MetaIO
+  ${ITK_SOURCE_DIR}/Utilities/NrrdIO
   ${ITK_SOURCE_DIR}/Utilities/DICOMParser
   ${ITK_BINARY_DIR}/Utilities/DICOMParser
   ${ITK_BINARY_DIR}/Utilities/expat
   ${ITK_SOURCE_DIR}/Utilities/expat
   ${ITK_BINARY_DIR}/Utilities
+  ${ITK_SOURCE_DIR}/Utilities
 )

 # VXL include directories.
@@ -83,6 +85,7 @@
   ${ITK_INSTALL_INCLUDE_DIR}/Numerics/Statistics
   ${ITK_INSTALL_INCLUDE_DIR}/SpatialObject
   ${ITK_INSTALL_INCLUDE_DIR}/Utilities/MetaIO
+  ${ITK_INSTALL_INCLUDE_DIR}/Utilities/NrrdIO
   ${ITK_INSTALL_INCLUDE_DIR}/Utilities/DICOMParser
   ${ITK_INSTALL_INCLUDE_DIR}/Utilities
 )


--- Modules/ManageRelease.cmake
+++ Modules/ManageRelease.cmake
@@ -36,6 +36,8 @@
 	FOREACH(_target ${ARGN})
 	    IF(TARGET ${_target})
 		LIST(APPEND _releaseTargets "${_target}")
+		## Release targets should be build after target tag
+		ADD_DEPENDENCIES(${_target} tag)
 	    ELSE(TARGET ${_target})
 		M_MSG(${M_OFF} "Target ${_target} does not exist, skipped.")
 	    ENDIF(TARGET ${_target})


Forgot to add server as a subpath

Forgot to add server as a subpath

--- cmake/Modules/FindPostgreSQL.cmake
+++ cmake/Modules/FindPostgreSQL.cmake
@@ -119,6 +119,7 @@
     pgsql/server
     postgresql/server
     include/server
+    server
   # Help the user find it if we cannot.
   DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}"
 )
@@ -163,7 +164,6 @@
   set(PostgreSQL_INCLUDE_DIRS ${PostgreSQL_INCLUDE_DIR} ${PostgreSQL_TYPE_INCLUDE_DIR} )
   set(PostgreSQL_LIBRARY_DIRS ${PostgreSQL_LIBRARY_DIR} )
   set(PostgreSQL_LIBRARIES ${PostgreSQL_LIBRARY_TO_FIND})
-
   #message("Final PostgreSQL include dir: ${PostgreSQL_INCLUDE_DIRS}")
   #message("Final PostgreSQL library dir: ${PostgreSQL_LIBRARY_DIRS}")
   #message("Final PostgreSQL libraries:   ${PostgreSQL_LIBRARIES}")


[CMake] Remove unused CMake variable

[CMake] Remove unused CMake variable

--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -12,7 +12,6 @@
   file(TO_CMAKE_PATH "${LLDB_PATH_TO_CLANG_BUILD}" LLDB_PATH_TO_CLANG_BUILD)
   file(TO_CMAKE_PATH "${LLDB_PATH_TO_SWIFT_BUILD}" LLDB_PATH_TO_SWIFT_BUILD)

-  file(TO_CMAKE_PATH "${LLDB_PATH_TO_CLANG_SOURCE}" LLDB_PATH_TO_CLANG_SOURCE)
   file(TO_CMAKE_PATH "${LLDB_PATH_TO_SWIFT_SOURCE}" LLDB_PATH_TO_SWIFT_SOURCE)

   find_package(LLVM REQUIRED CONFIG


Update hunter.cmake

Update hunter.cmake

--- cmake/projects/buffer/hunter.cmake
+++ cmake/projects/buffer/hunter.cmake
@@ -60,4 +60,4 @@

 hunter_pick_scheme(DEFAULT url_sha1_cmake)

-hunter_download(PACKAGE_NAME Buffer)
+hunter_download(PACKAGE_NAME buffer)


Adjust ospray flags

Adjust ospray flags

--- Superbuild/Superbuild.cmake
+++ Superbuild/Superbuild.cmake
@@ -77,6 +77,9 @@
 ###########################################
 # Configure ospray
 OPTION(WITH_OSPRAY "Build Ospray." ON)
+IF(WIN32) # needs VS2017--turn off for now
+  SET(WITH_OSPRAY OFF)
+ENDIF()

 ###########################################
 # Configure data
@@ -106,16 +109,15 @@
     SET(DOWNLOAD_TOOLKITS OFF)
     SET(BUILD_WITH_SCIRUN_DATA OFF)
   ELSE()
+    SET(WITH_OSPRAY OFF)
+	SET(BUILD_TESTING OFF)
+	SET(DOWNLOAD_TOOLKITS OFF)
+	SET(BUILD_WITH_SCIRUN_DATA OFF)
+
     IF(CMAKE_C_COMPILER_ID MATCHES "GNU")
-      SET(BUILD_TESTING OFF)
-      SET(DOWNLOAD_TOOLKITS OFF)
       SET(BUILD_HEADLESS ON)
       SET(BUILD_WITH_PYTHON OFF)
-      SET(BUILD_WITH_SCIRUN_DATA OFF)
     ELSE()
-      SET(BUILD_TESTING OFF)
-      SET(DOWNLOAD_TOOLKITS OFF)
-      SET(BUILD_WITH_SCIRUN_DATA OFF)
       # try building everything with clang!
     ENDIF()
   ENDIF()


Fix CMake configuration regarding application settings

--- support/cmake/handle_applications.cmake
+++ support/cmake/handle_applications.cmake
@@ -30,17 +30,19 @@
     list(REMOVE_ITEM appDirs ".DS_Store")

     message(STATUS "Configuration application")
+    # First create all of the options for the applications. In case that one of the
+    # applications fail to include later, we still want all of them listed
     foreach (app ${appDirs})
         set(app_dir "${OPENSPACE_APPS_DIR}/${app}")
         string(TOUPPER ${app} upper_app)

-        option(OPENSPACE_APPLICATION_${upper_app} "${app} Application" OFF)
+        get_application_attribute_default(${app_dir} is_default_application)
+        option(OPENSPACE_APPLICATION_${upper_app} "Build ${app} application" ${is_default_application})
+    endforeach ()

-        get_application_attribute_default(${app_dir} is_default_application)
-        if (${is_default_application})
-            option(OPENSPACE_APPLICATION_${upper_app} "Build ${app} application" ${is_default_application})
-        endif ()
-
+    foreach (app ${appDirs})
+        set(app_dir "${OPENSPACE_APPS_DIR}/${app}")
+        string(TOUPPER ${app} upper_app)
         if (OPENSPACE_APPLICATION_${upper_app})
             message(STATUS "Adding application ${app}")
             add_subdirectory(${app_dir})


ARROW-5517: [C++] Only check header basename for 'internal' when collecting public headers

Author: Benjamin Kietzman <bengilgit@gmail.com>

Closes #4551 from bkietz/5517-Header-collection-CMake-logic-should-onl and squashes the following commits:

140b95b81 <Benjamin Kietzman> only check header basename for 'internal' when collecting public headers

--- cpp/cmake_modules/BuildUtils.cmake
+++ cpp/cmake_modules/BuildUtils.cmake
@@ -720,9 +720,11 @@

   set(PUBLIC_HEADERS)
   foreach(HEADER ${CURRENT_DIRECTORY_HEADERS})
-    if(NOT ((HEADER MATCHES "internal")))
-      list(APPEND PUBLIC_HEADERS ${HEADER})
-    endif()
+    get_filename_component(HEADER_BASENAME ${HEADER} NAME)
+    if(HEADER_BASENAME MATCHES "internal")
+      continue()
+    endif()
+    list(APPEND PUBLIC_HEADERS ${HEADER})
   endforeach()
   install(FILES ${PUBLIC_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PATH}")
 endfunction()


COMP: Bump ITKUltrasound to address warnings

--- SuperBuild/External_ITKUltrasound.cmake
+++ SuperBuild/External_ITKUltrasound.cmake
@@ -10,7 +10,7 @@
 set(${proj}_BINARY_DIR ${CMAKE_BINARY_DIR}/${proj}-build)

 # disable-wrapping 2018-06-15
-set(${proj}_GIT_TAG ec34fd1d22aef70b28c34605638b0df95ea8e03c)
+set(${proj}_GIT_TAG b3f2adb76608b42280185bf5a0949c7874c65d69)
 ExternalProject_Add(${proj}
   ${${proj}_EP_ARGS}
   GIT_REPOSITORY ${git_protocol}://github.com/thewtex/ITKUltrasound.git


Bugfix

Bugfix

git-svn-id: fbbf69ba8011aca0e74e1c67904b11cccbdbe66b@26881 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/setup_finalize.cmake
+++ deal.II/cmake/setup_finalize.cmake
@@ -28,13 +28,17 @@
 #
 # Depulicate entries in DEAL_II_EXTERNAL_LIBRARIES(_...):
 #
-LIST(REVERSE DEAL_II_EXTERNAL_LIBRARIES)
-LIST(REMOVE_DUPLICATES DEAL_II_EXTERNAL_LIBRARIES)
-LIST(REVERSE DEAL_II_EXTERNAL_LIBRARIES)
+IF(NOT "${DEAL_II_EXTERNAL_LIBRARIES}" STREQUAL "")
+  LIST(REVERSE DEAL_II_EXTERNAL_LIBRARIES)
+  LIST(REMOVE_DUPLICATES DEAL_II_EXTERNAL_LIBRARIES)
+  LIST(REVERSE DEAL_II_EXTERNAL_LIBRARIES)
+ENDIF()
 FOREACH(build ${DEAL_II_BUILD_TYPES})
-  LIST(REVERSE DEAL_II_EXTERNAL_LIBRARIES_${build})
-  LIST(REMOVE_DUPLICATES DEAL_II_EXTERNAL_LIBRARIES_${build})
-  LIST(REVERSE DEAL_II_EXTERNAL_LIBRARIES_${build})
+  IF(NOT "${DEAL_II_EXTERNAL_LIBRARIES_${build}}" STREQUAL "")
+    LIST(REVERSE DEAL_II_EXTERNAL_LIBRARIES_${build})
+    LIST(REMOVE_DUPLICATES DEAL_II_EXTERNAL_LIBRARIES_${build})
+    LIST(REVERSE DEAL_II_EXTERNAL_LIBRARIES_${build})
+  ENDIF()
 ENDFOREACH()


CMake: Add /bigobj to C# wrapper libs because single .obj can get real big.

--- CMake/Modules/UrhoSWIG.cmake
+++ CMake/Modules/UrhoSWIG.cmake
@@ -242,6 +242,9 @@
       ${swig_generated_sources}
       ${swig_other_sources})
   set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES NO_SONAME ON)
+  if (MSVC)
+    target_compile_options(${SWIG_MODULE_${name}_REAL_NAME} PRIVATE /bigobj)
+  endif ()
   string(TOLOWER "${language}" swig_lowercase_language)
   if ("${swig_lowercase_language}" STREQUAL "octave")
     set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "")


COMP: Explicitly prohibit building fortran libs

On platforms where fortran is not available natively
in the environment the building of fftw was failing.

This patch explicitly prohibits looking for fortran.

Change-Id: I80cad7e2d1a92d78e2730bce752ecd39a7631d30

--- CMake/itkExternal_FFTW.cmake
+++ CMake/itkExternal_FFTW.cmake
@@ -1,5 +1,7 @@
 #
 # Encapsulates building FFTW as an External Project.
+include(CheckCCompilerFlag)
+

 set(msg "ATTENTION: You have enabled the use of fftw,")
 set(msg "${msg} this library is distributed under a GPL license.")
@@ -7,6 +9,29 @@
 set(msg "${msg} that you are going to build will be covered by a GPL license,")
 set(msg "${msg} and so it will be any executable that you link against these libraries.")
 message("${msg}")
+
+#--check_c_compiler_flag(-fopenmp C_HAS_fopenmp)
+#--if(${C_HAS_fopenmp} AND FALSE)
+#--    set(FFTW_THREADS_CONFIGURATION --enable-openmp)
+#--    set(OPENMP_FLAG "-fopenmp")
+#--  else()
+    set(FFTW_THREADS_CONFIGURATION --enable-threads)
+    set(OPENMP_FLAG "")
+#--endif()
+
+#--Some influential environment variables:
+#--  CC          C compiler command
+#--  CFLAGS      C compiler flags
+#--  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+#--              nonstandard directory <lib dir>
+#--  LIBS        libraries to pass to the linker, e.g. -l<library>
+#--  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+#--              you have headers in a nonstandard directory <include dir>
+#-- set(ENV{CC}       "${CMAKE_C_COMPILER}")
+#-- set(ENV{CFLAGS}   "${CMAKE_C_FLAGS} ${OPENMP_FLAG}")
+#-- set(ENV{LDFLAGS}  "${CMAKE_C_FLAGS} ${OPENMP_FLAG}")
+#-- set(ENV{LIBS}     "${CMAKE_EXE_LINKER_FLAGS} ${OPENMP_FLAG}")
+#-- set(ENV{CPPFLAGS} "${CMAKE_C_FLAGS} ${OPENMP_FLAG}")

 ## Perhaps in the future a set of TryCompiles could be used here.
 set(FFTW_OPTIMIZATION_CONFIGURATION "" CACHE INTERNAL "architecture flags: --enable-sse --enable-sse2 --enable-altivec --enable-mips-ps --enable-cell")
@@ -38,8 +63,9 @@
         CONFIGURE_COMMAND ${ITK_BINARY_DIR}/fftwf/src/fftwf/configure
         ${FFTW_SHARED_FLAG}
         ${FFTW_OPTIMIZATION_CONFIGURATION}
+        ${FFTW_THREADS_CONFIGURATION}
+        --disable-fortran
         --enable-float
-        --enable-threads
         --prefix=${ITK_BINARY_DIR}/fftw
         )
     endif(USE_FFTWF)
@@ -52,7 +78,9 @@
         CONFIGURE_COMMAND ${ITK_BINARY_DIR}/fftwd/src/fftwd/configure
         ${FFTW_SHARED_FLAG}
         ${FFTW_OPTIMIZATION_CONFIGURATION}
-        --enable-threads
+        ${FFTW_THREADS_CONFIGURATION}
+        --disable-fortran
+        --disable-float
         --prefix=${ITK_BINARY_DIR}/fftw
         )
     endif(USE_FFTWD)


Forbid downloading data with option

Forbid downloading data with option

Change-Id: Id8bf72b51f9505540cd77815beb238d8f87d6e90

--- CMake/sitkExternalData.cmake
+++ CMake/sitkExternalData.cmake
@@ -33,15 +33,16 @@
   "Additional URL templates for the ExternalData CMake script to look for testing data. E.g.
 file:///var/bigharddrive/%(algo)/%(hash)")
 mark_as_advanced(ExternalData_URL_TEMPLATES)
-list(APPEND ExternalData_URL_TEMPLATES
-  # Data published by MIDAS
-  "http://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"
-  "https://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"
+if(NOT SITK_FORBID_DOWNLOADS)
+  list(APPEND ExternalData_URL_TEMPLATES
+    # Data published by MIDAS
+    "http://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"
+    "https://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"

-  # Data published by developers using git-gerrit-push.
-  "http://www.itk.org/files/ExternalData/%(algo)/%(hash)"
-  )
-
+    # Data published by developers using git-gerrit-push.
+    "http://www.itk.org/files/ExternalData/%(algo)/%(hash)"
+    )
+endif()
 # Tell ExternalData commands not to transform raw files to content links.
 #set(ExternalData_LINK_CONTENT MD5)


[cpack] black.one -> block.one

[cpack] black.one -> block.one

--- CMakeModules/installer.cmake
+++ CMakeModules/installer.cmake
@@ -6,7 +6,7 @@

 SET(CPACK_PACKAGE_DIRECTORY "${CMAKE_INSTALL_PREFIX}")
 set(CPACK_PACKAGE_NAME "EOS.IO")
-set(CPACK_PACKAGE_VENDOR "black.one")
+set(CPACK_PACKAGE_VENDOR "block.one")
 set(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
 set(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")
 set(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}")


Fix MOCHA_FILES environment variable not getting set during tests.

This was leading to the CI parallel tests always executing all of the
tests on each node (rather than splitting them up as we intend).

--- build/cmake/test/test-proxy.cmake
+++ build/cmake/test/test-proxy.cmake
@@ -8,7 +8,7 @@

 add_custom_target(
   test-proxy-target
-  env MOCHA_FILES=$ENV{MOCHA_FILES} npm test
+  COMMAND npm test
   DEPENDS ${CMAKE_SOURCE_DIR}/test/node_modules
   WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test
 )


Execute vera++ PRE_LINK.

Execute vera++ PRE_LINK.

This ensures that it happens after all the files have been
generated for a particular target, but also ensures that if
errors are generated as a result of the vera++ checks then
the target won't be considered as successfully built.

--- VeraPPUtilities.cmake
+++ VeraPPUtilities.cmake
@@ -293,7 +293,7 @@
     # just refers to the list name and not the list itself
     foreach (_source ${${SOURCES_VAR}})
         add_custom_command (TARGET ${TARGET}
-                            POST_BUILD
+                            PRE_LINK
                             COMMAND
                             ${VERAPP_EXECUTABLE}
                             ARGS


Fix LibJpegTurbo finder to ignore static library, needed on Ubuntu 13.10

--- FindLibJpegTurbo.cmake
+++ FindLibJpegTurbo.cmake
@@ -20,7 +20,7 @@

 # Finally the library itself
 find_library(LibJpegTurbo_LIBRARY
-  NAMES turbojpeg
+  NAMES turbojpeg.so
   PATHS ${LibJpegTurbo_PKGCONF_LIBRARY_DIRS} /opt/libjpeg-turbo/lib
 )


Include fix for precompiled header

Include fix for precompiled header

--- Plugins/PluginTemplate.cmake
+++ Plugins/PluginTemplate.cmake
@@ -45,7 +45,7 @@
     string(REGEX REPLACE ";" "\n" WIN_DEFS "${WIN_DEFS}")
     FILE(WRITE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/Debug/${PROJECT_NAME}_config.txt"
         "project_id:\n${PROJECT_ID}\n"
-        "include_dirs:\n${target_include_dirs_}\n"
+        "include_dirs:\n${target_include_dirs_}\n${CMAKE_CURRENT_LIST_DIR}/src\n"
         "lib_dirs_debug:\n${link_dirs_debug}\n${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/Debug\n"
         "lib_dirs_release:\n${link_dirs_release}\n${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/RelWithDebInfo\n"
         "compile_options:\n/DPROJECT_BUILD_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\" ${WIN_DEFS} /DPLUGIN_NAME=${PROJECT_NAME} /FI\"EagleLib/Detail/PluginExport.hpp\""
@@ -53,7 +53,7 @@

     FILE(WRITE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/RelWithDebInfo/${PROJECT_NAME}_config.txt"
         "project_id:\n${PROJECT_ID}\n"
-        "include_dirs:\n${target_include_dirs_}\n"
+        "include_dirs:\n${target_include_dirs_}\n${CMAKE_CURRENT_LIST_DIR}/src\n"
         "lib_dirs_debug:\n${link_dirs_debug}\n${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/Debug\n"
         "lib_dirs_release:\n${link_dirs_release}\n${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/RelWithDebInfo\n"
         "compile_options:\n/DPROJECT_BUILD_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\" ${WIN_DEFS} /DPLUGIN_NAME=${PROJECT_NAME} /FI\"EagleLib/Detail/PluginExport.hpp\""
@@ -64,7 +64,7 @@

     FILE(WRITE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${PROJECT_NAME}_config.txt"
         "project_id:\n${PROJECT_ID}\n"
-        "\ninclude_dirs:\n${target_include_dirs_}\n"
+        "\ninclude_dirs:\n${target_include_dirs_}\n${CMAKE_CURRENT_LIST_DIR}/${PROJECT_NAME}/src\n"
         "\nlib_dirs_debug:\n${link_dirs_debug}\n${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/Debug\n"
         "\nlib_dirs_release:\n${link_dirs_release}\n${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/RelWithDebInfo\n"
         "\ncompile_options:\n-DPROJECT_BUILD_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\"\n${WIN_DEFS}\n-DPLUGIN_NAME=${PROJECT_NAME}\n"


fix plugin build path

fix plugin build path

--- Plugins/PluginTemplate.cmake
+++ Plugins/PluginTemplate.cmake
@@ -11,7 +11,14 @@
 get_target_property(target_link_libs_    ${PROJECT_NAME} LINK_LIBRARIES)

 set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER Plugins)
-set_target_properties(${PROJECT_NAME} PROPERTIES CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Plugins)
+set_target_properties(${PROJECT_NAME}
+    PROPERTIES
+        CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/Plugins
+        CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/Plugins
+        CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/Plugins
+)
+set_target_properties(${PROJECT_NAME} PROPERTIES LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin/Plugins)
+

 ocv_add_precompiled_header_to_target(${PROJECT_NAME} src/precompiled.hpp)


Fix pack-glow.cmake.

Fix pack-glow.cmake.

--- packages/pack-glow.cmake
+++ packages/pack-glow.cmake
@@ -134,11 +134,11 @@

     # Install files

-    if(APPLE)
-        set(CPACK_INSTALL_CMAKE_PROJECTS        "${CMAKE_BINARY_DIR};glow;/")
-    else()
+#    if(APPLE)
+#        set(CPACK_INSTALL_CMAKE_PROJECTS        "${CMAKE_BINARY_DIR};glow;/")
+#    else()
         set(CPACK_INSTALL_CMAKE_PROJECTS        "${CMAKE_BINARY_DIR};glow;ALL;/")
-    endif()
+#    endif()
     set(CPACK_PACKAGE_INSTALL_DIRECTORY     "${package_name}")
     set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY  "${package_name}")
     if(NOT WIN32)


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"

--- plugins/morse/ktpaccountskcm_plugin_morse.desktop.cmake
+++ plugins/morse/ktpaccountskcm_plugin_morse.desktop.cmake
@@ -30,6 +30,7 @@
 Comment[sr@ijekavianlatin]=Korisničko sučelje za podešavanje posebnih naloga pod menadžerom veze Morse.
 Comment[sr@latin]=Korisničko sučelje za podešavanje posebnih naloga pod menadžerom veze Morse.
 Comment[sv]=Användargränssnitt för anpassad kontoinställning av konton som använder anslutningshanteraren Morse.
+Comment[tr]=Morse bağlantı yöneticisi kullanan hesaplar için özel hesap yapılandırma kullanıcı arayüzü.
 Comment[uk]=Інтерфейс користувача для нетипового налаштовування облікового запису за допомогою керування з’єднаннями Morse.
 Comment[x-test]=xxCustom account configuration user interface for accounts using the Morse connection manager.xx
 Comment[zh_CN]=通过 Morse 连接管理器自定义账户的配置界面


[CMake][Fuchsia] Drop libclang.so from distribution

This is no longer needed now that all users have switched to clangd.

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

--- cmake/caches/Fuchsia-stage2.cmake
+++ cmake/caches/Fuchsia-stage2.cmake
@@ -163,7 +163,6 @@

 set(LLVM_DISTRIBUTION_COMPONENTS
   clang
-  libclang
   lld
   LTO
   clang-apply-replacements


Fortran is not a prerequisite for building ROOT

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@41478 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -4,7 +4,7 @@

 #---Enable FORTRAN (unfortunatelly is not nowt possible in all cases)-------------------------------
 if(NOT WIN32 AND NOT CMAKE_GENERATOR STREQUAL Xcode)
-  enable_language(Fortran)
+  enable_language(Fortran OPTIONAL)
 endif()


Fix for ROOT-6459

Fix for ROOT-6459

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -125,7 +125,9 @@
     endif()
     if(files)
       foreach(s ${files})
-        if(s MATCHES "${cwd}/G__") # Eliminate G__* files only when using wildcards
+        if(fp MATCHES "[*]" AND s MATCHES "(^|/)G__") # Eliminate G__* files
+        elseif(s MATCHES "${cwd}/G__")
+          set(sources ${fp} ${sources})
         else()
           set(sources ${sources} ${s})
         endif()


[cxxmodules] Removed `libXXX.so` from C++ module names.

The Core module is now just called `Core`, and no longer `libCore.so`,
which leads to the confusing PCM file name `libCore.so.pcm` which is 75%
just boilerplate prefixes and suffixes. This also make the error
messages from clang more readable now as they use the same module name.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -450,8 +450,8 @@
   # files which for some reason (temporarily?) cannot be put in the PCH. Eg.
   # all rest of the first dict is in the PCH but this file is not and it
   # cannot be present in the original dictionary.
-  if(NOT ARG_MULTIDICT)
-    ROOT_CXXMODULES_APPEND_TO_MODULEMAP("${library_name}" "${headerfiles}")
+  if(ARG_MODULE AND NOT ARG_MULTIDICT)
+    ROOT_CXXMODULES_APPEND_TO_MODULEMAP("${ARG_MODULE}" "${headerfiles}")
   endif()
 endfunction()

@@ -480,7 +480,7 @@
     # FIXME: Krb5Auth.h triggers "declaration of '__mb_cur_max' has a different language linkage"
     # problem.
     # FIXME: error: declaration of 'NSObject' must be imported from module 'ROOT.libBonjour.so.TBonjourBrowser.h' before it is required
-    if (${library} MATCHES "libKrb5Auth.so" OR ${library} MATCHES "(libGCocoa|libGQuartz)\\..*")
+    if (${library} MATCHES "Krb5Auth" OR ${library} MATCHES "(GCocoa|GQuartz)")
       return()
     endif()
   endif(APPLE)
@@ -501,7 +501,7 @@

   set(modulemap_entry "module \"${library}\" {")
   # For modules GCocoa and GQuartz we need objc context.
-  if (${library} MATCHES "(libGCocoa|libGQuartz)\\..*")
+  if (${library} MATCHES "(GCocoa|GQuartz)")
     set (modulemap_entry "${modulemap_entry}\n  requires objc\n")
   else()
     set (modulemap_entry "${modulemap_entry}\n  requires cplusplus\n")


Change cxx std to PUBLIC

Change cxx std to PUBLIC

--- cmakemodules/DeclareMRPTLib.cmake
+++ cmakemodules/DeclareMRPTLib.cmake
@@ -32,7 +32,7 @@
 	else()
 		if (NOT MSVC)
 			# Modern, clean way to do this:
-			target_compile_features(${_TARGET} INTERFACE cxx_std_17)
+			target_compile_features(${_TARGET} PUBLIC cxx_std_17)
 		else()
 			# At present (CMake 3.12 + MSVC 19.15.26732.1) it seems cxx_std_17
 			# does not enable C++17 in MSVC (!).


make: run xmllint under bash

make: run xmllint under bash

Signed-off-by: Jeffrey Elms <23ce84ca7a7de9dc17ad8e8b0bbd717d4f9f9884@freshred.net>

--- make/devices.cmake
+++ make/devices.cmake
@@ -304,11 +304,11 @@
   add_custom_command(
     OUTPUT ${XML_LINT_LINT_OUTPUT}
     DEPENDS ${XML_LINT_FILE} ${XML_LINT_SCHEMA} ${XMLLINT} ${XMLLINT_TARGET}
-    COMMAND
-    ${XMLLINT}
+    COMMAND bash -c
+    '${XMLLINT}
     --output ${XML_LINT_LINT_OUTPUT}
     --schema ${XML_LINT_SCHEMA}
-    ${XML_LINT_FILE} 2>&1 |  head -n10 && [ "$$\{PIPESTATUS[0]\}" -eq 0 ]
+    ${XML_LINT_FILE} 2>&1 |  head -n10 && exit "$$\{PIPESTATUS[0]\}" '
     )
   add_custom_target(
     ${XML_LINT_NAME}


Fix FindOpenEXR.cmake to use version detected by pkg-config, if available (#2057)

Detecting the OpenEXR version by parsing a C header can be unreliable.  Since
 we already use pkg-config to detect the presence of the library, we can also
 use the version number it gives us, if available, and only resort to parsing
 the header file if that failed.

See-Also: https://bugs.gentoo.org/668412
Fixes: ec4f679cd7ba175a5470a6198c07ebc6780f4c29

--- src/cmake/modules/FindOpenEXR.cmake
+++ src/cmake/modules/FindOpenEXR.cmake
@@ -60,7 +60,11 @@
 find_path (OPENEXR_INCLUDE_PATH OpenEXR/OpenEXRConfig.h)

 # Try to figure out version number
-if (EXISTS "${OPENEXR_INCLUDE_PATH}/OpenEXR/ImfMultiPartInputFile.h")
+if (DEFINED _OPENEXR_VERSION AND NOT "${_OPENEXR_VERSION}" STREQUAL "")
+    set (OPENEXR_VERSION "${_OPENEXR_VERSION}")
+    string (REGEX REPLACE "([0-9]+)\\.[0-9]+" "\\1" OPENEXR_VERSION_MAJOR "${_OPENEXR_VERSION}")
+    string (REGEX REPLACE "[0-9]+\\.([0-9]+)" "\\1" OPENEXR_VERSION_MINOR "${_OPENEXR_VERSION}")
+elseif (EXISTS "${OPENEXR_INCLUDE_PATH}/OpenEXR/ImfMultiPartInputFile.h")
     # Must be at least 2.0
     file(STRINGS "${OPENEXR_INCLUDE_PATH}/OpenEXR/OpenEXRConfig.h" TMP REGEX "^#define OPENEXR_VERSION_STRING .*$")
     string (REGEX MATCHALL "[0-9]+[.0-9]+" OPENEXR_VERSION ${TMP})


enabled static linkage of libstdc++ and libgcc for apps to ensure portability of executables

--- util/cmake/SeqAnBuildSystem.cmake
+++ util/cmake/SeqAnBuildSystem.cmake
@@ -142,6 +142,12 @@
     set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DSEQAN_ENABLE_DEBUG=0")
     set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DSEQAN_ENABLE_DEBUG=0")
     set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSEQAN_ENABLE_DEBUG=1")
+
+    # enable static linkage for seqan apps
+    if (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG AND NOT MINGW)
+      set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+      set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
+    endif ()

     # Get all direct entries of the current source directory into ENTRIES.
     file (GLOB ENTRIES


fix incorrect setting of EMBREE_PATH when building from source

--- scripts/superbuild/dependencies/dep_embree.cmake
+++ scripts/superbuild/dependencies/dep_embree.cmake
@@ -49,7 +49,7 @@
   )

   if (NOT WIN32)
-    set(EMBREE_PATH "${EMBREE_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake/embree-${BUILD_EMBREE_VERSION}")
+    set(EMBREE_PATH "${EMBREE_PATH}/lib/cmake/embree-${BUILD_EMBREE_VERSION}")
   endif()

   ExternalProject_Add_StepDependencies(${COMPONENT_NAME} configure ispc tbb)


FIX (#1139): rpath works for internal mbi builds as well

--- BlueBerry/CMake/MacroInstallPlugin.cmake
+++ BlueBerry/CMake/MacroInstallPlugin.cmake
@@ -41,7 +41,7 @@
   SET(_target_install_rpath ${CMAKE_INSTALL_RPATH})
   FOREACH(_dep ${_plugin_dependencies})
     SET(_linklib_path "${${_dep}_OUT_DIR}")
-    STRING(REPLACE "${CMAKE_BINARY_DIR}" "${CMAKE_INSTALL_PREFIX}" _linklib_path "${_linklib_path}")
+    STRING(REPLACE "${MITK_BINARY_DIR}" "${CMAKE_INSTALL_PREFIX}" _linklib_path "${_linklib_path}")
     LIST(APPEND _target_install_rpath "${_linklib_path}/bin")
   ENDFOREACH()
   SET_TARGET_PROPERTIES(${_INSTALL_TARGETS}


Include the correct CMake script for compiler flag checks.

--- CMake/usFunctionCheckCompilerFlags.cmake
+++ CMake/usFunctionCheckCompilerFlags.cmake
@@ -22,7 +22,7 @@
 #    2-myflags: -fprofile-arcs
 #    3-myflags: -fprofile-arcs -Wall

-include(TestCXXAcceptsFlag)
+include(CheckCXXCompilerFlag)

 function(usFunctionCheckCompilerFlags FLAG_TO_TEST RESULT_VAR)


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

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


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   11)
+SET(KWSYS_DATE_STAMP_DAY   12)


Some additional NAMEs for dependencies seen in pkg-config

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

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -208,7 +208,7 @@

 macro (configure_gstreamer)
     sagase_configure_package (GSTREAMER
-        NAMES gstreamer gst
+        NAMES gstreamer gst gstreamer-0.10
         COMPONENTS libavcodec libavformat libavutil libgstapp-0.10 libgstaudio-0.10 libgstbase-0.10 libgstcontroller-0.10 ibgstdataprotocol-0.10 libgstdshow-0.10 libgstinterfaces-0.10 libgstnet-0.10 libgstnetbuffer-0.10 libgstpbutils-0.10 libgstriff-0.10 libgstreamer-0.10 libgstrtp-0.10 libgstrtsp-0.10 libgstsdp-0.10 libgsttag-0.10 libgstvideo-0.10 libjpeg-static libjpeg gst # gst added to help sagese to find include folder with gst.h file
         PREFIXES ${ENV_NAALI_DEP_PATH})
     sagase_configure_report (GSTREAMER)
@@ -216,7 +216,7 @@

 macro (configure_dbus)
     sagase_configure_package (DBUS
-        NAMES dbus
+        NAMES dbus dbus-1
         COMPONENTS dbus-1 dbus # dbus added to help sagese to find include folder with dbus.h file
         PREFIXES ${ENV_NAALI_DEP_PATH})
     sagase_configure_report (DBUS)
@@ -248,7 +248,7 @@

 macro (configure_farsight2)
     sagase_configure_package (FARSIGHT2
-        NAMES farsight2
+        NAMES farsight2 farsight2-0.10
         COMPONENTS gstfarsight fs-interfaces # fs-interfaces added to help sagese to find include folder with fs-interfaces.h file
         PREFIXES ${ENV_NAALI_DEP_PATH}/farsight2)
     sagase_configure_report (FARSIGHT2)


Issue #43: Add support for VS2015.

Issue #43: Add support for VS2015.

--- CMake/ExternalProjects/Boost.cmake
+++ CMake/ExternalProjects/Boost.cmake
@@ -79,6 +79,9 @@
       elseif(MSVC_VERSION EQUAL 1800)
         set(_boost_with_toolset "vc12")
         set(_boost_toolset "msvc-12.0")
+      elseif(MSVC_VERSION EQUAL 1900)
+        set(_boost_with_toolset "vc14")
+        set(_boost_toolset "msvc-14.0")
       endif()
     endif()
     set(_install_lib_dir "--libdir=<INSTALL_DIR>/bin")


Use CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION to find DirectX11 SDK

--- CMake/Packages/FindDirectX11.cmake
+++ CMake/Packages/FindDirectX11.cmake
@@ -20,8 +20,8 @@

 	# Windows 10 Universal SDK
 	if(MSVC14)
-		if(VS_TARGET_PLATFORM_VERSION)
-			set(W10SDK_VER VS_TARGET_PLATFORM_VERSION)
+		if(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION)
+			set(W10SDK_VER ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION})
 		else()
 			set(W10SDK_VER 10.0.10240.0)
 		endif()


Added missing Path to Modules

Added missing Path to Modules

--- CMake/mitkFunctionWhitelists.cmake
+++ CMake/mitkFunctionWhitelists.cmake
@@ -160,7 +160,7 @@
     foreach(module ${${ARGV1}})
       list(FIND enabled_modules ${module} index)
       if(NOT index EQUAL -1)
-        add_subdirectory(${module})
+        add_subdirectory(Modules/${module})
       endif()
     endforeach()
   endif()