Check for clang before using -isystem

Check for clang before using -isystem

When cross compiling with clang, the internal C++ headers are not found
when adding sysroot to -isystem, that is redundant anyway because it
will look for headers insider --sysroot path with same quality as it
would do with -isystem otherwise

Fixes errors like

FAILED: 3rdparty/openexr/CMakeFiles/IlmImf.dir/Iex/IexBaseExc.cpp.o
....
In file included from
TOPDIR/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/opencv/3.4.3+gitAUTOINC+b38c50b3d0_1f6d6f0626_bdb7bb85f3_34e4206aef_fccf7cd6a4-r0/git/3rdparty/openexr/Iex/IexBaseExc.cpp:43:
In file included from
TOPDIR/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/opencv/3.4.3+gitAUTOINC+b38c50b3d0_1f6d6f0626_bdb7bb85f3_34e4206aef_fccf7cd6a4-r0/git/3rdparty/openexr/Iex/IexBaseExc.h:48:
In file included from
TOPDIR/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/opencv/3.4.3+gitAUTOINC+b38c50b3d0_1f6d6f0626_bdb7bb85f3_34e4206aef_fccf7cd6a4-r0/recipe-sysroot/usr/lib//arm-bec-linux-musleabi/8.2.0/../../../include/c++/8.2.0/string:52:
In file included from
TOPDIR/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/opencv/3.4.3+gitAUTOINC+b38c50b3d0_1f6d6f0626_bdb7bb85f3_34e4206aef_fccf7cd6a4-r0/recipe-sysroot/usr/lib//arm-bec-linux-musleabi/8.2.0/../../../include/c++/8.2.0/bits/basic_string.h:6391:
In file included from
TOPDIR/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/opencv/3.4.3+gitAUTOINC+b38c50b3d0_1f6d6f0626_bdb7bb85f3_34e4206aef_fccf7cd6a4-r0/recipe-sysroot/usr/lib//arm-bec-linux-musleabi/8.2.0/../../../include/c++/8.2.0/ext/string_conversions.h:41:
TOPDIR/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/opencv/3.4.3+gitAUTOINC+b38c50b3d0_1f6d6f0626_bdb7bb85f3_34e4206aef_fccf7cd6a4-r0/recipe-sysroot/usr/lib//arm-bec-linux-musleabi/8.2.0/../../../include/c++/8.2.0/cstdlib:75:15:
fatal error: 'stdlib.h' file not found
              ^~~~~~~~~~
1 error generated.

Signed-off-by: Khem Raj <729d64b6f67515e258459a5f6d20ec88b2caf8df@gmail.com>

--- cmake/OpenCVUtils.cmake
+++ cmake/OpenCVUtils.cmake
@@ -259,7 +259,7 @@
     ocv_is_opencv_directory(__is_opencv_dir "${dir}")
     if(__is_opencv_dir)
       list(APPEND __add_before "${dir}")
-    elseif(CV_GCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0" AND
+    elseif(((CV_GCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0") OR CV_CLANG) AND
            dir MATCHES "/usr/include$")
       # workaround for GCC 6.x bug
     else()


Add missing alias for installed builds

Add missing alias for installed builds

--- cmake/jegp-config.cmake
+++ cmake/jegp-config.cmake
@@ -3,3 +3,6 @@
 find_dependency(range-v3 0.10.0)

 include(${CMAKE_CURRENT_LIST_DIR}/jegp-targets.cmake)
+
+add_library(jegp::jegp INTERFACE IMPORTED)
+target_link_libraries(jegp::jegp INTERFACE jegp)


Fixed naming of Mac Package.

Fixed naming of Mac Package.

--- cmake/setup_cpack.cmake
+++ cmake/setup_cpack.cmake
@@ -46,7 +46,7 @@
     )

   set(CPACK_PACKAGE_FILE_NAME
-    "${DEAL_II_PACKAGE_NAME}-${DEAL_II_PACKAGE_VERSION}"
+    "dealii-${DEAL_II_PACKAGE_VERSION}"
     )

   set(CPACK_BUNDLE_NAME


CMake: Fixed typo on compiler flags

CMake: Fixed typo on compiler flags

Former-commit-id: 2f791be6ab4b6be2f8046ba0b3b5187df19edb19

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -15,7 +15,7 @@
     set(OPENBLAS_DYNAMIC_ARCH OFF)
 elseif(_host_name MATCHES "raken" OR DMRG_MICROARCH MATCHES "haswell|Haswell|HASWELL" )
     set(MARCH -march=haswell)
-    set(MTUNE -mtune=zenver1)
+    set(MTUNE -mtune=znver1)
     set(OPENBLAS_TARGET HASWELL)
     set(OPENBLAS_DYNAMIC_ARCH OFF)
 elseif(DMRG_MICROARCH MATCHES "zen|zn" )


Allow several warp_ggo in the same CMakeLists.txt

--- cmake/FindGengetopt.cmake
+++ cmake/FindGengetopt.cmake
@@ -26,21 +26,25 @@
 ")

 MACRO (WRAP_GGO GGO_SRCS)
+
+  # Set current list of files to zero for a new target
+  SET(GGO_FILES_ABS "")
+
   # Convert list of a file in a list with absolute file names
   FOREACH(GGO_FILE ${ARGN})
     GET_FILENAME_COMPONENT(GGO_FILE_ABS ${GGO_FILE} ABSOLUTE)
-    LIST(APPEND GGO_FILES_ABS ${GGO_FILE_ABS})
+    LIST(APPEND GGO_FILES_ABS ${GGO_FILE_ABS})
   ENDFOREACH()

   # Append to a new ggo file containing all files
   LIST(GET GGO_FILES_ABS 0 FIRST_GGO_FILE)
   GET_FILENAME_COMPONENT(FIRST_GGO_BASEFILENAME ${FIRST_GGO_FILE} NAME)
   ADD_CUSTOM_COMMAND(
-      OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIRST_GGO_BASEFILENAME}"
+      OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIRST_GGO_BASEFILENAME}"
       COMMAND ${CMAKE_COMMAND} -D INPUTS="${GGO_FILES_ABS}"
                                -D OUTPUT=${CMAKE_CURRENT_BINARY_DIR}/${FIRST_GGO_BASEFILENAME}
                                -P ${CMAKE_BINARY_DIR}/cat.cmake
-      DEPENDS ${GGO_FILES_ABS}
+      DEPENDS ${GGO_FILES_ABS}
   )
   SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/${FIRST_GGO_BASEFILENAME} PROPERTIES GENERATED TRUE)

