FindGROMACS.cmake: don't cache GROMACS_DEFINITIONS GROMACS_VERSION, remove GROMACS_DEP_LIBRARIES

--- CMakeModules/FindGROMACS.cmake
+++ CMakeModules/FindGROMACS.cmake
@@ -44,54 +44,30 @@

 find_library(GROMACS_LIBRARY NAMES ${GROMACS_LIBRARY_NAME} HINTS ${PC_GROMACS_LIBRARY_DIRS} )
 if (GROMACS_LIBRARY)
-  if("${GROMACS_LIBRARY}" MATCHES "lib(gmx|gromacs)[^;]*\\.a")
-    if(PC_GROMACS_LIBRARIES)
-      list(REMOVE_ITEM PC_GROMACS_LIBRARIES ${GROMACS_LIBRARY_NAME})
-      foreach (LIB ${PC_GROMACS_LIBRARIES})
-        find_library(GROMACS_${LIB} NAMES ${LIB} HINTS ${PC_GROMACS_LIBRARY_DIRS} )
-        list(APPEND GMX_DEP_LIBRARIES ${GROMACS_${LIB}})
-        unset(GROMACS_${LIB} CACHE)
-      endforeach(LIB)
-    endif(PC_GROMACS_LIBRARIES)
-    if(PC_GROMACS_CFLAGS_OTHER)
-      foreach(LIB ${PC_GROMACS_CFLAGS_OTHER})
-        if (${LIB} MATCHES "thread")
-  	find_package(Threads REQUIRED)
-  	list(APPEND GMX_DEP_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
-        endif (${LIB} MATCHES "thread")
-      endforeach(LIB)
-    endif(PC_GROMACS_CFLAGS_OTHER)
-    set(GROMACS_DEP_LIBRARIES "${GMX_DEP_LIBRARIES}" CACHE FILEPATH "gromacs depency libs (only needed for static (.a) libgmx")
-  endif("${GROMACS_LIBRARY}" MATCHES "lib(gmx|gromacs)[^;]*\\.a")
   include(CheckLibraryExists)
-  check_library_exists("${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}" GromacsVersion "" FOUND_GROMACS_VERSION)
+  check_library_exists("${GROMACS_LIBRARY}" GromacsVersion "" FOUND_GROMACS_VERSION)
   if(NOT FOUND_GROMACS_VERSION)
-    message(FATAL_ERROR "Could not find GromacsVersion in ${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}, take look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you don't have pkg-config installed you will most likely have to set GROMACS_LIBRARY and GROMACS_DEP_LIBRARY by hand which sets the gromacs lib and it's depencies (i.e. -DGROMACS_LIBRARY='/path/to/libgmx.so' -DGROMACS_DEP_LIBRARIES='/path/to/libblas.so;/path/to/libm.so')!")
+    message(FATAL_ERROR "Could not find GromacsVersion in ${GROMACS_LIBRARY}, take look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you don't have pkg-config installed you will most likely have to set GROMACS_LIBRARY by hand which sets the gromacs lib and it's depencies (i.e. -DGROMACS_LIBRARY='/path/to/libgmx.so;/path/to/libblas.so;/path/to/libm.so')!")
   endif(NOT FOUND_GROMACS_VERSION)
-  check_library_exists("${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}" init_mtop "" FOUND_GROMACS_INIT_MTOP)
+  check_library_exists("${GROMACS_LIBRARY}" init_mtop "" FOUND_GROMACS_INIT_MTOP)
   if(NOT FOUND_GROMACS_INIT_MTOP)
     message(FATAL_ERROR "Could not find init_mtop in the gromacs library, take look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. This most likely means that your gromacs version is too old, we need at least gromacs 4.0.7.")
   endif(NOT FOUND_GROMACS_INIT_MTOP)
   set(GMX_VERSION 40)
-  check_library_exists("${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}" output_env_init "" FOUND_GROMACS_OUTPUT_ENV_INIT)
+  check_library_exists("${GROMACS_LIBRARY}" output_env_init "" FOUND_GROMACS_OUTPUT_ENV_INIT)
   if(FOUND_GROMACS_OUTPUT_ENV_INIT)
     set(GMX_VERSION 45)
   endif(FOUND_GROMACS_OUTPUT_ENV_INIT)
-  check_library_exists("${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}" init_domdec_vsites "" FOUND_GROMACS_INIT_DOMDEC_VSITES)
+  check_library_exists("${GROMACS_LIBRARY}" init_domdec_vsites "" FOUND_GROMACS_INIT_DOMDEC_VSITES)
   if(FOUND_GROMACS_INIT_DOMDEC_VSITES)
     set(GMX_VERSION 50)
   endif(FOUND_GROMACS_INIT_DOMDEC_VSITES)
-  set(GROMACS_VERSION ${GMX_VERSION} CACHE STRING "Gromacs lib interface version")
-
-  if( ( (    ${GROMACS_LIBRARY} MATCHES "lib[^/]*_d\\.[^.]*$") AND (NOT "${GROMACS_PKG}" MATCHES "_d$") ) OR
-      ( (NOT ${GROMACS_LIBRARY} MATCHES "lib[^/]*_d\\.[^.]*$") AND (    "${GROMACS_PKG}" MATCHES "_d$") ) )
-      message(WARNING "You are using ${GROMACS_LIBRARY}, but GROMACS_PKG was ${GROMACS_PKG}. There seems to be a mismatch in precision, single vs double, no ending vs. _d. If this is not the case ignore this warning otherwise enable set GROMACS_PKG correctly using -DGROMACS_PKG_OVERWRITE=lib(gmx|gromacs)(_d).")
-  endif()
+  set(GROMACS_VERSION ${GMX_VERSION})

   #Only set GROMACS_DEFINITIONS if GROMACS_LIBRARY was found
-  if ("${GROMACS_PKG}" MATCHES "_d$")
+  if ("${GROMACS_LIBRARY}" MATCHES "lib[^/]*_d\\.[^.]*$")
     list(APPEND GMX_DEFS "-DGMX_DOUBLE")
-  endif ("${GROMACS_PKG}" MATCHES "_d$")
+  endif ("${GROMACS_LIBRARY}" MATCHES "lib[^/]*_d\\.[^.]*$")
   if (PC_GROMACS_CFLAGS_OTHER)
     foreach(DEF ${PC_GROMACS_CFLAGS_OTHER})
       if (${DEF} MATCHES "^-D")
@@ -100,7 +76,7 @@
     endforeach(DEF)
     list(REMOVE_DUPLICATES GMX_DEFS)
   endif (PC_GROMACS_CFLAGS_OTHER)
-  set(GROMACS_DEFINITIONS "${GMX_DEFS}" CACHE STRING "extra GROMACS definitions")
+  set(GROMACS_DEFINITIONS "${GMX_DEFS}")

 else(GROMACS_LIBRARY)
   set(GMX_VERSION 45)
@@ -116,7 +92,7 @@
   find_path(GROMACS_INCLUDE_DIR gromacs/fileio/tpxio.h HINTS ${PC_GROMACS_INCLUDE_DIRS})
 endif("${GROMACS_PKG}" MATCHES "libgmx")

-set(GROMACS_LIBRARIES "${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}" )
+set(GROMACS_LIBRARIES "${GROMACS_LIBRARY}" )
 set(GROMACS_INCLUDE_DIRS ${GROMACS_INCLUDE_DIR} )

 include(FindPackageHandleStandardArgs)
@@ -124,4 +100,4 @@
 # if all listed variables are TRUE
 find_package_handle_standard_args(GROMACS DEFAULT_MSG GROMACS_LIBRARY GROMACS_INCLUDE_DIR)

-mark_as_advanced(GROMACS_INCLUDE_DIR GROMACS_LIBRARY GROMACS_DEFINITIONS GROMACS_PKG GROMACS_VERSION GROMACS_DEP_LIBRARIES)
+mark_as_advanced(GROMACS_INCLUDE_DIR GROMACS_LIBRARY GROMACS_PKG)


* Fixes xmlrpc and curl. PythonScriptModule: Python is still a problem python26_d.lib is somehow added by magic...

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

--- CMakeModules/ModuleSetup.cmake
+++ CMakeModules/ModuleSetup.cmake
@@ -214,9 +214,9 @@
     if (PYTHONLIBS_FOUND)
         set (PYTHON_LIBRARIES ${PYTHON_LIBRARY})
         set (PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH})
-        if (PYTHON_DEBUG_LIBRARY)
-            set (PYTHON_DEBUG_LIBRARIES ${PYTHON_DEBUG_LIBRARY})
-        endif ()
+		#if (PYTHON_DEBUG_LIBRARY)
+        #    set (PYTHON_DEBUG_LIBRARIES ${PYTHON_DEBUG_LIBRARY})
+        #endif ()
     endif ()

 endmacro (configure_python)
@@ -226,9 +226,6 @@
         NAMES PythonQt
         COMPONENTS PythonQt PythonQt_QtAll
         PREFIXES ${ENV_NAALI_DEP_PATH})
-
-    # TODO: not currently working
-    #find_debug_libraries (PYTHON "_d")

 endmacro (configure_python_qt)

@@ -275,25 +272,32 @@
 macro (configure_xmlrpc)
     sagase_configure_package (XMLRPC
         NAMES xmlrpc xmlrpcepi xmlrpc-epi
-        COMPONENTS xmlrpc xmlrpcepi xmlrpc-epi
+        COMPONENTS xmlrpc xmlrpcepi xmlrpc-epi xmlrpcepid
         PREFIXES ${ENV_NAALI_DEP_PATH}
         ${ENV_NAALI_DEP_PATH}/xmlrpc-epi/src
-        ${ENV_NAALI_DEP_PATH}/xmlrpc-epi)
-
-    find_debug_libraries (XMLRPC "d")
-
+        ${ENV_NAALI_DEP_PATH}/xmlrpc-epi/Debug
+		${ENV_NAALI_DEP_PATH}/xmlrpc-epi/Release)
+
+	if (MSVC)
+		set (XMLRPC_LIBRARIES xmlrpcepi)
+		set (XMLRPC_DEBUG_LIBRARIES xmlrpcepid)
+	endif()
+
 endmacro (configure_xmlrpc)

 macro (configure_curl)
     sagase_configure_package (CURL
         NAMES Curl curl libcurl
-        COMPONENTS curl libcurl libcurl_imp
+        COMPONENTS curl libcurl_imp libcurld_imp
         PREFIXES ${ENV_NAALI_DEP_PATH}
         ${ENV_NAALI_DEP_PATH}/libcurl/lib/DLL-Debug
         ${ENV_NAALI_DEP_PATH}/libcurl/lib/DLL-Release)

-    find_debug_libraries (CURL "d")
-
+	if (MSVC)
+		set (CURL_LIBRARIES libcurl_imp)
+		set (CURL_DEBUG_LIBRARIES libcurld_imp)
+	endif()
+
 endmacro (configure_curl)

 macro (configure_openjpeg)


[cmake] Incorporate version additions for plugins.

