cmake: kconfig: Run Kconfig on every reconfiguration

Kconfiglib does not support merging fragments without parsing the
entire Kconfig "database". For Zephyr this means we no longer get a
performance gain from splitting up the fragment-merging and the
.config generation.

This patch removes the seperated merge step and it's associated
caching mechanism. Now we do a full Kconfig execution on every
reconfiguration.

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

--- cmake/kconfig.cmake
+++ cmake/kconfig.cmake
@@ -87,63 +87,28 @@
   endif()
 endforeach()

-# Calculate a checksum of merge_config_files to determine if we need
-# to re-generate .config
-set(merge_config_files_checksum "")
-foreach(f ${merge_config_files_with_absolute_paths})
-  file(MD5 ${f} checksum)
-  set(merge_config_files_checksum "${merge_config_files_checksum}${checksum}")
-endforeach()
-
-# Create a new .config if it does not exists, or if the checksum of
-# the dependencies has changed
-set(merge_config_files_checksum_file ${PROJECT_BINARY_DIR}/.cmake.dotconfig.checksum)
-set(CREATE_NEW_DOTCONFIG "")
-if(NOT EXISTS ${DOTCONFIG})
-  set(CREATE_NEW_DOTCONFIG 1)
-else()
-  # Read out what the checksum was previously
-  file(READ
-    ${merge_config_files_checksum_file}
-    merge_config_files_checksum_prev
-    )
-  set(CREATE_NEW_DOTCONFIG 1)
-  if(
-      ${merge_config_files_checksum} STREQUAL
-      ${merge_config_files_checksum_prev}
-      )
-    set(CREATE_NEW_DOTCONFIG 0)
-  endif()
-endif()
-if(CREATE_NEW_DOTCONFIG)
-  execute_process(
-    COMMAND
-    ${PYTHON_EXECUTABLE}
-    ${PROJECT_SOURCE_DIR}/scripts/kconfig/kconfig.py
-    ${KCONFIG_ROOT}
-    ${PROJECT_BINARY_DIR}/.config
-    ${PROJECT_BINARY_DIR}/include/generated/autoconf.h
-    ${merge_config_files}
-    WORKING_DIRECTORY ${APPLICATION_SOURCE_DIR}
-    # The working directory is set to the app dir such that the user
-    # can use relative paths in CONF_FILE, e.g. CONF_FILE=nrf5.conf
-    RESULT_VARIABLE ret
-  )
-  if(NOT "${ret}" STREQUAL "0")
-    message(FATAL_ERROR "command failed with return code: ${ret}")
-  endif()
-
-  file(WRITE
-    ${merge_config_files_checksum_file}
-    ${merge_config_files_checksum}
-    )
-endif()
-
 # Force CMAKE configure when the configuration files changes.
 foreach(merge_config_input ${merge_config_files} ${DOTCONFIG})
   set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${merge_config_input})
 endforeach()

+execute_process(
+  COMMAND
+  ${PYTHON_EXECUTABLE}
+  ${PROJECT_SOURCE_DIR}/scripts/kconfig/kconfig.py
+  ${KCONFIG_ROOT}
+  ${PROJECT_BINARY_DIR}/.config
+  ${PROJECT_BINARY_DIR}/include/generated/autoconf.h
+  ${merge_config_files}
+  WORKING_DIRECTORY ${APPLICATION_SOURCE_DIR}
+  # The working directory is set to the app dir such that the user
+  # can use relative paths in CONF_FILE, e.g. CONF_FILE=nrf5.conf
+  RESULT_VARIABLE ret
+  )
+if(NOT "${ret}" STREQUAL "0")
+  message(FATAL_ERROR "command failed with return code: ${ret}")
+endif()
+
 add_custom_target(config-sanitycheck DEPENDS ${DOTCONFIG})

 # Parse the lines prefixed with CONFIG_ in the .config file from Kconfig


cmake: print version to stdout, not stderr

The version message from cmake is not an error and should not go to
stderr.

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

--- cmake/version.cmake
+++ cmake/version.cmake
@@ -54,7 +54,7 @@
   set(PROJECT_VERSION ${PROJECT_VERSION_WITHOUT_TWEAK})
 endif()

-message("Zephyr version: ${PROJECT_VERSION}")
+message(STATUS "Zephyr version: ${PROJECT_VERSION}")

 set(MAJOR ${PROJECT_VERSION_MAJOR}) # Temporary convenience variable
 set(MINOR ${PROJECT_VERSION_MINOR}) # Temporary convenience variable


updates to .gitlab-ci.yml

updates to .gitlab-ci.yml

--- scripts/test.cmake
+++ scripts/test.cmake
@@ -142,4 +142,5 @@
 #IF (NOT CTEST_SKIP_TESTING)
 #  ctest_test()
 #ENDIF()
+
 ctest_submit()


