WIP: activate openmp only *nix

WIP: activate openmp only *nix

--- CMake/FindShark.cmake
+++ CMake/FindShark.cmake
@@ -115,6 +115,10 @@
   set(SHARK_USE_OPENMP TRUE CACHE BOOL "shark is built with OpenMP" FORCE)
 endif()

+#This is quick fix/hack/commit that will get back all failing tests on
+# The good fix must to fix all those failing tests. They are crashing
+# due to openmp issues which only popup with this fix
+if(NOT WIN32)
 if(SHARK_USE_OPENMP)
   message(STATUS "Shark is built with OpenMP: SHARK_USE_OPENMP = TRUE")
   find_package(OpenMP REQUIRED QUIET)
@@ -129,6 +133,8 @@
 else()
   message(STATUS "Shark is built without OpenMP: SHARK_USE_OPENMP = FALSE")
 endif()
+endif(NOT WIN32)
+
 INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Shark
   REQUIRED_VARS SHARK_LIBRARY SHARK_INCLUDE_DIR


Revert "Added more flags for using OpenGL libraries"

This reverts commit c3d05fab4fc49be87761199dd876549e5a0951e8.

The changes are causing failures with ParaView. We don't have dashboard
setup to test that these changes are working.

--- CMake/vtkOpenGL.cmake
+++ CMake/vtkOpenGL.cmake
@@ -18,11 +18,7 @@

 # OSMesa logic for offscreen mesa rendering.
 option(VTK_OPENGL_HAS_OSMESA
-  "The OpenGL library being used supports / can be combined with off screen Mesa calls" OFF)
-
-# OSMesa offscreen mesa rendering.
-option(VTK_USE_OSMESA
-  "Use OSMesa for off screen rendering." OFF)
+  "The OpenGL library being used supports off screen Mesa calls" OFF)
 # EGL offscreen rendering
 option(VTK_USE_OFFSCREEN_EGL
   "Use EGL for OpenGL client API for offscreen rendering." OFF)
@@ -37,29 +33,33 @@
 endif()

 option(VTK_USE_OFFSCREEN "Use off screen calls by default" OFF)
-
-if(VTK_USE_X OR VTK_USE_COCOA OR WIN32 OR ANDROID OR APPLE_IOS OR VTK_USE_OSMESA)
+unset(VTK_CAN_DO_OFFSCREEN)
+if(VTK_OPENGL_HAS_OSMESA OR WIN32 OR VTK_USE_OFFSCREEN_EGL)
+  set(VTK_CAN_DO_OFFSCREEN 1)
+endif()
+if(VTK_USE_X OR VTK_USE_COCOA OR WIN32 OR ANDROID OR APPLE_IOS)
+  set(VTK_USE_OSMESA FALSE)
   if (VTK_USE_OFFSCREEN_EGL)
     message(FATAL_ERROR "VTK_USE_OFFSCREEN_EGL set together with one of ("
-      "VTK_USE_X, VTK_USE_COCOA, VTK_USE_OSMESA, WIN32, ANDROID OR APPLE_IOS). "
-      "You cannot use both offscreen and one of the listed windowing systems or "
-      "alternative offscreen rendering backends.")
+      "VTK_USE_X, VTK_USE_COCOA, WIN32, ANDROID OR APPLE_IOS). "
+      "You cannot use both offscreen and one of the listed windowing systems.")
   endif()
+elseif(VTK_USE_OFFSCREEN_EGL)
+  set(VTK_USE_OSMESA FALSE)
+else()
+  set(VTK_USE_OSMESA TRUE)
 endif()

-mark_as_advanced(VTK_USE_X VTK_OPENGL_HAS_OSMESA VTK_USE_OSMESA VTK_USE_OFFSCREEN_EGL
+mark_as_advanced(VTK_USE_X VTK_OPENGL_HAS_OSMESA VTK_USE_OFFSCREEN_EGL
   VTK_USE_OFFSCREEN VTK_EGL_DEVICE_INDEX)

 if(VTK_USE_OSMESA)
-    find_package(OSMesa REQUIRED)
-    include_directories(SYSTEM ${OSMESA_INCLUDE_DIR})
-endif()
-if(VTK_USE_OFFSCREEN_EGL)
+  find_package(OSMesa REQUIRED)
+  include_directories(SYSTEM ${OSMESA_INCLUDE_DIR})
+elseif(VTK_USE_OFFSCREEN_EGL)
     find_package(EGL REQUIRED)
     include_directories(SYSTEM ${EGL_INCLUDE_DIR})
-endif()
-
-if(VTK_USE_X OR VTK_USE_COCOA OR WIN32 OR ANDROID OR APPLE_IOS)
+else()
   find_package(OpenGL REQUIRED)
   include_directories(SYSTEM ${OPENGL_INCLUDE_DIR})
   if(APPLE)
@@ -80,18 +80,12 @@
 endif()

 # Function to link a VTK target to the necessary OpenGL libraries.
-set(VTK_OPENGL_LINK_LIBRARIES)
-
-if(VTK_USE_OFFSCREEN_EGL)
-  set(VTK_OPENGL_LINK_LIBRARIES ${VTK_OPENGL_LINK_LIBRARIES} ${EGL_LIBRARIES})
-endif()
-if(VTK_USE_OSMESA)
-  set(VTK_OPENGL_LINK_LIBRARIES ${VTK_OPENGL_LINK_LIBRARIES} ${OSMESA_LIBRARY})
-endif()
-if(VTK_USE_X OR VTK_USE_COCOA OR WIN32 OR ANDROID OR APPLE_IOS)
-  set(VTK_OPENGL_LINK_LIBRARIES ${VTK_OPENGL_LINK_LIBRARIES} ${OPENGL_LIBRARIES})
-endif()
-
 function(vtk_opengl_link target)
-  vtk_module_link_libraries(${target} LINK_PRIVATE ${VTK_OPENGL_LINK_LIBRARIES})
+  if(VTK_USE_OSMESA)
+    vtk_module_link_libraries(${target} LINK_PRIVATE ${OSMESA_LIBRARY})
+  elseif(VTK_USE_OFFSCREEN_EGL)
+    vtk_module_link_libraries(${target} LINK_PRIVATE ${EGL_LIBRARIES})
+  else()
+    vtk_module_link_libraries(${target} LINK_PRIVATE ${OPENGL_LIBRARIES})
+  endif()
 endfunction()


FIX: remove duplicate slash

FIX: remove duplicate slash

--- CMakeLists.unix.cmake
+++ CMakeLists.unix.cmake
@@ -6,7 +6,7 @@

 	SET(SYSTEMD_SUPPORT ON CACHE BOOL "Enable systemd support")
 	# Fixed directory for service files
-	set(SERVICE_INSTALL_PREFIX "/" CACHE STRING "Install prefix for service files (for packaging only)")
+	set(SERVICE_INSTALL_PREFIX "" CACHE STRING "Install prefix for service files (for packaging only)")

 	set(CMAKE_INSTALL_SYSTEMD_UNIT_PATH ${SERVICE_INSTALL_PREFIX}/usr/lib/systemd/system)
 	set(CMAKE_BUILD_SYSTEMD_UNIT_PATH ${CMAKE_BINARY_DIR}/target/${CMAKE_INSTALL_SYSTEMD_UNIT_PATH})


Handle spaces in log directory names

Handle spaces in log directory names

--- CMakeUnitRunner.cmake
+++ CMakeUnitRunner.cmake
@@ -177,8 +177,10 @@
          "                 \" failed with \${RESULT}\"\n"
          "                 \"\\n\${ERROR}\\n\${OUTPUT}\")\n"
          "    endif (RESULT EQUAL 0 OR ADD_COMMAND_ALLOW_FAIL)\n"
-         "    set (OUTPUT_LOG ${TEST_WORKING_DIRECTORY_NAME}/\${STEP}.output)\n"
-         "    set (ERROR_LOG ${TEST_WORKING_DIRECTORY_NAME}/\${STEP}.error)\n"
+         "    set (OUTPUT_LOG\n"
+         "         \"${TEST_WORKING_DIRECTORY_NAME}/\${STEP}.output\")\n"
+         "    set (ERROR_LOG\n"
+         "         \"${TEST_WORKING_DIRECTORY_NAME}/\${STEP}.error\")\n"
          "    file (WRITE\n"
          "          \"\${OUTPUT_LOG}\"\n"
          "          \"Output:\\n\"\n"


Updating ITK superbuild version along 4.10 release

ITK now sets CMP0063 to new to for setting of visibility.

Change-Id: I26f9289698764da978f680381503783afeb9f66e

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -40,7 +40,7 @@
 endif()

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG 1bf7263085f1d700518bf968248647a1ccb971df ) # just after 4.10.0 release
+set(ITK_TAG_COMMAND GIT_TAG 8565bd9b4bc4446b05554e11ccb27bda1d6db647 ) # just after 4.10.0 release

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )


Update ITK superbuild version along ITK v41.3 release

This contains the following patches:
71f56c7 BUG: Handle case where output image is zero sized
46814c9 BUG: Prevent concurrent read/write in output image
feb3c8f COMP: Fix VNL to compile with gcc8.
81cd816 COMP: fix warning about implicit double to bool conversion
80c09b3 COMP: Wrap MultiResolutionPDEDeformableRegistration for Pyramid filter types
0f7368d BUG: Add specification of OutputImage Type for TobogganImageFilter
6c54fda COMP: Detect Linux in itkMemoryUsageObserver.h on Alpine Linux
7443627 BUG: Wrap long long instead of long
8912e22 BUG: Prevent gdcm "missing implementation" error on macOS
408b9d1 COMP: Work around RegionGrow2DTest compiler error on ppc64le
a76df7c ENH: Add Python wrap file to itk::MultiResolutionPDEDeforableRegistration.
50c6212 COMP: Mangle HDF5 symbol names
5c0f6bc BUG: fixed crash on macOS under guardmalloc from RunOSCheck()
e946688 BUG: Add missing extensions to ImageIO
0fe114e BUG: fix itkFormatWarning in Python wrapping
f4d0719 COMP: Fixed some missing name mangling of libTIFF symbols
eca2c56 STYLE: arranged/alphabetized things to make subsequent changes reviewable
ec4661d BUG: Initializes CMAKE_DEBUG_POSTFIX to be empty
fac2ddc COMP: Update SimpleITKFilters for dependency issues
f8d81ee COMP: Worked around endless VS2015 Release compilation on Math::Floor
8e07c30 ENH: Ensure external module examples get added to current build tree
a37d85c BUG: Allow module examples to be enabled when built externally
88561d0 COMP: Enable pthreads shim with Emscripten
7da6ca0 COMP: Do not use absolute path to TestBigEndian.cmake in GDCM
0410c40 COMP: Use anonymous namespace for internal linkage
418559a ENH: Add wrapping for BSplineTransformInitializer

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

-set(ITK_GIT_TAG "v4.13.0" CACHE STRING "Tag in ITK git repo")
+set(ITK_GIT_TAG "f255188244973c105545222bd072a8d5b66a7d7e" CACHE STRING "Tag in ITK git repo")
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")


Updating ITK version with BSpline mesh parameter fix

This patch is along the ITK release-4.13 branch. It contains a fix for
keeping the TransformDomain parameters in sync with the Fixed
parameters.

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

-set(ITK_GIT_TAG "4cfd25bee7a590244bd28155e37640fe55ec4181" CACHE
+set(ITK_GIT_TAG "4a6e8c84198a741d18a2a39e616c26dda09b6686" CACHE
   STRING "Tag in ITK git repo") # release-4.13
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")


ENH: Specify which version of Qt we are looking for to avoid problems when finding Qt3 and Qt4

--- SuperBuild/External_Qt4.cmake
+++ SuperBuild/External_Qt4.cmake
@@ -36,7 +36,7 @@
 # Include dependent projects if any
 SlicerMacroCheckExternalProjectDependency(${proj})

-find_package(${extProjName} ${${extProjName}_REQUIRED_VERSION} COMPONENTS QtCore QtGui QtNetwork QtXml REQUIRED )
+find_package(${proj} ${${extProjName}_REQUIRED_VERSION} COMPONENTS QtCore QtGui QtNetwork QtXml REQUIRED )
 # The project is provided using ${extProjName}_DIR, nevertheless since other
 # project may depend on ${extProjName}, let's add an 'empty' one
 SlicerMacroEmptyExternalProject(${proj} "${${proj}_DEPENDENCIES}")


Windows+Mac good with 1.58. Need to check Linux

--- src/CMake/BoostConfig.cmake
+++ src/CMake/BoostConfig.cmake
@@ -67,14 +67,11 @@

   IF(${compress_type} MATCHES "GIT")

-#    IF(APPLE)
-      # TODO: temporary - switch git tag back to master for all
-      #       builds once boost 1.56 is available and boost atomic
-      #       library fix is verified.
-      SET(boost_GIT_TAG "origin/boost_1_58_test")
-#    ELSE()
-#      SET(boost_GIT_TAG "origin/boost_1_56_test")
-#    ENDIF()
+
+# TODO: temporary - switch git tag back to master for all
+#       builds once boost 1.56 is available and boost atomic
+#       library fix is verified.
+SET(boost_GIT_TAG "origin/boost_1_58_test")

     # TODO: fix install step
     #


COMP: use https instead of git for clones

--- CMake/ExternalProjectDependency.cmake
+++ CMake/ExternalProjectDependency.cmake
@@ -102,7 +102,7 @@
 #     [...]
 #     )
 #
-option(${SUPERBUILD_TOPLEVEL_PROJECT}_USE_GIT_PROTOCOL "If behind a firewall turn this off to use https instead." ON)
+option(${SUPERBUILD_TOPLEVEL_PROJECT}_USE_GIT_PROTOCOL "If behind a firewall turn this off to use https instead." OFF)
 set(EP_GIT_PROTOCOL "git")
 if(NOT ${SUPERBUILD_TOPLEVEL_PROJECT}_USE_GIT_PROTOCOL)
   set(EP_GIT_PROTOCOL "https")


qt4.cmake: Don't skip qt-accessibility.

qt4.cmake: Don't skip qt-accessibility.

--- qt4.cmake
+++ qt4.cmake
@@ -82,9 +82,9 @@
         -no-dbus
         -no-cups
         -no-nis
+        #-no-accessibility # Must include accessibility because PySide tries to build wrappers for it.
         -release
         -shared
-        -no-accessibility
         -fontconfig
         -system-zlib
         -system-libpng


Update dependencies.

Update dependencies.

--- build/cmake/versions.cmake
+++ build/cmake/versions.cmake
@@ -1,6 +1,6 @@
 # Define the versions of the various dependencies to build.
-set(API_UMBRELLA_STATIC_SITE_VERSION da09685560c3e7021380be33d932de6cbac10f55)
-set(API_UMBRELLA_STATIC_SITE_HASH 29e9864e723c2c1f7bc5a9e664c82e46)
+set(API_UMBRELLA_STATIC_SITE_VERSION e54283244890e3d5ffeb7ec00dde2f5eaa778d28)
+set(API_UMBRELLA_STATIC_SITE_HASH 037b9317f6b08eb2073060c1beed16e2)
 set(BUNDLER_VERSION 1.13.6)
 set(BUNDLER_HASH fafd22dfed658ca0603f321bdd168ed709d7c682e61273b55637716459f2d0f7)
 set(ELASTICSEARCH_VERSION 1.7.6)
@@ -23,8 +23,8 @@
 set(LIBFASTJSON_HASH 5a24c9adcd0bf5307c972de5e9ea4ce9)
 set(LIBGEOIP_VERSION 1.6.9)
 set(LIBGEOIP_HASH 7475942dc8155046dddb4846f587a7e6)
-set(LIBLOGGING_VERSION b002bc486313d3ab9307389d6b7cc154f060832d)
-set(LIBLOGGING_HASH 0347559126b053245943daa731960e26)
+set(LIBLOGGING_VERSION 2c95b7beb7f417eb9f25705529fccf64ea4a651b)
+set(LIBLOGGING_HASH adda94c3c04a5230a67165356eaa4c4d)
 set(LIBRDKAFKA_VERSION 0.9.2)
 set(LIBRDKAFKA_HASH f2cc5ca6a149928c3cb34398379a5024)
 set(LUAROCKS_VERSION 2.4.2)


cmake: fix MIC test target dependencies

cmake: fix MIC test target dependencies

Signed-off-by: Matthias Kretz <372ea4eca737a13cd010ee806d4ce7b98ee71550@kde.org>

--- cmake/FindMIC.cmake
+++ cmake/FindMIC.cmake
@@ -183,6 +183,7 @@

 if(MIC_NATIVE_FOUND)
    macro(_mic_add_object _target _source _output)
+      get_property(_deps SOURCE "${_source}" PROPERTY OBJECT_DEPENDS)
       get_filename_component(_abs "${_source}" ABSOLUTE)
       get_filename_component(_ext "${_source}" EXT)
       get_filename_component(_tmp "${_source}" NAME_WE)
@@ -206,7 +207,7 @@
          COMMAND "${_compiler}" -mmic
          -DVC_IMPL=MIC
          ${_flags} -c -o "${${_output}}" "${_abs}"
-         DEPENDS "${_abs}"
+         DEPENDS "${_abs}" ${_deps}
          IMPLICIT_DEPENDS ${_lang} "${_abs}"
          WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
          COMMENT "Compiling (MIC) ${${_output}}"


FindXDR no longer terminates if it can't find the headers.

--- cmake/FindXDR.cmake
+++ cmake/FindXDR.cmake
@@ -18,7 +18,7 @@
 #check for the XDR functions: their interface and the libraries they're hidden in.
 CHECK_INCLUDE_FILE_CXX(rpc/types.h XDR_HAS_RPC_TYPES_H)
 IF(NOT XDR_HAS_RPC_TYPES_H)
-    MESSAGE(SEND_ERROR "Cannot find RPC headers (rpc/types.h). Persistence will be disabled!")
+    MESSAGE(STATUS "Cannot find RPC headers (rpc/types.h). Persistence will be disabled!")
 ELSE()
 	CHECK_CXX_SOURCE_COMPILES("#include <rpc/types.h>
 		#include <rpc/xdr.h>


FIX: propagation dependencies under linux

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -104,36 +104,32 @@
     list(APPEND libs_deps ${${lib}_LIB_DEPENDS})
   endforeach()

-  # To produce a library we need at least one source file.
-  # It is created by add_custom_command below and will helps
-  # also help to track dependencies.
-  set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}_dummy.c)
-
-  # Make the generated dummy source file depended on all static input
-  # libs. If input lib changes,the source file is touched
-  # which causes the desired effect (relink).
-  add_custom_command(OUTPUT ${dummyfile}
-    COMMAND ${CMAKE_COMMAND} -E touch ${dummyfile}
-    DEPENDS ${libs})
-
-  # Generate dummy staic lib
-  file(WRITE ${dummyfile} "const char * dummy = \"${dummyfile}\";")
-  add_library(${TARGET_NAME} STATIC ${dummyfile})
-  target_link_libraries(${TARGET_NAME} ${libs_deps})
-
-  foreach(lib ${libs})
-    # Get the file names of the libraries to be merged
-    set(libfiles ${libfiles} $<TARGET_FILE:${lib}>)
-  endforeach()
-
-  # Get the file name of the generated library
-  set(outlibfile "$<TARGET_FILE:${TARGET_NAME}>")
-
   if(APPLE) # Use OSX's libtool to merge archives
