add explicit catch dependency for tests that use it (#2126)

--- Code/cmake/Modules/RDKitUtils.cmake
+++ Code/cmake/Modules/RDKitUtils.cmake
@@ -166,6 +166,7 @@
     target_link_libraries(${RDKTEST_NAME} ${RDKTEST_LINK_LIBRARIES})
     add_test(${RDKTEST_NAME} ${EXECUTABLE_OUTPUT_PATH}/${RDKTEST_NAME})
     #ParseAndAddCatchTests(${RDKTEST_NAME})
+    add_dependencies(${RDKTEST_NAME} catch)
   endif(RDK_BUILD_CPP_TESTS)
 endmacro(rdkit_catch_test)


Reword the description of SUNDIALS_INCLUDE_DIRS.

--- cmake/modules/FindSUNDIALS.cmake
+++ cmake/modules/FindSUNDIALS.cmake
@@ -24,15 +24,15 @@
 #   SUNDIALS_LIB_SER
 #   SUNDIALS_INCLUDE_DIR
 #
-# Note that, unlike most other packages, SUNDIALS headers are typically
-# installed in multiple directories; for example, a typical system installation
-# may distribute the headers in the following way:
+# Note that sundials headers are typically installed in several directories,
+# e.g.,
 #
-# /usr/include/ida/ida.h
-# /usr/include/kinsol/kinsol.h
-# /usr/include/sundials/sundials_nvector.h
+# /prefix/include/ida/ida.h
+# /prefix/include/kinsol/kinsol.h
+# /prefix/include/sundials/sundials_nvector.h
 #
-# so, in this case, SUNDIALS_INCLUDE_DIR would just be /usr/include/.
+# Here SUNDIALS_INCLUDE_DIR is just '/prefix/include/', not
+# '/prefix/include/sundials/'.

 SET(SUNDIALS_DIR "" CACHE PATH "An optional hint to a SUNDIALS_DIR installation")
 SET_IF_EMPTY(SUNDIALS_DIR "$ENV{SUNDIALS_DIR}")


CMake: Query whether trilinos requires CXX11 support

--- cmake/modules/FindTRILINOS.cmake
+++ cmake/modules/FindTRILINOS.cmake
@@ -25,6 +25,7 @@
 #   TRILINOS_VERSION_MAJOR
 #   TRILINOS_VERSION_MINOR
 #   TRILINOS_VERSION_SUBMINOR
+#   TRILINOS_WITH_MANDATORY_CXX11
 #   TRILINOS_WITH_MPI
 #   TRILINOS_SUPPORTS_CPP11
 #   TRILINOS_HAS_C99_TR1_WORKAROUND
@@ -76,7 +77,8 @@
 ENDIF()

 #
-# Look for the one include file that we'll query for further information:
+# Look for Epetra_config.h - we'll query it to determine MPI and 64bit
+# indices support:
 #
 DEAL_II_FIND_FILE(EPETRA_CONFIG_H Epetra_config.h
   HINTS ${Trilinos_INCLUDE_DIRS}
@@ -108,6 +110,28 @@
     SET(TRILINOS_WITH_NO_64BITS_INDICES TRUE)
   ELSE()
     SET(TRILINOS_WITH_NO_64BITS_INDICES FALSE)
+  ENDIF()
+ENDIF()
+
+#
+# Look for Sacado_config.h - we'll query it to determine C++11 support:
+#
+DEAL_II_FIND_FILE(SACADO_CONFIG_H Sacado_config.h
+  HINTS ${Trilinos_INCLUDE_DIRS}
+  NO_DEFAULT_PATH NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH
+  NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH
+  )
+
+SET(TRILINOS_WITH_MANDATORY_CXX11 FALSE)
+IF(EXISTS ${SACADO_CONFIG_H})
+  #
+  # Determine whether Trilinos was configured with C++11 support and
+  # enabling C++11 in deal.II is mandatory (Trilinos 12.0.1 and later).
+  #
+  FILE(STRINGS "${SACADO_CONFIG_H}" SACADO_CXX11_STRING
+    REGEX "#define HAVE_SACADO_CXX11")
+  IF(NOT "${SACADO_CXX11_STRING}" STREQUAL "")
+    SET(TRILINOS_WITH_MANDATORY_CXX11 TRUE)
   ENDIF()
 ENDIF()


Fix arm64 CMake configuration

Fix arm64 CMake configuration

--- cmake/modules/SwiftSupport.cmake
+++ cmake/modules/SwiftSupport.cmake
@@ -17,8 +17,12 @@
 function(get_swift_host_arch result_var_name)
   if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
     set("${result_var_name}" "x86_64" PARENT_SCOPE)
-  elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
-    set("${result_var_name}" "aarch64" PARENT_SCOPE)
+  elseif ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "AArch64|aarch64|arm64")
+    if(CMAKE_SYSTEM_NAME MATCHES Darwin)
+      set("${result_var_name}" "arm64" PARENT_SCOPE)
+    else()
+      set("${result_var_name}" "aarch64" PARENT_SCOPE)
+    endif()
   elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ppc64")
     set("${result_var_name}" "powerpc64" PARENT_SCOPE)
   elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ppc64le")
@@ -31,6 +35,8 @@
     set("${result_var_name}" "armv7" PARENT_SCOPE)
   elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "armv7-a")
     set("${result_var_name}" "armv7" PARENT_SCOPE)
+  elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "amd64")
+    set("${result_var_name}" "amd64" PARENT_SCOPE)
   elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64")
     set("${result_var_name}" "x86_64" PARENT_SCOPE)
   elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "IA64")


remove optional_files dependency

remove optional_files dependency

This is a remainder of a rebase onto master

--- cmake/nuttx/px4_impl_nuttx.cmake
+++ cmake/nuttx/px4_impl_nuttx.cmake
@@ -435,7 +435,7 @@
 			--obj romfs.o
 			--var romfs_img
 			--bin romfs.bin
-		DEPENDS ${romfs_src_files} ${extras} ${optional_files}
+		DEPENDS ${romfs_src_files} ${extras}
 		WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 		)
 	add_library(${OUT} STATIC romfs.o)


Remove relative paths in cmake package-config

Using relative paths in the cmake config can result in broken
dependencies in downstream packaging when embree is a private
dependency.  This converts the relative paths generated in
embree-config.cmake from /foo/bar/baz/../../libFoo.so to /foo/libFoo.so

--- common/cmake/embree-config.cmake
+++ common/cmake/embree-config.cmake
@@ -15,6 +15,7 @@
 ## ======================================================================== ##

 SET(EMBREE_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/@EMBREE_RELATIV_ROOT_DIR@)
+GET_FILENAME_COMPONENT(EMBREE_ROOT_DIR "${EMBREE_ROOT_DIR}" ABSOLUTE)

 SET(EMBREE_INCLUDE_DIRS ${EMBREE_ROOT_DIR}/@CMAKE_INSTALL_INCLUDEDIR@)
 SET(EMBREE_LIBRARY ${EMBREE_ROOT_DIR}/@CMAKE_INSTALL_LIBDIR@/@EMBREE_LIBRARY_NAME@)


Fix position of points with no weights

Fix position of points with no weights

They should not be moved to the origin (0,0,0) but keep their original
position.

--- CMake/Superbuild/External_SOFA.cmake
+++ CMake/Superbuild/External_SOFA.cmake
@@ -85,7 +85,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "git://public.kitware.com/Bender/SOFA.git"
-    GIT_TAG "d1d5775fefefd472a2f6b48ceb06a4c3626269d7"
+    GIT_TAG "d7967a8d58adf96db4d311fb937e91b6c69b7249"
     INSTALL_COMMAND ""
     UPDATE_COMMAND ""
     CMAKE_GENERATOR ${gen}


[Travis] ITK fix.

[Travis] ITK fix.

--- CMake/ctkTravisDashboardScript.cmake
+++ CMake/ctkTravisDashboardScript.cmake
@@ -60,7 +60,7 @@

 set(ADDITIONNAL_CMAKECACHE_OPTION "
 CTK_USE_SYSTEM_DCMTK:BOOL=ON
-CTK_USE_SYSTEM_ITK:BOOL=ON
+#CTK_USE_SYSTEM_ITK:BOOL=ON
 ITK_DIR:PATH=/usr/lib/InsightToolkit

 CTK_APP_ctkCommandLineModuleExplorer:BOOL=ON


cook: upgrade hwloc version

cook: upgrade hwloc version

Commit[1] introduced code change which depends on hwloc-2.2.0+.
This version is only provided Fedora-31. On other distros user
needs to build it from source.
So update version requirement in cook recipe.

[1]: https://github.com/scylladb/seastar/commit/c231ab05e406d24146ae79ad48624bef3a799908

Change-Id: Ibe1e076524a098d5fb2654114b7e1bcaccc4d1e1
Signed-off-by: Jun He <05c4aea3b428e9f4cbf962ab56f389db00194977@arm.com>
Message-Id: <20201125094508.6282-1-05c4aea3b428e9f4cbf962ab56f389db00194977@arm.com>

--- cooking_recipe.cmake
+++ cooking_recipe.cmake
@@ -191,8 +191,8 @@
     numactl
     libpciaccess
   EXTERNAL_PROJECT_ARGS
-    URL https://download.open-mpi.org/release/hwloc/v1.11/hwloc-1.11.5.tar.gz
-    URL_MD5 8f5fe6a9be2eb478409ad5e640b2d3ba
+    URL https://download.open-mpi.org/release/hwloc/v2.2/hwloc-2.2.0.tar.gz
+    URL_MD5 762c93cdca3249eed4627c4a160192bd
     CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --srcdir=<SOURCE_DIR>
     BUILD_COMMAND <DISABLE>
     INSTALL_COMMAND ${make_command} install)


toolbox: add disable_if macro

toolbox: add disable_if macro

--- lib/cmake/macros.cmake
+++ lib/cmake/macros.cmake
@@ -61,3 +61,33 @@
 		set_source_files_properties(${GLOB_FILES} PROPERTIES COMPILE_FLAGS -w)
 	endif()
 endmacro(disable_compiler_warnings)
+
+# disable variable depending on a condition
+#
+# CALL: disable_if(OPT COND)
+#   OPT: otpion/variable to disable
+#   COND: conditional option to use
+#
+macro(disable_if OPT COND)
+	if(${COND})
+		if(NOT __${OPT} AND ${OPT})
+			set(__${OPT} ${${OPT}} CACHE INTERNAL "INTERNAL CACHE FOR ${OPT}")
+		endif()
+		if(NOT __${OPT}_HELPSTRING)
+			get_property(__${OPT}_HELPSTRING CACHE ${OPT} PROPERTY HELPSTRING)
+			set(__${OPT}_HELPSTRING CACHE INTERNAL "${__${OPT}_HELPSTRING}")
+		endif()
+		unset(${OPT} CACHE)
+	else()
+		if(NOT __${OPT} AND ${OPT}) # AND NOT BVS_MODULE_HOTSWAP STREQUAL "")
+			set(__${OPT} ${${OPT}} CACHE INTERNAL "INTERNAL CACHE FOR ${OPT}")
+		endif()
+		if(NOT __${OPT}_HELPSTRING)
+			get_property(HELPSTRING CACHE ${OPT} PROPERTY HELPSTRING)
+			set(__${OPT}_HELPSTRING "${HELPSTRING}" CACHE INTERNAL "")
+		endif()
+		set(${OPT} ${__${OPT}} CACHE BOOL "${__${OPT}_HELPSTRING}" FORCE)
+		unset(__${OPT} CACHE)
+		unset(__${OPT}_HELPSTRING CACHE)
+	endif()
+endmacro(disable_if)


build: update service.cmake

build: update service.cmake

--- etc/service.cmake
+++ etc/service.cmake
@@ -293,6 +293,7 @@
     cxxabi
     libos
     libc
+    libos
     libm
     libg
     libgcc


cmake: Removed CXX_FLAGS from link cmd, replaced hardcoded tools with ones set in CMake

--- etc/service.cmake
+++ etc/service.cmake
@@ -145,7 +145,7 @@

 # linker stuff
 set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS) # this removed -rdynamic from linker output
-set(CMAKE_CXX_LINK_EXECUTABLE "/usr/bin/ld -o  <TARGET> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES>")
+set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_LINKER> -o <TARGET> <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES>")

 set(BUILD_SHARED_LIBRARIES OFF)
 set(CMAKE_EXE_LINKER_FLAGS "-static")
@@ -215,7 +215,7 @@
     $ENV{INCLUDEOS_PREFIX}/includeos/lib/crtn.o
   )

-set(STRIP_LV strip --strip-all ${BINARY})
+set(STRIP_LV ${CMAKE_STRIP} --strip-all ${BINARY})
 if (debug)
   set(STRIP_LV /bin/true)
 endif()
@@ -223,7 +223,7 @@
 add_custom_command(
   TARGET  service POST_BUILD
   COMMAND $ENV{INCLUDEOS_PREFIX}/includeos/bin/elf_syms ${BINARY}
-  COMMAND objcopy --update-section .elf_symbols=_elf_symbols.bin ${BINARY} ${BINARY}
+  COMMAND ${CMAKE_OBJCOPY} --update-section .elf_symbols=_elf_symbols.bin ${BINARY} ${BINARY}
   COMMAND ${STRIP_LV}
   COMMAND rm _elf_symbols.bin
 )


ENH: Upgrade JPEG to 1.5.3