Updated listed email address (issue #565).

git-svn-id: 4d207786bcfdcf18f314dcbc6ac3fbe5f8a98c88@441 ac7aa084-b6da-11df-bf42-7fac39f0224f

--- Tudat/External/CMake/FindSpice.cmake
+++ Tudat/External/CMake/FindSpice.cmake
@@ -6,7 +6,7 @@
 # Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
 # Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
 # Copyright (c) 2012 Bryan Tong Minh <b.tongminh@student.tudelft.nl>
-# Copyright (c) 2012 Paul Musegaas <p.musegaas@gmail.com>
+# Copyright (c) 2012 Paul Musegaas <p.musegaas@student.tudelft.nl>
 # Copyright (c) 2012 Dominic Dirkx <d.dirkx@tudelft.nl>
 # Redistribution and use is allowed according to the terms of the 2-clause BSD license.


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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


The internal FindPythonLibs.cmake is actually not used anymore. I'm not sure when that happened, but there is certainly no longer a need for this file.

git-svn-id: 9be72bd8b79bf6944680671de68cae08993c9086@1589 fa922fa7-2fde-0310-acd8-f43f465a7996

--- src/CMake/python/FindPythonLibs.cmake
+++ src/CMake/python/FindPythonLibs.cmake
@@ -1,140 +0,0 @@
-# - Find python libraries
-# This module finds if Python is installed and determines where the
-# include files and libraries are. It also determines what the name of
-# the library is. This code sets the following variables:
-#
-#  PYTHON_LIBRARIES     = path to the python library
-#  PYTHON_INCLUDE_PATH  = path to where Python.h is found
-#  PYTHON_DEBUG_LIBRARIES = path to the debug library
-#
-
-INCLUDE(CMakeFindFrameworks)
-
-IF(WIN32)
-  FIND_LIBRARY(PYTHON_DEBUG_LIBRARY
-    NAMES python25_d python24_d python23_d python22_d python21_d python20_d python
-    PATHS
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]\\libs\\Debug
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]\\libs
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]/libs/Debug
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]/libs
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]/libs/Debug
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]/libs
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.2\\InstallPath]/libs/Debug
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.2\\InstallPath]/libs
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath]/libs/Debug
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath]/libs
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]/libs/Debug
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]/libs
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.6\\InstallPath]/libs/Debug
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.6\\InstallPath]/libs
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.5\\InstallPath]/libs/Debug
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.5\\InstallPath]/libs
-  )
-ENDIF(WIN32)
-
-FIND_LIBRARY(PYTHON_LIBRARY
-  NAMES python25 python2.5
-        python24 python2.4
-        python23 python2.3
-        python22 python2.2
-        python21 python2.1
-        python20 python2.0
-        python16 python1.6
-        python15 python1.5
-
-  PATHS
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]/libs
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]/libs
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]/libs
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.2\\InstallPath]/libs
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath]/libs
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]/libs
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.6\\InstallPath]/libs
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.5\\InstallPath]/libs
-
-  PATH_SUFFIXES
-    ""
-    python2.5/config
-    python2.4/config
-    python2.3/config
-    python2.2/config
-    python2.1/config
-    python2.0/config
-    python1.6/config
-    python1.5/config
-
-  # Avoid finding the .dll in the PATH.  We want the .lib.
-  NO_SYSTEM_ENVIRONMENT_PATH
-)
-
-# Search for the python framework on Apple.
-CMAKE_FIND_FRAMEWORKS(Python)
-SET(PYTHON_FRAMEWORK_INCLUDES)
-IF(Python_FRAMEWORKS)
-  IF(NOT PYTHON_INCLUDE_PATH)
-    FOREACH(version 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
-      FOREACH(dir ${Python_FRAMEWORKS})
-        SET(PYTHON_FRAMEWORK_INCLUDES ${PYTHON_FRAMEWORK_INCLUDES}
-          ${dir}/Versions/${version}/include/python${version})
-      ENDFOREACH(dir)
-    ENDFOREACH(version)
-  ENDIF(NOT PYTHON_INCLUDE_PATH)
-ENDIF(Python_FRAMEWORKS)
-
-FIND_PATH(PYTHON_INCLUDE_PATH
-  NAMES Python.h
-
-  PATHS
-    ${PYTHON_FRAMEWORK_INCLUDES}
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]/include
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]/include
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]/include
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.2\\InstallPath]/include
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath]/include
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]/include
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.6\\InstallPath]/include
-    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.5\\InstallPath]/include
-
-  PATH_SUFFIXES
-    ""
-    python2.5
-    python2.4
-    python2.3
-    python2.2
-    python2.1
-    python2.0
-    python1.6
-    python1.5
-)
-
-IF (WIN32)
-  MARK_AS_ADVANCED(
-    PYTHON_DEBUG_LIBRARY
-    PYTHON_LIBRARY
-    PYTHON_INCLUDE_PATH
-  )
-ENDIF(WIN32)
-
-# Python Should be built and installed as a Framework on OSX
-IF(Python_FRAMEWORKS)
-  # If a framework has been selected for the include path,
-  # make sure "-framework" is used to link it.
-  IF("${PYTHON_INCLUDE_PATH}" MATCHES "Python\\.framework")
-    SET(PYTHON_LIBRARY "")
-    SET(PYTHON_DEBUG_LIBRARY "")
-  ENDIF("${PYTHON_INCLUDE_PATH}" MATCHES "Python\\.framework")
-  IF(NOT PYTHON_LIBRARY)
-    SET (PYTHON_LIBRARY "-framework Python" CACHE FILEPATH "Python Framework" FORCE)
-  ENDIF(NOT PYTHON_LIBRARY)
-  IF(NOT PYTHON_DEBUG_LIBRARY)
-    SET (PYTHON_DEBUG_LIBRARY "-framework Python" CACHE FILEPATH "Python Framework" FORCE)
-  ENDIF(NOT PYTHON_DEBUG_LIBRARY)
-ENDIF(Python_FRAMEWORKS)
-
-# We use PYTHON_LIBRARY and PYTHON_DEBUG_LIBRARY for the cache entries
-# because they are meant to specify the location of a single library.
-# We now set the variables listed by the documentation for this
-# module.
-SET(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
-SET(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")


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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


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

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


ENH: use an empty target

ENH: use an empty target

--- SuperBuild/CMake/External_fftw.cmake
+++ SuperBuild/CMake/External_fftw.cmake
@@ -21,6 +21,7 @@
   if(MSVC)
     # TODO : get precompiled binaries as not all MSVC versions can compile FFTW
       message(STATUS "  FFTW SuperBuild is not available yet...")
+      add_custom_target(${proj})
   else()
     message(STATUS "  Using FFTW SuperBuild version")
     # Compile the float version of FFTW


SuperBuild: upgrade GDAL to 2.1.0

SuperBuild: upgrade GDAL to 2.1.0

removed unused find_package(GDAL) in USE_SYSTEM_GDAL loop.
better if guard using cmake return().
handle configure, build, install command for win and unix.
deactivate gdal drivers not built by SuperBuild.
use SUPERBUILD_PATCH_SOURCE macro to avoid copy of change files

--- SuperBuild/CMake/External_gdal.cmake
+++ SuperBuild/CMake/External_gdal.cmake
@@ -1,108 +1,144 @@
-if(NOT __EXTERNAL_GDAL__)
-set(__EXTERNAL_GDAL__ 1)
+if( __EXTERNAL_GDAL__)
+  return()
+else()
+  set(__EXTERNAL_GDAL__ 1)
+endif()

 if(USE_SYSTEM_GDAL)
-  find_package ( GDAL )
   message(STATUS "  Using GDAL system version")
-else()
-  SETUP_SUPERBUILD(PROJECT GDAL)
-  message(STATUS "  Using GDAL SuperBuild version")
+  return()
+endif()

-  # declare dependencies
-  ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(GDAL TIFF CURL GEOTIFF PNG JPEG OPENJPEG SQLITE GEOS ZLIB EXPAT)
+SETUP_SUPERBUILD(PROJECT GDAL)

-  ADD_SUPERBUILD_CONFIGURE_VAR(GDAL TIFF_ROOT     --with-libtiff)
-  ADD_SUPERBUILD_CONFIGURE_VAR(GDAL GEOTIFF_ROOT  --with-geotiff)
-  ADD_SUPERBUILD_CONFIGURE_VAR(GDAL PNG_ROOT      --with-png)
-  ADD_SUPERBUILD_CONFIGURE_VAR(GDAL JPEG_ROOT     --with-jpeg)
-  ADD_SUPERBUILD_CONFIGURE_VAR(GDAL OPENJPEG_ROOT --with-openjpeg)
-  ADD_SUPERBUILD_CONFIGURE_VAR(GDAL SQLITE_ROOT   --with-sqlite3)
-  ADD_SUPERBUILD_CONFIGURE_VAR(GDAL ZLIB_ROOT     --with-libz)
-  ADD_SUPERBUILD_CONFIGURE_VAR(GDAL EXPAT_ROOT    --with-expat)
-  ADD_SUPERBUILD_CONFIGURE_VAR(GDAL CURL_ROOT     --with-curl "/bin/curl-config")
-  ADD_SUPERBUILD_CONFIGURE_VAR(GDAL GEOS_ROOT     --with-geos "/bin/geos-config")
+message(STATUS "  Using GDAL SuperBuild version")

-  if(UNIX)
-    set(GDAL_SB_EXTRA_OPTIONS "" CACHE STRING "Extra options to be passed to GDAL configure script")
-    mark_as_advanced(GDAL_SB_EXTRA_OPTIONS)
-    #Convert GDAL_SB_EXTRA_OPTIONS to a list to allow to add multiple instructions to the CONFIGURE_COMMAND
-    separate_arguments(GDAL_SB_EXTRA_OPTIONS)
+# declare dependencies
+ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(GDAL TIFF CURL GEOTIFF PNG JPEG OPENJPEG SQLITE GEOS ZLIB EXPAT)

-    #we dont do any framework build on osx. So let's be sure on case of gdal
-    if(APPLE)
-      list(APPEND GDAL_SB_CONFIG "--with-macosx-framework=no")
-    endif()
+ADD_SUPERBUILD_CONFIGURE_VAR(GDAL TIFF_ROOT     --with-libtiff)
+ADD_SUPERBUILD_CONFIGURE_VAR(GDAL GEOTIFF_ROOT  --with-geotiff)
+ADD_SUPERBUILD_CONFIGURE_VAR(GDAL PNG_ROOT      --with-png)
+ADD_SUPERBUILD_CONFIGURE_VAR(GDAL JPEG_ROOT     --with-jpeg)
+ADD_SUPERBUILD_CONFIGURE_VAR(GDAL OPENJPEG_ROOT --with-openjpeg)
+ADD_SUPERBUILD_CONFIGURE_VAR(GDAL SQLITE_ROOT   --with-sqlite3)
+ADD_SUPERBUILD_CONFIGURE_VAR(GDAL ZLIB_ROOT     --with-libz)
+ADD_SUPERBUILD_CONFIGURE_VAR(GDAL EXPAT_ROOT    --with-expat)
+ADD_SUPERBUILD_CONFIGURE_VAR(GDAL CURL_ROOT     --with-curl "/bin/curl-config")
+ADD_SUPERBUILD_CONFIGURE_VAR(GDAL GEOS_ROOT     --with-geos "/bin/geos-config")

-    ExternalProject_Add(GDAL
-      PREFIX GDAL
-      URL "http://download.osgeo.org/gdal/1.11.2/gdal-1.11.2.tar.gz"
-      URL_MD5 866a46f72b1feadd60310206439c1a76
-      SOURCE_DIR ${GDAL_SB_SRC}
-      BINARY_DIR ${GDAL_SB_SRC}
-      INSTALL_DIR ${SB_INSTALL_PREFIX}
-      DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
-      DEPENDS ${GDAL_DEPENDENCIES}
-      PATCH_COMMAND ${CMAKE_COMMAND} -E touch ${GDAL_SB_SRC}/config.rpath
-        COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/GDAL/GNUmakefile ${GDAL_SB_SRC}/swig/python/GNUmakefile
-        COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/patches/GDAL/S2_patch ${GDAL_SB_SRC}
-      CONFIGURE_COMMAND
-        # use 'env' because CTest launcher doesn't perform shell interpretation
-        ${SB_ENV_CONFIGURE_CMD}
-        ${GDAL_SB_SRC}/configure
-        --prefix=${SB_INSTALL_PREFIX}
-        --enable-static=no
-        --without-ogdi
-        --without-jasper
-        --with-sentinel2
-        --without-netcdf #netcdf is not added by superbuild. better to deactivate it.
-        --without-hdf4
-        --without-hdf5
-        --without-xml2
-        ${GDAL_SB_CONFIG}
-        ${GDAL_SB_EXTRA_OPTIONS}
-      BUILD_COMMAND $(MAKE)
-      INSTALL_COMMAND $(MAKE) install
+set(GDAL_PATCH_COMMAND)
+set(GDAL_CONFIGURE_COMMAND)
+set(GDAL_BUILD_COMMAND)
+set(GDAL_INSTALL_COMMAND)
+
+if(UNIX)
+  set(GDAL_SB_EXTRA_OPTIONS "" CACHE STRING "Extra options to be passed to GDAL configure script")
+  mark_as_advanced(GDAL_SB_EXTRA_OPTIONS)
+  #Convert GDAL_SB_EXTRA_OPTIONS to a list to allow to add multiple instructions to the CONFIGURE_COMMAND
+  separate_arguments(GDAL_SB_EXTRA_OPTIONS)
+
+  #we dont do any framework build on osx. So let's be sure on case of gdal
+  if(APPLE)
+    list(APPEND GDAL_SB_CONFIG "--with-macosx-framework=no")
+  endif()
+
+  # PATCH_COMMAND ${CMAKE_COMMAND} -E touch ${GDAL_SB_SRC}/config.rpath
+  # COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/GDAL/GNUmakefile ${GDAL_SB_SRC}/swig/python/GNUmakefile
+
+  set(GDAL_PATCH_COMMAND)
+
+  set(GDAL_CONFIGURE_COMMAND  "${SB_ENV_CONFIGURE_CMD};./configure"
+    --prefix=${SB_INSTALL_PREFIX}
+    --enable-static=no
+    --enable-shared=yes
+    --with-cfitsio=no
+    --with-dods-root=no
+    --with-dwgdirect=no
+    --with-ecw=no
+    --with-epsilon=no
+    --with-fme=no
+    --with-gif=no
+    --with-grass=no
+    --with-gta=no
+    --with-hdf4=no
+    --with-hdf5=no
+    --with-idb=no
+    --with-ingres=no
+    --with-jp2mrsid=no
+    --with-kakadu=no
+    --with-libgrass=no
+    --with-libjson-c=internal
+    --with-mrsid=no
+    --with-msg=no
+    --with-mysql=no
+    --with-netcdf=no
+    --with-oci=no
+    --with-odbc=no
+    --with-ogdi=no
+    --with-pam
+    --with-pcidsk=no
+    --with-pcraster=no
+    --with-pcre=no
+    --with-perl=no
+    --with-php=no
+    --with-python=no
+    --with-qhull=internal
+    --with-sde=no
+    --with-spatialite=no
+    --with-xerces=no
+    --with-xml2=no
+    ${GDAL_SB_CONFIG}
+    ${GDAL_SB_EXTRA_OPTIONS}
+    )
+  set(GDAL_BUILD_COMMAND ${CMAKE_MAKE_PROGRAM})
+  set(GDAL_INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install)
+
+else(MSVC)
+
+  ##remove libkml?
+  list(REMOVE_ITEM GDAL_DEPENDENCIES LIBKML)
+
+  STRING(REGEX REPLACE "/$" "" CMAKE_WIN_INSTALL_PREFIX ${SB_INSTALL_PREFIX})
+  STRING(REGEX REPLACE "/" "\\\\" CMAKE_WIN_INSTALL_PREFIX ${CMAKE_WIN_INSTALL_PREFIX})
+  configure_file(${CMAKE_SOURCE_DIR}/patches/GDAL/nmake_gdal_extra.opt.in ${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt)
+  set(GDAL_PATCH_COMMAND)
+  set(GDAL_CONFIGURE_COMMAND)
+  set(GDAL_BUILD_COMMAND nmake
+    /f ${GDAL_SB_SRC}/makefile.vc
+    MSVC_VER=${MSVC_VERSION}
+    EXT_NMAKE_OPT=${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt
+    )
+  set(GDAL_INSTALL_COMMAND nmake
+    /f ${GDAL_SB_SRC}/makefile.vc devinstall
+    MSVC_VER=${MSVC_VERSION}
+    EXT_NMAKE_OPT=${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt
     )

-  if(APPLE)
-    SUPERBUILD_PATCH_SOURCE(GDAL "patch-for-at-rpath")
-  endif()
+endif()

-  else(MSVC)
-  ##add libkml
-  ##https://trac.osgeo.org/gdal/ticket/5725
-  ##is needed for SQLITE driver
-    list(REMOVE_ITEM GDAL_DEPENDENCIES LIBKML)
+#message(FATAL_ERROR "GDAL_CONFIGURE_COMMAND=${GDAL_CONFIGURE_COMMAND}")
+ExternalProject_Add(GDAL
+  PREFIX GDAL
+  URL "http://download.osgeo.org/gdal/2.1.0/gdal-2.1.0.tar.gz"
+  URL_MD5 0fc165cd947c54b132204233dfb243f1
+  SOURCE_DIR ${GDAL_SB_SRC}
+  BINARY_DIR ${GDAL_SB_SRC}
+  INSTALL_DIR ${SB_INSTALL_PREFIX}
+  DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
+  DEPENDS ${GDAL_DEPENDENCIES}
+  PATCH_COMMAND ${GDAL_PATCH_COMMAND}
+  CONFIGURE_COMMAND ${GDAL_CONFIGURE_COMMAND}
+  BUILD_COMMAND ${GDAL_BUILD_COMMAND}
+  INSTALL_COMMAND ${GDAL_INSTALL_COMMAND}
+  )

-    STRING(REGEX REPLACE "/$" "" CMAKE_WIN_INSTALL_PREFIX ${SB_INSTALL_PREFIX})
-    STRING(REGEX REPLACE "/" "\\\\" CMAKE_WIN_INSTALL_PREFIX ${CMAKE_WIN_INSTALL_PREFIX})
-    configure_file(${CMAKE_SOURCE_DIR}/patches/GDAL/nmake_gdal_extra.opt.in ${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt)
+#avoid/fixup  second arg "GDAL-custom-patch" in macro
+SUPERBUILD_PATCH_SOURCE(GDAL "GDAL-custom-patch")

-    ExternalProject_Add(GDAL
-       PREFIX GDAL
-       URL "http://download.osgeo.org/gdal/1.11.2/gdal-1.11.2.tar.gz"
-       URL_MD5 866a46f72b1feadd60310206439c1a76
-       SOURCE_DIR ${GDAL_SB_SRC}
-       BINARY_DIR ${GDAL_SB_SRC}
-       INSTALL_DIR ${SB_INSTALL_PREFIX}
-      DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
-       DEPENDS ${GDAL_DEPENDENCIES}
-       PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/GDAL/GNUmakefile ${GDAL_SB_SRC}/swig/python/GNUmakefile
-        COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/patches/GDAL/S2_patch ${GDAL_SB_SRC}
-       CONFIGURE_COMMAND  ${CMAKE_COMMAND} -E copy  ${CMAKE_SOURCE_DIR}/patches/GDAL/ogrsqlitevirtualogr.cpp
-      ${GDAL_SB_SRC}/ogr/ogrsf_frmts/sqlite/ogrsqlitevirtualogr.cpp
-       BUILD_COMMAND nmake /f ${GDAL_SB_SRC}/makefile.vc MSVC_VER=${MSVC_VERSION} EXT_NMAKE_OPT=${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt
-       INSTALL_COMMAND nmake /f ${GDAL_SB_SRC}/makefile.vc devinstall MSVC_VER=${MSVC_VERSION} EXT_NMAKE_OPT=${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt
-    )
-
-  endif()
-
-  set(_SB_GDAL_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
-  if(WIN32)
-    set(_SB_GDAL_LIBRARY ${SB_INSTALL_PREFIX}/lib/gdal_i.lib)
-  elseif(UNIX)
-    set(_SB_GDAL_LIBRARY ${SB_INSTALL_PREFIX}/lib/libgdal${CMAKE_SHARED_LIBRARY_SUFFIX})
-  endif()
-
+set(_SB_GDAL_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
+if(WIN32)
+  set(_SB_GDAL_LIBRARY ${SB_INSTALL_PREFIX}/lib/gdal_i.lib)
+elseif(UNIX)
+  set(_SB_GDAL_LIBRARY ${SB_INSTALL_PREFIX}/lib/libgdal${CMAKE_SHARED_LIBRARY_SUFFIX})
 endif()
-endif()


BUG: Wrong variable to pass down Qt5 superbuild QtToCPP

--- SuperBuild/External_QtToCppXML.cmake
+++ SuperBuild/External_QtToCppXML.cmake
@@ -59,7 +59,7 @@
   set(${proj}_CMAKE_OPTIONS
     -DUSE_SYSTEM_SlicerExecutionModel:BOOL=ON
     -DQt5Widgets_DIR:PATH=${Qt5Widgets_DIR}
-    -DQt5_DIR:PATH=${DQt5_DIR}
+    -DQt5_DIR:PATH=${Qt5_DIR}
     )

   ### --- End Project specific additions


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   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 12)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- 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   27)
+SET(KWSYS_DATE_STAMP_DAY   28)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -15,7 +15,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2011)

 # KWSys version date month component.  Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 05)
+SET(KWSYS_DATE_STAMP_MONTH 06)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   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 01)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


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

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


Disable -Werror for unused-private-field if using clang.

The GTest sources seem to trip up this warning and there's not
too much we can do about it. Just make clang shut up.

--- FindGoogleMock.cmake
+++ FindGoogleMock.cmake
@@ -74,6 +74,14 @@
 option (GMOCK_PREFER_SOURCE_BUILD
         "Whether or not to prefer a source build of Google Mock." OFF)

+set (GMOCK_CXX_FLAGS "")
+
+if (CMAKE_CXX_COMPILER MATCHES "(^.*clang.*$)")
+
+    set (GMOCK_CXX_FLAGS "-Wno-error=unused-private-field")
+
+endif (CMAKE_CXX_COMPILER MATCHES "(^.*clang.*$)")
+
 macro (_import_library library_target location)

     add_library (${library_target} STATIC IMPORTED GLOBAL)
@@ -316,7 +324,9 @@
     ExternalProject_Add (${EXTPROJECT_TARGET}
                          URL ${GMOCK_URL}
                          PREFIX ${GMOCK_PREFIX}
-                         INSTALL_COMMAND "")
+                         INSTALL_COMMAND ""
+                         CMAKE_ARGS
+                         -DCMAKE_CXX_FLAGS=${GMOCK_CXX_FLAGS})

     set (GTEST_LIBRARY gtest)
     set (GTEST_MAIN_LIBRARY gtest_main)
@@ -360,6 +370,15 @@

 endif (NOT GTEST_FOUND OR NOT GMOCK_FOUND)

+function (_override_compile_flags TARGET)
+
+    set_property (TARGET ${TARGET}
+                  APPEND_STRING
+                  PROPERTY COMPILE_FLAGS
+                  " ${GMOCK_CXX_FLAGS}")
+
+endfunction (_override_compile_flags)
+
 if (NOT GTEST_FOUND OR NOT GMOCK_FOUND)

     if (GoogleMock_FIND_REQUIRED)
@@ -375,12 +394,18 @@
         set (GTEST_LIBRARY gtest)
         set (GTEST_MAIN_LIBRARY gtest_main)

+        _override_compile_flags (${GTEST_LIBRARY})
+        _override_compile_flags (${GTEST_MAIN_LIBRARY})
+
     endif (GTEST_CREATED_TARGET)

     if (GMOCK_CREATED_TARGET)

         set (GMOCK_LIBRARY gmock)
         set (GMOCK_MAIN_LIBRARY gmock_main)
+
+        _override_compile_flags (${GMOCK_LIBRARY})
+        _override_compile_flags (${GMOCK_MAIN_LIBRARY})

     endif (GMOCK_CREATED_TARGET)


SK: -BUG: initial checkout now was performed in the wrong directory

--- src/Testing/Dashboard/elxDashboardCommon.cmake
+++ src/Testing/Dashboard/elxDashboardCommon.cmake
@@ -79,11 +79,11 @@
 endif()

 # Support initial checkout if necessary;
-# dashboard_root is working dir.
+# dashboard_root is working dir?
 if( NOT EXISTS "${CTEST_SOURCE_DIRECTORY}"
     AND NOT DEFINED CTEST_CHECKOUT_COMMAND
     AND CTEST_UPDATE_COMMAND)
-  set( CTEST_CHECKOUT_COMMAND "\"${CTEST_UPDATE_COMMAND}\" co --username elastixguest --password elastixguest \"${dashboard_url}\" ." )
+  set( CTEST_CHECKOUT_COMMAND "\"${CTEST_UPDATE_COMMAND}\" co --username elastixguest --password elastixguest \"${dashboard_url}\" ${CTEST_DASHBOARD_ROOT}" )
 endif()

 # Send the main script as a note, and this script


BUG: libkml and opencv is deactivated on Linux

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

 set(${proj}_DEPENDENCIES)

-set(BUILD_LIBKML OFF)
-set(BUILD_OPENCV OFF)
+set(BUILD_LIBKML ON)
+set(BUILD_OPENCV ON)

 if(USE_SYSTEM_GDAL)
   set(OTB_SB_GDAL_CONFIG)
@@ -153,7 +153,7 @@
       -DOTB_USE_EXTERNAL_MUPARSER:BOOL=ON
       -DOTB_USE_EXTERNAL_MUPARSERX:BOOL=ON
       -DOTB_USE_EXTERNAL_TINYXML:BOOL=ON
-      -DOTB_USE_EXTERNAL_EXPAT:BOOL=ON
+      -DOTB_USE_EXTERNAL_EXPAT:BOOL=ON
       -DOTB_USE_EXTERNAL_LIBKML:BOOL=${BUILD_LIBKML}
       -DOTB_USE_OPENCV:BOOL=${BUILD_OPENCV}
       ${OTB_SB_ITK_CONFIG}


ENH:  Added full paths to Matlab libraries for linking with external projects.

--- CMake/UseMatlabMex.cmake
+++ CMake/UseMatlabMex.cmake
@@ -11,24 +11,26 @@
 LINK_DIRECTORIES(${MATLAB_LIB_DIR})

 IF(UNIX)
-  SET(MEX_LIBRARIES mx mex mat m stdc++)
-  SET(MATLAB_ENGINE_LIBRARIES mx eng)
   SET(MEX_VER_FILE "${MATLAB_ROOT_DIR}/extern/src/mexversion.c")
   IF(APPLE)
+   SET(MEX_LIBRARIES ${MATLAB_LIB_DIR}/libmx.dylib ${MATLAB_LIB_DIR}/libmex.dylib ${MATLAB_LIB_DIR}/libmat.dylib m stdc++)
+   SET(MATLAB_ENGINE_LIBRARIES ${MATLAB_LIB_DIR}/libmx.dylib ${MATLAB_LIB_DIR}/libeng.dylib)
    IF(CMAKE_SIZEOF_VOID_P EQUAL 4) # 32 bit
-	SET(MEX_CXX_FLAGS "-fno-common -no-cpp-precomp -fexceptions -arch i386")
+    SET(MEX_CXX_FLAGS "-fno-common -no-cpp-precomp -fexceptions -arch i386")
     SET(MEX_DEFINES "MATLAB_MEX_FILE")
     SET(MEX_RPATH "")
     SET(MEX_LDFLAGS "-Wl,-exported_symbols_list,${MATLAB_ROOT_DIR}/extern/lib/${MATLAB_DIR_PREFIX}/mexFunction.map")
     SET(MEX_FILE_SUFFIX ".mexmaci")
    ELSE(CMAKE_SIZEOF_VOID_P EQUAL 4) # 64 bit
-   	SET(MEX_CXX_FLAGS "-fno-common -no-cpp-precomp -fexceptions -arch x86_64")
+    SET(MEX_CXX_FLAGS "-fno-common -no-cpp-precomp -fexceptions -arch x86_64")
     SET(MEX_DEFINES "MATLAB_MEX_FILE")
     SET(MEX_RPATH "")
     SET(MEX_LDFLAGS "-Wl,-exported_symbols_list,${MATLAB_ROOT_DIR}/extern/lib/${MATLAB_DIR_PREFIX}/mexFunction.map")
     SET(MEX_FILE_SUFFIX ".mexmaci64")
    ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 4)
   ELSE(APPLE)
+   SET(MEX_LIBRARIES ${MATLAB_LIB_DIR}/libmx.so ${MATLAB_LIB_DIR}/libmex.so ${MATLAB_LIB_DIR}/libmat.so m stdc++)
+   SET(MATLAB_ENGINE_LIBRARIES ${MATLAB_LIB_DIR}/libmx.so ${MATLAB_LIB_DIR}/libeng.so)
    IF(CMAKE_SIZEOF_VOID_P EQUAL 4) # 32 bit
     SET(MEX_CXX_FLAGS "-ansi -fPIC -pthread")
     SET(MEX_DEFINES "MATLAB_MEX_FILE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE")
@@ -44,8 +46,8 @@
    ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 4)
   ENDIF(APPLE)
 ELSE(UNIX)
-  SET(MEX_LIBRARIES libmx libmex libmat)
-  SET(MATLAB_ENGINE_LIBRARIES libmx libeng)
+  SET(MEX_LIBRARIES ${MATLAB_LIB_DIR}/libmx.lib ${MATLAB_LIB_DIR}/libmex.lib ${MATLAB_LIB_DIR}/libmat.lib m stdc++)
+  SET(MATLAB_ENGINE_LIBRARIES ${MATLAB_LIB_DIR}/libmx.lib ${MATLAB_LIB_DIR}/libeng.lib)
   SET(MEX_VER_FILE "")
   IF(CMAKE_SIZEOF_VOID_P EQUAL 4) # 32 bit
    SET(MEX_CXX_FLAGS "")


ManageFile: Fixed MANAGE_FILE_CACHE

ManageFile: Fixed MANAGE_FILE_CACHE

--- Modules/ManageFile.cmake
+++ Modules/ManageFile.cmake
@@ -328,6 +328,7 @@
     VARIABLE_PARSE_ARGN(_o _validOptions ${ARGN})
     IF(NOT DEFINED _o_ERROR_VAR)
 	SET(_o_ERROR_VAR "${var}_ERROR")
+	SET(${var}_ERROR 0)
     ENDIF(NOT DEFINED _o_ERROR_VAR)
     SET(_commandOptList "")
     IF(DEFINED _o_RESULT_VAR)
@@ -363,9 +364,10 @@
 		ERROR_QUIET
 		)
 	ENDIF(NOT EXISTS ${_o_CACHE_DIR})
-	IF(_o_ERROR_VAR)
+	IF(NOT ${${_o_ERROR_VAR}} EQUAL 0)
+	    ## Error when creating cache dir
 	    RETURN()
-	ENDIF(_o_ERROR_VAR)
+	ENDIF(NOT ${${_o_ERROR_VAR}} EQUAL 0)

 	SET(_cacheFile "${_o_CACHE_DIR}/${file}")
 	MANAGE_FILE_EXPIRY(_isExpired ${_cacheFile} ${_o_EXPIRY_SECONDS})
@@ -392,7 +394,7 @@
     FILE(READ ${_cacheFile} _value)
     STRING(STRIP "${_value}" _value)
     SET(${var} "${_value}" PARENT_SCOPE)
-ENDFUNCTION(MANAGE_FILE_CACHE var file)
+ENDFUNCTION(MANAGE_FILE_CACHE)

 FUNCTION(MANAGE_FILE_EXPIRY var file expirySecond)
     IF(EXISTS "${file}")


Reenable -Qunused-arguments for clang

Reenable -Qunused-arguments for clang

--- cmake/setup_compiler_flags_gnu.cmake
+++ cmake/setup_compiler_flags_gnu.cmake
@@ -1,6 +1,6 @@
 ## ---------------------------------------------------------------------
 ##
-## Copyright (C) 2012 - 2014 by the deal.II authors
+## Copyright (C) 2012 - 2015 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -86,10 +86,12 @@
 ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-deprecated-declarations")

 IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+
   #
-  # Silence Clang warnings about unused parameters (mainly caused by BOOST):
+  # Silence Clang warnings about unused compiler parameters (works around a
+  # regression in the clang driver frontend of certain versions):
   #
-  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused-parameter")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Qunused-arguments")

   #
   # *Boy*, clang seems to be the very definition of "pedantic" in
@@ -101,10 +103,11 @@
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-delete-non-virtual-dtor") # not harmless but needed for boost <1.50.0
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-long-long")
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-newline-eof")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unsupported-friend")
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused-function")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused-parameter") # mainly caused by BOOST
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused-private-field")
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused-variable")
-  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unsupported-friend")

   # suppress warnings in boost 1.56:
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-c++11-extensions")