+    # To produce a library we need at least one source file.
+    # It is created by add_custom_command below and will helps
+    # also help to track dependencies.
+    set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}_dummy.c)
+
+    # Make the generated dummy source file depended on all static input
+    # libs. If input lib changes,the source file is touched
+    # which causes the desired effect (relink).
+    add_custom_command(OUTPUT ${dummyfile}
+      COMMAND ${CMAKE_COMMAND} -E touch ${dummyfile}
+      DEPENDS ${libs})
+
+    # Generate dummy staic lib
+    file(WRITE ${dummyfile} "const char * dummy = \"${dummyfile}\";")
+    add_library(${TARGET_NAME} STATIC ${dummyfile})
+    target_link_libraries(${TARGET_NAME} ${libs_deps})
+
+    foreach(lib ${libs})
+      # Get the file names of the libraries to be merged
+      set(libfiles ${libfiles} $<TARGET_FILE:${lib}>)
+    endforeach()
 		add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
       COMMAND rm "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET_NAME}.a"
       COMMAND /usr/bin/libtool -static -o "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET_NAME}.a" ${libfiles})
-	else() # general UNIX: use "ar" to extract objects and re-add to a common lib
+  else() # general UNIX: use "ar" to extract objects and re-add to a common lib
     foreach(lib ${libs})
       set(objlistfile ${lib}.objlist) # list of objects in the input library
       set(objdir ${lib}.objdir)
@@ -148,13 +144,27 @@
         DEPENDS ${lib} ${objdir}
         WORKING_DIRECTORY ${objdir})

+      # Empty dummy source file that goes into merged library
+      set(mergebase ${lib}.mergebase.c)
+      add_custom_command(OUTPUT ${mergebase}
+        COMMAND ${CMAKE_COMMAND} -E touch ${mergebase}
+        DEPENDS ${objlistfile})
+
+      list(APPEND mergebases "${mergebase}")
+    endforeach()
+
+    add_library(${TARGET_NAME} STATIC ${mergebases})
+    target_link_libraries(${TARGET_NAME} ${libs_deps})
+
+    # Get the file name of the generated library
+    set(outlibfile "$<TARGET_FILE:${TARGET_NAME}>")
+
+    foreach(lib ${libs})
       add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
-        COMMAND ${CMAKE_AR} ru ${outlibfile} *.o
-        WORKING_DIRECTORY ${objdir})
+        COMMAND ${CMAKE_AR} cr ${outlibfile} *.o
+        COMMAND ${CMAKE_RANLIB} ${outlibfile}
+        WORKING_DIRECTORY ${lib}.objdir)
     endforeach()
-
-    add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
-      COMMAND ${CMAKE_RANLIB} ${outlibfile})
   endif()
 endfunction(merge_static_libs)


0.3.2

--- cmake/version.cmake
+++ cmake/version.cmake
@@ -1 +1 @@
-set(HUNTER_VERSION "0.3.1")
+set(HUNTER_VERSION "0.3.2")


check for skarnet

check for skarnet

--- tools.cmake
+++ tools.cmake
@@ -1,7 +1,7 @@

 set(CMAKE_PREFIX_PATH /usr/share/bozo/lib/cmake)

-#find_package(Skarnet REQUIRED)
-#message(STATUS "Skarnet found: " ${SKARNET_VERSION_STRING})
-#include_directories(${SKARNET_INCLUDE_DIRS})
-#link_directories(${SKARNET_LIBRARY_DIRS})
+find_package(Skarnet REQUIRED)
+message(STATUS "Skarnet found: " ${SKARNET_VERSION_STRING})
+include_directories(${SKARNET_INCLUDE_DIRS})
+link_directories(${SKARNET_LIBRARY_DIRS})


remove zeromq cmake message

remove zeromq cmake message

--- etc/FindZeroMQ.cmake
+++ etc/FindZeroMQ.cmake
@@ -52,7 +52,7 @@
         else()
            find_library(ZeroMQ_LIBRARIES NAMES zmq HINTS ${_ZeroMQ_ROOT}/lib)
         endif()