ENH: Upgrade JPEG to 1.5.3

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

 ExternalProject_Add(JPEG
   PREFIX JPEG
-  URL "https://downloads.sourceforge.net/project/libjpeg-turbo/1.4.2/libjpeg-turbo-1.4.2.tar.gz"
-  URL_MD5 86b0d5f7507c2e6c21c00219162c3c44
+  URL "https://downloads.sourceforge.net/project/libjpeg-turbo/1.5.3/libjpeg-turbo-1.5.3.tar.gz"
+  URL_MD5 7c82f0f6a3130ec06b8a4d0b321cbca3
   SOURCE_DIR ${JPEG_SB_SRC}
   BINARY_DIR ${JPEG_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}


bump version

bump version

--- CMakeModules/FCLVersion.cmake
+++ CMakeModules/FCLVersion.cmake
@@ -1,7 +1,7 @@
 # set the version in a way CMake can use
 set(FCL_MAJOR_VERSION 0)
 set(FCL_MINOR_VERSION 2)
-set(FCL_PATCH_VERSION 3)
+set(FCL_PATCH_VERSION 4)
 set(FCL_VERSION "${FCL_MAJOR_VERSION}.${FCL_MINOR_VERSION}.${FCL_PATCH_VERSION}")

 # increment this when we have ABI changes


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   05)
+SET(KWSYS_DATE_STAMP_DAY   06)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


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   24)
+SET(KWSYS_DATE_STAMP_DAY   25)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- 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 07)
+SET(KWSYS_DATE_STAMP_MONTH 08)

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


add devel space to Python environment to allow .cfg files to import them

--- cmake/dynamic_reconfigure-macros.cmake
+++ cmake/dynamic_reconfigure-macros.cmake
@@ -27,10 +27,10 @@
     set(_output_wikidoc ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/docs/${_cfgonly}Config.wikidoc)
     set(_output_usage ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/docs/${_cfgonly}Config-usage.dox)

-    # in case dynamic_reconfigure has been built within the same CMake context
-    # we need to explicitly add it to the PYTHONPATH
+    # we need to explicitly add the devel space to the PYTHONPATH
+    # since it might contain dynamic_reconfigure or Python code of the current package
     set("_CUSTOM_PYTHONPATH_ENV")
-    if(EXISTS "${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_PYTHON_DESTINATION}/dynamic_reconfigure")
+    if(EXISTS "${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_PYTHON_DESTINATION}")
       configure_file(
         "${dynamic_reconfigure_BASE_DIR}/cmake/setup_custom_pythonpath.sh.in"
         "setup_custom_pythonpath.sh"


Try to suppress spurious Mac ld warnings (lib/release/Release dir). Mindful that some autobuild packages populate only packages/lib/release (rather than packages/lib/debug), Linking.cmake always appends packages/lib/release to CMake's link_directories() directive. But since CMake always appends CMAKE_BUILD_TYPE to those directories, we end up with a phantom packages/lib/release/Release directory on the search path. This would be harmless except that the Mac's 'ld' command produces a warning. These warnings quickly make TC's "Important Messages" output useless. Try appending packages/lib/release only when the build type isn't already Release.

--- indra/cmake/Linking.cmake
+++ indra/cmake/Linking.cmake
@@ -13,7 +13,7 @@
   set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/bin)
 elseif (DARWIN)
   set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
-  set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs/\$(CONFIGURATION)")
+  set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs")
 endif (WINDOWS)

 # Autobuild packages must provide 'release' versions of libraries, but may provide versions for
@@ -33,7 +33,14 @@
   set(AUTOBUILD_LIBS_INSTALL_DIRS ${AUTOBUILD_INSTALL_DIR}/lib/${CMAKE_BUILD_TYPE_LOWER})
 endif(WINDOWS OR DARWIN)

-list(APPEND AUTOBUILD_LIBS_INSTALL_DIRS ${ARCH_PREBUILT_DIRS_RELEASE})
+if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
+  # When we're building something other than Release, append the
+  # packages/lib/release directory to deal with autobuild packages that don't
+  # provide (e.g.) lib/debug libraries.
+  list(APPEND AUTOBUILD_LIBS_INSTALL_DIRS ${ARCH_PREBUILT_DIRS_RELEASE})
+  message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}, extending AUTOBUILD_LIBS_INSTALL_DIRS")
+endif (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
+message(STATUS "For ${CMAKE_BUILD_TYPE}, AUTOBUILD_LIBS_INSTALL_DIRS: ${AUTOBUILD_LIBS_INSTALL_DIRS}")
 link_directories(${AUTOBUILD_LIBS_INSTALL_DIRS})

 if (LINUX)


Add gloperate-text to cmake gloperate-config

--- gloperate-config.cmake
+++ gloperate-config.cmake
@@ -12,6 +12,7 @@
     gloperate-glfw
     gloperate-osg
     gloperate-assimp
+    gloperate-text
 )


SVN_SILENT made messages (.desktop file)

--- plugins/pintxo/ktpaccountskcm_plugin_pintxo.desktop.cmake
+++ plugins/pintxo/ktpaccountskcm_plugin_pintxo.desktop.cmake
@@ -7,6 +7,7 @@
 Comment[de]=Eigene Benutzeroberfläche zum Einrichten von Zugängen, die die Pintxo-Verbindungsverwaltung verwenden.
 Comment[es]=Interfaz de configuración de cuentas personalizadas para las cuentas que usen el gestor de conexiones Pintxo.
 Comment[fi]=Pintxo-yhteyshallintaa käyttävien tilien mukautettu hallintakäyttöliittymä.
+Comment[hu]=Egyedi beállítófelület a Pintxo kapcsolatkezelőt használó azonosítókhoz.
 Comment[ia]=Interfacie de usator pro configuration de conto personalisate pro contos usante le gerente de connexion Pintxo
 Comment[it]=Interfaccia utente personalizzata di configurazione account per account che usano il gestore di connessioni Pintxo.
 Comment[kk]=Pintxo байланыс менеджерін қолданатын тіркелгі пайдаланушы интерфейс параметрлерін ыңғайлау.
@@ -36,6 +37,7 @@
 Name[de]=Benutzeroberfläche zur Einrichtung von Pintxo-Zugängen
 Name[es]=Interfaz de configuración de cuentas Pintxo
 Name[fi]=Pintxo-tilinmäärityksen käyttöliittymä
+Name[hu]=Pintxo azonosítóbeállító felület
 Name[ia]=Interfacie de usator de configuration de conto de Pintxo
 Name[it]=Interfaccia utente di configurazione account Pintxo
 Name[kk]=Pintxo тіркелгі пайдаланушы интерфейсін баптау


fix cmake warnings (gcc Debug)

fix cmake warnings (gcc Debug)

issue https://github.com/smanders/externpro/issues/274#issuecomment-656881992

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -1994,16 +1994,22 @@

 macro(xpSetFlagsGccDebug)
   if(NOT DEFINED XP_USE_ASAN)
-    set(XP_USE_ASAN OFF)
-  endif()
-  cmake_dependent_option(XP_USE_ASAN "use address sanitizer" ${XP_USE_ASAN}
-    "CMAKE_BUILD_TYPE STREQUAL Debug" ${XP_USE_ASAN}
+    set(NV_USE_ASAN OFF) # (NV: normal variable) 'cmake --help-policy CMP0077'
+  else()
+    set(NV_USE_ASAN ${XP_USE_ASAN})
+    unset(XP_USE_ASAN)
+  endif()
+  cmake_dependent_option(XP_USE_ASAN "use address sanitizer" ${NV_USE_ASAN}
+    "CMAKE_BUILD_TYPE STREQUAL Debug" ${NV_USE_ASAN}
     )
   if(NOT DEFINED XP_COVERAGE)
-    set(XP_COVERAGE OFF)
-  endif()
-  cmake_dependent_option(XP_COVERAGE "generate coverage information" ${XP_COVERAGE}
-    "CMAKE_BUILD_TYPE STREQUAL Debug" ${XP_COVERAGE}
+    set(NV_COVERAGE OFF) # (NV: normal variable) 'cmake --help-policy CMP0077'
+  else()
+    set(NV_COVERAGE ${XP_COVERAGE})
+    unset(XP_COVERAGE)
+  endif()
+  cmake_dependent_option(XP_COVERAGE "generate coverage information" ${NV_COVERAGE}
+    "CMAKE_BUILD_TYPE STREQUAL Debug" ${NV_COVERAGE}
     )
   if(XP_USE_ASAN)
     include(CMakePushCheckState)


CI: adaptations for windows

CI: adaptations for windows

--- CI/prepare_superbuild.cmake
+++ CI/prepare_superbuild.cmake
@@ -36,7 +36,13 @@
 set ( SUPERBUILD_SOURCE_DIR "${OTB_SOURCE_DIR}/SuperBuild" )

 set ( CTEST_BUILD_CONFIGURATION "Release" )
-set ( CTEST_CMAKE_GENERATOR "Unix Makefiles" )
+if(WIN32)
+  set ( CTEST_CMAKE_GENERATOR "NMake Makefiles JOM" )
+  set ( CTEST_BUILD_FLAGS "/S" )
+else()
+  set ( CTEST_CMAKE_GENERATOR "Unix Makefiles" )
+  set ( CTEST_BUILD_FLAGS "-j16")
+endif()
 set ( PROJECT_SOURCE_DIR "${SUPERBUILD_SOURCE_DIR}" )
 set ( CTEST_SOURCE_DIRECTORY "${SUPERBUILD_SOURCE_DIR}" )
 set ( CTEST_BINARY_DIRECTORY "${OTB_SOURCE_DIR}/build/" )
@@ -57,7 +63,7 @@
 # HACK
 # This is needed because when using return() function ctest is trying
 # to run the CTEST_COMMAND. And we need it to not produce an error
-set (CTEST_COMMAND "echo \"Exit\"") # HACK FIX ME
+##set (CTEST_COMMAND "echo \"Exit\"") # HACK FIX ME
 set (CMAKE_COMMAND "cmake")

 ########################################################################
@@ -73,13 +79,11 @@
 set( GIT "${CTEST_GIT_COMMAND}" )

 # Sources are already checked out : do nothing for update
-set(CTEST_GIT_UPDATE_CUSTOM echo No update)
+set(CTEST_GIT_UPDATE_CUSTOM "${CMAKE_COMMAND}" "-E" "echo" "No update")

 ctest_start (Experimental TRACK CI_Prepare)

 ctest_update( SOURCE "${OTB_SOURCE_DIR}" )
-
-set(CTEST_BUILD_FLAGS "-j16")

 set ( SB_CONFIGURE_OPTIONS "")
 include( "${CMAKE_CURRENT_LIST_DIR}/../SuperBuild/CI/configure_options.cmake" )
@@ -93,8 +97,7 @@

 if ( NOT _configure_rv EQUAL 0 )
   ctest_submit()
-  message( SEND_ERROR "An error occurs during ctest_configure. Dependencies might be buggy.")
-  return()
+  message( FATAL_ERROR "An error occurs during ctest_configure. Dependencies might be buggy.")
 endif()

 ########################################################################
@@ -140,222 +143,222 @@
   )
 if ( IS_SB_BUILD )
   message( "Superbuild is already build for ${IMAGE_NAME} with sources as ${SB_MD5}")
-  return()
 else()
   message( "No build available, this job will build and push OTB_DEPENDS")
+  ####################################
+  # Back to build
+
+  ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}"
+              TARGET "OTB_DEPENDS"
+              RETURN_VALUE _build_rv
+              NUMBER_ERRORS _build_nb_err
+              CAPTURE_CMAKE_ERROR _build_error
+              )
+
+  if ( DEBUG )
+    message( "Status for build:" )
+    message("_build_rv=${_build_rv}")
+    message("_build_nb_err=${_build_nb_err}")
+    message("_build_error=${_build_error}")
+  endif()
+
+  if ( ( NOT ${_build_nb_err} EQUAL 0 ) OR ( ${_build_error} EQUAL -1 ))
+    ctest_submit()
+    message( FATAL_ERROR "An error occurs during ctest_build.")
+  endif()
+
+  ctest_submit()
+
+  ########################################################################
+  ########################################################################
+  # Git process
+  ########################################################################
+  ########################################################################
+
+  # WE PUSH ONLY IF BUILD SUCCEED
+  # The image used will be passed to this script.
+  # TODO verify that images does not have forbidden char in there name
+  # TODO right now we rely on ctest_build to know whether there has been an error
+  # in build, whereas SuperBuild does not necessarily return an error if something
+  # goes wrong
+  set ( SB_ARTIFACT_GIT "${CI_PROJ_DIR}/superbuild-artifact" )
+
+  # REPOSITORY_GIT_URL and REMOTE whould be the same. Right now there are
+  # different because one is https and one is ssh. Both should be ssh.
+  set( REPOSITORY_GIT_URL "git@gitlab.orfeo-toolbox.org:gbonnefille/superbuild-artifact.git")
+  # We clone master to have a basic configuration, mainly a correct .gitattribute
+  # git clone $REMOTE --branch master --depth 1 superbuild-artifact
+  execute_process(
+    COMMAND ${GIT} "clone" "${REPOSITORY_GIT_URL}"
+    "--branch" "master" "--depth" "1" "superbuild-artifact"
+    WORKING_DIRECTORY "${CI_PROJ_DIR}"
+    )
+
+  # setting up the repo
+  # StrictHostKeyChecking so we don't have to add the host as a known key
+  # -F /dev/null so the agent is not taking a default file ~/.ssh/..
+  execute_process(
+    COMMAND ${GIT} "config" "core.sshCommand"
+    "ssh -o StrictHostKeyChecking=no -F /dev/null"
+    WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
+    RESULT_VARIABLE ssh_res
+    OUTPUT_VARIABLE ssh_out
+    ERROR_VARIABLE ssh_err
+    )
+
+  if ( DEBUG )
+    message( "Step 1: ssh")
+    message( "ssh_res = ${ssh_res}" )
+    message( "ssh_out = ${ssh_out}" )
+    message( "ssh_err = ${ssh_err}" )
+  endif()
+
+  execute_process(
+    COMMAND ${GIT} "config" "user.mail" "otbbot@orfeo-toolbox.org"
+    WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
+    RESULT_VARIABLE mail_res
+    OUTPUT_VARIABLE mail_out
+    ERROR_VARIABLE mail_err
+    )
+
+  if ( DEBUG )
+    message( "Step 2: mail")
+    message( "mail_res = ${mail_res}" )
+    message( "mail_out = ${mail_out}" )
+    message( "mail_err = ${mail_err}" )
+  endif()
+
+  execute_process(
+    COMMAND ${GIT} "config" "user.name" "otbbot"
+    WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
+    RESULT_VARIABLE name_res
+    OUTPUT_VARIABLE name_out
+    ERROR_VARIABLE name_err
+    )
+
+  if ( DEBUG )
+    message( "Step 3: name")
+    message( "name_res = ${name_res}" )
+    message( "name_out = ${name_out}" )
+    message( "name_err = ${name_err}" )
+  endif()
+
+  # create a branche
+  execute_process(
+    COMMAND ${GIT} "checkout" "-b" "${BRANCH_NAME}"
+    WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
+    RESULT_VARIABLE co_res
+    OUTPUT_VARIABLE co_out
+    ERROR_VARIABLE co_err
+    )
+
+  if ( DEBUG )
+    message( "Step 4: check-o")
+    message( "co_res = ${co_res}" )
+    message( "co_out = ${co_out}" )
+    message( "co_err = ${co_err}" )
+  endif()
+
+  set ( SB_TAR_NAME "SuperBuild_Install.tar" )
+
+  # create the tar
+  # We need to create tar in its directory to avoid weird name in file
+  # "tar: Removing leading `../../' from member names"
+  # WARNING
+  # We are creating a tar containing xdk/.., so when extracting the archive in
+  # an other environment the output file will be xdk... Obvious isn't it?
+  # Well... Not for everyone...
+  # May be for easier maintainability the tar name should be the same as the
+  # file inside.
+  execute_process(
+    COMMAND ${CMAKE_COMMAND} "-E" "tar" "cf" "${SB_TAR_NAME}"
+    -- "${CTEST_INSTALL_DIRECTORY}"
+    WORKING_DIRECTORY ${CI_ROOT_DIR}
+    )
+
+  # We need to copy the tar file, as it is on a different partition in the gitlab
+  # context
+  file ( COPY "${CI_ROOT_DIR}/${SB_TAR_NAME}" DESTINATION "${SB_ARTIFACT_GIT}")
+
+  # In a near futur it might be nice to clean up the mess we made...
+
+  if ( DEBUG )
+    if (EXISTS "${SB_ARTIFACT_GIT}/${SB_TAR_NAME}")
+      message("Tar file exists in superbuild_artefact at: ${SB_ARTIFACT_GIT}/${SB_TAR_NAME}")
+    else()
+      message("Tar file does not exist")
+    endif()
+  endif()
+
+  # add the file
+  execute_process(
+    COMMAND ${GIT} "add" "${SB_TAR_NAME}"
+    WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
+    RESULT_VARIABLE add_res
+    OUTPUT_VARIABLE add_out
+    ERROR_VARIABLE add_err
+    )
+
+  if ( DEBUG )
+    message( "Step 5: add")
+    message( "add_res = ${add_res}" )
+    message( "add_out = ${add_out}" )
+    message( "add_err = ${add_err}" )
+  endif()
+
+
+  # commit
+  # We need the author because otherwise the mail is wrong
+  # In our case if toto is deploying a key in superbuild-artifact repo
+  # the the mail will be toto's
+  execute_process(
+    COMMAND ${GIT} "commit" "--author=\"otbbot <otbbot@orfeo-toolbox.org>\""
+    "-m" "\"New Superbuild for ${SB_MD5} on ${IMAGE_NAME}\""
+    WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
+    RESULT_VARIABLE com_res
+    OUTPUT_VARIABLE com_out
+    ERROR_VARIABLE com_err
+    )
+
+  if ( DEBUG )
+    message( "Step 6: com")
+    message( "com_res = ${com_res}" )
+    message( "com_out = ${com_out}" )
+    message( "com_err = ${com_err}" )
+  endif()
+
+
+  # This part is just for debug
+  if ( DEBUG )
+    execute_process(
+      COMMAND ${GIT} "log" "-1"
+      WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
+      RESULT_VARIABLE log_res
+      OUTPUT_VARIABLE log_out
+      ERROR_VARIABLE log_err
+      )
+
+    message( "Step 6bis: log")
+    message( "log_res = ${log_res}" )
+    message( "log_out = ${log_out}" )
+    message( "log_err = ${log_err}" )
+  endif()
+
+  # push
+  # we should be able to do a simple : git push origin $BRANCH_NAME
+  execute_process(
+    COMMAND ${GIT} "push" "${REPOSITORY_GIT_URL}" "${BRANCH_NAME}"
+    WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
+    RESULT_VARIABLE push_res
+    OUTPUT_VARIABLE push_out
+    ERROR_VARIABLE push_err
+    )
+
+  if ( DEBUG )
+    message( "Step 7: push")
+    message( "push_res = ${push_res}" )
+    message( "push_out = ${push_out}" )
+    message( "push_err = ${push_err}" )
+  endif()
+
 endif()