@@ -51,7 +55,7 @@
   SET(GGO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${GGO_H} ${CMAKE_CURRENT_BINARY_DIR}/${GGO_C})
   ADD_CUSTOM_COMMAND(OUTPUT ${GGO_OUTPUT}
                      COMMAND gengetopt
-                     ARGS < ${CMAKE_CURRENT_BINARY_DIR}/${FIRST_GGO_BASEFILENAME}
+                     ARGS < ${CMAKE_CURRENT_BINARY_DIR}/${FIRST_GGO_BASEFILENAME}
                             --output-dir=${CMAKE_CURRENT_BINARY_DIR}
                             --arg-struct-name=args_info_${GGO_BASEFILENAME}
                             --func-name=cmdline_parser_${GGO_BASEFILENAME}


Updated to gstreamer 1.0 script.

Updated to gstreamer 1.0 script.

--- cmake/FindGstreamer.cmake
+++ cmake/FindGstreamer.cmake
@@ -1,12 +1,145 @@
-include(FindPkgConfig)
+# - Try to find Gstreamer and its plugins
+# Once done, this will define
+#
+#  GSTREAMER_FOUND - system has Gstreamer
+#  GSTREAMER_INCLUDE_DIRS - the Gstreamer include directories
+#  GSTREAMER_LIBRARIES - link these to use Gstreamer
+#
+# Additionally, gstreamer-base is always looked for and required, and
+# the following related variables are defined:
+#
+#  GSTREAMER_BASE_INCLUDE_DIRS - gstreamer-base's include directory
+#  GSTREAMER_BASE_LIBRARIES - link to these to use gstreamer-base
+#
+# Optionally, the COMPONENTS keyword can be passed to find_package()
+# and Gstreamer plugins can be looked for.  Currently, the following
+# plugins can be searched, and they define the following variables if
+# found:
+#
+#  gstreamer-app:        GSTREAMER_APP_INCLUDE_DIRS and GSTREAMER_APP_LIBRARIES
+#  gstreamer-audio:      GSTREAMER_AUDIO_INCLUDE_DIRS and GSTREAMER_AUDIO_LIBRARIES
+#  gstreamer-fft:        GSTREAMER_FFT_INCLUDE_DIRS and GSTREAMER_FFT_LIBRARIES
+#  gstreamer-pbutils:    GSTREAMER_PBUTILS_INCLUDE_DIRS and GSTREAMER_PBUTILS_LIBRARIES
+#  gstreamer-video:      GSTREAMER_VIDEO_INCLUDE_DIRS and GSTREAMER_VIDEO_LIBRARIES
+#
+# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-pkg_check_modules(PC_GSTREAMER_0_10 gstreamer-0.10)
-pkg_check_modules(PC_GSTREAMER_PLUGINS_BASE_0_10 gstreamer-plugins-base-0.10)
+find_package(PkgConfig)

-if(PC_GSTREAMER_0_10_FOUND AND PC_GSTREAMER_PLUGINS_BASE_0_10_FOUND)
-	set(GSTREAMER_INCLUDE_DIRS ${PC_GSTREAMER_0_10_INCLUDE_DIRS} ${PC_GSTREAMER_PLUGINS_BASE_0_10_INCLUDE_DIRS})
-	set(GSTREAMER_LIBRARIES ${PC_GSTREAMER_0_10_LIBRARIES} ${PC_GSTREAMER_PLUGINS_BASE_0_10_LIBRARIES})
-endif()
+# The minimum Gstreamer version we support.
+set(GSTREAMER_MINIMUM_VERSION 1.0.5)
+
+# Helper macro to find a Gstreamer plugin (or Gstreamer itself)
+#   _component_prefix is prepended to the _INCLUDE_DIRS and _LIBRARIES variables (eg. "GSTREAMER_AUDIO")
+#   _pkgconfig_name is the component's pkg-config name (eg. "gstreamer-1.0", or "gstreamer-video-1.0").
+#   _header is the component's header, relative to the gstreamer-1.0 directory (eg. "gst/gst.h").
+#   _library is the component's library name (eg. "gstreamer-1.0" or "gstvideo-1.0")
+macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
+    # FIXME: The QUIET keyword can be used once we require CMake 2.8.2.
+    pkg_check_modules(PC_${_component_prefix} ${_pkgconfig_name})
+
+    find_path(${_component_prefix}_INCLUDE_DIRS
+        NAMES ${_header}
+        HINTS ${PC_${_component_prefix}_INCLUDE_DIRS} ${PC_${_component_prefix}_INCLUDEDIR}
+        PATH_SUFFIXES gstreamer-1.0
+    )
+
+    find_library(${_component_prefix}_LIBRARIES
+        NAMES ${_library} gstreamer_android
+        HINTS ${PC_${_component_prefix}_LIBRARY_DIRS} ${PC_${_component_prefix}_LIBDIR} ${GSTREAMER_ROOT_DIR}
+    )
+endmacro()
+
+# ------------------------
+# 1. Find Gstreamer itself
+# ------------------------
+
+# 1.1. Find headers and libraries
+set(GLIB_ROOT_DIR ${GSTREAMER_ROOT_DIR})
+find_package(Glib REQUIRED)
+FIND_GSTREAMER_COMPONENT(GSTREAMER gstreamer-1.0 gst/gst.h gstreamer-1.0)
+FIND_GSTREAMER_COMPONENT(GSTREAMER_BASE gstreamer-base-1.0 gst/gst.h gstbase-1.0)
+
+# 1.2. Check Gstreamer version
+if (GSTREAMER_INCLUDE_DIRS)
+    if (EXISTS "${GSTREAMER_INCLUDE_DIRS}/gst/gstversion.h")
+        file(READ "${GSTREAMER_INCLUDE_DIRS}/gst/gstversion.h" GSTREAMER_VERSION_CONTENTS)
+
+        string(REGEX MATCH "#define +GST_VERSION_MAJOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
+        set(GSTREAMER_VERSION_MAJOR "${CMAKE_MATCH_1}")
+
+        string(REGEX MATCH "#define +GST_VERSION_MINOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
+        set(GSTREAMER_VERSION_MINOR "${CMAKE_MATCH_1}")
+
+        string(REGEX MATCH "#define +GST_VERSION_MICRO +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
+        set(GSTREAMER_VERSION_MICRO "${CMAKE_MATCH_1}")
+
+        set(GSTREAMER_VERSION "${GSTREAMER_VERSION_MAJOR}.${GSTREAMER_VERSION_MINOR}.${GSTREAMER_VERSION_MICRO}")
+    endif ()
+endif ()
+
+# FIXME: With CMake 2.8.3 we can just pass GSTREAMER_VERSION to FIND_PACKAGE_HANDLE_STANDARD_ARGS as VERSION_VAR
+#        and remove the version check here (GSTREAMER_MINIMUM_VERSION would be passed to FIND_PACKAGE).
+set(VERSION_OK TRUE)
+if ("${GSTREAMER_VERSION}" VERSION_LESS "${GSTREAMER_MINIMUM_VERSION}")
+    set(VERSION_OK FALSE)
+endif ()
+
+# -------------------------
+# 2. Find Gstreamer plugins
+# -------------------------
+
+FIND_GSTREAMER_COMPONENT(GSTREAMER_APP gstreamer-app-1.0 gst/app/gstappsink.h gstapp-1.0)
+FIND_GSTREAMER_COMPONENT(GSTREAMER_AUDIO gstreamer-audio-1.0 gst/audio/audio.h gstaudio-1.0)
+FIND_GSTREAMER_COMPONENT(GSTREAMER_FFT gstreamer-fft-1.0 gst/fft/gstfft.h gstfft-1.0)
+FIND_GSTREAMER_COMPONENT(GSTREAMER_PBUTILS gstreamer-pbutils-1.0 gst/pbutils/pbutils.h gstpbutils-1.0)
+FIND_GSTREAMER_COMPONENT(GSTREAMER_VIDEO gstreamer-video-1.0 gst/video/video.h gstvideo-1.0)
+
+# ------------------------------------------------
+# 3. Process the COMPONENTS passed to FIND_PACKAGE
+# ------------------------------------------------
+set(_GSTREAMER_REQUIRED_VARS Glib_INCLUDE_DIRS Glib_LIBRARIES GSTREAMER_INCLUDE_DIRS GSTREAMER_LIBRARIES VERSION_OK GSTREAMER_BASE_INCLUDE_DIRS GSTREAMER_BASE_LIBRARIES)

 include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(GSTREAMER DEFAULT_MSG GSTREAMER_LIBRARIES GSTREAMER_INCLUDE_DIRS)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gstreamer DEFAULT_MSG GSTREAMER_LIBRARIES GSTREAMER_INCLUDE_DIRS)
+
+list(APPEND GSTREAMER_INCLUDE_DIRS ${Glib_INCLUDE_DIRS})
+list(APPEND GSTREAMER_LIBRARIES ${Glib_LIBRARIES})
+list(APPEND GSTREAMER_INCLUDE_DIRS ${GSTREAMER_BASE_INCLUDE_DIRS})
+list(APPEND GSTREAMER_LIBRARIES ${GSTREAMER_BASE_LIBRARIES})
+list(APPEND GSTREAMER_INCLUDE_DIRS ${GSTREAMER_APP_INCLUDE_DIRS})
+list(APPEND GSTREAMER_LIBRARIES ${GSTREAMER_APP_LIBRARIES})
+list(APPEND GSTREAMER_INCLUDE_DIRS ${GSTREAMER_VIDEO_INCLUDE_DIRS})
+list(APPEND GSTREAMER_LIBRARIES ${GSTREAMER_VIDEO_LIBRARIES})
+
+foreach (_component ${Gstreamer_FIND_COMPONENTS})
+    set(_gst_component "GSTREAMER_${_component}")
+    string(TOUPPER ${_gst_component} _UPPER_NAME)
+
+    FIND_PACKAGE_HANDLE_STANDARD_ARGS(${_UPPER_NAME} DEFAULT_MSG ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
+    list(APPEND GSTREAMER_INCLUDE_DIRS ${${_UPPER_NAME}_INCLUDE_DIRS})
+    list(APPEND GSTREAMER_LIBRARIES ${${_UPPER_NAME}_LIBRARIES})
+endforeach ()
+
+


Mark QT_QMAKE_EXECUTABLE as advanced.

Mark QT_QMAKE_EXECUTABLE as advanced.

--- cmake/miscfunctions.cmake
+++ cmake/miscfunctions.cmake
@@ -3,6 +3,7 @@
     # Hide some variables in the GUI
     mark_as_advanced(CMAKE_CODEBLOCKS_EXECUTABLE)
     mark_as_advanced(CMAKE_CODEBLOCKS_EXECUTABLE)
+    mark_as_advanced(QT_QMAKE_EXECUTABLE)
     if (APPLE)
         mark_as_advanced(CMAKE_OSX_ARCHITECTURES)
         mark_as_advanced(CMAKE_OSX_DEPLOYMENT_TARGET)


Add a workaround for incorrect CUDA_HOST_COMPILER setting

Recent versions of cmake set CUDA_HOST_COMPILER to CMAKE_C_COMPILER
which on OSX defaults to clang (/usr/bin/cc), but this is not a
supported cuda compiler.  This commit adds a workaround to
preemptively set CUDA_HOST_COMPILER to gcc if that compiler exists in
/usr/bin.

--- cmake/pcl_find_cuda.cmake
+++ cmake/pcl_find_cuda.cmake
@@ -1,4 +1,16 @@
 # Find CUDA
+
+
+# Recent versions of cmake set CUDA_HOST_COMPILER to CMAKE_C_COMPILER which
+# on OSX defaults to clang (/usr/bin/cc), but this is not a supported cuda
+# compiler.  So, here we will preemptively set CUDA_HOST_COMPILER to gcc if
+# that compiler exists in /usr/bin.  This will not override an existing cache
+# value if the user has passed CUDA_HOST_COMPILER on the command line.
+if (NOT DEFINED CUDA_HOST_COMPILER AND CMAKE_C_COMPILER_ID STREQUAL "Clang" AND EXISTS /usr/bin/gcc)
+  set(CUDA_HOST_COMPILER /usr/bin/gcc CACHE FILEPATH "Host side compiler used by NVCC")
+  message(STATUS "Setting CMAKE_HOST_COMPILER to /usr/bin/gcc instead of ${CMAKE_C_COMPILER}.  See http://dev.pointclouds.org/issues/979")
+endif()
+
 set(CUDA_FIND_QUIETLY TRUE)
 find_package(CUDA 4)

@@ -30,4 +42,10 @@
 	include(${PCL_SOURCE_DIR}/cmake/CudaComputeTargetFlags.cmake)
 	APPEND_TARGET_ARCH_FLAGS()

+  # Send a warning if CUDA_HOST_COMPILER is set to a compiler that is known
+  # to be unsupported.
+  if (CUDA_HOST_COMPILER STREQUAL CMAKE_C_COMPILER AND CMAKE_C_COMPILER_ID STREQUAL "Clang")
+    message(WARNING "CUDA_HOST_COMPILER is set to an unsupported compiler: ${CMAKE_C_COMPILER}.  See http://dev.pointclouds.org/issues/979")
+  endif()
+
 endif()


cmake: Zephyr module error on module name current

In CMake, ZEPHYR_CURRENT_MODULE_DIR is used during processing of module
CMakeLists.txt files.
If a module is named `current` then it's corresponding
`ZEPHYR_<module_name>_MODULE_DIR` would become ZEPHYR_CURRENT_MODULE_DIR
and thus colliding with internal Zephyr CMake variable.

Using module name `current` is therefore forbidden.
Print an error to users when a module named `current` is used in
Zephyr.

Signed-off-by: Torsten Rasmussen <a7c5b1d5a1f41fce6edfa3f7c2392ae0c59deafe@nordicsemi.no>

--- cmake/zephyr_module.cmake
+++ cmake/zephyr_module.cmake
@@ -76,8 +76,14 @@
       list(APPEND ZEPHYR_MODULE_NAMES ${module_name})

       string(TOUPPER ${module_name} MODULE_NAME_UPPER)
-      set(ZEPHYR_${MODULE_NAME_UPPER}_MODULE_DIR ${module_path})
-      set(ZEPHYR_${MODULE_NAME_UPPER}_CMAKE_DIR ${cmake_path})
+      if(NOT ${MODULE_NAME_UPPER} STREQUAL CURRENT)
+        set(ZEPHYR_${MODULE_NAME_UPPER}_MODULE_DIR ${module_path})
+        set(ZEPHYR_${MODULE_NAME_UPPER}_CMAKE_DIR ${cmake_path})
+      else()
+        message(FATAL_ERROR "Found Zephyr module named: ${module_name}\n\
+${MODULE_NAME_UPPER} is a restricted name for Zephyr modules as it is used for \
+\${ZEPHYR_${MODULE_NAME_UPPER}_MODULE_DIR} CMake variable.")
+      endif()
     endforeach()
   endif()
 else()


fix git clone call in cakepkg CLONE

fix git clone call in cakepkg CLONE

--- Modules/private/CakePkgClone.cmake
+++ Modules/private/CakePkgClone.cmake
@@ -185,7 +185,7 @@
   # prepare command line for git clone
   list(APPEND command_line "${repo_url}" "${resolved_destination}")
   # git clone
-  _cake_execute_git_command_in_repo("${command_line}" "" res_var)
+  _cake_execute_git_command_in_repo("${command_line}" "" _ res_var)

   if(res_var)
     message(FATAL_ERROR "[cake_pkg] git clone failed")


Fix incorrectly named linker variable

Fix incorrectly named linker variable

--- indra/cmake/00-Common.cmake
+++ indra/cmake/00-Common.cmake
@@ -155,7 +155,7 @@

 if (DARWIN)
   add_definitions(-DLL_DARWIN=1)
-  set(CMAKE_LD_FLAGS "-headerpad_max_install_names -search_paths_first")
+  set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlong-branch")
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-branch")
 endif (DARWIN)


Ensure "CMAKE_INSTALL_PREFIX" is properly passed to inner project.

The value of "ep_install_dir" is reserved for regular
external project. The user should still be able to set
CMAKE_INSTALL_PREFIX when configuring CTK and have it
installed when he expects.

See issue #65

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -157,7 +157,7 @@
     -DCMAKE_C_FLAGS_INIT:STRING=${CMAKE_C_FLAGS_INIT}
     -DADDITIONAL_C_FLAGS:STRING=${ADDITIONAL_C_FLAGS}
     -DADDITIONAL_CXX_FLAGS:STRING=${ADDITIONAL_CXX_FLAGS}
-    -DCMAKE_INSTALL_PREFIX:PATH=${ep_install_dir}
+    -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
     -DCTK_BUILD_SHARED_LIBS:BOOL=${CTK_BUILD_SHARED_LIBS}
     ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
     -DDOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY:PATH=${DOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY}


Fixed tabs instead of spaces

Fixed tabs instead of spaces

--- UseDoxygen.cmake
+++ UseDoxygen.cmake
@@ -109,9 +109,9 @@

 	configure_file(${DOXYFILE_IN} Doxyfile IMMEDIATE @ONLY)

-  if(NOT TARGET doc)
-    add_custom_target(doc)
-  endif()
+	if(NOT TARGET doc)
+		add_custom_target(doc)
+	endif()

 	add_dependencies(doc doxygen)
 endif()


STYLE: Improved documentation of the windows.h removal and the purpose of this script.

--- Utilities/Upgrading/FindWindowsMangledMethods.cmake
+++ Utilities/Upgrading/FindWindowsMangledMethods.cmake
@@ -13,6 +13,42 @@
 #
 #===========================================================================

+# As of December 15, 2004 VTK no longer includes windows.h by default
+# in most of its header files.  This change results in a 70% compile
+# time reduction on Windows compilers because the compiler does not
+# have to parse the 280K lines of source the preprocessor produces
+# from windows.h.  All VTK code that still includes windows.h does so
+# through vtkWindows.h which includes a minimal part of the real
+# windows.h header.
+#
+# In order to avoid the windows method mangling problem all three
+# possible names for such methods (Foo, FooA, and FooW) are provided
+# using a preprocessor trick.  Users can detect places in their own code
+# that may need this trick by using the cmake script
+# VTK/Utilities/Upgrading/FindWindowsMangledMethods.cmake.
+#
+# There are two backward-compatibility issues:
+#
+# 1.) User code that used the windows API without including windows.h
+# that worked before because VTK included it will now break until the
+# explicit inclusion is added.  This is considered acceptable because
+# the code was technically wrong in the first place.  As a quick-fix,
+# users can define VTK_INCLUDE_WINDOWS_H in their application and VTK
+# will include windows.h as it did before.
+#
+# 2.) A few virtual functions in VTK were renamed and replaced by
+# non-virtuals that forward their calls to a virtual internal
+# implementation.  User code calling these methods will not be affected.
+# User code wishing to override these methods in a subclass will have to
+# rename to the internal name.  Such user methods will also be exposed
+# by the above mentioned CMake script.  The most common such method is
+# GetClassName, which has been renamed to GetClassNameInternal.  Since
+# user code is supposed to define this method by using vtkTypeMacro or
+# vtkTypeRevisionMacro, this should not be a problem.
+
+#-----------------------------------------------------------------------------
+# Instructions to use this script:
+#
 # Set the current working directory to the top of a source tree and
 # run this script with this command:
 #


Adapted library version number.

Adapted library version number.

--- CMake/Version.cmake
+++ CMake/Version.cmake
@@ -1,7 +1,7 @@
 # edit the following three version numbers
 SET(VERSION_MAJOR 0)
 SET(VERSION_MINOR 3)
-SET(VERSION_RELEASE 0)
+SET(VERSION_RELEASE 1)

 #
 # The MIT License (MIT)


Bugfix: Pick up the Fortran interface for lapack correctly

git-svn-id: 59f82343654cec32357d3b049d399063e4e4cfc7@31154 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/modules/FindDEALII_LAPACK.cmake
+++ deal.II/cmake/modules/FindDEALII_LAPACK.cmake
@@ -88,18 +88,23 @@
   # Well, in case of static archives we have to manually pick up the
   # complete link interface. *sigh*
   #
-  # Do this unconditionally for the most common case:
-  # TODO: Non-GNU setups...
+  # If CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES is not available, do it
+  # unconditionally for the most common case (gfortran).
   #
   # Switch the library preference back to prefer dynamic libraries if
   # DEAL_II_PREFER_STATIC_LIBS=TRUE but DEAL_II_STATIC_EXECUTABLE=FALSE. In
   # this case system libraries should be linked dynamically.
   #
+  SET(_fortran_libs ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
+  SET_IF_EMPTY(_fortran_libs gfortran m quadmath c)
+
   SWITCH_LIBRARY_PREFERENCE()
-  FOREACH(_lib gfortran m quadmath)
+  FOREACH(_lib ${_fortran_libs})
     FIND_LIBRARY(${_lib}_LIBRARY
       NAMES ${_lib}
-      HINTS ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})
+      HINTS
+        ${CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES}
+        ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})
     MARK_AS_ADVANCED(${_lib}_LIBRARY)

     IF(NOT ${_lib}_LIBRARY MATCHES "-NOTFOUND")


Fix FindOGRE's handling of OgreBuildSettings.h.

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -140,11 +140,14 @@
 findpkg_framework(OGRE)

 # locate Ogre include files
-find_path(OGRE_CONFIG_INCLUDE_DIR NAMES OgreConfig.h HINTS ${OGRE_INC_SEARCH_PATH} ${OGRE_FRAMEWORK_INCLUDES} ${OGRE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES "OGRE")
+find_path(OGRE_CONFIG_INCLUDE_DIR NAMES OgreBuildSettings.h HINTS ${OGRE_INC_SEARCH_PATH} ${OGRE_FRAMEWORK_INCLUDES} ${OGRE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES "OGRE")
 find_path(OGRE_INCLUDE_DIR NAMES OgreRoot.h HINTS ${OGRE_CONFIG_INCLUDE_DIR} ${OGRE_INC_SEARCH_PATH} ${OGRE_FRAMEWORK_INCLUDES} ${OGRE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES "OGRE")
 set(OGRE_INCOMPATIBLE FALSE)

-if (OGRE_INCLUDE_DIR AND OGRE_CONFIG_INCLUDE_DIR)
+if (OGRE_INCLUDE_DIR)
+  if (NOT OGRE_CONFIG_INCLUDE_DIR)
+    set(OGRE_CONFIG_INCLUDE_DIR ${OGRE_INCLUDE_DIR})
+  endif ()
   # determine Ogre version
   file(READ ${OGRE_INCLUDE_DIR}/OgrePrerequisites.h OGRE_TEMP_VERSION_CONTENT)
   get_preprocessor_entry(OGRE_TEMP_VERSION_CONTENT OGRE_VERSION_MAJOR OGRE_VERSION_MAJOR)


Remove erroneous line that was brought in when copy/pasted

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -24,7 +24,6 @@

 # Debian Specific
 set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://6xq.net/pianobar/")
-set(CPACK_DEBIAN_cmake_PACKAGE_DEPENDS "TODO")
 set(CPACK_DEBIAN_PACKAGE_SECTION TODO)
 set(CPACK_DEBIAN_PACKAGE_PRIORITY optional)


Build protect from missing CppUTest library

--- build_api.cmake
+++ build_api.cmake
@@ -24,6 +24,15 @@
 	add_subdirectory(${CORE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/core)
 endmacro()

+
+# Add test only if not cross-compiling
+if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL ${CMAKE_SYSTEM_NAME})
+	find_package(CppUTest)
+	if(NOT ${CPPUTEST_FOUND})
+		message(WARNING "CppUTest library not present. Tests are disabled.")
+	endif()
+endif()
+
 # Creates a host unit test with name unit_test_${test_name}
 # TODO: move this to separate module
 #
@@ -36,11 +45,8 @@
 	# All test can use most recent standart
 	set(CMAKE_CXX_STANDARD 14)

-	# Add test only if not cross-compiling
-	if (${CMAKE_HOST_SYSTEM_NAME} STREQUAL ${CMAKE_SYSTEM_NAME})
-
-		find_package(CppUTest REQUIRED)
-
+	# Protect from missing test utilities
+	if(${CPPUTEST_FOUND})
 		cmake_parse_arguments(
 			UNIT_TEST
 			""
@@ -76,7 +82,6 @@
 				${UNIT_TEST_INC_DIRS})
 		endif()

-		message(STATUS "CPPUTEST INC: ${CPPUTEST_INCLUDE_DIRS}")
 		target_include_directories(${UNIT_TEST_NAME} PRIVATE ${CPPUTEST_INCLUDE_DIRS})
 		message("-----------------------------------------------")
 	endif()


Check if the PythonD target exists

Check if the PythonD target exists

This allows for external Python wrapping to work, and also continues to
work as expected when wrapping VTK modules. The dependency source
directory was also being added twice (once here, and once with the
binary directory in CMake/Wrapping.cmake).

Change-Id: Ie33ae695b66655b2b7c424f08c55cb18f25d882e

--- CMake/vtkPythonWrapping.cmake
+++ CMake/vtkPythonWrapping.cmake
@@ -29,11 +29,8 @@

   # Figure out the dependent PythonXYD libraries for the module
   foreach(dep ${${vtk-module}_LINK_DEPENDS})
-    if(NOT "${vtk-module}" STREQUAL "${dep}")
-      if(${dep}_WRAP_PYTHON)
-        list(APPEND extra_links ${dep}PythonD)
-        list(APPEND VTK_WRAP_INCLUDE_DIRS ${${dep}_SOURCE_DIR})
-      endif()
+    if(NOT "${vtk-module}" STREQUAL "${dep}" AND TARGET ${dep}PythonD)
+      list(APPEND extra_links ${dep}PythonD)
     endif()
   endforeach()


emscripten: use MINIMAL_RUNTIME=2

emscripten: use MINIMAL_RUNTIME=2

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -159,7 +159,7 @@
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s FETCH=1")
 endif()
 if (FIPS_EMSCRIPTEN_USE_MINIMAL_RUNTIME)
-    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s MINIMAL_RUNTIME=1 -s ENVIRONMENT=web")
+    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s MINIMAL_RUNTIME=2 -s ENVIRONMENT=web")
 endif()

 set(EMSC_EXE_LINKER_FLAGS "${EMSC_EXE_LINKER_FLAGS} --shell-file ${FIPS_EMSCRIPTEN_SHELL_HTML}")


Revert "Disable veccore option rather than enable builtin_veccore by default"

This reverts commit 970be6a29d95da581408df735a46f091e7efabcd.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1355,8 +1355,8 @@
   else()
     find_package(VecCore 0.4.2 CONFIG QUIET COMPONENTS ${VecCore_COMPONENTS})
     if(NOT VecCore_FOUND)
-      message(STATUS "VecCore not found, switching OFF 'veccore' option.")
-      set(veccore OFF CACHE BOOL "" FORCE)
+      message(STATUS "VecCore not found, switching on 'builtin_veccore' option.")
+      set(builtin_veccore ON CACHE BOOL "" FORCE)
     endif()
   endif()
   if(VecCore_FOUND)


Doc update

Doc update

--- DoxygenRule.cmake
+++ DoxygenRule.cmake
@@ -5,7 +5,8 @@
 #
 # * doxygen runs doxygen after compiling and installing the project
 # * doxygit runs doxygen and installs the documentation in
-#   GIT_DOCUMENTATION_REPO or GIT_ORIGIN_org
+#   CMAKE_SOURCE_DIR/../GIT_DOCUMENTATION_REPO or
+#   CMAKE_SOURCE_DIR/../GIT_ORIGIN_org

 find_package(Doxygen)
 if(NOT DOXYGEN_FOUND)


replaced IN_LIST with old-style list FIND

--- conan.cmake
+++ conan.cmake
@@ -29,7 +29,8 @@
   if(CMAKE_SYSTEM_NAME)
   #use default conan os setting if CMAKE_SYSTEM_NAME is not defined
     set(CONAN_SUPPORTED_PLATFORMS Windows Linux Macos Android iOS FreeBSD)
-    if( CMAKE_SYSTEM_NAME IN_LIST CONAN_SUPPORTED_PLATFORMS )
+    list (FIND CONAN_SUPPORTED_PLATFORMS "${CMAKE_SYSTEM_NAME}" _index)
+    if (${_index} GREATER -1)
     #check if the cmake system is a conan supported one
       set(_SETTINGS ${_SETTINGS} -s os=${CMAKE_SYSTEM_NAME})
     else()


non capturing output

non capturing output

--- conan.cmake
+++ conan.cmake
@@ -384,16 +384,16 @@
     message(STATUS "Conan executing: ${conan_command} ${_conan_args}")

     if(ARGUMENTS_OUTPUT_QUIET)
-      set(OUTPUT_CONTROL OUTPUT_QUIET)
-    endif()
-
-    execute_process(COMMAND ${conan_command} ${conan_args}
-                     RESULT_VARIABLE return_code
-                     OUTPUT_VARIABLE conan_output
-                     ERROR_VARIABLE conan_output
-                     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
-
-    message(STATUS "${conan_output}")
+        execute_process(COMMAND ${conan_command} ${conan_args}
+                        RESULT_VARIABLE return_code
+                        OUTPUT_VARIABLE conan_output
+                        ERROR_VARIABLE conan_output
+                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+    else()
+        execute_process(COMMAND ${conan_command} ${conan_args}
+                        RESULT_VARIABLE return_code
+                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+    endif()

     if(NOT "${return_code}" STREQUAL "0")
       message(FATAL_ERROR "Conan install failed='${return_code}'")


Fixed TbagPython_PYENV_NAME error in FindTbagPython cmake script.

--- cmake/TbagFindPackage/FindTbagPython.cmake
+++ cmake/TbagFindPackage/FindTbagPython.cmake
@@ -105,31 +105,42 @@
     endif ()

     if (__python_interpreter AND NOT Python_Interpreter_FOUND)
-        if (TbagPython_PYENV_NAME)
-            set (Python_ROOT_DIR "$ENV{HOME}/.pyenv/versions/${TbagPython_PYENV_NAME}")
-        endif ()
-
         if (CMAKE_VERSION VERSION_LESS "3.12")
-            find_package (PythonInterp ${__python_quiet} ${TbagPython_FIND_VERSION})
-            if (PYTHONINTERP_FOUND)
-                set (Python_Interpreter_FOUND ${PYTHONINTERP_FOUND})
-            endif ()
-            if (PYTHON_EXECUTABLE)
-                set (Python_EXECUTABLE ${PYTHON_EXECUTABLE})
-            endif ()
-            if (PYTHON_VERSION_STRING)
-                set (Python_VERSION ${PYTHON_VERSION_STRING})
-            endif ()
-            if (PYTHON_VERSION_MAJOR)
-                set (Python_VERSION_MAJOR ${PYTHON_VERSION_MAJOR})
-            endif ()
-            if (PYTHON_VERSION_MINOR)
-                set (Python_VERSION_MINOR ${PYTHON_VERSION_MINOR})
-            endif ()
-            if (PYTHON_VERSION_PATCH)
-                set (Python_VERSION_PATCH ${PYTHON_VERSION_PATCH})
-            endif ()
-        else ()
+            if (TbagPython_PYENV_NAME)
+                set (Python_ROOT_DIR "$ENV{HOME}/.pyenv/versions/${TbagPython_PYENV_NAME}")
+                set (Python_Interpreter_FOUND ON)
+                set (Python_EXECUTABLE ${Python_ROOT_DIR}/bin/python)
+                if (TbagPython_FIND_VERSION)
+                    set (Python_VERSION ${TbagPython_FIND_VERSION})
+                endif ()
+                # set (Python_VERSION_MAJOR ${PYTHON_VERSION_MAJOR})
+                # set (Python_VERSION_MINOR ${PYTHON_VERSION_MINOR})
+                # set (Python_VERSION_PATCH ${PYTHON_VERSION_PATCH})
+            else ()
+                find_package (PythonInterp ${__python_quiet} ${TbagPython_FIND_VERSION})
+                if (PYTHONINTERP_FOUND)
+                    set (Python_Interpreter_FOUND ${PYTHONINTERP_FOUND})
+                endif ()
+                if (PYTHON_EXECUTABLE)
+                    set (Python_EXECUTABLE ${PYTHON_EXECUTABLE})
+                endif ()
+                if (PYTHON_VERSION_STRING)
+                    set (Python_VERSION ${PYTHON_VERSION_STRING})
+                endif ()
+                if (PYTHON_VERSION_MAJOR)
+                    set (Python_VERSION_MAJOR ${PYTHON_VERSION_MAJOR})
+                endif ()
+                if (PYTHON_VERSION_MINOR)
+                    set (Python_VERSION_MINOR ${PYTHON_VERSION_MINOR})
+                endif ()
+                if (PYTHON_VERSION_PATCH)
+                    set (Python_VERSION_PATCH ${PYTHON_VERSION_PATCH})
+                endif ()
+            endif ()
+        else ()
+            if (TbagPython_PYENV_NAME)
+                set (Python_ROOT_DIR "$ENV{HOME}/.pyenv/versions/${TbagPython_PYENV_NAME}")
+            endif ()
             find_package (Python ${__python_quiet} ${TbagPython_FIND_VERSION} COMPONENTS Interpreter)
         endif ()
     endif ()
@@ -172,12 +183,8 @@
         endif ()

         if (CMAKE_VERSION VERSION_LESS "3.14")
-            if (NOT PYTHONINTERP_FOUND AND Python_Interpreter_FOUND)
-                set (PYTHONINTERP_FOUND ${Python_Interpreter_FOUND})
-            endif ()
-            if (NOT PYTHON_EXECUTABLE AND Python_EXECUTABLE)
-                set (PYTHON_EXECUTABLE ${Python_EXECUTABLE})
-            endif ()
+            set (PYTHONINTERP_FOUND ${Python_Interpreter_FOUND})
+            set (PYTHON_EXECUTABLE ${Python_EXECUTABLE})
             find_package (NumPy ${__python_quiet})
             if (NumPy_FOUND)
                 set (Python_NumPy_FOUND ${NumPy_FOUND})


From Michael Platings, "Minor ffmpeg build fix, Replaced IF (${FFMPEG_STDINT_INCLUDE_DIR}) with IF (FFMPEG_STDINT_INCLUDE_DIR)"

--- CMakeModules/FindFFmpeg.cmake
+++ CMakeModules/FindFFmpeg.cmake
@@ -137,7 +137,7 @@
         ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS} ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS}/libavutil
     )

-    IF (${FFMPEG_STDINT_INCLUDE_DIR})
+    IF (FFMPEG_STDINT_INCLUDE_DIR)
         SET(FFMPEG_INCLUDE_DIRS
             ${FFMPEG_INCLUDE_DIRS}
             ${FFMPEG_STDINT_INCLUDE_DIR}


Fix cross-compiling windows version detection

--- cmake/EigenDetermineOSVersion.cmake
+++ cmake/EigenDetermineOSVersion.cmake
@@ -26,7 +26,7 @@
 endfunction()

 function(DetermineOSVersion OS_VERSION)
-  if (WIN32)
+  if (WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
     file (TO_NATIVE_PATH "$ENV{COMSPEC}" SHELL)
     exec_program( ${SHELL} ARGS "/c" "ver" OUTPUT_VARIABLE ver_output)


PR31540: install libc++abi headers into include/c++/v1 in build area.

This allows an in-build-area clang binary to find <cxxabi.h>.

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

--- cmake/Modules/HandleLibCXXABI.cmake
+++ cmake/Modules/HandleLibCXXABI.cmake
@@ -10,7 +10,10 @@
 #   abidefines: A list of defines needed to compile libc++ with the ABI library
 #   abilib    : The ABI library to link against.
 #   abifiles  : A list of files (which may be relative paths) to copy into the
-#               libc++ build tree for the build.  These files will also be
+#               libc++ build tree for the build.  These files will be copied
+#               twice: once into include/, so the libc++ build itself can find
+#               them, and once into include/c++/v1, so that a clang built into
+#               the same build area will find them.  These files will also be
 #               installed alongside the libc++ headers.
 #   abidirs   : A list of relative paths to create under an include directory
 #               in the libc++ build directory.
@@ -31,8 +34,10 @@
   # The place in the build tree where we store out-of-source headers.
   set(LIBCXX_BUILD_HEADERS_ROOT "${CMAKE_BINARY_DIR}/include/c++-build")
   file(MAKE_DIRECTORY "${LIBCXX_BUILD_HEADERS_ROOT}")
+  file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/include/c++/v1")
   foreach(_d ${abidirs})
     file(MAKE_DIRECTORY "${LIBCXX_BUILD_HEADERS_ROOT}/${_d}")
+    file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/include/c++/v1/${_d}")
   endforeach()

   foreach(fpath ${LIBCXX_ABILIB_FILES})
@@ -44,6 +49,9 @@
         get_filename_component(ifile ${fpath} NAME)
         file(COPY "${incpath}/${fpath}"
           DESTINATION "${LIBCXX_BUILD_HEADERS_ROOT}/${dstdir}"
+          )
+        file(COPY "${incpath}/${fpath}"
+          DESTINATION "${CMAKE_BINARY_DIR}/include/c++/v1/${dstdir}"
           )
         if (LIBCXX_INSTALL_HEADERS)
           install(FILES "${LIBCXX_BUILD_HEADERS_ROOT}/${fpath}"


hopefully this is the last time i need to mess with eigen scope

--- cmake/mtao_fetch_dependencies.cmake
+++ cmake/mtao_fetch_dependencies.cmake
@@ -25,7 +25,11 @@
         set(BUILD_TESTING OFF)
         fetch_dep(eigen https://gitlab.com/libeigen/eigen.git bcbaad6d874d451817457ae0603f953cda3c0c06 OFF)
         set(EIGEN_INCLUDE_DIR ${eigen_SOURCE_DIR})
-        find_package(Eigen3 REQUIRED)
+        if(EIGEN3_FOUND AND NOT TARGET Eigen3::Eigen)
+            add_library(Eigen3::Eigen INTERFACE IMPORTED GLOBAL)
+            set_target_properties(Eigen3::Eigen PROPERTIES
+                INTERFACE_INCLUDE_DIRECTORIES "${EIGEN3_INCLUDE_DIR}")
+        endif()
 ENDIF()
 if(MTAO_USE_OPENGL)
     find_package(GLFW)


Disable URHO3D_SSE by default (as original intended) for old MinGW.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -171,6 +171,7 @@
             # Certain MinGW versions fail to compile SSE code. This is the initial guess for known "bad" version range, and can be tightened later
             message (WARNING "Disabling SSE by default due to MinGW version. It is recommended to upgrade to MinGW with GCC >= 4.9.1. "
                 "You can also try to re-enable SSE with CMake option -DURHO3D_SSE=1, but this may result in compile errors.")
+            set (HAVE_SSE2 FALSE)
         endif ()
     endif ()
     if (X86 OR WEB)
@@ -692,8 +693,8 @@
                     set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mstackrealign")
                     set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mstackrealign")
                 else ()
-                    set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fno-tree-loop-vectorize -fno-tree-slp-vectorize -fno-tree-vectorize")
-                    set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-tree-loop-vectorize -fno-tree-slp-vectorize -fno-tree-vectorize")
+                    set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fno-tree-slp-vectorize -fno-tree-vectorize")
+                    set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-tree-slp-vectorize -fno-tree-vectorize")
                 endif ()
             endif ()
         else ()


cmake/gtest: enable crosscompile

cmake/gtest: enable crosscompile

--- cmake/Modules/BuildGTest.cmake
+++ cmake/Modules/BuildGTest.cmake
@@ -1,16 +1,21 @@
 if(MSVC11)
-  set(ADD_CXX_FLAGS "/D_VARIADIC_MAX=10")
+  set(ADD_CXX_FLAGS "-D_VARIADIC_MAX=10")
 endif()

 if(MINGW)
   set(GTEST_PATCH_CMD ${PATCH_EXECUTABLE} -p1 -i ${CMAKE_PATCH_DIR}/gtest-mingw.patch)
 endif()

+if(DEFINED CMAKE_TOOLCHAIN_FILE)
+  set(CROSSCOMPILE_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE})
+endif()
+
 ExternalProject_Add(
   gtest
   URL "${GTEST_URL}"
   URL_MD5 ${GTEST_MD5}
-  CMAKE_ARGS -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_FLAGS=${ADD_CXX_FLAGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -Dgtest_force_shared_crt:BOOL=ON
+  CMAKE_ARGS ${CROSSCOMPILE_OPTIONS}
+             -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_FLAGS=${ADD_CXX_FLAGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -Dgtest_force_shared_crt:BOOL=ON
   BUILD_IN_SOURCE 1
   PATCH_COMMAND ${GTEST_PATCH_CMD}
   INSTALL_COMMAND ""


cmake: implement zephyr_get(<variable>) function

Fixes: #40389

This commit implements zephyr_get(<variable>).

The purpose of zephyr_get(<variable>) is to ensure a uniform way to
handle variables which can be defined as:
- CMake cache variable, for example `-D<var>=<value>`.
- Environment variable
- Locally in CMakeLists.txt file before `find_package(Zephyr)`

It furthermore ensures that if an environment setting hides a local
setting then a warning is printed.

using
zephyr_get(<var>)

removes the need for constructs like:
set_ifndef(<var> "$ENV{<var>}")
set(<var> ${<var>} CACHE PATH "")

if(NOT DEFINED <var>)
  set(<var> $ENV{<var>})
endif()

if (NOT DEFINED ENV{<var>})
  message(FATAL_ERROR <error>)
endif()

and also ensures identical preference order for variables used in Zephyr
1. cache
2. environment
3. local scope var

It also ensures the variables supported through environment can also be
set using `-D<var>=<value>`

Signed-off-by: Torsten Rasmussen <a7c5b1d5a1f41fce6edfa3f7c2392ae0c59deafe@nordicsemi.no>

--- cmake/modules/extensions.cmake
+++ cmake/modules/extensions.cmake
@@ -2315,6 +2315,49 @@
 endfunction()

 # Usage:
+#   zephyr_get(<variable>)
+#
+# Return the value of <variable> as local scoped variable of same name.
+#
+# zephyr_get() is a common function to provide a uniform way of supporting
+# build settings that can be set from CMakeLists.txt, CMake cache, or in
+# environment.
+#
+# The order of precedence for variables defined in multiple scopes:
+# - CMake cache, set by `-D<var>=<value>` or `set(<var> <val> CACHE ...)`
+# - Environment
+# - Locally in CMakeLists.txt before 'find_package(Zephyr)'
+#
+# For example, if ZEPHYR_TOOLCHAIN_VARIANT is set in environment but locally
+# overridden by setting ZEPHYR_TOOLCHAIN_VARIANT directly in the CMake cache
+# using `-DZEPHYR_TOOLCHAIN_VARIANT=<val>`, then the value from the cache is
+# returned.
+function(zephyr_get variable)
+  cmake_parse_arguments(GET_VAR "" "" "" ${ARGN})
+
+  if(DEFINED CACHE{${variable}})
+    set(${variable} $CACHE{${variable}} PARENT_SCOPE)
+  elseif(DEFINED ENV{${variable}})
+    set(${variable} $ENV{${variable}} PARENT_SCOPE)
+    # Set the environment variable in CMake cache, so that a build invocation
+    # triggering a CMake rerun doesn't rely on the environment variable still
+    # being available / have identical value.
+    set(${variable} $ENV{${variable}} CACHE INTERNAL "")
+
+    if(DEFINED ${variable} AND NOT "${${variable}}" STREQUAL "$ENV{${variable}}")
+      # Variable exists as a local scoped variable, defined in a CMakeLists.txt
+      # file, however it is also set in environment.
+      # This might be a surprise to the user, so warn about it.
+      message(WARNING "environment variable '${variable}' is hiding local "
+                      "variable of same name.\n"
+                      "Environment value (in use): $ENV{${variable}}\n"
+                      "Local scope value (hidden): ${${variable}}\n"
+      )
+    endif()
+  endif()
+endfunction(zephyr_get variable)
+
+# Usage:
 #   zephyr_check_cache(<variable> [REQUIRED])
 #
 # Check the current CMake cache for <variable> and warn the user if the value
@@ -2382,13 +2425,13 @@

   set(app_cmake_lists ${${variable}})
   if(cached_value STREQUAL ${variable})
-    # The app build scripts did not set a default, The BOARD we are
+    # The app build scripts did not set a default, The variable we are
     # reading is the cached value from the CLI
     unset(app_cmake_lists)
   endif()

   if(DEFINED CACHED_${variable})
-    # Warn the user if it looks like he is trying to change the board
+    # Warn the user if it looks like he is trying to change the variable
     # without cleaning first
     if(cli_argument)
       if(NOT ((CACHED_${variable} STREQUAL cli_argument) OR (${variable}_DEPRECATED STREQUAL cli_argument)))
@@ -2401,23 +2444,21 @@

     if(CACHED_${variable})
       set(${variable} ${CACHED_${variable}} PARENT_SCOPE)
+      set(${variable} ${CACHED_${variable}})
       # This resets the user provided value with previous (working) value.
       set(${variable} ${CACHED_${variable}} CACHE STRING "Selected ${variable_text}" FORCE)
     else()
       unset(${variable} PARENT_SCOPE)
       unset(${variable} CACHE)
     endif()
-  elseif(cli_argument)
-    set(${variable} ${cli_argument})
-
-  elseif(DEFINED ENV{${variable}})
-    set(${variable} $ENV{${variable}})
-
-  elseif(app_cmake_lists)
-    set(${variable} ${app_cmake_lists})
-
-  elseif(${CACHE_VAR_REQUIRED})
-    message(FATAL_ERROR "${variable} is not being defined on the CMake command-line in the environment or by the app.")
+  else()
+    zephyr_get(${variable})
+  endif()
+
+  if(${CACHE_VAR_REQUIRED} AND NOT DEFINED ${variable})
+    message(FATAL_ERROR "${variable} is not being defined on the CMake command-line,"
+                        " in the environment or by the app."
+    )
   endif()

   # Store the specified variable in parent scope and the cache


search for SAMTOOLS_ADDITIONAL_HEADERS first, then bam.h

--- cmake/FindSamtools.cmake
+++ cmake/FindSamtools.cmake
@@ -20,7 +20,7 @@

 # Include dir
 find_path(Samtools_INCLUDE_DIR
-    NAMES bam.h ${SAMTOOLS_ADDITIONAL_HEADERS}
+    NAMES ${SAMTOOLS_ADDITIONAL_HEADERS} bam.h
     PATHS ${SAMTOOLS_SEARCH_DIRS}
     PATH_SUFFIXES include include/samtools ${_samtools_ver_path}
     HINTS ENV SAMTOOLS_ROOT


Fix SOVERSION, is a single incrementing integer.

Use only VERSION_MAJOR, not VERSION_MAJOR.VERSION_MINOR.

--- cmake/LibKMLHelper.cmake
+++ cmake/LibKMLHelper.cmake
@@ -14,7 +14,7 @@
   if(VERSION_STRING)
     set_target_properties(${LIB_NAME} PROPERTIES
       VERSION   "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}"
-      SOVERSION "${VERSION_MAJOR}.${VERSION_MINOR}")
+      SOVERSION "${VERSION_MAJOR}")
   endif()
   string(LENGTH ${LIB_NAME} ${LIB_NAME}_LEN)
   MATH(EXPR ${LIB_NAME}_END "${${LIB_NAME}_LEN} - 3")
@@ -63,4 +63,4 @@
   endif(WIN32)
   set(${_project}_LIBRARY "${INSTALL_DIR}/lib/${_lib}${_suffix}" )
   include_directories(${${_project}_INCLUDE_DIR})
-endmacro()+endmacro()


add diagnosis of unsupported compilers for CUDA 11

--- cmake/alpakaCommon.cmake
+++ cmake/alpakaCommon.cmake
@@ -395,6 +395,14 @@
                         if(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 9.0)
                             message(FATAL_ERROR "NVCC 10.2 does not support GCC 9+. Please use GCC 5, 6, 7 or 8!")
                         endif()
+                    elseif(CUDA_VERSION VERSION_EQUAL 11.0)
+                        if(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 10.0)
+                            message(FATAL_ERROR "NVCC 11.0 does not support GCC 10+. Please use GCC 5, 6, 7, 8 or 9!")
+                        endif()
+                    elseif(CUDA_VERSION VERSION_EQUAL 11.1 OR CUDA_VERSION VERSION_EQUAL 11.2)
+                        if(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 11.0)
+                            message(FATAL_ERROR "NVCC ${CUDA_VERSION} does not support GCC 11+. Please use GCC 5, 6, 7, 8, 9 or 10!")
+                        endif()
                     endif()
                 elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
                     if(CUDA_VERSION VERSION_EQUAL 9.0)
@@ -420,6 +428,14 @@
                     elseif(CUDA_VERSION VERSION_EQUAL 10.2)
                         if(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 9.0)
                             message(FATAL_ERROR "NVCC 10.2 does not support clang 9+. Please use clang 4, 5, 6, 7 or 8!")
+                        endif()
+                    elseif(CUDA_VERSION VERSION_EQUAL 11.0)
+                        if(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 10.0)
+                            message(FATAL_ERROR "NVCC 11.0 does not support clang 10+. Please use clang 4, 5, 6, 7, 8 or 9!")
+                        endif()
+                    elseif(CUDA_VERSION VERSION_EQUAL 11.1 OR CUDA_VERSION VERSION_EQUAL 11.2)
+                        if(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 11.0)
+                            message(FATAL_ERROR "NVCC 10.2 does not support clang 11+. Please use clang 4, 5, 6, 7, 8, 9 or 10!")
                         endif()
                     endif()
                 endif()


#1303 - Updated the OpenIGTLink version tag to the latest: c34d51ec59

git-svn-id: f70d4c833b20674991d6651a5f592bbdbe6b47b2@8448 30ced1d1-d8fb-0310-b896-84269ee58dd6

--- CMake/CMakeExternals/OPENIGTLINK.cmake
+++ CMake/CMakeExternals/OPENIGTLINK.cmake
@@ -35,7 +35,7 @@
 IF(NOT DEFINED OpenIGTLink_DIR)

     #1273 - OpenIGTLink version update due to bugfixes.
-    SET(revision_tag 896305347a)
+    SET(revision_tag c34d51ec59)
     IF(${proj}_REVISION_TAG)
         SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


Fix slicer repository

Fix slicer repository

During the transition to slicer 4.4, vovythevov was used for testing and
coding. It was unfortunately not updated to KitwareMedical.

--- CMake/Superbuild/External_Slicer.cmake
+++ CMake/Superbuild/External_Slicer.cmake
@@ -79,7 +79,7 @@
   else()
     set(${proj}_SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj})
     list(APPEND ${proj}_EP_ARGS
-      GIT_REPOSITORY "${git_protocol}://github.com/vovythevov/Slicer.git"
+      GIT_REPOSITORY "${git_protocol}://github.com/KitwareMedical/Slicer.git"
       GIT_TAG "39c94165ea7decc109cd7e77674304765c4149d9"
       )
   endif()


Disable TCL as it does not build on Mac OS 10.8/10.9

See http://na-mic.org/Mantis/view.php?id=3405

--- CMake/Superbuild/External_Slicer.cmake
+++ CMake/Superbuild/External_Slicer.cmake
@@ -123,6 +123,7 @@
       -DSlicer_BUILD_EXTENSIONMANAGER_SUPPORT:BOOL=OFF
       -DSlicer_USE_QtTesting:BOOL=OFF
       -DSlicer_USE_PYTHONQT:BOOL=ON
+      -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF
       -DSlicer_QTLOADABLEMODULES_DISABLED:STRING=SlicerWelcome
       -DSlicer_QTSCRIPTEDMODULES_DISABLED:STRING=Endoscopy^^SelfTests^^LabelStatistics
       -DSlicer_BUILD_ChangeTrackerPy:BOOL=OFF


STYLE: Remove unnecessary variables

STYLE: Remove unnecessary variables

These variables were required when the Slicer extension was packaged in the inner-build directory.

--- DTIProcess.cmake
+++ DTIProcess.cmake
@@ -1,11 +1,3 @@
-#-----------------------------------------------------------------------------
-set(MODULE_NAME ${EXTENSION_NAME}) # Do not use 'project()'
-set(MODULE_TITLE ${MODULE_NAME})
-
-string(TOUPPER ${MODULE_NAME} MODULE_NAME_UPPER)
-#unset( USE_SYSTEM_ITK CACHE )
-#unset( USE_SYSTEM_VTK CACHE )
-#unset( USE_SYSTEM_SlicerExecutionModel CACHE )

 SETIFEMPTY(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
 SETIFEMPTY(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)


force-overwrite ceres options

force-overwrite ceres options

--- external/vigra_cmake/VAD_Ceres.cmake
+++ external/vigra_cmake/VAD_Ceres.cmake
@@ -41,10 +41,10 @@
         "#undef ERROR\n#define MAX_LOG_LEVEL -1" FILECONTENT "${FILECONTENT}")
   file(WRITE "${VAD_EXTERNAL_ROOT}/Ceres/internal/ceres/miniglog/glog/logging.h" "${FILECONTENT}")

-  set(EIGENSPARSE ON) #use Eigen (no additional deps required - but suitesparse should be faster!)
-  set(MINIGLOG ON) #use miniglog
-  set(EIGENSPARSE ON)
-  set(BUILD_TESTING OFF)
+  set(EIGENSPARSE ON CACHE BOOL "" FORCE) #use Eigen (no additional deps required - but suitesparse should be faster!)
+  set(MINIGLOG ON CACHE BOOL "" FORCE) #use miniglog
+  set(EIGENSPARSE ON CACHE BOOL "" FORCE)
+  set(BUILD_TESTING OFF CACHE BOOL "" FORCE)

   # TODO default seems to point to checkout out dir in source?!?
   add_subdirectory("${VAD_EXTERNAL_ROOT}/Ceres" "${CMAKE_BINARY_DIR}/external/Ceres")


Remove reference to nonexistant CMake variable `COMMON_FLAGS`

--- firmware/cmake/greatfet-common.cmake
+++ firmware/cmake/greatfet-common.cmake
@@ -58,7 +58,7 @@

 SET(LDSCRIPT_M0 "-T${PATH_GREATFET_FIRMWARE_COMMON}/LPC43xx_M0_memory.ld -Tlibopencm3_lpc43xx_m0.ld")

-SET(CFLAGS_COMMON "-Os -g3 -Wall -Wextra ${GREATFET_OPTS} ${COMMON_FLAGS} -fno-common -MD")
+SET(CFLAGS_COMMON "-Os -g3 -Wall -Wextra ${GREATFET_OPTS} -fno-common -MD")
 SET(LDFLAGS_COMMON "-nostartfiles -Wl,--gc-sections")

 if(V STREQUAL "1")


Fix case of linker script name for rad1o l0adables

--- firmware/cmake/greatfet-common.cmake
+++ firmware/cmake/greatfet-common.cmake
@@ -73,7 +73,7 @@
 SET(GREATFET_OPTS "-D${BOARD} -DLPC43XX -D${MCU_PARTNO} -D'VERSION_STRING=\"git-${VERSION}\"'")

 if(BUILD_OUTPUT_TYPE STREQUAL "L0ADABLE")
-	SET(LDSCRIPT_M4 "-T${PATH_GREATFET_FIRMWARE_COMMON}/${MCU_PARTNO}_M4_memory_l0adable.ld -T${PATH_GREATFET_FIRMWARE_COMMON}/lpc43xx_l0adable.ld")
+	SET(LDSCRIPT_M4 "-T${PATH_GREATFET_FIRMWARE_COMMON}/${MCU_PARTNO}_M4_memory_l0adable.ld -T${PATH_GREATFET_FIRMWARE_COMMON}/LPC43xx_l0adable.ld")
 else()
 	SET(LDSCRIPT_M4 "-T${PATH_GREATFET_FIRMWARE_COMMON}/${MCU_PARTNO}_M4_memory.ld -Tlibopencm3_lpc43xx_rom_to_ram.ld -T${PATH_GREATFET_FIRMWARE_COMMON}/LPC43xx_M4_M0_image_from_text.ld")
 endif()


Added silutator architecture to 64bit 9.3 ios toolchain


build: correct the `DT_SONAME`

build: correct the `DT_SONAME`

When ninja is invoked from a subdirectory it will convert the path to a
relative path, and that resulted in incorrect test results.  This
ensures that we get the correct soname.

--- cmake/modules/SwiftSupport.cmake
+++ cmake/modules/SwiftSupport.cmake
@@ -136,7 +136,7 @@
     if(CMAKE_SYSTEM_NAME STREQUAL Windows OR CMAKE_SYSTEM_NAME STREQUAL Darwin)
       set(emit_library -emit-library)
     else()
-      set(emit_library -emit-library -Xlinker -soname -Xlinker ${AST_OUTPUT})
+      set(emit_library -emit-library -Xlinker -soname -Xlinker ${CMAKE_SHARED_LIBRARY_PREFIX}${target}${CMAKE_SHARED_LIBRARY_SUFFIX})
     endif()
   endif()
   if(NOT AST_LIBRARY OR library_kind STREQUAL SHARED)


qtsvg results currently do not validate at http://validator.w3.org/, but
that appears to be a result of the validator being unfamiliar with SVG-1.2
(a draft SVG standard that has not been finalized yet) which is the version
of SVG produced by Qt4.  The two validation errors referred to the version
number (1.2) and one attribute (vector-effect) which is clearly documented
in the 1.2 draft.  Also, text offset issues which were in SVG results
produced by QT-4.4.3 are gone for QT-4.5.0 (as viewed with reliable SVG
viewers such as firefox).  Therefore, I have re-enabled svgqt by default.

svn path=/trunk/; revision=9737

--- cmake/modules/drivers-init.cmake
+++ cmake/modules/drivers-init.cmake
@@ -91,8 +91,15 @@
 "pngqt:qt:ON"
 "ppmqt:qt:ON"
 "tiffqt:qt:ON"
-# Currently does not validate and has text positioning errors.
-"svgqt:qt:OFF"
+# Currently does not validate at http://validator.w3.org/, but that appears
+# to be a result of the validator being unfamiliar with SVG-1.2 (a draft
+# SVG standard that has not been finalized yet) which is produced
+# by Qt4.  The validation errors
+# referred to the version number (1.2) and one attribute (vector-effect)
+# which is clearly documented in the 1.2 draft.  Also, text offset issues
+# which were in SVG results produced by QT-4.4.3 are gone for QT-4.5.0.
+# Therefore, the conclusion is to enable svgqt by default.
+"svgqt:qt:ON"
 "gif:gd:ON"
 "jpeg:gd:ON"
 "png:gd:ON"


Add missing include

Add missing include

--- cmake/projects/glfw/hunter.cmake
+++ cmake/projects/glfw/hunter.cmake
@@ -7,9 +7,10 @@
 endif()

 include(hunter_add_version)
+include(hunter_cacheable)
+include(hunter_cmake_args)
+include(hunter_download)
 include(hunter_pick_scheme)
-include(hunter_cacheable)
-include(hunter_download)

 hunter_add_version(
     PACKAGE_NAME
@@ -30,8 +31,8 @@
     URL
     "https://github.com/hunter-packages/glfw/archive/3.3.0-p0.tar.gz"
     SHA1
-    3621fc665397f07c57d1c77ac4d85d4634f18d3a
-    )
+    3621fc665397f07c57d1c77ac4d85d4634f18d3a
+    )

 hunter_cmake_args(
     glfw
@@ -41,7 +42,7 @@
     GLFW_BUILD_DOCS=OFF
     GLFW_INSTALL=ON
     )
-
+
 hunter_pick_scheme(DEFAULT url_sha1_cmake)
 hunter_cacheable(glfw)
 hunter_download(
@@ -55,4 +56,3 @@
       "lib/pkgconfig/glfw3.pc"

 )
-


updated test models

updated test models


[t:4814] don't run valgrind on tests that crash

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@43192 c7de825b-a66e-492c-adef-691d508d4ae1

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -44,6 +44,19 @@
   try-leak-reachable
   try-leak-uninit
   )
+
+## tests that are supposed to crash will generate memcheck failures
+set(tests_that_should_fail
+  try-assert0
+  try-assert-zero
+  test-assertA
+  test-assertB
+  test_truncate_txn_abort.tdb
+  test_db_no_env.tdb
+  recover-missing-dbfile.abortrecover
+  recover-missing-dbfile-2.abortrecover
+  )
+list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE ${tests_that_should_fail})

 ## don't run drd stress tests with valgrind either (because that would do valgrind twice)
 set(stress_tests


modules: updated FindSDL2.cmake.

modules: updated FindSDL2.cmake.

--- modules/FindSDL2.cmake
+++ modules/FindSDL2.cmake
@@ -45,11 +45,29 @@
 if(CORRADE_TARGET_EMSCRIPTEN)
     set(_SDL2_PATH_SUFFIXES SDL)
 else()
-    # Precompiled libraries for Windows are in x86/x64 subdirectories
-    if(CMAKE_SIZEOF_VOID_P EQUAL 8)
-        set(_SDL_LIBRARY_PATH_SUFFIX lib/x64)
-    elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
-        set(_SDL_LIBRARY_PATH_SUFFIX lib/x86)
+    set(_SDL2_PATH_SUFFIXES SDL2)
+    if(WIN32)
+        # Precompiled libraries for MSVC are in x86/x64 subdirectories
+        if(MSVC)
+            if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+                set(_SDL2_LIBRARY_PATH_SUFFIX lib/x64)
+            elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
+                set(_SDL2_LIBRARY_PATH_SUFFIX lib/x86)
+            endif()
+
+        # Both includes and libraries for MinGW are in some directory deep
+        # inside. There's also a CMake config file but it has HARDCODED path
+        # to /opt/local/i686-w64-mingw32, which doesn't make ANY SENSE,
+        # especially on Windows.
+        elseif(MINGW)
+            if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+                set(_SDL2_LIBRARY_PATH_SUFFIX x86_64-w64-mingw32/lib)
+                list(APPEND _SDL2_PATH_SUFFIXES x86_64-w64-mingw32/include/SDL2)
+            elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
+                set(_SDL2_LIBRARY_PATH_SUFFIX i686-w64-mingw32/lib)
+                list(APPEND _SDL2_PATH_SUFFIXES i686-w64-mingw32/include/SDL2)
+            endif()
+        endif()
     endif()

     find_library(SDL2_LIBRARY_RELEASE
@@ -58,15 +76,14 @@
         # the dylib first so it is preferred. Not sure how this maps to debug
         # config though :/
         NAMES SDL2-2.0 SDL2
-        PATH_SUFFIXES ${_SDL_LIBRARY_PATH_SUFFIX})
+        PATH_SUFFIXES ${_SDL2_LIBRARY_PATH_SUFFIX})
     find_library(SDL2_LIBRARY_DEBUG
         NAMES SDL2d
-        PATH_SUFFIXES ${_SDL_LIBRARY_PATH_SUFFIX})
+        PATH_SUFFIXES ${_SDL2_LIBRARY_PATH_SUFFIX})
     # FPHSA needs one of the _DEBUG/_RELEASE variables to check that the
     # library was found -- using SDL_LIBRARY, which will get populated by
     # select_library_configurations() below.
     set(SDL2_LIBRARY_NEEDED SDL2_LIBRARY)
-    set(_SDL2_PATH_SUFFIXES SDL2)
 endif()

 include(SelectLibraryConfigurations)


Version: Update development date

Version: Update development date

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


CMake CUDA: dev compile options not propergated

The compile options for the test cases are not propergated to all
tests.

--- test/common/devCompileOptions.cmake
+++ test/common/devCompileOptions.cmake
@@ -20,6 +20,8 @@

 IF(ALPAKA_ACC_GPU_CUDA_ENABLE AND (ALPAKA_CUDA_COMPILER MATCHES "nvcc") AND (ALPAKA_CUDA_VERSION VERSION_GREATER_EQUAL 11.0))
     LIST(APPEND CUDA_NVCC_FLAGS -Wdefault-stream-launch -Werror=default-stream-launch)
+    # export to parent scope to be visible in all test cases
+    set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} PARENT_SCOPE)
 ENDIF()

 #MSVC


NEW: Component to crypt an stl File as vtp and encrypt it

--- Qmitk/files.cmake
+++ Qmitk/files.cmake
@@ -32,6 +32,7 @@
   QmitkFunctionalityComponents/QmitkSurfaceCreatorComponent.cpp
   QmitkFunctionalityComponents/QmitkSurfaceTransformerComponent.cpp
   QmitkFunctionalityComponents/QmitkThresholdComponent.cpp
+  #QmitkFunctionalityComponents/QmitkSTLConverterComponent.cpp
   QmitkHelpBrowser.cpp
   QmitkInteractionFunctionalityComponent.cpp
   QmitkLevelWindowWidgetContextMenu.cpp
@@ -101,6 +102,7 @@
   QmitkFunctionalityComponents/QmitkSurfaceCreatorComponentGUI.ui
   QmitkFunctionalityComponents/QmitkSurfaceTransformerComponentGUI.ui
   QmitkFunctionalityComponents/QmitkThresholdComponentGUI.ui
+  #QmitkFunctionalityComponents/QmitkSTLConverterComponentGUI.ui
   QmitkLevelWindowPresetDefinition.ui
   QmitkLevelWindowRangeChange.ui
   QmitkLevelWindowWidget.ui
@@ -146,6 +148,7 @@
   QmitkFunctionalityComponents/QmitkSurfaceCreatorComponent.h
   QmitkFunctionalityComponents/QmitkSurfaceTransformerComponent.h
   QmitkFunctionalityComponents/QmitkThresholdComponent.h
+  #QmitkFunctionalityComponents/QmitkSTLConverterComponent.h
   QmitkHelpBrowser.h
   QmitkInteractionFunctionalityComponent.h
   QmitkLevelWindowWidgetContextMenu.h


ENH: Improvement of setting and unsetting *TOOL variables

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -35,7 +35,6 @@
 include(ExternalProject)
 include(SlicerMacroEmptyExternalProject)
 include(SlicerMacroCheckExternalProjectDependency)
-include(FindExternalTools)

 # Compute -G arg for configuring external projects with the same CMake generator:
 if(CMAKE_EXTRA_GENERATOR)
@@ -98,6 +97,7 @@
 option(USE_SYSTEM_SlicerExecutionModel "Build using an externally defined version of SlicerExecutionModel"  OFF)
 option(USE_SYSTEM_BatchMake "Build using an externally defined version of BatchMake" OFF)

+list(APPEND LIST_TOOLS DTI-Reg )
 SETIFEMPTY( INSTALL_RUNTIME_DESTINATION bin )
 SETIFEMPTY( EXTERNAL_SOURCE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )
 #------------------------------------------------------------------------------
@@ -120,6 +120,8 @@
 else()
   unset( USE_SYSTEM_VTK CACHE )
   list( REMOVE_ITEM ${LOCAL_PROJECT_NAME}_DEPENDENCIES DTIProcess )
+  list( REMOVE_ITEM LIST_TOOLS dtiprocess )
+  unset( DTIProcessTOOL CACHE )
 endif()
 if( COMPILE_EXTERNAL_ITKTransformTools )
   list( APPEND ${LOCAL_PROJECT_NAME}_DEPENDENCIES ITKTransformTools )
@@ -127,8 +129,12 @@
   set( ITKTransformTools_INSTALL_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ITKTransformTools-install )
   set( ITKTransformToolsTOOL ${ITKTransformTools_INSTALL_DIRECTORY}/${INSTALL_RUNTIME_DESTINATION}/ITKTransformTools CACHE PATH "Path to a program." FORCE )
 else()
+  unset( ITKTransformToolsTOOL CACHE )
   list( REMOVE_ITEM ${LOCAL_PROJECT_NAME}_DEPENDENCIES ITKTransformTools )
-endif()
+  list( REMOVE_ITEM LIST_TOOLS ITKTransformTools )
+endif()
+
+include(FindExternalTools)

 #-----------------------------------------------------------------------------
 # Define Superbuild global variables
@@ -270,7 +276,7 @@
     -DdtiprocessTOOL:PATH=${dtiprocessTOOL}
     -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/DTI-Reg-install
   )
-list(APPEND LIST_TOOLS DTI-Reg )
+
 ## Force rebuilding of the main subproject every time building from super structure
 ExternalProject_Add_Step(${proj} forcebuild
     COMMAND ${CMAKE_COMMAND} -E remove


checking for StringDefs.h, tiff.h and tcpd.h on linux systems

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -15,6 +15,29 @@
 #-----------------------------------------------------------------------------
 # MITK Prerequisites
 #-----------------------------------------------------------------------------
+
+if(UNIX AND NOT APPLE)
+#----------------------------- libxt-dev --------------------
+INCLUDE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
+
+set(CMAKE_REQUIRED_INCLUDES "/usr/include/X11/")
+CHECK_INCLUDE_FILE("StringDefs.h" STRING_DEFS_H)
+if(NOT STRING_DEFS_H)
+MESSAGE(FATAL_ERROR "error: could not find StringDefs.h provided by libxt-dev")
+endif()
+
+set(CMAKE_REQUIRED_INCLUDES "/usr/include/")
+CHECK_INCLUDE_FILE("tiff.h" TIFF_H)
+if(NOT TIFF_H)
+MESSAGE(FATAL_ERROR "error: could not find tiff.h - libtiff4-dev needs to be installed")
+endif()
+
+CHECK_INCLUDE_FILE("tcpd.h" LIB_WRAP)
+if(NOT LIB_WRAP)
+MESSAGE(FATAL_ERROR "error: could not find tcpd.h - libwrap0-dev needs to be installed")
+endif()
+
+endif()

 #----------------------------- Qt ---------------------------
 if(MITK_USE_QT)
@@ -64,7 +87,7 @@
   SET(ep_common_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLINUX_EXTRA")
 ENDIF()

-SET(ep_common_args
+SET(ep_common_args
   -DBUILD_TESTING:BOOL=${ep_build_testing}
   -DCMAKE_INSTALL_PREFIX:PATH=${ep_install_dir}
   -DBUILD_SHARED_LIBS:BOOL=ON
@@ -85,7 +108,7 @@
 )

 #-----------------------------------------------------------------------------
-# ExternalProjects
+# ExternalProjects
 #-----------------------------------------------------------------------------

 SET(external_projects
@@ -98,7 +121,7 @@
   OpenCV
   MITKData
   )
-
+
 # Include external projects
 FOREACH(p ${external_projects})
   INCLUDE(CMakeExternals/${p}.cmake)
@@ -112,7 +135,7 @@
   BUILD_SHARED_LIBS
   WITH_COVERAGE
   BUILD_TESTING
-
+
   MITK_USE_QT
   MITK_BUILD_ALL_PLUGINS
   MITK_BUILD_TUTORIAL
@@ -187,7 +210,7 @@
     -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
     -DMITK_KWSTYLE_EXECUTABLE:FILEPATH=${MITK_KWSTYLE_EXECUTABLE}
     -DMITK_MODULES_TO_BUILD:INTERNAL=${MITK_MODULES_TO_BUILD_PARAM}
-    -DCTK_DIR:PATH=${CTK_DIR}
+    -DCTK_DIR:PATH=${CTK_DIR}
     -DDCMTK_DIR:PATH=${DCMTK_DIR}
     -DVTK_DIR:PATH=${VTK_DIR}     # FindVTK expects VTK_DIR
     -DITK_DIR:PATH=${ITK_DIR}     # FindITK expects ITK_DIR


Remove Eq-specific module

Remove Eq-specific module

--- UseGnuWin32.cmake
+++ UseGnuWin32.cmake
@@ -1,16 +0,0 @@
-# Copyright (c) 2010 Daniel Pfeifer <daniel@pfeifer-mail.de>
-
-set(GNUWIN32_NAME GnuWin32)
-set(GNUWIN32_TGZ ${CMAKE_SOURCE_DIR}/CMake/${GNUWIN32_NAME}.tar.gz)
-set(GNUWIN32_DIR ${CMAKE_BINARY_DIR}/${GNUWIN32_NAME})
-
-if(NOT EXISTS ${GNUWIN32_DIR})
-  message(STATUS "  Extracting GnuWin32 to ${GNUWIN32_DIR}")
-  execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf
-    ${GNUWIN32_TGZ} WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
-endif(NOT EXISTS ${GNUWIN32_DIR})
-
-file(WRITE ${OUTPUT_INCLUDE_DIR}/unistd.h "\n")
-
-set(BISON_EXECUTABLE ${GNUWIN32_DIR}/bin/bison.bat)
-set(FLEX_EXECUTABLE ${GNUWIN32_DIR}/bin/flex.exe)


Enable CTEST_USE_LAUNCHERS only if CMake generator is Makefile based

--- CMake/VisomicsDashboardDriverScript.cmake
+++ CMake/VisomicsDashboardDriverScript.cmake
@@ -184,7 +184,10 @@
 set(track ${model}${track_suffix})

 # For more details, see http://www.kitware.com/blog/home/post/11
-set(CTEST_USE_LAUNCHERS 1)
+set(CTEST_USE_LAUNCHERS 0)
+if (NOT ${CMAKE_GENERATOR} MATCHES "Visual Studio")
+  set(CTEST_USE_LAUNCHERS 1)
+endif()

 if(empty_binary_directory)
   message("Directory ${CTEST_BINARY_DIRECTORY} cleaned !")


fixed: configure errors

fixed: configure errors

--- CMake/OSGExternalProjectHelper.cmake
+++ CMake/OSGExternalProjectHelper.cmake
@@ -87,6 +87,7 @@
   LIST(FIND _OSG_COMPONENTS OSGCluster _OSG_USE_CLUSTER)
   LIST(FIND _OSG_COMPONENTS OSGWindowQT4 _OSG_USE_QT)
   LIST(FIND _OSG_COMPONENTS OSGSystem _OSG_USE_SYSTEM)
+  LIST(FIND _OSG_COMPONENTS OSGContribWebInterface _OSG_USE_WEBINTERFACE)

   IF(_OSG_USE_CONTRIBCOMPUTE EQUAL -1 AND NOT _OSG_USE_SYSTEM EQUAL -1)
     LIST(FIND OSGSystem_DEP_LIB CUDA_CUDART_LIBRARY _OSG_USE_CONTRIBCOMPUTE)
@@ -102,6 +103,16 @@
       LIST(APPEND _OSG_COMPONENTS OSGCluster)
       SET(_OSG_USE_CLUSTER 1)
     ENDIF(_OSG_USE_CLUSTER EQUAL -1)
+
+    IF(_OSG_USE_WEBINTERFACE EQUAL -1)
+      LIST(FIND OSGContribCSM_DEP_OSG_LIB OSGContribWebInterface
+                _OSG_USE_WEBINTERFACE)
+
+      IF(NOT _OSG_USE_WEBINTERFACE EQUAL -1)
+        LIST(APPEND _OSG_COMPONENTS OSGContribWebInterface)
+      ENDIF()
+    ENDIF()
+
   ENDIF(NOT _OSG_USE_CONTRIBCSM EQUAL -1)

   FIND_PACKAGE(OpenSG REQUIRED COMPONENTS ${_OSG_COMPONENTS})
@@ -244,7 +255,7 @@
 #      OSG_CONFIGURE_CUDPP()
       OSG_CONFIGURE_CUDAPARTSDK(${OSG_SUPPORT_ROOT})

-      IF(NOT OSG_WITH_CUDAPARTSDK)
+      IF(NOT OSG_WITH_CUDAPARTSDK AND OSG_EXT_SUPPORT_ROOT)
         OSG_CONFIGURE_CUDAPARTSDK(${OSG_EXT_SUPPORT_ROOT})
       ENDIF()
     ENDIF(NOT OSG_BUILD_DEPENDEND)


Unset CMake cache variables like ^SimpleITKBasicFiltersGeneratedSource_

This variable was just accumulating in length with each CMake
configuration.

--- CMake/sitkGenerateFilterSource.cmake
+++ CMake/sitkGenerateFilterSource.cmake
@@ -218,7 +218,7 @@
   get_cmake_property( _varNames VARIABLES )
   foreach (_varName ${_varNames})
     if(_varName MATCHES "^SimpleITKBasicFiltersGeneratedSource_")
-      unset(${varName} CACHE)
+      unset(${_varName} CACHE)
     endif()
   endforeach()


improve configure of telepathy-qt4 for self-complied systems

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

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

 macro (configure_telepathy_qt4)
     sagase_configure_package (TELEPATHY_QT4
-        NAMES QtTelepathy Telepathy-QT4 telepathy-qt4 TelepathyQt4
+        NAMES QtTelepathy Telepathy-QT4 telepathy-qt4 TelepathyQt4 telepathy-1.0
         COMPONENTS QtTelepathyCore QtTelepathyCommon QtTelepathyClient telepathy-qt4 telepathy-qt4-farsight connection # connection added here to help sagase to find include folder with connection.h file
         PREFIXES ${ENV_NAALI_DEP_PATH} )
     sagase_configure_report (TELEPATHY_QT4)


Set new Boost ConfigurePackages.cmake.

Set new Boost ConfigurePackages.cmake.

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

 macro (configure_boost)
     if (MSVC)
-	    set(Boost_USE_MULTITHREADED ON) # test by mattiku
-        set (Boost_USE_STATIC_LIBS ON)
+	    set(Boost_USE_MULTITHREADED TRUE)
+        set(Boost_USE_STATIC_LIBS TRUE)
     else ()
-        set (Boost_USE_STATIC_LIBS OFF)
+        set(Boost_USE_STATIC_LIBS FALSE)
     endif ()

     if (APPLE)
-            set (BOOST_COMPONENTS boost_date_time boost_filesystem boost_system boost_thread boost_program_options boost_unit_test_framework)
+            set (BOOST_COMPONENTS boost_date_time boost_filesystem boost_system boost_thread boost_regex boost_program_options)
     else ()
-            set (BOOST_COMPONENTS date_time filesystem system thread program_options unit_test_framework)
+            set (BOOST_COMPONENTS date_time filesystem system thread regex program_options)
     endif ()

     sagase_configure_package (BOOST


COMP: update of temporary elastix fork hash

--- SuperBuild/ExternalElastix.cmake
+++ SuperBuild/ExternalElastix.cmake
@@ -20,7 +20,7 @@
 set( proj Elastix )

 set( ELASTIX_GIT_REPOSITORY https://github.com/FBerendsen/elastix )
-set( ELASTIX_GIT_TAG 8b347998d62c400bf6a8e20e2fb33032f1abfbaf )
+set( ELASTIX_GIT_TAG fc295ee2ee232a4e07e8404d602a4bfe7b6b5072 )

 UPDATE_SELX_SUPERBUILD_COMMAND(${proj})


Revert "MAINT: Turning off the unencrypted Git protocol"

This reverts commit 5f8b0687c08b8c5958d97c9672be16987fb8375f.

--- SuperBuild/External_CIP.cmake
+++ SuperBuild/External_CIP.cmake
@@ -26,6 +26,9 @@

 if(NOT DEFINED ${proj}_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})

+  if(NOT DEFINED git_protocol)
+    set(git_protocol "git")
+  endif()
   message(STATUS ${VTK_DIR})

   ExternalProject_Add(${proj}


Changes in CIP_PYTHON

Changes in CIP_PYTHON

--- SuperBuild/External_CIP.cmake
+++ SuperBuild/External_CIP.cmake
@@ -53,7 +53,7 @@
       -DBUILD_GENERATEMODEL:BOOL=OFF
       -DBUILD_GENERATESIMPLELUNGMASK:BOOL=OFF # temporarily off due to lack of VtkGlue
       -DBUILD_ComputeAirwayWallFromParticles:BOOL=OFF # temporarily off due to lack of VtkGlue
-      -DCIP_PYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE}    # To parse the convention files
+      -DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE}    # To parse the convention files
       -DUSE_CYTHON:BOOL=OFF
       -DCIP_BUILD_TESTING_PYTHON:BOOL=OFF
       -DSlicerExecutionModel_DIR:STRING=${SlicerExecutionModel_DIR}
@@ -66,7 +66,7 @@
       -DCIP_CLI_INSTALL_LIBRARY_DESTINATION:PATH=${Slicer_INSTALL_CLIMODULES_LIB_DIR}
       -DCIP_CLI_INSTALL_ARCHIVE_DESTINATION:PATH=${Slicer_INSTALL_CLIMODULES_LIB_DIR}
       -DCIP_CLI_INSTALL_RUNTIME_DESTINATION:PATH=${Slicer_INSTALL_CLIMODULES_BIN_DIR}
-      -DINSTALL_CIP_PYTHON_LIBRARY:BOOL=OFF
+      -DCIP_PYTHON_INSTALL:BOOL=OFF
       -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
       -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}


SuperBuild: upgrade to curl 7.54.1

SuperBuild: upgrade to curl 7.54.1

--- SuperBuild/CMake/External_curl.cmake
+++ SuperBuild/CMake/External_curl.cmake
@@ -46,8 +46,8 @@

 ExternalProject_Add(CURL
   PREFIX CURL
-  URL "http://curl.haxx.se/download/curl-7.40.0.tar.gz"
-  URL_MD5 58943642ea0ed050ab0431ea1caf3a6f
+  URL "http://curl.haxx.se/download/curl-7.54.1.tar.gz"
+  URL_MD5 21a6e5658fd55103a90b11de7b2a8a8c
   BINARY_DIR ${CURL_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
@@ -98,7 +98,7 @@
   LOG_INSTALL 1
   )

-SUPERBUILD_PATCH_SOURCE(CURL)
+# SUPERBUILD_PATCH_SOURCE(CURL)

 set(_SB_CURL_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
 if(WIN32)


COMP: GEOS_CMAKE_COMMAND is undefined, SB_CMAKE_COMMAND should be used instead

--- SuperBuild/CMake/External_geos.cmake
+++ SuperBuild/CMake/External_geos.cmake
@@ -36,7 +36,7 @@
    -DGEOS_ENABLE_MACOSX_FRAMEWORK:BOOL=OFF
    -DGEOS_BUILD_STATIC:BOOL=${BUILD_STATIC_LIBS}
    -DGEOS_BUILD_SHARED:BOOL=${BUILD_SHARED_LIBS}
-   CMAKE_COMMAND ${GEOS_CMAKE_COMMAND}
+   CMAKE_COMMAND ${SB_CMAKE_COMMAND}
    LOG_DOWNLOAD 1
    LOG_CONFIGURE 1
    LOG_BUILD 1


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 08)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 08)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

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


Simplify macOS platform check

Simplify macOS platform check

--- cmake/Modules/cvmfs_compiler.cmake
+++ cmake/Modules/cvmfs_compiler.cmake
@@ -54,9 +54,11 @@
 endif (CMAKE_COMPILER_IS_GNUCC)
 message (STATUS "using compiler opt flag ${CVMFS_OPT_FLAGS}")
 set (CVMFS_BASE_C_FLAGS "${CVMFS_OPT_FLAGS} -g -fno-strict-aliasing -fasynchronous-unwind-tables -fno-omit-frame-pointer -fvisibility=hidden -Wall")
-if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND ${CMAKE_SYSTEM_VERSION} VERSION_GREATER_EQUAL 15.0.0)
-  set(CVMFS_BASE_C_FLAGS "${CVMFS_BASE_C_FLAGS} -mmacosx-version-min=10.11")
-endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND ${CMAKE_SYSTEM_VERSION} VERSION_GREATER_EQUAL 15.0.0)
+if (APPLE)
+  if (${CMAKE_SYSTEM_VERSION} VERSION_GREATER_EQUAL 15.0.0)
+    set(CVMFS_BASE_C_FLAGS "${CVMFS_BASE_C_FLAGS} -mmacosx-version-min=10.11")
+  endif(${CMAKE_SYSTEM_VERSION} VERSION_GREATER_EQUAL 15.0.0)
+endif(APPLE)
 set (CVMFS_BASE_CXX_FLAGS "${CVMFS_BASE_C_FLAGS} -fno-exceptions")
 if (NOT USING_CLANG)
   set (CVMFS_BASE_C_FLAGS "${CVMFS_BASE_C_FLAGS} -fno-optimize-sibling-calls")


Fixed error in cmake script

Fixed error in cmake script

--- cmake/dev/eprosima_libraries.cmake
+++ cmake/dev/eprosima_libraries.cmake
@@ -12,6 +12,12 @@
             set(BUILD_OPTION "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}\n")
         endif()

+        # Separate CMAKE_PREFIX_PATH
+        set(CMAKE_PREFIX_PATH_ "")
+        foreach(cmake_prefix_path_element ${CMAKE_PREFIX_PATH})
+            set(CMAKE_PREFIX_PATH_ "${CMAKE_PREFIX_PATH_} -DCMAKE_PREFIX_PATH=${cmake_prefix_path_element}")
+        endforeach()
+
         file(MAKE_DIRECTORY ${${package}ExternalDir})
         file(WRITE ${${package}ExternalDir}/CMakeLists.txt
             "cmake_minimum_required(VERSION 2.8.11)\n"
@@ -23,7 +29,7 @@
              ${BUILD_OPTION}
              ${_USE_BOOST}
              "-DCMAKE_INSTALL_PREFIX=${${package}ExternalDir}/install\n"
-             "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}\n"
+             "${CMAKE_PREFIX_PATH_}\n"
              "DOWNLOAD_COMMAND echo\n"
              "UPDATE_COMMAND cd ${PROJECT_SOURCE_DIR} && git submodule update --recursive --init thirdparty/${package}\n"
              "SOURCE_DIR ${PROJECT_SOURCE_DIR}/thirdparty/${package}\n"


CMake: Restructure configuration file

CMake: Restructure configuration file

--- cmake/setup_cached_variables.cmake
+++ cmake/setup_cached_variables.cmake
@@ -1,6 +1,6 @@
 ## ---------------------------------------------------------------------
 ##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -47,10 +47,11 @@
 #     DEAL_II_LINKER_FLAGS_DEBUG
 #     DEAL_II_LINKER_FLAGS_RELEASE
 #
+# Components and miscellaneous options:
+#
 #     DEAL_II_WITH_64BIT_INDICES
-#
-# Miscellaneous options:
 #     DEAL_II_DOXYGEN_USE_MATHJAX
+#     DEAL_II_CPACK_EXTERNAL_LIBS_TREE
 #
 #
 # *)  May also be set via environment variable (CXXFLAGS, LDFLAGS)
@@ -319,35 +320,34 @@
 UNSET(ENV{LDFLAGS})

-
-########################################################################
-#                                                                      #
-#                             Components:                              #
-#                                                                      #
-########################################################################
-
-#
-# Configuration option for the 64 bit indices component:
-#
+########################################################################
+#                                                                      #
+#                Components and miscellaneous setup:                   #
+#                                                                      #
+########################################################################

 OPTION(DEAL_II_WITH_64BIT_INDICES
   "If set to ON, then use 64-bit data types to represent global degree of freedom indices. The default is to OFF. You only want to set this to ON if you will solve problems with more than 2^31 (approximately 2 billion) unknowns. If set to ON, you also need to ensure that both Trilinos and/or PETSc support 64-bit indices."
   OFF
   )

-
-
-########################################################################
-#                                                                      #
-#                         Miscellaneous setup:                         #
-#                                                                      #
-########################################################################
-
 OPTION(DEAL_II_DOXYGEN_USE_MATHJAX
   "If set to ON, doxygen documentation is generated using mathjax"
   OFF
   )
 MARK_AS_ADVANCED(DEAL_II_DOXYGEN_USE_MATHJAX)
+
+SET(DEAL_II_CPACK_EXTERNAL_LIBS_TREE "" CACHE PATH
+    "Path to tree of external libraries that will be installed in bundle package."
+  )
+MARK_AS_ADVANCED(DEAL_II_CPACK_EXTERNAL_LIBS_TREE)
+
+
+########################################################################
+#                                                                      #
+#                               Finalize:                              #
+#                                                                      #
+########################################################################

 #
 # We do not support installation into the binary directory any more ("too
@@ -408,11 +408,3 @@
     UNSET(${_var} CACHE)
   ENDIF()
 ENDFOREACH()
-
-# CPack miscellaneous options
-SET(DEAL_II_CPACK_EXTERNAL_LIBS_TREE "" CACHE PATH
-    "Path to tree of external libraries that will be installed in bundle package."
-  )
-MARK_AS_ADVANCED(DEAL_II_CPACK_EXTERNAL_LIBS_TREE)
-
-


Changement de variable dans ITK 3.6 qui modifie les include install

--- otbIncludeDirectories.cmake
+++ otbIncludeDirectories.cmake
@@ -233,9 +233,23 @@
    			${ITK_INCLUDE_DIRS} )
 #   			${ITK_INCLUDE_DIRS_INSTALL_TREE} 	)
 ELSE(OTB_USE_EXTERNAL_ITK)
+
+# JULIEN Seems that ITK_INCLUDE_DIRS_CONFIG replaces ITK_INCLUDE_DIRS_INSTALL_TREE
+SET(ITK_INCLUDE_DIRS  ${OTB_INSTALL_INCLUDE_DIR}/Utilities/ITK/)
+FOREACH(DIR ${ITK_INCLUDE_RELATIVE_DIRS})
+  LIST(APPEND ITK_INCLUDE_DIRS ${OTB_INSTALL_INCLUDE_DIR}/Utilities/ITK/${DIR})
+ENDFOREACH(DIR)
+IF(ITK_INCLUDE_DIRS_SYSTEM)
+  LIST(APPEND ITK_INCLUDE_DIR ${ITK_INCLUDE_DIRS_SYSTEM})
+ENDIF(ITK_INCLUDE_DIRS_SYSTEM)
+
+
 #THOMAS
 	SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
-			${ITK_INCLUDE_DIRS_INSTALL_TREE} )
+			${ITK_INCLUDE_DIRS_INSTALL_TREE}
+#JULIEN
+			${ITK_INCLUDE_DIRS}
+			 )
 #			${ITK_INCLUDE_DIRS_BUILD_TREE}
 #			${ITK_INCLUDE_DIRS_BUILD_TREE_CXX} )
 ENDIF(OTB_USE_EXTERNAL_ITK)


Fix family_support.cmake to use new skip.txt and only.txt files for skipping mcus


Fix duplication of WARN_ONLY in test where WARN_ONLY is not required.

--- test/CreateTargetForUnusedFunctionCheck.cmake
+++ test/CreateTargetForUnusedFunctionCheck.cmake
@@ -1,6 +1,6 @@
 # /test/CreateTargetForUnusedFunctionCheckWarnOnly.cmake
 # Adds some sources to the global unused function check properties and adds
-# checks to a newly created external target, but only for warnings.
+# checks to a newly created external target.
 #
 # See LICENCE.md for Copyright Information.

@@ -17,4 +17,4 @@
                                        SOURCES ${SOURCES})

 # Put CMAKE_CURRENT_SOURCE_DIR in the global INCLUDES