correct bug from new API

correct bug from new API

--- download.cmake
+++ download.cmake
@@ -34,4 +34,4 @@
   inquire_message(INFO "Extracting Boost ${Boost_VERSION}... DONE.")
 endif()

-set(IPM_PACKAGE_VERSION_ROOT ${l_IPM_Boost_local_dir})
+set(Boost_PACKAGE_VERSION_ROOT ${l_IPM_Boost_local_dir})


Fix check whether we are crosscompiling

Fix check whether we are crosscompiling

CMake defines CMAKE_CROSSCOMPILING when crosscompiling so
use that instead of the undefined CROSS_COMPILING variable.

--- cmake/Modules/CheckCXXFeatures.cmake
+++ cmake/Modules/CheckCXXFeatures.cmake
@@ -79,14 +79,14 @@
         set(_SRCFILE_FAIL "${_SRCFILE_BASE}_fail.cpp")
         set(_SRCFILE_FAIL_COMPILE "${_SRCFILE_BASE}_fail_compile.cpp")

-        if (CROSS_COMPILING)
+        if (CMAKE_CROSSCOMPILING)
             try_compile(${RESULT_VAR} "${_bindir}" "${_SRCFILE}"
                         COMPILE_DEFINITIONS "${CXX11_COMPILER_FLAGS}")
             if (${RESULT_VAR} AND EXISTS ${_SRCFILE_FAIL})
                 try_compile(${RESULT_VAR} "${_bindir}_fail" "${_SRCFILE_FAIL}"
                             COMPILE_DEFINITIONS "${CXX11_COMPILER_FLAGS}")
             endif (${RESULT_VAR} AND EXISTS ${_SRCFILE_FAIL})
-        else (CROSS_COMPILING)
+        else (CMAKE_CROSSCOMPILING)
             try_run(_RUN_RESULT_VAR _COMPILE_RESULT_VAR
                     "${_bindir}" "${_SRCFILE}"
                     COMPILE_DEFINITIONS "${CXX11_COMPILER_FLAGS}")
@@ -105,7 +105,7 @@
                     set(${RESULT_VAR} FALSE)
                 endif (_COMPILE_RESULT_VAR AND _RUN_RESULT_VAR)
             endif (${RESULT_VAR} AND EXISTS ${_SRCFILE_FAIL})
-        endif (CROSS_COMPILING)
+        endif (CMAKE_CROSSCOMPILING)
         if (${RESULT_VAR} AND EXISTS ${_SRCFILE_FAIL_COMPILE})
             try_compile(_TMP_RESULT "${_bindir}_fail_compile" "${_SRCFILE_FAIL_COMPILE}"
                         COMPILE_DEFINITIONS "${CXX11_COMPILER_FLAGS}")


[CMAKE] Split remove_compiler_flags into C and CXX variants

Summary: Keep a `remove_compiler_flags` macro that does both.

Test Plan:
  mkdir buildcmake && cd buildcmake
  cmake -GNinja .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
  ninja -v
Check the `-DNDEBUG` does not appear on the compiler command lines.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: teamcity, schancel

Differential Revision: https://reviews.bitcoinabc.org/D2655

--- cmake/modules/AddCompilerFlags.cmake
+++ cmake/modules/AddCompilerFlags.cmake
@@ -27,21 +27,37 @@
 	add_cxx_compiler_flag(${ARGN})
 endmacro()

-macro(remove_compiler_flags)
+macro(remove_c_compiler_flags)
 	if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "")
 		string(TOUPPER ${CMAKE_BUILD_TYPE} BUILD_TYPE)
-		set(BUILD_TYPE_CXX_FLAGS "CMAKE_CXX_FLAGS_${BUILD_TYPE}")
 		set(BUILD_TYPE_C_FLAGS "CMAKE_C_FLAGS_${BUILD_TYPE}")
 	endif()

 	foreach(f ${ARGN})
-		string(REGEX REPLACE "${f}( |$)" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
 		string(REGEX REPLACE "${f}( |$)" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
 		if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "")
-			string(REGEX REPLACE "${f}( |$)" "" ${BUILD_TYPE_CXX_FLAGS} "${${BUILD_TYPE_CXX_FLAGS}}")
 			string(REGEX REPLACE "${f}( |$)" "" ${BUILD_TYPE_C_FLAGS} "${${BUILD_TYPE_C_FLAGS}}")
 		endif()
 	endforeach()
+endmacro()
+
+macro(remove_cxx_compiler_flags)
+	if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "")
+		string(TOUPPER ${CMAKE_BUILD_TYPE} BUILD_TYPE)
+		set(BUILD_TYPE_CXX_FLAGS "CMAKE_CXX_FLAGS_${BUILD_TYPE}")
+	endif()
+
+	foreach(f ${ARGN})
+		string(REGEX REPLACE "${f}( |$)" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+		if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "")
+			string(REGEX REPLACE "${f}( |$)" "" ${BUILD_TYPE_CXX_FLAGS} "${${BUILD_TYPE_CXX_FLAGS}}")
+		endif()
+	endforeach()
+endmacro()
+
+macro(remove_compiler_flags)
+	remove_c_compiler_flags(${ARGN})
+	remove_cxx_compiler_flags(${ARGN})
 endmacro()

 # Note that CMake does not provide any facility to check that a linker flag is


Use official hunter Libevent release.

Use official hunter Libevent release.