-####################################
-# Back to build
-
-ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}"
-            TARGET "OTB_DEPENDS"
-            RETURN_VALUE _build_rv
-            NUMBER_ERRORS _build_nb_err
-            CAPTURE_CMAKE_ERROR _build_error
-            )
-
-if ( DEBUG )
-  message( "Status for build:" )
-  message("_build_rv=${_build_rv}")
-  message("_build_nb_err=${_build_nb_err}")
-  message("_build_error=${_build_error}")
-endif()
-
-if ( ( NOT ${_build_nb_err} EQUAL 0 ) OR ( ${_build_error} EQUAL -1 ))
-  ctest_submit()
-  message( FATAL_ERROR "An error occurs during ctest_build.")
-endif()
-
-ctest_submit()
-
-########################################################################
-########################################################################
-# Git process
-########################################################################
-########################################################################
-
-# WE PUSH ONLY IF BUILD SUCCEED
-# The image used will be passed to this script.
-# TODO verify that images does not have forbidden char in there name
-# TODO right now we rely on ctest_build to know whether there has been an error
-# in build, whereas SuperBuild does not necessarily return an error if something
-# goes wrong
-set ( SB_ARTIFACT_GIT "${CI_PROJ_DIR}/superbuild-artifact" )
-
-# REPOSITORY_GIT_URL and REMOTE whould be the same. Right now there are
-# different because one is https and one is ssh. Both should be ssh.
-set( REPOSITORY_GIT_URL "git@gitlab.orfeo-toolbox.org:gbonnefille/superbuild-artifact.git")
-# We clone master to have a basic configuration, mainly a correct .gitattribute
-# git clone $REMOTE --branch master --depth 1 superbuild-artifact
-execute_process(
-  COMMAND ${GIT} "clone" "${REPOSITORY_GIT_URL}"
-  "--branch" "master" "--depth" "1" "superbuild-artifact"
-  WORKING_DIRECTORY "${CI_PROJ_DIR}"
-  )
-
-# setting up the repo
-# StrictHostKeyChecking so we don't have to add the host as a known key
-# -F /dev/null so the agent is not taking a default file ~/.ssh/..
-execute_process(
-  COMMAND ${GIT} "config" "core.sshCommand"
-  "ssh -o StrictHostKeyChecking=no -F /dev/null"
-  WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
-  RESULT_VARIABLE ssh_res
-  OUTPUT_VARIABLE ssh_out
-  ERROR_VARIABLE ssh_err
-  )
-
-if ( DEBUG )
-  message( "Step 1: ssh")
-  message( "ssh_res = ${ssh_res}" )
-  message( "ssh_out = ${ssh_out}" )
-  message( "ssh_err = ${ssh_err}" )
-endif()
-
-execute_process(
-  COMMAND ${GIT} "config" "user.mail" "otbbot@orfeo-toolbox.org"
-  WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
-  RESULT_VARIABLE mail_res
-  OUTPUT_VARIABLE mail_out
-  ERROR_VARIABLE mail_err
-  )
-
-if ( DEBUG )
-  message( "Step 2: mail")
-  message( "mail_res = ${mail_res}" )
-  message( "mail_out = ${mail_out}" )
-  message( "mail_err = ${mail_err}" )
-endif()
-
-execute_process(
-  COMMAND ${GIT} "config" "user.name" "otbbot"
-  WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
-  RESULT_VARIABLE name_res
-  OUTPUT_VARIABLE name_out
-  ERROR_VARIABLE name_err
-  )
-
-if ( DEBUG )
-  message( "Step 3: name")
-  message( "name_res = ${name_res}" )
-  message( "name_out = ${name_out}" )
-  message( "name_err = ${name_err}" )
-endif()
-
-# create a branche
-execute_process(
-  COMMAND ${GIT} "checkout" "-b" "${BRANCH_NAME}"
-  WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
-  RESULT_VARIABLE co_res
-  OUTPUT_VARIABLE co_out
-  ERROR_VARIABLE co_err
-  )
-
-if ( DEBUG )
-  message( "Step 4: check-o")
-  message( "co_res = ${co_res}" )
-  message( "co_out = ${co_out}" )
-  message( "co_err = ${co_err}" )
-endif()
-
-set ( SB_TAR_NAME "SuperBuild_Install.tar" )
-
-# create the tar
-# We need to create tar in its directory to avoid weird name in file
-# "tar: Removing leading `../../' from member names"
-# WARNING
-# We are creating a tar containing xdk/.., so when extracting the archive in
-# an other environment the output file will be xdk... Obvious isn't it?
-# Well... Not for everyone...
-# May be for easier maintainability the tar name should be the same as the
-# file inside.
-execute_process(
-  COMMAND ${CMAKE_COMMAND} "-E" "tar" "cf" "${SB_TAR_NAME}"
-  -- "${CTEST_INSTALL_DIRECTORY}"
-  WORKING_DIRECTORY ${CI_ROOT_DIR}
-  )
-
-# We need to copy the tar file, as it is on a different partition in the gitlab
-# context
-file ( COPY "${CI_ROOT_DIR}/${SB_TAR_NAME}" DESTINATION "${SB_ARTIFACT_GIT}")
-
-# In a near futur it might be nice to clean up the mess we made...
-
-if ( DEBUG )
-  if (EXISTS "${SB_ARTIFACT_GIT}/${SB_TAR_NAME}")
-    message("Tar file exists in superbuild_artefact at: ${SB_ARTIFACT_GIT}/${SB_TAR_NAME}")
-  else()
-    message("Tar file does not exist")
-  endif()
-endif()
-
-# add the file
-execute_process(
-  COMMAND ${GIT} "add" "${SB_TAR_NAME}"
-  WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
-  RESULT_VARIABLE add_res
-  OUTPUT_VARIABLE add_out
-  ERROR_VARIABLE add_err
-  )
-
-if ( DEBUG )
-  message( "Step 5: add")
-  message( "add_res = ${add_res}" )
-  message( "add_out = ${add_out}" )
-  message( "add_err = ${add_err}" )
-endif()
-
-
-# commit
-# We need the author because otherwise the mail is wrong
-# In our case if toto is deploying a key in superbuild-artifact repo
-# the the mail will be toto's
-execute_process(
-  COMMAND ${GIT} "commit" "--author=\"otbbot <otbbot@orfeo-toolbox.org>\""
-  "-m" "\"New Superbuild for ${SB_MD5} on ${IMAGE_NAME}\""
-  WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
-  RESULT_VARIABLE com_res
-  OUTPUT_VARIABLE com_out
-  ERROR_VARIABLE com_err
-  )
-
-if ( DEBUG )
-  message( "Step 6: com")
-  message( "com_res = ${com_res}" )
-  message( "com_out = ${com_out}" )
-  message( "com_err = ${com_err}" )
-endif()
-
-
-# This part is just for debug
-if ( DEBUG )
-  execute_process(
-    COMMAND ${GIT} "log" "-1"
-    WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
-    RESULT_VARIABLE log_res
-    OUTPUT_VARIABLE log_out
-    ERROR_VARIABLE log_err
-    )
-
-  message( "Step 6bis: log")
-  message( "log_res = ${log_res}" )
-  message( "log_out = ${log_out}" )
-  message( "log_err = ${log_err}" )
-endif()
-
-# push
-# we should be able to do a simple : git push origin $BRANCH_NAME
-execute_process(
-  COMMAND ${GIT} "push" "${REPOSITORY_GIT_URL}" "${BRANCH_NAME}"
-  WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
-  RESULT_VARIABLE push_res
-  OUTPUT_VARIABLE push_out
-  ERROR_VARIABLE push_err
-  )
-
-if ( DEBUG )
-  message( "Step 7: push")
-  message( "push_res = ${push_res}" )
-  message( "push_out = ${push_out}" )
-  message( "push_err = ${push_err}" )
-endif()


Don't treat cast function warnings as errors

--- CMake/mitkFunctionCreateModule.cmake
+++ CMake/mitkFunctionCreateModule.cmake
@@ -373,6 +373,7 @@
         mitkFunctionCheckCAndCXXCompilerFlags("-Wno-error=class-memaccess" module_c_flags module_cxx_flags)
         mitkFunctionCheckCAndCXXCompilerFlags("-Wno-error=inconsistent-missing-override" module_c_flags module_cxx_flags)
         mitkFunctionCheckCAndCXXCompilerFlags("-Wno-error=deprecated-copy" module_c_flags module_cxx_flags)
+        mitkFunctionCheckCAndCXXCompilerFlags("-Wno-error=cast-function-type" module_c_flags module_cxx_flags)
       endif()
     endif()


Added default option WITH_CUDA:BOOL=OFF in OpenCV.cmake

--- CMakeExternals/OpenCV.cmake
+++ CMakeExternals/OpenCV.cmake
@@ -48,6 +48,7 @@
         -DBUILD_TESTS:BOOL=OFF
         -DBUILD_EXAMPLES:BOOL=OFF
         -DBUILD_DOXYGEN_DOCS:BOOL=OFF
+	-DWITH_CUDA:BOOL=OFF
         ${additional_cmake_args}
       DEPENDS ${proj_DEPENDENCIES}
     )