--- cmake/Modules/WintermutePlugin.cmake
+++ cmake/Modules/WintermutePlugin.cmake
@@ -26,6 +26,7 @@
     )
   SET(oneValueArgs
     NAME
+    VERSION
     TARGET
     )
   SET(multiValueArgs
@@ -37,6 +38,13 @@

   WINTERMUTE_ADD_TARGET_PROPERTIES(${_wpd_TARGET})
   TARGET_LINK_LIBRARIES(${_wpd_TARGET} wintermute-core)
+  if (DEFINED _wpd_VERSION)
+    SET_TARGET_PROPERTIES(${_wpd_TARGET}
+      PROPERTIES
+        VERSION ${_wpd_VERSION}
+        SO_VERSION ${_wpd_VERSION}
+    )
+  endif()

   SET(_include_dirs
     ${_wpd_INCLUDE_DIRECTORIES}
@@ -47,6 +55,10 @@

   TARGET_INCLUDE_DIRECTORIES(${_wpd_TARGET} BEFORE
     PUBLIC ${_include_dirs})
+
+  WINTERMUTE_INSTALL_TARGET(
+    TARGET ${_wpd_TARGET}
+  )
 ENDMACRO(wintermute_plugin_declare)

 # TODO: Configure the test driver source file to work for the provided Plugin.


Fix cdash js coverage reporting.

Fix cdash js coverage reporting.

When I added templates.js from the provenance plugin, this file isn't included where ctest_coverage was expecting it.  Copy it to the expected location.  In my test environment, this fixed the submission to cdash.

--- cmake/aiur_nightly_js_coverage.cmake
+++ cmake/aiur_nightly_js_coverage.cmake
@@ -15,6 +15,9 @@
 set(CTEST_BUILD_NAME "Linux-master-nightly-js-cov")
 set(CTEST_CMAKE_GENERATOR "Unix Makefiles")

+# Copy compile plugin template files
+file(COPY "${CTEST_SOURCE_DIRECTORY}/clients/web/static/built/plugins/provenance/templates.js" DESTINATION "${CTEST_SOURCE_DIRECTORY}/plugins/provenance")
+
 ctest_start("Nightly")
 ctest_configure()
 file(RENAME "${CTEST_BINARY_DIRECTORY}/../coverage.xml" "${CTEST_BINARY_DIRECTORY}/coverage.xml")


[cmake] Rename "webui" to "webgui"; defaults to root7 (or "On" for "all").

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -221,7 +221,7 @@
  set(qt5web_defvalue ON)
  set(r_defvalue ON)
  set(roofit_defvalue ON)
- set(webui_defvalue ON)
+ set(webgui_defvalue ON)
  set(root7_defvalue ON)
  set(shadowpw_defvalue ON)
  set(sqlite_defvalue ON)


Remove 'pch' build option since it has no effect anywhere

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -131,7 +131,6 @@
 ROOT_BUILD_OPTION(odbc OFF "Enable support for ODBC databases (requires libiodbc or libodbc)")
 ROOT_BUILD_OPTION(opengl ON "Enable support for OpenGL (requires libGL and libGLU)")
 ROOT_BUILD_OPTION(oracle ON "Enable support for Oracle databases (requires Oracle Instant Client)")
-ROOT_BUILD_OPTION(pch ON "Enable support for Pre-Compiled Headers (PCH)")
 ROOT_BUILD_OPTION(pgsql ON "Enable support for PostgreSQL")
 ROOT_BUILD_OPTION(pyroot_experimental OFF "Use experimental Python bindings for ROOT")
 ROOT_BUILD_OPTION(pythia6_nolink OFF "Delayed linking of Pythia6 library")
@@ -178,10 +177,6 @@
 option(testing "Enable testing with CTest" OFF)

 set(gcctoolchain "" CACHE PATH "Set path to GCC toolchain used to build llvm/clang")
-
-if (runtime_cxxmodules)
-  set(pch_defvalue OFF)
-endif(runtime_cxxmodules)

 #--- Compression algorithms in ROOT-------------------------------------------------------------
 set(compression_default "zlib" CACHE STRING "Default compression algorithm (zlib (default), lz4, or lzma)")


Fixed forced static runtime for MSVC

Fixed forced static runtime for MSVC

--- cmake/projects/Protobuf/hunter.cmake
+++ cmake/projects/Protobuf/hunter.cmake
@@ -57,6 +57,13 @@
         protobuf_BUILD_TESTS=OFF
         protobuf_BUILD_PROTOC=OFF
   )
+elseif(MSVC)
+  hunter_cmake_args(
+      Protobuf
+      CMAKE_ARGS
+        protobuf_BUILD_TESTS=OFF
+        protobuf_MSVC_STATIC_RUNTIME=OFF # Do not forece static runtime
+  )
 else()
   hunter_cmake_args(
       Protobuf


Removing the for loop after testing as suggested by Abhinay.

--- cmake/usFunctionEmbedResources.cmake
+++ cmake/usFunctionEmbedResources.cmake
@@ -161,11 +161,8 @@
        # when it should really be:
        #  >> clang ... -c ... -o stub.o
        # (pardon the elipsis for abbreviation)
-       separate_arguments(TEMP_CXX_FLAGS UNIX_COMMAND ${CMAKE_CXX_FLAGS})
-       foreach(flag ${TEMP_CXX_FLAGS})
-         set(US_RESOURCE_CXX_FLAGS ${US_RESOURCE_CXX_FLAGS} ${flag})
-       endforeach(flag)
-
+
+       separate_arguments(US_RESOURCE_CXX_FLAGS UNIX_COMMAND ${CMAKE_CXX_FLAGS})
       # section name is "us_resources" because max length for section names in Mach-O format is 16 characters.
       add_custom_command(
         OUTPUT ${_source_output}


Fix test failures after "rebuild" target is run in Visual Studio (#146)

Signed-off-by: The Mathworks Inc <84dd9758784f644395c0f001c659d360269016e4@mathworks.com>

--- cmake/usFunctionEmbedResources.cmake
+++ cmake/usFunctionEmbedResources.cmake
@@ -148,15 +148,19 @@
       set_source_files_properties(${_source_output} PROPERTIES EXTERNAL_OBJECT 1 GENERATED 1)
     elseif(WIN32 AND CMAKE_RC_COMPILER)
       set(US_RESOURCE_ARCHIVE ${_zip_archive})
-      configure_file(${US_RESOURCE_RC_TEMPLATE} ${_source_output})
+      # If the file generated in "Configure" step is specified as the OUTPUT of add_custom_command,
+      # "Clean" target will delete the file and subsequent build will fail. To avoid failures in
+      # "ReBuild", generate the resource file in the "Configure" step and copy it in "Build" step
+      configure_file(${US_RESOURCE_RC_TEMPLATE} ${_source_output}_autogen)
       add_custom_command(
         OUTPUT ${_source_output}
-        COMMAND ${CMAKE_COMMAND} -E touch ${_source_output}
+        COMMAND ${CMAKE_COMMAND} -E copy ${_source_output}_autogen ${_source_output}
         DEPENDS ${_zip_archive}
         WORKING_DIRECTORY ${_zip_archive_path}
         COMMENT "Linking resources zip file for ${US_RESOURCE_TARGET}"
         VERBATIM
        )
+       set_source_files_properties(${_source_output} PROPERTIES GENERATED 1)
     elseif(UNIX)
       add_custom_command(
         OUTPUT ${_source_output}


addapted files.cmake after renaming

addapted files.cmake after renaming

--- Modules/DiffusionImaging/files.cmake
+++ Modules/DiffusionImaging/files.cmake
@@ -37,7 +37,7 @@
   IODataStructures/QBallImages/mitkNrrdQBallImageIOFactory.cpp
   IODataStructures/QBallImages/mitkNrrdQBallImageWriterFactory.cpp
   IODataStructures/QBallImages/mitkQBallImage.cpp
-  IODataStructures/QBallImages/mitkNrrdQBallImageSerializer.cpp
+  IODataStructures/QBallImages/mitkQBallImageSerializer.cpp

   # DataStructures -> Tensor
   IODataStructures/TensorImages/mitkTensorImageSource.cpp
@@ -46,7 +46,7 @@
   IODataStructures/TensorImages/mitkNrrdTensorImageIOFactory.cpp
   IODataStructures/TensorImages/mitkNrrdTensorImageWriterFactory.cpp
   IODataStructures/TensorImages/mitkTensorImage.cpp
-  IODataStructures/TensorImages/mitkNrrdTensorImageSerializer.cpp
+  IODataStructures/TensorImages/mitkTensorImageSerializer.cpp

   # Rendering
   Rendering/vtkMaskedProgrammableGlyphFilter.cpp


correct typo in eigen find_dependecy

correct typo in eigen find_dependecy

--- globjects-config.cmake
+++ globjects-config.cmake
@@ -12,7 +12,7 @@
 find_dependency(glbinding)

 if(OPTION_USE_EIGEN)
-  find_dependency(eigen3 3.3 REQUIRED )
+  find_dependency(Eigen3 3.3 REQUIRED )
 endif()


3.6.0-rc

--- Numerics/cmake/SiconosVersion.cmake
+++ Numerics/cmake/SiconosVersion.cmake
@@ -1,3 +1,3 @@
 SET(MAJOR_VERSION 3)
 SET(MINOR_VERSION 6)
-SET(PATCH_VERSION dev)
+SET(PATCH_VERSION 0-rc)


Adding hwloc.h include directory to the project

--- FindHWLOC.cmake
+++ FindHWLOC.cmake
@@ -26,6 +26,8 @@
   include(FindPackageHandleStandardArgs)
   find_package_handle_standard_args(HWLOC DEFAULT_MSG HWLOC_LIBRARIES
     HWLOC_INCLUDE_DIRS)
+
+  include_directories(${HWLOC_INCLUDE_DIRS})

   if(${HWLOC_VERSION} VERSION_LESS 1.5.0)
     set(HWLOC_GL_FOUND)


BUG: ExternalData downloads from midas3.kitware.com only supports https.

Recently, http protocol download support was removed from midas3.kitware.com.
Make this explicit in the ExternalData URL to inform expectations and provide
better error messages.

Change-Id: Ie8c177a42fb96824831294fe647c36d332a5f95b

--- CMake/ITKExternalData.cmake
+++ CMake/ITKExternalData.cmake
@@ -32,7 +32,7 @@
 if(NOT ITK_FORBID_DOWNLOADS)
   list(APPEND ExternalData_URL_TEMPLATES
     # Data published on MIDAS
-    "http://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"
+    "https://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"

     # Data published by developers using git-gerrit-push.
     "http://www.itk.org/files/ExternalData/%(algo)/%(hash)"


Revert "ENH: Update Qt4 minimum required version to 4.7"

This reverts commit 2c94808a272545ae199bccf7e2c30d7e75d03c0d.

--- CMake/ctkMacroSetupQt.cmake
+++ CMake/ctkMacroSetupQt.cmake
@@ -57,7 +57,7 @@
     endif()

   else()
-    set(minimum_required_qt_version "4.7")
+    set(minimum_required_qt_version "4.6")

     find_package(Qt4)


cmake: fix BUID_FULL error

cmake: fix BUID_FULL error

--- cmake/Modules/LibAddPlugin.cmake
+++ cmake/Modules/LibAddPlugin.cmake
@@ -124,11 +124,13 @@
 		add_executable (${testexename} ${TEST_SOURCES})
 		add_dependencies (${testexename} kdberrors_generated)

-		if (ARG_LINK_PLUGIN)
-			add_dependencies (${testexename} elektra-${ARG_LINK_PLUGIN})
-		else ()
-			add_dependencies (${testexename} elektra-${testname})
-		endif ()
+		if(BUILD_SHARED)
+			if (ARG_LINK_PLUGIN)
+				add_dependencies (${testexename} elektra-${ARG_LINK_PLUGIN})
+			else ()
+				add_dependencies (${testexename} elektra-${testname})
+			endif ()
+		endif()

 		# ~~~
 		# alternative approach to restore_variable


Support the use of dependencies made available via add_subdirectory

If iDynTree is included as part of a bigger project via add_subdirectory,
it is possible that some of its dependencies are included via add_subdirectory as well.
For this reason, this PR adds the logic to avoid searching via find_package for
a CMake package, if the relevant target are already defined.

--- cmake/iDynTreeDependencies.cmake
+++ cmake/iDynTreeDependencies.cmake
@@ -4,16 +4,31 @@

 #########################################################################
 # Enable/disable dependencies
-# DO_NOT_SILENTLY_SEARCH: Do not search for the package to set the default
-#                         value of IDYNTREE_USES_<dep> option, but just set
-#                         it to OFF
+# Positional argument: CMake package name
+# Options:
+# MINIMUM_VERSION <version> : Minimum version required for the package
+# COMPONENTS <comp1> ...    : Components that needs to be find for the dependency
+# DO_NOT_SILENTLY_SEARCH    : Do not search for the package to set the default
+#                             value of IDYNTREE_USES_<dep> option, but just set
+#                             it to OFF
+# MAIN_TARGET               : If the specified target exists, then the package is
+#                             is not searched via find_package because it means that
+#                             iDynTree has been added to a bigger project via add_subdirectory,
+#                             and the required dependency has already been defined via add_subdirectory
 macro(idyntree_handle_dependency package)
   set(options DO_NOT_SILENTLY_SEARCH)
-  set(singleValueArgs MINIMUM_VERSION)
+  set(singleValueArgs MINIMUM_VERSION MAIN_TARGET)
   set(multiValueArgs COMPONENTS)
   cmake_parse_arguments(IHD "${options}" "${singleValueArgs}" "${multiValueArgs}" ${ARGN})
   string(TOUPPER ${package} PKG)
-  if (NOT IHD_DO_NOT_SILENTLY_SEARCH)
+  # Handle MAIN_TARGET option
+  set(IHD_DEP_TARGET_IS_ALREADY_DEFINED FALSE)
+  if(IHD_MAIN_TARGET)
+    if(TARGET ${IHD_MAIN_TARGET})
+      set(IHD_DEP_TARGET_IS_ALREADY_DEFINED TRUE)
+    endif()
+  endif()
+  if (NOT IHD_DO_NOT_SILENTLY_SEARCH AND NOT IHD_DEP_TARGET_IS_ALREADY_DEFINED)
     if (IHD_COMPONENTS)
       find_package(${package} ${IHD_MINIMUM_VERSION} QUIET COMPONENTS ${IHD_COMPONENTS})
     else ()
@@ -21,10 +36,15 @@
     endif ()
     set(IDYNTREE_USES_${PKG}_DEFAULT ${${package}_FOUND})
   else ()
-    set(IDYNTREE_USES_${PKG}_DEFAULT FALSE)
+    # If the target is defined, the dependency is enabled unless IDYNTREE_USES_${PKG} is explicitly set to FALSE
+    if (IHD_DEP_TARGET_IS_ALREADY_DEFINED)
+      set(IDYNTREE_USES_${PKG}_DEFAULT TRUE)
+    else ()
+      set(IDYNTREE_USES_${PKG}_DEFAULT FALSE)
+    endif()
   endif ()
   option(IDYNTREE_USES_${PKG} "Build the part of iDynTree that depends on package ${package}" ${IDYNTREE_USES_${PKG}_DEFAULT})
-  if (IDYNTREE_USES_${PKG})
+  if (IDYNTREE_USES_${PKG} AND NOT IHD_DEP_TARGET_IS_ALREADY_DEFINED)
     if (IHD_COMPONENTS)
       find_package(${package} ${IHD_MINIMUM_VERSION} COMPONENTS ${IHD_COMPONENTS} REQUIRED)
     else ()
@@ -34,8 +54,13 @@
 endmacro ()

 # Eigen is compulsory (minimum version 3.2.92)
-find_package(Eigen3 3.2.92 REQUIRED)
-find_package(LibXml2 REQUIRED)
+if(NOT TARGET Eigen::Eigen3)
+  find_package(Eigen3 3.2.92 REQUIRED)
+endif()
+
+if(NOT TARGET LibXml2::LibXml2)
+  find_package(LibXml2 REQUIRED)
+endif()

 # For orocos_kdl we have custom logic, because we want to set it to FALSE by default
 option(IDYNTREE_USES_KDL "Build the part of iDynTree that depends on package orocos_kdl" FALSE)
@@ -46,13 +71,7 @@
   find_package(orocos_kdl REQUIRED)
 endif ()

-find_package(ICUB QUIET)
-option(IDYNTREE_USES_ICUB_MAIN "Build the part of iDynTree that depends on package ICUB" ${ICUB_FOUND})
-if (IDYNTREE_USES_ICUB)
-  find_package(ICUB REQUIRED)
-endif ()
-
-idyntree_handle_dependency(YARP COMPONENTS os dev math rosmsg idl_tools)
+idyntree_handle_dependency(YARP COMPONENTS os dev math rosmsg idl_tools MAIN_TARGET YARP::YARP_os)
 set(YARP_REQUIRED_VERSION 3.3)
 if(IDYNTREE_USES_YARP AND YARP_FOUND)
   if(${YARP_VERSION} VERSION_LESS ${YARP_REQUIRED_VERSION})
@@ -60,10 +79,16 @@
   endif()
 endif()

+find_package(ICUB QUIET)
+option(IDYNTREE_USES_ICUB_MAIN "Build the part of iDynTree that depends on package ICUB" ${ICUB_FOUND})
+if (IDYNTREE_USES_ICUB)
+  find_package(ICUB REQUIRED)
+endif ()
+
 idyntree_handle_dependency(IPOPT)
 idyntree_handle_dependency(Irrlicht)
 idyntree_handle_dependency(Qt5 COMPONENTS Qml Quick Widgets)
-idyntree_handle_dependency(OsqpEigen)
+idyntree_handle_dependency(OsqpEigen MAIN_TARGET OsqpEigen::OsqpEigen)
 idyntree_handle_dependency(ALGLIB DO_NOT_SILENTLY_SEARCH)
 set(ALGLIB_REQUIRED_VERSION 3.14.0)
 if(IDYNTREE_USES_ALGLIB AND ALGLIB_FOUND)
@@ -73,4 +98,4 @@
 endif()
 idyntree_handle_dependency(WORHP)
 # Workaround for https://github.com/robotology/idyntree/issues/599
-idyntree_handle_dependency(ASSIMP DO_NOT_SILENTLY_SEARCH)
+idyntree_handle_dependency(ASSIMP DO_NOT_SILENTLY_SEARCH MAIN_TARGET assimp::assimp)


It turns out the svgcairo device has been producing standards-compliant
SVG all along and most SVG viewers render the results fine.  So turn
on svgcairo by default.

svn path=/trunk/; revision=8118

--- cmake/modules/drivers-init.cmake
+++ cmake/modules/drivers-init.cmake
@@ -72,14 +72,13 @@

 set(DRIVERS_DEVICE_LIST
 "aqt:aqt:ON"
-# memcairo does not work and svgcairo does not render text so turn them off
-# by default.  The remaining cairo devices work well so turn them on by
-# default.
+# memcairo does not work so turn it off by default.
+# The remaining cairo devices work well so turn them on by default.
 "memcairo:cairo:OFF"
 "pdfcairo:cairo:ON"
 "pngcairo:cairo:ON"
 "pscairo:cairo:ON"
-"svgcairo:cairo:OFF"
+"svgcairo:cairo:ON"
 "xcairo:cairo:ON"
 "cgm:cgm:ON"
 "dg300:dg300:OFF"


cmake nuttx slightly quieter

cmake nuttx slightly quieter

--- cmake/nuttx/px4_impl_nuttx.cmake
+++ cmake/nuttx/px4_impl_nuttx.cmake
@@ -224,11 +224,11 @@
 	file(GLOB_RECURSE config_files ${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG}/*)
 	add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CONFIG}.export
 		COMMAND ${ECHO} Configuring NuttX for ${CONFIG}
-		COMMAND ${MAKE} -C${nuttx_src}/nuttx -r --quiet distclean
+		COMMAND ${MAKE} --no-print-directory -C${nuttx_src}/nuttx -r --quiet distclean
 		COMMAND ${CP} -r ${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG} ${nuttx_src}/nuttx/configs
 		COMMAND cd ${nuttx_src}/nuttx/tools && ./configure.sh ${CONFIG}/nsh
 		COMMAND ${ECHO} Exporting NuttX for ${CONFIG}
-		COMMAND ${MAKE} --quiet -C ${nuttx_src}/nuttx -j${THREADS} -r CONFIG_ARCH_BOARD=${CONFIG} export
+		COMMAND ${MAKE} --no-print-directory --quiet -C ${nuttx_src}/nuttx -j${THREADS} -r CONFIG_ARCH_BOARD=${CONFIG} export
 		COMMAND ${CP} -r ${nuttx_src}/nuttx/nuttx-export.zip ${CMAKE_BINARY_DIR}/${CONFIG}.export
 		DEPENDS ${config_files} ${DEPENDS} __nuttx_copy_${CONFIG})


Deleted a bunch of unused configuration macros.

--- cmake/templates/cvconfig.h.cmake
+++ cmake/templates/cvconfig.h.cmake
@@ -1,11 +1,3 @@
-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
-   systems. This function is required for `alloca.c' support on those systems.
-   */
-#cmakedefine  CRAY_STACKSEG_END
-
-/* Define to 1 if using `alloca.c'. */
-#cmakedefine C_ALLOCA
-
 /* Define to 1 if you have `alloca', as a function or macro. */
 #cmakedefine HAVE_ALLOCA 1

@@ -70,23 +62,11 @@
 /* Apple ImageIO Framework */
 #cmakedefine  HAVE_IMAGEIO

-/* Define to 1 if you have the <inttypes.h> header file. */
-#cmakedefine  HAVE_INTTYPES_H 1
-
 /* JPEG-2000 codec */
 #cmakedefine  HAVE_JASPER

 /* IJG JPEG codec */
 #cmakedefine  HAVE_JPEG
-
-/* Define to 1 if you have the `dl' library (-ldl). */
-#cmakedefine  HAVE_LIBDL 1
-
-/* Define to 1 if you have the `gomp' library (-lgomp). */
-#cmakedefine  HAVE_LIBGOMP 1
-
-/* Define to 1 if you have the `m' library (-lm). */
-#cmakedefine  HAVE_LIBM 1

 /* libpng/png.h needs to be included */
 #cmakedefine  HAVE_LIBPNG_PNG_H
@@ -100,14 +80,8 @@
 /* PNG codec */
 #cmakedefine  HAVE_PNG

-/* Define to 1 if you have the `png_get_valid' function. */
-#cmakedefine  HAVE_PNG_GET_VALID 1
-
 /* png.h needs to be included */
 #cmakedefine  HAVE_PNG_H
-
-/* Define to 1 if you have the `png_set_tRNS_to_alpha' function. */
-#cmakedefine  HAVE_PNG_SET_TRNS_TO_ALPHA 1

 /* QuickTime video libraries */
 #cmakedefine  HAVE_QUICKTIME
@@ -129,9 +103,6 @@

 /* OpenNI library */
 #cmakedefine  HAVE_OPENNI
-
-/* LZ77 compression/decompression library (used for PNG) */
-#cmakedefine  HAVE_ZLIB

 /* Intel Integrated Performance Primitives */
 #cmakedefine  HAVE_IPP
@@ -156,14 +127,6 @@

 /* Define to the version of this package. */
 #define  PACKAGE_VERSION "${PACKAGE_VERSION}"
-
-/* If using the C implementation of alloca, define if you know the
-   direction of stack growth for your system; otherwise it will be
-   automatically deduced at runtime.
-    STACK_DIRECTION > 0 => grows toward higher addresses
-    STACK_DIRECTION < 0 => grows toward lower addresses
-    STACK_DIRECTION = 0 => direction of growth unknown */
-#cmakedefine  STACK_DIRECTION

 /* Version number of package */
 #define  VERSION "${PACKAGE_VERSION}"
@@ -226,9 +189,6 @@
 /* OpenGL support*/
 #cmakedefine HAVE_OPENGL

-/* Clp support */
-#cmakedefine HAVE_CLP
-
 /* Qt support */
 #cmakedefine HAVE_QT


Backport https://github.com/robotology/ycm/pull/339

--- cmake/InstallBasicPackageFiles.cmake
+++ cmake/InstallBasicPackageFiles.cmake
@@ -614,7 +614,7 @@
   endif()

   unset(PACKAGE_DEPENDENCIES)
-  if(DEFINED _IBPF_DEPENDENCIES)
+  if(DEFINED _IBPF_DEPENDENCIES OR (DEFINED _IBPF_PRIVATE_DEPENDENCIES AND _need_private_deps))
     set(PACKAGE_DEPENDENCIES "#### Expanded from @PACKAGE_DEPENDENCIES@ by install_basic_package_files() ####\n\ninclude(CMakeFindDependencyMacro)\n")

     foreach(_dep ${_IBPF_DEPENDENCIES})


cmake: linker: Automatically generates memory regions

As already done for the regular linker script, dinamically generates the
memory regions with the 'zephyr,memory-region' compatible also when
using the cmake linker generator.

Signed-off-by: Carlo Caione <ca4506c8c654a4ccf75802e86b5d162c1e96f065@baylibre.com>

--- cmake/linker_script/arm/linker.cmake
+++ cmake/linker_script/arm/linker.cmake
@@ -34,20 +34,11 @@
 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(NODELABEL ti_ccfg_partition FLAGS rwx)
-
-# Data & Instruction Tightly Coupled Memory
-zephyr_linker_dts_memory(CHOSEN "zephyr,itcm"  FLAGS rw)
-zephyr_linker_dts_memory(CHOSEN "zephyr,dtcm"  FLAGS rw)
-
-zephyr_linker_dts_memory(NODELABEL sram1       FLAGS rw)
-zephyr_linker_dts_memory(NODELABEL sram2       FLAGS rw)
-zephyr_linker_dts_memory(NODELABEL sram3       FLAGS rw)
-zephyr_linker_dts_memory(NODELABEL sram4       FLAGS rw)
-zephyr_linker_dts_memory(NODELABEL sdram1      FLAGS rw)
-zephyr_linker_dts_memory(NODELABEL sdram2      FLAGS rw)
-zephyr_linker_dts_memory(NODELABEL backup_sram FLAGS rw)
+# Only use 'rw' as FLAGS. It's not used anyway.
+dt_comp_path(paths COMPATIBLE "zephyr,memory-region")
+foreach(path IN LISTS paths)
+  zephyr_linker_dts_memory(PATH ${path} FLAGS rw)
+endforeach()

 if(CONFIG_XIP)
   zephyr_linker_group(NAME ROM_REGION LMA FLASH)


ENH add all cesbios remote modules

ENH add all cesbios remote modules

--- SuperBuild/CMake/External_otb.cmake
+++ SuperBuild/CMake/External_otb.cmake
@@ -142,9 +142,9 @@
     list(APPEND OTB_MODULES_CONFIG -DModule_${remote_module}:BOOL=ON)
   endforeach()

-  # Add CESBIO'S remote modules if OTB is compiled with GSL support (for now only TemporalGapFilling)
+  # Add CESBIO'S remote modules if OTB is compiled with GSL support
   if(OTB_USE_GSL)
-    foreach(remote_module OTBTemporalGapFilling)
+    foreach(remote_module OTBTemporalGapFilling OTBBioVars OTBPhenology)
       list(APPEND OTB_MODULES_CONFIG -DModule_${remote_module}:BOOL=ON)
     endforeach()
   endif()


update fftw from 3.3.8 to 3.3.9

update fftw from 3.3.8 to 3.3.9

--- SuperBuild/CMake/External_fftw.cmake
+++ SuperBuild/CMake/External_fftw.cmake
@@ -36,8 +36,8 @@
 # Compile the float version of FFTW
 ExternalProject_Add(FFTWF
   PREFIX FFTW/FFTWF
-  URL "http://www.fftw.org/fftw-3.3.8.tar.gz"
-  URL_MD5 8aac833c943d8e90d51b697b27d4384d
+  URL "http://www.fftw.org/fftw-3.3.9.tar.gz"
+  URL_MD5 50145bb68a8510b5d77605f11cadf8dc
   SOURCE_DIR ${FFTWF_SB_SRC}
   BINARY_DIR ${FFTWF_SB_BUILD}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
@@ -61,8 +61,8 @@
 # Compile the double version of FFTW
 ExternalProject_Add(FFTWD
   PREFIX FFTW/FFTWD
-  URL "http://www.fftw.org/fftw-3.3.8.tar.gz"
-  URL_MD5 8aac833c943d8e90d51b697b27d4384d
+  URL "http://www.fftw.org/fftw-3.3.9.tar.gz"
+  URL_MD5 50145bb68a8510b5d77605f11cadf8dc
   SOURCE_DIR ${FFTWD_SB_SRC}
   BINARY_DIR ${FFTWD_SB_BUILD}
   INSTALL_DIR ${SB_INSTALL_PREFIX}


Fix build on Mac OS X

Fix build on Mac OS X

Qt 5.5 requires Qt5UiPlugin framework to be in the include path.
On Linux this didn't break as all Qt headers are typically in the
same prefix, but on Mac, the include hierarchy is quite different.

REVIEW: 125390

--- KF5DesignerPluginMacros.cmake
+++ KF5DesignerPluginMacros.cmake
@@ -87,9 +87,22 @@
             PURPOSE "Required to build Qt Designer plugins"
         )
     endif()
+    if(NOT Qt5Designer_VERSION_STRING VERSION_LESS 5.5.0 AND NOT Qt5UiPlugin_FOUND)
+        find_package(Qt5UiPlugin ${REQUIRED_QT_VERSION} ${_requiredarg} NO_MODULE)
+        set_package_properties(Qt5UiPlugin PROPERTIES
+            PURPOSE "Required to build Qt Designer plugins"
+        )
+    endif()
+    if (Qt5UiPlugin_FOUND)
+        # for some reason, Qt5UiPlugin does not set its _INCLUDE_DIRS variable. Fill it manually
+        get_target_property(Qt5UiPlugin_INCLUDE_DIRS Qt5::UiPlugin INTERFACE_INCLUDE_DIRECTORIES)
+    endif()
     if(Qt5Designer_FOUND)
         add_library(${target} MODULE ${_files})
-        target_include_directories(${target} PRIVATE ${Qt5Designer_INCLUDE_DIRS})
+        target_include_directories(${target}
+             PRIVATE ${Qt5UiPlugin_INCLUDE_DIRS}
+             PRIVATE ${Qt5Designer_INCLUDE_DIRS}
+        )
     endif()
 endmacro()


Typo fixed

Typo fixed

--- test/CTestCustom.cmake
+++ test/CTestCustom.cmake
@@ -13,3 +13,5 @@
       vc-math_sse
       vc-math_VC_LOG_ILP2_sse
       vc-math_VC_LOG_ILP_sse)
+endif()
+


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

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

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


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

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


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


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


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


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   17)
+SET(KWSYS_DATE_STAMP_DAY   18)


Update ITK after 5.3rc03, with eigen warning fixes

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

-set(_DEFAULT_ITK_GIT_TAG "v5.3rc03")
+set(_DEFAULT_ITK_GIT_TAG "1639cab20ba52dc49118d96fef881bfa72d58551")
 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 Superbuild version to v5.1rc02

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

-# post v5.1rc01
-set(_DEFAULT_ITK_GIT_TAG "9d0f5f7398287c24d5c926a214582d53b81f4596")
+set(_DEFAULT_ITK_GIT_TAG "v5.1rc02")
 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 Superbuild ITK Version along 5.1 release

This ITK update contains critical bug fixes to address issues with
CompositeTransforms with zero transforms.

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

-set(_DEFAULT_ITK_GIT_TAG "1ab2baa9ab21da47ff5a13a49f969a537cc23f2d")
+set(_DEFAULT_ITK_GIT_TAG "6eb2bb0005da1d32065dd91b44b3796d44a84f0f")
 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}")


Fix for Only bootstrap Buildyard if required..., Note: changed include logics!

--- Buildyard.cmake
+++ Buildyard.cmake
@@ -6,15 +6,16 @@
 # CMakeLists.txt:
 #   project(Foo)
 #   list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake)
-#   if(NOT BUILDYARD)
-#     include(Buildyard)
+#   include(Buildyard)
+#   if(BUILDYARD_STOP)
 #     return()
 #   endif()
 #   ...

 cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
 if(BUILDYARD)
-  message(FATAL_ERROR "Running from within Buildyard, don't use me here")
+  # Running from within Buildyard, no need for me
+  return()
 endif()

 option(DISABLE_BUILDYARD "Disable bootstrapping using Buildyard" OFF)
@@ -47,3 +48,4 @@
 else()
   message(STATUS "Use 'make -jN' to bootstrap and 'make -jN AllBuild' after bootstrap\n")
 endif()
+set(BUILDYARD_STOP TRUE PARENT_SCOPE)


Make platform independent

Make platform independent

--- test/test_driver.cmake
+++ test/test_driver.cmake
@@ -37,7 +37,7 @@
     add_custom_command(
         TARGET check
         PRE_BUILD
-        COMMAND make ${test_target} #TODO: Windows?
+        COMMAND cmake --build . --target ${test_target}
         WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
         COMMENT "Running ${test_target} ..." VERBATIM
     )


Install headers from extract_includes for all platforms

--- cmake/install.cmake
+++ cmake/install.cmake
@@ -16,7 +16,7 @@
 install(TARGETS protoc EXPORT protobuf-targets
   RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)

-if(MSVC)
+if(TRUE)
   file(STRINGS extract_includes.bat.in _extract_strings
     REGEX "^copy")
   foreach(_extract_string ${_extract_strings})


Factor out adding fPIC to a target's flags

--- cmake/targets.cmake
+++ cmake/targets.cmake
@@ -34,6 +34,19 @@
 function (vistk_install)
   if (NOT suppress_install)
     install(${ARGN})
+  endif ()
+endfunction ()
+
+function (vistk_compile_pic name)
+  # TODO: Bump minimum CMake version to 2.8.9
+  if (CMAKE_VERSION VERSION_GREATER "2.8.9")
+    set_target_properties(${name}
+      PROPERTIES
+        POSITION_INDEPENDENT_CODE TRUE)
+  elseif (NOT MSVC)
+    set_target_properties(${name}
+      PROPERTIES
+      COMPILE_FLAGS "-fPIC")
   endif ()
 endfunction ()

@@ -136,16 +149,7 @@
   target_link_libraries(${name}
     ${ARGN})

-  # TODO: Bump minimum CMake version to 2.8.9
-  if (CMAKE_VERSION VERSION_GREATER "2.8.9")
-    set_target_properties(${name}
-      PROPERTIES
-        POSITION_INDEPENDENT_CODE TRUE)
-  elseif (NOT MSVC)
-    set_target_properties(${name}
-      PROPERTIES
-      COMPILE_FLAGS "-fPIC")
-  endif ()
+  vistk_compile_pic(${name})
 endfunction ()

 function (vistk_add_helper_library name)


update the version in cmake too

update the version in cmake too

--- cmake/version.cmake
+++ cmake/version.cmake
@@ -26,7 +26,7 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #
 set(ECTO_MAJOR_VERSION 0)
-set(ECTO_MINOR_VERSION 1)
+set(ECTO_MINOR_VERSION 3)
 set(ECTO_PATCH_VERSION 0)
 set(ECTO_SOVERSION ${ECTO_MAJOR_VERSION}.${ECTO_MINOR_VERSION})
 set(ECTO_VERSION ${ECTO_MAJOR_VERSION}.${ECTO_MINOR_VERSION}.${ECTO_PATCH_VERSION})


ManageArchive: Fix the comments

ManageArchive: Fix the comments

--- Modules/ManageArchive.cmake
+++ Modules/ManageArchive.cmake
@@ -1,345 +1,334 @@
-# - Archive Management Module
-# By default CPack pack everything under the source directory,
-# this is usually
-# undesirable. We avoid this by using the sane default ignore list.
-#
-# Includes:
-#   ManageFile
-#   ManageVersion
-#   CPack
-#
-# Included by:
-#   ManageRPM
+# - Manage Source Archive and track its content.
+# This module manages source archive by:
+#  - Handle the ChangeLog
+#  - Build the source archive
+#  - Exclude unwanted files, either from ignore files of source version
+#    control, or add them to SOURCE_ARCHIVE_IGNORE_FILES
+#  - Track the contents in source archive, when it updates, the source
+#    Archive should be updated.
+#
+# This module provide a convenient wrapper of CPack.
+# CPack itself, by default, pack everything under the source directory,
+# this is usually undesirable.
+# We avoid this by using the sane default ignore list.
+#
+# Included Modules:
+# - ManageFile
+# - ManageVersion
+# - CPack
 #
 # Defines and reads variables:
-#   CHANGELOG_FILE: Location of ChangeLog.
-#     Default: ${CMAKE_SOURCE_DIR}/ChangeLog
+#   - CHANGELOG_FILE: Location of ChangeLog.
+#       Default: ${CMAKE_SOURCE_DIR}/ChangeLog
 #
 # Defines following targets:
-#     changelog: ChangeLog update.
-#     pack_remove_old: Remove old source package files.
-#
-# Defines following function:
-#   SOURCE_ARCHIVE_CONTENTS_ADD(filename)
+#   - changelog: ChangeLog update.
+#       pack_remove_old: Remove old source package files.
+#
+# Defines following functions:
+#   SOURCE_ARCHIVE_CONTENTS_ADD(<filename>)
 #   - Add a file to source archive if the file is not in the archive.
 #     * Parameters:
 #       - filename: Filename to be added.
 #
-#   SOURCE_ARCHIVE_CONTENTS_ADD_NO_CHECK(filename)
+#   SOURCE_ARCHIVE_CONTENTS_ADD_NO_CHECK(>filename>)
 #   - Add a file to source archive without check.
 #     * Parameters:
 #       - filename: Filename to be added.
 #
-# Defines following macro:
-#   PACK_SOURCE_CPACK(var [GENERATOR cpackGenerator]
-#     [GITIGNORE gitignoreFile] [INCLUDE fileList]
-#   )
-#   - Pack with CPack. Thus cpack related targets
-#     such as 'package_source' will be added.
-#     * Parameters:
-#       + var: Variable that hold cpack filename (without directory).
-#       + GENERATOR cpackGenerator: Specify CPack Generator to be used.
-#         Default: TGZ
-#       + GITIGNORE gitignoreFile: Use gitignore
-#         file as bases of ignore_file list
-#       + INCLUDE fileList: List of files that to be packed disregarding
-#         the ignore file. This is useful for packing the generated file
-#         such as .pot or Changelog.
-#     * Define following variables:
-#       + PROJECT_NAME: Project name
-#       + PRJ_VER: Project version
-#       + PRJ_SUMMARY: (Optional) Project summary
-#       + VENDOR: Organization that issue this project.
-#       + SOURCE_ARCHIVE_CONTENTS: List of files to be packed to archive.
-#       + SOURCE_ARCHIVE_FILE_EXTENSION: File extension of
-#         the source package
-#       + SOURCE_ARCHIVE_IGNORE_FILES: List of files to be
-#         ignored to archive.
-#       + SOURCE_ARCHIVE_NAME: Name of source archive (without path)
-#
-#   PACK_SOURCE_ARCHIVE([outputDir | OUTPUT_FILE file]
-#     [GENERATOR cpackGenerator]
-#     [GITIGNORE gitignoreFile] [INCLUDE fileList])[generator]
-#   )
-#   - Pack source archive, this provide an convenient wrapper
-#      of PACK_SOURCE_CPACK.
-#     Default output name: <projectName>-<PRJ_VER>-Source.<packFormat>
-#     * Parameters:
-#       + outputDir: Directory to write source archive.
-#       + OUTPUT_FILE file: Output file with path.
-#       See PACK_SOURCE_CPACK for other parameters.
-#     * Read following variables:
-#       + SOURCE_ARCHIVE_FILE: Path to source archive file
-#     * Target:
-#       + pack_src: Pack source files like package_source.
-#       + clean_pack_src: Remove all source archives.
-#       + clean_old_pack_src: Remove all old source package.
-#
-#
-IF(NOT DEFINED _MANAGE_ARCHIVE_CMAKE_)
-    SET (_MANAGE_ARCHIVE_CMAKE_ "DEFINED")
-    SET(SOURCE_ARCHIVE_IGNORE_FILES_COMMON
-	"/\\\\.svn/"  "/CVS/" "/\\\\.git/" "/\\\\.hg/" "NO_PACK")
-
-    SET(SOURCE_ARCHIVE_IGNORE_FILES_CMAKE
-	"/CMakeFiles/" "_CPack_Packages/" "/Testing/"
-	"\\\\.directory$" "CMakeCache\\\\.txt$"
-	"/install_manifest.txt$"
-	"/cmake_install\\\\.cmake$" "/cmake_uninstall\\\\.cmake$"
-	"/CPack.*\\\\.cmake$" "/CTestTestfile\\\\.cmake$"
-	"Makefile$" "/${PROJECT_NAME}-${PRJ_VER}-SOURCE/"
-	)
-    SET(SOURCE_ARCHIVE_IGNORE_FILES
-	${SOURCE_ARCHIVE_IGNORE_FILES_CMAKE}
-	${SOURCE_ARCHIVE_IGNORE_FILES_COMMON}
-	)
-
-    SET(CHANGELOG_FILE "${CMAKE_SOURCE_DIR}/ChangeLog" CACHE FILEPATH "ChangeLog")
-
-    INCLUDE(ManageVersion)
-    INCLUDE(ManageFile)
-
-    ## ChangeLog Update
-    ADD_CUSTOM_TARGET(changelog
-	COMMAND ${CMAKE_COMMAND} -Dcmd=update
-	-Dchangelog=${CHANGELOG_FILE}
-	-Drelease=${RELEASE_NOTES_FILE}
-	-Dprj_info=${PRJ_INFO_CMAKE}
-	-P ${CMAKE_FEDORA_MODULE_DIR}/ManageChangeLogScript.cmake
-	DEPENDS ${RELEASE_NOTES_FILE} ${CHANGELOG_FILE}
-	COMMENT "ChangeLog: ${CHANGELOG_FILE}"
-	)
-
-    FUNCTION(SOURCE_ARCHIVE_CONTENTS_ADD filename)
-	GET_FILENAME_COMPONENT(_file "${filename}" ABSOLUTE)
-	FILE(RELATIVE_PATH _f ${CMAKE_SOURCE_DIR} "${_file}")
-	LIST(FIND SOURCE_ARCHIVE_CONTENTS "${_f}" _index)
-	IF(_index LESS 0)
-	    LIST(APPEND SOURCE_ARCHIVE_CONTENTS "${_f}")
-	    SET(SOURCE_ARCHIVE_CONTENTS "${SOURCE_ARCHIVE_CONTENTS}"
-		CACHE INTERNAL "Source archive file list"
-		)
-	ENDIF(_index LESS 0)
-    ENDFUNCTION(SOURCE_ARCHIVE_CONTENTS_ADD filename)
-
-    FUNCTION(SOURCE_ARCHIVE_CONTENTS_ADD_NO_CHECK filename)
-	GET_FILENAME_COMPONENT(_file "${filename}" ABSOLUTE)
-	FILE(RELATIVE_PATH _f ${CMAKE_SOURCE_DIR} "${_file}")
+# Defines following macros:
+#   PACK_SOURCE_ARCHIVE([<outputDir> | OUTPUT_FILE <file>]
+#     [GENERATOR <cpackGenerator>]
+#     [GITIGNORE <gitignoreFile>] [INCLUDE <fileList>])
+#     )
+#     - Pack source archive, this provide an convenient wrapper
+#       of PACK_SOURCE_CPACK.
+#       * Parameters:
+#         + outputDir: Directory to write source archive.
+#         + OUTPUT_FILE file: Output file with path.
+#           Default: SOURCES/<projectName>-<PRJ_VER>-Source.<packFormat>
+#         + See PACK_SOURCE_CPACK for other parameters.
+#       * Define following variables:
+#         + SOURCE_ARCHIVE_CONTENTS: List of files to be packed.
+#         + SOURCE_ARCHIVE_FILE_EXTENSION: File extension of
+#             the source package
+#         + SOURCE_ARCHIVE_IGNORE_FILES: List of files to be
+#             ignored to archive.
+#         + SOURCE_ARCHIVE_NAME: Name of source archive (without path)
+#       * Define following targets:
+#         + pack_src: Pack source files like package_source.
+#         + clean_pack_src: Remove all source archives.
+#         + clean_old_pack_src: Remove all old source package.
+#
+#
+IF(DEFINED _MANAGE_ARCHIVE_CMAKE_)
+    RETURN()
+ENDIF(DEFINED _MANAGE_ARCHIVE_CMAKE_)
+
+SET (_MANAGE_ARCHIVE_CMAKE_ "DEFINED")
+SET(SOURCE_ARCHIVE_IGNORE_FILES_COMMON
+    "/\\\\.svn/"  "/CVS/" "/\\\\.git/" "/\\\\.hg/" "NO_PACK")
+
+SET(SOURCE_ARCHIVE_IGNORE_FILES_CMAKE
+    "/CMakeFiles/" "_CPack_Packages/" "/Testing/"
+    "\\\\.directory$" "CMakeCache\\\\.txt$"
+    "/install_manifest.txt$"
+    "/cmake_install\\\\.cmake$" "/cmake_uninstall\\\\.cmake$"
+    "/CPack.*\\\\.cmake$" "/CTestTestfile\\\\.cmake$"
+    "Makefile$" "/${PROJECT_NAME}-${PRJ_VER}-SOURCE/"
+    )
+SET(SOURCE_ARCHIVE_IGNORE_FILES
+    ${SOURCE_ARCHIVE_IGNORE_FILES_CMAKE}
+    ${SOURCE_ARCHIVE_IGNORE_FILES_COMMON}
+    )
+
+SET(CHANGELOG_FILE "${CMAKE_SOURCE_DIR}/ChangeLog" CACHE FILEPATH "ChangeLog")
+
+INCLUDE(ManageVersion)
+INCLUDE(ManageFile)
+
+## ChangeLog Update
+ADD_CUSTOM_TARGET(changelog
+    COMMAND ${CMAKE_COMMAND} -Dcmd=update
+    -Dchangelog=${CHANGELOG_FILE}
+    -Drelease=${RELEASE_NOTES_FILE}
+    -Dprj_info=${PRJ_INFO_CMAKE}
+    -P ${CMAKE_FEDORA_MODULE_DIR}/ManageChangeLogScript.cmake
+    DEPENDS ${RELEASE_NOTES_FILE} ${CHANGELOG_FILE}
+    COMMENT "ChangeLog: ${CHANGELOG_FILE}"
+    )
+
+FUNCTION(SOURCE_ARCHIVE_CONTENTS_ADD filename)
+    GET_FILENAME_COMPONENT(_file "${filename}" ABSOLUTE)
+    FILE(RELATIVE_PATH _f ${CMAKE_SOURCE_DIR} "${_file}")
+    LIST(FIND SOURCE_ARCHIVE_CONTENTS "${_f}" _index)
+    IF(_index LESS 0)
 	LIST(APPEND SOURCE_ARCHIVE_CONTENTS "${_f}")
 	SET(SOURCE_ARCHIVE_CONTENTS "${SOURCE_ARCHIVE_CONTENTS}"
 	    CACHE INTERNAL "Source archive file list"
 	    )
-    ENDFUNCTION(SOURCE_ARCHIVE_CONTENTS_ADD_NO_CHECK filename)
-
-    # Internal:  SOURCE_ARCHIVE_GET_CONTENTS()
-    #   - Return all source file to be packed.
-    #     This is called by SOURCE_ARCHIVE(),
-    #     So no need to call it again.
-    FUNCTION(SOURCE_ARCHIVE_GET_CONTENTS )
-	SET(_fileList "")
-	FILE(GLOB_RECURSE _ls FOLLOW_SYMLINKS "*" )
-	STRING(REPLACE "\\\\" "\\" _ignore_files "${SOURCE_ARCHIVE_IGNORE_FILES}")
-	#SET(_ignore_files "${SOURCE_ARCHIVE_IGNORE_FILES}")
-	FOREACH(_file ${_ls})
-	    SET(_matched 0)
-	    FOREACH(filePattern ${_ignore_files})
-		M_MSG(${M_INFO3} "_file=${_file} filePattern=${filePattern}")
-
-		IF(_file MATCHES "${filePattern}")
-		    SET(_matched 1)
-		    BREAK()
-		ENDIF(_file MATCHES "${filePattern}")
-	    ENDFOREACH(filePattern ${_ignore_files})
-	    IF(NOT _matched)
-		SOURCE_ARCHIVE_CONTENTS_ADD_NO_CHECK("${_file}")
-	    ENDIF(NOT _matched)
-	ENDFOREACH(_file ${_ls})
-	SET(SOURCE_ARCHIVE_CONTENTS "${SOURCE_ARCHIVE_CONTENTS}"
-	    CACHE INTERNAL "Source archive file list"
+    ENDIF(_index LESS 0)
+ENDFUNCTION(SOURCE_ARCHIVE_CONTENTS_ADD filename)
+
+FUNCTION(SOURCE_ARCHIVE_CONTENTS_ADD_NO_CHECK filename)
+    GET_FILENAME_COMPONENT(_file "${filename}" ABSOLUTE)
+    FILE(RELATIVE_PATH _f ${CMAKE_SOURCE_DIR} "${_file}")
+    LIST(APPEND SOURCE_ARCHIVE_CONTENTS "${_f}")
+    SET(SOURCE_ARCHIVE_CONTENTS "${SOURCE_ARCHIVE_CONTENTS}"
+	CACHE INTERNAL "Source archive file list"
+	)
+ENDFUNCTION(SOURCE_ARCHIVE_CONTENTS_ADD_NO_CHECK filename)
+
+# Internal:  SOURCE_ARCHIVE_GET_CONTENTS()
+#   - Return all source file to be packed.
+#     This is called by SOURCE_ARCHIVE(),
+#     So no need to call it again.
+FUNCTION(SOURCE_ARCHIVE_GET_CONTENTS )
+    SET(_fileList "")
+    FILE(GLOB_RECURSE _ls FOLLOW_SYMLINKS "*" )
+    STRING(REPLACE "\\\\" "\\" _ignore_files
+        "${SOURCE_ARCHIVE_IGNORE_FILES}")
+    FOREACH(_file ${_ls})
+	SET(_matched 0)
+	FOREACH(filePattern ${_ignore_files})
+	    M_MSG(${M_INFO3} "_file=${_file} filePattern=${filePattern}")
+
+	    IF(_file MATCHES "${filePattern}")
+		SET(_matched 1)
+		BREAK()
+	    ENDIF(_file MATCHES "${filePattern}")
+	ENDFOREACH(filePattern ${_ignore_files})
+	IF(NOT _matched)
+	    SOURCE_ARCHIVE_CONTENTS_ADD_NO_CHECK("${_file}")
+	ENDIF(NOT _matched)
+    ENDFOREACH(_file ${_ls})
+    SET(SOURCE_ARCHIVE_CONTENTS "${SOURCE_ARCHIVE_CONTENTS}"
+	CACHE INTERNAL "Source archive file list"
+	)
+    M_MSG(${M_INFO2} "SOURCE_ARCHIVE_CONTENTS=${SOURCE_ARCHIVE_CONTENTS}")
+ENDFUNCTION(SOURCE_ARCHIVE_GET_CONTENTS)
+
+MACRO(CMAKE_REGEX_TO_REGEX var cmrgx)
+    STRING(REPLACE "\\\\" "\\" ${var} "${cmrgx}")
+ENDMACRO(CMAKE_REGEX_TO_REGEX var cmrgx)
+
+MACRO(SOURCE_ARCHIVE_GET_IGNORE_LIST _ignoreListVar _includeListVar)
+    IF(${_ignoreListVar})
+	FILE(STRINGS "${${_ignoreListVar}}" _content REGEX "^[^#]")
+	FOREACH(_s ${_content})
+	    STRING(STRIP "${_s}" _s)
+	    STRING(LENGTH "${_s}" _l)
+	    IF(_l GREATER 0)
+		## Covert the string from glob to cmake regex
+		GIT_GLOB_TO_CMAKE_REGEX(_cmrgx ${_s})
+		LIST(APPEND SOURCE_ARCHIVE_IGNORE_FILES "${_cmrgx}")
+	    ENDIF(_l GREATER 0)
+	ENDFOREACH(_s ${_content})
+    ENDIF(${_ignoreListVar})
+
+    ## regex match one of include files
+    ## then remove that line
+    FOREACH(_ignore_pattern ${SOURCE_ARCHIVE_IGNORE_FILES})
+	CMAKE_REGEX_TO_REGEX(_ip "${_ignore_pattern}")
+	FOREACH(_i ${${_includeListVar}})
+	    STRING(REGEX MATCH "${_ip}" _ret "${_i}")
+	    IF(_ret)
+		LIST(REMOVE_ITEM SOURCE_ARCHIVE_IGNORE_FILES "${_ignore_pattern}")
+	    ENDIF(_ret)
+	ENDFOREACH(_i ${${_includeListVar}})
+    ENDFOREACH(_ignore_pattern ${SOURCE_ARCHIVE_IGNORE_FILES})
+ENDMACRO(SOURCE_ARCHIVE_GET_IGNORE_LIST _ignoreListVar _includeListVar)
+
+MACRO(PACK_SOURCE_CPACK var)
+    SET(_valid_options "GENERATOR" "INCLUDE" "GITIGNORE")
+    VARIABLE_PARSE_ARGN(_opt _valid_options ${ARGN})
+    IF(NOT _opt_GENERATOR)
+	SET(_opt_GENERATOR "TGZ")
+    ENDIF(NOT _opt_GENERATOR)
+    SET(CPACK_GENERATOR "${_opt_GENERATOR}")
+    SET(CPACK_SOURCE_GENERATOR ${CPACK_GENERATOR})
+    IF(${CPACK_GENERATOR} STREQUAL "TGZ")
+	SET(SOURCE_ARCHIVE_FILE_EXTENSION "tar.gz")
+    ELSEIF(${CPACK_GENERATOR} STREQUAL "TBZ2")
+	SET(SOURCE_ARCHIVE_FILE_EXTENSION "tar.bz2")
+    ELSEIF(${CPACK_GENERATOR} STREQUAL "ZIP")
+	SET(SOURCE_ARCHIVE_FILE_EXTENSION "zip")
+    ENDIF(${CPACK_GENERATOR} STREQUAL "TGZ")
+    SET(CPACK_PACKAGE_VERSION ${PRJ_VER})
+    IF(PRJ_SUMMARY)
+	SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PRJ_SUMMARY}")
+    ENDIF(PRJ_SUMMARY)
+    IF(EXISTS ${CMAKE_SOURCE_DIR}/COPYING)
+	SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING)
+    ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/COPYING)
+
+    IF(EXISTS ${CMAKE_SOURCE_DIR}/README)
+	SET(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_SOURCE_DIR}/README)
+    ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/README)
+    SET(CPACK_PACKAGE_VENDOR "${VENDOR}")
+
+    SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PRJ_VER}-Source")
+    LIST(APPEND SOURCE_ARCHIVE_IGNORE_FILES "${PROJECT_NAME}-[^/]*-Source")
+    SET(SOURCE_ARCHIVE_NAME
+	"${CPACK_SOURCE_PACKAGE_FILE_NAME}.${SOURCE_ARCHIVE_FILE_EXTENSION}"
+	CACHE STRING "Source archive name" FORCE)
+    SET(${var} "${SOURCE_ARCHIVE_NAME}")
+
+    SOURCE_ARCHIVE_GET_IGNORE_LIST(_opt_GITIGNORE _opt_INCLUDE)
+    LIST(APPEND CPACK_SOURCE_IGNORE_FILES ${SOURCE_ARCHIVE_IGNORE_FILES})
+    SOURCE_ARCHIVE_GET_CONTENTS()
+    SET(SOURCE_ARCHIVE_CONTENTS_ABSOLUTE "")
+    FOREACH(_file ${SOURCE_ARCHIVE_CONTENTS})
+	LIST(APPEND SOURCE_ARCHIVE_CONTENTS_ABSOLUTE
+	   "${CMAKE_HOME_DIRECTORY}/${_file}")
+    ENDFOREACH(_file ${SOURCE_ARCHIVE_CONTENTS})
+
+    INCLUDE(CPack)
+ENDMACRO(PACK_SOURCE_CPACK var)
+
+MACRO(PACK_SOURCE_ARCHIVE)
+    SET(_valid_options "OUTPUT_FILE" "GENERATOR" "INCLUDE" "GITIGNORE")
+    VARIABLE_PARSE_ARGN(_opt _valid_options ${ARGN})
+    IF(PRJ_VER STREQUAL "")
+	M_MSG(${M_FATAL} "PRJ_VER not defined")
+    ENDIF(PRJ_VER STREQUAL "")
+
+    ## PACK_SOURCE_CPACK to pack with default output file
+    VARIABLE_TO_ARGN(_cpack_source_pack_opts _opt _valid_options)
+    PACK_SOURCE_CPACK(_source_archive_file
+	${_cpack_source_pack_opts})
+
+    ## Does user want his own output file or directory
+    SET(_own 0)
+    SET(_own_dir 0)
+    SET(_own_file 0)
+    IF(_opt)
+	SET(_outputDir "${_opt}")
+    ENDIF(_opt)
+    IF(_opt_OUTPUT_FILE)
+	GET_FILENAME_COMPONENT(_outputDir ${_opt_OUTPUT_FILE} PATH)
+	GET_FILENAME_COMPONENT(_outputFile ${_opt_OUTPUT_FILE} NAME)
+    ENDIF(_opt_OUTPUT_FILE)
+
+    GET_FILENAME_COMPONENT(_currentDir_real "." REALPATH)
+    IF(_outputDir)
+	GET_FILENAME_COMPONENT(_outputDir_real ${_outputDir} REALPATH)
+    ELSE(_outputDir)
+	SET(_outputDir_real ${_currentDir_real})
+    ENDIF(_outputDir)
+
+    IF(NOT _outputFile)
+	SET(_outputFile "${_source_archive_file}")
+    ENDIF(NOT _outputFile)
+
+    IF(NOT _outputDir_real STREQUAL "${_currentDir_real}")
+	SET(_own_dir 1)
+	SET(_own 1)
+    ENDIF(NOT _outputDir_real STREQUAL "${_currentDir_real}")
+    IF(NOT _outputFile STREQUAL "${_source_archive_file}")
+	SET(_own_file 1)
+	SET(_own 1)
+    ENDIF(NOT _outputFile STREQUAL "${_source_archive_file}")
+    GET_FILENAME_COMPONENT(SOURCE_ARCHIVE_FILE
+	"${_outputDir_real}/${_outputFile}" ABSOLUTE)
+    SET(SOURCE_ARCHIVE_FILE ${SOURCE_ARCHIVE_FILE}
+	CACHE FILEPATH "Source archive file" FORCE)
+    SET(SOURCE_ARCHIVE_NAME "${_outputFile}"
+	CACHE FILEPATH "Source archive name" FORCE)
+
+    SET(_dep_list ${SOURCE_ARCHIVE_CONTENTS_ABSOLUTE})
+    ## If own directory,
+    IF(_own_dir)
+	### Need to create it
+	ADD_CUSTOM_COMMAND(OUTPUT ${_outputDir_real}
+	    COMMAND ${CMAKE_COMMAND} -E make_directory ${_outputDir_real}
+	    COMMENT "Create dir for source archive output."
 	    )
-	M_MSG(${M_INFO2} "SOURCE_ARCHIVE_CONTENTS=${SOURCE_ARCHIVE_CONTENTS}")
-    ENDFUNCTION(SOURCE_ARCHIVE_GET_CONTENTS)
-
-    MACRO(CMAKE_REGEX_TO_REGEX var cmrgx)
-	STRING(REPLACE "\\\\" "\\" ${var} "${cmrgx}")
-    ENDMACRO(CMAKE_REGEX_TO_REGEX var cmrgx)
-
-    MACRO(SOURCE_ARCHIVE_GET_IGNORE_LIST _ignoreListVar _includeListVar)
-	IF(${_ignoreListVar})
-	    FILE(STRINGS "${${_ignoreListVar}}" _content REGEX "^[^#]")
-	    FOREACH(_s ${_content})
-		STRING(STRIP "${_s}" _s)
-		STRING(LENGTH "${_s}" _l)
-		IF(_l GREATER 0)
-		    ## Covert the string from glob to cmake regex
-		    GIT_GLOB_TO_CMAKE_REGEX(_cmrgx ${_s})
-		    LIST(APPEND SOURCE_ARCHIVE_IGNORE_FILES "${_cmrgx}")
-		ENDIF(_l GREATER 0)
-	    ENDFOREACH(_s ${_content})
-	ENDIF(${_ignoreListVar})
-
-	## regex match one of include files
-	## then remove that line
-	FOREACH(_ignore_pattern ${SOURCE_ARCHIVE_IGNORE_FILES})
-	    CMAKE_REGEX_TO_REGEX(_ip "${_ignore_pattern}")
-	    FOREACH(_i ${${_includeListVar}})
-		STRING(REGEX MATCH "${_ip}" _ret "${_i}")
-		IF(_ret)
-		    LIST(REMOVE_ITEM SOURCE_ARCHIVE_IGNORE_FILES "${_ignore_pattern}")
-		ENDIF(_ret)
-	    ENDFOREACH(_i ${${_includeListVar}})
-	ENDFOREACH(_ignore_pattern ${SOURCE_ARCHIVE_IGNORE_FILES})
-    ENDMACRO(SOURCE_ARCHIVE_GET_IGNORE_LIST _ignoreListVar _includeListVar)
-
-    MACRO(PACK_SOURCE_CPACK var)
-	SET(_valid_options "GENERATOR" "INCLUDE" "GITIGNORE")
-	VARIABLE_PARSE_ARGN(_opt _valid_options ${ARGN})
-	IF(NOT _opt_GENERATOR)
-	    SET(_opt_GENERATOR "TGZ")
-	ENDIF(NOT _opt_GENERATOR)
-	SET(CPACK_GENERATOR "${_opt_GENERATOR}")
-	SET(CPACK_SOURCE_GENERATOR ${CPACK_GENERATOR})
-	IF(${CPACK_GENERATOR} STREQUAL "TGZ")
-	    SET(SOURCE_ARCHIVE_FILE_EXTENSION "tar.gz")
-	ELSEIF(${CPACK_GENERATOR} STREQUAL "TBZ2")
-	    SET(SOURCE_ARCHIVE_FILE_EXTENSION "tar.bz2")
-	ELSEIF(${CPACK_GENERATOR} STREQUAL "ZIP")
-	    SET(SOURCE_ARCHIVE_FILE_EXTENSION "zip")
-	ENDIF(${CPACK_GENERATOR} STREQUAL "TGZ")
-	SET(CPACK_PACKAGE_VERSION ${PRJ_VER})
-	IF(PRJ_SUMMARY)
-	    SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PRJ_SUMMARY}")
-	ENDIF(PRJ_SUMMARY)
-	IF(EXISTS ${CMAKE_SOURCE_DIR}/COPYING)
-	    SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING)
-	ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/COPYING)
-
-	IF(EXISTS ${CMAKE_SOURCE_DIR}/README)
-	    SET(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_SOURCE_DIR}/README)
-	ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/README)
-	SET(CPACK_PACKAGE_VENDOR "${VENDOR}")
-
-	SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PRJ_VER}-Source")
-	LIST(APPEND SOURCE_ARCHIVE_IGNORE_FILES "${PROJECT_NAME}-[^/]*-Source")
-	SET(SOURCE_ARCHIVE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}.${SOURCE_ARCHIVE_FILE_EXTENSION}" CACHE STRING "Source archive name" FORCE)
-	SET(${var} "${SOURCE_ARCHIVE_NAME}")
-
-	SOURCE_ARCHIVE_GET_IGNORE_LIST(_opt_GITIGNORE _opt_INCLUDE)
-	LIST(APPEND CPACK_SOURCE_IGNORE_FILES ${SOURCE_ARCHIVE_IGNORE_FILES})
-	SOURCE_ARCHIVE_GET_CONTENTS()
-	SET(SOURCE_ARCHIVE_CONTENTS_ABSOLUTE "")
-	FOREACH(_file ${SOURCE_ARCHIVE_CONTENTS})
-	    LIST(APPEND SOURCE_ARCHIVE_CONTENTS_ABSOLUTE "${CMAKE_HOME_DIRECTORY}/${_file}")
-	ENDFOREACH(_file ${SOURCE_ARCHIVE_CONTENTS})
-
-	INCLUDE(CPack)
-    ENDMACRO(PACK_SOURCE_CPACK var)
-
-    MACRO(PACK_SOURCE_ARCHIVE)
-	SET(_valid_options "OUTPUT_FILE" "GENERATOR" "INCLUDE" "GITIGNORE")
-	VARIABLE_PARSE_ARGN(_opt _valid_options ${ARGN})
-	IF(PRJ_VER STREQUAL "")
-	    M_MSG(${M_FATAL} "PRJ_VER not defined")
-	ENDIF(PRJ_VER STREQUAL "")
-
-	## PACK_SOURCE_CPACK to pack with default output file
-	VARIABLE_TO_ARGN(_cpack_source_pack_opts _opt _valid_options)
-	PACK_SOURCE_CPACK(_source_archive_file
-	    ${_cpack_source_pack_opts})
-
-	## Does user want his own output file or directory
-	SET(_own 0)
-	SET(_own_dir 0)
-	SET(_own_file 0)
-	IF(_opt)
-	    SET(_outputDir "${_opt}")
-	ENDIF(_opt)
-	IF(_opt_OUTPUT_FILE)
-	    GET_FILENAME_COMPONENT(_outputDir ${_opt_OUTPUT_FILE} PATH)
-	    GET_FILENAME_COMPONENT(_outputFile ${_opt_OUTPUT_FILE} NAME)
-	ENDIF(_opt_OUTPUT_FILE)
-
-	GET_FILENAME_COMPONENT(_currentDir_real "." REALPATH)
-	IF(_outputDir)
-	    GET_FILENAME_COMPONENT(_outputDir_real ${_outputDir} REALPATH)
-	ELSE(_outputDir)
-	    SET(_outputDir_real ${_currentDir_real})
-	ENDIF(_outputDir)
-
-	IF(NOT _outputFile)
-	    SET(_outputFile "${_source_archive_file}")
-	ENDIF(NOT _outputFile)
-
-	IF(NOT _outputDir_real STREQUAL "${_currentDir_real}")
-	    SET(_own_dir 1)
-	    SET(_own 1)
-	ENDIF(NOT _outputDir_real STREQUAL "${_currentDir_real}")
-	IF(NOT _outputFile STREQUAL "${_source_archive_file}")
-	    SET(_own_file 1)
-	    SET(_own 1)
-	ENDIF(NOT _outputFile STREQUAL "${_source_archive_file}")
-	GET_FILENAME_COMPONENT(SOURCE_ARCHIVE_FILE
-	    "${_outputDir_real}/${_outputFile}" ABSOLUTE)
-	SET(SOURCE_ARCHIVE_FILE ${SOURCE_ARCHIVE_FILE}
-	    CACHE FILEPATH "Source archive file" FORCE)
-	SET(SOURCE_ARCHIVE_NAME "${_outputFile}"
-	    CACHE FILEPATH "Source archive name" FORCE)
-
-	SET(_dep_list ${SOURCE_ARCHIVE_CONTENTS_ABSOLUTE})
-	## If own directory,
-	IF(_own_dir)
-	    ### Need to create it
-	    ADD_CUSTOM_COMMAND(OUTPUT ${_outputDir_real}
-		COMMAND ${CMAKE_COMMAND} -E make_directory ${_outputDir_real}
-		COMMENT "Create dir for source archive output."
-		)
-	    LIST(APPEND _dep_list ${_outputDir_real})
-	ENDIF(_own_dir)
-	SET(_make_targets COMMAND make package_source)
-	IF(TARGET test)
-	    LIST(INSERT _make_targets 0 COMMAND make test)
-	ENDIF(TARGET test)
-
-	## If own, need to move to it.
-	IF(_own)
-	    ADD_CUSTOM_TARGET_COMMAND(pack_src
-		NO_FORCE
-	    	OUTPUT ${SOURCE_ARCHIVE_FILE}
-		COMMAND make changelog
-	    	COMMAND make package_source
-	    	COMMAND ${CMAKE_COMMAND} -E copy "${_source_archive_file}" "${SOURCE_ARCHIVE_FILE}"
-	    	COMMAND ${CMAKE_COMMAND} -E remove "${_source_archive_file}"
-	    	DEPENDS  ${_dep_list}
-	    	COMMENT "Packing the source as: ${SOURCE_ARCHIVE_FILE}"
-		VERBATIM
-		)
-	ELSE(_own)
-	    ADD_CUSTOM_TARGET_COMMAND(pack_src
-		NO_FORCE
-		OUTPUT ${SOURCE_ARCHIVE_FILE}
-		COMMAND make package_source
-		DEPENDS  ${_dep_list}
-		COMMENT "Packing the source as: ${SOURCE_ARCHIVE_FILE}"
-		VERBATIM
-		)
-	ENDIF(_own)
-
-	ADD_CUSTOM_TARGET(clean_old_pack_src
-	    COMMAND find .
-	    -name '${PROJECT_NAME}*.${SOURCE_ARCHIVE_FILE_EXTENSION}' ! -name '${PROJECT_NAME}-${PRJ_VER}-*.${SOURCE_ARCHIVE_FILE_EXTENSION}'
-	    -print -delete
-	    COMMENT "Cleaning old source archives"
+	LIST(APPEND _dep_list ${_outputDir_real})
+    ENDIF(_own_dir)
+    SET(_make_targets COMMAND make package_source)
+    IF(TARGET test)
+	LIST(INSERT _make_targets 0 COMMAND make test)
+    ENDIF(TARGET test)
+
+    ## If own, need to move to it.
+    IF(_own)
+	ADD_CUSTOM_TARGET_COMMAND(pack_src
+	    NO_FORCE
+	    OUTPUT ${SOURCE_ARCHIVE_FILE}
+	    COMMAND make changelog
+	    COMMAND make package_source
+	    COMMAND ${CMAKE_COMMAND} -E copy "${_source_archive_file}" "${SOURCE_ARCHIVE_FILE}"
+	    COMMAND ${CMAKE_COMMAND} -E remove "${_source_archive_file}"
+	    DEPENDS  ${_dep_list}
+	    COMMENT "Packing the source as: ${SOURCE_ARCHIVE_FILE}"
+	    VERBATIM
 	    )
-
-	ADD_DEPENDENCIES(clean_old_pack_src changelog )
-
-	ADD_CUSTOM_TARGET(clean_pack_src
-	    COMMAND find .
-	    -name '${PROJECT_NAME}*.${SOURCE_ARCHIVE_FILE_EXTENSION}'
-	    -print -delete
-	    COMMENT "Cleaning all source archives"
+    ELSE(_own)
+	ADD_CUSTOM_TARGET_COMMAND(pack_src
+	    NO_FORCE
+	    OUTPUT ${SOURCE_ARCHIVE_FILE}
+	    COMMAND make package_source
+	    DEPENDS  ${_dep_list}
+	    COMMENT "Packing the source as: ${SOURCE_ARCHIVE_FILE}"
+	    VERBATIM
 	    )
-    ENDMACRO(PACK_SOURCE_ARCHIVE)
-
-ENDIF(NOT DEFINED _MANAGE_ARCHIVE_CMAKE_)
-
+    ENDIF(_own)
+
+    ADD_CUSTOM_TARGET(clean_old_pack_src
+	COMMAND find .
+	-name '${PROJECT_NAME}*.${SOURCE_ARCHIVE_FILE_EXTENSION}' ! -name '${PROJECT_NAME}-${PRJ_VER}-*.${SOURCE_ARCHIVE_FILE_EXTENSION}'
+	-print -delete
+	COMMENT "Cleaning old source archives"
+	)
+
+    ADD_DEPENDENCIES(clean_old_pack_src changelog )
+
+    ADD_CUSTOM_TARGET(clean_pack_src
+	COMMAND find .
+	-name '${PROJECT_NAME}*.${SOURCE_ARCHIVE_FILE_EXTENSION}'
+	-print -delete
+	COMMENT "Cleaning all source archives"
+	)
+ENDMACRO(PACK_SOURCE_ARCHIVE)
+


disable sanitizers on AppleClang becuase runtime libraries are missing (both iOS and macOS)

--- toolchains/clang.cmake
+++ toolchains/clang.cmake
@@ -14,15 +14,13 @@
 list( APPEND TNUN_compiler_report_optimization -Rpass=loop-.* )
 if( NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" ) # Tested with XCode 8
     list( APPEND TNUN_compiler_LTO -fwhole-program-vtables )
-endif()

 # http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
 # http://clang.llvm.org/docs/AddressSanitizer.html
 # http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
-if ( NOT iOS )
-  set( TNUN_linker_runtime_sanity_checks -fsanitize=undefined -fsanitize=address ) # AppleClang lag:  -fsanitize=safe-stack -fsanitize=thread -fsanitize=memory -fsanitize=dataflow -fsanitize=cfi
+    set( TNUN_linker_runtime_sanity_checks -fsanitize=undefined -fsanitize=address -fsanitize=safe-stack -fsanitize=thread -fsanitize=memory -fsanitize=dataflow -fsanitize=cfi )
+    set( TNUN_compiler_runtime_sanity_checks ${TNUN_linker_runtime_sanity_checks} -fno-omit-frame-pointer )
 endif()
-set( TNUN_compiler_runtime_sanity_checks ${TNUN_linker_runtime_sanity_checks} -fno-omit-frame-pointer )
 set( TNUN_linker_runtime_integer_checks -fsanitize=integer )
 set( TNUN_compiler_runtime_integer_checks ${TNUN_compiler_runtime_integer_checks} )


Update Windows to gcc 4.9.3, allow LTO

Update Windows to gcc 4.9.3, allow LTO

--- toolchains/win32.cmake
+++ toolchains/win32.cmake
@@ -7,11 +7,12 @@
 set(ENV{PKG_CONFIG_PATH} ${toolchain_lib_dir}/pkgconfig:${toolchain_dir}/share/pkgconfig)
 set(CMAKE_PREFIX_PATH ${toolchain_dir})

-set(inc_flags "-I/usr/local/i686-w64-mingw32/include -B/usr/local/lib/gcc/i686-w64-mingw32/4.9.1 -I${toolchain_dir}/usr/include")
+set(inc_flags "-I/usr/local/i686-w64-mingw32/include -B/usr/local/lib/gcc/i686-w64-mingw32/4.9.3 -I${toolchain_dir}/usr/include")
 set(link_flags "-static-libgcc -static-libstdc++ -Bstatic -L${toolchain_dir}/plugins/platforms -L${toolchain_dir}/plugins/audio")

 set(CMAKE_SYSTEM_NAME Windows CACHE INTERNAL "system name")
-set(CMAKE_AR ${cross_prefix}ar CACHE FILEPATH "archiver")
+set(CMAKE_AR ${cross_prefix}gcc-ar CACHE FILEPATH "archiver")
+set(CMAKE_RANLIB ${cross_prefix}gcc-ranlib CACHE FILEPATH "ranlib")
 set(CMAKE_C_COMPILER ${cross_prefix}gcc)
 set(CMAKE_CXX_COMPILER ${cross_prefix}g++)
 set(CMAKE_ASM_COMPILER ${cross_prefix}gcc)


Split off 8.4.60

Split off 8.4.60

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 4 )
-set ( HPCC_POINT 59 )
+set ( HPCC_POINT 61 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 7.12.82

Split off 7.12.82

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 12 )
-set ( HPCC_POINT 81 )
+set ( HPCC_POINT 83 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 8.2.2

Split off 8.2.2

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 2 )
-set ( HPCC_POINT 1 )
+set ( HPCC_POINT 3 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 8.0.82

Split off 8.0.82

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 0 )
-set ( HPCC_POINT 81 )
+set ( HPCC_POINT 83 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Revert "[INTERNAL] scan for dependencies only once iff DEVELOP"

This reverts commit 4b7f0a4faba26671ec918758594ff3087fd54e39.

Conflicts:
	util/cmake/SeqAnBuildSystem.cmake

--- util/cmake/SeqAnBuildSystem.cmake
+++ util/cmake/SeqAnBuildSystem.cmake
@@ -275,15 +275,6 @@
     elseif (CXX11_FOUND)
         set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
     endif ()
-
-    # search dependencies once, globally, if in DEVELOP
-    if (SEQAN_BUILD_SYSTEM STREQUAL "DEVELOP")
-        message (STATUS "Scanning dependencies once in DEVELOP mode...")
-        find_package(OpenMP)
-        find_package(ZLIB)
-        find_package(BZip2)
-        find_package(SeqAn REQUIRED)
-    endif ()
 endmacro (seqan_build_system_init)

 # ---------------------------------------------------------------------------
@@ -670,8 +661,11 @@
           ${CMAKE_CURRENT_SOURCE_DIR}/[!.]*.cpp
           ${CMAKE_CURRENT_SOURCE_DIR}/[!.]*.cu)

-    # NOTE(h-2): we do not need to search for dependencies, because this is
-    # done globally for DEVELOP (and demos are only built with DEVELOP)
+    # Find SeqAn with all dependencies.
+    find_package (OpenMP)
+    find_package (ZLIB)
+    find_package (BZip2)
+    find_package (SeqAn REQUIRED)

     # Supress unused parameter warnings for demos.
     if (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG)


- Fix another indent

- Fix another indent

--- Build.cmake
+++ Build.cmake
@@ -80,7 +80,7 @@
          list(REMOVE_ITEM SRC_FILES  ${LOG_SRC}/crashhandler_unix.cpp)
          list(REMOVE_ITEM SRC_FILES  ${LOG_SRC}/crashhandler_windows.cpp ${LOG_SRC}/g3log/stacktrace_windows.hpp ${LOG_SRC}/stacktrace_windows.cpp)
    ELSE()
- 	 list(REMOVE_ITEM SRC_FILES  ${LOG_SRC}/crashhandler_android.cpp)
+         list(REMOVE_ITEM SRC_FILES  ${LOG_SRC}/crashhandler_android.cpp)
          list(REMOVE_ITEM SRC_FILES  ${LOG_SRC}/crashhandler_windows.cpp ${LOG_SRC}/g3log/stacktrace_windows.hpp ${LOG_SRC}/stacktrace_windows.cpp)
    ENDIF (MSVC OR MINGW)


fix typo

fix typo

--- linux/aarch64/Toolchain.cmake
+++ linux/aarch64/Toolchain.cmake
@@ -11,4 +11,4 @@
 set(CMAKE_FIND_ROOT_PATH ${cross_root}/${cross_triple})
 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY))
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)