-cppcheck_add_unused_function_check_with_name (global WARN_ONLY)+cppcheck_add_unused_function_check_with_name (global)


Use STEP_TARGETS option over EP Add_Step_Targets command

Addresses the CMP0114 warning and version dependent behavior by using
the recommended STEP_TARGETS option to ExternalProject_Add.

The "test" target was not implemented and has been removed.

--- SuperBuild/SuperBuild.cmake
+++ SuperBuild/SuperBuild.cmake
@@ -452,6 +452,7 @@
     -DBUILD_EXAMPLES:BOOL=${BUILD_TESTING}
   DEPENDS ${${CMAKE_PROJECT_NAME}_DEPENDENCIES}
   ${External_Project_USES_TERMINAL}
+  STEP_TARGETS configure build doc forcebuild
 )

 ExternalProject_Add_Step(${proj} forcebuild
@@ -472,10 +473,6 @@
   LOG 1
 )

-# adds superbuild level target "SimpleITK-documentation" etc..
-ExternalProject_Add_StepTargets(${proj} configure build test forcebuild doc)
-
-

 # Load the SimpleITK version variables, scope isolated in a function.
 function(_set_simpleitk_install_path outVar)


COMP: FindDCMTK - Do not explicitly set DCMTK_DEFINITIONS