--- cmake/projects/Libevent/hunter.cmake
+++ cmake/projects/Libevent/hunter.cmake
@@ -9,8 +9,8 @@
 hunter_add_version(
     PACKAGE_NAME Libevent
     VERSION "2.1.8"
-    URL "https://github.com/isaachier/libevent/archive/hunter-2.1.8-p5.tar.gz"
-    SHA1 "c8eed67162a9f226d6b734543f1a179f8f7b73d9")
+    URL "https://github.com/hunter-packages/libevent/archive/v2.1.8-p0.tar.gz"
+    SHA1 "0f95aa9fac6e64148ebd3e3d8fe94d0a0151eb56")

 hunter_cmake_args(Libevent CMAKE_ARGS
                   EVENT__DISABLE_TESTS=ON


SVN_SILENT made messages (.desktop file)

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -78,7 +78,7 @@
 Comment[es]=Motor GStreamer para Phonon
 Comment[et]=Phononi GStreameri taustaprogramm
 Comment[eu]=Phonon-en GStreamer bizkarraldekoa
-Comment[fi]=Phonon GStreamer -taustaohjelma
+Comment[fi]=Phonon GStreamer -taustajärjestelmä
 Comment[fr]=Moteur GStreamer pour Phonon
 Comment[ga]=Inneall GStreamer le haghaidh Phonon
 Comment[gl]=Infraestrutura de GStreamer para Phonon


ENH: Bump LIBSVM tag to match current HEAD

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -54,7 +54,7 @@
 # LIBSVM version 3.17 (minimum version 3.1)
 set( LIBSVM_GIT_REPOSITORY
   ${github_protocol}://github.com/TubeTK/TubeTK-LIBSVM.git )
-set( LIBSVM_GIT_TAG 74907dab39c105f88dcc3f0e14c6f5562b5affb4 )
+set( LIBSVM_GIT_TAG d9c10536a55ca36a170a3def0d9f93bc01940a67 )

 # TubeTK Parameter Serializer snapshot 2013-08-21 11:14:41
 set( ParameterSerializer_GIT_REPOSITORY


boards: qemu_x86: use correct memory size

All x86 QEMU boards have a hard-coded memory size of 9MB which
does not corresponding with what is defined in device tree.
So make use of CONFIG_SRAM_SIZE to provide correct memory size.

Signed-off-by: Daniel Leung <d94e04d205b5962d7873a139ef298b03c1717f72@intel.com>

--- boards/x86/qemu_x86/board.cmake
+++ boards/x86/qemu_x86/board.cmake
@@ -19,8 +19,15 @@
   set(QEMU_CPU_TYPE_${ARCH} qemu32,+nx,+pae)
 endif()

+if(CONFIG_XIP)
+  # Extra 4MB to emulate flash area
+  math(EXPR QEMU_MEMORY_SIZE_MB "${CONFIG_SRAM_SIZE} / 1024 + 4")
+else()
+  math(EXPR QEMU_MEMORY_SIZE_MB "${CONFIG_SRAM_SIZE} / 1024")
+endif()
+
 set(QEMU_FLAGS_${ARCH}
-  -m 9
+  -m ${QEMU_MEMORY_SIZE_MB}
   -cpu ${QEMU_CPU_TYPE_${ARCH}}
   -device isa-debug-exit,iobase=0xf4,iosize=0x04
   ${REBOOT_FLAG}


don't mess with user compile flags

don't mess with user compile flags

--- cmake/FindCUTI.cmake
+++ cmake/FindCUTI.cmake
@@ -129,21 +129,6 @@

 	target_link_libraries(${target} PRIVATE debug ${CUTI_LIBRARIES_DEBUG} ${testee})
 	target_link_libraries(${target} PRIVATE optimized ${CUTI_LIBRARIES_RELEASE} ${testee})
-
-  if(MSVC)
-    target_compile_options(${target} PRIVATE "/Zi")
-    if (MSVC_VERSION GREATER 1800)
-      set_target_properties(${target} PROPERTIES LINK_FLAGS "/DEBUG:FASTLINK")
-    else()
-      set_target_properties(${target} PROPERTIES LINK_FLAGS "/DEBUG")
-    endif()
-  elseif(APPLE)
-    #Enable debug information for xcode
-    set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT[variant=Debug] "dwarf")
-    set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym")
-    set_target_properties(${target}  PROPERTIES COMPILE_FLAGS "-g")
-  endif()
-
   target_include_directories(${target} PUBLIC ${CUTI_INCLUDE_DIRS})

   if(${USE_CUTI_BACK_END})


Set required C++ standard to C++17. (#405)

--- cmake/settings.cmake
+++ cmake/settings.cmake
@@ -51,7 +51,7 @@
   #

   # Globally set the required C++ standard
-  set(CMAKE_CXX_STANDARD 14)
+  set(CMAKE_CXX_STANDARD 17)
   set(CMAKE_CXX_EXTENSIONS OFF)

   if(WIN32)


restrict test coverage reports to elm sources

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -142,6 +142,7 @@

 		# Capturing lcov counters and generating report
                 COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info.tmp
+                COMMAND ${LCOV_PATH} --extract ${_outputname}.info.tmp 'elm/*' --output-file ${_outputname}.info.tmp
                 COMMAND ${LCOV_PATH} --remove ${_outputname}.info.tmp 'tests/*' 'test/*' '/usr/*' '/opt/*' --output-file ${_outputname}.info
                 COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info
                 COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info.tmp


cmake/CodeCoverage.cmake deleted

cmake/CodeCoverage.cmake deleted

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -1,193 +0,0 @@
-# Copyright (c) 2012 - 2015, Lars Bilke
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modification,
-# are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of source code must retain the above copyright notice, this
-#    list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. Neither the name of the copyright holder nor the names of its contributors
-#    may be used to endorse or promote products derived from this software without
-#    specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#
-#
-# 2012-01-31, Lars Bilke
-# - Enable Code Coverage
-#
-# 2013-09-17, Joakim Söderberg
-# - Added support for Clang.
-# - Some additional usage instructions.
-#
-# USAGE:
-
-# 0. (Mac only) If you use Xcode 5.1 make sure to patch geninfo as described here:
-#      http://stackoverflow.com/a/22404544/80480
-#
-# 1. Copy this file into your cmake modules path.
-#
-# 2. Add the following line to your CMakeLists.txt:
-#      INCLUDE(CodeCoverage)
-#
-# 3. Set compiler flags to turn off optimization and enable coverage:
-#    SET(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
-#	 SET(CMAKE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
-#
-# 3. Use the function SETUP_TARGET_FOR_COVERAGE to create a custom make target
-#    which runs your test executable and produces a lcov code coverage report:
-#    Example:
-#	 SETUP_TARGET_FOR_COVERAGE(
-#				my_coverage_target  # Name for custom target.
-#				test_driver         # Name of the test driver executable that runs the tests.
-#									# NOTE! This should always have a ZERO as exit code
-#									# otherwise the coverage generation will not complete.
-#				coverage            # Name of output directory.
-#				)
-#
-# 4. Build a Debug build:
-#	 cmake -DCMAKE_BUILD_TYPE=Debug ..
-#	 make
-#	 make my_coverage_target
-#
-#
-
-# Check prereqs
-FIND_PROGRAM( GCOV_PATH gcov )
-FIND_PROGRAM( LCOV_PATH lcov )
-FIND_PROGRAM( GENHTML_PATH genhtml )
-FIND_PROGRAM( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/tests)
-
-IF(NOT GCOV_PATH)
-	MESSAGE(FATAL_ERROR "gcov not found! Aborting...")
-ENDIF() # NOT GCOV_PATH
-
-IF(NOT CMAKE_COMPILER_IS_GNUCXX)
-	# Clang version 3.0.0 and greater now supports gcov as well.
-	MESSAGE(WARNING "Compiler is not GNU gcc! Clang Version 3.0.0 and greater supports gcov as well, but older versions don't.")
-
-	IF(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-		MESSAGE(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
-	ENDIF()
-ENDIF() # NOT CMAKE_COMPILER_IS_GNUCXX
-
-SET(CMAKE_CXX_FLAGS_COVERAGE
-    "-g -O0 --coverage -fprofile-arcs -ftest-coverage"
-    CACHE STRING "Flags used by the C++ compiler during coverage builds."
-    FORCE )
-SET(CMAKE_C_FLAGS_COVERAGE
-    "-g -O0 --coverage -fprofile-arcs -ftest-coverage"
-    CACHE STRING "Flags used by the C compiler during coverage builds."
-    FORCE )
-SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE
-    ""
-    CACHE STRING "Flags used for linking binaries during coverage builds."
-    FORCE )
-SET(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
-    ""
-    CACHE STRING "Flags used by the shared libraries linker during coverage builds."
-    FORCE )
-MARK_AS_ADVANCED(
-    CMAKE_CXX_FLAGS_COVERAGE
-    CMAKE_C_FLAGS_COVERAGE
-    CMAKE_EXE_LINKER_FLAGS_COVERAGE
-    CMAKE_SHARED_LINKER_FLAGS_COVERAGE )
-
-IF ( NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "Coverage"))
-  MESSAGE( WARNING "Code coverage results with an optimized (non-Debug) build may be misleading" )
-ENDIF() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug"
-
-
-# Param _targetname     The name of new the custom make target
-# Param _testrunner     The name of the target which runs the tests.
-#						MUST return ZERO always, even on errors.
-#						If not, no coverage report will be created!
-# Param _outputname     lcov output is generated as _outputname.info
-#                       HTML report is generated in _outputname/index.html
-# Optional fourth parameter is passed as arguments to _testrunner
-#   Pass them in list form, e.g.: "-j;2" for -j 2
-FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname)
-
-	IF(NOT LCOV_PATH)
-		MESSAGE(FATAL_ERROR "lcov not found! Aborting...")
-	ENDIF() # NOT LCOV_PATH
-
-	IF(NOT GENHTML_PATH)
-		MESSAGE(FATAL_ERROR "genhtml not found! Aborting...")
-	ENDIF() # NOT GENHTML_PATH
-
-	# Setup target
-	ADD_CUSTOM_TARGET(${_targetname}
-
-		# Cleanup lcov
-		${LCOV_PATH} --directory . --zerocounters
-
-		# Run tests
-		COMMAND ${_testrunner} ${ARGV3}
-
-		# Capturing lcov counters and generating report
-		COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info
-		COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' --output-file ${_outputname}.info.cleaned
-		COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned
-		#COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned
-
-		WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-		COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."
-	)
-
-	# Show info where to find the report
-	ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
-		COMMAND ;
-		COMMENT "Open ./${_outputname}/index.html in your browser to view the coverage report."
-	)
-
-ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE
-
-# Param _targetname     The name of new the custom make target
-# Param _testrunner     The name of the target which runs the tests
-# Param _outputname     cobertura output is generated as _outputname.xml
-# Optional fourth parameter is passed as arguments to _testrunner
-#   Pass them in list form, e.g.: "-j;2" for -j 2
-FUNCTION(SETUP_TARGET_FOR_COVERAGE_COBERTURA _targetname _testrunner _outputname)
-
-	IF(NOT PYTHON_EXECUTABLE)
-		MESSAGE(FATAL_ERROR "Python not found! Aborting...")
-	ENDIF() # NOT PYTHON_EXECUTABLE
-
-	IF(NOT GCOVR_PATH)
-		MESSAGE(FATAL_ERROR "gcovr not found! Aborting...")
-	ENDIF() # NOT GCOVR_PATH
-
-	ADD_CUSTOM_TARGET(${_targetname}
-
-		# Run tests
-		${_testrunner} ${ARGV3}
-
-		# Running gcovr
-		COMMAND ${GCOVR_PATH} -x -r ${CMAKE_SOURCE_DIR} -e '${CMAKE_SOURCE_DIR}/tests/'  -o ${_outputname}.xml
-		WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-		COMMENT "Running gcovr to produce Cobertura code coverage report."
-	)
-
-	# Show info where to find the report
-	ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
-		COMMAND ;
-		COMMENT "Cobertura code coverage report saved in ${_outputname}.xml."
-	)
-
-ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE_COBERTURA


print env. variable

print env. variable

--- cmake/DetectOpenCV.cmake
+++ cmake/DetectOpenCV.cmake
@@ -17,6 +17,7 @@
         get_filename_component(OpenCV_DIR_PKG_CONFIG_PATH ${OpenCV_DIR} DIRECTORY)
         set(ENV{PKG_CONFIG_PATH} "${OpenCV_DIR_PKG_CONFIG_PATH}:$ENV{PKG_CONFIG_PATH}" )

+        message(STATUS "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH}")
         find_package(PkgConfig)
         pkg_check_modules(OpenCV opencv)


cmake: hide some variables

cmake: hide some variables

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -433,4 +433,7 @@
 		  Qt5DBus_DIR
 		  GPGME_EXECUTABLE
 		  YAEP_LIBRARY_CPP
+		  GLib_LIBRARY
+		  LibGit2_VERSION_HEADER
+		  libuv_VERSION_HEADER
 		  Qt5Svg_DIR)


follow cmake name convention for callables

--- cmake/LLVM-IR-Util.cmake
+++ cmake/LLVM-IR-Util.cmake
@@ -16,7 +16,7 @@
   ${LLVM_IR_UTIL_VERSION_PATCH})

-macro(LLVMIRSetup)
+macro(llvmir_setup)
   set(LLVMIR_DIR "llvm-ir")

   set(LLVMIR_COMPILER "")
@@ -49,6 +49,12 @@
     FULL_DOCS "list of LLVM IR files")
 endmacro()

+###
+
+llvmir_setup()
+
+###
+

 # internal utility macros/functions

@@ -72,7 +78,9 @@
 endmacro()

-macro(SetLLVMIRCompiler linker_language)
+# internal implementation detail macros/functions
+
+macro(llvmir_set_compiler linker_language)
   if("${LLVMIR_COMPILER}" STREQUAL "")
     set(LLVMIR_COMPILER ${CMAKE_${linker_language}_COMPILER})
     set(LLVMIR_COMPILER_ID ${CMAKE_${linker_language}_COMPILER_ID})
@@ -87,7 +95,7 @@
 endmacro()

-function(CheckTargetProperties trgt)
+function(llvmir_check_target_properties_impl trgt)
   if(NOT TARGET ${trgt})
     fatal("Cannot attach to non-existing target: ${trgt}.")
   endif()
@@ -114,21 +122,21 @@
 endfunction()

-function(CheckNonLLVMIRTargetProperties trgt)
+function(llvmir_check_non_llvmir_target_properties trgt)
   set(props SOURCES LINKER_LANGUAGE)

-  CheckTargetProperties(${trgt} ${props})
-endfunction()
-
-
-function(CheckLLVMIRTargetProperties trgt)
+  llvmir_check_target_properties_impl(${trgt} ${props})
+endfunction()
+
+
+function(llvmir_check_target_properties trgt)
   set(props LINKER_LANGUAGE LLVMIR_DIR LLVMIR_FILES LLVMIR_TYPE)