adopted openCV.cmake superbuild script for osx systems

--- CMakeExternals/OpenCV.cmake
+++ CMakeExternals/OpenCV.cmake
@@ -3,7 +3,7 @@
 #-----------------------------------------------------------------------------

 IF(MITK_USE_OpenCV)
-if (UNIX)
+if (UNIX AND NOT APPLE)

   include(${MITK_SOURCE_DIR}/CMake/mitkMacroGetLinuxDistribution.cmake)
   GetLinuxDistribution()
@@ -102,4 +102,4 @@

 endif()

-endif()+endif()


pw_build/cmake: Refactor pw_add_library_generic

Refactors the implementation of pw_add_library_generic in order
to more easily support OBJECT libraries which support transitive
linking dependencies across STATIC libraries.

In order to do this the library internally generates two hidden
<name>._config and <name>._public_config INTERFACE libraries which
carry all of the PRIVATE and PUBLIC target properties.

Change-Id: I2a8a8315c3674e4d4a46de1a36e7fb12c26c7cf0
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/119950
Pigweed-Auto-Submit: Ewout van Bekkum <638f134dbc68778d6b859fb04a64baea2b00b021@google.com>
Commit-Queue: Auto-Submit <14637eda5603879df170705285bf30f5996692f0@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Wyatt Hepler <cca3bedb37979eacd157a9bceb473582df8aea1e@google.com>

--- pw_build/pigweed.cmake
+++ pw_build/pigweed.cmake
@@ -238,26 +238,6 @@
       ${multi_value_args}
   )

-  add_library("${NAME}" "${TYPE}" EXCLUDE_FROM_ALL)
-
-  # Instead of forking all of the code below or injecting an empty source file,
-  # conditionally select PUBLIC vs INTERFACE depending on the type.
-  if("${TYPE}" STREQUAL "INTERFACE")
-    set(public_or_interface INTERFACE)
-    if(NOT "${arg_SOURCES}" STREQUAL "")
-      message(
-        SEND_ERROR "${NAME} cannot have sources as it's an INTERFACE library")
-    endif(NOT "${arg_SOURCES}" STREQUAL "")
-  else()  # ${TYPE} != INTERFACE
-    set(public_or_interface PUBLIC)
-    if("${arg_SOURCES}" STREQUAL "")
-      message(
-        SEND_ERROR "${NAME} must have SOURCES as it's not an INTERFACE library")
-    endif("${arg_SOURCES}" STREQUAL "")
-  endif("${TYPE}" STREQUAL "INTERFACE")
-
-  target_sources("${NAME}" PRIVATE ${arg_SOURCES} ${arg_HEADERS})
-
   # CMake 3.22 does not have a notion of target_headers yet, so in the mean
   # time we ask for headers to be specified for consistency with GN & Bazel and
   # to improve the IDE experience. However, we do want to ensure all the headers
@@ -272,61 +252,90 @@
     endif()
   endforeach()

-  # Public and private target_include_directories.
-  target_include_directories("${NAME}" PRIVATE ${arg_PRIVATE_INCLUDES})
-  target_include_directories(
-        "${NAME}" ${public_or_interface} ${arg_PUBLIC_INCLUDES})
-
-  # Public and private target_link_libraries.
-  if(NOT "${arg_SOURCES}" STREQUAL "")
-    pw_target_link_targets("${NAME}" PRIVATE ${arg_PRIVATE_DEPS})
-  endif(NOT "${arg_SOURCES}" STREQUAL "")
-  pw_target_link_targets("${NAME}" ${public_or_interface} ${arg_PUBLIC_DEPS})
-
-  # The target_compile_options are always added before target_link_libraries'
-  # target_compile_options. In order to support the enabling of warning
-  # compile options injected via arg_PRIVATE_DEPS (target_link_libraries
-  # dependencies) that are partially disabled via arg_PRIVATE_COMPILE_OPTIONS (
-  # target_compile_options), the defines, compile options, and link options are
-  # also added as target_link_libraries dependencies. This enables reasonable
-  # ordering between the enabling (target_link_libraries) and disabling (
-  # now also target_link_libraries) of compiler warnings.
+  # In order to more easily create the various types of libraries, two hidden
+  # targets are created: NAME._config and NAME._public_config which loosely
+  # mirror the GN configs although we also carry target link dependencies
+  # through these.

   # Add the NAME._config target_link_libraries dependency with the
-  # PRIVATE_DEFINES, PRIVATE_COMPILE_OPTIONS, and PRIVATE_LINK_OPTIONS.
-  if(NOT "${TYPE}" STREQUAL "INTERFACE")
-    pw_target_link_targets("${NAME}" PRIVATE "${NAME}._config")
-    add_library("${NAME}._config" INTERFACE EXCLUDE_FROM_ALL)
-    if(NOT "${arg_PRIVATE_DEFINES}" STREQUAL "")
-      target_compile_definitions(
-          "${NAME}._config" INTERFACE ${arg_PRIVATE_DEFINES})
-    endif(NOT "${arg_PRIVATE_DEFINES}" STREQUAL "")
-    if(NOT "${arg_PRIVATE_COMPILE_OPTIONS}" STREQUAL "")
-      target_compile_options(
-          "${NAME}._config" INTERFACE ${arg_PRIVATE_COMPILE_OPTIONS})
-    endif(NOT "${arg_PRIVATE_COMPILE_OPTIONS}" STREQUAL "")
-    if(NOT "${arg_PRIVATE_LINK_OPTIONS}" STREQUAL "")
-      target_link_options("${NAME}._config" INTERFACE ${arg_PRIVATE_LINK_OPTIONS})
-    endif(NOT "${arg_PRIVATE_LINK_OPTIONS}" STREQUAL "")
-  endif(NOT "${TYPE}" STREQUAL "INTERFACE")
+  # PRIVATE_INCLUDES, PRIVATE_DEFINES, PRIVATE_COMPILE_OPTIONS,
+  # PRIVATE_LINK_OPTIONS, and PRIVATE_DEPS.
+  add_library("${NAME}._config" INTERFACE EXCLUDE_FROM_ALL)
+  target_include_directories("${NAME}._config"
+    INTERFACE
+      ${arg_PRIVATE_INCLUDES}
+  )
+  target_compile_definitions("${NAME}._config"
+    INTERFACE
+      ${arg_PRIVATE_DEFINES}
+  )
+  target_compile_options("${NAME}._config"
+    INTERFACE
+      ${arg_PRIVATE_COMPILE_OPTIONS}
+  )
+  target_link_options("${NAME}._config"
+    INTERFACE
+      ${arg_PRIVATE_LINK_OPTIONS}
+  )
+  pw_target_link_targets("${NAME}._config"
+    INTERFACE
+      ${arg_PRIVATE_DEPS}
+  )

   # Add the NAME._public_config target_link_libraries dependency with the
-  # PUBLIC_DEFINES, PUBLIC_COMPILE_OPTIONS, and PUBLIC_LINK_OPTIONS.
+  # PUBLIC_INCLUDES, PUBLIC_DEFINES, PUBLIC_COMPILE_OPTIONS,
+  # PUBLIC_LINK_OPTIONS, and PUBLIC_DEPS.
   add_library("${NAME}._public_config" INTERFACE EXCLUDE_FROM_ALL)
-  pw_target_link_targets(
-      "${NAME}" ${public_or_interface} "${NAME}._public_config")
-  if(NOT "${arg_PUBLIC_DEFINES}" STREQUAL "")
-    target_compile_definitions(
-        "${NAME}._public_config" INTERFACE ${arg_PUBLIC_DEFINES})
-  endif(NOT "${arg_PUBLIC_DEFINES}" STREQUAL "")
-  if(NOT "${arg_PUBLIC_COMPILE_OPTIONS}" STREQUAL "")
-    target_compile_options(
-        "${NAME}._public_config" INTERFACE ${arg_PUBLIC_COMPILE_OPTIONS})
-  endif(NOT "${arg_PUBLIC_COMPILE_OPTIONS}" STREQUAL "")
-  if(NOT "${arg_PUBLIC_LINK_OPTIONS}" STREQUAL "")
-    target_link_options(
-        "${NAME}._public_config" INTERFACE ${arg_PUBLIC_LINK_OPTIONS})
-  endif(NOT "${arg_PUBLIC_LINK_OPTIONS}" STREQUAL "")
+  target_include_directories("${NAME}._public_config"
+    INTERFACE
+      ${arg_PUBLIC_INCLUDES}
+  )
+  target_compile_definitions("${NAME}._public_config"
+    INTERFACE
+      ${arg_PUBLIC_DEFINES}
+  )
+  target_compile_options("${NAME}._public_config"
+    INTERFACE
+      ${arg_PUBLIC_COMPILE_OPTIONS}
+  )
+  target_link_options("${NAME}._public_config"
+    INTERFACE
+      ${arg_PUBLIC_LINK_OPTIONS}
+  )
+  pw_target_link_targets("${NAME}._public_config"
+    INTERFACE
+      ${arg_PUBLIC_DEPS}
+  )
+
+  # Instantiate the library depending on the type using the NAME._config and
+  # NAME._public_config libraries we just created.
+  if("${TYPE}" STREQUAL "INTERFACE")
+    if(NOT "${arg_SOURCES}" STREQUAL "")
+      message(
+        SEND_ERROR "${NAME} cannot have sources as it's an INTERFACE library")
+    endif(NOT "${arg_SOURCES}" STREQUAL "")
+
+    add_library("${NAME}" INTERFACE EXCLUDE_FROM_ALL)
+    target_sources("${NAME}" PRIVATE ${arg_HEADERS})
+    pw_target_link_targets("${NAME}"
+      INTERFACE
+        "${NAME}._public_config"
+    )
+  else()
+    if("${arg_SOURCES}" STREQUAL "")
+      message(
+        SEND_ERROR "${NAME} must have SOURCES as it's not an INTERFACE library")
+    endif("${arg_SOURCES}" STREQUAL "")
+
+    add_library("${NAME}" "${TYPE}" EXCLUDE_FROM_ALL)
+    target_sources("${NAME}" PRIVATE ${arg_HEADERS} ${arg_SOURCES})
+    pw_target_link_targets("${NAME}"
+      PUBLIC
+        "${NAME}._public_config"
+      PRIVATE
+        "${NAME}._config"
+    )
+  endif()
 endfunction(pw_add_library_generic)

 # Checks that the library's name is prefixed by the relative path with dot


Update ExternalProjectDependency based on commontk/Artichoke@d453e32

--- CMake/ExternalProjectDependency.cmake
+++ CMake/ExternalProjectDependency.cmake
@@ -48,6 +48,8 @@
 else()
   set(EP_CMAKE_GENERATOR "${CMAKE_GENERATOR}")
 endif()
+set(EP_CMAKE_GENERATOR_PLATFORM "${CMAKE_GENERATOR_PLATFORM}")
+set(EP_CMAKE_GENERATOR_TOOLSET "${CMAKE_GENERATOR_TOOLSET}")

 #.rst:
 # .. cmake:function:: mark_as_superbuild
@@ -153,8 +155,6 @@

 function(_sb_list_to_string separator input_list output_string_var)
   set(_string "")
-  cmake_policy(PUSH)
-  cmake_policy(SET CMP0007 OLD)
   # Get list length
   list(LENGTH input_list list_length)
   # If the list has 0 or 1 element, there is no need to loop over.
@@ -165,16 +165,17 @@
     foreach(index RANGE ${last_element_index})
       # Get current item_value
       list(GET input_list ${index} item_value)
-      # .. and append to output string
-      set(_string  "${_string}${item_value}")
-      # Append separator if current element is NOT the last one.
-      if(NOT index EQUAL last_element_index)
-        set(_string  "${_string}${separator}")
+      if(NOT item_value STREQUAL "")
+        # .. and append non-empty value to output string
+        set(_string  "${_string}${item_value}")
+        # Append separator if current element is NOT the last one.
+        if(NOT index EQUAL last_element_index)
+          set(_string  "${_string}${separator}")
+        endif()
       endif()
     endforeach()
   endif()
   set(${output_string_var} ${_string} PARENT_SCOPE)
-  cmake_policy(POP)
 endfunction()

 #
@@ -214,6 +215,10 @@
       _sb_list_to_string(${EP_LIST_SEPARATOR} "${_var_value}" _var_value)
       set(_has_cfg_intdir TRUE)
     endif()
+  endif()
+
+  if(NOT _has_cfg_intdir)
+    string(REPLACE "\"" "\\\"" _var_value "${_var_value}")
   endif()

   set(${cmake_arg_var} -D${_varname}:${_vartype}=${_var_value} PARENT_SCOPE)
@@ -333,7 +338,11 @@

   list(APPEND _ep_arguments LIST_SEPARATOR ${EP_LIST_SEPARATOR})

-  list(APPEND _ep_arguments CMAKE_GENERATOR ${EP_CMAKE_GENERATOR})
+  list(APPEND _ep_arguments CMAKE_GENERATOR ${_sb_CMAKE_GENERATOR})
+  if(CMAKE_VERSION VERSION_GREATER "3.0")
+    list(APPEND _ep_arguments CMAKE_GENERATOR_PLATFORM ${_sb_CMAKE_GENERATOR_PLATFORM})
+  endif()
+  list(APPEND _ep_arguments CMAKE_GENERATOR_TOOLSET ${_sb_CMAKE_GENERATOR_TOOLSET})

   set(${varname} ${_ep_arguments} PARENT_SCOPE)
 endfunction()
@@ -448,11 +457,18 @@
 #      [DEPENDS_VAR <depends_var>]
 #      [USE_SYSTEM_VAR <use_system_var>]
 #      [SUPERBUILD_VAR <superbuild_var>]
+#      [CMAKE_GENERATOR <cmake_generator>]
+#      [CMAKE_GENERATOR_PLATFORM <cmake_generator_platform>]
+#      [CMAKE_GENERATOR_TOOLSET <cmake_generator_toolset>]
 #    )
 #
 macro(ExternalProject_Include_Dependencies project_name)
   set(options)