Following commit 04ee8cf1 fixing a packaging Debian bug,
the DCMTK_DEFINITIONS was set directly inside the FindDCMTK.cmake
module using "add_definitions".

When used outside of this project, setting automatically the definition
could have some unintended effects. For example, by globally adding
DCMTK_DEFINITIONS (and more specifically HAVE_CONFIG_H), it prevented from
compiling successfully program against the "tclap" library. Compile errors
like the following occurred:

// ------------------
In file included from <DIR>/SlicerExecutionModel/tclap/include/tclap/CmdLine.h:27:0,
                 from <DIR>/Slicer-build/Modules/CLI/CheckerBoardFilter/CheckerBoardFilterCLP.h:13,
                 from <SRC>/Modules/CLI/CheckerBoardFilter/CheckerBoardFilter.cxx:23:
<DIR>/SlicerExecutionModel/tclap/include/tclap/MultiSwitchArg.h:44:2: error: #error "Need a stringstream (sstream or strstream) to compile!"
 #error "Need a stringstream (sstream or strstream) to compile!"
  ^
<DIR>/SlicerExecutionModel/tclap/include/tclap/MultiSwitchArg.h:171:2: error: #error "Need a stringstream (sstream or strstream) to compile!"
 #error "Need a stringstream (sstream or strstream) to compile!"
  ^