-        message(zeromqlib ${ZeroMQ_LIBRARIES})
+        #        message(zeromqlib ${ZeroMQ_LIBRARIES})
     else()
         find_library(
             ZeroMQ_LIBRARY_RELEASE


updating CMake-MPI flags from deprecated ones.

--- cmake/mpi.cmake
+++ cmake/mpi.cmake
@@ -14,9 +14,13 @@
   message("Building with MPI support.")
   add_definitions(-DSPLATT_USE_MPI=${USE_MPI})
   find_package(MPI REQUIRED)
-  include_directories(SYSTEM ${MPI_INCLUDE_PATH})
   file(GLOB MPI_SOURCES src/mpi/*.c)
+
+  # set new MPI vars
+  include_directories(SYSTEM ${MPI_C_INCLUDE_PATH})
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_C_COMPILE_FLAGS}")
   set(SPLATT_LIBS ${SPLATT_LIBS} ${MPI_C_LIBRARIES})
+  SET(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_C_LINK_FLAGS}" )
 else()
   set(MPI_SOURCES "")
 endif()


Remove protoc library

Remove protoc library

--HG--
branch : win_support

--- cmake/SearchForStuff.cmake
+++ cmake/SearchForStuff.cmake
@@ -27,9 +27,6 @@
 endif()
 if (NOT PROTOBUF_PROTOC_EXECUTABLE)
   BUILD_ERROR ("Missing: Google Protobuf Compiler (protobuf-compiler)")
-endif()
-if (NOT PROTOBUF_PROTOC_LIBRARY)
-  BUILD_ERROR ("Missing: Google Protobuf Compiler Library (libprotoc-dev)")
 endif()

 include_directories(${PROTOBUF_INCLUDE_DIR})


Compite test suite with -Wno-inline with GNU frontends

Typically some flavours of MinGW produce around 13k lines of -Winline
warnings even though the library only uses inline sparringly and for ODR
reasons. There is no explicit "force inline" anywhere, so the warning is
just noise that clutters the compiler results and makes it impossible to
find other warnings in the logs.

--- cmake/cpp-sort-utils.cmake
+++ cmake/cpp-sort-utils.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2019-2020 Morwenn
+# Copyright (c) 2019-2022 Morwenn
 # SPDX-License-Identifier: MIT

 # Add a selection of warnings to a target
@@ -12,6 +12,9 @@
             $<$<CXX_COMPILER_ID:GNU>:-Wlogical-op -Wuseless-cast -Wzero-as-null-pointer-constant>
             # The warning when initializing an std::array is just too much of a bother
             $<$<CXX_COMPILER_ID:Clang>:-Wno-missing-braces>
+            # Without this we get thousands of -Winline warnings without even explicitly
+            # asking to inline anything, which makes compilation results unreadable
+            $<$<CXX_COMPILER_ID:GNU>:-Wno-inline>
         )
     endif()
 endmacro()


vSMCFindRandom test more edge cases

vSMCFindRandom test more edge cases

--- cmake/vSMCFindRandom.cmake
+++ cmake/vSMCFindRandom.cmake
@@ -10,13 +10,13 @@

     vsmc::cxx11::uniform_real_distribution<> runif(0, 1);
     for (int i = 0; i != N; ++i) {
-        int u = runif(eng.rng(i));
+        double u = runif(eng.rng(i));
         assert(u >= 0 && u <= 100);
     }

-    vsmc::cxx11::uniform_int_distribution<> ruint(1, 100);
+    vsmc::cxx11::uniform_int_distribution<std::size_t> ruint(1, 100);
     for (int i = 0; i != N; ++i) {
-        int u = ruint(eng.rng(i));
+        std::size_t u = ruint(eng.rng(i));
         assert(u >= 1 && u <= 100);
     }


Fix gcc link error on Solaris.

Fix gcc link error on Solaris.

--- groups/bdl/bdls/package/bdls.cmake
+++ groups/bdl/bdls/package/bdls.cmake
@@ -6,12 +6,14 @@
 function(bdls_process_package retPackage)
     process_package_base("" package ${ARGN})

-    bde_struct_get_field(interfaceTarget ${package} INTERFACE_TARGET)
-    bde_interface_target_link_libraries(
-        ${interfaceTarget}
-        PUBLIC
-            $<$<CXX_COMPILER_ID:SunPro>:socket>
-    )
+    if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+        bde_struct_get_field(interfaceTarget ${package} INTERFACE_TARGET)
+        bde_interface_target_link_libraries(
+            ${interfaceTarget}
+            PUBLIC
+                socket
+        )
+    endif()

     bde_return(${package})
-endfunction()+endfunction()


modify generated Revision.hpp

modify generated Revision.hpp

--- modules/revision.cmake
+++ modules/revision.cmake
@@ -5,10 +5,10 @@
 # @param[in] xpRelBranch : name of release branch (revision shows differently if on release branch)
 # http://stackoverflow.com/questions/3780667/use-cmake-to-get-build-time-svn-revision
 if(NOT DEFINED xpSourceDir)
-  message(FATAL_ERROR "xpSourceDir must be set before including cmsrevision.cmake")
+  message(FATAL_ERROR "xpSourceDir must be set before including revision.cmake")
 endif()
 if(NOT DEFINED xpRelBranch)
-  message(FATAL_ERROR "xpRelBranch must be set before including cmsrevision.cmake")
+  message(FATAL_ERROR "xpRelBranch must be set before including revision.cmake")
 endif()
 include(FindGit)
 if(NOT GIT_FOUND AND NOT UNIX)
@@ -21,8 +21,8 @@
   endif()
 endif()
 if(GIT_FOUND AND EXISTS "${xpSourceDir}/.git")
-  # xpRelBranch (release branch): year.week-date-gitdescribe (12.20-20120518-gitdescribe)
-  # other branches: user-branch-date-gitdescribe (smanders-padawan-20120518-gitdescribe)
+  # xpRelBranch (release branch): date yyyymmdd-gitdescribe (20120518-gitdescribe)
+  # other branches: user-branch-gitdescribe (smanders-padawan-gitdescribe)
   execute_process(COMMAND ${GIT_EXECUTABLE} name-rev --name-only HEAD
     WORKING_DIRECTORY ${xpSourceDir}
     OUTPUT_VARIABLE refsBranchName
@@ -30,8 +30,8 @@
     )
   string(REPLACE "remotes/origin/" "" branchName ${refsBranchName}) # submodules need this
   if(${branchName} STREQUAL ${xpRelBranch})
-    string(TIMESTAMP yw %y.%U)
-    set(revisionPrefix "${yw}")
+    string(TIMESTAMP ymd %Y%m%d)
+    set(revisionPrefix "${ymd}")
   elseif(UNIX)
     set(revisionPrefix "$ENV{USER}-${branchName}")
   else()
@@ -48,8 +48,7 @@
   if(gitErr) # no tags found...
     set(gitDescribe "notag")
   endif()
-  string(TIMESTAMP ymd %Y%m%d)
-  set(xpRevision "${revisionPrefix}-${ymd}-${gitDescribe}")
+  set(xpRevision "${revisionPrefix}-${gitDescribe}")
 else()
   set(xpRevision "Unknown-revision")
   message(AUTHOR_WARNING "Not a git repository? Using revision: ${xpRevision}.")


bugfix

bugfix

--- common/cmake/FindTBB.cmake
+++ common/cmake/FindTBB.cmake
@@ -106,6 +106,6 @@
   IF (APPLE)
     INSTALL(PROGRAMS ${TBB_ROOT}/lib/libc++/libtbb.dylib ${TBB_ROOT}/lib/libc++/libtbbmalloc.dylib DESTINATION lib COMPONENT lib)
   ELSE()
-    INSTALL(PROGRAMS ${TBB_ROOT}/lib/intel64/gcc4.4/libtbb.dylib ${TBB_ROOT}/lib/intel64/gcc4.4/libtbbmalloc.dylib DESTINATION lib COMPONENT lib)
+    INSTALL(PROGRAMS ${TBB_ROOT}/lib/intel64/gcc4.4/libtbb.so.2 ${TBB_ROOT}/lib/intel64/gcc4.4/libtbbmalloc.so.2 DESTINATION lib COMPONENT lib)
   ENDIF()
 ENDIF()


Quickfix to find TBB on CI machine

Quickfix to find TBB on CI machine

--- common/cmake/FindTBB.cmake
+++ common/cmake/FindTBB.cmake
@@ -19,6 +19,7 @@
     PATHS ${PROJECT_SOURCE_DIR}/tbb
           "C:/Program Files (x86)/Intel/Composer XE/tbb"
           /opt/intel/composerxe/tbb
+          /share/apps/intel/2015.1.133/tbb
           NO_DEFAULT_PATH
 )
 UNSET(TBB_INCLUDE_DIR CACHE)


FindTBB also looks in ICC install path

FindTBB also looks in ICC install path

--- common/cmake/FindTBB.cmake
+++ common/cmake/FindTBB.cmake
@@ -14,10 +14,10 @@
 ## limitations under the License.                                           ##
 ## ======================================================================== ##

-FIND_PATH(TBB_INCLUDE_DIR tbb/task_scheduler_init.h)
-FIND_LIBRARY(TBB_LIBRARY tbb)
-FIND_LIBRARY(TBB_LIBRARY_MALLOC tbbmalloc)
-
+FIND_PATH(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS /opt/intel/composerxe/tbb/include)
+FIND_LIBRARY(TBB_LIBRARY tbb PATHS /opt/intel/composerxe/tbb/lib/mic)
+FIND_LIBRARY(TBB_LIBRARY_MALLOC tbbmalloc PATHS /opt/intel/composerxe/tbb/lib/mic)
+
 FIND_PATH(TBB_INCLUDE_DIR_MIC tbb/task_scheduler_init.h NO_DEFAULT_PATH PATHS /opt/intel/composerxe/tbb/include)
 FIND_LIBRARY(TBB_LIBRARY_MIC tbb NO_DEFAULT_PATH PATHS /opt/intel/composerxe/tbb/lib/mic)
 FIND_LIBRARY(TBB_LIBRARY_MALLOC_MIC tbbmalloc NO_DEFAULT_PATH PATHS /opt/intel/composerxe/tbb/lib/mic)


Update Windows default warning level to 4

--- cmake/Compilers/msvc.cmake
+++ cmake/Compilers/msvc.cmake
@@ -25,8 +25,8 @@
 # enable/disable warnings
 # dll warning 4251 disabled by default.
 if (BUILD_WITH_WARNINGS)
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4251")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 /wd4251")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /wd4251")
 else ()
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W0")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W0")


add use hboost

add use hboost

--- cmake/FindHoudiniUsd.cmake
+++ cmake/FindHoudiniUsd.cmake
@@ -27,19 +27,20 @@
 # Find hboost
 target_compile_definitions(UsdInterface
     INTERFACE
-    BOOST_NS=hboost
+    USE_HBOOST
+    BOOST_NS=hboost
 )

 find_library(_houdini_hboost_python
-    NAMES
+    NAMES
     hboost_python27-mt-x64
     hboost_python-mt-x64
     PATHS
     ${HOUDINI_ROOT}/dsolib
-    ${HOUDINI_ROOT}/custom/houdini/dsolib/
+    ${HOUDINI_ROOT}/custom/houdini/dsolib/
     REQUIRED
     )
-
+
 find_library(_houdini_hboost_filesystem
     NAMES
     hboost_filesystem-mt-x64
@@ -47,7 +48,7 @@
     ${HOUDINI_ROOT}/dsolib
     ${HOUDINI_ROOT}/custom/houdini/dsolib/
     REQUIRED
-    )
+    )

 target_link_libraries(Houdini INTERFACE ${_houdini_hboost_python} ${_houdini_hboost_filesystem})


Fix expansion of HAVE_SYS_MMAN_H

Fix expansion of HAVE_SYS_MMAN_H

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

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -222,7 +222,7 @@
 #cmakedefine HAVE_SYS_IOCTL_H ${HAVE_SYS_IOCTL_H}

 /* Define to 1 if you have the <sys/mman.h> header file. */
-#cmakedefine HAVE_SYS_MMAN_H ${}
+#cmakedefine HAVE_SYS_MMAN_H ${HAVE_SYS_MMAN_H}

 /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
    */


GC HAVE___DSO_HANDLE

GC HAVE___DSO_HANDLE

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

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -302,9 +302,6 @@

 /* Have host's __divdi3 */
 #cmakedefine HAVE___DIVDI3 ${HAVE___DIVDI3}
-
-/* Define to 1 if you have the `__dso_handle' function. */
-#undef HAVE___DSO_HANDLE

 /* Have host's __fixdfdi */
 #cmakedefine HAVE___FIXDFDI ${HAVE___FIXDFDI}


printing the captured errors

printing the captured errors

--- scripts/test.cmake
+++ scripts/test.cmake
@@ -147,6 +147,7 @@
   update_test_models()
 ENDIF()
 ctest_configure(CAPTURE_CMAKE_ERROR capture_configure_error)
+message("test.cmake: ctest_configure error = ${capture_configure_error}")

 ctest_build(RETURN_VALUE retval
             NUMBER_ERRORS build_errors
@@ -155,6 +156,8 @@
 message("test.cmake: ctest_build return value = ${retval}")
 message("test.cmake: ctest_build #errors = ${build_errors}")
 message("test.cmake: ctest_build #warnings = ${build_warnings}")
+message("test.cmake: ctest_build error = ${capture_build_error}")
+
 IF (NOT retval EQUAL 0)
   message(FATAL_ERROR "test.cmake: build failed")
 ENDIF()
@@ -163,6 +166,7 @@
   ctest_test(RETURN_VALUE retval
              CAPTURE_CMAKE_ERROR capture_test_error)
   message("test.cmake: ctest_test return value = ${retval}")
+  message("test.cmake: ctest_test error = ${capture_test_error}")
   IF (NOT retval EQUAL 0)
     message(FATAL_ERROR "test.cmake: some tests failed")
   ENDIF()


New version: 0.3.7

New version: 0.3.7

--- hawkey/VERSION.cmake
+++ hawkey/VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "3")
-SET(HAWKEY_PATCH "6")
+SET(HAWKEY_PATCH "7")


Update android toolchain file.

Update android toolchain file.


Revert D5879947: [caffe2][PR] Enable python3 builds

Summary:
This reverts commit c452362b2ab54397723b5be3f1258c57213f6fc4

bypass-lint

Differential Revision: D5879947

fbshipit-source-id: 9dfe4e17ea84c252fa75c103c7a267e1ceddab98

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -208,7 +208,7 @@

 # ---[ Python + Numpy
 if(BUILD_PYTHON)
-  set(Python_ADDITIONAL_VERSIONS 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.8 2.7 2.6)
+  set(Python_ADDITIONAL_VERSIONS 2.8 2.7 2.6)
   find_package(PythonInterp 2.7)
   find_package(PythonLibs 2.7)
   find_package(NumPy REQUIRED)


[CMake] bundled zlib: make sure to include zlib as system headers.

--- cmake/Modules/Zlib.cmake
+++ cmake/Modules/Zlib.cmake
@@ -42,8 +42,8 @@

 # XXX make sure that zlib is using it's own headers
 # see https://github.com/madler/zlib/issues/218
-include_directories(BEFORE ${CMAKE_BINARY_DIR}/zlib/zlib-src)
-include_directories(BEFORE ${CMAKE_BINARY_DIR}/zlib/zlib-build)
+include_directories(BEFORE SYSTEM ${CMAKE_BINARY_DIR}/zlib/zlib-src)
+include_directories(BEFORE SYSTEM ${CMAKE_BINARY_DIR}/zlib/zlib-build)

 # Add zlib directly to our build. This defines
 # the gtest and gtest_main targets.


bug fixed for finding the headers of QGLViewer

--- cmake/UseQGLViewer.cmake
+++ cmake/UseQGLViewer.cmake
@@ -10,7 +10,7 @@
 	MESSAGE(FATAL_ERROR "OpenNI not currently set up to work on this platform.")
 ENDIF()

-FIND_PATH(QGLVIEWER_INC "QGLViewer/qglviewer.h" HINTS "${QGLVIEWER_ROOT}/QGLViewer/")
+FIND_PATH(QGLVIEWER_INC "/QGLViewer/qglviewer.h" HINTS "${QGLVIEWER_ROOT}")
 FIND_LIBRARY(QGLVIEWER_LIBRARY QGLViewerd2 HINTS "${QGLVIEWER_ROOT}/QGLViewer/")

 INCLUDE_DIRECTORIES(${GLEW_INC})


fix HIP compiler options not recognized

fix HIP compiler options not recognized

Compiler options for hipcc must be provided via the cmake variable
HIP_HIPCC_FLAGS. CMAKE_CXX_FLAGS is not taken into account.

--- cmake/alpakaCommon.cmake
+++ cmake/alpakaCommon.cmake
@@ -774,8 +774,8 @@
     endif()
 endif()

-# NVCC does not incorporate the COMPILE_OPTIONS of a target but only the CMAKE_CXX_FLAGS
-if(ALPAKA_ACC_GPU_HIP_ENABLE AND ALPAKA_CUDA_COMPILER MATCHES "nvcc")
+# For hipcc we need to propagate the CMAKE_CXX_FLAGS to HIP_HIPCC_FLAGS.
+if(ALPAKA_ACC_GPU_HIP_ENABLE)
     get_property(_ALPAKA_COMPILE_OPTIONS_PUBLIC
                  TARGET alpaka
                  PROPERTY INTERFACE_COMPILE_OPTIONS)
@@ -783,9 +783,13 @@
     alpaka_set_compiler_options(HOST var CMAKE_CXX_FLAGS "${_ALPAKA_COMPILE_OPTIONS_STRING}")

     # Append CMAKE_CXX_FLAGS_[Release|Debug|RelWithDebInfo] to CMAKE_CXX_FLAGS
-    # because FindCUDA only propagates the latter to nvcc.
+    # because cmake HIP modules do not use the former variables
     string(TOUPPER "${CMAKE_BUILD_TYPE}" build_config)
     alpaka_set_compiler_options(HOST var CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_${build_config}}")
+
+    # additionally CMAKE_CXX_FLAGS must be propagated to HIP_HIPCC_FLAGS
+    string(REPLACE " " ";" CMAKE_CXX_FLAGS_AS_LIST "${CMAKE_CXX_FLAGS}")
+    alpaka_set_compiler_options(DEVICE list HIP_HIPCC_FLAGS "${CMAKE_CXX_FLAGS_AS_LIST}")
 endif()

 if(ALPAKA_COMPILER_OPTIONS_DEVICE OR ALPAKA_COMPILER_OPTIONS_DEVICE)


CMake: bugfix

CMake: bugfix

--- cmake/globalmacros.cmake
+++ cmake/globalmacros.cmake
@@ -736,9 +736,9 @@
 # and befor ive_create_module
 macro(ivw_add_link_flags)
     # Set link flags
-    get_property(flags TARGET ${project_name} PROPERTY LINK_FLAGS)
+    get_property(flags TARGET ${_projectName} PROPERTY LINK_FLAGS)
     list(APPEND flags "${ARGN}")
-    set_property(TARGET ${project_name} PROPERTY LINK_FLAGS ${flags})
+    set_property(TARGET ${_projectName} PROPERTY LINK_FLAGS ${flags})

     # Append includes to project list
     list(APPEND _allLinkFlags "\"${ARGN}\"")


removed extra entry

removed extra entry

--- cmake/post.service.cmake
+++ cmake/post.service.cmake
@@ -15,8 +15,6 @@
 include(${CMAKE_CURRENT_LIST_DIR}/settings.cmake)

 if (${CMAKE_VERSION} VERSION_LESS "3.12")
-  #ultimate fallback
-  set(Python2_EXECUTABLE python)
   find_program(Python2 python2.7)
   if (NOT Python2)
     #brutal fallback


fixing copy of depends libraries for test using _LIBRARIES variable filled in config file.


compiler path change to use ccache on ubuntu16

--- .cicd/pinned_toolchain.cmake
+++ .cicd/pinned_toolchain.cmake
@@ -1,7 +1,7 @@
 set(CMAKE_C_COMPILER_WORKS 1)
 set(CMAKE_CXX_COMPILER_WORKS 1)
-set(CMAKE_C_COMPILER /usr/local/bin/clang)
-set(CMAKE_CXX_COMPILER /usr/local/bin/clang++)
+set(CMAKE_C_COMPILER /usr/lib/ccache/clang)
+set(CMAKE_CXX_COMPILER /usr/lib/ccache/clang++)

 set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES /usr/local/include/c++/v1 /usr/local/include /usr/include)


Set the CXX standard to C++11

Set the CXX standard to C++11

--- CMake/sitkCheckRequiredFlags.cmake
+++ CMake/sitkCheckRequiredFlags.cmake
@@ -84,32 +84,10 @@
   endif()
 elseif(NOT HAS_CXX_STD_FLAG)

-#
-# Check if we need to enable C++11 with a compiler flag
-#
-
-  check_cxx_compiler_flag( "-std=c++11" CXX_HAS_stdcxx11)
-
-  if (CXX_HAS_stdcxx11)
-
-    message(STATUS "Checking if c++11 is required...")
-    try_compile(SITK_CXX11_NOT_REQUIRED
-      "${PROJECT_BINARY_DIR}"
-      "${CMAKE_CURRENT_LIST_DIR}/sitk_check_cxx11_required.cxx"
-      OUTPUT_VARIABLE OUTPUT)
-    if(SITK_CXX11_NOT_REQUIRED)
-      message(STATUS "Checking if c++11 is required... NO" )
-    else()
-      message(STATUS "Checking if c++11 is required... YES" )
-      file(APPEND ${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CMakeError.log
-        "Checking if C++11 required try_compile failed with the following output:\n"
-        "${OUTPUT}\n")
-      list(APPEND SimpleITK_PUBLIC_COMPILE_OPTIONS "-std=c++11")
-      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-    endif()
-
-  endif()
-
+# Brute force set the standard for the whole project.
+# TODO: Use target_compile_features on each library.
+set(CMAKE_CXX_STANDARD 11)
+message(STATUS "Setting cxx standard to C++11")
 endif()

 list(REMOVE_DUPLICATES SimpleITK_PUBLIC_COMPILE_OPTIONS)


Set Working Directory for flatc commands (#4737)

--- CMake/BuildFlatBuffers.cmake
+++ CMake/BuildFlatBuffers.cmake
@@ -71,6 +71,8 @@
       )
   endif()

+  set(working_dir "${CMAKE_CURRENT_SOURCE_DIR}")
+
   set(schema_glob "*.fbs")
   # Generate the include files parameters.
   set(include_params "")
@@ -97,7 +99,8 @@
         -o ${generated_includes_dir}
         ${include_params}
         -c ${schema}
-        DEPENDS ${FLATC_TARGET} ${schema} ${additional_dependencies})
+        DEPENDS ${FLATC_TARGET} ${schema} ${additional_dependencies}
+        WORKING_DIRECTORY "${working_dir}")
       list(APPEND all_generated_files ${generated_include})
     endif()

@@ -109,7 +112,8 @@
         -o ${binary_schemas_dir}
         ${include_params}
         ${schema}
-        DEPENDS ${FLATC_TARGET} ${schema} ${additional_dependencies})
+        DEPENDS ${FLATC_TARGET} ${schema} ${additional_dependencies}
+        WORKING_DIRECTORY "${working_dir}")
       list(APPEND all_generated_files ${binary_schema})
     endif()


Fixed minor errors in seldom used cake settings.

--- cmake/ConfigureCompiler.cmake
+++ cmake/ConfigureCompiler.cmake
@@ -221,7 +221,7 @@
                         CACHE STRING "Flags used by the compiler during release builds." FORCE)
     set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DDEBUG -O3 -g"
                         CACHE STRING "Flags used by the compiler during release with debug info builds." FORCE)
-      set(CMAKE_CXX_FLAGS_MINSIZEREL "-DNDEBUG -DEIGEN_NO_DEBUG -Os"
+    set(CMAKE_CXX_FLAGS_MINSIZEREL "-DNDEBUG -DEIGEN_NO_DEBUG -Os"
                         CACHE STRING "Flags used by the compiler during release minsize builds." FORCE)
   endif()
   if(CMAKE_Fortran_COMPILER_ID STREQUAL "Clang")
@@ -234,7 +234,7 @@
                       CACHE STRING "Flags used by the compiler during release builds." FORCE)
     set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "-DDEBUG -O3 -g"
                       CACHE STRING "Flags used by the compiler during release with debug info builds." FORCE)