-  set(oneValueArgs PROJECT_VAR DEPENDS_VAR EP_ARGS_VAR USE_SYSTEM_VAR SUPERBUILD_VAR)
+  set(oneValueArgs PROJECT_VAR DEPENDS_VAR EP_ARGS_VAR USE_SYSTEM_VAR SUPERBUILD_VAR
+    CMAKE_GENERATOR
+    CMAKE_GENERATOR_PLATFORM
+    CMAKE_GENERATOR_TOOLSET
+    )
   set(multiValueArgs)
   cmake_parse_arguments(_sb "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

@@ -462,6 +478,9 @@
       OR x${project_name} STREQUAL xDEPENDS_VAR
       OR x${project_name} STREQUAL xUSE_SYSTEM_VAR
       OR x${project_name} STREQUAL xSUPERBUILD_VAR
+      OR x${project_name} STREQUAL xCMAKE_GENERATOR
+      OR x${project_name} STREQUAL xCMAKE_GENERATOR_PLATFORM
+      OR x${project_name} STREQUAL xCMAKE_GENERATOR_TOOLSET
       )
     message(FATAL_ERROR "Argument <project_name> is missing !")
   endif()
@@ -514,6 +533,20 @@
     set(_sb_SUPERBUILD_VAR ${SUPERBUILD_TOPLEVEL_PROJECT}_SUPERBUILD)
     #message("[${project_name}] Setting _sb_SUPERBUILD_VAR with default value '${_sb_SUPERBUILD_VAR}'")
   endif()
+
+  # Set default for optional CMAKE_GENERATOR_* parameters
+  foreach(varname IN ITEMS
+    "CMAKE_GENERATOR"
+    "CMAKE_GENERATOR_PLATFORM"
+    "CMAKE_GENERATOR_TOOLSET"
+    )
+    if(NOT _sb_${varname})
+      set(_sb_${varname} ${EP_${varname}})
+      #message("[${project_name}] Setting _sb_${varname} with default value '${_sb_${varname}}'")
+    else()
+      #message("[${project_name}] Setting _sb_${varname} to value '${_sb_${varname}}'")
+    endif()
+  endforeach()

   # Keeping track of variable name independently of the recursion
   if(NOT DEFINED _sb_SB_VAR)
@@ -582,6 +615,13 @@
   set_property(GLOBAL PROPERTY SB_${_sb_proj}_USE_SYSTEM       ${_sb_USE_SYSTEM})
   set_property(GLOBAL PROPERTY SB_${_sb_proj}_USE_SYSTEM_VAR   ${_sb_USE_SYSTEM_VAR})
   set_property(GLOBAL PROPERTY SB_${_sb_proj}_PROJECT_VAR      ${_sb_PROJECT_VAR})
+  foreach(varname IN ITEMS
+      "CMAKE_GENERATOR"
+      "CMAKE_GENERATOR_PLATFORM"
+      "CMAKE_GENERATOR_TOOLSET"
+    )
+    set_property(GLOBAL PROPERTY SB_${_sb_proj}_${varname}  ${_sb_${varname}})
+  endforeach()
   superbuild_stack_push(SB_PROJECT_STACK ${_sb_proj})

   # Include dependencies
@@ -604,6 +644,13 @@

   # Restore variables
   superbuild_stack_pop(SB_PROJECT_STACK _sb_proj)
+  foreach(varname IN ITEMS
+      "CMAKE_GENERATOR"
+      "CMAKE_GENERATOR_PLATFORM"
+      "CMAKE_GENERATOR_TOOLSET"
+    )
+    get_property(_sb_${varname}  GLOBAL PROPERTY SB_${_sb_proj}_${varname})
+  endforeach()
   get_property(_sb_PROJECT_VAR      GLOBAL PROPERTY SB_${_sb_proj}_PROJECT_VAR)
   get_property(_sb_USE_SYSTEM_VAR   GLOBAL PROPERTY SB_${_sb_proj}_USE_SYSTEM_VAR)
   get_property(_sb_USE_SYSTEM       GLOBAL PROPERTY SB_${_sb_proj}_USE_SYSTEM)
@@ -636,12 +683,23 @@
       set(${_sb_PROJECT_VAR} ${_sb_proj})

       set(SB_SECOND_PASS TRUE)
+      set(_ep_include_deps_EXTRA_ARGS )
+      foreach(varname IN ITEMS
+          "CMAKE_GENERATOR"
+          "CMAKE_GENERATOR_PLATFORM"
+          "CMAKE_GENERATOR_TOOLSET"
+        )
+        list(APPEND _ep_include_deps_EXTRA_ARGS
+          ${varname} ${_sb_${varname}}
+          )
+      endforeach()
       ExternalProject_Include_Dependencies(${_sb_proj}
         PROJECT_VAR ${_sb_PROJECT_VAR}
         DEPENDS_VAR ${_sb_DEPENDS_VAR}
         EP_ARGS_VAR ${_sb_EP_ARGS_VAR}
         USE_SYSTEM_VAR _sb_USE_SYSTEM
         SUPERBUILD_VAR ${_sb_SB_VAR}
+        ${_ep_include_deps_EXTRA_ARGS}
         )
       set(SB_SECOND_PASS FALSE)
     endif()


Replace tabs with spaces.

Replace tabs with spaces.

Change-Id: Ic79c883050515991b7f18e32e737cce3a45ebd4e

--- CMake/GetGitRevisionDescription.cmake
+++ CMake/GetGitRevisionDescription.cmake
@@ -31,7 +31,7 @@
 # http://www.boost.org/LICENSE_1_0.txt)

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

@@ -42,56 +42,56 @@
 find_package(Git QUIET)

 function(get_git_head_revision _refvar _hashvar)
-	if(NOT GIT_EXECUTABLE)
-		set(${_refvar} "GIT-NOTFOUND" PARENT_SCOPE)
-		set(${_hashvar} "GIT-NOTFOUND" PARENT_SCOPE)
-		return()
-	endif()
+  if(NOT GIT_EXECUTABLE)
+    set(${_refvar} "GIT-NOTFOUND" PARENT_SCOPE)
+    set(${_hashvar} "GIT-NOTFOUND" PARENT_SCOPE)
+    return()
+  endif()

-	set(src_dir ${PROJECT_SOURCE_DIR})
-	set(bin_dir ${PROJECT_BINARY_DIR})
+  set(src_dir ${PROJECT_SOURCE_DIR})
+  set(bin_dir ${PROJECT_BINARY_DIR})

-	execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --git-dir
-		WORKING_DIRECTORY ${src_dir}
-		OUTPUT_VARIABLE GIT_DIR
-		ERROR_VARIABLE error
-		RESULT_VARIABLE failed
-		OUTPUT_STRIP_TRAILING_WHITESPACE
-		)
-	if(NOT IS_ABSOLUTE "${GIT_DIR}")
-		set(GIT_DIR "${src_dir}/${GIT_DIR}")
-	endif()
-	if(failed OR NOT EXISTS "${GIT_DIR}/HEAD")
-		# not in git
-		set(${_refvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
-		set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
-		return()
-	endif()
-	set(GIT_DATA "${bin_dir}/CMakeFiles/git-data")
-	if(NOT EXISTS "${GIT_DATA}")
-		file(MAKE_DIRECTORY "${GIT_DATA}")
-	endif()
-	configure_file("${GIT_DIR}/HEAD" "${GIT_DATA}/HEAD" COPYONLY)
+  execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --git-dir
+    WORKING_DIRECTORY ${src_dir}
+    OUTPUT_VARIABLE GIT_DIR
+    ERROR_VARIABLE error
+    RESULT_VARIABLE failed
+    OUTPUT_STRIP_TRAILING_WHITESPACE
+    )
+  if(NOT IS_ABSOLUTE "${GIT_DIR}")
+    set(GIT_DIR "${src_dir}/${GIT_DIR}")
+  endif()
+  if(failed OR NOT EXISTS "${GIT_DIR}/HEAD")
+    # not in git
+    set(${_refvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
+    set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
+    return()
+  endif()
+  set(GIT_DATA "${bin_dir}/CMakeFiles/git-data")
+  if(NOT EXISTS "${GIT_DATA}")
+    file(MAKE_DIRECTORY "${GIT_DATA}")
+  endif()
+  configure_file("${GIT_DIR}/HEAD" "${GIT_DATA}/HEAD" COPYONLY)

-	file(STRINGS "${GIT_DIR}/HEAD" head LIMIT_COUNT 1 LIMIT_INPUT 1024)
-	if("${head}" MATCHES "^ref: (.*)$")
-		set(HEAD_REF "${CMAKE_MATCH_1}")
-		if(EXISTS "${GIT_DIR}/${HEAD_REF}")
-			configure_file("${GIT_DIR}/${HEAD_REF}" "${GIT_DATA}/HEAD-REF" COPYONLY)
-		endif()
-	else()
-		set(HEAD_REF "")
-	endif()
-	execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
-		WORKING_DIRECTORY ${src_dir}
-		OUTPUT_VARIABLE HEAD_HASH OUTPUT_STRIP_TRAILING_WHITESPACE
-		ERROR_VARIABLE error
-		RESULT_VARIABLE failed)
-	if(failed)
-		set(HEAD_HASH "HEAD-HASH-NOTFOUND")
-	endif()
-	set(${_refvar} "${HEAD_REF}" PARENT_SCOPE)
-	set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE)
+  file(STRINGS "${GIT_DIR}/HEAD" head LIMIT_COUNT 1 LIMIT_INPUT 1024)
+  if("${head}" MATCHES "^ref: (.*)$")
+    set(HEAD_REF "${CMAKE_MATCH_1}")
+    if(EXISTS "${GIT_DIR}/${HEAD_REF}")
+      configure_file("${GIT_DIR}/${HEAD_REF}" "${GIT_DATA}/HEAD-REF" COPYONLY)
+    endif()
+  else()
+    set(HEAD_REF "")
+  endif()
+  execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
+    WORKING_DIRECTORY ${src_dir}
+    OUTPUT_VARIABLE HEAD_HASH OUTPUT_STRIP_TRAILING_WHITESPACE
+    ERROR_VARIABLE error
+    RESULT_VARIABLE failed)
+  if(failed)
+    set(HEAD_HASH "HEAD-HASH-NOTFOUND")
+  endif()
+  set(${_refvar} "${HEAD_REF}" PARENT_SCOPE)
+  set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE)
 endfunction()

 # get the number of commits since the file has last been modified
@@ -128,42 +128,42 @@
 endfunction()

 function(git_describe _var)
-	get_git_head_revision(refspec hash)
-	if(NOT GIT_FOUND)
-		set(${_var} "GIT-NOTFOUND"  PARENT_SCOPE)
-		return()
-	endif()
-	if(NOT hash)
-		set(${_var} "HEAD-HASH-NOTFOUND"  PARENT_SCOPE)
-		return()
-	endif()
+  get_git_head_revision(refspec hash)
+  if(NOT GIT_FOUND)
+    set(${_var} "GIT-NOTFOUND"  PARENT_SCOPE)
+    return()
+  endif()
+  if(NOT hash)
+    set(${_var} "HEAD-HASH-NOTFOUND"  PARENT_SCOPE)
+    return()
+  endif()

-	set(src_dir ${PROJECT_SOURCE_DIR})
+  set(src_dir ${PROJECT_SOURCE_DIR})

-	# TODO sanitize
-	#if((${ARGN}" MATCHES "&&") OR
-	#	(ARGN MATCHES "||") OR
-	#	(ARGN MATCHES "\\;"))
-	#	message("Please report the following error to the project!")
-	#	message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}")
-	#endif()
+  # TODO sanitize
+  #if((${ARGN}" MATCHES "&&") OR
+  #	(ARGN MATCHES "||") OR
+  #	(ARGN MATCHES "\\;"))
+  #	message("Please report the following error to the project!")
+  #	message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}")
+  #endif()

-	#message(STATUS "Arguments to execute_process: ${ARGN}")
+  #message(STATUS "Arguments to execute_process: ${ARGN}")