Graph Control 5.2.0-1 Gold

Graph Control 5.2.0-1 Gold

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,8 +5,8 @@
 set ( HPCC_MAJOR 5 )
 set ( HPCC_MINOR 2 )
 set ( HPCC_POINT 0 )
-set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 5 )
+set ( HPCC_MATURITY "release" )
+set ( HPCC_SEQUENCE 1 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )
   error ( "HPCC_POINT must be less than 66." )


Split off 8.2.38

Split off 8.2.38

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 2 )
-set ( HPCC_POINT 37 )
+set ( HPCC_POINT 39 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 8.0.80

Split off 8.0.80

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 0 )
-set ( HPCC_POINT 79 )
+set ( HPCC_POINT 81 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Bump GAPID version to v0.9.2

Bump GAPID version to v0.9.2

--- version.cmake
+++ version.cmake
@@ -16,7 +16,7 @@
 # Increment these numbers immediately after releasing a new version.
 set(GAPID_VERSION_MAJOR 0)
 set(GAPID_VERSION_MINOR 9)
-set(GAPID_VERSION_POINT 1)
+set(GAPID_VERSION_POINT 2)

 if (NOT DEFINED GAPID_BUILD_NUMBER)
     set(GAPID_BUILD_NUMBER 0)


COMP: Improve template formatting.

COMP: Improve template formatting.

--- itk-module.cmake
+++ itk-module.cmake
@@ -16,8 +16,8 @@
   TEST_DEPENDS
     ITKTestKernel
     ITKIOMesh
-  EXCLUDE_FROM_DEFAULT
   DESCRIPTION
     "${DOCUMENTATION}"
+  EXCLUDE_FROM_DEFAULT
+  # Not used for header only libraries ENABLE_SHARED
 )
-


cmake config fixes

cmake config fixes

--- libunistd-config.cmake
+++ libunistd-config.cmake
@@ -13,7 +13,7 @@

 #if (NOT DEFINED CMAKE_STATIC_LIBRARY_SUFFIX)
     if (WIN32)
-        set(CMAKE_STATIC_LIBRARY_PREFIX "")
+        set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
         set(CMAKE_STATIC_LIBRARY_SUFFIX ".lib")
     else()
         set(CMAKE_STATIC_LIBRARY_PREFIX "lib")


BulletCollisionDetection: use env. variable BULLET_ROOT to find Bullet

Former-commit-id: f64dddd7ca45e1017bf3884865c27720f498c91c

--- applications/plugins/BulletCollisionDetection/FindBullet.cmake
+++ applications/plugins/BulletCollisionDetection/FindBullet.cmake
@@ -7,11 +7,15 @@
 # BULLET_*_LIBRARY, one for each library (for example, "BULLET_BulletCollision_LIBRARY").
 # BULLET_*_LIBRARY_debug, one for each library.
 #
-# This script will look in standard locations for installed Bullet. However, if you
-# install Bullet into a non-standard location, you can use the BULLET_ROOT
+# This script will look in standard locations for installed Bullet. However, if
+# you install Bullet into a non-standard location, you can use the BULLET_ROOT
 # variable (in environment or CMake) to specify the location.