-      set(CMAKE_Fortran_FLAGS_MINSIZEREL "/DNDEBUG /Os /ipo /fast"
+    set(CMAKE_Fortran_FLAGS_MINSIZEREL "-DNDEBUG -Os"
                       CACHE STRING "Flags used by the compiler during release minsize builds." FORCE)
   endif()


fix: ensure .bzl files use relative paths (#3781)

I copied CreateBazelConfig.cmake from -pubsub, which is our newest
repo. This file uses relative paths for .bzl files. This is also done
by -bigquery and -spanner, so I think -cpp should likely behave
this way as well.

Part of #3560

Fixes: #3766

--- cmake/CreateBazelConfig.cmake
+++ cmake/CreateBazelConfig.cmake
@@ -15,12 +15,11 @@
 # ~~~

 function (write_bazel_copyright FILENAME YEAR)
-    file(WRITE "${FILENAME}" [=[
-# Copyright ]=])
-    file(APPEND "${FILENAME}" ${YEAR})
+    file(WRITE "${FILENAME}" "# Copyright ${YEAR} Google LLC")
     file(
         APPEND "${FILENAME}"
-        [=[ Google LLC
+        [=[
+
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -61,16 +60,20 @@
         get_target_property(sources ${TARGET} SOURCES)
     endif ()
     foreach (src ${sources})
+        # Some files need to be specificied with an absolute path (mainly
+        # sources for INTERFACE libraries). Compute the relative path because
+        # Bazel does not like absolute filenames.
+        string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" relative "${src}")
         string(FIND "${src}" "${CMAKE_CURRENT_BINARY_DIR}" in_binary_dir)
         if ("${in_binary_dir}" EQUAL 0)
             # Skip files in the binary directory, they are generated and handled
             # differently by our Bazel BUILD files.
         elseif ("${src}" MATCHES "\\.inc$")
-            list(APPEND H ${src})
+            list(APPEND H ${relative})
         elseif ("${src}" MATCHES "\\.h$")
-            list(APPEND H ${src})
+            list(APPEND H ${relative})
         elseif ("${src}" MATCHES "\\.cc$")
-            list(APPEND CC ${src})
+            list(APPEND CC ${relative})
         endif ()
     endforeach ()
     write_bazel_copyright(${filename} ${_CREATE_BAZEL_CONFIG_OPT_YEAR})
@@ -119,7 +122,7 @@
 function (export_variables_to_bazel filename)
     cmake_parse_arguments(_EXPORT_VARIABLES_TO_BAZEL_OPT "" "YEAR" "" ${ARGN})
     if ("${_EXPORT_VARIABLES_TO_BAZEL_OPT_YEAR}" STREQUAL "")
-        set(_EXPORT_VARIABLES_TO_BAZEL_OPT_YEAR "2018")
+        set(_EXPORT_VARIABLES_TO_BAZEL_OPT_YEAR "2019")
     endif ()
     write_bazel_copyright(${filename} ${_EXPORT_VARIABLES_TO_BAZEL_OPT_YEAR})
     file(


cmake: posix: Use absolute paths for toolchain paths

Make posix align with non-posix platforms by having CMAKE_C_COMPILER
and friends use absolute paths.

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

--- cmake/compiler/host-gcc.cmake
+++ cmake/compiler/host-gcc.cmake
@@ -1,16 +1,17 @@
 # Configures CMake for using GCC

-set(CMAKE_C_COMPILER   gcc     CACHE INTERNAL " " FORCE)
-set(CMAKE_OBJCOPY      objcopy CACHE INTERNAL " " FORCE)
-set(CMAKE_OBJDUMP      objdump CACHE INTERNAL " " FORCE)
-#set(CMAKE_LINKER      ld      CACHE INTERNAL " " FORCE) # Not in use yet
-set(CMAKE_AR           ar      CACHE INTERNAL " " FORCE)
-set(CMAKE_RANLILB      ranlib  CACHE INTERNAL " " FORCE)
-set(CMAKE_READELF      readelf CACHE INTERNAL " " FORCE)
-set(CMAKE_GDB          gdb     CACHE INTERNAL " " FORCE)
-set(CMAKE_C_FLAGS 	-m32   CACHE INTERNAL " " FORCE)
-set(CMAKE_CXX_FLAGS 	-m32   CACHE INTERNAL " " FORCE)
-set(CMAKE_SHARED_LINKER_FLAGS -m32 CACHE INTERNAL " " FORCE)
+find_program(CMAKE_C_COMPILER   gcc    )
+find_program(CMAKE_OBJCOPY      objcopy)
+find_program(CMAKE_OBJDUMP      objdump)
+#find_program(CMAKE_LINKER      ld     ) # Not in use yet
+find_program(CMAKE_AR           ar     )
+find_program(CMAKE_RANLILB      ranlib )
+find_program(CMAKE_READELF      readelf)
+find_program(CMAKE_GDB          gdb    )
+
+set(CMAKE_C_FLAGS 	          -m32 )
+set(CMAKE_CXX_FLAGS 	      -m32 )
+set(CMAKE_SHARED_LINKER_FLAGS -m32 )

 if(CONFIG_CPLUSPLUS)
   set(cplusplus_compiler g++)
@@ -24,5 +25,4 @@
     set(cplusplus_compiler ${CMAKE_C_COMPILER})
   endif()
 endif()
-set(CMAKE_CXX_COMPILER ${cplusplus_compiler}     CACHE INTERNAL " " FORCE)
-
+find_program(CMAKE_CXX_COMPILER ${cplusplus_compiler}     CACHE INTERNAL " " FORCE)


Append -lgpg-error to the list of link libraries, as needed.

NOTE: if you need this right away you must first clear your cmake cache
by removing the $builddir/CMakeCache.txt file.

svn path=/trunk/KDE/kdepim/; revision=530733

--- cmake/modules/FindGpgme.cmake
+++ cmake/modules/FindGpgme.cmake
@@ -14,6 +14,11 @@
   # if gpgme-config has been found
   IF (GPGMECONFIG_EXECUTABLE)
     EXEC_PROGRAM(${GPGMECONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GPGME_LIBRARIES)
+
+    # append -lgpg-error to the list of libraries, if necessary
+    IF (NOT GPGME_LIBRARIES MATCHES "lgpg-error")
+      set(GPGME_LIBRARIES "${GPGME_LIBRARIES} -lgpg-error")
+    ENDIF (NOT GPGME_LIBRARIES MATCHES "lgpg-error")

     EXEC_PROGRAM(${GPGMECONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GPGME_CFLAGS)
     IF (GPGME_CFLAGS)


CMake: Workaround: Ensure "mpiuni/mpi.h" is reachable

In case of a sequential build without mpi support and sequential petsc a
dummy mpi.h file installed by petsc must be reachable in from our final
set of include directories.

Normally this is not an issue - petsc exports such information in the
file "petscvariables" that we parse. But some distributions have chosen
to not install this file...

Closes #4157

--- cmake/modules/FindPETSC.cmake
+++ cmake/modules/FindPETSC.cmake
@@ -197,16 +197,29 @@
   ENDFOREACH()
 ENDIF()

+IF(PETSC_WITH_MPIUNI)
+  #
+  # Workaround: Some distributions happen to not install petscvariables and
+  # we consequently might miss some essential include directories. Let's
+  # try at least to find the mpiuni include directory.
+  #
+  DEAL_II_FIND_PATH(PETSC_INCLUDE_DIR_MPIUNI mpiuni/mpi.h
+    HINTS ${PETSC_INCLUDE_DIR_COMMON} ${PETSC_INCLUDE_DIR_ARCH} ${_petsc_includes}
+    PATH_SUFFIXES petsc
+    )
+  SET(PETSC_INCLUDE_DIR_MPIUNI "${PETSC_INCLUDE_DIR_MPIUNI}/mpiuni")
+ENDIF()
+
 DEAL_II_PACKAGE_HANDLE(PETSC
   LIBRARIES
     REQUIRED PETSC_LIBRARY
     OPTIONAL _petsc_libraries
   INCLUDE_DIRS
     REQUIRED PETSC_INCLUDE_DIR_COMMON PETSC_INCLUDE_DIR_ARCH
-    OPTIONAL _petsc_includes
+    OPTIONAL PETSC_INCLUDE_DIR_MPIUNI _petsc_includes
   USER_INCLUDE_DIRS
     REQUIRED PETSC_INCLUDE_DIR_COMMON PETSC_INCLUDE_DIR_ARCH
-    OPTIONAL _petsc_includes
+    OPTIONAL PETSC_INCLUDE_DIR_MPIUNI _petsc_includes
   CLEAR
     PETSC_LIBRARY PETSC_INCLUDE_DIR_COMMON PETSC_INCLUDE_DIR_ARCH
     PETSC_PETSCVARIABLES ${_cleanup_variables}


Fix for ROOT-7438 - Make configuration fails for centos 6 Make use of command lsb_release to determine the Linux distribution and version

--- cmake/modules/RootCPack.cmake
+++ cmake/modules/RootCPack.cmake
@@ -79,24 +79,22 @@
 elseif(WIN32)
   set(OS_NAME_VERSION win32)
 else()
-  execute_process(COMMAND cat /etc/issue OUTPUT_VARIABLE issue OUTPUT_STRIP_TRAILING_WHITESPACE)
-  if(issue MATCHES Ubuntu)
-    string(REGEX REPLACE ".*Ubuntu ([0-9]+)[.].*" "\\1" osvers "${issue}")
+  execute_process(COMMAND lsb_release -is OUTPUT_VARIABLE osid OUTPUT_STRIP_TRAILING_WHITESPACE)
+  execute_process(COMMAND lsb_release -rs OUTPUT_VARIABLE osvers OUTPUT_STRIP_TRAILING_WHITESPACE)
+  if(osid MATCHES Ubuntu)
+    string(REGEX REPLACE "([0-9]+)[.].*" "\\1" osvers "${osvers}")
     set(OS_NAME_VERSION Linux-ubuntu${osvers}-${arch})
-  elseif(issue MATCHES SLC)
-    string(REGEX REPLACE ".*release ([0-9]+)[.].*" "\\1" osvers "${issue}")
+  elseif(osid MATCHES Scientific)
+    string(REGEX REPLACE "([0-9]+)[.].*" "\\1" osvers "${osvers}")
     set(OS_NAME_VERSION Linux-slc${osvers}-${arch})
-  elseif(issue MATCHES Fedora)
-    string(REGEX REPLACE ".*release ([0-9]+)[. ].*" "\\1" osvers "${issue}")
+  elseif(osid MATCHES Fedora)
+    string(REGEX REPLACE "([0-9]+)" "\\1" osvers "${osvers}")
     set(OS_NAME_VERSION Linux-fedora${osvers}-${arch})
+  elseif(osid MATCHES CentOS)
+    string(REGEX REPLACE "([0-9]+)[.].*" "\\1" osvers "${osvers}")
+    set(OS_NAME_VERSION Linux-cc${osvers}-${arch})
   else()
-    execute_process(COMMAND cat /etc/os-release OUTPUT_VARIABLE os_release OUTPUT_STRIP_TRAILING_WHITESPACE)
-    if(os_release MATCHES "centos")
-      string(REGEX REPLACE ".*VERSION_ID=\"([0-9]+).*" "\\1" osvers "${os_release}")
-      set(OS_NAME_VERSION Linux-cc${osvers}-${arch})
-    else()
-      set(OS_NAME_VERSION Linux-${arch})
-    endif()
+    set(OS_NAME_VERSION Linux-${osid}${osvers}${arch})
   endif()
 endif()
 #---Build type---------------------------------------------------------------------------------------


COMP: Use CMAKE_POSITION_INDEPENDENT_CODE instead of explicitly setting fPIC flag

--- Common.cmake
+++ Common.cmake
@@ -28,9 +28,6 @@
   set(USE_ITKv3 ON)
   set(USE_ITKv4 OFF)
 endif()
-
-#CMAKE_DEPENDENT_OPTION(
-#  USE_DTIPrep                         "Build DTIPrep"                                ON "${LOCAL_PROJECT_NAME}_USE_QT" ON)

 set(${LOCAL_PROJECT_NAME}_USE_QT ON)
 if(${LOCAL_PROJECT_NAME}_USE_QT AND NOT DTIPrep_BUILD_SLICER_EXTENSION )
@@ -128,15 +125,5 @@
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_RELEASE_DESIRED_FLAGS}" )
 endif()

-#-----------------------------------------------------------------------------
-# Add needed flag for gnu on linux like enviroments to build static common libs
-# suitable for linking with shared object libs.
-if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
-  if(NOT "${CMAKE_CXX_FLAGS}" MATCHES "-fPIC")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
-  endif()
-  if(NOT "${CMAKE_C_FLAGS}" MATCHES "-fPIC")
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
-  endif()
-endif()
+set(CMAKE_POSITION_INDEPENDENT_CODE 1)


ENH: TubeTK release candidate for ITK v5.1.2

--- Modules/Remote/TubeTK.remote.cmake
+++ Modules/Remote/TubeTK.remote.cmake
@@ -48,5 +48,5 @@
   "http://www.tubetk.org"
   MODULE_COMPLIANCE_LEVEL 3
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTubeTK.git
-  GIT_TAG 69a8397085f7732493fb634dabbfb0ccd49ad2e1
+  GIT_TAG ee7b2cbcfa264b7c775560e4df717549aea74b96
   )


Revert "update git tag for GRM"

Revert "update git tag for GRM"

This reverts commit 168d71d2e317d47f4634b45a2b058977779d1c48.

--- Modules/Remote/otbGRM.remote.cmake
+++ Modules/Remote/otbGRM.remote.cmake
@@ -12,5 +12,5 @@
 http://tully.ups-tlse.fr/lassallep/grm
 "
   GIT_REPOSITORY https://github.com/orfeotoolbox/GRM
-  GIT_TAG 209161cc0b3fadad7999e80b83838868f430289e
+  GIT_TAG c53a61d12b895a85c3909130021988730c309cb7
 )


add eslint test

add eslint test

--- plugins/item_previews/plugin.cmake
+++ plugins/item_previews/plugin.cmake
@@ -1 +1,2 @@
 add_web_client_test(item_previews "${PROJECT_SOURCE_DIR}/plugins/item_previews/plugin_tests/item_previews.js" PLUGIN item_previews)
+add_eslint_test(item_previews "${PROJECT_SOURCE_DIR}/plugins/item_previews/web_client/js")


added option cardiac default off.

added option cardiac default off.

--- config/IRTKInclude.cmake
+++ config/IRTKInclude.cmake
@@ -198,3 +198,6 @@
    LINK_LIBRARIES(znz)
    LINK_LIBRARIES(niftiio)
 ENDIF (BUILD_WITH_NIFTI)
+
+# Option to build with cardiac spatial temporal correction, segmentation and motion tracking toolbox.
+OPTION(BUILD_CARDIAC "Build with cardiac tool box" OFF)


pw_build/cmake: Remove deprecated function

Now that _pw_parse_argv_strict is no longer used downstream, remove
it.

Change-Id: I34e8b75594bf42259affbb36832770c1317b9d3e
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/94166
Commit-Queue: Auto-Submit <14637eda5603879df170705285bf30f5996692f0@pigweed.google.com.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Ewout van Bekkum <638f134dbc68778d6b859fb04a64baea2b00b021@google.com>
Reviewed-by: Keir Mierle <69344103cc60b36d6e1fbdc31ce6504b2286c646@google.com>

--- pw_build/pigweed.cmake
+++ pw_build/pigweed.cmake
@@ -35,12 +35,6 @@
         "Valid arguments: ${_all_args}"
     )
   endif()
-endmacro()
-
-# TODO(ewout): Deprecate this once it's no longer in use.
-macro(_pw_parse_argv_strict function start_arg options one multi)
-  pw_parse_arguments_strict(
-      "${function}" "${start_arg}" "${options}" "${one}" "${multi}")
 endmacro()

 # Automatically creates a library and test targets for the files in a module.


Setup flags for leak and address sanitization.

Apparently errors reported earlier were due to some other reason.
This configuration should now work on both OS X and Linux (and possibly
on clang on windows).

--- toolchains/clang.cmake
+++ toolchains/clang.cmake
@@ -18,19 +18,13 @@
 # http://clang.llvm.org/docs/AddressSanitizer.html
 # http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
 set( TNUN_compiler_runtime_sanity_checks -fsanitize=undefined -fsanitize=integer -fsanitize=address -fno-omit-frame-pointer )
+set( TNUN_linker_runtime_sanity_checks -fsanitize=address -fsanitize=undefined )

 # Leak sanitizer is available only on Clang on Linux x64.
 # http://clang.llvm.org/docs/LeakSanitizer.html
 if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND TNUN_ABI STREQUAL "x64" )
-    # list( APPEND TNUN_compiler_runtime_sanity_checks -fsanitize=leak )
-    # Implementation note:
-    # CMake uses system linker instead of clang wrapper. System linker is not aware of compiler sanitization flags
-    # so we need to link with sanitization libraries manually.
-    #                                            ( 11.08.2016. Nenad Miksa )
-    set( TNUN_linker_runtime_sanity_checks asan ubsan ) # lsan )
-elseif( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
-    # On Mac OSX, CMake uses Clang wrapper around linker, so compiler flags should be added to linker.
-    set( TNUN_linker_runtime_sanity_checks -fsanitize=address -fsanitize=undefined )
+    list( APPEND TNUN_compiler_runtime_sanity_checks -fsanitize=leak )
+    list( APPEND TNUN_linker_runtime_sanity_checks -fsanitize=leak)
 endif()

 # Implementation note:


Fixed Clang build?

Fixed Clang build?

--- CMake/ConfigureLibraries.cmake
+++ CMake/ConfigureLibraries.cmake
@@ -21,12 +21,12 @@
     -DGLFW_BUILD_TESTS:BOOL=OFF)

 # All-target libraries go here.
+add_linker_files(${STDLIB})
 add_linker_files(glfw3)
 required_package(OpenGL OPENGL_LIBRARIES)

 # Target-specific libraries go here.
 if ("${PLATFORM}" STREQUAL "Win")
-    add_linker_files(${STDLIB})
     required_library(gdi32)
     required_library(kernel32)
     required_library(user32)


COMP: Added SOFA bin dir to CTest path.

COMP: Added SOFA bin dir to CTest path.

--- CMake/MITKDashboardSetup.cmake
+++ CMake/MITKDashboardSetup.cmake
@@ -40,7 +40,7 @@
   set(OPENCV_BINARY_DIR "${CTEST_BINARY_DIRECTORY}/OpenCV-build/bin/${CTEST_BUILD_CONFIGURATION}")
   set(SOFA_BINARY_DIR "${CTEST_BINARY_DIRECTORY}/SOFA-build/bin/${CTEST_BUILD_CONFIGURATION}")
   set(BLUEBERRY_OSGI_DIR "${CTEST_BINARY_DIRECTORY}/MITK-build/bin/BlueBerry/org.blueberry.osgi/bin/${CTEST_BUILD_CONFIGURATION}")
-  set(CTEST_PATH "${CTEST_PATH};${QT_BINARY_DIR};${VTK_BINARY_DIR};${ITK_BINARY_DIR};${BOOST_BINARY_DIR};${GDCM_BINARY_DIR};${OPENCV_BINARY_DIR};${BLUEBERRY_OSGI_DIR}")
+  set(CTEST_PATH "${CTEST_PATH};${QT_BINARY_DIR};${VTK_BINARY_DIR};${ITK_BINARY_DIR};${BOOST_BINARY_DIR};${GDCM_BINARY_DIR};${OPENCV_BINARY_DIR};${SOFA_BINARY_DIR};${BLUEBERRY_OSGI_DIR}")
 endif()
 set(ENV{PATH} "${CTEST_PATH}")


Changing forge-external to forge-ext

Changing forge-external to forge-ext

* Problems when building arrayfire+forge on windows because of path limit

--- CMakeModules/build_forge.cmake
+++ CMakeModules/build_forge.cmake
@@ -16,7 +16,7 @@
 FIND_PACKAGE(GLFW)

 ExternalProject_Add(
-    forge-external
+    forge-ext
     GIT_REPOSITORY https://github.com/arrayfire/forge.git
     GIT_TAG master
     PREFIX "${prefix}"
@@ -37,13 +37,13 @@
     ${byproducts}
     )

-ExternalProject_Get_Property(forge-external install_dir)
+ExternalProject_Get_Property(forge-ext install_dir)
 ADD_LIBRARY(forge SHARED IMPORTED)
 SET_TARGET_PROPERTIES(forge PROPERTIES IMPORTED_LOCATION ${forge_location})
 IF(WIN32)
-	SET_TARGET_PROPERTIES(forge PROPERTIES IMPORTED_IMPLIB ${prefix}/lib/forge.lib)
+    SET_TARGET_PROPERTIES(forge PROPERTIES IMPORTED_IMPLIB ${prefix}/lib/forge.lib)
 ENDIF(WIN32)
-ADD_DEPENDENCIES(forge forge-external)
+ADD_DEPENDENCIES(forge forge-ext)
 SET(FORGE_INCLUDE_DIRECTORIES ${install_dir}/include)
 SET(FORGE_LIBRARIES forge)
 SET(FORGE_FOUND ON)


Improves performance by removing unneeded verification code and changes way symbolic links are done.

--- internal/macro_utils.cmake
+++ internal/macro_utils.cmake
@@ -6,6 +6,7 @@

 INCLUDE(CMakeParseArguments)

+#TODO(heathkh): Replace positional arguments with named arguments.  Positional argumenst are a source of hard to find errors when a users passses a value and it happens to be a list instead of a single value, the funtion arguments don't get assigned correctly.  Expecting the user to wrap all calls in "" to prevent this is not reasonable.

 ###############################################################################
 # SNAP - General
@@ -34,7 +35,7 @@
 ENDMACRO()

-FUNCTION(DISPLAY_PACKAGE_STATUS)
+FUNCTION(DISPLAY_PACKAGE_STATUS)
   CMAKE_PARSE_ARGUMENTS("" # Default arg prefix is just "_"
                       "" # Option type arguments
                       "TYPE;URI;" # Single value arguments
@@ -44,12 +45,12 @@
   REQUIRE_NOT_EMPTY(_TYPE _URI)
   MAKE_FRIENDLY_URI(${_URI} friendly_package_uri)
   IF(_MISSING_URIS)
-    MESSAGE("SKIPPED: ${friendly_package_uri}")
+    MESSAGE(STATUS "SKIPPED: ${friendly_package_uri}")
     FOREACH(missing_package_uri ${_MISSING_URIS})
-      MESSAGE("* unresolved package: ${missing_package_uri}")
+      MESSAGE(STATUS "* unresolved package: ${missing_package_uri}")
     ENDFOREACH()
   ELSE()
-    MESSAGE("     OK: ${friendly_package_uri} (${_TYPE})")
+    MESSAGE(STATUS "     OK: ${friendly_package_uri} (${_TYPE})")
   ENDIF()
 ENDFUNCTION()

@@ -104,25 +105,6 @@
 SET(VALID_URI_REGEX "^(PRJ|SYS)://(.*)")

 #
-MACRO(VERIFY_URI_OR_DIE uri)
-  STRING(REGEX MATCH ${VALID_URI_REGEX} found ${uri})
-  IF(NOT found)
-    MESSAGE(SEND_ERROR "Valid uris must start with //, PRJ://, or SYS://")
-    MESSAGE(FATAL_ERROR "Invalid uri: ${uri}")
-  ENDIF()
-
-  # verify uri has only one run of multiple slashes (e.g. catch the case where the path has a run of more than one /)
-  string(REGEX MATCHALL "(//+)" multi_slash_match_list ${uri})
-  LIST( LENGTH multi_slash_match_list num_multi_slashes )
-
-  IF (${num_multi_slashes} GREATER 1)
-    MESSAGE(SEND_ERROR "Path portion of uris must not contain multiple slashes: ${uri}")
-    MESSAGE(FATAL_ERROR "Invalid uri: ${uri}")
-  ENDIF()
-
-ENDMACRO()
-
-#
 MACRO(PARSE_URI_SCHEME uri uri_scheme)
   STRING(REGEX REPLACE ${VALID_URI_REGEX} "\\1" ${uri_scheme} ${uri})
 ENDMACRO()
@@ -134,32 +116,28 @@

 #
 MACRO(PARSE_URI uri scheme path basename)
-  VERIFY_URI_OR_DIE(${uri})
   PARSE_URI_SCHEME(${uri} uri_scheme)
   IF ("${uri_scheme}" STREQUAL "PRJ")
     STRING(REGEX REPLACE ${PRJ_URI_REGEX} "\\1;\\2;\\3" uri_parse_list ${uri})
     LIST(LENGTH uri_parse_list num_matches)
     IF (NOT num_matches EQUAL 3)
-        MESSAGE("uri_parse_list: ${uri_parse_list}")
-        MESSAGE(FATAL_ERROR "REGEX parsing failed!")
-    ENDIF()
-
+        MESSAGE("Provided invalid uri: ${uri_parse_list}")
+        MESSAGE(FATAL_ERROR "Valid uris look like this: [PRJ:|SYS:]//path/to/target/dir:target")
+    ENDIF()
     LIST(GET uri_parse_list 0 ${scheme})
     LIST(GET uri_parse_list 1 ${path})
     LIST(GET uri_parse_list 2 ${basename})
   ELSEIF ("${uri_scheme}" STREQUAL "SYS")
-    STRING(REGEX REPLACE ${SYS_URI_REGEX} "\\1;\\2" uri_parse_list ${uri})
-
+    STRING(REGEX REPLACE ${SYS_URI_REGEX} "\\1;\\2" uri_parse_list ${uri})
     LIST(LENGTH uri_parse_list num_matches)
     IF (NOT num_matches EQUAL 2)
         MESSAGE("uri_parse_list: ${uri_parse_list}")
         MESSAGE(FATAL_ERROR "REGEX parsing failed!")
-    ENDIF()
-
+    ENDIF()
     LIST(GET uri_parse_list 0 ${scheme})
     LIST(GET uri_parse_list 1 ${basename})
-  ELSE()
-    MESSAGE(FATAL_ERROR "unexpected: ${uri_scheme}")
+  ELSE()
+    MESSAGE(FATAL_ERROR "Invalid uri: ${uri}. Valid uris must start with //, PRJ://, or SYS://")
   ENDIF()
 ENDMACRO()

@@ -168,10 +146,8 @@
 MACRO(TO_CANONICAL_URI in_uri out_uri )
   # Handle elliding the PRJ: prefix (expand // to PRJ://)
   STRING(REGEX REPLACE "^//(.*)" "PRJ://\\1" ${out_uri} ${in_uri})
-
   # TODO(kheath): Handle optional elliding of target name when same as target parent dir
-  # Check if a target was specified with : and expand if not
-  VERIFY_URI_OR_DIE(${${out_uri}})
+  # Check if a target was specified with : and expand if not
 ENDMACRO()

 MACRO(TO_CANONICAL_URIS in_uris out_uris)
@@ -234,10 +210,12 @@
     FOREACH(file ${files})
         SET (src_file_path ${CMAKE_CURRENT_SOURCE_DIR}/${file})
         SET (dst_file_path ${CMAKE_CURRENT_BINARY_DIR}/${file})
-        IF(EXISTS ${src_file_path})
-          EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${src_file_path} ${dst_file_path})
-        ELSE()
-          MESSAGE(FATAL_ERROR "Missing source file: ${src_file_path}")
+        IF(NOT EXISTS "${dst_file_path}")
+          IF(EXISTS "${src_file_path}")
+            EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${src_file_path} ${dst_file_path})
+          ELSE()
+            MESSAGE(FATAL_ERROR "Missing source file: ${src_file_path}")
+          ENDIF()
         ENDIF()
     ENDFOREACH(file)
 ENDMACRO()
@@ -245,8 +223,7 @@

 #Example usage
 # LOCAL_PATHS_TO_ABSOLUTE_PATHS(INPUT_PATHS ${input_paths} FILE_PATHS files DIR_PATHS dirs)
-FUNCTION(LOCAL_PATHS_TO_ABSOLUTE_PATHS)
-
+FUNCTION(LOCAL_PATHS_TO_ABSOLUTE_PATHS)
   CMAKE_PARSE_ARGUMENTS("" # Default arg prefix is just "_"
                       "" # Option type arguments
                       "FILE_PATHS;DIR_PATHS" # Single value arguments


Another try with Cmake for R for OSX

Another try with Cmake for R for OSX

--- dev/cmake/Modules/FindR.cmake
+++ dev/cmake/Modules/FindR.cmake
@@ -17,6 +17,10 @@
 find_program(R_EXEC
              NAMES R
              PATHS ${R_BIN}
+             NO_SYSTEM_ENVIRONMENT_PATH
+             NO_CMAKE_SYSTEM_PATH
+             NO_DEFAULT_PATH
+             NO_CMAKE_PATH
              )
 MESSAGE(STATUS "R_EXEC= ${R_EXEC}")
 # Parse the output of the R path commmand, removing whitespace


(untested) macOS Apple Silicon build support

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -68,7 +68,9 @@
 #    MAC = Build for x86_64 macOS.
 #    MAC_ARM64 = Build for Apple Silicon macOS.
 #    MAC_CATALYST = Build for x86_64 macOS with Catalyst support (iOS toolchain on macOS).
+#                   Note: The build argument "MACOSX_DEPLOYMENT_TARGET" can be used to control min-version of macOS
 #    MAC_CATALYST_ARM64 = Build for Apple Silicon macOS with Catalyst support (iOS toolchain on macOS).
+#                         Note: The build argument "MACOSX_DEPLOYMENT_TARGET" can be used to control min-version of macOS
 #
 # CMAKE_OSX_SYSROOT: Path to the SDK to use.  By default this is
 #    automatically determined from PLATFORM and xcodebuild, but
@@ -152,6 +154,7 @@
 # Cache what generator is used
 set(USED_CMAKE_GENERATOR "${CMAKE_GENERATOR}" CACHE STRING "Expose CMAKE_GENERATOR" FORCE)

+# Check if using a CMake version capable of building combined FAT builds (simulator and target slices combined in one static lib)
 if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.14")
   set(MODERN_CMAKE YES)
 endif()
@@ -226,14 +229,19 @@
   message(FATAL_ERROR "PLATFORM argument not set. Bailing configure since I don't know what target you want to build for!")
 endif()

-set(PLATFORM_INT "${PLATFORM}" CACHE STRING "Type of platform for which the build targets.")
-
 # Safeguard that the platform value is set and is one of the supported values
-list(FIND _supported_platforms ${PLATFORM_INT} contains_PLATFORM)
+list(FIND _supported_platforms ${PLATFORM} contains_PLATFORM)
 if("${contains_PLATFORM}" EQUAL "-1")
   string(REPLACE ";"  "\n * " _supported_platforms_formatted "${_supported_platforms}")
-  message(FATAL_ERROR " Invalid PLATFORM specified! Current value: ${PLATFORM_INT}.\n"
+  message(FATAL_ERROR " Invalid PLATFORM specified! Current value: ${PLATFORM}.\n"
       " Supported PLATFORM values: \n * ${_supported_platforms_formatted}")
+endif()
+
+set(PLATFORM_INT "${PLATFORM}" CACHE STRING "Type of platform for which the build targets.")
+
+# Check if Apple Silicon is supported
+if(PLATFORM_INT MATCHES "^(MAC_ARM64)$|^(MAC_CATALYST_ARM64)$" AND ${CMAKE_VERSION} VERSION_LESS "3.19.5")
+  message(FATAL_ERROR "Apple Silicon builds requires a minimum of CMake 3.19.5")
 endif()

 # Specify minimum version of deployment target.
@@ -373,7 +381,7 @@
     set(ARCHS i386)
     set(APPLE_TARGET_TRIPLE_INT i386-apple-watchos)
   endif()
-elseif(PLATFORM_INT MATCHES "(MAC|MAC_CATALYST)")
+elseif(PLATFORM_INT MATCHES "^(MAC)$|^(MAC_CATALYST)$")
   set(SDK_NAME macosx)
   if(NOT ARCHS)
     set(ARCHS x86_64)
@@ -382,36 +390,16 @@
     set(APPLE_TARGET_TRIPLE_INT x86_64-apple-macosx)
   elseif(PLATFORM_INT STREQUAL "MAC_CATALYST")
     set(APPLE_TARGET_TRIPLE_INT x86_64-apple-ios${DEPLOYMENT_TARGET}-macabi)
-    if(USED_CMAKE_GENERATOR MATCHES "Xcode")
-      set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
-      set(CMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS "macosx")
-      set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-maccatalyst")
-      if(NOT DEFINED MACOSX_DEPLOYMENT_TARGET)
-        set(CMAKE_XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET "10.15")
-      else()
-        set(CMAKE_XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET "${MACOSX_DEPLOYMENT_TARGET}")
-      endif()
-    endif()
-  endif()
-elseif(PLATFORM_INT MATCHES "(MAC_ARM64|MAC_CATALYST_ARM64)")
+  endif()
+elseif(PLATFORM_INT MATCHES "^(MAC_ARM64)$|^(MAC_CATALYST_ARM64)$")
   set(SDK_NAME macosx)
   if(NOT ARCHS)
-    set(ARCHS x86_64)
-  endif()
-  if(PLATFORM_INT STREQUAL "MAC")
-    set(APPLE_TARGET_TRIPLE_INT x86_64-apple-macosx)
-  elseif(PLATFORM_INT STREQUAL "MAC_CATALYST")
-    set(APPLE_TARGET_TRIPLE_INT x86_64-apple-ios${DEPLOYMENT_TARGET}-macabi)
-    if(USED_CMAKE_GENERATOR MATCHES "Xcode")
-      set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
-      set(CMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS "macosx")
-      set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-maccatalyst")
-      if(NOT DEFINED MACOSX_DEPLOYMENT_TARGET)
-        set(CMAKE_XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET "10.15")
-      else()
-        set(CMAKE_XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET "${MACOSX_DEPLOYMENT_TARGET}")
-      endif()
-    endif()
+    set(ARCHS arm64)
+  endif()
+  if(PLATFORM_INT STREQUAL "MAC_ARM64")
+    set(APPLE_TARGET_TRIPLE_INT arm64-apple-macosx)
+  elseif(PLATFORM_INT STREQUAL "MAC_CATALYST_ARM64")
+    set(APPLE_TARGET_TRIPLE_INT arm64-apple-ios${DEPLOYMENT_TARGET}-macabi)
   endif()
 else()
   message(FATAL_ERROR "Invalid PLATFORM: ${PLATFORM_INT}")
@@ -419,6 +407,17 @@

 if(MODERN_CMAKE AND PLATFORM_INT MATCHES ".*COMBINED" AND NOT USED_CMAKE_GENERATOR MATCHES "Xcode")
   message(FATAL_ERROR "The COMBINED options only work with Xcode generator, -G Xcode")
+endif()
+
+if(USED_CMAKE_GENERATOR MATCHES "Xcode" AND PLATFORM_INT MATCHES "MAC_CATALYST_.*")
+  set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
+  set(CMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS "macosx")
+  set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-maccatalyst")
+  if(NOT DEFINED MACOSX_DEPLOYMENT_TARGET)
+    set(CMAKE_XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET "10.15")
+  else()
+    set(CMAKE_XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET "${MACOSX_DEPLOYMENT_TARGET}")
+  endif()
 endif()

 message(STATUS "Chosen SDK name: ${SDK_NAME}")


The environment variable QTDIR is now searched prior to system.

--- ChooseQtVersion.cmake
+++ ChooseQtVersion.cmake
@@ -40,6 +40,12 @@
   list(REMOVE_DUPLICATES _modules_qt4)
   list(REMOVE_DUPLICATES _modules_qt5)

+  set (CMAKE_PREFIX_PATH_TMP ${CMAKE_PREFIX_PATH})
+
+  if (DEFINED ENV{QTDIR})
+    set (CMAKE_PREFIX_PATH $ENV{QTDIR})
+  endif ()
+
   # Find Qt libraries
   if (${SELECT_QT} MATCHES "Qt5" OR
       ${SELECT_QT} MATCHES "Any")
@@ -51,6 +57,8 @@
       ${SELECT_QT} MATCHES "Any")
     find_package(Qt4 ${QT_FIND_MODE} COMPONENTS ${_modules_qt4})
   endif()
+
+  set (CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH_TMP})

   if (NOT (Qt5_FOUND OR Qt4_FOUND OR QT4_FOUND))
     message(FATAL_ERROR " Qt not found")
@@ -74,6 +82,9 @@
     set(QT_VERSION ${Qt4_VERSION})
     set(QT_INCLUDE_DIRS ${QT_INCLUDES})
   endif (Qt4_FOUND OR QT4_FOUND)
+
+  message (STATUS "${QT_INCLUDE_DIRS}")
+
 endmacro(QT_FIND_MODULES)

 macro(QT_USE_MODULES _target)


Added tag files to parse argument list

Added tag files to parse argument list

--- BlueBerry/CMake/MacroCreateCTKPlugin.cmake
+++ BlueBerry/CMake/MacroCreateCTKPlugin.cmake
@@ -15,10 +15,11 @@
 #! \param EXPORTED_INCLUDE_SUFFIXES (optional) a list of sub-directories which should
 #!        be added to the current source directory. The resulting directories
 #!        will be available in the set of include directories of depending plug-ins.
+#! \param DOXYGEN_TAGFILES (optional) Which external tag files should be available for the plugin documentation
 #! \param TEST_PLUGIN (option) Mark this plug-in as a testing plug-in.
 macro(MACRO_CREATE_CTK_PLUGIN)

-  MACRO_PARSE_ARGUMENTS(_PLUGIN "EXPORT_DIRECTIVE;EXPORTED_INCLUDE_SUFFIXES" "TEST_PLUGIN;NO_QHP_TRANSFORM" ${ARGN})
+  MACRO_PARSE_ARGUMENTS(_PLUGIN "EXPORT_DIRECTIVE;EXPORTED_INCLUDE_SUFFIXES;DOXYGEN_TAGFILES" "TEST_PLUGIN;NO_QHP_TRANSFORM" ${ARGN})

   message(STATUS "Creating CTK plugin ${PROJECT_NAME}")


Fix for broken cppcheck versions, like on Ubuntu 14.04

--- CppcheckTargets.cmake
+++ CppcheckTargets.cmake
@@ -62,6 +62,10 @@
     --inline-suppr --suppress=preprocessorErrorDirective
     ${CPPCHECK_EXTRA_ARGS})

+  if(CPPCHECK_VERSION VERSION_LESS 1.68)
+    list(APPEND _cppcheck_args --suppress=unmatchedSuppression)
+  endif()
+
   list(FIND ARGN UNUSED_FUNCTIONS _unused_func)
   if("${_unused_func}" GREATER "-1")
     list(APPEND _cppcheck_args ${CPPCHECK_UNUSEDFUNC_ARG})


[INTERNAL] Corrected comment about __cplusplus

--- util/cmake/FindSeqAn.cmake
+++ util/cmake/FindSeqAn.cmake
@@ -171,9 +171,9 @@
 # Require C++14
 # ----------------------------------------------------------------------------

-# The standard library of visual studio defines __cplusplus still as
-# 199711L, thus the check below would fail.
-if (NOT MSVC) # this implies all compilers within visual studio
+# The visual studio compiler and intel compiler on windows defines __cplusplus
+# still as 199711L, thus the check below would fail.
+if (NOT (COMPILER_MSVC OR COMPILER_WINTEL))
     set(CXXSTD_TEST_SOURCE
     "#if !defined(__cplusplus) || (__cplusplus < 201300L)
     #error NOCXX14


Find openblas properly

Find openblas properly

Former-commit-id: 1df0a649b42bc4c8bc3a69ee6c08088b8ddc8338

--- cmake-modules/Fetch_OpenBLAS.cmake
+++ cmake-modules/Fetch_OpenBLAS.cmake
@@ -5,7 +5,7 @@
 endif()

-if(NOT TARGET openblas::openblas AND DMRG_DOWNLOAD_METHOD MATCHES "find|fetch")
+if(NOT TARGET openblas::openblas AND DMRG_DOWNLOAD_METHOD MATCHES "find")
     set(OpenBLAS_FIND_VERBOSE ON)
     find_package(OpenBLAS)
 endif()
@@ -19,14 +19,6 @@
         set(OPENBLAS_ENABLE_OPENMP 0) # OpenMP doesnt work on static builds with OpenBLAS
     endif()
     include(cmake-modules/getExpandedTarget.cmake)
-    #expand_target_libs(gfortran::gfortran GFORTRAN_LIBS)
-    #list(FILTER GFORTRAN_LIBS INCLUDE REGEX "gfortran|quadmath")
-    #list(JOIN GFORTRAN_LIBS " " GFORTRAN_LIBS_SPACE_SEP_STRING)
-    #list(GET  GFORTRAN_LIBS 0 GFORTRAN_LIB)
-    #get_filename_component(GFORTRAN_PATH ${GFORTRAN_LIB} DIRECTORY)
-
-    #set(LDFLAGS "-L${GFORTRAN_PATH} ${GFORTRAN_LIBS_SPACE_SEP_STRING}")
-    #set(FFLAGS  "-O3 -Wno-maybe-uninitialized -Wno-conversion -Wno-unused-but-set-variable -Wno-unused-variable")
     list(APPEND OPENBLAS_CMAKE_OPTIONS  -DTARGET:STRING=${OPENBLAS_MARCH})
     list(APPEND OPENBLAS_CMAKE_OPTIONS  -DUSE_THREAD:BOOL=${OPENBLAS_MULTITHREADED})
     list(APPEND OPENBLAS_CMAKE_OPTIONS  -DBUILD_RELAPACK:BOOL=OFF)


- Move USE_SDL=2 to target_enable_cxx11

- Move USE_SDL=2 to target_enable_cxx11

--- cmake/Modules/BuildFunctions.cmake
+++ cmake/Modules/BuildFunctions.cmake
@@ -12,6 +12,18 @@
 macro(TARGET_ENABLE_CXX11 TARGET)
     if(NOT ANDROID AND NOT APPLE)
         target_compile_features(${TARGET} PRIVATE cxx_constexpr)
+    endif()
+
+    # Sneaky sneaky
+    if(EMSCRIPTEN)
+        target_compile_options(${TARGET} PRIVATE
+            -s USE_SDL=2
+            )
+        if(COFFEE_GENERATE_WASM)
+#            target_compile_options( ${TARGET} PRIVATE
+#                "-s WASM=1"
+#                )
+        endif()
     endif()
 endmacro()

@@ -65,17 +77,6 @@

     # Because it's hard to write these three commands over and over again
     add_library(${TARGET} ${LINKOPT} "${SOURCES}" "${${TARGET}_HEADERS}")
-
-    if(EMSCRIPTEN)
-        target_compile_options(${TARGET} PRIVATE
-            "-s USE_SDL=2"
-            )
-        if(COFFEE_GENERATE_WASM)
-            target_compile_options( ${TARGET} PRIVATE
-                "-s WASM=1"
-                )
-        endif()
-    endif()

     set_property(TARGET ${TARGET} PROPERTY POSITION_INDEPENDENT_CODE ON)

@@ -217,14 +218,6 @@
             set ( CMAKE_EXECUTABLE_SUFFIX ".html" )
         endif()
         add_executable(${TARGET} ${SOURCES_MOD})
-        target_compile_options(${TARGET} PRIVATE
-            "-s USE_SDL=2"
-            )
-        if(COFFEE_GENERATE_WASM)
-            target_compile_options( ${TARGET} PRIVATE
-                "-s WASM=1"
-                )
-        endif()
         if(NOT COFFEE_GENERATE_HTML)
             install(
                 TARGETS


add missing newline

add missing newline

--- cmake/Modules/FindSparsehash.cmake
+++ cmake/Modules/FindSparsehash.cmake
@@ -15,4 +15,4 @@
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(Sparsehash DEFAULT_MSG SPARSEHASH_INCLUDE_DIR)

-mark_as_advanced(SPARSEHASH_INCLUDE_DIR)+mark_as_advanced(SPARSEHASH_INCLUDE_DIR)


add /MT for MSVC static lib (#278)

add /MT for MSVC static lib (#278)

--- Build.cmake
+++ Build.cmake
@@ -116,6 +116,10 @@
       ENDIF()
       ADD_LIBRARY(${G3LOG_LIBRARY} SHARED ${SRC_FILES})
    ELSE()
+      IF (MSVC)
+          set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
+          set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
+      ENDIF()
       ADD_LIBRARY(${G3LOG_LIBRARY} STATIC ${SRC_FILES})
    ENDIF()


BUG_FIX: Extern_STIR - Replace ! with NOT

--- SuperBuild/External_STIR.cmake
+++ SuperBuild/External_STIR.cmake
@@ -102,11 +102,11 @@

   # Append CMAKE_ARGS for ITK choices
   # 3 choices:
-  #     1. !USE_ITK                     <- Disable ITK
+  #     1.  NOT USE_ITK                 <- Disable ITK
   #     2.  USE_ITK &&  USE_SYSTEM_ITK  <- Need to set ITK_DIR, set with find_package in External_ITK.cmake
   #     3.  USE_ITK && !USE_SYSTEM_ITK  <- No need to do anything (ITK_DIR will get set during the installation of ITK)
   # STIR enables ITK by default (If it is found, so no need to set -DDISABLE_ITK=OFF for cases 2 and 3)
-  if (!USE_ITK)
+  if (NOT USE_ITK)
     set(STIR_CMAKE_ARGS ${STIR_CMAKE_ARGS} -DDISABLE_ITK=ON)
   elseif (USE_ITK AND USE_SYSTEM_ITK)
     set(STIR_CMAKE_ARGS ${STIR_CMAKE_ARGS} -DITK_DIR=${ITK_DIR})


Install interface/peer headers.

Install interface/peer headers.

Currently vc_vchi_dispmanx.h requires vc_vchi_dispmanx_common.h which is
not distributed on install. This limits access to the ELEMENT_CHANGE_*
defines.

--- makefiles/cmake/vmcs.cmake
+++ makefiles/cmake/vmcs.cmake
@@ -71,6 +71,7 @@
 install(DIRECTORY ${vmcs_root}/interface/vchi      DESTINATION ${VMCS_INSTALL_PREFIX}/include/interface FILES_MATCHING PATTERN "*.h")
 install(DIRECTORY ${vmcs_root}/interface/vctypes   DESTINATION ${VMCS_INSTALL_PREFIX}/include/interface FILES_MATCHING PATTERN "*.h")
 install(DIRECTORY ${vmcs_root}/vcinclude           DESTINATION ${VMCS_INSTALL_PREFIX}/include           FILES_MATCHING PATTERN "*.h")
+install(DIRECTORY ${vmcs_root}/interface/peer      DESTINATION ${VMCS_INSTALL_PREFIX}/include/interface FILES_MATCHING PATTERN "*.h")
 install(DIRECTORY ${vmcs_root}/interface/vmcs_host DESTINATION ${VMCS_INSTALL_PREFIX}/include/interface FILES_MATCHING PATTERN "*.h" PATTERN "${vmcs_root}/interface/vmcs_host/khronos" EXCLUDE)

 install(DIRECTORY ${vmcs_root}/interface/khronos/include       DESTINATION ${VMCS_INSTALL_PREFIX}     FILES_MATCHING PATTERN "*.h")


Adds some options for gabime/spdlog lookup

--- modules/LookUpspdlog.cmake
+++ modules/LookUpspdlog.cmake
@@ -1,7 +1,22 @@
-# Installs GBenchmark into build directory
+# Installs gabime/spdlog into build directory
+#
+# - GIT_REPOSITORY: defaults to origin gabime repo on github
+# - GIT_TAG: defaults to master
+
+if(spdlog_ARGUMENTS)
+  cmake_parse_arguments(spdlog "" "GIT_REPOSITORY;GIT_TAG" ""
+    ${spdlog_ARGUMENTS})
+endif()
+if(NOT spdlog_GIT_REPOSITORY)
+  set(spdlog_GIT_REPOSITORY https://github.com/gabime/spdlog.git)
+endif()
+if(NOT spdlog_GIT_TAG)
+  set(spdlog_GIT_TAG master)
+endif()
 ExternalProject_Add(
     Lookup-spdlog
-    GIT_REPOSITORY https://github.com/gabime/spdlog
+    GIT_REPOSITORY ${spdlog_GIT_REPOSITORY}
+    GIT_TAG ${spdlog_GIT_TAG}
     PREFIX "${EXTERNAL_ROOT}"
     # Force separate output paths for debug and release builds to allow easy
     # identification of correct lib in subsequent TARGET_LINK_LIBRARIES commands


Moved ParaView forward for TIFF writing changes

--- versions.cmake
+++ versions.cmake
@@ -68,7 +68,7 @@
   set(_paraview_revision "master")
 else()
   # Test the revision with OpenGL2 rendering before updating, update often!
-  set(_paraview_revision "c496c7184960c86758c79230c576f2b86884d35f")
+  set(_paraview_revision "886c58ee8d8e79abf22c12d1f090b80329fa9870")
 endif()
 add_revision(paraview
   GIT_REPOSITORY "https://gitlab.kitware.com/paraview/paraview.git"


Add Windows install rule for documentation pdf

--- Projects/win32/velodyneviewer.bundle.cmake
+++ Projects/win32/velodyneviewer.bundle.cmake
@@ -4,7 +4,8 @@
 # set NSIS install specific stuff.

 set (CPACK_NSIS_MENU_LINKS
-  "bin/VeloView.exe" "VeloView")
+  "bin/VeloView.exe" "VeloView"
+  "doc/VeloView_Developer_Guide.pdf" "Developer Guide")

 set(AppName VeloView)

@@ -64,6 +65,10 @@
         DESTINATION "bin"
         COMPONENT ${AppName})

+install(FILES "${SuperBuild_BINARY_DIR}/velodyneviewer/src/velodyneviewer/Doc/VeloView_Developer_Guide.pdf"
+        DESTINATION "doc"
+        COMPONENT ${AppName})
+
 #------------------------------------------------------------------------------
 set (CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_LIST_DIR}/InstallerIcon.ico")


COMP: Update python requirements external project adding hints for update script

--- SuperBuild/External_python-ShapeVariationAnalyzer-requirements.cmake
+++ SuperBuild/External_python-ShapeVariationAnalyzer-requirements.cmake
@@ -42,8 +42,13 @@

   set(requirements_file ${CMAKE_BINARY_DIR}/${proj}-requirements.txt)
   file(WRITE ${requirements_file} [===[
+  # [joblib]
   joblib==0.16.0 --hash=sha256:d348c5d4ae31496b2aa060d6d9b787864dd204f9480baaa52d18850cb43e9f49
+  # [/joblib]
+  # [threadpoolctl]
   threadpoolctl==2.1.0 --hash=sha256:38b74ca20ff3bb42caca8b00055111d74159ee95c4370882bbff2b93d24da725
+  # [/threadpoolctl]
+  # [scikit-learn]
   # Hashes correspond to the following packages:
   # - scikit_learn-0.23.1-cp36-cp36m-win_amd64.whl
   # - scikit_learn-0.23.1-cp36-cp36m-macosx_10_9_x86_64.whl
@@ -51,6 +56,7 @@
   scikit-learn==0.23.1 --hash=sha256:e585682e37f2faa81ad6cd4472fff646bf2fd0542147bec93697a905db8e6bd2 \
                        --hash=sha256:058d213092de4384710137af1300ed0ff030b8c40459a6c6f73c31ccd274cc39 \
                        --hash=sha256:e9879ba9e64ec3add41bf201e06034162f853652ef4849b361d73b0deb3153ad
+  # [/scikit-learn]
   ]===])

   set(pip_install_args)


Linking OF will try Release then Debug

Linking OF will try Release then Debug

--- openFrameworksConfig.cmake
+++ openFrameworksConfig.cmake
@@ -118,9 +118,17 @@
   /usr/include
   )

+if(EXISTS "${openFrameworksRoot}/libs/openFrameworksCompiled/lib/${PLATFORM}/${LIB_PREFIX}openFrameworks.a")
+  set(openFrameworks_STATIC
+    ${openFrameworksRoot}/libs/openFrameworksCompiled/lib/${PLATFORM}/${LIB_PREFIX}openFrameworks.a)
+else()
+  set(openFrameworks_STATIC
+    ${openFrameworksRoot}/libs/openFrameworksCompiled/lib/${PLATFORM}/${LIB_PREFIX}openFrameworksDebug.a)
+endif()
+
 set(openFrameworks_LIBRARIES
   # openFrameworks
-  ${openFrameworksRoot}/libs/openFrameworksCompiled/lib/${PLATFORM}/${LIB_PREFIX}openFrameworks.a
+  ${openFrameworks_STATIC}
   # oF-supplied libraries
   ${openFrameworksRoot}/libs/glfw/lib/${PLATFORM}/${LIB_PREFIX}glfw3.a
   ${openFrameworksRoot}/libs/poco/lib/${PLATFORM}/${LIB_PREFIX}PocoCrypto.a


temporary disable FBVLC emulation on platforms other than Windows

--- src/PluginConfig.cmake
+++ src/PluginConfig.cmake
@@ -33,9 +33,14 @@
 # NOTE: THESE GUIDS *MUST* BE UNIQUE TO YOUR PLUGIN/ACTIVEX CONTROL!  YES, ALL OF THEM!
 set(FBTYPELIB_GUID 2b642482-539b-5158-b60c-725219b3a4b6)
 set(IFBControl_GUID 0d25ef13-5e83-527e-822e-e97f89d9055f)
-set( FBControl_GUID
-     df4501d0-6a9f-5d59-a08d-7be21a13c847
-     dc5b1d57-cf58-4500-b57e-fe62bc00fd64 ) #for FBVLC emulator
+if( WIN32 )
+    set( FBControl_GUID
+         df4501d0-6a9f-5d59-a08d-7be21a13c847
+         dc5b1d57-cf58-4500-b57e-fe62bc00fd64 ) #for FBVLC emulator
+else()
+    set( FBControl_GUID
+         df4501d0-6a9f-5d59-a08d-7be21a13c847 )
+endif()

 set(IFBComJavascriptObject_GUID 3321ffa1-0fcd-5c02-bf77-a966735a2296)
 set(FBComJavascriptObject_GUID d873591c-3064-53b2-afe9-e67d54974423)
@@ -47,9 +52,15 @@
 endif( FB_PLATFORM_ARCH_32 )

 # these are the pieces that are relevant to using it from Javascript
-set( ACTIVEX_PROGID
-     "${PLUGIN_NAME}.${PLUGIN_NAME}"
-     "${PLUGIN_NAME}.FBVLC" )
+if( WIN32 )
+    set( ACTIVEX_PROGID
+         "${PLUGIN_NAME}.${PLUGIN_NAME}"
+         "${PLUGIN_NAME}.FBVLC" )
+else()
+    set( ACTIVEX_PROGID
+         "${PLUGIN_NAME}.${PLUGIN_NAME}" )
+endif()
+
 if( FB_PLATFORM_ARCH_32 )
     set(MOZILLA_PLUGINID "${PROJECT_DOMAIN}/${PLUGIN_NAME}")  # No 32bit postfix to maintain backward compatability.
 else( FB_PLATFORM_ARCH_32 )
@@ -58,10 +69,15 @@

 # strings
 set(FBSTRING_CompanyName "${PROJECT_OWNER}")
-set( FBSTRING_PluginDescription
-     "${PLUGIN_DESCRIPTION}"
-     "${FBVLC_PLUGIN_DESCRIPTION}"
-     )
+if( WIN32 )
+    set( FBSTRING_PluginDescription
+         "${PLUGIN_DESCRIPTION}"
+         "${FBVLC_PLUGIN_DESCRIPTION}" )
+else()
+    set( FBSTRING_PluginDescription
+         "${PLUGIN_DESCRIPTION}" )
+endif()
+
 set(FBSTRING_PLUGIN_VERSION "${PLUGIN_VERSION}")
 set(FBSTRING_LegalCopyright "Copyright ${COPYRIGHT_YEARS} ${PROJECT_OWNER}")
 if( WIN32 )
@@ -78,9 +94,14 @@
 else( FB_PLATFORM_ARCH_32 )
     set(FBSTRING_PluginName "${PLUGIN_NAME} ${FB_PLATFORM_ARCH_NAME}")
 endif( FB_PLATFORM_ARCH_32 )
-set( FBSTRING_MIMEType
-     "${PLUGIN_MIMETYPE}"
-     "${FBVLC_PLUGIN_MIMETYPE}" )
+if( WIN32 )
+    set( FBSTRING_MIMEType
+         "${PLUGIN_MIMETYPE}"
+         "${FBVLC_PLUGIN_MIMETYPE}" )
+else()
+    set( FBSTRING_MIMEType
+         "${PLUGIN_MIMETYPE}" )
+endif()

 # Uncomment this next line if you're not planning on your plugin doing
 # any drawing:


got rid of tab

got rid of tab

--- indra/cmake/Copy3rdPartyLibs.cmake
+++ indra/cmake/Copy3rdPartyLibs.cmake
@@ -19,7 +19,7 @@
     set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-win32")
     set(vivox_files
         SLVoice.exe
-	libsndfile-1.dll
+        libsndfile-1.dll
         vivoxplatform.dll
         vivoxsdk.dll
         ortp.dll


WIP: dynamic boost on Windows

WIP: dynamic boost on Windows

--- cmake/DependenciesConfig.cmake
+++ cmake/DependenciesConfig.cmake
@@ -101,9 +101,6 @@
 macro(configure_boost)
   message ("Dependency check for boost...")
   if(${ENABLE_BOOST})
-      if(MSVC)
-        set(Boost_USE_STATIC_LIBS ON)
-      endif(MSVC)
       FIND_PACKAGE(Boost COMPONENTS system program_options filesystem REQUIRED)

       message("-- Found Boost_VERSION: ${Boost_VERSION}")


Ensure we are finding luajit and not regular lua

--- cmake/Modules/FindLuaJit.cmake
+++ cmake/Modules/FindLuaJit.cmake
@@ -3,7 +3,7 @@
 # All rights reserved.

 find_library(LuaJit_LIBRARY luajit-5.1)
-find_path(LuaJit_INCLUDE_DIR lua.h PATH_SUFFIXES luajit-2.0)
+find_path(LuaJit_INCLUDE_DIR luajit.h PATH_SUFFIXES luajit-2.0)

 if(APPLE)
   set(LuaJit_COMPILE_OPTIONS "-pagezero_size 10000 -image_base 100000000")


Again, a new version of Gurobi was released - added the name to the find cmake file

--- cmake/modules/FindGUROBI.cmake
+++ cmake/modules/FindGUROBI.cmake
@@ -30,7 +30,8 @@
         gurobi52
         gurobi55
         gurobi56
-        gurobi60
+        gurobi60
+        gurobi65
               PATHS "$ENV{GUROBI_HOME}/lib"
                     "/Library/gurobi502/mac64/lib"
                     "C:\\libs\\gurobi502\\lib"


Fix HexagonSDK.cmake (#9914)

Fix HexagonSDK.cmake (#9914)

--- cmake/modules/HexagonSDK.cmake
+++ cmake/modules/HexagonSDK.cmake
@@ -31,7 +31,7 @@

   # Initial verification of the Hexagon SDK.
   message(STATUS "Checking Hexagon SDK root: ${HEXAGON_SDK_PATH}")
-  tvm_file_glob(GLOB_RECURSE VERSION_HEADERS "${HEXAGON_SDK_PATH}/*/version.h")
+  file(GLOB_RECURSE VERSION_HEADERS "${HEXAGON_SDK_PATH}/*/version.h")
   if(VERSION_HEADERS)
     foreach(HEADER IN LISTS VERSION_HEADERS)
       if(HEADER MATCHES "incs/version.h$")


Fix cmake build on non-x86 targets.  Patch by
Xerxes Rånby.

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

--- cmake/modules/LLVMConfig.cmake
+++ cmake/modules/LLVMConfig.cmake
@@ -59,11 +59,9 @@
         list(APPEND expanded_components "LLVM${c}Info")
       endif()
     elseif( c STREQUAL "native" )
-      # TODO: we assume ARCH is X86.
-      list(APPEND expanded_components "LLVMX86CodeGen")
+      list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
     elseif( c STREQUAL "nativecodegen" )
-      # TODO: we assume ARCH is X86.
-      list(APPEND expanded_components "LLVMX86CodeGen")
+      list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
     elseif( c STREQUAL "backend" )
       # same case as in `native'.
     elseif( c STREQUAL "engine" )


Potential fix for ROOT-5745 (CMake)

Potential fix for ROOT-5745 (CMake)

--- cmake/modules/SetUpLinux.cmake
+++ cmake/modules/SetUpLinux.cmake
@@ -86,8 +86,8 @@
   execute_process(COMMAND ${CMAKE_CXX_COMPILER} -v
                   ERROR_VARIABLE _icc_version_info ERROR_STRIP_TRAILING_WHITESPACE)

-  string(REGEX REPLACE "(^V|^icc[ ]v)ersion[ ]([0-9]+)\\.[0-9]+.*" "\\2" ICC_MAJOR "${_icc_version_info}")
-  string(REGEX REPLACE "(^V|^icc[ ]v)ersion[ ][0-9]+\\.([0-9]+).*" "\\2" ICC_MINOR "${_icc_version_info}")
+  string(REGEX REPLACE "(^.*[ ]([0-9]+)\\.[0-9]+.*" "\\1" ICC_MAJOR "${_icc_version_info}")
+  string(REGEX REPLACE "(^.*[ ][0-9]+\\.([0-9]+).*" "\\1" ICC_MINOR "${_icc_version_info}")

   message(STATUS "Found ICC major version ${ICC_MAJOR}")
   message(STATUS "Found ICC minor version ${ICC_MINOR}")


CI: make all work in source dir

CI: make all work in source dir

--- CI/prepare_superbuild.cmake
+++ CI/prepare_superbuild.cmake
@@ -24,12 +24,10 @@
 set (ENV{LANG} "C") # Only ascii output
 get_filename_component(OTB_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR} DIRECTORY)
 get_filename_component(CI_PROJ_DIR ${OTB_SOURCE_DIR} DIRECTORY)
-get_filename_component(CI_ROOT_DIR ${CI_PROJ_DIR} DIRECTORY)

 # In GitLab we have :
-#   OTB_SOURCE_DIR=/builds/{project_dir}/otb
-#   CI_PROJ_DIR=/builds/{project_dir}
-#   CI_ROOT_DIR=/builds
+#   OTB_SOURCE_DIR=/builds/otb
+#   CI_PROJ_DIR=/builds

 set ( DEBUG "1" )

@@ -46,6 +44,12 @@
 set ( PROJECT_SOURCE_DIR "${SUPERBUILD_SOURCE_DIR}" )
 set ( CTEST_SOURCE_DIRECTORY "${SUPERBUILD_SOURCE_DIR}" )
 set ( CTEST_BINARY_DIRECTORY "${OTB_SOURCE_DIR}/build/" )
+# Detect site
+if(NOT DEFINED IMAGE_NAME)
+  if(DEFINED ENV{IMAGE_NAME})
+    set(IMAGE_NAME $ENV{IMAGE_NAME})
+  endif()
+endif()
 set ( CTEST_SITE "${IMAGE_NAME}" )

@@ -58,7 +62,7 @@
 # This is platform dependent, and the next step (build) also
 # depends on that, as some paths are hardcoded
 # This can be fixed with a packaging of OTB_DEPENDS
-set (CTEST_INSTALL_DIRECTORY "${CI_ROOT_DIR}/xdk/")
+set (CTEST_INSTALL_DIRECTORY "${OTB_SOURCE_DIR}/xdk/")

 # HACK
 # This is needed because when using return() function ctest is trying
@@ -181,7 +185,7 @@
   # TODO right now we rely on ctest_build to know whether there has been an error
   # in build, whereas SuperBuild does not necessarily return an error if something
   # goes wrong
-  set ( SB_ARTIFACT_GIT "${CI_PROJ_DIR}/superbuild-artifact" )
+  set ( SB_ARTIFACT_GIT "${OTB_SOURCE_DIR}/superbuild-artifact" )

   # REPOSITORY_GIT_URL and REMOTE whould be the same. Right now there are
   # different because one is https and one is ssh. Both should be ssh.
@@ -191,7 +195,7 @@
   execute_process(
     COMMAND ${GIT} "clone" "${REPOSITORY_GIT_URL}"
     "--branch" "master" "--depth" "1" "superbuild-artifact"
-    WORKING_DIRECTORY "${CI_PROJ_DIR}"
+    WORKING_DIRECTORY "${OTB_SOURCE_DIR}"
     )

   # setting up the repo
@@ -271,15 +275,11 @@
   # May be for easier maintainability the tar name should be the same as the
   # file inside.
   execute_process(
-    COMMAND ${CMAKE_COMMAND} "-E" "tar" "cf" "${SB_TAR_NAME}"
+    COMMAND ${CMAKE_COMMAND} "-E" "tar" "cf" "superbuild-artifact/${SB_TAR_NAME}"
     -- "${CTEST_INSTALL_DIRECTORY}"
-    WORKING_DIRECTORY ${CI_ROOT_DIR}
-    )
-
-  # We need to copy the tar file, as it is on a different partition in the gitlab
-  # context
-  file ( COPY "${CI_ROOT_DIR}/${SB_TAR_NAME}" DESTINATION "${SB_ARTIFACT_GIT}")
-
+    WORKING_DIRECTORY ${OTB_SOURCE_DIR}
+    )
+
   # In a near futur it might be nice to clean up the mess we made...

   if ( DEBUG )


Remove other temporary files

Remove other temporary files

--- CI/prepare_superbuild.cmake
+++ CI/prepare_superbuild.cmake
@@ -363,11 +363,11 @@
 # MacOS cleanup
 if(APPLE)
   message("MacOS cleanup")
-  file( REMOVE_RECURSE ${CTEST_INSTALL_DIRECTORY} )
-  file( REMOVE_RECURSE ${CTEST_BINARY_DIRECTORY} )
-  file( REMOVE_RECURSE ${SUPERBUILD_SOURCE_DIR} )
-  file( REMOVE_RECURSE ${CTEST_INSTALL_DIRECTORY} )
-  file( REMOVE_RECURSE ${SB_ARTIFACT_GIT} )
+  file( REMOVE_RECURSE ${CTEST_INSTALL_DIRECTORY} ) # install dir
+  file( REMOVE "${CI_ROOT_DIR}/${SB_TAR_NAME}" ) # sb tar
+  file( REMOVE "${OTB_SOURCE_DIR}/sb_branch.txt" ) # sb_branch
+  file( REMOVE_RECURSE ${CTEST_BINARY_DIRECTORY} ) # binary dir
+  file( REMOVE_RECURSE ${SB_ARTIFACT_GIT} ) # sb_artifact folder
 else()
   message("not apple")
 endif()


Update ReportUnitTestResult REGEX match

Update ReportUnitTestResult REGEX match

The regular expression that is used to capture the routine name from the
test ouput does not account for routines that have a "%" in the name or
for routines to have lower case letters.

Update the expression to account for both cases.

OSEHRA-Id: http://issues.osehra.org/browse/OAT-156
Change-Id: If2b89210f5525edc30f6afc0f64b6488640afc5a

--- CMake/CommonFunctions.cmake
+++ CMake/CommonFunctions.cmake
@@ -78,8 +78,8 @@
    set(routine_name "NONE")
    foreach (line ${OUTPUT})
      # Matches the command that runs the test, keeps the routine name
-     if(line MATCHES ">D [A-Z0-9]*\\^[A-Z0-9]+")
-       string(REGEX MATCH "[A-Z0-9]+$" routine_name "${line}")
+     if(line MATCHES ">D [A-Z0-9]*\\^[%a-zA-Z0-9]+")
+       string(REGEX MATCH "[%a-zA-Z0-9]+$" routine_name "${line}")
      # Captures and prints the failure message
      elseif(line MATCHES "^ ?[^\\^]+\\^${routine_name}+")
        message("${routine_name}: ${line}")


ENH: Allow disable of default modules

ENH: Allow disable of default modules

Change-Id: Iafe453cf935cca34b0c7a8d8b14e35af1b22bbf5

--- CMake/ITKModuleMacros.cmake
+++ CMake/ITKModuleMacros.cmake
@@ -27,7 +27,6 @@
   set(ITK_MODULE_${itk-module}_DEPENDS "")
   set(ITK_MODULE_${itk-module-test}_DEPENDS "${itk-module}")
   set(ITK_MODULE_${itk-module}_DESCRIPTION "description")
-  set(ITK_MODULE_${itk-module}_EXCLUDE_FROM_DEFAULT 0)
   set(ITK_MODULE_${itk-module}_ENABLE_SHARED 0)
   foreach(arg ${ARGN})
     if("${arg}" MATCHES "^(DEPENDS|TEST_DEPENDS|DESCRIPTION|DEFAULT)$")


Fixed version info. (4)

Fixed version info. (4)

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -90,7 +90,6 @@
 else()
     set(CC_NAME "msvc")
     exec_program(cl OUTPUT_VARIABLE CC_VERSION_VERBOSE)
-    message(STATUS "cl output: ${CC_VERSION_VERBOSE}")
     string(FIND "${CC_VERSION_VERBOSE}" "19.10" CC_VERSION_2017)
     if(CC_VERSION_2017 GREATER_EQUAL 0)
         set(CC_VERSION "2017")
@@ -105,19 +104,19 @@
     endif()
     string(FIND "${CC_VERSION_VERBOSE}" "x86" CC_ARCH_X86)
     if(CC_ARCH_X86 GREATER_EQUAL 0)
-        set(CC_VERSION "x86")
+        set(CC_ARCH "x86")
     endif()
     string(FIND "${CC_VERSION_VERBOSE}" "x64" CC_ARCH_X86_64)
     if(CC_ARCH_X86_64 GREATER_EQUAL 0)
-        set(CC_VERSION "x86_64")
+        set(CC_ARCH "x86_64")
     endif()
     string(FIND "${CC_VERSION_VERBOSE}" "amd64" CC_ARCH_AMD64)
     if(CC_ARCH_AMD64 GREATER_EQUAL 0)
-        set(CC_VERSION "x86_64")
+        set(CC_ARCH "x86_64")
     endif()
     string(FIND "${CC_VERSION_VERBOSE}" "ARM" CC_ARCH_ARM)
     if(CC_ARCH_ARM GREATER_EQUAL 0)
-        set(CC_VERSION "arm")
+        set(CC_ARCH "arm")
     endif()
 endif()
 set(CI_BUILD_NAME "${CC_NAME}-${CC_VERSION}-${CC_ARCH}")


Fix typo in FindBMI.cmake

Fix typo in FindBMI.cmake

--- src/na/CMake/FindBMI.cmake
+++ src/na/CMake/FindBMI.cmake
@@ -14,7 +14,7 @@
 set(BMI_LIBRARIES ${BMI_LIBRARY})

 include(FindPackageHandleStandardArgs)
-# handle the QUIETLY and REQUIRED arguments and set SSM_FOUND to TRUE
+# handle the QUIETLY and REQUIRED arguments and set BMI_FOUND to TRUE
 # if all listed variables are TRUE
 find_package_handle_standard_args(BMI DEFAULT_MSG
                                   BMI_INCLUDE_DIR BMI_LIBRARY)


fix typo.

fix typo.

--- CMake/FindLLVM.cmake
+++ CMake/FindLLVM.cmake
@@ -72,7 +72,7 @@
   endif(LLVM_GXX_EXECUTABLE)

   if(LLVM_CONFIG_EXECUTABLE)
-      MESSGAE(STATUS "LLVM llvm-config found at: ${LLVM_CONFIG_EXECUTABLE}")
+      MESSAGE(STATUS "LLVM llvm-config found at: ${LLVM_CONFIG_EXECUTABLE}")
   else(LLVM_CONFIG_EXECUTABLE)
       MESSAGE(FATAL_ERROR "Could NOT find LLVM")
   endif(LLVM_CONFIG_EXECUTABLE)


fix for previous patch

fix for previous patch

--- CMakeCompilers.cmake
+++ CMakeCompilers.cmake
@@ -47,8 +47,8 @@
     # gcc versions 3.x.x lack this option thus we need this condition
     # gcc version is 4.6.1 at this moment
     if (_GCC_COMPILER_VERSION STRGREATER "40")
-      set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_DEBUG} -fno-tree-vectorize")
-      set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_DEBUG} -fno-tree-vectorize")
+      set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-tree-vectorize")
+      set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fno-tree-vectorize")
     endif (_GCC_COMPILER_VERSION STRGREATER "40")

     # add some -f declarations


Adding CUDA_PATH as an option for OPENCL_ROOT

--- src/FindOpenCL.cmake
+++ src/FindOpenCL.cmake
@@ -48,6 +48,8 @@
 #-----------------------
 if( DEFINED ENV{AMDAPPSDKROOT} )
 	set( OPENCL_ROOT $ENV{AMDAPPSDKROOT} CACHE PATH "Environment variable defining the root of OPENCL implementation" )
+elseif( DEFINED ENV{CUDA_PATH} )
+        set( OPENCL_ROOT $ENV{CUDA_PATH} CACHE PATH "Environment variable defining the root of OPENCL implementation" )
 else( )
 	set( OPENCL_ROOT "/usr/lib" CACHE PATH "Environment variable defining the root of OPENCL implementation" )
 endif( )


update sdl2 version for windows

update sdl2 version for windows

--- recipes/sdl2.cmake
+++ recipes/sdl2.cmake
@@ -14,7 +14,7 @@
     PREFIX ${CMAKE_BINARY_DIR}
     INSTALL_DIR ${TERRAFORM_ROOT}
     DOWNLOAD_DIR ${DOWNLOAD_DIR}
-    URL http://libsdl.org/release/SDL2-devel-2.0.3-mingw.tar.gz
+    URL http://libsdl.org/release/SDL2-devel-2.0.8-VC.zip
     CONFIGURE_COMMAND ""
     BUILD_COMMAND ""
     INSTALL_COMMAND
@@ -28,7 +28,7 @@
     PREFIX ${CMAKE_BINARY_DIR}
     INSTALL_DIR ${TERRAFORM_ROOT}
     DOWNLOAD_DIR ${DOWNLOAD_DIR}
-    URL http://libsdl.org/release/SDL2-2.0.3.tar.gz
+    URL http://libsdl.org/release/SDL2-2.0.8.tar.gz
     CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${TERRAFORM_ROOT}
   )
 endif ()


Restore 64-bit leap libraries

Restore 64-bit leap libraries

--- CMake/FindLeap.cmake
+++ CMake/FindLeap.cmake
@@ -1,7 +1,7 @@
 FIND_PATH(Leap_INCLUDE_DIRS NAMES "Leap.h" "LeapMath.h" PATHS ENV Leap_INCLUDE_DIR DOC "The Leap motion SDK include directory")
 message("Leap_INCLUDE_DIRS: ${Leap_INCLUDE_DIRS}; Leap_LIBRARIES: ${Leap_LIBRARIES}")
 message("PREFIX: ${CMAKE_PREFIX_PATH}")
-FIND_LIBRARY(Leap_LIBRARIES NAMES Leap PATHS /usr/lib32/Leap /lib32/Leap /usr/lib/Leap /lib/Leap /opt/Leap/ ${CMAKE_PREFIX_PATH}/Leap ENV Leap_LIB_DIR DOC "The Leap motion library (libLeap.so)")
+FIND_LIBRARY(Leap_LIBRARIES NAMES Leap PATHS /usr/lib/Leap /lib/Leap /opt/Leap/ ${CMAKE_PREFIX_PATH}/Leap ENV Leap_LIB_DIR DOC "The Leap motion library (libLeap.so)")

 SET(Leap_FOUND FALSE)


Fix the map file flag

Fix the map file flag

Not that it actually works, but it's supposed to be uppercase

--- cmake/Modules/CppUTestConfigurationOptions.cmake
+++ cmake/Modules/CppUTestConfigurationOptions.cmake
@@ -45,7 +45,7 @@
 endif (LONGLONG)

 if (MAP_FILE AND NOT MSVC)
-    set(CPPUTEST_LD_FLAGS "${CPPUTEST_LD_FLAGS} -Wl,-map,$<.map.txt")
+    set(CPPUTEST_LD_FLAGS "${CPPUTEST_LD_FLAGS} -Wl,-Map,$<.map.txt")
 endif (MAP_FILE AND NOT MSVC)

 if (COVERAGE AND NOT MSVC)


Autovectorization crashes GCC 3.1.  It's not very helpful anyway.  Turn it off.

--- indra/cmake/00-Common.cmake
+++ indra/cmake/00-Common.cmake
@@ -169,7 +169,8 @@
     add_definitions(-fvisibility=hidden)
     # don't catch SIGCHLD in our base application class for the viewer - some of our 3rd party libs may need their *own* SIGCHLD handler to work.  Sigh!  The viewer doesn't need to catch SIGCHLD anyway.
     add_definitions(-DLL_IGNORE_SIGCHLD)
-    add_definitions(-march=pentium3 -mfpmath=sse -ftree-vectorize)
+    add_definitions(-march=pentium3 -mfpmath=sse)
+    #add_definitions(-ftree-vectorize) # THIS CRASHES GCC 3.1-3.2
     if (NOT STANDALONE)
       # this stops us requiring a really recent glibc at runtime
       add_definitions(-fno-stack-protector)


Make CTest fail gracefully if eslint is not available

--- tests/JavascriptTests.cmake
+++ tests/JavascriptTests.cmake
@@ -39,6 +39,10 @@
 function(add_eslint_test name input)
   if (NOT BUILD_JAVASCRIPT_TESTS)
     return()
+  endif()
+
+  if (NOT ESLINT_EXECUTABLE)
+    message(FATAL_ERROR "CMake variable ESLINT_EXECUTABLE is not set. Run 'npm install' or disable BUILD_JAVASCRIPT_TESTS.")
   endif()

   set(_args ESLINT_IGNORE_FILE ESLINT_CONFIG_FILE)


ENH: Added NeuralNetworks

ENH: Added NeuralNetworks

--- itkIncludeDirectories.cmake
+++ itkIncludeDirectories.cmake
@@ -22,6 +22,7 @@
   ${ITK_SOURCE_DIR}/Code/IO
   ${ITK_SOURCE_DIR}/Code/Numerics/FEM
   ${ITK_SOURCE_DIR}/Code/Numerics/Statistics
+  ${ITK_SOURCE_DIR}/Code/Numerics/NeuralNetworks
   ${ITK_SOURCE_DIR}/Code/SpatialObject
   ${ITK_SOURCE_DIR}/Utilities/MetaIO
   ${ITK_SOURCE_DIR}/Utilities/NrrdIO
@@ -86,6 +87,7 @@
   ${ITK_INSTALL_INCLUDE_DIR}/IO
   ${ITK_INSTALL_INCLUDE_DIR}/Numerics/FEM
   ${ITK_INSTALL_INCLUDE_DIR}/Numerics/Statistics
+  ${ITK_INSTALL_INCLUDE_DIR}/Numerics/NeuralNetworks
   ${ITK_INSTALL_INCLUDE_DIR}/SpatialObject
   ${ITK_INSTALL_INCLUDE_DIR}/Utilities/MetaIO
   ${ITK_INSTALL_INCLUDE_DIR}/Utilities/NrrdIO


chore(travis): trying to debug travis failures

--- cmake/consort/qt.cmake
+++ cmake/consort/qt.cmake
@@ -166,11 +166,14 @@
 			if( Qt5Core_VERSION_STRING VERSION_LESS "5.1" )
 				# Qt before 5.1 can generate errors
 				foreach(m ${_qt_modules})
+					co_debug(Qt5${m}_INCLUDE_DIRS)
 					foreach(d ${Qt5${m}_INCLUDE_DIRS})
 						if(NOT IS_DIRECTORY "${d}")
+							co_debug(d)
 							list(REMOVE_ITEM Qt5${m}_INCLUDE_DIRS "${d}")
 						endif()
 					endforeach()
+					co_debug(Qt5${m}_INCLUDE_DIRS)
 				endforeach()
 			endif()