In file included from <DIR>/SlicerExecutionModel/tclap/include/tclap/UnlabeledValueArg.h:30:0,
                 from <DIR>/SlicerExecutionModel/tclap/include/tclap/CmdLine.h:28,
                 from <DIR>/Slicer-build/Modules/CLI/CheckerBoardFilter/CheckerBoardFilterCLP.h:13,
                 from <SRC>/Modules/CLI/CheckerBoardFilter/CheckerBoardFilter.cxx:23:
<DIR>/SlicerExecutionModel/tclap/include/tclap/ValueArg.h:43:2: error: #error "Need a stringstream (sstream or strstream) to compile!"
 #error "Need a stringstream (sstream or strstream) to compile!"
  ^
<DIR>/SlicerExecutionModel/tclap/include/tclap/ValueArg.h:97:2: error: #error "Need a stringstream (sstream or strstream) to compile!"
 #error "Need a stringstream (sstream or strstream) to compile!"
  ^
// ------------------

Change-Id: I72357688765ce419541b4d893df870268da4b960

--- Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cmake
+++ Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cmake
@@ -345,9 +345,6 @@
   if(NOT DCMTK_HAVE_CONFIG_H_OPTIONAL)
     set(DCMTK_DEFINITIONS "HAVE_CONFIG_H")
   endif()