-  CheckTargetProperties(${trgt} ${props})
-endfunction()
-
-
-function(ExtractCompileDefsProperties out_compile_defs from)
+  llvmir_check_target_properties_impl(${trgt} ${props})
+endfunction()
+
+
+function(llvmir_extract_compile_defs_properties out_compile_defs from)
   set(defs "")
   set(compile_defs "")
   set(prop_name "COMPILE_DEFINITIONS")
@@ -175,13 +183,13 @@

   list(REMOVE_DUPLICATES compile_defs)

-  debug("@ExtractCompileDefsProperties ${from}: ${compile_defs}")
+  debug("@llvmir_extract_compile_defs_properties ${from}: ${compile_defs}")

   set(${out_compile_defs} ${compile_defs} PARENT_SCOPE)
 endfunction()

-function(ExtractCompileOptionProperties out_compile_options trgt)
+function(llvmir_extract_compile_option_properties out_compile_options trgt)
   set(options "")
   set(compile_options "")
   set(prop_name "COMPILE_OPTIONS")
@@ -205,13 +213,13 @@

   list(REMOVE_DUPLICATES compile_options)

-  debug("@ExtractCompileOptionProperties ${trgt}: ${compile_options}")
+  debug("@llvmir_extract_compile_option_properties ${trgt}: ${compile_options}")

   set(${out_compile_options} ${compile_options} PARENT_SCOPE)
 endfunction()

-function(ExtractIncludeDirsProperties out_include_dirs trgt)
+function(llvmir_extract_include_dirs_properties out_include_dirs trgt)
   set(dirs "")
   set(prop_name "INCLUDE_DIRECTORIES")

@@ -239,13 +247,13 @@

   list(REMOVE_DUPLICATES include_dirs)

-  debug("@ExtractIncludeDirsProperties ${trgt}: ${include_dirs}")
+  debug("@llvmir_extract_include_dirs_properties ${trgt}: ${include_dirs}")

   set(${out_include_dirs} ${include_dirs} PARENT_SCOPE)
 endfunction()

-function(ExtractLangFlags out_lang_flags lang)
+function(llvmir_extract_lang_flags out_lang_flags lang)
   set(lang_flags "")

   list(APPEND lang_flags ${CMAKE_${lang}_FLAGS_${CMAKE_BUILD_TYPE}})
@@ -253,13 +261,13 @@

   list(REMOVE_DUPLICATES lang_flags)

-  debug("@ExtractLangFlags ${lang}: ${lang_flags}")
+  debug("@llvmir_extract_lang_flags ${lang}: ${lang_flags}")

   set(${out_lang_flags} ${lang_flags} PARENT_SCOPE)
 endfunction()

-function(ExtractCompileFlags out_compile_flags from)
+function(llvmir_extract_compile_flags out_compile_flags from)
   #message(DEPRECATION "COMPILE_FLAGS property is deprecated.")

   set(compile_flags "")
@@ -272,23 +280,20 @@
     get_property(compile_flags SOURCE ${from} PROPERTY ${prop_name})
   endif()

-  debug("@ExtractCompileFlags ${from}: ${compile_flags}")
+  debug("@llvmir_extract_compile_flags ${from}: ${compile_flags}")

   set(${out_compile_flags} ${compile_flags} PARENT_SCOPE)
 endfunction()

-#
-
-LLVMIRSetup()
-
-#
+
+# public (client) interface macros/functions

 function(attach_llvmir_bc_target OUT_TRGT IN_TRGT)
   ## preamble
   set(OUT_LLVMIR_FILES "")
   set(FULL_OUT_LLVMIR_FILES "")

-  CheckNonLLVMIRTargetProperties(${IN_TRGT})
+  llvmir_check_non_llvmir_target_properties(${IN_TRGT})

   # if the property does not exist the related variable is not defined
   get_property(IN_FILES TARGET ${IN_TRGT} PROPERTY SOURCES)
@@ -296,26 +301,26 @@

   debug("@attach_llvmir_bc_target ${IN_TRGT} linker lang: ${LINKER_LANGUAGE}")

-  SetLLVMIRCompiler(${LINKER_LANGUAGE})
+  llvmir_set_compiler(${LINKER_LANGUAGE})

   ## command options
   set(WORK_DIR "${CMAKE_CURRENT_BINARY_DIR}/${LLVMIR_DIR}/${OUT_TRGT}")
   file(MAKE_DIRECTORY ${WORK_DIR})

   # compile definitions
-  ExtractCompileDefsProperties(IN_DEFS ${IN_TRGT})
+  llvmir_extract_compile_defs_properties(IN_DEFS ${IN_TRGT})

   # includes
-  ExtractIncludeDirsProperties(IN_INCLUDES ${IN_TRGT})
+  llvmir_extract_include_dirs_properties(IN_INCLUDES ${IN_TRGT})

   # compile options
-  ExtractCompileOptionProperties(IN_COMPILE_OPTIONS ${IN_TRGT})
+  llvmir_extract_compile_option_properties(IN_COMPILE_OPTIONS ${IN_TRGT})

   # compile flags
-  ExtractCompileFlags(IN_COMPILE_FLAGS ${IN_TRGT})
+  llvmir_extract_compile_flags(IN_COMPILE_FLAGS ${IN_TRGT})

   # compile lang flags
-  ExtractLangFlags(IN_LANG_FLAGS ${LINKER_LANGUAGE})
+  llvmir_extract_lang_flags(IN_LANG_FLAGS ${LINKER_LANGUAGE})

   ## main operations
   foreach(IN_FILE ${IN_FILES})
@@ -325,10 +330,10 @@
     set(FULL_OUT_LLVMIR_FILE "${WORK_DIR}/${OUT_LLVMIR_FILE}")

     # compile definitions per source file
-    ExtractCompileDefsProperties(IN_FILE_DEFS ${IN_FILE})
+    llvmir_extract_compile_defs_properties(IN_FILE_DEFS ${IN_FILE})

     # compile flags per source file
-    ExtractCompileFlags(IN_FILE_COMPILE_FLAGS ${IN_FILE})
+    llvmir_extract_lang_flags(IN_FILE_COMPILE_FLAGS ${IN_FILE})

     # stitch all args together
     catuniq(CURRENT_DEFS ${IN_DEFS} ${IN_FILE_DEFS})
@@ -372,7 +377,7 @@

 function(attach_llvmir_opt_pass_target OUT_TRGT IN_TRGT)
   ## preamble
-  CheckLLVMIRTargetProperties(${IN_TRGT})
+  llvmir_check_target_properties(${IN_TRGT})

   set(OUT_LLVMIR_FILES "")
   set(FULL_OUT_LLVMIR_FILES "")
@@ -430,7 +435,7 @@

 function(attach_llvmir_disassemble_target OUT_TRGT IN_TRGT)
   ## preamble
-  CheckLLVMIRTargetProperties(${IN_TRGT})
+  llvmir_check_target_properties(${IN_TRGT})

   set(OUT_LLVMIR_FILES "")
   set(FULL_OUT_LLVMIR_FILES "")
@@ -485,7 +490,7 @@

 function(attach_llvmir_assemble_target OUT_TRGT IN_TRGT)
   ## preamble
-  CheckLLVMIRTargetProperties(${IN_TRGT})
+  llvmir_check_target_properties(${IN_TRGT})

   set(OUT_LLVMIR_FILES "")
   set(FULL_OUT_LLVMIR_FILES "")
@@ -540,7 +545,7 @@

 function(attach_llvmir_link_target OUT_TRGT IN_TRGT)
   ## preamble
-  CheckLLVMIRTargetProperties(${IN_TRGT})
+  llvmir_check_target_properties(${IN_TRGT})

   set(OUT_LLVMIR_FILES "")
   set(FULL_OUT_LLVMIR_FILES "")
@@ -594,7 +599,7 @@

 function(attach_llvmir_executable OUT_TRGT IN_TRGT)
   ## preamble
-  CheckLLVMIRTargetProperties(${IN_TRGT})
+  llvmir_check_target_properties(${IN_TRGT})

   get_property(INFILES TARGET ${IN_TRGT} PROPERTY LLVMIR_FILES)
   get_property(IN_LLVMIR_DIR TARGET ${IN_TRGT} PROPERTY LLVMIR_DIR)
@@ -632,7 +637,7 @@

 function(attach_llvmir_library OUT_TRGT IN_TRGT)
   ## preamble
-  CheckLLVMIRTargetProperties(${IN_TRGT})
+  llvmir_check_target_properties(${IN_TRGT})

   get_property(INFILES TARGET ${IN_TRGT} PROPERTY LLVMIR_FILES)
   get_property(IN_LLVMIR_DIR TARGET ${IN_TRGT} PROPERTY LLVMIR_DIR)


fix travis build

fix travis build

--- cmake/LibKMLHelper.cmake
+++ cmake/LibKMLHelper.cmake
@@ -45,8 +45,7 @@
     EXPORT LibKMLTargets
     RUNTIME DESTINATION ${BIN_INSTALL_DIR}
     LIBRARY DESTINATION ${LIB_INSTALL_DIR}
-    ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
-    INCLUDES DESTINATION include)
+    ARCHIVE DESTINATION ${LIB_INSTALL_DIR})

   list(LENGTH LIBKML_TARGETS LIBKML_TARGETS_LENGTH)
   if(LIBKML_TARGETS_LENGTH LESS 1)


build: add EMBED_TARGET parameter to SQUASH_PLUGIN function

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

 function (SQUASH_PLUGIN)
   set (options EXTRA_WARNINGS DEFAULT_DISABLED)
-  set (oneValueArgs NAME EXTERNAL_PKG EXTERNAL_PKG_PREFIX C_STANDARD CXX_STANDARD)
+  set (oneValueArgs NAME EXTERNAL_PKG EXTERNAL_PKG_PREFIX C_STANDARD CXX_STANDARD EMBED_TARGET)
   set (multiValueArgs SOURCES EMBED_SOURCES LIBRARIES LDFLAGS COMPILER_FLAGS EMBED_COMPILER_FLAGS INCLUDE_DIRS EMBED_INCLUDE_DIRS DEFINES EMBED_DEFINES ALLOW_UNDEFINED_DEFINES NO_UNDEFINED_DEFINES)
   cmake_parse_arguments(SQUASH_PLUGIN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
   unset (options)
@@ -15,27 +15,26 @@
   string (TOUPPER "${SQUASH_PLUGIN_NAME}" PLUGIN_NAME_UC)
   string (REGEX REPLACE "[^a-zA-Z0-9]" "_" PLUGIN_NAME_UC "${PLUGIN_NAME_UC}")

-  if (SQUASH_PLUGIN_DEFAULT_DISABLED)
-    option("ENABLE_${PLUGIN_NAME_UC}" "Enable ${SQUASH_PLUGIN_NAME} plugin")
-    if (NOT ${ENABLE_${PLUGIN_NAME_UC}})
-      return ()
-    endif ()
+  if (NOT SQUASH_PLUGIN_DEFAULT_DISABLED)
+    option("ENABLE_${PLUGIN_NAME_UC}" "Enable ${SQUASH_PLUGIN_NAME} plugin" ON)
   else ()
-    option("DISABLE_${PLUGIN_NAME_UC}" "Disable ${SQUASH_PLUGIN_NAME} plugin")
-    if (${DISABLE_${PLUGIN_NAME_UC}})
-      return ()
-    endif ()
+    option("ENABLE_${PLUGIN_NAME_UC}" "Enable ${SQUASH_PLUGIN_NAME} plugin" OFF)
+  endif ()
+
+  if (NOT ENABLE_${PLUGIN_NAME_UC})
+    message(STATUS "${SQUASH_PLUGIN_NAME} plugin: disabled")
+    return ()
   endif ()

   set (PLUGIN_TARGET squash${SQUASH_VERSION_API}-plugin-${SQUASH_PLUGIN_NAME})
   set (EMBED TRUE)

-  if (NOT "${FORCE_IN_TREE_DEPENDENCIES}" STREQUAL "yes")
-    if (NOT "${SQUASH_PLUGIN_EXTERNAL_PKG_PREFIX}" STREQUAL "")
+  if (NOT FORCE_IN_TREE_DEPENDENCIES)
+    if (SQUASH_PLUGIN_EXTERNAL_PKG_PREFIX)
       if (${SQUASH_PLUGIN_EXTERNAL_PKG_PREFIX}_FOUND)
         set (EMBED FALSE)
       endif ()
-    elseif (NOT "${SQUASH_PLUGIN_EXTERNAL_PKG}" STREQUAL "")
+    elseif (SQUASH_PLUGIN_EXTERNAL_PKG)
       include (FindPkgConfig)

       pkg_check_modules ("${PLUGIN_NAME_UC}" "${SQUASH_PLUGIN_EXTERNAL_PKG}")
@@ -74,13 +73,16 @@
     target_require_cxx_standard (${PLUGIN_TARGET} ${SQUASH_PLUGIN_CXX_STANDARD})
   endif ()

-  if (${EMBED})
+  if (EMBED)
+    message(STATUS "${SQUASH_PLUGIN_NAME} plugin: enabled")
     foreach (source ${SQUASH_PLUGIN_EMBED_SOURCES})
       set_property (SOURCE ${source} APPEND PROPERTY COMPILE_DEFINITIONS ${SQUASH_PLUGIN_EMBED_DEFINES})
       source_file_add_compiler_flags (${source} ${SQUASH_PLUGIN_EMBED_COMPILER_FLAGS})
     endforeach (source)
     target_include_directories (${PLUGIN_TARGET} PRIVATE ${SQUASH_PLUGIN_EMBED_INCLUDE_DIRS})
+    target_link_libraries (${PLUGIN_TARGET} ${SQUASH_PLUGIN_EMBED_TARGET})
   else ()
+    message(STATUS "${SQUASH_PLUGIN_NAME} plugin: using external library")
     if (NOT "${${SQUASH_PLUGIN_EXTERNAL_PKG_PREFIX}_LDFLAGS}" STREQUAL "")
       foreach (ldflag ${${SQUASH_PLUGIN_EXTERNAL_PKG_PREFIX}_LDFLAGS})
         set_property (TARGET ${PLUGIN_TARGET} APPEND_STRING PROPERTY LINK_FLAGS " ${ldflag}")


use XCFun v2.0.0a5

use XCFun v2.0.0a5

--- cmake/custom/xcfun.cmake
+++ cmake/custom/xcfun.cmake
@@ -7,7 +7,7 @@
   GIT_REPOSITORY
     https://github.com/dftlibs/xcfun.git
   GIT_TAG
-    v2.0.0a4
+    v2.0.0a5
   )

 add_subdirectory(


Version update to 0.9.3

Version update to 0.9.3

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -27,10 +27,10 @@
  #
  #################################################################################

-set(IVW_VERSION 0.9.2dev)
+set(IVW_VERSION 0.9.3)
 set(IVW_MAJOR_VERSION 0)
 set(IVW_MINOR_VERSION 9)
-set(IVW_PATCH_VERSION 2dev)
+set(IVW_PATCH_VERSION 3)

 set_property(GLOBAL PROPERTY USE_FOLDERS On)
 set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER cmake)