-set(BULLET_ROOT "" CACHE PATH "Bullet install dir, parent of both header files and binaries.")
+if(NOT BULLET_ROOT)
+    if(NOT "$ENV{BULLET_ROOT}" STREQUAL "")
+        set(BULLET_ROOT "$ENV{BULLET_ROOT}" CACHE PATH "Bullet install prefix")
+    endif()
+endif()

 unset(BULLET_INCLUDE_DIR CACHE)
 mark_as_advanced(BULLET_INCLUDE_DIR)


Update Windows Graphviz search PATH to the latest version

--- make/FindDoxygen.cmake
+++ make/FindDoxygen.cmake
@@ -45,6 +45,7 @@
   NAMES dot
   PATHS "$ENV{ProgramFiles}/ATT/Graphviz/bin"
   "C:/Program Files/ATT/Graphviz/bin"
+  "C:/Program Files/Graphviz 2.21/bin"
   [HKEY_LOCAL_MACHINE\\SOFTWARE\\ATT\\Graphviz;InstallPath]/bin
   /Applications/Graphviz.app/Contents/MacOS
   /Applications/Doxygen.app/Contents/Resources


update

update

--- cmake/DCS08961_SetupVariables.cmake
+++ cmake/DCS08961_SetupVariables.cmake
@@ -45,7 +45,9 @@
   set(OGLplus_ROOT_DIR "C:/Tools/oglplus/oglplus-develop-git/_install")
 else()
   if(UNIX)