-  if(NOT DCMTK_HAVE_CONFIG_H_OPTIONAL AND NOT DCMTK_FIND_PACKAGE_SKIP_ADD_DEFINITIONS)
-    add_definitions(-D${DCMTK_DEFINITIONS})
-  endif()
 endif()

 message(STATUS "Trying to find DCMTK relying on FindDCMTK.cmake - ok")


getdeps: add an install_fb_python_executable() function to the CMake utilities

Summary:
Add a `install_fb_python_executable()` function to `FBPythonBinary.cmake` for
helping to install python executables generated with
`add_fb_python_executable()`.  This primarily helps by automatically looking
up the correct output file to install from the generated targets.

Reviewed By: wez

Differential Revision: D18774539

fbshipit-source-id: 4b397580d72ac448f21d1db6d2cdd653cf3635df

--- build/fbcode_builder/CMake/FBPythonBinary.cmake
+++ build/fbcode_builder/CMake/FBPythonBinary.cmake
@@ -548,6 +548,30 @@
 endfunction()

 #
+# Install an FB-style packaged python binary.
+#
+# - DESTINATION <export-name>:
+#   Associate the installed target files with the given export-name.
+#
+function(install_fb_python_executable TARGET)
+  # Parse the arguments
+  set(one_value_args DESTINATION)
+  set(multi_value_args)
+  fb_cmake_parse_args(
+    ARG "" "${one_value_args}" "${multi_value_args}" "${ARGN}"
+  )
+
+  if(NOT DEFINED ARG_DESTINATION)
+    set(ARG_DESTINATION bin)
+  endif()
+
+  install(
+    PROGRAMS "$<TARGET_PROPERTY:${TARGET}.GEN_PY_EXE,EXECUTABLE>"
+    DESTINATION "${ARG_DESTINATION}"
+  )
+endfunction()
+
+#
 # Install a python library.
 #
 # - EXPORT <export-name>: