ENH: add a variable for CMAKE_COMPILER_IS_GNUCXX

--- itkCMakeOptions.cmake
+++ itkCMakeOptions.cmake
@@ -23,3 +23,7 @@
 IF(UNIX)
   LINK_LIBRARIES(${CMAKE_THREAD_LIBS} ${CMAKE_DL_LIBS})
 ENDIF(UNIX)
+
+IF(CMAKE_COMPILER_IS_GNUCXX)
+        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-50")
+ENDIF(CMAKE_COMPILER_IS_GNUCXX)


Dont mention runlevel 4 in init.d script

--- etc/init/openwsmand.sh.cmake
+++ etc/init/openwsmand.sh.cmake
@@ -4,7 +4,7 @@
 # Provides: openwsmand
 # Required-Start: $remote_fs
 # Required-Stop: $network
-# Default-Start: 2 3 4 5
+# Default-Start: 2 3 5
 # Default-Stop: 0 1 6
 # Short-Description: Openwsman Daemon
 # Description: openwsmand


Added support for external plugin repositories via _DIR variables.

--- CMake/ctkFunctionAddPluginRepo.cmake
+++ CMake/ctkFunctionAddPluginRepo.cmake
@@ -1,38 +1,44 @@
 function(ctkFunctionAddPluginRepo)

   ctkMacroParseArguments("" "NAME;GIT_URL;GIT_TAG;GIT_PROTOCOL" "" ${ARGN})
-
-  foreach(_required_arg NAME GIT_URL)
+
+  foreach(_required_arg NAME)
     if(NOT _${_required_arg})
       message(FATAL_ERROR "${_required_arg} is empty")
     endif()
   endforeach()
-
-  ctkFunctionCheckoutRepo(
-    NAME ${_NAME}
-    GIT_URL ${_GIT_URL}
-    GIT_TAG ${_GIT_TAG}
-    GIT_PROTOCOL ${_GIT_PROTOCOL}
-    )
-
+
+  if(NOT _GIT_URL AND NOT ${_NAME}_DIR)
+    message(FATAL_ERROR "Either ${_NAME}_DIR or GIT_URL must be set")
+  endif()
+
+  if(NOT ${_NAME}_DIR)
+    ctkFunctionCheckoutRepo(
+      NAME ${_NAME}
+      GIT_URL ${_GIT_URL}
+      GIT_TAG ${_GIT_TAG}
+      GIT_PROTOCOL ${_GIT_PROTOCOL}
+      )
+  endif()
+
   set(_gitmodules_files ${${_NAME}_DIR}/.gitmodules)
   if(NOT EXISTS ${_gitmodules_files})
     message(FATAL_ERROR "The repository at ${${_NAME}_DIR} does not contain a .gitmodules file")
   endif()
-
+
   # Parse the .gitmodules file and add the submodules as contributed plugins
   file(STRINGS "${_gitmodules_files}" _plugin_paths REGEX "path =.*")
   foreach(_plugin_path ${_plugin_paths})
     string(REPLACE " = " ";" _plugin_path_list ${_plugin_path})
     list(GET _plugin_path_list 1 _plugin_name)
     ctk_plugin_option(${_plugin_name} "Build the ${_plugin_name} plugin." OFF)
-
+
     # Push the value which might have been changed in ctk_plugin_option to the parent scope
     set(CTK_PLUGIN_${_plugin_name} ${CTK_PLUGIN_${_plugin_name}} PARENT_SCOPE)
-
+
     set(${_plugin_name}_SOURCE_DIR ${${_NAME}_DIR}/${_plugin_name})
     set(${_plugin_name}_SOURCE_DIR ${${_plugin_name}_SOURCE_DIR} PARENT_SCOPE)
-
+
     if(CTK_PLUGIN_${_plugin_name} AND NOT EXISTS ${${_plugin_name}_SOURCE_DIR})
       execute_process(
         COMMAND ${GIT_EXECUTABLE} submodule update ${_plugin_name}
@@ -45,7 +51,7 @@
       endif()
     endif()
   endforeach()
-
+
   set(CTK_PLUGINS ${CTK_PLUGINS} PARENT_SCOPE)
   set(${_NAME}_DIR ${${_NAME}_DIR} PARENT_SCOPE)


Default Box2D to shared library status by default.

--- external/Box2D/Options.cmake
+++ external/Box2D/Options.cmake
@@ -7,7 +7,7 @@

 # Box2D library options
 set_option(BOX2D_ENABLED TRUE BOOL "Build 'Box2D' 3rdparty/external libraries?")
-set_option(BOX2D_SHARED_LIBRARIES FALSE BOOL "Build 'Box2D' shared libraries?")
+set_option(BOX2D_SHARED_LIBRARIES TRUE BOOL "Build 'Box2D' shared libraries?")
 set_option(BOX2D_REVISION_TAG "" STRING "Which 'Box2D' revision/tag to use?")
 set_option(BOX2D_BUILD_DOCS FALSE BOOL "Build 'Box2D' documentation?")
 set_option(BOX2D_BUILD_EXAMPLES FALSE BOOL "Build 'Box2D' examples?")


agents now build if cycpp changes

agents now build if cycpp changes

--- src/CMake/UseCyclus.cmake
+++ src/CMake/UseCyclus.cmake
@@ -102,6 +102,7 @@
       COMMAND ${CYCPP} ${CCIN} ${PREPROCESSOR} ${CCFLAG} ${ORIG} ${INCL_ARGS}
       DEPENDS ${HIN}
       DEPENDS ${CCIN}
+      DEPENDS ${CYCPP}
       COMMENT "Executing ${CYCPP} ${HIN} ${PREPROCESSOR} ${HFLAG} ${ORIG} ${INCL_ARGS}"
       COMMENT "Executing ${CYCPP} ${CCIN} ${PREPROCESSOR} ${CCFLAG} ${ORIG} ${INCL_ARGS}"
       )
@@ -110,6 +111,7 @@
       OUTPUT ${CCOUT}
       COMMAND ${CYCPP} ${CCIN} ${PREPROCESSOR} ${CCFLAG} ${ORIG} ${INCL_ARGS}
       DEPENDS ${CCIN}
+      DEPENDS ${CYCPP}
       COMMENT "Executing ${CYCPP} ${CCIN} ${PREPROCESSOR} ${CCFLAG} ${ORIG} ${INCL_ARGS}"
       )
   ENDIF(EXISTS "${HIN}")


plugin.cmake: Automatically infer plugin name

--- worker/plugin.cmake
+++ worker/plugin.cmake
@@ -1,9 +1,11 @@
-add_python_test(worker PLUGIN worker)
+get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME)
+
+add_python_test(worker PLUGIN ${PLUGIN})

 add_python_style_test(
-    python_static_analysis_worker "${PROJECT_SOURCE_DIR}/plugins/worker/server")
+    python_static_analysis_${PLUGIN} "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/server")
 add_python_style_test(
-    python_static_analysis_worker_tests "${PROJECT_SOURCE_DIR}/plugins/worker/plugin_tests")
+    python_static_analysis_${PLUGIN}_tests "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/plugin_tests")

 add_eslint_test(
-    worker "${PROJECT_SOURCE_DIR}/plugins/worker/web_client/js")
+    worker "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/web_client/js")


Use $<CONFIGURATION> instead of $<CONFIG> to support older cmake versions

--- cmake/DaemonGame.cmake
+++ cmake/DaemonGame.cmake
@@ -76,7 +76,7 @@
                 CMAKE_ARGS
                     -DFORK=2
                     -DCMAKE_TOOLCHAIN_FILE=${Daemon_SOURCE_DIR}/cmake/toolchain-pnacl.cmake
-                    -DCMAKE_BUILD_TYPE=$<CONFIG>
+                    -DCMAKE_BUILD_TYPE=$<CONFIGURATION>
                     -DDEPS_DIR=${DEPS_DIR}
                     -DBUILD_CGAME=${BUILD_CGAME}
                     -DBUILD_SGAME=${BUILD_SGAME}


Fix findMatlab -- It was not filling up the variables when Matlab_ROOT_DIR was specified.


MDEV-5076 : Build on FreeBSD - when looking for execinfo library, and execinfo.h header, allow user-defined EXECINFO_ROOT prefix, in case library and header are not placed under /usr/local . This change was requested by FreeBSD maintainer.

--- cmake/os/FreeBSD.cmake
+++ cmake/os/FreeBSD.cmake
@@ -24,9 +24,10 @@
 # ADD_DEFINITIONS(-DHAVE_BROKEN_REALPATH)

 # Find libexecinfo (library that contains backtrace_symbols etc)
-INCLUDE_DIRECTORIES(/usr/local/include)
-SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} /usr/local/include )
-SET(ENV{LIB} "$ENV{LIB}:/usr/local/lib")
+SET(EXECINFO_ROOT /usr/local CACHE INTERNAL "Where to find execinfo library and header")
+INCLUDE_DIRECTORIES(${EXECINFO_ROOT}/include)
+SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${EXECINFO_ROOT}/include)
+SET(ENV{LIB} "$ENV{LIB}:${EXECINFO_ROOT}/lib")
 FIND_LIBRARY(EXECINFO NAMES execinfo)
 IF(EXECINFO)
  SET(LIBEXECINFO ${EXECINFO})


r9264/sofa : cmake: put libs in the lib/ directory on Unix systems

Former-commit-id: de0339b1bde1d0e827c70841188ca19f812173de

--- cmake/pre-config.cmake
+++ cmake/pre-config.cmake
@@ -72,6 +72,12 @@
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${SOFA_BIN_DIR}")
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${SOFA_BIN_DIR}")
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${SOFA_BIN_DIR}")
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${SOFA_BIN_DIR}")
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${SOFA_BIN_DIR}")
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${SOFA_BIN_DIR}")
+if(UNIX)
+    set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${SOFA_LIB_DIR}")
+    set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${SOFA_LIB_DIR}")
+    set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${SOFA_LIB_DIR}")
+else()
+    set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${SOFA_BIN_DIR}")
+    set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${SOFA_BIN_DIR}")
+    set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${SOFA_BIN_DIR}")
+endif()


Adding missing link of libquadmath (when used) and fixing a typon in MATH_PATHS

--- cmake/tests/Math.cmake
+++ cmake/tests/Math.cmake
@@ -5,18 +5,19 @@
 # ========================================================================
 # NOTE: The variables BLAS_ROOT, LAPACK_ROOT, MATH_ROOT, BLAS_PATH, LAPACK_PATH,
 #       and MATH_PATH are all optional and to ease the process
-set(MATH_PATHS /usr/lib
+set(MATH_PATHS /usr/lib
                /usr/lib64
                /usr/local/lib
                /usr/local/lib64
-               /usr/lib/openmpi/lib
-               /usr/lib/gcc/x86_64-linux-gnu/4.8
-               /lib/x86_64-linux-gnu
-               /usr/lib/x86_64-linux-gnu
+               /usr/lib/openmpi/lib
+               /usr/lib/gcc/x86_64-linux-gnu/4.8
+               /usr/lib/gcc/x86_64-linux-gnu/4.9
+               /lib/x86_64-linux-gnu
+               /usr/lib/x86_64-linux-gnu
                /usr/lib/openblas-base
-               /use/lib64/openblas-base
-               ${BLAS_ROOT}/lib
-               ${BLAS_ROOT}/lib64
+               /usr/lib64/openblas-base
+               ${BLAS_ROOT}/lib
+               ${BLAS_ROOT}/lib64
                ${LAPACK_ROOT}/lib
                ${LAPACK_ROOT}/lib64
                ${MATH_ROOT}/lib
@@ -222,6 +223,7 @@
     check_cxx_source_compiles("${QUADMATH_CODE}" EL_HAVE_QUADMATH)
     if(EL_HAVE_QUADMATH)
       set(EL_HAVE_QUAD TRUE)
+      list(APPEND MATH_LIBS ${QUADMATH_LIB})
       message(WARNING "The usage of libquadmath effectively moves the Elemental build from the permissive New BSD License to the GPL; if this is not acceptable, it is necessary to reconfigure with the 'EL_DISABLE_QUAD=ON' option")
     else()
       message(WARNING "Found libquadmath but could not use it in C++")


Output thirdparty binary/source dirs if requested

--- cmake/thirdparty.cmake
+++ cmake/thirdparty.cmake
@@ -31,8 +31,8 @@

 function(add_siplasplas_thirdparty NAME)
     set(options HEADER_ONLY SKIP_CONFIGURE_STEP SKIP_BUILD_STEP RENAME)
-    set(oneValueArgs URL HG_REPOSITORY HG_TAG GIT_REPOSITORY GIT_TAG CONFIGURE_COMMAND BUILD_COMMAND)
-    set(multiValueArgs INCLUDE_DIRS BINARIES COMPILE_OPTIONS COMPILE_DEFINITIONS EXTERNAL_PROJECT_EXTRA_ARGS CMAKE_ARGS CMAKE_EXTRA_ARGS)
+    set(oneValueArgs URL HG_REPOSITORY HG_TAG GIT_REPOSITORY GIT_TAG CONFIGURE_COMMAND BUILD_COMMAND OUTPUT_SOURCE_DIR OUTPUT_BINARY_DIR)
+    set(multiValueArgs DEPENDS INCLUDE_DIRS BINARIES COMPILE_OPTIONS COMPILE_DEFINITIONS EXTERNAL_PROJECT_EXTRA_ARGS CMAKE_ARGS CMAKE_EXTRA_ARGS)
     cmake_parse_arguments(THIRDPARTY
         "${options}"
         "${oneValueArgs}"
@@ -118,6 +118,14 @@
     generate_external_project(${NAME} ${NO_CONFIG} ${NO_BUILD} "${externalProjectArgs}")

     ExternalProject_Get_Property(${external} source_dir binary_dir)
+
+    if(THIRDPARTY_OUTPUT_SOURCE_DIR)
+        set(${THIRDPARTY_OUTPUT_SOURCE_DIR} "${source_dir}" PARENT_SCOPE)
+    endif()
+    if(THIRDPARTY_OUTPUT_BINARY_DIR)
+        set(${THIRDPARTY_OUTPUT_BINARY_DIR} "${binary_dir}" PARENT_SCOPE)
+    endif()
+
     set_target_properties(${external} PROPERTIES EXCLUDE_FROM_ALL TRUE)

     string(REGEX REPLACE "-" "_" FORMATTED_NAME "${NAME}")
@@ -137,6 +145,7 @@
         )
     endforeach()
     target_include_directories(${NAME} INTERFACE "${source_dir}" "${repodir}" "${repodir}/.." ${includedirs})
+    target_link_libraries(${NAME} INTERFACE ${THIRDPARTY_DEPENDS})

     function(print_args var)
         string(REGEX REPLACE "THIRDPARTY_(.+)" "\\1" varname "${var}")


travis-ci: Adding /usr/lib and /usr/lib64

In the travis env. it does not pick up libgtest-dev
or libgtest.so if it's not in /usr/lib64


ENH: ITK-LevelSets is now only part of the segmentation group.

Assuming one module should only be part of one group, I removed it
from the Filtering group.

Change-Id: I72831d768df78998fdc67d896350e6e8bd403ad5

--- CMake/ITKGroups.cmake
+++ CMake/ITKGroups.cmake
@@ -61,7 +61,6 @@
 ITK-ImageLabel
 ITK-ImageStatistics
 ITK-LabelVoting
-ITK-LevelSets
 ITK-MathematicalMorphology
 ITK-Path
 ITK-QuadEdgeMeshFiltering


cmake: Fixed a typo. (cherry picked from commit 7150cabafa6265ebe7b6d7705b3260462c4810b2)

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -43,7 +43,8 @@
 # HEADER FILES
 check_include_file(argp.h HAVE_ARGP_H)
 check_include_file(pty.h HAVE_PTY_H)
-check_include_file(terminos.h HAVE_TERMIOS_H)
+check_include_file(termios.h HAVE_TERMIOS_H)
+
 if (WIN32)
   check_include_file(wspiapi.h HAVE_WSPIAPI_H)
   if (NOT HAVE_WSPIAPI_H)


find newer armadillo

find newer armadillo

--- CMake/FindArmadillo.cmake
+++ CMake/FindArmadillo.cmake
@@ -54,7 +54,7 @@
   /usr/include
   /usr/local/include
   /opt/include
-  /afs/desy.de/user/y/yoon/armadillo-3.800.2/include
+  /afs/desy.de/user/y/yoon/armadillo-3.910.1/include
   PATH_SUFFIXES armadillo armadillo_bits
   )

@@ -66,7 +66,7 @@
   /usr/lib
   /usr/local/lib
   /opt/lib
-  /afs/desy.de/user/y/yoon/armadillo-3.800.2
+  /afs/desy.de/user/y/yoon/armadillo-3.910.1
 #  /usr/lib64
   PATH_SUFFIXES
   )


finish migration to new build macros

finish migration to new build macros

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

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

-    set (include_names "include" "includes")
-    set (lib_names "lib" "libs" "bin" "bins" "dll" "dlls")
+    set (include_names "." "include" "includes")
+    set (lib_names "." "lib" "libs" "bin" "bins" "dll" "dlls")

     # add prefix+name paths
     foreach (prefix ${path_prefixes})


Change detection of compiler flags to write into cached variables rather than updating global flags.

--- cmake/yacma/YACMACompilerLinkerSettings.cmake
+++ cmake/yacma/YACMACompilerLinkerSettings.cmake
@@ -1,4 +1,19 @@
 if(YACMACompilerLinkerSettingsIncluded)
+    return()
+endif()
+
+# This is an OS X specific setting that is suggested to be enabled. See:
+# https://blog.kitware.com/upcoming-in-cmake-2-8-12-osx-rpath-support/
+# http://stackoverflow.com/questions/31561309/cmake-warnings-under-os-x-macosx-rpath-is-not-specified-for-the-following-targe
+if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+    set(CMAKE_MACOSX_RPATH 1)
+endif()
+
+# We don't want to execute all this every time CMake is run, as it is time expensive. We will set cache variables
+# on the first run and skip following CMake runs.
+if(YACMACompilerLinkerSettingsRun)
+    message(STATUS "YACMA C++ flags: ${YACMA_CXX_FLAGS}")
+    message(STATUS "YACMA C++ debug flags: ${YACMA_CXX_FLAGS_DEBUG}")
     return()
 endif()

@@ -10,20 +25,23 @@
 # http://stackoverflow.com/questions/10046114/in-cmake-how-can-i-test-if-the-compiler-is-clang
 # http://www.cmake.org/cmake/help/v2.8.10/cmake.html#variable:CMAKE_LANG_COMPILER_ID
 if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
-    set(YACMA_COMPILER_IS_CLANGXX 1)
+    set(YACMA_COMPILER_IS_CLANGXX 1 CACHE INTERNAL "")
 endif()

 if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
-    set(YACMA_COMPILER_IS_INTELXX 1)
+    set(YACMA_COMPILER_IS_INTELXX 1 CACHE INTERNAL "")
 endif()

 if(MSVC)
-    set(YACMA_COMPILER_IS_MSVC 1)
+    set(YACMA_COMPILER_IS_MSVC 1 CACHE INTERNAL "")
 endif()

 if(CMAKE_COMPILER_IS_GNUCXX)
-    set(YACMA_COMPILER_IS_GNUCXX 1)
+    set(YACMA_COMPILER_IS_GNUCXX 1 CACHE INTERNAL "")
 endif()
+
+set(_YACMA_CXX_FLAGS "")
+set(_YACMA_CXX_FLAGS_DEBUG "")

 # Enable conditionally a CXX flags, is supported by the compiler.
 # The flag will be enabled in all buld types.
@@ -32,10 +50,11 @@
     check_cxx_compiler_flag("${flag}" YACMA_CHECK_CXX_FLAG)
     if(YACMA_CHECK_CXX_FLAG)
         message(STATUS "Enabling the '${flag}' compiler flag.")
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
+        list(APPEND _YACMA_CXX_FLAGS "${flag}")
     else()
         message(STATUS "Disabling the '${flag}' compiler flag.")
     endif()
+    # NOTE: check_cxx_compiler stores variables in the cache.
     unset(YACMA_CHECK_CXX_FLAG CACHE)
 endmacro()

@@ -46,7 +65,7 @@
     check_cxx_compiler_flag("${flag}" YACMA_CHECK_DEBUG_CXX_FLAG)
     if(YACMA_CHECK_DEBUG_CXX_FLAG)
         message(STATUS "Enabling the '${flag}' debug compiler flag.")
-        set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${flag}")
+        list(APPEND _YACMA_CXX_FLAGS_DEBUG "${flag}")
     else()
         message(STATUS "Disabling the '${flag}' debug compiler flag.")
     endif()
@@ -55,66 +74,68 @@

 # NOTE: all these flags are with a Unix-like syntax. We will need to change them
 # for MSVC and clang on windows possibly.
-macro(YACMA_SETUP_CXX_FLAGS)
-    # Configuration bits specific for GCC.
-    if(YACMA_COMPILER_IS_GNUCXX)
-        YACMA_CHECK_ENABLE_CXX_FLAG(-fdiagnostics-color=auto)
-    endif()

-    # Configuration bits specific for clang.
-    if(YACMA_COMPILER_IS_CLANGXX)
-        # For now it seems like -Wshadow from clang behaves better than GCC's, just enable it here
-        # for the time being.
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wshadow)
-        # Clang is better at this flag than GCC.
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Werror)
-    endif()
+# Configuration bits specific for GCC.
+if(YACMA_COMPILER_IS_GNUCXX)
+    YACMA_CHECK_ENABLE_CXX_FLAG(-fdiagnostics-color=auto)
+endif()

-    # Common configuration for GCC, clang and Intel.
-    if (YACMA_COMPILER_IS_CLANGXX OR YACMA_COMPILER_IS_INTELXX OR YACMA_COMPILER_IS_GNUCXX)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wall)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wextra)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnon-virtual-dtor)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnoexcept)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wlogical-op)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wconversion)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wdeprecated)
-        # This limit is supposed to be at least 1024 in C++11, but for some reason
-        # clang sets this to 256, and gcc to 900.
-        YACMA_CHECK_ENABLE_CXX_FLAG(-ftemplate-depth=1024)
-        # NOTE: this can be useful, but at the moment it triggers lots of warnings in type traits.
-        # Keep it in mind for the next time we touch type traits.
-        # YACMA_CHECK_ENABLE_CXX_FLAG(-Wold-style-cast)
-        # NOTE: disable this for now, as it results in a lot of clutter from Boost.
-        # YACMA_CHECK_ENABLE_CXX_FLAG(-Wzero-as-null-pointer-constant)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-pedantic-errors)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wdisabled-optimization)
-        YACMA_CHECK_ENABLE_CXX_FLAG(-fvisibility-inlines-hidden)
-        YACMA_CHECK_ENABLE_CXX_FLAG(-fvisibility=hidden)
-        # This is useful when the compiler decides the template backtrace is too verbose.
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-ftemplate-backtrace-limit=0)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-fstack-protector-all)
-        # These became available in GCC from version 5.
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wodr)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsuggest-final-types)
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsuggest-final-methods)
-    endif()
+# Configuration bits specific for clang.
+if(YACMA_COMPILER_IS_CLANGXX)
+    # For now it seems like -Wshadow from clang behaves better than GCC's, just enable it here
+    # for the time being.
+    YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wshadow)
+    # Clang is better at this flag than GCC.
+    YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Werror)
+endif()

-    # MSVC setup.
-    if(YACMA_COMPILER_IS_MSVC)
-        # Enable higher warning level than usual.
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/W4)
-        # Treat warnings as errors.
-        YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/WX)
-    endif()
-endmacro()
+# Common configuration for GCC, clang and Intel.
+if (YACMA_COMPILER_IS_CLANGXX OR YACMA_COMPILER_IS_INTELXX OR YACMA_COMPILER_IS_GNUCXX)
+    YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wall)
+    YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wextra)
+    YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnon-virtual-dtor)
+    YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnoexcept)
+    YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wlogical-op)
+    YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wconversion)
+    YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wdeprecated)
+    YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wdeprecatdasdsda)
+    # This limit is supposed to be at least 1024 in C++11, but for some reason
+    # clang sets this to 256, and gcc to 900.
+    YACMA_CHECK_ENABLE_CXX_FLAG(-ftemplate-depth=1024)
+    # NOTE: this can be useful, but at the moment it triggers lots of warnings in type traits.
+    # Keep it in mind for the next time we touch type traits.
+    # YACMA_CHECK_ENABLE_CXX_FLAG(-Wold-style-cast)
+    # NOTE: disable this for now, as it results in a lot of clutter from Boost.
+    # YACMA_CHECK_ENABLE_CXX_FLAG(-Wzero-as-null-pointer-constant)
+    YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-pedantic-errors)
+    YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wdisabled-optimization)
+    YACMA_CHECK_ENABLE_CXX_FLAG(-fvisibility-inlines-hidden)
+    YACMA_CHECK_ENABLE_CXX_FLAG(-fvisibility=hidden)
+    # This is useful when the compiler decides the template backtrace is too verbose.
+    YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-ftemplate-backtrace-limit=0)
+    YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-fstack-protector-all)
+    # These became available in GCC from version 5.
+    YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wodr)
+    YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsuggest-final-types)
+    YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsuggest-final-methods)
+endif()

-# This is an OS X specific setting that is suggested to be enabled. See:
-# https://blog.kitware.com/upcoming-in-cmake-2-8-12-osx-rpath-support/
-# http://stackoverflow.com/questions/31561309/cmake-warnings-under-os-x-macosx-rpath-is-not-specified-for-the-following-targe
-if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-    set(CMAKE_MACOSX_RPATH 1)
+# MSVC setup.
+if(YACMA_COMPILER_IS_MSVC)
+    # Enable higher warning level than usual.
+    YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/W4)
+    # Treat warnings as errors.
+    YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/WX)
 endif()
+
+# Set the cache variables.
+set(YACMA_CXX_FLAGS "${_YACMA_CXX_FLAGS}" CACHE INTERNAL "")
+set(YACMA_CXX_FLAGS_DEBUG "${_YACMA_CXX_FLAGS_DEBUG}" CACHE INTERNAL "")
+set(YACMACompilerLinkerSettingsRun YES CACHE INTERNAL "")
+
+# Final report.
+message(STATUS "YACMA C++ flags: ${YACMA_CXX_FLAGS}")
+message(STATUS "YACMA C++ debug flags: ${YACMA_CXX_FLAGS_DEBUG}")

 # Mark as included.
 set(YACMACompilerLinkerSettingsIncluded YES)


Use special .win32 .linux pregenerated files if rpcgen is not found

--- make/FindONCRPC.cmake
+++ make/FindONCRPC.cmake
@@ -134,59 +134,78 @@
    # ACPLT RPCGEN does not generated appropriate STUB
    # we use Linux pregenerated files
    ######################################################
-   CONFIGURE_FILE(${RPC_INPUT_FILE_PREFIX}_svc.c
+   CONFIGURE_FILE(${RPC_INPUT_FILE_PREFIX}_svc.c.win32
      ${RPC_GENERATED_FILE_PREFIX}_svc.c
      COPYONLY)

-   CONFIGURE_FILE(${RPC_INPUT_FILE_PREFIX}_clnt.c
+   CONFIGURE_FILE(${RPC_INPUT_FILE_PREFIX}_clnt.c.win32
      ${RPC_GENERATED_FILE_PREFIX}_clnt.c
      COPYONLY)

-   CONFIGURE_FILE(${RPC_INPUT_FILE_PREFIX}_xdr.c
+   CONFIGURE_FILE(${RPC_INPUT_FILE_PREFIX}_xdr.c.win32
      ${RPC_GENERATED_FILE_PREFIX}_xdr.c
      COPYONLY)

-   CONFIGURE_FILE(${RPC_INPUT_FILE_PREFIX}.h
+   CONFIGURE_FILE(${RPC_INPUT_FILE_PREFIX}.h.win32
      ${RPC_GENERATED_FILE_PREFIX}.h
      COPYONLY)

  ELSE (WIN32)

-   #  Note how CMake forced us to escape '#' sequence using '\\#'
-   ADD_CUSTOM_COMMAND(
-     OUTPUT ${RPC_GENERATED_FILE_PREFIX}_svc.c
-     COMMAND echo "\\#ifdef VXWORKS" >  ${RPC_GENERATED_FILE_PREFIX}_svc.c
-     COMMAND echo "\\#define static extern" >> ${RPC_GENERATED_FILE_PREFIX}_svc.c
-     COMMAND echo "\\#endif /* !VXWORKS */" >> ${RPC_GENERATED_FILE_PREFIX}_svc.c
-     COMMAND ${ONCRPC_RPCGEN_EXECUTABLE} -N -C -m ${RPC_INPUT_FILE_PREFIX}.x >> ${RPC_GENERATED_FILE_PREFIX}_svc.c
-     DEPENDS
-     ${RPC_DEPENDS}
-     ${RPC_INPUT_FILE_PREFIX}.x
-     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-
-   ADD_CUSTOM_COMMAND(
-     OUTPUT ${RPC_GENERATED_FILE_PREFIX}_clnt.c
-     COMMAND ${ONCRPC_RPCGEN_EXECUTABLE} -N -C -l ${RPC_INPUT_FILE_PREFIX}.x > ${RPC_GENERATED_FILE_PREFIX}_clnt.c
-     DEPENDS
-     ${RPC_DEPENDS}
-     ${RPC_INPUT_FILE_PREFIX}.x
-     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-
-   ADD_CUSTOM_COMMAND(
-     OUTPUT ${RPC_GENERATED_FILE_PREFIX}_xdr.c
-     COMMAND ${ONCRPC_RPCGEN_EXECUTABLE} -N -C -c ${RPC_INPUT_FILE_PREFIX}.x > ${RPC_GENERATED_FILE_PREFIX}_xdr.c
-     DEPENDS
-     ${RPC_DEPENDS}
-     ${RPC_INPUT_FILE_PREFIX}.x
-     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-
-   ADD_CUSTOM_COMMAND(
-     OUTPUT ${RPC_GENERATED_FILE_PREFIX}.h
-     COMMAND ${ONCRPC_RPCGEN_EXECUTABLE} -N -C -h ${RPC_INPUT_FILE_PREFIX}.x > ${RPC_GENERATED_FILE_PREFIX}.h
-     DEPENDS
-     ${RPC_DEPENDS}
-     ${RPC_INPUT_FILE_PREFIX}.x
-     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+   IF (ONCRPC_RPCGEN_FOUND)
+     #  Note how CMake forced us to escape '#' sequence using '\\#'
+     ADD_CUSTOM_COMMAND(
+       OUTPUT ${RPC_GENERATED_FILE_PREFIX}_svc.c
+       COMMAND echo "\\#ifdef VXWORKS" >  ${RPC_GENERATED_FILE_PREFIX}_svc.c
+       COMMAND echo "\\#define static extern" >> ${RPC_GENERATED_FILE_PREFIX}_svc.c
+       COMMAND echo "\\#endif /* !VXWORKS */" >> ${RPC_GENERATED_FILE_PREFIX}_svc.c
+       COMMAND ${ONCRPC_RPCGEN_EXECUTABLE} -N -C -m ${RPC_INPUT_FILE_PREFIX}.x >> ${RPC_GENERATED_FILE_PREFIX}_svc.c
+       DEPENDS
+       ${RPC_DEPENDS}
+       ${RPC_INPUT_FILE_PREFIX}.x
+       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+
+     ADD_CUSTOM_COMMAND(
+       OUTPUT ${RPC_GENERATED_FILE_PREFIX}_clnt.c
+       COMMAND ${ONCRPC_RPCGEN_EXECUTABLE} -N -C -l ${RPC_INPUT_FILE_PREFIX}.x > ${RPC_GENERATED_FILE_PREFIX}_clnt.c
+       DEPENDS
+       ${RPC_DEPENDS}
+       ${RPC_INPUT_FILE_PREFIX}.x
+       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+
+     ADD_CUSTOM_COMMAND(
+       OUTPUT ${RPC_GENERATED_FILE_PREFIX}_xdr.c
+       COMMAND ${ONCRPC_RPCGEN_EXECUTABLE} -N -C -c ${RPC_INPUT_FILE_PREFIX}.x > ${RPC_GENERATED_FILE_PREFIX}_xdr.c
+       DEPENDS
+       ${RPC_DEPENDS}
+       ${RPC_INPUT_FILE_PREFIX}.x
+       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+
+     ADD_CUSTOM_COMMAND(
+       OUTPUT ${RPC_GENERATED_FILE_PREFIX}.h
+       COMMAND ${ONCRPC_RPCGEN_EXECUTABLE} -N -C -h ${RPC_INPUT_FILE_PREFIX}.x > ${RPC_GENERATED_FILE_PREFIX}.h
+       DEPENDS
+       ${RPC_DEPENDS}
+       ${RPC_INPUT_FILE_PREFIX}.x
+       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+   ELSE (ONCRPC_RPCGEN_FOUND)
+     CONFIGURE_FILE(${RPC_INPUT_FILE_PREFIX}_svc.c.linux
+       ${RPC_GENERATED_FILE_PREFIX}_svc.c
+       COPYONLY)
+
+     CONFIGURE_FILE(${RPC_INPUT_FILE_PREFIX}_clnt.c.linux
+       ${RPC_GENERATED_FILE_PREFIX}_clnt.c
+       COPYONLY)
+
+     CONFIGURE_FILE(${RPC_INPUT_FILE_PREFIX}_xdr.c.linux
+       ${RPC_GENERATED_FILE_PREFIX}_xdr.c
+       COPYONLY)
+
+     CONFIGURE_FILE(${RPC_INPUT_FILE_PREFIX}.h.linux
+       ${RPC_GENERATED_FILE_PREFIX}.h
+       COPYONLY)
+
+   ENDIF (ONCRPC_RPCGEN_FOUND)

  ENDIF (WIN32)
 ENDMACRO(ONCRPC_SETUP)


fix: Use basis_set_if_not_set for global boolean options [BASIS]

--- CMake/Basis/BasisSettings.cmake
+++ CMake/Basis/BasisSettings.cmake
@@ -499,7 +499,7 @@
 # of the build system because every target name must be mapped to its
 # target UID and possibly vice versa. Moreover, the use of target UIDs
 # is less intuitive for those new to BASIS but experienced with CMake.
-basis_set_if_empty (BASIS_USE_TARGET_UIDS OFF)
+basis_set_if_not_set (BASIS_USE_TARGET_UIDS OFF)

 ## @brief Whether BASIS shall use fully-qualified target UIDs.
 #
@@ -510,7 +510,7 @@
 # "@PROJECT_NAME_L@.target", the CMake target name will simply
 # be "target". Only when the target is referenced from another project,
 # the fully-qualified target UID is usually required.
-basis_set_if_empty (BASIS_USE_FULLY_QUALIFIED_UIDS OFF)
+basis_set_if_not_set (BASIS_USE_FULLY_QUALIFIED_UIDS OFF)

 ## @brief Default component used for library targets when no component is specified.
 #


Installing OIS dependency didn't work on RelWithDebInfo with MingW

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -90,7 +90,9 @@
 	  endif ()
 	  if (MINGW)
 		install(FILES ${OIS_LIBRARY_DBG} DESTINATION lib/debug CONFIGURATIONS Debug)
+		install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
 		install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/release CONFIGURATIONS Release)
+		install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
 	  endif ()
 	elseif(APPLE)
 	  if (EXISTS ${OGRE_DEP_DIR}/lib/debug/libOIS.a)


CMake: Add HASH_DEBUG feature and a warning when tools are built with this feature disabled. Editor uses this feature.

--- CMake/Modules/UrhoOptions.cmake
+++ CMake/Modules/UrhoOptions.cmake
@@ -103,7 +103,7 @@

 # Enable by default for developers preset
 if (URHO3D_DEVELOPER)
-    foreach (OPT in PROFILING TOOLS EXTRAS LOGGING SYSTEMUI FILEWATCHER)
+    foreach (OPT in PROFILING TOOLS EXTRAS LOGGING SYSTEMUI FILEWATCHER HASH_DEBUG)
         if (NOT DEFINED URHO3D_${OPT}_DEFAULT)
             set (URHO3D_${OPT}_DEFAULT ${URHO3D_DEVELOPER})
         endif ()
@@ -131,6 +131,7 @@
 _option(URHO3D_PACKAGING "Package resources")
 _option(URHO3D_FILEWATCHER "Watch filesystem for resource changes")
 _option(URHO3D_TASKS "Enable coroutine subsystem")
+_option(URHO3D_HASH_DEBUG "Enable StringHash name debugging")
 if (BUILD_SHARED_LIBS)
     _option(URHO3D_CSHARP "Enable C# support")
 else ()
@@ -188,7 +189,6 @@
         set (URHO3D_PROFILING OFF)       # No way to make use of profiler data because of lack of networking
         set (URHO3D_TOOLS OFF)           # Useless
         set (URHO3D_EXTRAS OFF)          # Useless
-        set (URHO3D_SSE OFF)             # Unsupported
         set (EMSCRIPTEN_MEMORY_LIMIT 128 CACHE NUMBER "Memory limit in megabytes. Set to 0 for dynamic growth.")
         option (EMSCRIPTEN_MEMORY_GROWTH "Allow memory growth. Disables some optimizations." OFF)
     endif ()
@@ -197,6 +197,11 @@
         set (URHO3D_SYSTEMUI ON)
         set (URHO3D_FILEWATCHER ON)
         set (URHO3D_LOGGING ON)
+        if (NOT DEFINED URHO3D_HASH_DEBUG)
+            set (URHO3D_HASH_DEBUG ON)
+        else ()
+            message (WARNING "Editor uses URHO3D_HASH_DEBUG feature, but it was disabled. Editor will still build but some features will break.")
+        endif ()
     endif ()
 endif ()


BUG: add R_LIBRARY_BASE to be passed from super to actual project

--- CMake/SITKLanguageOptions.cmake
+++ CMake/SITKLanguageOptions.cmake
@@ -120,8 +120,13 @@
 # specifically R_FOUND is not defined. Additionally, the defined variables are not marked as advanced.
 option ( WRAP_R "Wrap R" OFF )
 mark_as_advanced( WRAP_R )
+if ( ${WRAP_R} )
+  find_package( R )
+endif()
+
 list( APPEND SITK_LANGUAGES_VARS
  R_INCLUDE_DIR
  R_LIBRARIES
+ R_LIBRARY_BASE
  R_COMMAND
  RSCRIPT_EXECUTABLE )


Change cl2hpp external project url to KhronosGroup Repository

--- CMakeModules/build_cl2hpp.cmake
+++ CMakeModules/build_cl2hpp.cmake
@@ -4,8 +4,8 @@

 ExternalProject_Add(
     cl2hpp-ext
-    GIT_REPOSITORY https://github.com/arrayfire/OpenCL-CLHPP.git
-    GIT_TAG install_targets
+    GIT_REPOSITORY https://github.com/KhronosGroup/OpenCL-CLHPP.git
+    GIT_TAG 75bb7d0d8b2ffc6aac0a3dcaa22f6622cab81f7c
     PREFIX "${prefix}"
     INSTALL_DIR "${prefix}/package"
     UPDATE_COMMAND ""


Allow arguments to be passed directly to Python

Change-Id: I3c8cb3d929d5b9f2eb54c9f2742eb079ca44c6f8

--- CMake/vtkTestingMacros.cmake
+++ CMake/vtkTestingMacros.cmake
@@ -315,6 +315,7 @@
     ExternalData_add_test(VTKData
       NAME    ${vtk-module}Python-${vtk_test_prefix}${name}
       COMMAND ${VTK_PYTHON_EXE} --enable-bt
+              ${VTK_PYTHON_ARGS}
               ${rtImageTest}
               ${CMAKE_CURRENT_SOURCE_DIR}/${name}.py
               ${args}


Subproject package config: add module definitions

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -194,7 +194,13 @@
 # if no component or file was specified, find all produced libraries
   "    set(${UPPER_PROJECT_NAME}_LIBRARY_NAMES \"@LIBRARY_NAMES@\")\n"
   "    foreach(_libraryname \${${UPPER_PROJECT_NAME}_LIBRARY_NAMES})\n"
+  "      string(TOUPPER \${_libraryname} _LIBRARYNAME)\n"
+  "      set(\${_LIBRARYNAME}_LIBRARY \${_libraryname})\n"
   "      list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${_libraryname})\n"
+  "      string(REPLACE \"${PROJECT_NAME}_\" \"\" _component \${_libraryname})\n"
+  "      string(TOUPPER \${_component} _COMPONENT)\n"
+  "      set(${UPPER_PROJECT_NAME}_\${_COMPONENT}_FOUND TRUE)\n"
+  "      list(APPEND ${UPPER_PROJECT_NAME}_COMPONENTS \${_component})\n"
   "    endforeach()\n"
   "  endif()\n"
   "\n"
@@ -254,6 +260,7 @@
 file(WRITE ${PROJECT_BINARY_DIR}/pkg/${PROJECT_NAME}Config.cmake.build.in
   "set(${PROJECT_NAME}_PREFIX_DIR ${PROJECT_BINARY_DIR})\n"
   "set(${UPPER_PROJECT_NAME}_INCLUDE_DIRS ${PROJECT_SOURCE_DIR})\n"
+  "list(APPEND CMAKE_MODULE_PATH ${PROJECT_BINARY_DIR}/${CMAKE_MODULE_INSTALL_PATH})\n"
   "\n"
   ${_config_file_body}
   ${_config_file_subproject_find}


BUG: TubeTK_TEST_ENVIRONMENT not set

BUG: TubeTK_TEST_ENVIRONMENT not set

On dashboards, TubeTK_TEST_ENVIRONMENT should be set to OFF
as it is expected that the environment variables on the system
may not have the same value as what the TubeTK configuration
system would expect. This is due to the fact that multiple
versions of TubeTK are typically configured and compiled
on one dashboard machine. This test is only useful for
developers to warn them that something could be wrong on
their machines if they have environment variables set
for ITK_BUILD_DIR and TUBETK_BUILD_DIR.

--- MicroTumorLinux1_Amazon_TubeTK.cmake
+++ MicroTumorLinux1_Amazon_TubeTK.cmake
@@ -136,6 +136,7 @@
 set( TubeTK_USE_QT ON )
 set( TubeTK_USE_VALGRIND ON )
 set( TubeTK_USE_VTK ON )
+set( TubeTK_TEST_ENVIRONMENT OFF)

 #
 # Configure what is run on this machine for experimental, continuous, and


Add Vulkan bootstrapping stub

Add Vulkan bootstrapping stub

--- bootstrap/get.cmake
+++ bootstrap/get.cmake
@@ -153,6 +153,7 @@
 y3_package(nasm)
 y3_package(openal)
 y3_package(opengl)
+y3_package(vulkan)
 y3_package(zlib)

 if("catch2" IN_LIST _y3_packages)
@@ -235,6 +236,24 @@
     DESTINATION ${PREFIX_DIR}/include/KHR)
 endif()

+if("vulkan" IN_LIST _y3_packages)
+  set(_version "1.1.82.0")
+  set(_package "Vulkan-Headers-sdk-${_version}")
+  y3_download("https://github.com/KhronosGroup/Vulkan-Headers/archive/sdk-${_version}.tar.gz"
+    NAME "${_package}.tar.gz"
+    SHA1 "2b6814b0a854710b8ee470f1b4f1dbac94edc1b7")
+  y3_extract("${_package}.tar.gz" DIR ${_package})
+  y3_cmake(${_package}
+    CONFIG ${CONFIG}
+    OPTIONS -DCMAKE_INSTALL_DATADIR=${CMAKE_BINARY_DIR}/.trash)
+  set(_package "Vulkan-Loader-sdk-${_version}")
+  y3_download("https://github.com/KhronosGroup/Vulkan-Loader/archive/sdk-${_version}.tar.gz"
+    NAME "${_package}.tar.gz"
+    SHA1 "f8c25d4821ab04a145b7896a295e3a71da891fcb")
+  y3_extract("${_package}.tar.gz" DIR ${_package})
+  # TODO: Build Vulkan loader.
+endif()
+
 if("zlib" IN_LIST _y3_packages)
   set(_version "1.2.11")
   set(_package "zlib-${_version}")


Fix CPack include (case sensative)

Fix CPack include (case sensative)

--- build.cmake
+++ build.cmake
@@ -183,4 +183,4 @@
 set(CPACK_RESOURCE_FILE_LICENSE      ${CMAKE_SOURCE_DIR}/LICENSE)
 set(CPACK_SYSTEM_NAME                ${PLT_TARGET}_${PLT_machine})

-include(cpack)
+include(CPack)


update

update

--- modules/zlib.cmake
+++ modules/zlib.cmake
@@ -1,14 +1,16 @@
 if(NOT TARGET zlib)

   # Temporary disable some warnings
+  # C4018: 'expression' : signed/unsigned mismatch
   # C4131: 'function' : uses old-style declarator
   # C4210: nonstandard extension used : function given file scope
   # C4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data
+  # C4245: 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch
   if(CMAKE_MAKE_PROGRAM MATCHES "(MSBuild|devenv|msdev|nmake)")
     set(CMAKE_OLD_C_FLAGS ${CMAKE_C_FLAGS})
     set(CMAKE_OLD_CXX_FLAGS ${CMAKE_CXX_FLAGS})
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127 /wd4131 /wd4210 /wd4244")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4127 /wd4131 /wd4210 /wd4244")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4018 /wd4127 /wd4131 /wd4210 /wd4244 /wd4245")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4018 /wd4127 /wd4131 /wd4210 /wd4244 /wd4245")
   endif()

   # Set module options


Added TODO for android plugin workaround.

--- cmake-local/osvrAddPlugin.cmake
+++ cmake-local/osvrAddPlugin.cmake
@@ -24,8 +24,10 @@
     endif()

     if(ANDROID)
-        # Android loads plugins as if they were shared libraries, and
-        # additionally, requires SONAME to be set.
+        # @TODO temporary workaround for Android plugins. Our toolchain file
+        # seems to build Android MODULE libraries without a SONAME, but the SONAME
+        # is required on the latest Android dynamic linker, so we build them as
+        # SHARED for now.
         add_library(${OSVR_ADD_PLUGIN_NAME} SHARED ${OSVR_ADD_PLUGIN_SOURCES})
     else()
         add_library(${OSVR_ADD_PLUGIN_NAME} MODULE ${OSVR_ADD_PLUGIN_SOURCES})


(Try to) fix bug due to compat with cmake version < 3, with PRIVATE keyword

--- cmake/LibraryProjectSetup.cmake
+++ cmake/LibraryProjectSetup.cmake
@@ -108,9 +108,6 @@

   # windows stuff ...
   include(WindowsLibrarySetup)
-
-  message("oiaeoepzoeziopezpoieaz ${PRIVATE}")
-
   # Link target with external libs ...
   target_link_libraries(${COMPONENT} ${PRIVATE} ${${COMPONENT}_LINK_LIBRARIES})


Delete FindDynCall module for CMake

Delete FindDynCall module for CMake

--- cmake/Modules/FindDynCall.cmake
+++ cmake/Modules/FindDynCall.cmake
@@ -1,43 +0,0 @@
-# - Try to find dyncall library
-#
-#   The following variables will be defined:
-#
-#     DYNCALL_FOUND
-#     DYNCALL_INCLUDE_DIRS
-#     DYNCALL_LIBRARIES
-#
-# ----------------------------------------------------------------------------
-#
-# Package: dyncall
-# File: buildsys/cmake/Modules/CMakeLists.txt
-# Description: CMake Module to find DynCall library
-# License:
-#
-# Copyright (c) 2010,2011 Daniel Adler <dadler@uni-goettingen.de>
-#
-# Permission to use, copy, modify, and distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-find_path(DYNCALL_INCLUDE_DIR NAMES dyncall.h)
-find_library(DYNCALL_LIBRARY dyncall_s)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(DynCall DEFAULT_MSG DYNCALL_LIBRARY DYNCALL_INCLUDE_DIR)
-
-if(DYNCALL_FOUND)
-  set(DYNCALL_INCLUDE_DIRS ${DYNCALL_INCLUDE_DIR})
-  set(DYNCALL_LIBRARIES ${DYNCALL_LIBRARY})
-endif(DYNCALL_FOUND)
-
-mark_as_advanced(DYNCALL_INCLUDE_DIR DYNCALL_LIBRARY)
-


Added support for older versions of IlmBaseConfig.h version REGEX Default to checking ILMBASE_ROOT, fallback to system locations

--- cmake/Modules/FindIlmBase.cmake
+++ cmake/Modules/FindIlmBase.cmake
@@ -11,12 +11,41 @@
   set(ILMBASE_ROOT "/usr/local/IlmBase")
 endif()

+# Find Half library
+find_library(
+  _IlmBase_HALF_LIBRARY
+  NAMES Half
+  PATHS ${ILMBASE_ROOT}
+  PATH_SUFFIXES lib lib64
+  NO_DEFAULT_PATH
+)
+if(NOT _IlmBase_HALF_LIBRARY)
+  find_library(
+    _IlmBase_HALF_LIBRARY
+    NAMES Half
+  )
+endif()
+
+# Set library directory
+get_filename_component(_dir ${_IlmBase_HALF_LIBRARY} PATH)
+set(IlmBase_LIBRARY_DIR "${_dir}" CACHE PATH "IlmBase library directory")
+if(IlmBase_LIBRARY_DIR MATCHES "IlmBase")
+  get_filename_component(_dir ${_dir} PATH)
+endif()
+set(IlmBase_ROOT_DIR "${_dir}" CACHE PATH "IlmBase root directory")
+
 find_path(
   IlmBase_INCLUDE_DIR
-  NAME OpenEXR/half.h
-  PATHS ${ILMBASE_ROOT}/include/
+  NAMES OpenEXR/half.h
+  PATHS "${IlmBase_ROOT_DIR}/include/"
   NO_DEFAULT_PATH
 )
+if(NOT IlmBase_INCLUDE_DIR)
+  find_path(
+    IlmBase_INCLUDE_DIR
+    NAMES OpenEXR/half.h
+  )
+endif()

 if(IlmBase_INCLUDE_DIR)
   include_directories(${IlmBase_INCLUDE_DIR})
@@ -33,6 +62,7 @@
       STRINGS ${_IlmBase_CONFIG} _IlmBase_VERSION_MAJOR
       REGEX "#define[ ]+ILMBASE_VERSION_MAJOR[ ]+([0-9]+)"
       )
+
     if(_IlmBase_VERSION_MAJOR)
       string(REGEX MATCH "[0-9]+" IlmBase_VERSION_MAJOR ${_IlmBase_VERSION_MAJOR})
     endif()
@@ -53,21 +83,26 @@
       string(REGEX MATCH "[0-9]+" IlmBase_VERSION_PATCH ${_IlmBase_VERSION_PATCH})
     endif()

+    if(NOT IlmBase_VERSION_MAJOR OR NOT IlmBase_VERSION_MINOR OR NOT IlmBase_VERSION_PATCH)
+      set(_IlmBase_VERSION_STRING "asasfasfasfasfafsasfd")
+      file(
+        STRINGS ${_IlmBase_CONFIG} _IlmBase_VERSION_STRING
+        REGEX "#define[ ]+VERSION[ ]+[\"]?[0-9]+\\.[0-9]+\\.[0-9]+[\"]?"
+      )
+      string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)[\"]?" "\\0;\\1;\\2;\\3" _IlmBase_VERSION_LIST "${_IlmBase_VERSION_STRING}")
+      list(LENGTH _IlmBase_VERSION_LIST _list_LENGTH)
+      if(_list_LENGTH GREATER 2)
+        list(GET _IlmBase_VERSION_LIST 1 IlmBase_VERSION_MAJOR)
+        list(GET _IlmBase_VERSION_LIST 2 IlmBase_VERSION_MINOR)
+        list(GET _IlmBase_VERSION_LIST 3 IlmBase_VERSION_PATCH)
+      endif()
+
+    endif()
+
     set(IlmBase_VERSION "${IlmBase_VERSION_MAJOR}.${IlmBase_VERSION_MINOR}.${IlmBase_VERSION_PATCH}" CACHE STRING "Version of IlmBase computed from IlmBaseConfig.h")
+
   endif()
 endif()
-
-# Find Half library
-find_library(
-  _IlmBase_HALF_LIBRARY
-  NAMES Half
-  HINTS ${ILMBASE_ROOT}
-  PATH_SUFFIXES lib lib64
-  NO_DEFAULT_PATH
-)
-# Set library directory
-get_filename_component(_dir ${_IlmBase_HALF_LIBRARY} PATH)
-set(IlmBase_LIBRARY_DIR "${_dir}" CACHE PATH "IlmBase library directory")

 foreach(COMPONENT ${IlmBase_FIND_COMPONENTS})
   find_library(
@@ -84,7 +119,7 @@
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(IlmBase
   REQUIRED_VARS
-    ILMBASE_ROOT
+    IlmBase_ROOT_DIR
     IlmBase_INCLUDE_DIR
     IlmBase_LIBRARIES
     IlmBase_LIBRARY_DIR


[CMake] Install libcxx-headers as part of the Apple-stage2 distribution

This installs the clang headers as part of the install-distribution target.

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

--- cmake/caches/Apple-stage2.cmake
+++ cmake/caches/Apple-stage2.cmake
@@ -55,6 +55,7 @@
   LTO
   clang-format
   clang-headers
+  libcxx-headers
   ${LLVM_TOOLCHAIN_TOOLS}
   CACHE STRING "")


Fix optional stdlib component install

Fix optional stdlib component install

--- cmake/modules/SwiftSource.cmake
+++ cmake/modules/SwiftSource.cmake
@@ -262,7 +262,7 @@
   if (SWIFTFILE_IS_STDLIB)
     list(APPEND swift_flags "-swift-version" "5")
   endif()
-
+
   # Force swift 4 compatibility mode for overlays.
   if (SWIFTFILE_IS_SDK_OVERLAY)
     list(APPEND swift_flags "-swift-version" "4")
@@ -344,16 +344,11 @@
     list(APPEND module_outputs "${interface_file}")
   endif()

-  set(optional_arg)
-  if(sdk IN_LIST SWIFT_APPLE_PLATFORMS)
-    # Allow installation of stdlib without building all variants on Darwin.
-    set(optional_arg "OPTIONAL")
-  endif()
-
   if(SWIFTFILE_SDK IN_LIST SWIFT_APPLE_PLATFORMS)
     swift_install_in_component("${SWIFTFILE_INSTALL_IN_COMPONENT}"
       DIRECTORY "${specific_module_dir}"
-      DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/${library_subdir}")
+      DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/${library_subdir}"
+      OPTIONAL)
   else()
     swift_install_in_component("${SWIFTFILE_INSTALL_IN_COMPONENT}"
       FILES ${module_outputs}
@@ -439,7 +434,7 @@
   set(file_path "${CMAKE_CURRENT_BINARY_DIR}/${file_name}.txt")
   string(REPLACE ";" "'\n'" source_files_quoted "${source_files}")
   file(WRITE "${file_path}" "'${source_files_quoted}'")
-
+
   # If this platform/architecture combo supports backward deployment to old
   # Objective-C runtimes, we need to copy a YAML file with legacy type layout
   # information to the build directory so that the compiler can find it.


Updated the cmake module for the c-client library.

--- cmake_modules/FindCClient.cmake
+++ cmake_modules/FindCClient.cmake
@@ -9,15 +9,6 @@
   # Already in cache, be silent
  set(CCLIENT_FIND_QUIETLY TRUE)
 endif (CCLIENT_INCLUDE_DIRS AND CCLIENT_LIBRARIES)
-
-# Look for the header files.
-find_path(
-  CCLIENT_SRC_INCLUDE
-  NAMES c-client.h
-  PATHS ${CCLIENT_INCLUDE_DIRS}
-  PATH_SUFFIXES src/c-client
-  DOC "Include directory for the CCLient library")
-mark_as_advanced(CCLIENT_SRC_INCLUDE)

 find_path(
   CCLIENT_INCLUDE
@@ -41,14 +32,13 @@
 endif (CCLIENT_LIBRARY)

 # Copy the results to the output variables.
-if(CCLIENT_SRC_INCLUDE AND CCLIENT_INCLUDE AND CCLIENT_LIBRARY)
+if(CCLIENT_INCLUDE AND CCLIENT_LIBRARY)
   set(CCLIENT_FOUND 1)
   set(CCLIENT_LIBRARIES ${CCLIENT_LIBRARY})
-  set(CCLIENT_INCLUDE_DIRS ${CCLIENT_SRC_INCLUDE})
   set(CCLIENT_INCLUDE_DIRS ${CCLIENT_INCLUDE_DIRS} ${CCLIENT_INCLUDE})

-# Do not treat the operator name keywords and, bitand, bitor, compl, not, or and xor
-# as synonyms as keywords. Needed in order to include C-CLIENT library
+  # Do not treat the operator name keywords and, bitand, bitor, compl, not, or and xor
+  # as synonyms as keywords. Needed in order to include C-CLIENT library
   IF(NOT CMAKE_CXX_FLAGS MATCHES "-fno-operator-names")
     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-operator-names")
   ENDIF(NOT CMAKE_CXX_FLAGS MATCHES "-fno-operator-names")
@@ -56,8 +46,8 @@
   IF(NOT CMAKE_C_FLAGS MATCHES "-fno-operator-names")
     SET(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -fno-operator-names")
   ENDIF(NOT CMAKE_C_FLAGS MATCHES "-fno-operator-names")
-else(CCLIENT_SRC_INCLUDE AND CCLIENT_INCLUDE AND CCLIENT_LIBRARY)
+else(CCLIENT_INCLUDE AND CCLIENT_LIBRARY)
   set(CCLIENT_FOUND 0)
   set(CCLIENT_LIBRARIES)
   set(CCLIENT_INCLUDE_DIRS)
-endif(CCLIENT_SRC_INCLUDE AND CCLIENT_INCLUDE AND CCLIENT_LIBRARY)+endif(CCLIENT_INCLUDE AND CCLIENT_LIBRARY)


Fix detecting Windows Kit install path

Fix detecting Windows Kit install path

--- contrib/cmake/vcpkg_extra_ports/opengl/0.0-5/portfile.cmake
+++ contrib/cmake/vcpkg_extra_ports/opengl/0.0-5/portfile.cmake
@@ -1,17 +1,18 @@
 include(vcpkg_common_functions)

 if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
-    vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT)
     vcpkg_get_windows_sdk(WINDOWS_SDK)

     if (WINDOWS_SDK MATCHES "10.")
-        set(LIBGLFILEPATH  "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib")
-        set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib")
-        set(HEADERSPATH    "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um")
+        GET_FILENAME_COMPONENT(WINDOWS_KIT_10_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" ABSOLUTE CACHE)
+        set(LIBGLFILEPATH  "${WINDOWS_KIT_10_PATH}\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib")
+        set(LIBGLUFILEPATH "${WINDOWS_KIT_10_PATH}\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib")
+        set(HEADERSPATH    "${WINDOWS_KIT_10_PATH}\\Include\\${WINDOWS_SDK}\\um")
     elseif(WINDOWS_SDK MATCHES "8.")
-        set(LIBGLFILEPATH  "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib")
-        set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib")
-        set(HEADERSPATH    "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Include\\um")
+        GET_FILENAME_COMPONENT(WINDOWS_KIT_81_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot81]" ABSOLUTE CACHE)
+        set(LIBGLFILEPATH  "${WINDOWS_KIT_81_PATH}\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib")
+        set(LIBGLUFILEPATH "${WINDOWS_KIT_81_PATH}\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib")
+        set(HEADERSPATH    "${WINDOWS_KIT_81_PATH}\\Include\\um")
     else()
         message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}")
     endif()


Bug: removed the list of noncompiling routines.

By accident, the list of M routines included also the list of routines
that are not compiling with GTM. We noew removed them in this commit.

--- CMake/ListOfVistARoutines.cmake
+++ CMake/ListOfVistARoutines.cmake
@@ -27433,115 +27433,4 @@
   ZUVXD.m
   ZZHLGHB1.m
   ZZRCSUM.m
-
-vista_m_sources_files_not_compiling_with_gtm := \
-  ANRVOA.m
-  ANRVRRL.m
-  BPSOSQ2.m
-  DENTA14.m
-  DENTDSE.m
-  DGMSTAPI.m
-  DGPFUT.m
-  DINV1VXD.m
-  DINVDTM.m
-  DINVONT.m
-  DINVVXD.m
-  DVBAMVI1.m
-  DVBAMVI2.m
-  DVBCRPRT.m
-  GMTSOBI.m
-  HLCSTCPA.m
-  HLCSTCP.m
-  HLOPING.m
-  HLOSRVR.m
-  HLOSTRAC.m
-  HLOTRACE.m
-  IBCEF73.m
-  IBCNQ.m
-  IBJTCA2.m
-  KMPDU2.m
-  KMPDUTL5.m
-  LEXAR7.m
-  LR138PO.m
-  MAGVCHK.m
-  MDRPCOV.m
-  MUSMCR1.m
-  MUSMCR3.m
-  NVSMENU.m
-  NVSSTM.m
-  NVSTMPC.m
-  ORCACT01.m
-  ORRDI1.m
-  ORRDI2.m
-  ORWORR1.m
-  PRCAUDT.m
-  PRCBR1.m
-  PRCFAES1.m
-  PSBRPC2.m
-  PSJINVW.m
-  PSORELD1.m
-  PSSFDBRT.m
-  PSSHRPST.m
-  PSSHTTP.m
-  RCRJRCOR.m
-  RGUTIN0.m
-  RGUTIN16.m
-  RGUTIN18.m
-  RGUTIN8.m
-  RGUTOS1.m
-  RGUTOS.m
-  RGUTRRC.m
-  SCAPMC7.m
-  SDAMA307.m
-  SDWLRP4.m
-  TIUSRVLC.m
-  XGKB.m
-  XINDX2.m
-  XMLPC.m
-  XMRTCP.m
-  XOBUZAP.m
-  XOBVTCPL.m
-  XOBWD.m
-  XOBWENV.m
-  XOBWLIB1.m
-  XOBWLIB.m
-  XOBWPST.m
-  XOBWSSL.m
-  XOBWU1.m
-  XOBWUS1.m
-  XPDR.m
-  XQ82.m
-  XT73P133.m
-  XTRMON.m
-  XUCIIS2.m
-  XUCIMSQ.m
-  XUOAAHL7.m
-  XUSC1.m
-  ZIS4ONT.m
-  ZIS4VXD.m
-  ZISETDTM.m
-  ZISETONT.m
-  ZISG1.m
-  ZISG2.m
-  ZISG3.m
-  ZISG.m
-  ZISHMSU.m
-  _ZISTCPS.m
-  ZOSV2VXD.m
-  ZOSVDTM.m
-  ZOSVIS2.m
-  ZOSVKRV.m
-  ZOSVKSD.m
-  ZOSVMSM.m
-  ZOSVMSQ.m
-  ZOSVONT.m
-  ZOSVVXD.m
-  ZTBKCDTM.m
-  ZTBKCONT.m
-  ZTEDIT2.m
-  ZTEDIT3.m
-  ZTEDIT.m
-  ZTMB.m
-  ZUDTM.m
-  ZUMSM.m
   )


CMake: Fix mysterious `in` in cmake variables.

--- CMake/Modules/UrhoOptions.cmake
+++ CMake/Modules/UrhoOptions.cmake
@@ -81,7 +81,7 @@
 endif ()

 # Enable features user has chosen
-foreach(FEATURE in ${URHO3D_FEATURES})
+foreach(FEATURE ${URHO3D_FEATURES})
     set (URHO3D_${FEATURE} ON CACHE BOOL "" FORCE)
 endforeach()

@@ -96,7 +96,7 @@

 # Enable by default for developers preset
 if (URHO3D_DEVELOPER)
-    foreach (OPT in PROFILING TOOLS EXTRAS LOGGING SYSTEMUI FILEWATCHER HASH_DEBUG)
+    foreach (OPT PROFILING TOOLS EXTRAS LOGGING SYSTEMUI FILEWATCHER HASH_DEBUG)
         if (NOT DEFINED URHO3D_${OPT}_DEFAULT)
             set (URHO3D_${OPT}_DEFAULT ${URHO3D_DEVELOPER})
         endif ()


Remove unnecessary comments (#1355)

Remove unnecessary comments (#1355)

***NO_CI***

--- CMake/Modules/FindCHIBIOS.cmake
+++ CMake/Modules/FindCHIBIOS.cmake
@@ -4,7 +4,7 @@
 #

 ###################################################################################################################################
-# WHEN ADDING A NEW series add the respective name to the list below along with the CMake files with GCC options and source files
+# WHEN ADDING A NEW SERIES, add the respective name to the list below along with the CMake files with GCC options and source files
 ###################################################################################################################################

 # check if the series name is supported
@@ -84,7 +84,6 @@
     hal_can.c
     hal_crypto.c
     hal_dac.c
-    #hal_ext.c #notfound
     hal_gpt.c
     hal_i2c.c
     hal_i2s.c
@@ -93,18 +92,17 @@
     hal_mmc_spi.c
     hal_pal.c
     hal_pwm.c
-    #hal_qspi.c #notfound
     hal_rtc.c
     hal_sdc.c
     hal_serial.c
     hal_serial_usb.c
-    hal_sio.c #new
+    hal_sio.c
     hal_spi.c
-    hal_trng.c #new
+    hal_trng.c
     hal_uart.c
     hal_usb.c
     hal_wdg.c
-    hal_wspi.c #new
+    hal_wspi.c

     # OSAL RT
     osal.c


Less make spam.

Less make spam.

--- CMake/Tools/FindFlexBison.cmake
+++ CMake/Tools/FindFlexBison.cmake
@@ -6,5 +6,7 @@
 find_package (FLEX)
 find_package (BISON)

-message ("Flex version: ${FLEX_VERSION}")
-message ("Bison version: ${BISON_VERSION}")
+if (FLEX_EXECUTABLE AND BISON_EXECUTABLE)
+	message ("Flex version: ${FLEX_VERSION}")
+	message ("Bison version: ${BISON_VERSION}")
+endif ()


ENH: Update DTI-Reg version

ENH: Update DTI-Reg version

--- CMake/FindExternalTools.cmake
+++ CMake/FindExternalTools.cmake
@@ -487,7 +487,7 @@
   SVN_REPOSITORY "http://www.nitrc.org/svn/dtireg/trunk"
   SVN_USERNAME slicerbot
   SVN_PASSWORD slicer
-  SVN_REVISION -r 34 # 01/06/2013
+  SVN_REVISION -r 35 # 01/11/2013
   )
 set( CMAKE_ExtraARGS
   -DANTSTOOL:PATH=${ANTSPath}


Fix FindOGRE's handling of OgreBuildSettings.h.

--HG--
branch : v1-7
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/branches/v1-7%401700

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


Enable Eigen Alignment in Windows 64 bit builds

Also, renamed the cmake option to EIGEN_ALIGNMENT instead of
EIGEN_DONT_ALIGN, it is more clear this way to enable EIGEN_ALIGNMENT
instead of disabling EIGEN_DONT_ALIGN.

--- CMake/SurgSimBuildFlags.cmake
+++ CMake/SurgSimBuildFlags.cmake
@@ -123,13 +123,19 @@
 	add_definitions( -D_POSIX_C_SOURCE=200809L )  # request POSIX APIs
 endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")

-# Eigen Alignment, enabled on Linux by default
+set(DEFAULT_EIGEN_ALIGNMENT OFF)
+# Enable alignement on linux by default
 if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
-	option(EIGEN_DONT_ALIGN "Disable alignment of vectors in Eigen" OFF)
-else(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
-	option(EIGEN_DONT_ALIGN "Disable alignment of vectors in Eigen" ON)
-endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
-mark_as_advanced(EIGEN_DONT_ALIGN)
-if(EIGEN_DONT_ALIGN)
+	set(DEFAULT_EIGEN_ALIGNMENT ON)
+endif()
+
+# Enable alignement on Windows 64bit by default
+if(${CMAKE_CL_64})
+	set(DEFAULT_EIGEN_ALIGNMENT ON)
+endif()
+
+option(EIGEN_ALIGNMENT "Enable alignment of vectors in Eigen" ${DEFAULT_EIGEN_ALIGNMENT})
+mark_as_advanced(EIGEN_ALIGNMENT)
+if(NOT EIGEN_ALIGNMENT)
 	add_definitions( -DEIGEN_DONT_ALIGN )
-endif(EIGEN_DONT_ALIGN)
+endif()


BUG: Update PythonQt to fix intallation of light-the-torch in Slicer

This commit fixes the following error reported when trying to install
light-the-torch in Slicer:

  AttributeError: 'PythonQtStdInRedirect' object has no attribute 'isatty'

See https://github.com/Slicer/Slicer/issues/5705

List of changes:

$ git shortlog dafdb72..c306140 --no-merges
Andras Lasso (1):
      [Backport] Add isatty() method to PythonQtStdIn class

--- CMakeExternals/PythonQt.cmake
+++ CMakeExternals/PythonQt.cmake
@@ -82,7 +82,7 @@
   ctkFunctionExtractOptimizedLibrary(PYTHON_LIBRARIES PYTHON_LIBRARY)

   if (CTK_QT_VERSION VERSION_GREATER "4")
-    set(revision_tag dafdb7255b82163329672edebba4f267958c7376) # patched-10
+    set(revision_tag c306140442feb6e76d4bae672c48cd7f11d9b0cd) # patched-9
   else()
     set(revision_tag 90c08fb0d523622d2de9e7a91f4ef116a66a8801) # patched-5
   endif()


Fix quotation (#47)

Fix quotation (#47)

--- external/ImportPugiXML.cmake
+++ external/ImportPugiXML.cmake
@@ -14,7 +14,7 @@
   ExternalProject_Add(pugixml_external
     PREFIX ${EXTERNAL_BUILD_DIR}/pugixml
     GIT_REPOSITORY https://github.com/zeux/pugixml
-    CMAKE_ARGS “-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>”
+    CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>"
     UPDATE_COMMAND ""
     INSTALL_COMMAND ""
     BUILD_BYPRODUCTS ${EXTERNAL_BUILD_DIR}/pugixml/src/pugixml_external-build/libpugixml${CMAKE_STATIC_LIBRARY_SUFFIX}


use LLD on x86

use LLD on x86

- LLD is still not default, so keep using GOLD on non-x86 platform where
  it does not trigger linker errors

--- toolchains/android-studio.toolchain.cmake
+++ toolchains/android-studio.toolchain.cmake
@@ -110,14 +110,19 @@
     if ( CMAKE_HOST_WIN32 )
         set( gold_suffix ".exe" )
     endif()
-    link_libraries( -fuse-ld=gold${gold_suffix} )
+
     # Implementation note:
     # NDK r17 (and r18 as well) on x86 with ICF and LTO combined causes internal linker error.
     #
     #                              Nenad Miksa (19.09.2018.)
+    # Additional note:
+    # LTO with gold fails on Android x86. Use LLD on that platform and gold otherwise.
+    #                              Nenad Miksa (17.01.2020.)
     if( ANDROID_ABI STREQUAL "x86" )
+        link_libraries( -fuse-ld=lld${gold_suffix} )
         link_libraries( $<$<CONFIG:RELEASE>:-Wl,--icf=none> )
     else()
+        link_libraries( -fuse-ld=gold${gold_suffix} )
         link_libraries( $<$<CONFIG:RELEASE>:-Wl,--icf=all> ) # http://research.google.com/pubs/pub36912.html Safe ICF: Pointer Safe and Unwinding Aware Identical Code Folding in Gold
     endif()
 endif()


SuperBuild: jpeg: remove full file patches

--- SuperBuild/CMake/External_jpeg.cmake
+++ SuperBuild/CMake/External_jpeg.cmake
@@ -1,16 +1,6 @@
 INCLUDE_ONCE_MACRO(JPEG)

 SETUP_SUPERBUILD(JPEG)
-
-if(WIN32)
-  set(JPEG_PATCH_COMMAND ${CMAKE_COMMAND}
-    -E copy
-    ${CMAKE_SOURCE_DIR}/patches/JPEG/jconfigint.h.in
-    ${JPEG_SB_SRC}/win/)
-
-else()
-  set(JPEG_PATCH_COMMAND)
-endif()

 ExternalProject_Add(JPEG
   PREFIX JPEG
@@ -29,7 +19,6 @@
     -DWITH_ARITH_DEC=TRUE
     -DWITH_JAVA=FALSE
     ${JPEG_SB_SRC}
-    PATCH_COMMAND ${JPEG_PATCH_COMMAND}
   )

 SUPERBUILD_PATCH_SOURCE(JPEG)


Upgrade spdlog to latest. Doesn't build yet

--- Superbuild/SpdLogExternal.cmake
+++ Superbuild/SpdLogExternal.cmake
@@ -30,7 +30,7 @@
 # git checkout -q will silence message about detached head (harmless).
 ExternalProject_Add(SpdLog_external
   GIT_REPOSITORY "https://github.com/gabime/spdlog"
-  GIT_TAG "v0.14.0"
+  GIT_TAG "v1.3.1"
   CONFIGURE_COMMAND ""
   BUILD_COMMAND ""
   INSTALL_COMMAND ""


Unbreak (Unix) build

Unbreak (Unix) build

svn path=/branches/work/kdab-post-4.0/kdepim/; revision=750022

--- kleopatra/ConfigureChecks.cmake
+++ kleopatra/ConfigureChecks.cmake
@@ -16,6 +16,13 @@
     set( CMAKE_REQUIRED_LIBRARIES ${ASSUAN_PTHREAD_LIBRARIES} )
     set( USABLE_ASSUAN_FOUND true )
   endif( WIN32 AND ASSUAN_VANILLA_FOUND )
+
+  # TODO: this workaround will be removed as soon as we find better solution
+  if(MINGW)
+    set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${KDEWIN32_INCLUDE_DIR}/mingw)
+  elseif(MSVC)
+    set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${KDEWIN32_INCLUDE_DIR}/msvc)
+  endif(MINGW)

 endif( ASSUAN_FOUND )

@@ -41,17 +48,7 @@

 if ( USABLE_ASSUAN_FOUND )

-  set(CMAKE_REQUIRED_LIBRARIES_tmp ${CMAKE_REQUIRED_LIBRARIES}) #push
-  set(CMAKE_REQUIRED_INCLUDES_tmp ${CMAKE_REQUIRED_INCLUDES}) #push
-
   # check if assuan has assuan_fd_t
-  set(CMAKE_REQUIRED_LIBRARIES ${_gpg_error_library})
-  set(CMAKE_REQUIRED_INCLUDES ${ASSUAN_INCLUDES})
-  if(MINGW) # TODO: this workaround will be removed as soon as we find better solution
-    set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${KDEWIN32_INCLUDE_DIR}/mingw)
-  elseif(MSVC)
-    set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${KDEWIN32_INCLUDE_DIR}/msvc)
-  endif(MINGW)
   check_cxx_source_compiles("
         #include <assuan.h>
         int main() {
@@ -108,9 +105,6 @@
     set( USABLE_ASSUAN_FOUND false )
   endif ( WIN32 AND NOT HAVE_ASSUAN_SOCK_GET_NONCE )

-  set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_tmp}) #pop
-  set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_tmp}) #pop
-
 endif ( USABLE_ASSUAN_FOUND )

 if ( USABLE_ASSUAN_FOUND )


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

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


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

 # 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 05)

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


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

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


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

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


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

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


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

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


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

 # 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 04)

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


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

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


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

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


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

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


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   20)
+SET(KWSYS_DATE_STAMP_DAY   21)


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

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


COMP: removed TrackingDeviceSourceTest from files.cmake as it still doesn't work

--- Modules/IGT/Testing/files.cmake
+++ Modules/IGT/Testing/files.cmake
@@ -22,7 +22,7 @@
    mitkNavigationDataRecorderTest.cpp

    # ------------------ Deavtivated Tests ----------------------------------
-   mitkTrackingDeviceSourceTest.cpp
+   #mitkTrackingDeviceSourceTest.cpp
    #mitkNavigationDataPlayerTest.cpp  # deactivated, see bug 3073
    #mitkNavigationDataSourceTest.cpp   # deactivated because of  bug #2323
    # -----------------------------------------------------------------------
@@ -33,4 +33,4 @@
    mitkNavigationToolTest.cpp
    mitkNavigationToolReaderAndWriterTest.cpp
    # -----------------------------------------------------------------------
-)+)


Check for -ldl. Now I can compile a few objects on Linux...

--- extras/buildsystem/cmake/include/config.cmake
+++ extras/buildsystem/cmake/include/config.cmake
@@ -74,7 +74,10 @@
 endif(NOT HAVE_GETADDRINFO)

 find_library(HAVE_ICONV iconv)
+# FIXME: this will break on *BSD:
 set( ICONV_CONST " " )
+
+check_library_exists(dl dlopen "" HAVE_DL_DLOPEN)

 ###########################################################
 # Other check
@@ -152,6 +155,7 @@
 command_to_configvar( "hostname" VLC_COMPILE_HOST )
 command_to_configvar( "hostname" VLC_COMPILE_DOMAIN )
 command_to_configvar( "${CMAKE_C_COMPILER} --version" VLC_COMPILER )
+# FIXME: WTF? this is not the configure line!
 command_to_configvar( "${CMAKE_C_COMPILER} --version" CONFIGURE_LINE )
 set( VLC_COMPILER "${CMAKE_C_COMPILER}" )


[Build] Remove -Wno-long-long compiler option Obsolete since C++11

--- cmake/BALLCompilerSpecific.cmake
+++ cmake/BALLCompilerSpecific.cmake
@@ -52,7 +52,7 @@

 	# Added -Wno-deprecated-declarations as Eigen3 currently uses binder2nd
 	# which spams the compiler output.
-	ADD_DEFINITIONS(-Wall -Wextra -Wno-long-long -Wno-deprecated-declarations)
+	ADD_DEFINITIONS(-Wall -Wextra -Wno-deprecated-declarations)

 	IF(USE_PEDANTIC)
 		ADD_BALL_DEFINITIONS("-pedantic")
@@ -82,7 +82,7 @@
 	STRING(REGEX REPLACE "([0-9])\\.([0-9])\\.([0-9])" "\\3"
 		CXX_COMPILER_VERSION_MINOR_MINOR ${CXX_COMPILER_VERSION})

-	ADD_DEFINITIONS(-Wall -Wextra -Wno-long-long)
+	ADD_DEFINITIONS(-Wall -Wextra)

 	IF(USE_PEDANTIC)
 		ADD_BALL_DEFINITIONS(-pedantic)


fix regex

fix regex

--- cmake/CheckCXXCompilerFlag.cmake
+++ cmake/CheckCXXCompilerFlag.cmake
@@ -28,7 +28,7 @@
    SET(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
    CHECK_CXX_SOURCE_COMPILES("int main() { return 0;}" ${_RESULT}
      # Some compilers do not fail with a bad flag
-     FAIL_REGEX "is valid for .* but not for C\+\+"         # GNU
+     FAIL_REGEX "is valid for .* but not for C\\+\\+"       # GNU
      FAIL_REGEX "unrecognized .*option"                     # GNU
      FAIL_REGEX "ignoring unknown option"                   # MSVC
      FAIL_REGEX "[Uu]nknown option"                         # HP


Install environment hooks into a package-specific directory (#953)

* Generate a manifest of env hooks for use by other build tools

* Record full path to hook in manifest

* Install hooks to share/project_name/profile.d

* use `catkin_env_hook` instead of `profile.d` under share/pkgname

* document two install destinations

* spelling

--- cmake/catkin_add_env_hooks.cmake
+++ cmake/catkin_add_env_hooks.cmake
@@ -33,6 +33,12 @@
 #   catkin_add_env_hooks(my_prefix SHELLS bash tcsh zsh DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/env-hooks)
 #
 # looks for files env-hooks/my_prefix.[bash|tcsh|zsh]((.(devel|install)space)?.[em|in])?
+#
+# The environment hooks are installed into two destinations:
+# * ``etc/catkin/profile.d`` where they can be sourced efficiently by the
+#   catkin generated ``setup.<shell>`` scripts
+# * ``share/${PROJECT_NAME}/catkin_env_hook`` where they can be sourced
+#   efficiently on a per-package base
 #
 # :param file_prefix: the filename prefix
 # :type file_prefix: string
@@ -110,6 +116,8 @@
       if(NOT ${ARG_SKIP_INSTALL})
         install(FILES ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${ENV_HOOK}
           DESTINATION ${CATKIN_GLOBAL_ETC_DESTINATION}/catkin/profile.d)
+        install(FILES ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${ENV_HOOK}
+          DESTINATION ${CATKIN_GLOBAL_SHARE_DESTINATION}/${PROJECT_NAME}/catkin_env_hook)
       endif()
     elseif(EXISTS ${base}.in OR EXISTS ${base}.installspace.in)
       # evaluate in template and install
@@ -124,12 +132,16 @@
       if(NOT ${ARG_SKIP_INSTALL})
         install(FILES ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${ENV_HOOK}
           DESTINATION ${CATKIN_GLOBAL_ETC_DESTINATION}/catkin/profile.d)
+        install(FILES ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${ENV_HOOK}
+          DESTINATION ${CATKIN_GLOBAL_SHARE_DESTINATION}/${PROJECT_NAME}/catkin_env_hook)
       endif()
     elseif (EXISTS ${base})
       # install plain file
       if(NOT ${ARG_SKIP_INSTALL})
         install(FILES ${base}
           DESTINATION ${CATKIN_GLOBAL_ETC_DESTINATION}/catkin/profile.d)
+        install(FILES ${base}
+          DESTINATION ${CATKIN_GLOBAL_SHARE_DESTINATION}/${PROJECT_NAME}/catkin_env_hook)
       endif()
     endif()
   endforeach()


build: synchronize SwiftSupport with Foundation

Synchronize the SwiftSupport CMake module with Foundation with support
for Resources and correcting the dependency tracking.

--- cmake/modules/SwiftSupport.cmake
+++ cmake/modules/SwiftSupport.cmake
@@ -4,7 +4,7 @@
 function(add_swift_target target)
   set(options LIBRARY)
   set(single_value_options MODULE_NAME;MODULE_LINK_NAME;MODULE_PATH;MODULE_CACHE_PATH;OUTPUT;TARGET)
-  set(multiple_value_options CFLAGS;DEPENDS;LINK_FLAGS;SOURCES;SWIFT_FLAGS)
+  set(multiple_value_options CFLAGS;DEPENDS;LINK_FLAGS;RESOURCES;SOURCES;SWIFT_FLAGS)

   cmake_parse_arguments(AST "${options}" "${single_value_options}" "${multiple_value_options}" ${ARGN})

@@ -24,6 +24,9 @@
   endif()
   if(AST_MODULE_CACHE_PATH)
     list(APPEND flags -module-cache-path;${AST_MODULE_CACHE_PATH})
+  endif()
+  if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
+    list(APPEND flags -g)
   endif()
   if(AST_SWIFT_FLAGS)
     foreach(flag ${AST_SWIFT_FLAGS})
@@ -78,6 +81,7 @@
                          ${doc}
                        DEPENDS
                          ${source}
+                         ${AST_DEPENDS}
                        COMMAND
                          ${CMAKE_SWIFT_COMPILER} -frontend ${flags} -emit-module-path ${mod} -emit-module-doc-path ${doc} -o ${obj} -c ${all_sources})

@@ -100,6 +104,7 @@
                        DEPENDS
                          ${mods}
                          ${docs}
+                         ${AST_DEPENDS}
                        COMMAND
                          ${CMAKE_SWIFT_COMPILER} -frontend ${flags} -sil-merge-partial-modules -emit-module ${mods} -o ${module} -emit-module-doc-path ${documentation})
   endif()
@@ -111,16 +116,35 @@
                        ${AST_OUTPUT}
                      DEPENDS
                        ${objs}
+                       ${AST_DEPENDS}
                      COMMAND
-                       ${CMAKE_SWIFT_COMPILER} ${emit_library} ${link_flags} -o ${AST_OUTPUT} ${objs}
-                     COMMAND
-                       ${CMAKE_COMMAND} -E copy ${AST_OUTPUT} ${CMAKE_CURRENT_BINARY_DIR})
+                       ${CMAKE_SWIFT_COMPILER} ${emit_library} ${link_flags} -o ${AST_OUTPUT} ${objs})
   add_custom_target(${target}
                     ALL
                     DEPENDS
                        ${AST_OUTPUT}
                        ${module}
                        ${documentation})
+
+  if(AST_RESOURCES)
+    add_custom_command(TARGET
+                         ${target}
+                       POST_BUILD
+                       COMMAND
+                         ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${target}
+                       COMMAND
+                         ${CMAKE_COMMAND} -E copy ${AST_OUTPUT} ${CMAKE_CURRENT_BINARY_DIR}/${target}
+                       COMMAND
+                         ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${target}/Resources
+                       COMMAND
+                         ${CMAKE_COMMAND} -E copy ${AST_RESOURCES} ${CMAKE_CURRENT_BINARY_DIR}/${target}/Resources)
+  else()
+    add_custom_command(TARGET
+                         ${target}
+                       POST_BUILD
+                       COMMAND
+                         ${CMAKE_COMMAND} -E copy ${AST_OUTPUT} ${CMAKE_CURRENT_BINARY_DIR})
+  endif()
 endfunction()

 function(add_swift_library library)


Add complete list of simple devices (like ps.c) that require no extra system
resources.

svn path=/trunk/; revision=6806

--- cmake/modules/drivers-init.cmake
+++ cmake/modules/drivers-init.cmake
@@ -67,30 +67,30 @@
 set(DRIVERS_DEVICE_LIST
 #"aqt:aqt:ON"
 #"cgm:cgm:ON"
-#"dg300:dg300:OFF"
+"dg300:dg300:OFF"
 #"png:gd:ON" "jpeg:gd:ON" "gif:gd:ON"
 #"gnome:gnome:OFF"
-#"hp7470:hpgl:ON" "hp7580:hpgl:ON" "lj_hpgl:hpgl:ON"
-#"imp:impress:OFF"
+"hp7470:hpgl:ON" "hp7580:hpgl:ON" "lj_hpgl:hpgl:ON"
+"imp:impress:OFF"
 "gcw:gcw:ON"
 #"linuxvga:linuxvga:ON"
-#"ljii:ljii:OFF"
-#"ljiip:ljiip:OFF"
-#"mem:mem:ON"
+"ljii:ljii:OFF"
+"ljiip:ljiip:OFF"
+"mem:mem:ON"
 #"ntk:ntk:OFF"
-#"null:null:ON"
-#"pbm:pbm:ON"
-#"plmeta:plmeta:ON"
+"null:null:ON"
+"pbm:pbm:ON"
+"plmeta:plmeta:ON"
 "ps:ps:ON"
 #"psttf:psttf:ON"
-#"xterm:tek:OFF" "tek4010:tek:OFF" "tek4107:tek:OFF" "mskermit:tek:OFF"
-#"versaterm:tek:OFF" "vlt:tek:OFF" "conex:tek:OFF" "tek4010f:tek:OFF"
-#"tek4107f:tek:OFF"
+"xterm:tek:OFF" "tek4010:tek:OFF" "tek4107:tek:OFF" "mskermit:tek:OFF"
+"versaterm:tek:OFF" "vlt:tek:OFF" "conex:tek:OFF" "tek4010f:tek:OFF"
+"tek4107f:tek:OFF"
 #"tk:tk:ON"
 #"tkwin:tkwin:ON"
 #"wingcc:wingcc:ON"
 #"wxwidgets:wxwidgets:ON"
-#"xfig:xfig:ON"
+"xfig:xfig:ON"
 "xwin:xwin:ON"
 )


Fix clang issue

Fix clang issue

--- cmake/multiarch_popcnt_bmi.cmake
+++ cmake/multiarch_popcnt_bmi.cmake
@@ -12,7 +12,7 @@
     #if defined(__POPCNT__) && defined(__BMI__)
         Error: multiarch_popcnt_bmi not needed!
     #endif
-    #if defined(__GNUC__)
+    #if defined(__GNUC__) && !defined(__clang__) && !defined(_MSC_VER)
         #if __GNUC__ <= 5
             Error: The linker does not support function multiversioning
                    for shared libraries.


Revert "Remove rsync dependency"

Revert "Remove rsync dependency"

This reverts commit 5b9a19aa65c3e27fe979181ea9817ec7347c4fbf.

--- cmake/nuttx/px4_impl_nuttx.cmake
+++ cmake/nuttx/px4_impl_nuttx.cmake
@@ -213,8 +213,7 @@
 	# copy
 	add_custom_command(OUTPUT nuttx_copy_${CONFIG}.stamp
 		COMMAND ${MKDIR} -p ${CMAKE_BINARY_DIR}/${CONFIG}
-		COMMAND ${CP} -r ${CMAKE_SOURCE_DIR}/NuttX ${nuttx_src}
-		COMMAND ${RM} -rf ${nuttx_src}/.git
+		COMMAND rsync -a --exclude=.git ${CMAKE_SOURCE_DIR}/NuttX/ ${nuttx_src}/
 		COMMAND ${TOUCH} nuttx_copy_${CONFIG}.stamp
 		DEPENDS ${DEPENDS})
 	add_custom_target(__nuttx_copy_${CONFIG}


Add missing ZLIB dependency

Add missing ZLIB dependency

--- cmake/projects/glib/hunter.cmake
+++ cmake/projects/glib/hunter.cmake
@@ -26,7 +26,7 @@
 hunter_cmake_args(
     glib
     CMAKE_ARGS
-    DEPENDS_ON_PACKAGES=libffi;util_linux;libpcre
+    DEPENDS_ON_PACKAGES=libffi;util_linux;libpcre;ZLIB
     DEPENDS_ON_PKGCONFIGS=libffi;blkid;fdisk;mount;smartcols;uuid;libpcre;libpcrecpp;libpcreposix
     PKGCONFIG_EXPORT_TARGETS=glib-2.0
 )


Another bug ...

Another bug ...

--- Numerics/cmake/FindBLAS.cmake
+++ Numerics/cmake/FindBLAS.cmake
@@ -267,26 +267,26 @@
       ""
       "blas"
       "")
-    if(NOT BLAS_LIBRARIES)
-      set(WITH_BLAS "generic" CACHE STRING "Blas implementation type [mkl/openblas/atlas/accelerate/veclib/generic]" FORCE)
-      set(BLAS_HEADERS cblas.h)
-    endif (BLAS_LIBRARIES)
-  endif()
-  ## Generic BLAS library (if cblas not found in blas) ##
-  if((NOT BLAS_LIBRARIES)
-      AND ((NOT WITH_BLAS) OR (WITH_BLAS STREQUAL "generic")))
-    check_blas_libraries(
-      BLAS_LIBRARIES
-      BLAS
-      sgemm
-      ""
-      "f77blas;cblas"
-      "")
-
     if(BLAS_LIBRARIES)
       set(WITH_BLAS "generic" CACHE STRING "Blas implementation type [mkl/openblas/atlas/accelerate/veclib/generic]" FORCE)
       set(BLAS_HEADERS cblas.h)
-    endif (BLAS_LIBRARIES)
+    endif()
+  endif()
+  ## Generic BLAS library (if cblas not found in blas) ##
+  if((NOT BLAS_LIBRARIES)
+      AND ((NOT WITH_BLAS) OR (WITH_BLAS STREQUAL "generic")))
+    check_blas_libraries(
+      BLAS_LIBRARIES
+      BLAS
+      sgemm
+      ""
+      "f77blas;cblas"
+      "")
+
+    if(BLAS_LIBRARIES)
+      set(WITH_BLAS "generic" CACHE STRING "Blas implementation type [mkl/openblas/atlas/accelerate/veclib/generic]" FORCE)
+      set(BLAS_HEADERS cblas.h)
+    endif()
   endif()
   if(BLAS_LIBRARIES)
     set(BLAS_FOUND TRUE)


FIX: ensure to always check for non-portable functions

--- CheckLists.cmake
+++ CheckLists.cmake
@@ -63,7 +63,8 @@
 endmacro(DefineIfSet)

 include(CheckFunctionExists)
-if (UNIX)
-	check_function_exists(strlcpy HAVE_STRLCPY)
-	DefineIfSet(HAVE_STRLCPY)
-endif (UNIX)
+check_function_exists(strlcpy HAVE_STRLCPY)
+DefineIfSet(HAVE_STRLCPY)
+
+check_function_exists(strndup HAVE_STRNDUP)
+DefineIfSet(HAVE_STRNDUP)


ENH: lorensengone from GE.

ENH: lorensengone from GE.

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -38,7 +38,7 @@
 # Continuous email delivery variables
 SET (CONTINUOUS_FROM "lorensen@crd.ge.com")
 SET (SMTP_MAILHOST "public.kitware.com")
-SET (CONTINUOUS_MONITOR_LIST "lorensen@crd.ge.com millerjv@crd.ge.com lorensen@nycap.rr.com")
+SET (CONTINUOUS_MONITOR_LIST "millerjv@crd.ge.com lorensen@nycap.rr.com")
 SET (CONTINUOUS_BASE_URL "http://www.itk.org/Testing")

 MARK_AS_ADVANCED(BUILD_DOXYGEN)


switch to dashboard installation at code.compeng.uni-frankfurt.de

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,8 +1,8 @@
 SET(CTEST_DROP_METHOD "http")
-SET(CTEST_DROP_SITE "fairroot.gsi.de")
-SET(CTEST_DROP_LOCATION "/CDash/submit.php?project=VC")
-SET(CTEST_TRIGGER_SITE "fairroot.gsi.de")
-SET(CTEST_NIGHTLY_START_TIME "23:00:00 UTC")
+SET(CTEST_DROP_SITE "code.compeng.uni-frankfurt.de")
+SET(CTEST_DROP_LOCATION "/dashboard/submit.php?project=Vc")
+SET(CTEST_TRIGGER_SITE "${CTEST_DROP_SITE}")
+SET(CTEST_NIGHTLY_START_TIME "00:00:00 CET")
 SET(CTEST_UPDATE_TYPE "git")

 find_program(GITCOMMAND git)


Do not pull in dependencies for snapshot modules

--- GNUModules.cmake
+++ GNUModules.cmake
@@ -55,14 +55,16 @@
 endif()

 # Load dependend modules if any
-if(${UPPER_PROJECT_NAME}_DEPENDS)
-  foreach(MODULE_DEP ${${UPPER_PROJECT_NAME}_DEPENDS})
-    if(${MODULE_DEP}_MODULE_FILENAME) # comes from PackageConfig.cmake
-      list(INSERT MODULE_ENV 0
-        "module load ${${MODULE_DEP}_MODULE_FILENAME}\\n"
-        "prereq      ${${MODULE_DEP}_MODULE_FILENAME}\\n\\n")
-    endif()
-  endforeach()
+if(NOT MODULE_SNAPSHOT_DIR) # comes from Buildyard
+  if(${UPPER_PROJECT_NAME}_DEPENDS)
+    foreach(MODULE_DEP ${${UPPER_PROJECT_NAME}_DEPENDS})
+      if(${MODULE_DEP}_MODULE_FILENAME) # comes from PackageConfig.cmake
+        list(INSERT MODULE_ENV 0
+          "module load ${${MODULE_DEP}_MODULE_FILENAME}\\n"
+          "prereq      ${${MODULE_DEP}_MODULE_FILENAME}\\n\\n")
+      endif()
+    endforeach()
+  endif()
 endif()

 string(REGEX REPLACE ";" "" MODULE_ENV ${MODULE_ENV})


improvements when building FFTW (mostly Windows)

On Windows:
- run lib to create export libraries
- set FFTW3_CMAKE_ARGS correctly

Other systems:
- correct location of include files in FFTW3_CMAKE_ARGS

--- SuperBuild/External_FFTW3.cmake
+++ SuperBuild/External_FFTW3.cmake
@@ -46,6 +46,10 @@
   endif()

 if (WIN32)
+
+  # we don't bother building it, but copy the files into an FFTW subdir_directory
+  # We then still need to run "lib" to create export libraries (as per the README-WINDOWS from FFTW)
+  # TODO: We should check if we're building with 32bit or 64bit tools, assuming the latter
   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
     URL ${${proj}_URL}
@@ -55,8 +59,16 @@
     BUILD_COMMAND ""
     INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${${proj}_INSTALL_DIR}
         COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR> ${${proj}_INSTALL_DIR}/FFTW
+        COMMAND ${CMAKE_COMMAND} -E chdir ${${proj}_INSTALL_DIR}/FFTW lib /machine:x64 /def:libfftw3f-3.def
+        COMMAND ${CMAKE_COMMAND} -E chdir ${${proj}_INSTALL_DIR}/FFTW lib /machine:x64 /def:libfftw3-3.def
+        COMMAND ${CMAKE_COMMAND} -E chdir ${${proj}_INSTALL_DIR}/FFTW lib /machine:x64 /def:libfftw3l-3.def
   )
-  set( FFTW3_ROOT_DIR ${${proj}_INSTALL_DIR}/FFTW )
+  set( ${proj}_INSTALL_DIR ${${proj}_INSTALL_DIR}/FFTW )
+  set(FFTW3_CMAKE_ARGS
+      -DFFTW3_INCLUDE_DIR:PATH=${${proj}_INSTALL_DIR}/
+	  -DFFTW3F_LIBRARY:FILEPATH=${${proj}_INSTALL_DIR}/libfftw3f-3.lib
+	  -DFFTW3_LIBRARY:FILEPATH=${${proj}_INSTALL_DIR}/libfftw3-3.lib
+	  )
 else()
   #set(FFTW_SOURCE_DIR ${SOURCE_DOWNLOAD_CACHE}/${proj} )

@@ -73,7 +85,7 @@
   # let's hope for the best
   # ideally we would also set DFFTW3_LIBRARIES but that's hard and system dependent
   set(FFTW3_CMAKE_ARGS
-      -DFFTW3_INCLUDE_DIR:PATH=${FFTW_Install_Dir}/include
+      -DFFTW3_INCLUDE_DIR:PATH=${${proj}_INSTALL_DIR}/include
   )

 endif()


Ensure DCMTK libraries can be found on system without setting DCMTK_DIR

See inlined comment for more details.

See #382

--- Utilities/CMake/FindDCMTK.cmake
+++ Utilities/CMake/FindDCMTK.cmake
@@ -9,7 +9,7 @@
 # DCMTK_DIR can be used to make it simpler to find the various include
 # directories and compiled libraries if you've just compiled it in the
 # source tree. Just set it to the root of the tree where you extracted
-# the source (default to /usr/include/dcmtk/)
+# the source (default to /usr)
 #
 #
 # This file is able to find version of DCMTK that do or do not export
@@ -114,6 +114,17 @@
 # Upgraded for GDCM by Mathieu Malaterre.
 # Modified for EasyViz by Thomas Sondergaard.
 #
+
+set(_dcmtk_dir_description "The directory of DCMTK build or install tree.")
+
+# Ensure that DCMTK_DIR is set to a reasonable default value
+# so that DCMTK libraries can be found on a standard Unix distribution.
+# It also overwrite the value of DCMTK_DIR after this one has been
+# set by a successful discovery of DCMTK by the unpatched FindDCMTK.cmake module
+# distributed with CMake (as of 0167cea)
+if(NOT DCMTK_DIR OR DCMTK_DIR STREQUAL "/usr/include/dcmtk")
+  set(DCMTK_DIR "/usr" CACHE PATH ${_dcmtk_dir_description} FORCE)
+endif()

 set(_SAVED_DCMTK_DIR ${DCMTK_DIR})

@@ -134,7 +145,7 @@
 message(STATUS "Trying to find DCMTK relying on FindDCMTK.cmake")

 # Restore the value reset by the previous call to 'find_package(DCMTK QUIET NO_MODULE)'
-set(DCMTK_DIR ${_SAVED_DCMTK_DIR} CACHE PATH "The directory containing a CMake configuration file for DCMTK." FORCE)
+set(DCMTK_DIR ${_SAVED_DCMTK_DIR} CACHE PATH ${_dcmtk_dir_description} FORCE)

 #


COMP: fix windows build when linking dcmtk

--- Utilities/CMake/FindDCMTK.cmake
+++ Utilities/CMake/FindDCMTK.cmake
@@ -68,6 +68,15 @@
   ${DCMTK_DIR}/lib
 )

+FIND_LIBRARY( DCMTK_oflog_LIBRARY oflog
+  ${DCMTK_DIR}/oflog/libsrc
+  ${DCMTK_DIR}/oflog/libsrc/Release
+  ${DCMTK_DIR}/oflog/libsrc/Debug
+  ${DCMTK_DIR}/oflog/Release
+  ${DCMTK_DIR}/oflog/Debug
+  ${DCMTK_DIR}/lib
+)
+
 FIND_PATH( DCMTK_dcmdata_INCLUDE_DIR dctypes.h
   ${DCMTK_DIR}/include/dcmdata
   ${DCMTK_DIR}/include/dcmtk/dcmdata
@@ -116,6 +125,7 @@
 IF( DCMTK_config_INCLUDE_DIR
     AND DCMTK_ofstd_INCLUDE_DIR
     AND DCMTK_ofstd_LIBRARY
+    AND DCMTK_oflog_LIBRARY
     AND DCMTK_dcmdata_INCLUDE_DIR
     AND DCMTK_dcmdata_LIBRARY
     AND DCMTK_dcmimgle_INCLUDE_DIR
@@ -133,6 +143,7 @@

   SET( DCMTK_FOUND "YES" )
   SET( DCMTK_INCLUDE_DIR
+    ${DCMTK_DIR}/include
     ${DCMTK_config_INCLUDE_DIR}
     ${DCMTK_ofstd_INCLUDE_DIR}
     ${DCMTK_dcmdata_INCLUDE_DIR}
@@ -143,6 +154,7 @@
     ${DCMTK_dcmimgle_LIBRARY}
     ${DCMTK_dcmdata_LIBRARY}
     ${DCMTK_ofstd_LIBRARY}
+    ${DCMTK_oflog_LIBRARY}
     ${DCMTK_config_LIBRARY}
   )

@@ -161,7 +173,7 @@
   ENDIF(DCMTK_dcmnet_LIBRARY)

   IF( WIN32 )
-    SET( DCMTK_LIBRARIES ${DCMTK_LIBRARIES} netapi32 )
+    SET( DCMTK_LIBRARIES ${DCMTK_LIBRARIES} ws2_32 netapi32 wsock32)
   ENDIF( WIN32 )

 #   IF (NOT WIN32)
@@ -171,6 +183,7 @@
 ENDIF( DCMTK_config_INCLUDE_DIR
     AND DCMTK_ofstd_INCLUDE_DIR
     AND DCMTK_ofstd_LIBRARY
+    AND DCMTK_oflog_LIBRARY
     AND DCMTK_dcmdata_INCLUDE_DIR
     AND DCMTK_dcmdata_LIBRARY
     AND DCMTK_dcmimgle_INCLUDE_DIR
@@ -201,5 +214,6 @@
   DCMTK_dcmnet_LIBRARY
   DCMTK_ofstd_INCLUDE_DIR
   DCMTK_ofstd_LIBRARY
-  )
-
+  DCMTK_oflog_LIBRARY
+  )
+


Allow FindDCMTK.cmake to be re-used directly adding missing module.

Usage of 'find_package_handle_standard_args' was initially introduced
by commit 52d9539f5e7.

For more details about the issue, see http://forum.dcmtk.org/viewtopic.php?f=1&t=3906&p=15599#p15599

See #431

--- Utilities/CMake/FindDCMTK.cmake
+++ Utilities/CMake/FindDCMTK.cmake
@@ -323,6 +323,7 @@
 # Compatibility: This variable is deprecated
 set(DCMTK_INCLUDE_DIR ${DCMTK_INCLUDE_DIRS})

+include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(DCMTK
   REQUIRED_VARS ${DCMTK_INCLUDE_DIR_NAMES} DCMTK_LIBRARIES
   FAIL_MESSAGE "Please set DCMTK_DIR and re-run configure")


Update ITK superbuild version to 5.2rc02

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

-set(_DEFAULT_ITK_GIT_TAG "3c399efa316ce7c38cd253a350383efbf118eb15")
+set(_DEFAULT_ITK_GIT_TAG "v5.2rc02")
 set(ITK_GIT_TAG "${_DEFAULT_ITK_GIT_TAG}" CACHE STRING "Tag in ITK git repo")
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")


STYLE: Add required packages to the External project Qt5

--- SuperBuild/External_Qt5.cmake
+++ SuperBuild/External_Qt5.cmake
@@ -41,6 +41,8 @@
 # project may depend on ${extProjName}, let's add an 'empty' one
 SlicerMacroEmptyExternalProject(${proj} "${${proj}_DEPENDENCIES}")

+find_package(Qt5 COMPONENTS Core Widgets Svg OpenGL REQUIRED)
+
 list(APPEND ${CMAKE_PROJECT_NAME}_SUPERBUILD_EP_VARS
     QT_QMAKE_EXECUTABLE:PATH
     QT_MOC_EXECUTABLE:PATH


generate_git_info_header always has to be called with explicit args

--- modules/git_info/git_info.cmake
+++ modules/git_info/git_info.cmake
@@ -13,18 +13,9 @@

 get_filename_component(_current_dir ${CMAKE_CURRENT_LIST_FILE} PATH)

-function(generate_git_info_header)
+function(generate_git_info_header _header_location _header_name)
   # _header_location: where the Git info header file should be generated
   # _header_name: the Git info header name, complete with extension (.h, .hpp, .hxx or whatever)
-  if(${ARGC} EQUAL 2)
-    set(_header_location ${ARGV0})
-    set(_header_name     ${ARGV1})
-  elseif(${ARGC} EQUAL 0)
-    set(_header_location ${PROJECT_BINARY_DIR})
-    set(_header_name git_info.h)
-  else()
-    message(FATAL_ERROR "generate_git_info_header function accepts either two or no arguments")
-  endif()
   find_package(Git)

   set(_git_last_commit_hash "unknown")


Andoid build fixed

Andoid build fixed

--- android/android.toolchain.cmake
+++ android/android.toolchain.cmake
@@ -320,13 +320,12 @@
 if( BUILD_WITH_ANDROID_NDK )
  set( CMAKE_CXX_FLAGS "--sysroot=\"${ANDROID_NDK_SYSROOT}\" ${CMAKE_CXX_FLAGS}" )
  set( CMAKE_C_FLAGS "--sysroot=\"${ANDROID_NDK_SYSROOT}\" ${CMAKE_C_FLAGS}" )
- if (WIN32 OR ANDROID_NDK_SYSROOT MATCHES "[ ]")
-  # workaround for ugly cmake bug - compiler identification replaces all spaces (and somethimes " !!!) in compiler flags with ; symbol
-  # as result identification fails if ANDROID_NDK_SYSROOT contain spaces
-  include(CMakeForceCompiler)
-  CMAKE_FORCE_C_COMPILER("${CMAKE_C_COMPILER}" GNU)
-  CMAKE_FORCE_CXX_COMPILER("${CMAKE_CXX_COMPILER}" GNU)
- endif()
+
+ # workaround for ugly cmake bug - compiler identification replaces all spaces (and somethimes " !!!) in compiler flags with ; symbol
+ # as result identification fails if ANDROID_NDK_SYSROOT contain spaces
+ include(CMakeForceCompiler)
+ CMAKE_FORCE_C_COMPILER("${CMAKE_C_COMPILER}" GNU)
+ CMAKE_FORCE_CXX_COMPILER("${CMAKE_CXX_COMPILER}" GNU)
 endif()

 if( ARMEABI_V7A )


Fix executable and C objects linking

Fix executable and C objects linking

--- android/android.toolchain.cmake
+++ android/android.toolchain.cmake
@@ -989,13 +989,23 @@
 if( EXISTS "${__libstl}" OR EXISTS "${__libsupcxx}" )
  set( CMAKE_CXX_CREATE_SHARED_LIBRARY "<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
  set( CMAKE_CXX_CREATE_SHARED_MODULE  "<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+ set( CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER>  <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS>  -o <TARGET> <LINK_LIBRARIES>" )
  if( EXISTS "${__libstl}" )
   set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} \"${__libstl}\"")
   set( CMAKE_CXX_CREATE_SHARED_MODULE  "${CMAKE_CXX_CREATE_SHARED_MODULE} \"${__libstl}\"")
+  set( CMAKE_CXX_LINK_EXECUTABLE  "${CMAKE_CXX_LINK_EXECUTABLE} \"${__libstl}\"")
  endif()
  if( EXISTS "${__libsupcxx}" )
   set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} \"${__libsupcxx}\"")
   set( CMAKE_CXX_CREATE_SHARED_MODULE  "${CMAKE_CXX_CREATE_SHARED_MODULE} \"${__libsupcxx}\"")
+  set( CMAKE_CXX_LINK_EXECUTABLE  "${CMAKE_CXX_LINK_EXECUTABLE} \"${__libsupcxx}\"")
+  # C objects:
+  set( CMAKE_C_CREATE_SHARED_LIBRARY = "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" )
+  set( CMAKE_C_CREATE_SHARED_MODULE = "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" )
+  set( CMAKE_C_LINK_EXECUTABLE = "<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS>  -o <TARGET> <LINK_LIBRARIES>" )
+  set( CMAKE_C_CREATE_SHARED_LIBRARY "${CMAKE_C_CREATE_SHARED_LIBRARY} \"${__libsupcxx}\"")
+  set( CMAKE_C_CREATE_SHARED_MODULE  "${CMAKE_C_CREATE_SHARED_MODULE} \"${__libsupcxx}\"")
+  set( CMAKE_C_LINK_EXECUTABLE  "${CMAKE_C_LINK_EXECUTABLE} \"${__libsupcxx}\"")
  endif()
 endif()


Cortex X1 is only Arm8.2

Cortex X1 is only Arm8.2

--- cmake/cc.cmake
+++ cmake/cc.cmake
@@ -175,7 +175,7 @@

 if (${CORE} STREQUAL CORTEXX1)
   if (NOT DYNAMIC_ARCH)
-    set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8-a+sve")
+    set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a")
   endif ()
 endif ()


[LLPC] Update to c++17 as per new llvm requirements (#1956)

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -33,7 +33,7 @@
         target_compile_options("${PROJECT_NAME}" PRIVATE $<$<COMPILE_LANGUAGE:CXX>:
             -fno-rtti
             -fPIC
-            -std=c++14
+            -std=c++17
             -Wno-ignored-qualifiers
             -Wno-missing-field-initializers
             -Wno-invalid-offsetof           # offsetof within non-standard-layout type 'x' is undefined


enabled no-mpi for wdm

enabled no-mpi for wdm

--- cmake/DetectOptions.cmake
+++ cmake/DetectOptions.cmake
@@ -102,7 +102,7 @@
 # WDM
 # WDM currently breaks the PGI compiler
 if(NOT (CMAKE_CXX_COMPILER_ID STREQUAL "PGI") AND NOT MSVC)
-    if(ZeroMQ_FOUND AND MPI_FOUND)
+    if(ZeroMQ_FOUND)
         if(ADIOS2_USE_WDM STREQUAL AUTO)
             set(ADIOS2_HAVE_WDM TRUE)
         elseif(ADIOS2_USE_WDM)


Fix spurrious formatting issues

Fix spurrious formatting issues

--- cmake/DetectOptions.cmake
+++ cmake/DetectOptions.cmake
@@ -115,12 +115,12 @@
 if(ADIOS2_USE_SysVShMem STREQUAL AUTO)
   if(UNIX)
     include(CheckSymbolExists)
-	CHECK_SYMBOL_EXISTS(shmget "sys/ipc.h;sys/shm.h" HAVE_shmget)
-	if(HAVE_shmget)
-	  set(ADIOS2_HAVE_SysVShMem ON)
-	else()
-	  set(ADIOS2_HAVE_SysVShMem OFF)
-	endif()
+    CHECK_SYMBOL_EXISTS(shmget "sys/ipc.h;sys/shm.h" HAVE_shmget)
+    if(HAVE_shmget)
+      set(ADIOS2_HAVE_SysVShMem ON)
+    else()
+      set(ADIOS2_HAVE_SysVShMem OFF)
+    endif()
   else()
     set(ADIOS2_HAVE_SysVShMem OFF)
   endif()


set GSTREAMER_VERSION

set GSTREAMER_VERSION

--- cmake/FindGStreamer.cmake
+++ cmake/FindGStreamer.cmake
@@ -5,6 +5,7 @@
 #  GSTREAMER_INCLUDE_DIR - the GStreamer include directory
 #  GSTREAMER_LIBRARIES - the libraries needed to use GStreamer
 #  GSTREAMER_DEFINITIONS - Compiler switches required for using GStreamer
+#  GSTREAMER_VERSION - the version of GStreamer

 # Copyright (c) 2008 Helio Chissini de Castro, <helio@kde.org>
 #  (c)2006, Tim Beaulen <tbscope@gmail.com>
@@ -25,6 +26,7 @@
    # in the FIND_PATH() and FIND_LIBRARY() calls
    # don't make this check required - otherwise you can't use macro_optional_find_package on this one
    PKG_CHECK_MODULES(PKG_GSTREAMER gstreamer-0.10)
+   SET(GSTREAMER_VERSION ${PKG_GSTREAMER_VERSION})
    SET(GSTREAMER_DEFINITIONS ${PKG_GSTREAMER_CFLAGS})
 ENDIF (NOT WIN32)


output which file we strive to read

output which file we strive to read

--- cmake/InstallMacros.cmake
+++ cmake/InstallMacros.cmake
@@ -11,6 +11,7 @@

 # Global macros ----------------------------------------------------------------
 macro (generate_root_config name)
+  message(INFO "reading configuration file ${PROJECT_SOURCE_DIR}/etc/arangodb3/${name}.conf.in")
   FILE(READ ${PROJECT_SOURCE_DIR}/etc/arangodb3/${name}.conf.in FileContent)

   STRING(REPLACE "@PKGDATADIR@" "@ROOTDIR@/${CMAKE_INSTALL_DATAROOTDIR_ARANGO}"


fix doc of qi_add_bin_sdk

fix doc of qi_add_bin_sdk

Change-Id: I41aed3369dd8a0c96b8ce13b158834d53c14e36d
Reviewed-on: http://gerrit.aldebaran.lan/67051
Tested-by: gerrit
Reviewed-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>

--- cmake/qibuild/stage.cmake
+++ cmake/qibuild/stage.cmake
@@ -307,7 +307,8 @@
 #       foo.h
 #   share
 #     cmake
-#       foo-config.cmake
+#       foo
+#         foo-config.cmake
 #
 # \arg:path: the path to the pre-compiled SDK
 function(qi_add_bin_sdk path)


* See previous commit

* See previous commit

--- cmake/setup_configs.cmake
+++ cmake/setup_configs.cmake
@@ -7,9 +7,9 @@
 function(configure_vulkan target)
 	target_compile_definitions(${target} PUBLIC -DTZ_VULKAN=1 -DTZ_OGL=0)

-	message(STATUS "configure_vulkan(${target}): $VK_SDK_PATH == $ENV{VK_SDK_PATH}")
-	target_link_directories(${target} PUBLIC "$ENV{VK_SDK_PATH}/Lib")
-	target_include_directories(${target} PUBLIC "$ENV{VK_SDK_PATH}/include")
+	message(STATUS "configure_vulkan(${target}): $VULKAN_SDK == $ENV{VULKAN_SDK}")
+	target_link_directories(${target} PUBLIC "$ENV{VULKAN_SDK}/Lib")
+	target_include_directories(${target} PUBLIC "$ENV{VULKAN_SDK}/include")
 	target_link_libraries(${target} PUBLIC vulkan-1 vma)
 endfunction()

@@ -31,4 +31,4 @@
 	target_compile_definitions(${target} PUBLIC -DTZ_DEBUG=0 -DTZ_PROFILE=1 -DTRACY_ENABLE)
 	target_compile_options(${target} PRIVATE -O3)
 	target_link_libraries(${target} PUBLIC TracyClient)
-endfunction()+endfunction()


build: turn off FLB_RECORD_ACCESSOR if bison/flex unavailable

Without this, cmake emits an error while initialization, due to
bison/flex required by record-accessor but not available.

> This is a build time dependency, you can either install the dependencies or
> disable the feature setting the CMake option -DFLB_RECORD_ACCESSOR=Off .

Signed-off-by: Fujimoto Seiji <ef879192bb1e41d519c82cf76440dc8e9a530806@clear-code.com>

--- cmake/windows-setup.cmake
+++ cmake/windows-setup.cmake
@@ -86,5 +86,6 @@
   if (NOT (${FLEX_FOUND} AND ${BISON_FOUND}))
     message(STATUS "flex and bison not found. Disable stream_processor building.")
     set(FLB_STREAM_PROCESSOR No)
+    set(FLB_RECORD_ACCESSOR  No)
   endif()
 endif()


Removed depricated warning from asio regarding coroutines.h

--- cmake_scripts/boost.cmake
+++ cmake_scripts/boost.cmake
@@ -24,6 +24,7 @@
     if (EXISTS ${BOOST_ROOT}/boost/type_index.hpp)
         set(RESTC_CPP_HAVE_BOOST_TYPEINDEX 1)
     endif()
+

     set(Boost_USE_STATIC_LIBS ON)
     set(Boost_USE_MULTITHREADED ON)
@@ -69,6 +70,9 @@
     CHECK_INCLUDE_FILES(${Boost_INCLUDE_DIRS}/boost/type_index.hpp RESTC_CPP_HAVE_BOOST_TYPEINDEX)
 endif()

+# Asio trigger deprecation warnings
+add_definitions(-DBOOST_COROUTINE_NO_DEPRECATION_WARNING=1)
+
 if (UNIX)
     set (DEFAULT_LIBRARIES
         ${DEFAULT_LIBRARIES}


added BUILD_NiftyReg option

added BUILD_NiftyReg option

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -133,6 +133,7 @@
 option(BUILD_GADGETRON "Build Gadgetron" ${build_Gadgetron_default})
 option(BUILD_siemens_to_ismrmrd "Build siemens_to_ismrmrd" OFF)
 option(BUILD_petmr_rd_tools "Build petmr_rd_tools" OFF)
+option(BUILD_NiftyReg "Build NiftyReg" OFF)

 if (BUILD_petmr_rd_tools)
     set(USE_ITK ON CACHE BOOL "Use ITK" FORCE)
@@ -159,6 +160,10 @@

 if (BUILD_petmr_rd_tools)
   list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES petmr_rd_tools)
+endif()
+
+if (BUILD_NiftyReg)
+  list(APPEND ${PRIMARY_PROJECT_NAME}_DEPENDENCIES NiftyReg)
 endif()

 ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${PRIMARY_PROJECT_NAME}_DEPENDENCIES)