Revert to inria as an installation directory for windows.

--- cmake/medinriaPack.cmake
+++ cmake/medinriaPack.cmake
@@ -94,7 +94,7 @@
 				"/DINST_PREFIX=${CMAKE_INSTALL_PREFIX}"
 				#must be changed but ${CMAKE_INSTALL_PREFIX} has slashes not backslashes...

-                "/DPACK_INSTALLDIR=${PROGFILES_DIR}\\medinria-2"
+                "/DPACK_INSTALLDIR=${PROGFILES_DIR}\\inria"
 				"/DPROJECT_NAME=${PROJECT_NAME}"
 				"/DMED_EXECUTABLE=${PROJECT_NAME}.exe"
                 "/DMED_INSTALLER_EXE=${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}-win32-${MSVC_ARCH}.exe"


AWM-7028 iOS push service WIP

AWM-7028 iOS push service WIP

--- cmake/scripts/l10n.cmake
+++ cmake/scripts/l10n.cmake
@@ -280,6 +280,7 @@
         --keyword=pgettext:1c,2
         --keyword=ngettext:1,2
         --keyword=npgettext:1c,2,3
+        ${L10N_XGETTEXT_KEYWORDS}
     )
     extract_l10n(PROGRAM ${XGETTEXT} OPTIONS ${XGETTEXT_OPTIONS} ${ARGN})
     set(L10N_DOMAINS ${L10N_DOMAINS} PARENT_SCOPE)


Fix flags for ifort

Fix flags for ifort

--- compiler/intel.cmake
+++ compiler/intel.cmake
@@ -8,10 +8,10 @@
 set(__claw_base_compiler YES)

 # Std option for gfortran
-set(FPPFLAGS "-E")            # for preprocessing only
+set(FPPFLAGS "-fpp -E")            # for preprocessing only
 set(FPP_REDIRECT true)        # use redirection > to save file
 set(CLAW_TEST_FFP_FLAGS "-E") # force preprocessing
 set(TEST_BASE_FLAGS "")       # Base flags for test case compilation
 set(OPENACC_FLAGS "")         # flags to compile with OpenACC support
 set(OPENMP_FLAGS "-openmp")   # flags to compile with OpenMP support
-set(COMPILER_MACRO "-D__INTEL_COMPILER -D__ICC")    # predefined macro by compiler
+set(COMPILER_MACRO "-D__ICC")    # predefined macro by compiler


[cmake/protobuf]Avoid depending on unused C-development-dependencies. We only need proto-c for Python.

--- cmake/FindProtocolBuffers.cmake
+++ cmake/FindProtocolBuffers.cmake
@@ -27,26 +27,28 @@
   # in cache already
   SET(PROTOBUF_FOUND TRUE)
 ELSE (PROTOBUF_LIBRARY AND PROTOBUF_INCLUDE_DIR AND PROTOBUF_PROTOC_EXECUTABLE)
+  INCLUDE(FindPackageHandleStandardArgs)

-  FIND_PATH(PROTOBUF_INCLUDE_DIR stubs/common.h
-    /usr/include/google/protobuf
-  )
+  IF (PROTOBUF_REQUIRE_CPP)
+    FIND_PATH(PROTOBUF_INCLUDE_DIR stubs/common.h
+      /usr/include/google/protobuf
+    )

-  FIND_LIBRARY(PROTOBUF_LIBRARY NAMES protobuf
-    PATHS
-    ${GNUWIN32_DIR}/lib
-  )
+    FIND_LIBRARY(PROTOBUF_LIBRARY NAMES protobuf
+      PATHS
+      ${GNUWIN32_DIR}/lib
+    )
+    FIND_PACKAGE_HANDLE_STANDARD_ARGS(protobuf DEFAULT_MSG PROTOBUF_INCLUDE_DIR PROTOBUF_LIBRARY)
+    # ensure that they are cached
+    SET(PROTOBUF_INCLUDE_DIR ${PROTOBUF_INCLUDE_DIR} CACHE INTERNAL "The protocol buffers include path")
+    SET(PROTOBUF_LIBRARY ${PROTOBUF_LIBRARY} CACHE INTERNAL "The libraries needed to use protocol buffers library")
+  ENDIF (PROTOBUF_REQUIRE_CPP)

   FIND_PROGRAM(PROTOBUF_PROTOC_EXECUTABLE protoc)
+  FIND_PACKAGE_HANDLE_STANDARD_ARGS(protobuf DEFAULT_MSG PROTOBUF_PROTOC_EXECUTABLE)

-  INCLUDE(FindPackageHandleStandardArgs)
-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(protobuf DEFAULT_MSG PROTOBUF_INCLUDE_DIR PROTOBUF_LIBRARY PROTOBUF_PROTOC_EXECUTABLE)
-
-  # ensure that they are cached
-  SET(PROTOBUF_INCLUDE_DIR ${PROTOBUF_INCLUDE_DIR} CACHE INTERNAL "The protocol buffers include path")
-  SET(PROTOBUF_LIBRARY ${PROTOBUF_LIBRARY} CACHE INTERNAL "The libraries needed to use protocol buffers library")
+  # ensure that it is cached
   SET(PROTOBUF_PROTOC_EXECUTABLE ${PROTOBUF_PROTOC_EXECUTABLE} CACHE INTERNAL "The protocol buffers compiler")
-
 ENDIF (PROTOBUF_LIBRARY AND PROTOBUF_INCLUDE_DIR AND PROTOBUF_PROTOC_EXECUTABLE)

 IF (PROTOBUF_FOUND)


Simplify curl source build

Simplify curl source build

Disable all but http protocols

--- cmake/Modules/FindCurl_EP.cmake
+++ cmake/Modules/FindCurl_EP.cmake
@@ -83,7 +83,8 @@
         -DCURL_DISABLE_LDAP=ON
         -DCURL_DISABLE_LDAPS=ON
         -DCURL_STATICLIB=ON
-        -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true
+	-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+        -DHTTP_ONLY=ON
         "${WITH_SSL}"
         "-DCMAKE_C_FLAGS=${CFLAGS_DEF}"
       UPDATE_COMMAND ""
@@ -129,8 +130,22 @@
           --prefix=${TILEDB_EP_INSTALL_PREFIX}
           --enable-optimize
           --enable-shared=no
+          --with-pic=yes
+          --disable-dict
+          --disable-file
+          --disable-ftp
+          --disable-gopher
+          --disable-imap
           --disable-ldap
-          --with-pic=yes
+          --disable-pop3
+          --disable-rtmp
+          --disable-rtsp
+          --disable-scp
+          --disable-sftp
+          --disable-smb
+          --disable-smtp
+          --disable-telnet
+          --disable-tftp
           ${WITH_SSL}
           ${WITH_ZLIB}
       BUILD_IN_SOURCE TRUE


fix FindHolomni.cmake

fix FindHolomni.cmake

--- cmake/Modules/FindHolomni.cmake
+++ cmake/Modules/FindHolomni.cmake
@@ -9,7 +9,7 @@
 pkg_check_modules(HOLOMNI QUIET libholomni_pcv)
 set(HOLOMNI_DEFINITIONS ${HOLOMNI_CFLAGS_OTHER})