-	execute_process(COMMAND "${GIT_EXECUTABLE}" describe ${hash} ${ARGN}
-		WORKING_DIRECTORY "${src_dir}"
-		RESULT_VARIABLE res
-		OUTPUT_VARIABLE out
-		ERROR_QUIET
-		OUTPUT_STRIP_TRAILING_WHITESPACE)
-	if(NOT res EQUAL 0)
-		set(out "${out}-${res}-NOTFOUND")
-	endif()
+  execute_process(COMMAND "${GIT_EXECUTABLE}" describe ${hash} ${ARGN}
+    WORKING_DIRECTORY "${src_dir}"
+    RESULT_VARIABLE res
+    OUTPUT_VARIABLE out
+    ERROR_QUIET
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+  if(NOT res EQUAL 0)
+    set(out "${out}-${res}-NOTFOUND")
+  endif()

-	set(${_var} "${out}" PARENT_SCOPE)
+  set(${_var} "${out}" PARENT_SCOPE)
 endfunction()

 function(git_get_exact_tag _var)
-	git_describe(out --exact-match ${ARGN})
-	set(${_var} "${out}" PARENT_SCOPE)
+  git_describe(out --exact-match ${ARGN})
+  set(${_var} "${out}" PARENT_SCOPE)
 endfunction()


COMP: Use -no-cpp-precomp only on Apple GCC 3.3

FSF GCC does not know of the flag and complains.  This flag was first
added by commit 213e6358 (remove precompiled option on apple to avoid
errors, 2003-03-13).  Then it was made conditional by commit eebbc4df
(BUG: 6267. ITK should not force -no-cpp-precomp compiler flag,
2008-02-13).

This flag is needed only on ancient Apple GCC forks but is silently
ignored by newer Apple GCC versions.  Make the condition even stronger
to use it only on Apple GCC 3.3.

Change-Id: I487c8b759ba41331555878f57c6467c16e9e6f44

--- CMake/ITKPlatformSpecificChecks.cmake
+++ CMake/ITKPlatformSpecificChecks.cmake
@@ -58,11 +58,12 @@
    # only in Apple's gcc and not in the FSF gcc. The flags are obsolete
    # and totally removed in gcc 4.2 and later. I believe they are only
    # needed with gcc 3.3 and earlier.
-   itkCHECK_CXX_ACCEPTS_FLAGS("-no-cpp-precomp" CXX_HAS_CPP_PRECOMP_FLAG)
-   if(CXX_HAS_CPP_PRECOMP_FLAG)
+   execute_process(COMMAND "${CMAKE_C_COMPILER}" --version
+     OUTPUT_VARIABLE _version ERROR_VARIABLE _version)
+   if("${_version}" MATCHES "gcc.*3\\.3.*Apple")
      set(ITK_REQUIRED_C_FLAGS "${ITK_REQUIRED_C_FLAGS} -no-cpp-precomp")
      set(ITK_REQUIRED_CXX_FLAGS "${ITK_REQUIRED_CXX_FLAGS} -no-cpp-precomp")
-   endif(CXX_HAS_CPP_PRECOMP_FLAG)
+   endif()
    itkCHECK_CXX_ACCEPTS_FLAGS("-Wno-long-double" CXX_HAS_LONGDOUBLE_FLAG)
    if(CXX_HAS_LONGDOUBLE_FLAG)
      set(ITK_REQUIRED_C_FLAGS "${ITK_REQUIRED_C_FLAGS} -Wno-long-double")


[Config] From Boost 1.67+, the Python version (2 or 3) needs to be specified

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -605,7 +605,7 @@
   set (Boost_USE_STATIC_RUNTIME OFF)
   set (BOOST_REQUIRED_COMPONENTS_FOR_LIB
     date_time random iostreams serialization filesystem system
-	locale python regex)
+	locale python27 python36 regex)
   set (BOOST_REQUIRED_COMPONENTS_FOR_BIN program_options)
   set (BOOST_REQUIRED_COMPONENTS_FOR_TST unit_test_framework)
   set (BOOST_REQUIRED_COMPONENTS ${BOOST_REQUIRED_COMPONENTS_FOR_LIB}


[Build] Added a CMake macro to describe a brief project description.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -30,6 +30,13 @@
   # Set the project name
   project (${PACKAGE})
 endmacro (set_project_names)
+
+##
+# Set the project brief
+macro (set_project_brief _project_brief)
+  set (PACKAGE_BRIEF ${_project_brief})
+endmacro (set_project_brief)
+

 ##
 # Set the project versions
@@ -1286,6 +1293,7 @@
   message (STATUS "PACKAGE_PRETTY_NAME ............ : ${PACKAGE_PRETTY_NAME}")
   message (STATUS "PACKAGE ........................ : ${PACKAGE}")
   message (STATUS "PACKAGE_NAME ................... : ${PACKAGE_NAME}")
+  message (STATUS "PACKAGE_BRIEF .................. : ${PACKAGE_BRIEF}")
   message (STATUS "PACKAGE_VERSION ................ : ${PACKAGE_VERSION}")
   message (STATUS "GENERIC_LIB_VERSION ............ : ${GENERIC_LIB_VERSION}")
   message (STATUS "GENERIC_LIB_SOVERSION .......... : ${GENERIC_LIB_SOVERSION}")


Show a message when clang-tidy has been disabled.

--- PolysquareCommon.cmake
+++ PolysquareCommon.cmake
@@ -134,6 +134,10 @@
                  "google-*")

         endif (CONTINUE)
+
+    else (POLYSQUARE_USE_CLANG_TIDY)
+
+        message (STATUS "clang-tidy analysis has been disabled.")

     endif (POLYSQUARE_USE_CLANG_TIDY)


Try it without -DBUILD_C_BINDINGS:BOOL=OFF

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -31,7 +31,6 @@
     -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
     -DBUILD_MATLAB_BINDINGS:BOOL=OFF
     -DBUILD_PYTHON_BINDINGS:BOOL=OFF
-    -DBUILD_C_BINDINGS:BOOL=OFF
     -DBUILD_TESTS:BOOL=OFF
     -DBUILD_EXAMPLES:BOOL=OFF
   )


Bump SOFA to integrate SOFA packaging commit

--- CMake/Superbuild/External_SOFA.cmake
+++ CMake/Superbuild/External_SOFA.cmake
@@ -82,7 +82,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "git://public.kitware.com/Bender/SOFA.git"
-    GIT_TAG "8560467085378949f84f2a84c4d0d7bb4c359497"
+    GIT_TAG "d1d5775fefefd472a2f6b48ceb06a4c3626269d7"
     INSTALL_COMMAND ""
     UPDATE_COMMAND ""
     CMAKE_GENERATOR ${gen}


BUG: memcheck must be done in the TubeTK-Build subdir

--- DashboardScripts/tubetk_memory.cmake
+++ DashboardScripts/tubetk_memory.cmake
@@ -39,6 +39,8 @@

 ctest_start( "$ENV{TUBETK_RUN_MODEL}" )
 ctest_read_custom_files( "${CTEST_BINARY_DIRECTORY}" )
-ctest_memcheck( BUILD "${CTEST_BINARY_DIRECTORY}" )
+ctest_build( BUILD "${CTEST_BINARY_DIRECTORY}" )
+ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}/TubeTK-Build" )
+ctest_memcheck( BUILD "${CTEST_BINARY_DIRECTORY}TubeTK-Build" )
 ctest_submit()


Updating along ITK 4.7 release

Updating along ITK 4.7 release

2fa884e BUG: Enable VectorImage to work with the ImageSeriesWriter

Change-Id: I25d4b794f7dd2c6441d3979dc10e661885bf597a

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -35,7 +35,7 @@
 set(ITK_REPOSITORY git://itk.org/ITK.git)

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG 362e25a66866c50ff78de6a5e7edc527b506b5ba) # v4.7.0 with patches on release
+set(ITK_TAG_COMMAND GIT_TAG 2fa884e552ea6688dfd6cfc4e0f52d8a05eefb30) # v4.7.0 with patches on release

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


Update ITK along 5.1 development

Update ITK along 5.1 development

This include the following patch:
commit 3d5698b3103e08d73e5657d3e1af7999e02a7ef9
Author: Ziv Yaniv <zivyaniv@nih.gov>
Date:   Mon Jan 13 11:15:00 2020 -0500

    BUG: SetLabelForUndecidedPixels value ignored.

    The user requested label for undecided values was ignored and the
    maxLabel+1 was always used. The test also had a bug in its ground
    truth values.

closes issue #943

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

-# post v5.1rco1
-set(_DEFAULT_ITK_GIT_TAG "764737d09eb107dc328e7d7bdc982c9f56e6c1f6")
+# post v5.1rc01
+set(_DEFAULT_ITK_GIT_TAG "e8aba69589860916dd4ca165145ca7471c749227")
 set(ITK_GIT_TAG "${_DEFAULT_ITK_GIT_TAG}" CACHE STRING "Tag in ITK git repo")
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")


Update ITK along master branch

Update ITK along master branch

This updates contains number of fixes for warnings, valgrind defect,
and fixes for ITK_MODULES_ENABLE to contain the list of installed
modules.

Change-Id: Ib5ecb9756779fd32aa72941c27a5f6e8059eb18b

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

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG f959aa172c2da3df77b60455ae755e859980b2a4 )# ITK 4.11 under development
+set(ITK_TAG_COMMAND GIT_TAG 83e8dfb83bfcaf14ed896e05b7f85702bee790fe )# ITK 4.11 under development

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


COMP: fix check for SO_REUSEADDR, prefix VTK_ was missing

Alex

--- Parallel/VTKParallelCMakeTests.cmake
+++ Parallel/VTKParallelCMakeTests.cmake
@@ -35,4 +35,4 @@

 # e.g. IBM BlueGene/L doesn't have SO_REUSEADDR, because "setsockopt is not needed for
 # BlueGene/L applications" according to the BlueGene/L Application Development handbook
-CHECK_SYMBOL_EXISTS(SO_REUSEADDR "sys/types.h;sys/socket.h" HAVE_SO_REUSEADDR)
+CHECK_SYMBOL_EXISTS(SO_REUSEADDR "sys/types.h;sys/socket.h" VTK_HAVE_SO_REUSEADDR)


opus: update to 1.1.3

opus: update to 1.1.3

--- packages/opus.cmake
+++ packages/opus.cmake
@@ -1,7 +1,7 @@
 ExternalProject_Add(opus
     DEPENDS gcc
-    URL "http://downloads.xiph.org/releases/opus/opus-1.1.2.tar.gz"
-    URL_HASH SHA256=0e290078e31211baa7b5886bcc8ab6bc048b9fc83882532da4a1a45e58e907fd
+    URL "http://downloads.xiph.org/releases/opus/opus-1.1.3.tar.gz"
+    URL_HASH SHA256=58b6fe802e7e30182e95d0cde890c0ace40b6f125cffc50635f0ad2eef69b633
     UPDATE_COMMAND ""
     CONFIGURE_COMMAND ${EXEC} <SOURCE_DIR>/configure
         --host=${TARGET_ARCH}


-TEST: update dashboard configuration for linux

--- src/Testing/Dashboard/elxDashboard_BIGR_linux64_gcc.cmake
+++ src/Testing/Dashboard/elxDashboard_BIGR_linux64_gcc.cmake
@@ -13,8 +13,8 @@
 #
 # Setup: linux 64bit
 # gcc 4.4.6 (Redhat Linux),
-# Release mode, ITK 4.1.0
-# PC: linux cluster2 at BIGR (SK).
+# Release mode, ITK 4.7.1
+# PC: linux cluster at BIGR (SK).

 # Client maintainer: s.klein@erasmusmc.nl
 set( CTEST_SITE "BIGR.cluster" )
@@ -49,7 +49,7 @@

 set( dashboard_cache "
 // Which ITK to use
-ITK_DIR:PATH=/cm/shared/apps/itk/4.5.0/release
+ITK_DIR:PATH=/cm/shared/apps/itk/4.7.1/release

 // Some elastix settings, defining the configuration
 ELASTIX_BUILD_TESTING:BOOL=ON


Add INSTALL_NO_DEPS option.

Add INSTALL_NO_DEPS option.

	* build-aux/cmake/modules/Gostai.cmake (gostai_add_executable): Here.

--- build-aux/cmake/modules/Gostai.cmake
+++ build-aux/cmake/modules/Gostai.cmake
@@ -23,7 +23,7 @@
   parse_arguments(
     ${name}
     "SOURCES;MOCS;UIS;CPPFLAGS;INCLUDE_DIRS;LIBRARIES;RESOURCES"
-    "NO_CONSOLE"
+    "NO_CONSOLE;INSTALL_NO_DEPS"
     ${ARGN})

   # =================== #
@@ -180,8 +180,10 @@
   # Deploy dependent libraries #
   # ========================== #

-  gen_lib_loader(${name})
-  dldep_install(${name})
+  if(NOT ${name}_INSTALL_NO_DEPS)
+    gen_lib_loader(${name})
+    dldep_install(${name})
+  endif(NOT ${name}_INSTALL_NO_DEPS)

 endmacro(gostai_add_executable)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -4,7 +4,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2008)

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


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   01)
+SET(KWSYS_DATE_STAMP_DAY   02)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


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

 # 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   14)
+SET(KWSYS_DATE_STAMP_DAY   15)


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

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Removed the lower version check and improved the SSE explanation message.

--- Source/CMake/Modules/Urho3D-CMake-common.cmake
+++ Source/CMake/Modules/Urho3D-CMake-common.cmake
@@ -23,8 +23,8 @@
 # Certain MinGW versions fail to compile SSE code. This is the initial guess for known "bad" version range, and can be tightened later
 if (WIN32 AND NOT MSVC)
     execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
-    if (GCC_VERSION VERSION_GREATER 4.7.2 AND GCC_VERSION VERSION_LESS 4.9.1)
-        message ("Disabling SSE by default due to MinGW version. It is recommended to upgrade to MinGW with GCC >= 4.9.1.")
+    if (GCC_VERSION VERSION_LESS 4.9.1)
+        message ("Disabling SSE by default due to MinGW version. It is recommended to upgrade to MinGW with GCC >= 4.9.1. You can also try to re-enable SSE with CMake option -DURHO3D_SSE=1, but this may result in compile errors.")
         set (URHO3D_DEFAULT_SSE FALSE)
     else ()
         set (URHO3D_DEFAULT_SSE TRUE)


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   01)
+SET(KWSYS_DATE_STAMP_DAY   02)


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


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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


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


WIP: JIRA 976. some more system dlls for osx

--- SuperBuild/CMake/PackageHelper.cmake
+++ SuperBuild/CMake/PackageHelper.cmake
@@ -44,7 +44,10 @@

 set(APPLE_SYSTEM_DLLS
   libSystem.*
-  libiconv*
+  libiconv.*
+  libc\\+\\+
+  libstdc.*dylib
+  libobjc.*dylib
   )

 if(UNIX)


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


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

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


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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


disable bat scripts for now

disable bat scripts for now

--- external/vigra_cmake/VigraAddDep.cmake
+++ external/vigra_cmake/VigraAddDep.cmake
@@ -20,9 +20,9 @@
   variable_watch(_VAD_LIBRARY_DIR_LIST VAD_CREATE_ACTIVATE)
   set_property(GLOBAL PROPERTY VigraAddDepIncludedOnce TRUE)
   if(WIN32)