-    set(OGLplus_ROOT_DIR "~/Projects/others/oglplus-master-git/_install")
+    # set(OGLplus_ROOT_DIR "~/Projects/others/oglplus-master-git/_install")
+    set(OGLplus_ROOT_DIR "~/Projects/others/oglplus-develop-git/_install")
+    # set(OGLplus_ROOT_DIR "~/Projects/others/oglplus-regnirpsj-git/_install")
   endif()
 endif()


remove potentially invalid line

remove potentially invalid line

--- cmake/InstallArangoDBJSClient.cmake
+++ cmake/InstallArangoDBJSClient.cmake
@@ -38,7 +38,6 @@
   REGEX "^.*/eslint"                                       EXCLUDE
   REGEX "^.*/.npmignore"                                   EXCLUDE
   REGEX "^.*/.bin"                                         EXCLUDE
-  REGEX "^.*/package.*json"                                EXCLUDE
 )

 install(


build: always populate partial version variables

When FALCO_VERSION was provided via a CMake variable, the build would
eventually fail because the partial version variables hadn't been
populated. Move the creation of those outside the check of FALCO_VERSION
being set so they also happen when that is provided too.

Contributes-to: #1654

Signed-off-by: Dominic Evans <004bc7ccafd0fb0861c74289c233215b71eabd38@uk.ibm.com>

--- cmake/modules/GetFalcoVersion.cmake
+++ cmake/modules/GetFalcoVersion.cmake
@@ -31,29 +31,33 @@
   else()
     # A tag has been found: use it as the Falco version
     set(FALCO_VERSION "${FALCO_TAG}")
-    # Remove the starting "v" in case there is one
-    string(REGEX REPLACE "^v(.*)" "\\1" FALCO_VERSION "${FALCO_TAG}")
-  endif()
-  # TODO(leodido) > ensure Falco version is semver before extracting parts Populate partial version variables
-  string(REGEX MATCH "^(0|[1-9][0-9]*)" FALCO_VERSION_MAJOR "${FALCO_VERSION}")
-  string(REGEX REPLACE "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\..*" "\\2" FALCO_VERSION_MINOR "${FALCO_VERSION}")
-  string(REGEX REPLACE "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*).*" "\\3" FALCO_VERSION_PATCH
-                       "${FALCO_VERSION}")
-  string(
-    REGEX
-    REPLACE
-      "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)-((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*).*"
-      "\\5"
-      FALCO_VERSION_PRERELEASE
-      "${FALCO_VERSION}")
-  if(FALCO_VERSION_PRERELEASE STREQUAL "${FALCO_VERSION}")
-    set(FALCO_VERSION_PRERELEASE "")
-  endif()
-  if(NOT FALCO_VERSION_BUILD)
-    string(REGEX REPLACE ".*\\+([0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)" "\\1" FALCO_VERSION_BUILD "${FALCO_VERSION}")
-  endif()
-  if(FALCO_VERSION_BUILD STREQUAL "${FALCO_VERSION}")
-    set(FALCO_VERSION_BUILD "")
   endif()
 endif()
+
+# Remove the starting "v" in case there is one
+string(REGEX REPLACE "^v(.*)" "\\1" FALCO_VERSION "${FALCO_VERSION}")
+
+# TODO(leodido) > ensure Falco version is semver before extracting parts Populate partial version variables
+string(REGEX MATCH "^(0|[1-9][0-9]*)" FALCO_VERSION_MAJOR "${FALCO_VERSION}")
+string(REGEX REPLACE "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\..*" "\\2" FALCO_VERSION_MINOR "${FALCO_VERSION}")
+string(REGEX REPLACE "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*).*" "\\3" FALCO_VERSION_PATCH
+                     "${FALCO_VERSION}")
+string(
+  REGEX
+  REPLACE
+    "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)-((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*).*"
+    "\\5"
+    FALCO_VERSION_PRERELEASE
+    "${FALCO_VERSION}")
+
+if(FALCO_VERSION_PRERELEASE STREQUAL "${FALCO_VERSION}")
+  set(FALCO_VERSION_PRERELEASE "")
+endif()
+if(NOT FALCO_VERSION_BUILD)
+  string(REGEX REPLACE ".*\\+([0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)" "\\1" FALCO_VERSION_BUILD "${FALCO_VERSION}")
+endif()
+if(FALCO_VERSION_BUILD STREQUAL "${FALCO_VERSION}")
+  set(FALCO_VERSION_BUILD "")
+endif()
+
 message(STATUS "Falco version: ${FALCO_VERSION}")


[cmake] ask for boost >= 1.47 in all cases

--- cmake/siconos_find_common_dep.cmake
+++ cmake/siconos_find_common_dep.cmake
@@ -60,7 +60,7 @@
 ENDIF()

 # --- Boost ---
-compile_with(Boost REQUIRED)
+compile_with(Boost 1.47 REQUIRED)

 # --- Bullet ---
 IF(WITH_BULLET)


Runtime generation: applied Chris's fix for creating output directory.

--- cmake_modules/GenZorbaRuntime.cmake
+++ cmake_modules/GenZorbaRuntime.cmake
@@ -83,6 +83,8 @@
     string(REPLACE ";" "," files "${files}")
     list(APPEND extvarargs "-e" "files:=${files}")
   endif(files)
+  get_filename_component(gen_file_dir "${gen_file}" PATH)
+  file(MAKE_DIRECTORY "${gen_file_dir}")
   execute_process(COMMAND "${zorba_exe}"
     "-q" "${query}" "-f"
     "-o" "${gen_file}"


COMP: Fixed SOFA binary directory for CDash.

--- CMake/MITKDashboardSetup.cmake
+++ CMake/MITKDashboardSetup.cmake
@@ -74,7 +74,7 @@
   )
   message("OpenCV runtime path: ${OPENCV_BIN_DIR}")

-  set(SOFA_BINARY_DIR "${CTEST_BINARY_DIRECTORY}/SOFA-build/bin/${CTEST_BUILD_CONFIGURATION}")
+  set(SOFA_BINARY_DIR "${CTEST_BINARY_DIRECTORY}/ep/src/SOFA-build/bin/${CTEST_BUILD_CONFIGURATION}")
   set(BLUEBERRY_OSGI_DIR "${CTEST_BINARY_DIRECTORY}/MITK-build/bin/BlueBerry/org.blueberry.osgi/bin/${CTEST_BUILD_CONFIGURATION}")

   set(CTEST_PATH "${CTEST_PATH};${CTEST_BINARY_DIRECTORY}/ep/bin;${QT_BINARY_DIR};${SOFA_BINARY_DIR};${BLUEBERRY_OSGI_DIR};${OPENCV_BIN_DIR}")


[CMAKE] Improve link flag compiler support detection

Summary:
The `add_linker_flag` method is able to prevent from introducing link
time errors, but not warnings. This may cause some noise with clang,
which will issue a `-Wunused-command-line-argument` warning when an
unknown linker flag is set (then ignore it).

This diff promotes the warning to error so the unused link flag will not
be set.

Test Plan:
  mkdir buildcmake_osx && cd buildcmake_osx
  cmake -GNinja .. -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/OSX.cmake
  ninja
Check the following warning disappeared with this patch:
```
clang: warning: argument unused during compilation: '-pie'
[-Wunused-command-line-argument]
```

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

--- cmake/modules/AddCompilerFlags.cmake
+++ cmake/modules/AddCompilerFlags.cmake
@@ -100,14 +100,39 @@
 function(add_linker_flag)
 	foreach(f ${ARGN})
 		sanitize_variable("have_linker_" ${f} FLAG_IS_SUPPORTED)
-
+
+		# Some linkers (e.g.: Clang) will issue a -Wunused-command-line-argument
+		# warning when an unknown linker flag is set.
+		# Using -Werror will promote these warnings to errors so
+		# CHECK_CXX_COMPILER_FLAG() will return false, preventing the flag from
+		# being set.
+		check_compiler_flag(WUNUSED_CLI_ARGUMENT_IS_SUPPORTED
+			CXX
+			"-Wunused-command-line-argument"
+		)
+		if(${WUNUSED_CLI_ARGUMENT_IS_SUPPORTED})
+			string(APPEND
+				CMAKE_REQUIRED_FLAGS
+				" -Werror=unused-command-line-argument"
+			)
+		endif()
+
 		# Save the current linker flags
 		set(SAVE_CMAKE_EXE_LINKERFLAGS ${CMAKE_EXE_LINKER_FLAGS})
 		string(APPEND CMAKE_EXE_LINKER_FLAGS " ${f}")
+
 		# CHECK_CXX_COMPILER_FLAG calls CHECK_CXX_SOURCE_COMPILES which in turn
 		# calls try_compile, so it will check our flag
 		CHECK_CXX_COMPILER_FLAG("" ${FLAG_IS_SUPPORTED})
-
+
+		# Unset the -Werror=unused-command-line-argument flag if it is set.
+		string(REGEX REPLACE
+			" -Werror=unused-command-line-argument"
+			""
+			CMAKE_REQUIRED_FLAGS
+			"${CMAKE_REQUIRED_FLAGS}"
+		)
+
 		# If the flag is not supported restore CMAKE_EXE_LINKER_FLAGS
 		if(NOT ${FLAG_IS_SUPPORTED})
 			set(CMAKE_EXE_LINKER_FLAGS ${SAVE_CMAKE_EXE_LINKERFLAGS})


[cmake] Do not assume ninja

[cmake] Do not assume ninja

Summary: Currently, cmake always use ninja to build native executable. This patch changes this to use the same generator as the one provided by the user.

Test Plan:
  cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Win32.cmake
  make
  cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/OSX.cmake
  make

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: jasonbcox, teamcity

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

--- cmake/modules/NativeExecutable.cmake
+++ cmake/modules/NativeExecutable.cmake
@@ -7,15 +7,14 @@
 set(NATIVE_BUILD_TARGET "${NATIVE_BUILD_DIR}/CMakeCache.txt")

 if(CMAKE_CROSSCOMPILING AND NOT TARGET native-cmake-build)
-	find_program(NINJA "ninja")
-
 	file(MAKE_DIRECTORY ${NATIVE_BUILD_DIR})
 	add_custom_command(
 		OUTPUT ${NATIVE_BUILD_TARGET}
 		COMMAND ${CMAKE_COMMAND}
-			-GNinja
+			-G "${CMAKE_GENERATOR}"
 			"${CMAKE_SOURCE_DIR}"
-			-DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${NATIVE_BINARY_DIR}
+			"-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}"
+			"-DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${NATIVE_BINARY_DIR}"
 		WORKING_DIRECTORY ${NATIVE_BUILD_DIR}
 		VERBATIM USES_TERMINAL
 	)
@@ -27,7 +26,9 @@
 	if(CMAKE_CROSSCOMPILING)
 		set(NATIVE_BINARY "${NATIVE_BINARY_DIR}/${NAME}")
 		add_custom_target("build-native-${NAME}"
-			COMMAND ${NINJA} ${NAME}
+			COMMAND ${CMAKE_COMMAND}
+				--build "${NATIVE_BUILD_DIR}"
+				--target "${NAME}"
 			DEPENDS ${NATIVE_BUILD_TARGET}
 			BYPRODUCTS ${NATIVE_BINARY}
 			WORKING_DIRECTORY ${NATIVE_BUILD_DIR}


Turn on in "all" the options turned off by 4b09ff

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -203,14 +203,31 @@

 #--- The 'all' option swithes ON major options---------------------------------------------------
 if(all)
+ set(bonjour_defvalue ON)
+ set(chirp_defvalue ON)
+ set(dcache_defvalue ON)
+ set(fitsio_defvalue ON)
+ set(glite_defvalue ON)
+ set(fortran_defvalue ON)
  set(gdml_defvalue ON)
+ set(gviz_defvalue ON)
+ set(hdfs_defvalue ON)
  set(http_defvalue ON)
+ set(krb5_defvalue ON)
+ set(ldap_defvalue ON)
+ set(memstat_defvalue ON)
+ set(minuit2_defvalue ON)
+ set(monalisa_defvalue ON)
+ set(odbc_defvalue ON)
  set(qt_defvalue ON)
  set(qtgsi_defvalue ON)
+ set(r_defvalue ON)
+ set(rfio_defvalue ON)
  set(roofit_defvalue ON)
- set(minuit2_defvalue ON)
- set(r_defvalue ON)
  set(root7_defvalue ON)
+ set(sapdb_defvalue ON)
+ set(shadowpw_defvalue ON)
+ set(srp_defvalue ON)
  set(table_defvalue ON)
  set(unuran_defvalue ON)
  set(vc_defvalue ON)


Remove 'astiff' build option since it has no effect anywhere

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -74,7 +74,6 @@
 ROOT_BUILD_OPTION(alien OFF "Enable support for AliEn (requires libgapiUI from ALICE)")
 ROOT_BUILD_OPTION(arrow OFF "Enable support for Apache Arrow")
 ROOT_BUILD_OPTION(asimage ON "Enable support for image processing via libAfterImage")
-ROOT_BUILD_OPTION(astiff ON "Enable support for TIFF images via libAfterImage")
 ROOT_BUILD_OPTION(builtin_afterimage ON "Build bundled copy of libAfterImage")
 ROOT_BUILD_OPTION(builtin_cfitsio OFF "Build CFITSIO internally (requires network)")
 ROOT_BUILD_OPTION(builtin_clang ON "Build bundled copy of Clang")
@@ -200,7 +199,6 @@
  set(alien_defvalue ON)
  set(arrow_defvalue ON)
  set(asimage_defvalue ON)
- set(astiff_defvalue ON)
  set(cefweb_defvalue ON)
  set(clad_defvalue ON)
  set(cuda_defvalue ON)


cmake: fix previous commit

cmake: fix previous commit

--- cmake/qibuild/modules/qt-tools.cmake
+++ cmake/qibuild/modules/qt-tools.cmake
@@ -1,3 +1,20 @@
+
+####
+#
+# This is just an re-write for FindQt4 methods.
+# We search programs moc and uic, then we use the
+# rest of the upstream's Qt4.cmake file
+
+
+find_program(QT_MOC_EXECUTABLE moc)
+find_program(QT_UIC_EXECUTABLE uic)
+
+if(QT_MOC_EXECUTABLE)
+  debug("QT_MOC_EXECUTABLE: ${QT_MOC_EXECUTABLE}")
+else()
+  message(FATAL_ERROR "QT_MOC not found!")
+endif()
+
 #####
 # this is directy taken from Qt4.cmake upstream file
 #


Fix missing search of rcc

Fix missing search of rcc

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

--- cmake/qibuild/modules/qt-tools.cmake
+++ cmake/qibuild/modules/qt-tools.cmake
@@ -27,8 +27,9 @@
   return()
 endif()

-find_program(QT_MOC_EXECUTABLE moc)
-find_program(QT_UIC_EXECUTABLE uic)
+find_program(QT_MOC_EXECUTABLE moc REQUIRED)
+find_program(QT_UIC_EXECUTABLE uic REQUIRED)
+find_program(QT_RCC_EXECUTABLE rcc REQUIRED)

 if(QT_MOC_EXECUTABLE)
   qi_debug("QT_MOC_EXECUTABLE: ${QT_MOC_EXECUTABLE}")


qt5utils: cosmetic change

qt5utils: cosmetic change

Use qi_persistent_set

Change-Id: I3f55bb1f26e067090cad80823be3d8c93da2d236

--- cmake/qibuild/modules/qt5utils.cmake
+++ cmake/qibuild/modules/qt5utils.cmake
@@ -10,11 +10,11 @@
   # upstream uses Qt5::Core notation but we need to dereference this
   # because we won't be calling find_package() again
   find_package(${name})
-  set(${prefix}_LIBRARIES ${${name}_LIBRARIES} CACHE INTERNAL "" FORCE)
-  set(${prefix}_INCLUDE_DIRS ${${name}_INCLUDE_DIRS} CACHE INTERNAL "" FORCE)
+  qi_persistent_set(${prefix}_LIBRARIES ${${name}_LIBRARIES})
+  qi_persistent_set(${prefix}_INCLUDE_DIRS ${${name}_INCLUDE_DIRS})
   set(_define ${prefix}_LIB)
   string(REPLACE QT5 QT _define ${_define})
-  set(${prefix}_DEFINITIONS ${_define} CACHE INTERNAL "" FORCE)
+  qi_persistent_set(${prefix}_DEFINITIONS ${_define})

   export_lib(${prefix})
 endfunction()


Fixed macro call

Fixed macro call

--- CMake/mitkSetupVariables.cmake
+++ CMake/mitkSetupVariables.cmake
@@ -154,7 +154,7 @@
 endforeach()

 # separate processing of the COMPOSITE list to avoid its concatenation to to global list
-_create_type_seq(${MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES}
+_create_type_seq("${MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES}"
                  MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES_SEQ
                  MITK_ACCESSBYITK_COMPOSITE_TYPES_DIMN_SEQ)


added userbase for simple itk non system python installations

--- CMakeExternals/SimpleITK.cmake
+++ CMakeExternals/SimpleITK.cmake
@@ -96,11 +96,19 @@
         STRING(REPLACE " " "\ " _install_dir ${ep_prefix})
       endif()

-      ExternalProject_Add_Step(${proj} sitk_python_install_step
-        COMMAND ${PYTHON_EXECUTABLE} setup.py install --prefix=${_install_dir}
-        DEPENDEES install
-        WORKING_DIRECTORY ${_sitk_build_dir}/Wrapping/PythonPackage
-      )
+      if( MITK_USE_SYSTEM_PYTHON )
+        ExternalProject_Add_Step(${proj} sitk_python_install_step
+          COMMAND PYTHONUSERBASE=${_install_dir} ${PYTHON_EXECUTABLE} setup.py install --prefix=${_install_dir}
+          DEPENDEES install
+          WORKING_DIRECTORY ${_sitk_build_dir}/Wrapping/PythonPackage
+        )
+      else()
+        ExternalProject_Add_Step(${proj} sitk_python_install_step
+          COMMAND ${PYTHON_EXECUTABLE} setup.py install --prefix=${_install_dir}
+          DEPENDEES install
+          WORKING_DIRECTORY ${_sitk_build_dir}/Wrapping/PythonPackage
+        )
+      endif()
     endif()

     mitkFunctionInstallExternalCMakeProject(${proj})


Avoid print_info as ctest post command for non-ninja win generators

--- CMakeModules/CTestCustom.cmake
+++ CMakeModules/CTestCustom.cmake
@@ -10,8 +10,6 @@
 if(WIN32)
   if(CMAKE_GENERATOR MATCHES "Ninja")
     set(CTEST_CUSTOM_POST_TEST ./bin/print_info.exe)
-  else()
-    set(CTEST_CUSTOM_POST_TEST ./bin/Release/print_info.exe)
   endif()
 else()
   set(CTEST_CUSTOM_POST_TEST ./test/print_info)


[CI] set user for documentation upload

[CI] set user for documentation upload

--- CI/config/with_documentation.cmake
+++ CI/config/with_documentation.cmake
@@ -1,6 +1,6 @@
 # from default, documentation
 include(default)
-set(GFORGE_USER ci)
+set_option(GFORGE_USER siconos-ci)
 set_option(WITH_SERIALIZATION ON)
 set_option(WITH_BULLET ON)
 set_option(WITH_DOCUMENTATION ON)


CMake: Fix tinyfiledialogs clone error message

--- CMake/InstallTinyFileDialogs.cmake
+++ CMake/InstallTinyFileDialogs.cmake
@@ -12,7 +12,7 @@
 		WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dependencies
 	)
 	if (result)
-		message (FATAL_ERROR "Failed to clone assimp: ${result}\n"
+		message (FATAL_ERROR "Failed to clone tinyfiledialogs: ${result}\n"
 		                     "Error output: ${stderr}")
 	endif ()
 endif ()


Fix "cache miss" message

Fix "cache miss" message

--- cmake/modules/hunter_load_from_cache.cmake
+++ cmake/modules/hunter_load_from_cache.cmake
@@ -119,7 +119,8 @@
       endif()
       if(NOT dep_entry STREQUAL package_sha1)
         hunter_status_debug("Cache miss for package ${package}/${component}:")
-        hunter_status_debug("  ${cached_sha1} != ${package_sha1}")
+        hunter_status_debug("  Expected `${dep_entry}`")
+        hunter_status_debug("  Got `${package_sha1}`")
         set(cache_hit FALSE)
         break()
       endif()


[nuemrics] correct a too rapid merge

[nuemrics] correct a too rapid merge

--- numerics/numerics_tests.cmake
+++ numerics/numerics_tests.cmake
@@ -271,10 +271,6 @@
     NEW_FC_3D_TEST(${_DAT} SICONOS_FRICTION_3D_NSGS 1e-5 10000
       SICONOS_FRICTION_3D_ONECONTACT_NSN_GP 0 0
       INTERNAL_IPARAM SICONOS_FRICTION_3D_NSN_HYBRID_STRATEGY SICONOS_FRICTION_3D_NSN_HYBRID_STRATEGY_PLI_NSN_LOOP)
-
-    NEW_FC_3D_TEST(${_DAT} SICONOS_FRICTION_3D_NSGS 1e-5 10000
-      SICONOS_FRICTION_3D_ONECONTACT_NSN_GP 0 0
-      INTERNAL_IPARAM SICONOS_FRICTION_3D_NSN_HYBRID_STRATEGY SICONOS_FRICTION_3D_NSN_HYBRID_STRATEGY_PLI_NSN_LOOP)

     # --- Nonsmooth Newton on FC3D_DATA_SET ---
     NEW_FC_3D_TEST(${_DAT} SICONOS_FRICTION_3D_NSN_AC 1e-5 1000
@@ -577,9 +573,6 @@
   NEW_FC_3D_TEST(KaplasTower-i1061-4.hdf5.dat SICONOS_FRICTION_3D_NSN_FB 5e-2 1000)
   NEW_FC_3D_TEST(KaplasTower-i1061-4.hdf5.dat SICONOS_FRICTION_3D_NSN_NM 5e-2 1000)

-  NEW_FC_3D_TEST(KaplasTower-i1061-4.hdf5.dat SICONOS_FRICTION_3D_NSN_AC 5e-2 1000)
-  NEW_FC_3D_TEST(KaplasTower-i1061-4.hdf5.dat SICONOS_FRICTION_3D_NSN_FB 5e-2 1000)
-  NEW_FC_3D_TEST(KaplasTower-i1061-4.hdf5.dat SICONOS_FRICTION_3D_NSN_NM 5e-2 1000)

   NEW_FC_3D_TEST(KaplasTower-i1061-4.hdf5.dat
     SICONOS_FRICTION_3D_PROX  1e-3 10
@@ -649,28 +642,6 @@
     DPARAM 3 1e4
     WILL_FAIL)

-
-  # Rover4396.dat
-  NEW_FC_3D_TEST(Rover4396.dat SICONOS_FRICTION_3D_NSGS 1e-5 10000
-    SICONOS_FRICTION_3D_ONECONTACT_NSN_GP 0 0
-    WILL_FAIL)
-
-  NEW_FC_3D_TEST(Rover4396.dat SICONOS_FRICTION_3D_NSGS 1e-5 10000
-    SICONOS_FRICTION_3D_ONECONTACT_NSN_GP 0 0
-    INTERNAL_IPARAM 10 1)
-
-  NEW_FC_3D_TEST(Rover4396.dat SICONOS_FRICTION_3D_NSGS 1e-5 10000
-    SICONOS_FRICTION_3D_ONECONTACT_ProjectionOnConeWithLocalIteration 1e-12  10)
-
-  NEW_FC_3D_TEST(Rover4396.dat SICONOS_FRICTION_3D_NSGS 1e-5 10000
-    SICONOS_FRICTION_3D_ONECONTACT_NSN_GP 0 0
-    INTERNAL_IPARAM SICONOS_FRICTION_3D_NSN_HYBRID_STRATEGY SICONOS_FRICTION_3D_NSN_HYBRID_STRATEGY_PLI_NSN_LOOP WILL_FAIL)
-  NEW_FC_3D_TEST(Rover4396.dat SICONOS_FRICTION_3D_NSN_AC 1e-5 1000
-    0 0 0
-    IPARAM 1 1)
-  NEW_FC_3D_TEST(Rover4396.dat SICONOS_FRICTION_3D_NSN_AC 1e-3 1000)
-  NEW_FC_3D_TEST(Rover4396.dat SICONOS_FRICTION_3D_NSN_FB 1e-3 1000)
-  NEW_FC_3D_TEST(Rover4396.dat SICONOS_FRICTION_3D_NSN_NM 1e-3 1000)

   # Rover4396.dat
   NEW_FC_3D_TEST(Rover4396.dat SICONOS_FRICTION_3D_NSGS 1e-5 10000


projecTM jack version bump

projecTM jack version bump

git-svn-id: 647c2dfdf120d9af8205d960f30c8711574448cd@1403 6778bc44-b910-0410-a7a0-be141de4315d

--- src/projectM-jack/cmake/CPack-projectM.cmake
+++ src/projectM-jack/cmake/CPack-projectM.cmake
@@ -17,8 +17,8 @@
 #SET(CPACK_BINARY_TGZ ON)
 #SET(CPACK_SOURCE_Z OFF)
 SET(CPACK_PACKAGE_VERSION_MAJOR "2")
-SET(CPACK_PACKAGE_VERSION_MINOR "0")
-SET(CPACK_PACKAGE_VERSION_PATCH "1")
+SET(CPACK_PACKAGE_VERSION_MINOR "1")
+SET(CPACK_PACKAGE_VERSION_PATCH "0")

 INCLUDE(CPack)


COMP: add missing LINK_DIRECTORIES for boost needed on windows because of automatic linking

--- CMake/ImportBoost.cmake
+++ CMake/ImportBoost.cmake
@@ -32,6 +32,10 @@

   IF(BOOST_IS_COMPLETE)
     MESSAGE(STATUS "  Testing external Boost library    -- yes")
+
+    # needed for automatic linking on msvc platform
+    LINK_DIRECTORIES( ${Boost_LIBRARY_DIRS} )
+
   ELSE(BOOST_IS_COMPLETE)
     MESSAGE(STATUS "  Testing external Boost library    -- no")
     MESSAGE(STATUS "  Forcing the OTB_USE_EXTERNAL_BOOST value to OFF")


ENH: Add dependencies for packaging using Qt 5.15

--- Packaging/PackageGlobals.cmake
+++ Packaging/PackageGlobals.cmake
@@ -121,6 +121,8 @@
   libodbc.so*
   libpq.so*
   libEGL.so*
+  libxkbcommon*
+  libxcb-*
   )
   # libexpat.so.*
   # libfontconfig.so*


Update openresty download URL for better reliability.

We seem to periodically see DNS issues with openresty.org's DNS, so
download from github instead.

--- build/cmake/openresty.cmake
+++ build/cmake/openresty.cmake
@@ -75,7 +75,7 @@
 ExternalProject_Add(
   openresty
   DEPENDS libgeoip ngx_dyups ngx_txid openssl pcre
-  URL https://openresty.org/download/openresty-${OPENRESTY_VERSION}.tar.gz
+  URL https://github.com/openresty/openresty/releases/download/v${OPENRESTY_VERSION}/openresty-${OPENRESTY_VERSION}.tar.gz
   URL_HASH MD5=${OPENRESTY_HASH}
   BUILD_IN_SOURCE 1
   CONFIGURE_COMMAND ${OPENRESTY_CONFIGURE_CMD}


MS:

MS:

-DOC: some documentation for dashboard script

--- src/Testing/dashboard_script_MS_win64.cmake
+++ src/Testing/dashboard_script_MS_win64.cmake
@@ -1,5 +1,9 @@
 #
 # This script runs a dashboard
+#
+# It has 1 optional argument: the build model.
+# The build model should be one of {Experimental, Continuous, Nightly}
+# and defaults to Nightly.
 #
 # Setup: Windows 7, Visual Studio 9 2008 Win64, Release mode, ITK 3.20.0
 # PC: LKEB, MS personal computer
@@ -28,39 +32,43 @@

 # Specify svn update command
 SET( CTEST_SVN_CHECKOUT
-  "${CTEST_SVN_COMMAND} co --username elastixguest --password elastixguest https://svn.bigr.nl/elastix/trunkpublic/src \"${CTEST_SOURCE_DIRECTORY}\"" )
+  "${CTEST_SVN_COMMAND} co --username elastixguest --password elastixguest https://svn.bigr.nl/elastix/trunkpublic \"${CTEST_SOURCE_DIRECTORY}\"" )
+
+# Ctest should wipe the binary tree before running
+# to keep harddisk space usage from growing
+SET( CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE )
+
+# Build elastix in release mode
+SET( CTEST_BUILD_CONFIGURATION "Release" )

 # The following does not seem to work:
 # find_program( CTEST_SVN_COMMAND NAMES svn )
 #SET( CTEST_SVN_COMMAND "C:/cygwin/bin/svn.exe" )
 #set( CTEST_UPDATE_COMMAND "${CTEST_SVN_COMMAND}" )
 #SET( $ENV{LC_MESSAGES}    "en_EN" )
-# should ctest wipe the binary tree before running
-SET( CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE )

 #SET( CTEST_BUILD_NAME "win7-64-vs2008" )
 #set( CTEST_CMAKE_GENERATOR "Visual Studio 9 2008 Win64" )
-
-set( CTEST_BUILD_CONFIGURATION "Release" )
 #set(WITH_KWSTYLE FALSE)
 #set(WITH_MEMCHECK FALSE)
 #set(WITH_COVERAGE FALSE)
 #set(WITH_DOCUMENTATION FALSE)

 # Usage of the initial cache seems to do the trick:
-# Configure the dashboard.
+# Configure the dashboard:
 set( CTEST_INITIAL_CACHE "
-// Specify build, generator
+// Specify build, generator:
 BUILDNAME:STRING=win7-64-vs2008
 CMAKE_GENERATOR:INTERNAL=Visual Studio 9 2008 Win64
 CMAKE_CONFIGURATION_TYPES:STRING=Release

+// Specify svn command:
 SVNCOMMAND:FILEPATH=C:/cygwin/bin/svn.exe

-// Which ITK to use
+// Which ITK to use:
 ITK_DIR:PATH=D:/toolkits/ITK/3.20.0/bin

-// Some elastix settings, defining the configuration
+// Some elastix settings, defining the configuration:
 ELASTIX_BUILD_TESTING:BOOL=ON
 ELASTIX_ENABLE_PACKAGER:BOOL=ON
 ELASTIX_USE_CUDA:BOOL=ON
@@ -69,7 +77,7 @@
 ELASTIX_IMAGE_3D_PIXELTYPES:STRING=float
 ELASTIX_IMAGE_4D_PIXELTYPES:STRING=short

-// Compile all elastix components
+// Compile all elastix components:
 USE_AffineDTITransformElastix:BOOL=ON
 USE_BSplineInterpolatorFloat:BOOL=ON
 USE_BSplineResampleInterpolatorFloat:BOOL=ON
@@ -86,4 +94,3 @@
 USE_ViolaWellsMutualInformationMetric:BOOL=ON
 ")

-


cmake: add hidden option to link components as group

Adds a hidden option to link components in projects as one big group for
debugging purposes. Makes it easy to single out if symbols are not
really defined or some requirements are missing for components leading
to undefined link errors.

--- tools/cmake/project.cmake
+++ tools/cmake/project.cmake
@@ -440,6 +440,10 @@
     add_executable(${project_elf} "${project_elf_src}")
     add_dependencies(${project_elf} _project_elf_src)

+    if(__PROJECT_GROUP_LINK_COMPONENTS)
+        target_link_libraries(${project_elf} "-Wl,--start-group")
+    endif()
+
     if(test_components)
         target_link_libraries(${project_elf} "-Wl,--whole-archive")
         foreach(test_component ${test_components})


CMake: Update version number

CMake: Update version number

--- version.cmake
+++ version.cmake
@@ -3,7 +3,7 @@
 endif()
 set(LIB_VERSION_MAJOR 0)
 set(LIB_VERSION_MINOR 8)
-set(LIB_VERSION_PATCH 0)
+set(LIB_VERSION_PATCH 1)
 set(LIB_VERSION_ABI 0.8)
 set(LIB_VERSION_STRING ${LIB_VERSION_MAJOR}.${LIB_VERSION_MINOR}.${LIB_VERSION_PATCH})
 set(SUMMARY "${PROJECT_NAME} Game Boy Advance Emulator")