-find_path(HOLOMNI_INCLUDE_DIR libxml/xpath.h
+find_path(HOLOMNI_INCLUDE_DIR holomni_pcv/Caster.h
           HINTS ${HOLOMNI_INCLUDEDIR} ${HOLOMNI_INCLUDE_DIRS}
           PATH_SUFFIXES HOLOMNI )


cmake: fix find_library() for bzip2

cmake: fix find_library() for bzip2

--- cmake/OpenCVFindLibsVideo.cmake
+++ cmake/OpenCVFindLibsVideo.cmake
@@ -224,11 +224,7 @@

     if(HAVE_FFMPEG)
       # Find the bzip2 library because it is required on some systems
-      FIND_LIBRARY(BZIP2_LIBRARIES NAMES bz2 bzip2)
-      if(NOT BZIP2_LIBRARIES)
-        # Do an other trial
-        FIND_FILE(BZIP2_LIBRARIES NAMES libbz2.so.1 PATHS /lib)
-      endif()
+      FIND_LIBRARY(BZIP2_LIBRARIES NAMES bz2 bzip2 libbz2.so.1)
     else()
       find_path(FFMPEG_INCLUDE_DIR "libavformat/avformat.h"
                 PATHS /usr/local /usr /opt


Fixed Backward integration for newer CMake versions

--- cmake/depthaiDependencies.cmake
+++ cmake/depthaiDependencies.cmake
@@ -45,9 +45,9 @@
     if(DEPTHAI_ENABLE_BACKWARD)
         # Disable automatic check for additional stack unwinding libraries
         # Just use the default compiler one
-        set(STACK_DETAILS_AUTO_DETECT FALSE)
+        set(STACK_DETAILS_AUTO_DETECT FALSE CACHE BOOL "Auto detect backward's stack details dependencies")
         find_package(Backward ${_QUIET} CONFIG REQUIRED)
-        set(STACK_DETAILS_AUTO_DETECT)
+        unset(STACK_DETAILS_AUTO_DETECT)
     endif()

 endif()


Try find Decibel in default path too

Try find Decibel in default path too

svn path=/trunk/KDE/kdenetwork/kopete/; revision=940341

--- cmake/modules/FindDecibel.cmake
+++ cmake/modules/FindDecibel.cmake
@@ -34,7 +34,6 @@
 FIND_LIBRARY(QT_TAPIOCA_LIBRARY NAMES QtTapioca
   PATHS
   ${QTTAPIOCA_LIBRARY_DIRS}
-  NO_DEFAULT_PATH
 )

 set(DECIBEL_LIBRARIES ${QT_TAPIOCA_LIBRARY})


pin sdsl to fixed git revision

pin sdsl to fixed git revision

--- cmakemodules/DownloadSDSL.cmake
+++ cmakemodules/DownloadSDSL.cmake
@@ -1,6 +1,7 @@
 ExternalProject_Add(
     sdsl_external
     GIT_REPOSITORY https://github.com/simongog/sdsl-lite.git
+    GIT_TAG 7bbb71e8e13279ab45111bd135f4210545cd1c85
     CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
     UPDATE_COMMAND ""
     PATCH_COMMAND git apply ${CMAKE_SOURCE_DIR}/etc/cygwin-sdsl.gitpatch


remove CFG_TUSB_DEBUG from tinyusb_common_base

--- hw/bsp/rp2040/family.cmake
+++ hw/bsp/rp2040/family.cmake
@@ -55,7 +55,7 @@
 	target_compile_definitions(tinyusb_common_base INTERFACE
 			CFG_TUSB_MCU=OPT_MCU_RP2040
 			CFG_TUSB_OS=OPT_OS_PICO
-			CFG_TUSB_DEBUG=${TINYUSB_DEBUG_LEVEL}
+			#CFG_TUSB_DEBUG=${TINYUSB_DEBUG_LEVEL}
 	)

 	#------------------------------------


Eliminate compatibility hack

Eliminate compatibility hack

This was added for legacy support reasons, we don't need it anymore.

--- toolchain-android.cmake
+++ toolchain-android.cmake
@@ -1,17 +1,3 @@
-if(NOT ANDROID_NDK_TOOL_PREFIX)
-  # Default to the 32-bit toolchain version for legacy compatibility
-  if(0.9.0 VERSION_LESS autowiring_VERSION)
-    message(FATAL_ERROR "Eliminate this compatibility hack")
-  endif()
-
-  if($ENV{ARMv8})
-    include(${CMAKE_CURRENT_LIST_DIR}/toolchain-android64.cmake)
-  else()
-    include(${CMAKE_CURRENT_LIST_DIR}/toolchain-android32.cmake)
-  endif()
-  return()
-endif()
-
 set(CMAKE_SYSTEM_NAME Linux)
 set(CMAKE_SYSTEM_PROCESSOR arm)
 set(CMAKE_SYSTEM_VERSION 1)


BUG: setting unused variable named '0' from macro

config/cmake/ConfigureChecks.cmake(291):  if(TRUE )
config/cmake/ConfigureChecks.cmake(292):  if(0 MATCHES 0 )
config/cmake/ConfigureChecks.cmake(293):  set(0 1 CACHE INTERNAL Have C function maximum decimal precision for C )

Setting the variable named "0" to the value "1" potentially
causes subsequent comparisons against the variable named "0"
to be evaluated as the value "1".

set(myvar 1)
if(myvar GREATER 0) #NOTE: Comparison of variables, not values!
  message(STATUS "Good path")
else()
  message(FATAL_ERROR "This should never happen,
  but the value of ${myvar} is not greater than the
  value of ${0}.")
endif()

Fortified cmake code from the develop branch of hdf5

--- Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ConfigureChecks.cmake
+++ Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ConfigureChecks.cmake
@@ -10,13 +10,6 @@
 # help@hdfgroup.org.
 #
 #-----------------------------------------------------------------------------
-# ITK --start
-if(POLICY CMP0075)
-  cmake_policy(SET CMP0075 NEW) # CMake 3.12.1: Include file check macros honor CMAKE_REQUIRED_LIBRARIES.
-endif()
-# ITK --stop
-
-#-----------------------------------------------------------------------------
 # Include all the necessary files for macros
 #-----------------------------------------------------------------------------
 set (HDF_PREFIX "H5")
@@ -35,21 +28,9 @@
 endif ()
 MARK_AS_ADVANCED (HDF5_STRICT_FORMAT_CHECKS)

-#-----------------------------------------------------------------------------
-# Option for --enable-threadsafe
-#-----------------------------------------------------------------------------
-# Recursive RW locks are not supported on Windows (yet)
-if (NOT WINDOWS)
-  option (HDF5_USE_RECURSIVE_RW_LOCKS "Whether to use recursive RW locks for thread-safety" OFF)
-  if (HDF5_USE_RECURSIVE_RW_LOCKS)
-    set (${HDF_PREFIX}_USE_RECURSIVE_RW_LOCKS 1)
-  endif ()
-  MARK_AS_ADVANCED (HDF5_USE_RECURSIVE_RW_LOCKS)
-endif ()
-
 # ----------------------------------------------------------------------
 # Decide whether the data accuracy has higher priority during data
-# conversions.  If not, some hard conversions will still be prefered even
+# conversions.  If not, some hard conversions will still be preferred even
 # though the data may be wrong (for example, some compilers don't
 # support denormalized floating values) to maximize speed.
 #-----------------------------------------------------------------------------
@@ -103,14 +84,6 @@
   set (HDF5_FILE_LOCKING_SETTING "yes")
 else ()
   set (HDF5_FILE_LOCKING_SETTING "no")
-endif ()
-
-#-----------------------------------------------------------------------------
-#  Are we going to use HSIZE_T
-#-----------------------------------------------------------------------------
-option (HDF5_ENABLE_HSIZET "Enable datasets larger than memory" ON)
-if (HDF5_ENABLE_HSIZET)
-  set (${HDF_PREFIX}_HAVE_LARGE_HSIZET 1)
 endif ()

 # so far we have no check for this
@@ -143,8 +116,6 @@
 # ----------------------------------------------------------------------
 # END of WINDOWS Hard code Values
 # ----------------------------------------------------------------------
-
-CHECK_FUNCTION_EXISTS (difftime          ${HDF_PREFIX}_HAVE_DIFFTIME)

 # Find the library containing clock_gettime()
 if (MINGW OR NOT WINDOWS)
@@ -178,7 +149,7 @@
         OUTPUT_VARIABLE OUTPUT
     )
     if (TEST_DIRECT_VFD_WORKS_COMPILE)
-      if (TEST_DIRECT_VFD_WORKS_RUN MATCHES 0)
+      if (TEST_DIRECT_VFD_WORKS_RUN EQUAL "0")
         HDF_FUNCTION_TEST (HAVE_DIRECT)
         set (CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE")
         add_definitions ("-D_GNU_SOURCE")
@@ -224,7 +195,7 @@
 # Header-check flags set in config/cmake_ext_mod/ConfigureChecks.cmake
 # ----------------------------------------------------------------------
 option (HDF5_ENABLE_MIRROR_VFD "Build the Mirror Virtual File Driver" OFF)
-if (H5FD_ENABLE_MIRROR_VFD)
+if (HDF5_ENABLE_MIRROR_VFD)
   if ( ${HDF_PREFIX}_HAVE_NETINET_IN_H AND
        ${HDF_PREFIX}_HAVE_NETDB_H      AND
        ${HDF_PREFIX}_HAVE_ARPA_INET_H  AND
@@ -261,7 +232,7 @@
 # so this one is used.
 #-----------------------------------------------------------------------------
 set (RUN_OUTPUT_PATH_DEFAULT ${CMAKE_BINARY_DIR})
-macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR)
+macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR RETURN_OUTPUT_VAR)
     if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
       message (VERBOSE "Detecting C ${FUNCTION_NAME}")
     endif ()
@@ -276,8 +247,9 @@
         COMPILE_OUTPUT_VARIABLE COMPILEOUT
         RUN_OUTPUT_VARIABLE OUTPUT_VAR
     )
-
-    set (${RETURN_VAR} ${OUTPUT_VAR})
+    #[[ ITK Remove this variable that is never used
+    set (${RETURN_OUTPUT_VAR} ${OUTPUT_VAR})
+    # ITK ]]

     if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
       message (VERBOSE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
@@ -288,9 +260,11 @@
       message (VERBOSE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
     endif ()

-    if (${COMPILE_RESULT_VAR})
-      if (${RUN_RESULT_VAR} MATCHES 0)
-        set (${RUN_RESULT_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION_NAME}")
+    if (COMPILE_RESULT_VAR)
+      if (RUN_RESULT_VAR EQUAL "0")
+        #[[ITK -- start Lookingin into an upstream PR to remove this problematic code
+        set (${RETURN_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION_NAME}")
+        # ITK --stop ]]
         if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
           message (VERBOSE "Testing C ${FUNCTION_NAME} - OK")
         endif ()
@@ -302,7 +276,9 @@
         if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
           message (VERBOSE "Testing C ${FUNCTION_NAME} - Fail")
         endif ()
-        set (${RUN_RESULT_VAR} 0 CACHE INTERNAL "Have C function ${FUNCTION_NAME}")
+        #[[ITK -- start Lookingin into an upstream PR to remove this problematic code
+        set (${RETURN_VAR} 0 CACHE INTERNAL "Have C function ${FUNCTION_NAME}")
+        # ITK --stop ]]
         file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
             "Determining if the C ${FUNCTION_NAME} exists failed with the following output:\n"
             "${OUTPUT_VAR}\n\n")
@@ -333,13 +309,14 @@
 #define C_LDBL_DIG DECIMAL_DIG\n\
 #else\n\
 #define C_LDBL_DIG LDBL_DIG\n\
-#endif\n\nint main() {\nFILE *pFile = fopen(\"pac_Cconftest.out\",\"w\")\\\;\nfprintf(pFile, \"\\%d\\\;\\%d\\\;\", C_LDBL_DIG, C_FLT128_DIG)\\\;\n\nreturn 0\\\;\n}\n
+#endif\n\nint main() {\nprintf(\"\\%d\\\;\\%d\\\;\", C_LDBL_DIG, C_FLT128_DIG)\\\;\n\nreturn 0\\\;\n}\n
      "
 )

-C_RUN ("maximum decimal precision for C" ${PROG_SRC} PROG_RES)
-file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_Cconftest.out" PROG_OUTPUT4)
+C_RUN ("maximum decimal precision for C" ${PROG_SRC} PROG_RES PROG_OUTPUT4)
+#[[ ITK -- start
 message (STATUS "Testing maximum decimal precision for C - ${PROG_OUTPUT4}")
+# ITK -- stop ]]

 # dnl The output from the above program will be:
 # dnl  -- long double decimal precision  --  __float128 decimal precision
@@ -347,7 +324,7 @@
 list (GET PROG_OUTPUT4 0 H5_LDBL_DIG)
 list (GET PROG_OUTPUT4 1 H5_FLT128_DIG)

-if (${HDF_PREFIX}_SIZEOF___FLOAT128 EQUAL 0 OR FLT128_DIG EQUAL 0)
+if (${HDF_PREFIX}_SIZEOF___FLOAT128 EQUAL "0" OR FLT128_DIG EQUAL "0")
   set (${HDF_PREFIX}_HAVE_FLOAT128 0)
   set (${HDF_PREFIX}_SIZEOF___FLOAT128 0)
   set (_PAC_C_MAX_REAL_PRECISION ${H5_LDBL_DIG})
@@ -359,7 +336,9 @@
 else ()
   set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION ${_PAC_C_MAX_REAL_PRECISION})
 endif ()
+#[[ ITK -- start
 message (STATUS "maximum decimal precision for C var - ${${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION}")
+# ITK -- stop ]]

 #-----------------------------------------------------------------------------
 # Macro to determine the various conversion capabilities
@@ -373,7 +352,7 @@
         OUTPUT_VARIABLE OUTPUT
     )
     if (${TEST}_COMPILE)
-      if (${TEST}_RUN MATCHES 0)
+      if (${TEST}_RUN EQUAL "0")
         set (${TEST} 1 CACHE INTERNAL ${msg})
         if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
           message (VERBOSE "${msg}... yes")


Force old build system on new C++14 toolchain too

--- ios-14-1-dep-9-3-armv7-arm64-bitcode-hide.cmake
+++ ios-14-1-dep-9-3-armv7-arm64-bitcode-hide.cmake
@@ -36,6 +36,8 @@
 set(IPHONEOS_ARCHS armv7;arm64)
 set(IPHONESIMULATOR_ARCHS x86_64)

+set(CMAKE_GENERATOR_TOOLSET buildsystem=1) # force "old xcode build system"
+
 include("${CMAKE_CURRENT_LIST_DIR}/compiler/xcode.cmake")
 include("${CMAKE_CURRENT_LIST_DIR}/flags/hidden.cmake")
 include("${CMAKE_CURRENT_LIST_DIR}/os/iphone.cmake")


Better lcov cleanup

Better lcov cleanup

--- CMake/CodeCoverage.cmake
+++ CMake/CodeCoverage.cmake
@@ -146,7 +146,7 @@

 		# Capturing lcov counters and generating report
     COMMAND ${LCOV_PATH} --directory . --capture ${LCOV_SCRIPT} --output-file ${coverage_info}
-		COMMAND ${LCOV_PATH} --remove ${coverage_info} '/usr/*' --remove ${coverage_info} '3rdParty/*' --remove ${coverage_info} 'tests/*' --remove ${coverage_info} '/home/travis/build/mbrucher/boost-build/*' --output-file ${coverage_cleaned}
+		COMMAND ${LCOV_PATH} --remove ${coverage_info} '/usr/*' '3rdParty/*' 'tests/*' '/home/travis/build/mbrucher/boost-build/*' --output-file ${coverage_cleaned}
 		COMMAND ${GENHTML_PATH} -o ${_outputname} ${coverage_cleaned}
 		COMMAND ${CMAKE_COMMAND} -E remove ${coverage_info} ${coverage_cleaned}


Updated CTK

Updated CTK

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -15,7 +15,7 @@

   if(NOT DEFINED CTK_DIR)

-    set(revision_tag abca3189)
+    set(revision_tag 1e3470e7)
     #IF(${proj}_REVISION_TAG)
     #  SET(revision_tag ${${proj}_REVISION_TAG})
     #ENDIF()
@@ -74,10 +74,8 @@

     ExternalProject_Add(${proj}
       LIST_SEPARATOR ${sep}
-#      URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
-#      URL /Users/fetzer/proj/ctk/CTK/CTK-XNAT-Upload.tar.gz
-      URL https://www.dropbox.com/s/imutmjs81ox9vsi/CTK-XNAT-Upload.tar.gz
-      URL_MD5 c495e7125451b27e557fb8cc4e3f31f2
+      URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
+      URL_MD5 4cd017f7b4ac5ee9b396f4e7d0ed5024
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}


NEW: build profile for building in release mode w/ Debug information

--- CMakeLists.default.cmake
+++ CMakeLists.default.cmake
@@ -9,7 +9,7 @@

 if (NOT CMAKE_BUILD_TYPE)
 	set(CMAKE_BUILD_TYPE Debug CACHE STRING
-      	"Choose the type of build, options are: Debug Release."
+      	"Choose the type of build, options are: Debug, RelWithDebInfo or Release."
       	FORCE
 	)
 endif(NOT CMAKE_BUILD_TYPE)
@@ -26,4 +26,8 @@
 	set(CMAKE_C_FLAGS_RELEASE "-O2 -fomit-frame-pointer -D_FORTIFY_SOURCE=1 -fstack-protector-all ${CMAKE_USER_C_FLAGS}" CACHE STRING
 		"Flags used by the compiler during release build." FORCE
 	)
+
+	set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O2 -D_FORTIFY_SOURCE=1 -fstack-protector-all ${CMAKE_USER_C_FLAGS}" CACHE STRING
+		"Flags used by the compiler during release build with debug information." FORCE
+	)
 endif (CMAKE_COMPILER_IS_GNUCXX)


Changed env. variable name "GTKMM_HOME" to "GTKMM_BASEPATH".

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

--- CMakeModules/Gtkmm.cmake
+++ CMakeModules/Gtkmm.cmake
@@ -2,38 +2,38 @@
 # Find is already called in the top-level CMakeLists

 macro (FIND_GTKMM)
-	if (NOT DEFINED ENV{GTKMM_HOME})
-		message (FATAL_ERROR "Environment variable GTKMM_HOME not set! Please set it to point to where you installed gtkmm, http://www.gtkmm.org/download.shtml e.g. \"C:\\Program Files\\gtkmm\"")
+	if (NOT DEFINED ENV{GTKMM_BASEPATH})
+		message (FATAL_ERROR "Environment variable GTKMM_BASEPATH not set! Please set it to point to where you installed gtkmm, http://www.gtkmm.org/download.shtml e.g. \"C:\\Program Files\\gtkmm\"")
 	endif ()
 endmacro ()

 macro (INCLUDE_GTKMM)
 	include_directories (
-		$ENV{GTKMM_HOME}/include/gtk-2.0/gdk
-		$ENV{GTKMM_HOME}/include/atk-1.0
-		$ENV{GTKMM_HOME}/lib/gtk-2.0/include
-		$ENV{GTKMM_HOME}/include/gdkmm-2.4
-		$ENV{GTKMM_HOME}/include/atkmm-1.6
-		$ENV{GTKMM_HOME}/lib/gdkmm-2.4/include
-		$ENV{GTKMM_HOME}/lib/gtkmm-2.4/include
-		$ENV{GTKMM_HOME}/include/cairomm-1.0
-		$ENV{GTKMM_HOME}/include/cairo
-		$ENV{GTKMM_HOME}/include/pango-1.0
-		$ENV{GTKMM_HOME}/include/gtk-2.0
-		$ENV{GTKMM_HOME}/include/pangomm-1.4
-		$ENV{GTKMM_HOME}/include/sigc++-2.0
-		$ENV{GTKMM_HOME}/lib/glib-2.0/include
-		$ENV{GTKMM_HOME}/include/glib-2.0
-		$ENV{GTKMM_HOME}/lib/glibmm-2.4/include
-		$ENV{GTKMM_HOME}/include/glibmm-2.4
-		$ENV{GTKMM_HOME}/include/gtkmm-2.4
-		$ENV{GTKMM_HOME}/lib/sigc++-2.0/include
-		$ENV{GTKMM_HOME}/include/libglade-2.0
-		$ENV{GTKMM_HOME}/include/libglademm-2.4
+		$ENV{GTKMM_BASEPATH}/include/gtk-2.0/gdk
+		$ENV{GTKMM_BASEPATH}/include/atk-1.0
+		$ENV{GTKMM_BASEPATH}/lib/gtk-2.0/include
+		$ENV{GTKMM_BASEPATH}/include/gdkmm-2.4
+		$ENV{GTKMM_BASEPATH}/include/atkmm-1.6
+		$ENV{GTKMM_BASEPATH}/lib/gdkmm-2.4/include
+		$ENV{GTKMM_BASEPATH}/lib/gtkmm-2.4/include
+		$ENV{GTKMM_BASEPATH}/include/cairomm-1.0
+		$ENV{GTKMM_BASEPATH}/include/cairo
+		$ENV{GTKMM_BASEPATH}/include/pango-1.0
+		$ENV{GTKMM_BASEPATH}/include/gtk-2.0
+		$ENV{GTKMM_BASEPATH}/include/pangomm-1.4
+		$ENV{GTKMM_BASEPATH}/include/sigc++-2.0
+		$ENV{GTKMM_BASEPATH}/lib/glib-2.0/include
+		$ENV{GTKMM_BASEPATH}/include/glib-2.0
+		$ENV{GTKMM_BASEPATH}/lib/glibmm-2.4/include
+		$ENV{GTKMM_BASEPATH}/include/glibmm-2.4
+		$ENV{GTKMM_BASEPATH}/include/gtkmm-2.4
+		$ENV{GTKMM_BASEPATH}/lib/sigc++-2.0/include
+		$ENV{GTKMM_BASEPATH}/include/libglade-2.0
+		$ENV{GTKMM_BASEPATH}/include/libglademm-2.4
 	)

 	link_directories (
-		$ENV{GTKMM_HOME}/lib
+		$ENV{GTKMM_BASEPATH}/lib
 	)

 endmacro ()


COMP: On some project configure may not copy right away

--- CheckCXXSourceRuns.cmake
+++ CheckCXXSourceRuns.cmake
@@ -30,7 +30,7 @@
     ENDIF(CMAKE_REQUIRED_INCLUDES)
     SET(CMAKE_EMPTY_INPUT_FILE_CONTENT "${SOURCE}")
     CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/CMakeEmptyInputFile.in"
-      "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.cxx")
+      "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.cxx" IMMEDIATE)

     MESSAGE(STATUS "Performing Test ${COMMENT}")
     TRY_RUN(${VAR} HAVE_${VAR}


use MSVC / intel

use MSVC / intel

--- sandbox/fortranpython/FindF2PY.cmake
+++ sandbox/fortranpython/FindF2PY.cmake
@@ -70,15 +70,27 @@
     SET(OUTPUTS ${C_OUTPUTS} ${F_OUTPUTS})
     MESSAGE("OUTPUTS=${OUTPUTS}")

-    ADD_CUSTOM_COMMAND(
-        OUTPUT ${OUTPUTS}
-        COMMAND ${F2PY_EXECUTABLE}
-        -m ${F2PYMODULE}
-        --lower   # gcc cree du lowercase quel que soit le nom dans le code
-        ${${FSRCS_LIST}}
-        DEPENDS ${${FSRCS_LIST}}
-        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-    )
+    IF(NOT MSVC) # gcc
+        ADD_CUSTOM_COMMAND(
+            OUTPUT ${OUTPUTS}
+            COMMAND ${F2PY_EXECUTABLE}
+            -m ${F2PYMODULE}
+            --lower   # gcc cree du lowercase quel que soit le nom dans le code
+            ${${FSRCS_LIST}}
+            DEPENDS ${${FSRCS_LIST}}
+            WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+        )
+    ELSE() # MSVC + Intel Fortran => uppercase/no underscore
+        ADD_CUSTOM_COMMAND(
+            OUTPUT ${OUTPUTS}
+            COMMAND ${F2PY_EXECUTABLE}
+            -m ${F2PYMODULE}
+            #--no-lower
+            ${${FSRCS_LIST}}
+            DEPENDS ${${FSRCS_LIST}}
+            WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+        )
+    ENDIF()

     # static library "XXXfor" with the fortran source and fortran wrappers
     ADD_LIBRARY(${F2PYMODULE}for ${${FSRCS_LIST}} ${F_OUTPUTS})
@@ -90,6 +102,10 @@
     TARGET_INCLUDE_DIRECTORIES(${F2PYMODULE} PRIVATE ${Python3_INCLUDE_DIRS})
     TARGET_INCLUDE_DIRECTORIES(${F2PYMODULE} PRIVATE ${F2PY_SRC_DIR})
     TARGET_INCLUDE_DIRECTORIES(${F2PYMODULE} PRIVATE ${NUMPY_PATH})
+    IF(MSVC) # MSVC + Intel Fortran => uppercase/no underscore
+        target_compile_definitions(${F2PYMODULE} PUBLIC NO_APPEND_FORTRAN)
+        target_compile_definitions(${F2PYMODULE} PUBLIC UPPERCASE_FORTRAN)
+    ENDIF()
     # ...linked to fortran routines and python
     TARGET_LINK_LIBRARIES(${F2PYMODULE} ${F2PYMODULE}for ${Python3_LIBRARIES})


cmake: fixes for symlink

cmake: fixes for symlink

--- scripts/cmake/ElektraUninstall.cmake
+++ scripts/cmake/ElektraUninstall.cmake
@@ -36,8 +36,12 @@
 # = Files =
 # =========

-string (APPEND files "${CMAKE_INSTALL_PREFIX}/share/java/libelektra4j.jar")
-string (APPEND files "${CMAKE_INSTALL_PREFIX}/share/java/libelektra4j.pom.xml")
+# manual fixes for symlinks:
+string (APPEND files "\n${CMAKE_INSTALL_PREFIX}/share/java/libelektra4j.jar")
+string (APPEND files "\n${CMAKE_INSTALL_PREFIX}/share/java/libelektra4j.pom.xml")
+string (APPEND files "\n${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/libelektraintercept.so")
+string (APPEND files "\n${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/libelektragetenv.so.0")
+string (APPEND files "\n${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/libelektragetenv.so")

 string (REGEX REPLACE "\n" ";" files "${files}")
 foreach (file ${files})


update: MSVC compile flags (warning level + language extensions)

--- share/hugh/cmake/compiler/msvc.cmake
+++ share/hugh/cmake/compiler/msvc.cmake
@@ -22,7 +22,7 @@
 list(APPEND DISABLED_WARNINGS /wd4100)

 # nonstandard extension used : nameless struct/union
-list(APPEND DISABLED_WARNINGS /wd4201)
+#list(APPEND DISABLED_WARNINGS /wd4201)

 if("${CMAKE_LIBRARY_TYPE}" STREQUAL "SHARED")
   # 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
@@ -56,7 +56,10 @@
 # C1128: number of sections exceeded object file format limit: compile with /bigobj
 list(APPEND DISABLED_WARNINGS /bigobj)

+# warning level + language extensions:
+# [https://github.com/g-truc/glm/pull/587#issuecomment-265731442]
 list(APPEND GLOBAL_COMPILER_FLAGS /W4)  # warn almost everything
+list(APPEND GLOBAL_COMPILER_FLAGS /Za)  # disable language extension
 list(APPEND GLOBAL_COMPILER_FLAGS ${DISABLED_WARNINGS})
 list(APPEND GLOBAL_COMPILER_FLAGS /EHa) # exception-handling for asynchronous (structured) and
                                         # synchronous (C++) exceptions


Use double-conversion hunter release.

Use double-conversion hunter release.

--- cmake/projects/double-conversion/hunter.cmake
+++ cmake/projects/double-conversion/hunter.cmake
@@ -2,7 +2,7 @@

 # Load used modules
 include(hunter_add_version)
-include(hunter_configuration_types)
+include(hunter_cacheable)
 include(hunter_download)
 include(hunter_pick_scheme)

@@ -12,11 +12,10 @@
     VERSION
     "3.0.0"
     URL
-    "https://github.com/google/double-conversion/archive/v3.0.0.tar.gz"
-    SHA1
-    d900d4d946beb493a03cd6c9b180ed2bcbd0f20e
+    "https://github.com/hunter-packages/double-conversion/archive/v3.0.0-hunter-release.tar.gz"
+    SHA1 8c28e2f7814922630ebe8cbc048488ff04b4430f
 )

-hunter_configuration_types(double-conversion CONFIGURATION_TYPES Release)
 hunter_pick_scheme(DEFAULT url_sha1_cmake)
+hunter_cacheable(double-conversion)
 hunter_download(PACKAGE_NAME double-conversion)


Tweak CMake Find script

Tweak CMake Find script

[ ] May break build
[ ] May break existing applications (see CHANGES.txt)
[ ] Bugfix
[x] New Feature
[x] Cleanup
[ ] Optimization
[ ] Documentation

--- FindEqualizer.cmake
+++ FindEqualizer.cmake
@@ -50,6 +50,8 @@
 #    EQUALIZER_INCLUDE_DIRS - Where to find the headers
 #
 #    EQUALIZER_LIBRARIES - The Equalizer libraries
+#
+#    EQUALIZER_DEB_DEPENDENCIES - A list of dependencies for CPack deb generator
 #
 #==================================
 # Example Usage:
@@ -210,6 +212,10 @@
     set(_eq_LIBRARY)
     set(_eq_fabric_LIBRARY)
     set(_eq_INCLUDE_DIR)
+else()
+  math(EXPR _eq_NEXT_MINOR ${EQUALIZER_VERSION_MINOR}+1)
+  set(EQUALIZER_DEB_DEPENDENCIES
+    "equalizer (>=${EQUALIZER_VERSION}), equalizer (<<${EQUALIZER_VERSION_MAJOR}.${_eq_NEXT_MINOR})")
 endif()

 set(EQUALIZER_INCLUDE_DIRS ${_eq_INCLUDE_DIR})


Use qt 4.8.5 from git repository instead of 4.8.3 download, because the old version doesn’t compile on OSX 10.9 with clang.

--- qt4.cmake
+++ qt4.cmake
@@ -17,11 +17,9 @@
 include(libtiff)
 include(freetype2)

-external_source (qt4
-    4.8.3
-    qt-everywhere-opensource-src-4.8.3.tar.gz
-    a663b6c875f8d7caa8ac9c30e4a4ec3b
-    http://download.qt-project.org/official_releases/qt/4.8/4.8.3)
+external_git_repo(qt4
+	4.8
+	https://github.com/qtproject/qt)

 message ("Installing ${qt4_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")

@@ -42,8 +40,8 @@
 ExternalProject_Add(${qt4_NAME}
     DEPENDS             ${freetype2_NAME}
     PREFIX              ${BUILDEM_DIR}
-    URL                 ${qt4_URL}
-    URL_MD5             ${qt4_MD5}
+	GIT_REPOSITORY	${qt4_URL}
+	GIT_TAG		v4.8.5
     UPDATE_COMMAND      ""
     PATCH_COMMAND       ""
     CONFIGURE_COMMAND   ${BUILDEM_ENV_STRING} echo "yes" | ${qt4_SRC_DIR}/configure # pipe "yes" to stdin to accept the license.


Further optimize compile options

Further optimize compile options

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -44,6 +44,7 @@

 set(DEFAULT_COMPILE_OPTIONS)

+# MSVC compiler options
 if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC")

     set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
@@ -92,7 +93,8 @@
     )
 endif ()

-if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") # GCC 4.7 and above
+# GCC and Clang compiler options
+if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
     set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
         -Wall
         -Wextra
@@ -105,33 +107,21 @@
         -Wswitch
         -Wswitch-default
         -Wuninitialized
-        -Wmaybe-uninitialized
         -Wmissing-field-initializers

-        $<$<VERSION_GREATER:$<CXX_COMPILER_VERSION>,4.8>:
-            -Wpedantic
-            -Wreturn-local-addr
+        $<$<CXX_COMPILER_ID:GNU>:
+            -Wmaybe-uninitialized
+
+            $<$<VERSION_GREATER:$<CXX_COMPILER_VERSION>,4.8>:
+                -Wpedantic
+                -Wreturn-local-addr
+            >
         >
-    )
-endif ()
-
-if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") # Clang 3.4 and above
-    set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
-        -Wall
-        -Wextra
-        -Wunused
-        -Wpedantic
-
-        -Wreorder
-        -Wignored-qualifiers
-        -Wmissing-braces
-        -Wreturn-type
-        -Wreturn-stack-address
-        -Wswitch
-        -Wswitch-default
-        -Wuninitialized
-        -Wmissing-field-initializers
-
+
+        $<$<CXX_COMPILER_ID:Clang>:
+            -Wreturn-stack-address
+        >
+
         $<$<PLATFORM_ID:"Darwin">:
             -pthread
         >
@@ -145,8 +135,8 @@

 set(DEFAULT_LINKER_OPTIONS)

-# Use pthreads on linux and mingw
-if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND "${CMAKE_SYSTEM_NAME}" MATCHES "Linux"))
+# Use pthreads on mingw and linux
+if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR "${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
     set(DEFAULT_LINKER_OPTIONS
         -pthread
     )


Search for clang-tidy without a version suffix

This is the default naming scheme used by the llvm package in
homebrew

--- cmake/Findclang_tidy.cmake
+++ cmake/Findclang_tidy.cmake
@@ -13,6 +13,7 @@
         clang-tidy-3.8
         clang-tidy-3.9
         clang-tidy-4.0
+        clang-tidy
     PATHS
         "${CLANG_TIDY_DIR}"
 )


CMake: asan: clang also has -fsanitize-address-use-after-scope

--- cmake/compiler-flags.cmake
+++ cmake/compiler-flags.cmake
@@ -56,12 +56,16 @@
     CMAKE_SHARED_LINKER_FLAGS_COVERAGE
     CMAKE_SHARED_MODULE_FLAGS_COVERAGE )

+set(asan "-O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-common -U_FORTIFY_SOURCE -fsanitize=address -fstack-protector-strong")
+if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+  set(asan "${asan} -fsanitize-address-use-after-scope")
+endif()
 SET(CMAKE_CXX_FLAGS_ASAN
-    "-O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-common -U_FORTIFY_SOURCE -fsanitize=address -fstack-protector-strong"
+    "${asan}"
     CACHE STRING "Flags used by the C++ compiler during ASAN builds."
     FORCE )
 SET(CMAKE_C_FLAGS_ASAN
-    "-O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-common -U_FORTIFY_SOURCE -fsanitize=address -fstack-protector-strong"
+    "${asan}"
     CACHE STRING "Flags used by the C compiler during ASAN builds."
     FORCE )
 MARK_AS_ADVANCED(


Add iostreams as required component

Add iostreams as required component

git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@1994 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -10,7 +10,7 @@
   SET(Boost_ADDITIONAL_VERSIONS "1.47" "1.47.0")
 endif(${CMAKE_VERSION} VERSION_LESS 2.8.5)

-find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time)
+find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time iostreams)

 if(Boost_FOUND)
   # Obtain diagnostic information about Boost's automatic linking outputted


qi_create_script: COPYONLY

qi_create_script: COPYONLY

--- cmake/qibuild/target.cmake
+++ cmake/qibuild/target.cmake
@@ -133,7 +133,7 @@
   qi_debug("qi_create_script(${name})")
   cmake_parse_arguments(ARG "NO_INSTALL" "SUBFOLDER" "" ${ARGN})

-  configure_file("${source}" "${QI_SDK_DIR}/${QI_SDK_BIN}/${ARG_SUBFOLDER}/${name}")
+  configure_file("${source}" "${QI_SDK_DIR}/${QI_SDK_BIN}/${ARG_SUBFOLDER}/${name}" COPYONLY)
   if(NOT ARG_NO_INSTALL)
     install(PROGRAMS    "${QI_SDK_DIR}/${QI_SDK_BIN}/${ARG_SUBFOLDER}/${name}"
             COMPONENT   binary