-    file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/vad_activate_$<CONFIG>.bat" INPUT "${CMAKE_CURRENT_BINARY_DIR}/.vad/vad_activate.bat.generate")
-    file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/vad_deactivate.bat" INPUT "${VigraAddDepPath}/vad_deactivate.bat.in")
-    file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/.vad/vad_path_$<CONFIG>" INPUT "${CMAKE_CURRENT_BINARY_DIR}/.vad/vad_path.generate")
+    #file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/vad_activate_$<CONFIG>.bat" INPUT "${CMAKE_CURRENT_BINARY_DIR}/.vad/vad_activate.bat.generate")
+    #file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/vad_deactivate.bat" INPUT "${VigraAddDepPath}/vad_deactivate.bat.in")
+    #file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/.vad/vad_path_$<CONFIG>" INPUT "${CMAKE_CURRENT_BINARY_DIR}/.vad/vad_path.generate")
   endif()
 endif()


BUG: Always wrap basic type RGBUC

BUG: Always wrap basic type RGBUC

This basic type is required for some always-wrapped types.

Addresses:

CMake Error at Wrapping/TypedefMacros.cmake:725 (message):
  Wrapping itk::ImageSource: No image type for 'RGBUC' pixels is known.
Call Stack (most recent call first):
  Wrapping/TypedefMacros.cmake:587 (itk_wrap_image_filter_types)
  Modules/Core/Common/wrapping/itkImageSource.wrap:4 (itk_wrap_image_filter)
  Wrapping/TypedefMacros.cmake:214 (include)
  Wrapping/TypedefMacros.cmake:168 (itk_load_submodule)
  Modules/Core/Common/wrapping/CMakeLists.txt:60 (itk_auto_load_submodules)

-- Configuring incomplete, errors occurred!

Change-Id: I98ddcbc1adbb432806391c9e72cb1aefbcc5c7e7

--- Wrapping/WrapITKTypes.cmake
+++ Wrapping/WrapITKTypes.cmake
@@ -157,9 +157,7 @@

   ADD_TEMPLATE("${ITKM_F}" "${ITKT_F}")

-  if(ITK_WRAP_rgb_unsigned_char)
-    ADD_TEMPLATE("${ITKM_UC}" "${ITKT_UC}")
-  endif()
+  ADD_TEMPLATE("${ITKM_UC}" "${ITKT_UC}")

   if(ITK_WRAP_rgb_unsigned_short)
     ADD_TEMPLATE("${ITKM_US}" "${ITKT_US}")
@@ -176,9 +174,7 @@
   # Required by spatial objects
   ADD_TEMPLATE("${ITKM_F}" "${ITKT_F}")

-  if(ITK_WRAP_rgba_unsigned_char)
-    ADD_TEMPLATE("${ITKM_UC}" "${ITKT_UC}")
-  endif()
+  ADD_TEMPLATE("${ITKM_UC}" "${ITKT_UC}")

   if(ITK_WRAP_rgba_unsigned_short)
     ADD_TEMPLATE("${ITKM_US}" "${ITKT_US}")


Ignore spaces difference in comparison

Ignore spaces difference in comparison

--- test/claw_reference_test.cmake
+++ test/claw_reference_test.cmake
@@ -142,7 +142,7 @@
     )
     add_test(
       NAME ast-compare-${claw_add_basic_test_NAME}
-      COMMAND diff --ignore-blank-lines ${output_file} ${reference_file}
+      COMMAND diff --ignore-all-space --ignore-blank-lines ${output_file} ${reference_file}
     )
     set_tests_properties(ast-compare-${claw_add_basic_test_NAME}
       PROPERTIES DEPENDS ast-transform-${claw_add_basic_test_NAME})
@@ -525,16 +525,16 @@
   if(NOT IGNORE)
     # Compare reference transformed code and output of the transformation
     add_test(NAME ast-compare-cpu-${claw_add_advanced_test_NAME}
-      COMMAND diff --ignore-blank-lines ${OUTPUT_FILE_CPU}
+      COMMAND diff --ignore-all-space --ignore-blank-lines ${OUTPUT_FILE_CPU}
       ${REFERENCE_FILE_CPU})
     add_test(NAME ast-compare-gpu-${claw_add_advanced_test_NAME}
-      COMMAND diff --ignore-blank-lines ${OUTPUT_FILE_GPU}
+      COMMAND diff --ignore-all-space --ignore-blank-lines ${OUTPUT_FILE_GPU}
       ${REFERENCE_FILE_GPU})
     add_test(NAME ast-compare-main-cpu-${claw_add_advanced_test_NAME}
-      COMMAND diff --ignore-blank-lines ${OUTPUT_MAIN_CPU}
+      COMMAND diff --ignore-all-space --ignore-blank-lines ${OUTPUT_MAIN_CPU}
       ${REFERENCE_MAIN_CPU})
     add_test(NAME ast-compare-main-gpu-${claw_add_advanced_test_NAME}
-      COMMAND diff --ignore-blank-lines ${OUTPUT_MAIN_GPU}
+      COMMAND diff --ignore-all-space --ignore-blank-lines ${OUTPUT_MAIN_GPU}
       ${REFERENCE_MAIN_GPU})
     set_tests_properties(ast-compare-cpu-${claw_add_advanced_test_NAME}
       PROPERTIES DEPENDS ast-transform-${claw_add_advanced_test_NAME})
@@ -548,10 +548,10 @@
     # Test the extra module file with its reference
     if(EXISTS ${claw_add_advanced_test_WORKING_DIRECTORY}/mo_column_extra.f90)
       add_test(NAME ast-compare-cpu-extra-${claw_add_advanced_test_NAME}
-        COMMAND diff --ignore-blank-lines ${OUTPUT_FILE_EXTRA_CPU}
+        COMMAND diff --ignore-all-space --ignore-blank-lines ${OUTPUT_FILE_EXTRA_CPU}
         ${REFERENCE_FILE_EXTRA_CPU})
       add_test(NAME ast-compare-gpu-extra-${claw_add_advanced_test_NAME}
-        COMMAND diff --ignore-blank-lines ${OUTPUT_FILE_EXTRA_GPU}
+        COMMAND diff --ignore-all-space --ignore-blank-lines ${OUTPUT_FILE_EXTRA_GPU}
         ${REFERENCE_FILE_EXTRA_GPU})
       set_tests_properties(ast-compare-cpu-extra-${claw_add_advanced_test_NAME}
         PROPERTIES DEPENDS ast-transform-${claw_add_advanced_test_NAME})


Suppress output from asn1c on every cmake run

Change-Id: I64233e6c37875a1e554cffa1b34956f181164963

--- cmake-modules/FindAsn1c.cmake
+++ cmake-modules/FindAsn1c.cmake
@@ -29,7 +29,7 @@

         execute_process(COMMAND ${ASN1C} ${ASN1C_FLAGS} ${ASN1_FILES}
             WORKING_DIRECTORY ${ASN1_GEN_DIR}
-            OUTPUT_QUIET
+            OUTPUT_QUIET ERROR_QUIET
             )

         file(GLOB ASN1_GENERATED ${ASN1_GEN_DIR}/*.c)


Prepare Vorbis libs for multi-config usage

--- cmake/bootstrap/windows.cmake
+++ cmake/bootstrap/windows.cmake
@@ -123,9 +123,10 @@
   file(RENAME ${BUILD_DIR}/${_package}/Debug/ogg.lib ${BUILD_DIR}/${_package}/Debug/oggd.lib)
   file(RENAME ${BUILD_DIR}/${_package}/Debug/ogg.pdb ${BUILD_DIR}/${_package}/Debug/oggd.pdb)
   file(INSTALL
-    ${BUILD_DIR}/${_package}/include
-    DESTINATION ${PREFIX_DIR}
-    FILES_MATCHING PATTERN "*.h")
+    ${BUILD_DIR}/${_package}/include/ogg/config_types.h
+    ${BUILD_DIR}/${_package}/include/ogg/ogg.h
+    ${BUILD_DIR}/${_package}/include/ogg/os_types.h
+    DESTINATION ${PREFIX_DIR}/include/ogg)
   file(INSTALL
     ${BUILD_DIR}/${_package}/Release/ogg.lib
     DESTINATION ${PREFIX_DIR}/lib)
@@ -222,6 +223,25 @@
   set(_package "vorbis")
   y_git_clone("https://git.xiph.org/vorbis.git" DIR ${_package})
   y_cmake(${_package}
-    CONFIG Release
+    TARGET "vorbisfile"
+    CONFIG Release Debug
     OPTIONS -DOGG_ROOT=${PREFIX_DIR})
-endif()
+  file(RENAME ${BUILD_DIR}/${_package}/lib/Debug/vorbis.lib ${BUILD_DIR}/${_package}/lib/Debug/vorbisd.lib)
+  file(RENAME ${BUILD_DIR}/${_package}/lib/Debug/vorbis.pdb ${BUILD_DIR}/${_package}/lib/Debug/vorbisd.pdb)
+  file(RENAME ${BUILD_DIR}/${_package}/lib/Debug/vorbisfile.lib ${BUILD_DIR}/${_package}/lib/Debug/vorbisfiled.lib)
+  file(RENAME ${BUILD_DIR}/${_package}/lib/Debug/vorbisfile.pdb ${BUILD_DIR}/${_package}/lib/Debug/vorbisfiled.pdb)
+  file(INSTALL
+    ${BUILD_DIR}/${_package}/include/vorbis/codec.h
+    ${BUILD_DIR}/${_package}/include/vorbis/vorbisfile.h
+    DESTINATION ${PREFIX_DIR}/include/vorbis)
+  file(INSTALL
+    ${BUILD_DIR}/${_package}/lib/Release/vorbis.lib
+    ${BUILD_DIR}/${_package}/lib/Release/vorbisfile.lib
+    DESTINATION ${PREFIX_DIR}/lib)
+  file(INSTALL
+    ${BUILD_DIR}/${_package}/lib/Debug/vorbisd.lib
+    ${BUILD_DIR}/${_package}/lib/Debug/vorbisd.pdb
+    ${BUILD_DIR}/${_package}/lib/Debug/vorbisfiled.lib
+    ${BUILD_DIR}/${_package}/lib/Debug/vorbisfiled.pdb
+    DESTINATION ${PREFIX_DIR}/lib)
+endif()


Add explicit dll name

Add explicit dll name

--- cmake_scripts/FindArrow.cmake
+++ cmake_scripts/FindArrow.cmake
@@ -75,7 +75,7 @@
     )
 endif()

-find_library(ARROW_LIB_PATH NAMES arrow
+find_library(ARROW_LIB_PATH NAMES arrow arrow.dll
   PATHS
   ${ARROW_SEARCH_LIB_PATH}
   NO_DEFAULT_PATH)


Change CMake warning to simple message for old Metis versions
(transplanted from 6dfa73d2b46046513a076f062b3606ae69d58276)

--HG--
branch : 3.2


skip examples when packing

skip examples when packing

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@4051 a9d63959-f2ad-4865-b262-bf0e56cfafb6


BUG: don't include temporalgapfilling twice

--- SuperBuild/CMake/External_otb.cmake
+++ SuperBuild/CMake/External_otb.cmake
@@ -144,7 +144,7 @@

 set(OTB_MODULES_CONFIG)
 if(WITH_REMOTE_MODULES)
-  foreach(remote_module SertitObject Mosaic otbGRM OTBFFSforGMM OTBTemporalGapFilling)
+  foreach(remote_module SertitObject Mosaic otbGRM OTBFFSforGMM)
     list(APPEND OTB_MODULES_CONFIG -DModule_${remote_module}:BOOL=ON)
   endforeach()


COMP: Check for std=c++11 capability

COMP: Check for std=c++11 capability

--- SuperBuild/External_BatchMake.cmake
+++ SuperBuild/External_BatchMake.cmake
@@ -37,7 +37,7 @@

 SlicerMacroCheckExternalProjectDependency(${proj})

-if(UNIX)
+if(UNIX AND (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7))
   set(CMAKE_CXX_FLAGS_BatchMake -std=c++11)
 endif()


[ci skip] Disable 'int-in-bool-context' warning message (caused by SFML)

--- Builds/CMake/CompileOptions.cmake
+++ Builds/CMake/CompileOptions.cmake
@@ -103,6 +103,7 @@
 	set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
 		-Wall
 		-Wno-missing-braces
+		-Wno-int-in-bool-context
 		${WARN_AS_ERROR_FLAGS}
 		-std=c++1z
 	)


style: Remove space between CMake command name and opening parenthesis

--- Modules/Common/config/Settings.cmake
+++ Modules/Common/config/Settings.cmake
@@ -48,7 +48,7 @@
   @ONLY
 )

-configure_file (
+configure_file(
   "${PROJECT_CONFIG_DIR}/version.h.in"
   "${BINARY_INCLUDE_DIR}/mirtkVersionInfo.h"
   @ONLY


Reconfigure libffi using the latest gtk_packages_add.xml,
gtk_transform.py, configure_bp.cmake, and template.bp.in.

The new configuration continues to build.

svn path=/trunk/; revision=12448

--- cmake/build_projects/libffi/bp.cmake
+++ cmake/build_projects/libffi/bp.cmake
@@ -30,19 +30,28 @@
 endif(libffi_configured)
 set(libffi_configured ON)

+# List of dependencies (most of which are build tools) which should be
+# ignored.
+set(BP_ignored_dependencies_LIST pkg-config;bison;flex;python2-devel)
+
 set(libffi_dependencies_LIST )
+# Remove dependencies that should be ignored.
+if(libffi_dependencies_LIST)
+  list(REMOVE_ITEM libffi_dependencies_LIST ${BP_ignored_dependencies_LIST})
+endif(libffi_dependencies_LIST)

+set(libffi_dependencies_targets)
 foreach(build_configuration ${libffi_dependencies_LIST})
-  include(${build_configuration}/bp.cmake)
+  if(EXISTS ${CMAKE_SOURCE_DIR}/${build_configuration}/bp.cmake)
+    include(${build_configuration}/bp.cmake)
+    list(APPEND libffi_dependencies_targets build_${build_configuration})
+  else(EXISTS ${CMAKE_SOURCE_DIR}/${build_configuration}/bp.cmake)
+    message(STATUS "Warning: A build_configuration for ${build_configuration} does not exist so it is assumed this dependency of libffi has been installed another way.")
+  endif(EXISTS ${CMAKE_SOURCE_DIR}/${build_configuration}/bp.cmake)
 endforeach(build_configuration ${libffi_dependences_LIST})

 # This can be safely done only after above includes.
 set(BP_PACKAGE libffi)
-
-set(${BP_PACKAGE}_dependencies_targets)
-foreach(build_configuration ${${BP_PACKAGE}_dependencies_LIST})
-  list(APPEND ${BP_PACKAGE}_dependencies_targets build_${build_configuration})
-endforeach(build_configuration ${${BP_PACKAGE}_dependences_LIST})

 # Data that is related to downloads.
 set(${BP_PACKAGE}_URL ftp://sourceware.org/pub/libffi/libffi-3.0.13.tar.gz)
@@ -69,8 +78,9 @@
   URL ${${BP_PACKAGE}_URL}
   URL_HASH ${${BP_PACKAGE}_DOWNLOAD_HASH_TYPE}=${${BP_PACKAGE}_DOWNLOAD_HASH}
   CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${${BP_PACKAGE}_SET_CFLAGS} ${source_PATH}/${BP_CONFIGURE_COMMAND}
-  BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND}
-  INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND} install
+  BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND}
+  BUILD_IN_SOURCE OFF
+  INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND}  install
   )

 list(APPEND build_target_LIST build_${BP_PACKAGE})


Add hint for ios-sim detection

Add hint for ios-sim detection

--- cmake/core/sugar_add_ios_gtest.cmake
+++ cmake/core/sugar_add_ios_gtest.cmake
@@ -21,7 +21,7 @@

   sugar_test_target_exists(${targetname})

-  find_program(IOS_SIM "ios-sim")
+  find_program(IOS_SIM "ios-sim" HINTS ${IOS_SIM_ROOT})
   if(NOT IOS_SIM)
     sugar_fatal_error(
         "ios-sim not found, please install it from:"


cmake: when webui cannot be build - just disable it

Do not produce fatal error, which may happen if try to compile with
-Dall=ON option

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -229,6 +229,7 @@
  set(r_defvalue ON)
  set(roofit_defvalue ON)
  set(root7_defvalue ON)
+ set(webui_defvalue ON)
  set(shadowpw_defvalue ON)
  set(table_defvalue ON)
  set(unuran_defvalue ON)
@@ -302,8 +303,8 @@

 #---check if webui can be build-------------------------------
 if(webui)
-  if(CMAKE_CXX_STANDARD EQUAL 11)
-    message(FATAL_ERROR "WebUI requires C++14 or higher")
+  if(NOT CMAKE_CXX_STANDARD GREATER 11)
+    set(webui OFF CACHE BOOL "(WebUI requires at least C++14)" FORCE)
   elseif(NOT http)
     set(http ON CACHE BOOL "(Enabled since it's needed by webui)" FORCE)
   endif()


Make filter_rpath function robust against the case where none of
CMAKE_C_IMPLICIT_LINK_DIRECTORIES,
CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES, or
CMAKE_FORTRAN_IMPLICIT_LINK_DIRECTORIES are defined.  This should
never happen according to the CMake documentation, but Phil apparently
found a case where it did happen for the "Visual Studio 11" generator
(for VS2012).  My conclusion is that generator is severely broken, but
nevertheless making this function robust for the case when none of
these variables are defined cannot be a bad thing to do.

svn path=/trunk/; revision=12864

--- cmake/modules/plplot_functions.cmake
+++ cmake/modules/plplot_functions.cmake
@@ -207,7 +207,11 @@
       ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}
       ${CMAKE_FORTRAN_IMPLICIT_LINK_DIRECTORIES}
       )
-    list(REMOVE_DUPLICATES directories_to_be_removed)
+
+    if(directories_to_be_removed)
+      list(REMOVE_DUPLICATES directories_to_be_removed)
+    endif(directories_to_be_removed)
+
     if(directories_to_be_removed)
       list(REMOVE_ITEM internal_rpath ${directories_to_be_removed})
     endif(directories_to_be_removed)


add cmake version check

add cmake version check

--- cmakemodules/script_clang_tidy.cmake
+++ cmakemodules/script_clang_tidy.cmake
@@ -1,3 +1,4 @@
+if (CMAKE_VERSION VERSION_GREATER "3.6.0")
 find_program(
   CLANG_TIDY_EXE
   NAMES "clang-tidy"
@@ -9,5 +10,6 @@
   message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}")
   set(DO_CLANG_TIDY "${CLANG_TIDY_EXE}" "-checks=-*,cppcoreguidelines-*")
 endif()
-
-
+else()
+message(STATUS "clang-tidy: not using. CMake version must be >=3.6")
+endif()


cmake: linker: arm: memory regions from devicetree added

This commit add devicetree memory regions added to arm/linker.cmake.

The following memory regions are now added to the generated linker
script and scatter file if they exists in the devicetree.
- chosen:    zephyr,itcm
- chosen:    zephyr,dtcm
- nodelabel: ti_ccfg_partition
- nodelabel: sram1
- nodelabel: sram2
- nodelabel: sram3
- nodelabel: sram4
- nodelabel: sdram1
- nodelabel: sdram2
- nodelabel: backup_sram

Also support for the itcm and dtcm section and their placement in
corresponding memory regions has been added.

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

--- cmake/linker_script/arm/linker.cmake
+++ cmake/linker_script/arm/linker.cmake
@@ -33,6 +33,21 @@
 zephyr_linker_memory(NAME FLASH    FLAGS rx START ${FLASH_ADDR} SIZE ${FLASH_SIZE})
 zephyr_linker_memory(NAME RAM      FLAGS wx START ${RAM_ADDR}   SIZE ${RAM_SIZE})
 zephyr_linker_memory(NAME IDT_LIST FLAGS wx START ${IDT_ADDR}   SIZE 2K)
+
+# TI CCFG Registers
+zephyr_linker_dts_memory(NAME FLASH_CCFG FLAGS rwx NODELABEL ti_ccfg_partition)
+
+# Data & Instruction Tightly Coupled Memory
+zephyr_linker_dts_memory(NAME ITCM        FLAGS rw CHOSEN "zephyr,itcm")
+zephyr_linker_dts_memory(NAME DTCM        FLAGS rw CHOSEN "zephyr,dtcm")
+
+zephyr_linker_dts_memory(NAME SRAM1       FLAGS rw NODELABEL sram1)
+zephyr_linker_dts_memory(NAME SRAM2       FLAGS rw NODELABEL sram2)
+zephyr_linker_dts_memory(NAME SRAM3       FLAGS rw NODELABEL sram3)
+zephyr_linker_dts_memory(NAME SRAM4       FLAGS rw NODELABEL sram4)
+zephyr_linker_dts_memory(NAME SDRAM1      FLAGS rw NODELABEL sdram1)
+zephyr_linker_dts_memory(NAME SDRAM2      FLAGS rw NODELABEL sdram2)
+zephyr_linker_dts_memory(NAME BACKUP_SRAM FLAGS rw NODELABEL backup_sram)

 if(CONFIG_XIP)
   zephyr_linker_group(NAME ROM_REGION LMA FLASH)
@@ -157,6 +172,28 @@
   PRIO 50
 )

+dt_chosen(chosen_itcm PROPERTY "zephyr,itcm")
+if(DEFINED chosen_itcm)
+  dt_node_has_status(status_result PATH ${chosen_itcm} STATUS okay)
+  if(${status_result})
+    zephyr_linker_group(NAME ITCM_REGION VMA ITCM LMA ROM_REGION)
+
+    zephyr_linker_section(NAME .itcm GROUP ITCM_REGION SUBALIGN 4)
+  endif()
+endif()
+
+dt_chosen(chosen_dtcm PROPERTY "zephyr,dtcm")
+if(DEFINED chosen_dtcm)
+  dt_node_has_status(status_result PATH ${chosen_dtcm} STATUS okay)
+  if(${status_result})
+    zephyr_linker_group(NAME DTCM_REGION VMA DTCM LMA ROM_REGION)
+
+    zephyr_linker_section(NAME .dtcm_bss GROUP DTCM_REGION SUBALIGN 4 TYPE BSS)
+    zephyr_linker_section(NAME .dtcm_noinit GROUP DTCM_REGION SUBALIGN 4 TYPE NOLOAD NOINIT)
+    zephyr_linker_section(NAME .dtcm_data GROUP DTCM_REGION SUBALIGN 4)
+  endif()
+endif()
+
 zephyr_linker_section(NAME .ARM.attributes ADDRESS 0 NOINPUT)
 zephyr_linker_section_configure(SECTION .ARM.attributes INPUT ".ARM.attributes" KEEP)
 zephyr_linker_section_configure(SECTION .ARM.attributes INPUT ".gnu.attributes" KEEP)


cmake/modules/FindFFTWWrappers.cmake: added broader search for libiomp5

--- cmake/modules/FindFFTWWrappers.cmake
+++ cmake/modules/FindFFTWWrappers.cmake
@@ -150,7 +150,8 @@
 find_library(
   MKL_IOMP5
   NAMES iomp5 libiomp5 libiomp5.a
-  PATHS ${MKLROOT} ${MKLROOT}/../compiler/lib/intel64 ${MKLROOT}/../tbb/lib/intel64/gcc4.4
+  PATHS ${MKLROOT} ${MKLROOT}/../compiler ${MKLROOT}/../tbb
+  PATH_SUFFIXES "lib/intel64_lin" "lib/intel64" "lib/intel64/gcc4.4"
   NO_DEFAULT_PATH
   )


[qtgui porting] Fixed a typo in RootBuildOptions.cmake

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -78,7 +78,7 @@
  #set(qt4_defvalue ON)
  set(qt5_defvalue ON)
  set(qtgsi_defvalue ON)
- set(qtgui defvalue ON)
+ set(qtgui_defvalue ON)
  set(roofit_defvalue ON)
  set(minuit2_defvalue ON)
  set(table_defvalue ON)


Now even 2.7 fails...

Now even 2.7 fails...

--- CMake/FindNumpy.cmake
+++ CMake/FindNumpy.cmake
@@ -50,6 +50,8 @@
     return()
 endif()

+message (status ${PYTHON_EXECUTABLE})
+
 if (PYTHON_EXECUTABLE)
   # Find out the include path
   execute_process(
@@ -65,6 +67,8 @@
   message(STATUS "Python executable not found.")
 endif(PYTHON_EXECUTABLE)

+message (status ${__numpy_path})
+
 find_path(PYTHON_NUMPY_INCLUDE_DIR numpy/arrayobject.h
   HINTS "${__numpy_path}" "${PYTHON_INCLUDE_PATH}" NO_DEFAULT_PATH)

@@ -76,5 +80,3 @@
 find_package_handle_standard_args(NumPy REQUIRED_VARS PYTHON_NUMPY_INCLUDE_DIR
                                         VERSION_VAR __numpy_version)

-message(status ${PYTHON_NUMPY_INCLUDE_DIR})
-


Don't add largeaddressaware if building with mingw

git-svn-id: b66b41e514ff40863ef1aa95df2dbf63dd8d6be1@606 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/ACGCompiler.cmake
+++ cmake/ACGCompiler.cmake
@@ -15,9 +15,11 @@
   set( ADDITIONAL_CMAKE_MODULE_LINKER_FLAGS )

   if ( WINDOWS_LARGE_MEMORY_SUPPORT )
-	list(APPEND ADDITIONAL_CMAKE_EXE_LINKER_FLAGS       "/LARGEADDRESSAWARE" )
-	list(APPEND ADDITIONAL_CMAKE_SHARED_LINKER_FLAGS    "/LARGEADDRESSAWARE" )
-	list(APPEND ADDITIONAL_CMAKE_MODULE_LINKER_FLAGS    "/LARGEADDRESSAWARE" )
+        if( NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles")
+	  list(APPEND ADDITIONAL_CMAKE_EXE_LINKER_FLAGS       "/LARGEADDRESSAWARE" )
+  	  list(APPEND ADDITIONAL_CMAKE_SHARED_LINKER_FLAGS    "/LARGEADDRESSAWARE" )
+	  list(APPEND ADDITIONAL_CMAKE_MODULE_LINKER_FLAGS    "/LARGEADDRESSAWARE" )
+        endif()
   endif()


Added support for CMAKE_DEBUG_POSTFIX to FindJansson.cmake.

If we're building with a debug configuration and CMAKE_DEBUG_POSTFIX is defined,
we'll try to find Jansson library files ending with ${CMAKE_DEBUG_POSTFIX} first.

--- cmake/FindJansson.cmake
+++ cmake/FindJansson.cmake
@@ -12,7 +12,11 @@

 find_path(JANSSON_INCLUDE_DIR jansson.h HINTS ${PC_JANSSON_INCLUDEDIR} ${PC_JANSSON_INCLUDE_DIRS} PATH_SUFFIXES jansson)

-find_library(JANSSON_LIBRARY NAMES jansson libjansson HINTS ${PC_JANSSON_LIBDIR} ${PC_JANSSON_LIBRARY_DIRS})
+if (CMAKE_BUILD_TYPE STREQUAL "Debug" AND DEFINED CMAKE_DEBUG_POSTFIX)
+	find_library(JANSSON_LIBRARY NAMES jansson${CMAKE_DEBUG_POSTFIX} libjansson${CMAKE_DEBUG_POSTFIX} jansson libjansson HINTS ${PC_JANSSON_LIBDIR} ${PC_JANSSON_LIBRARY_DIRS})
+else ()
+	find_library(JANSSON_LIBRARY NAMES jansson libjansson HINTS ${PC_JANSSON_LIBDIR} ${PC_JANSSON_LIBRARY_DIRS})
+endif ()

 set(JANSSON_LIBRARIES ${JANSSON_LIBRARY})
 set(JANSSON_INCLUDE_DIRS ${JANSSON_INCLUDE_DIR})