Removed extra print message.

Removed extra print message.

--- cmake/nuttx/px4_impl_nuttx.cmake
+++ cmake/nuttx/px4_impl_nuttx.cmake
@@ -348,8 +348,6 @@
 	endforeach()
 	add_custom_target(collect_extras DEPENDS ${extras})

-	message(STATUS "EXTRAS: ${extras}")
-
 	add_custom_command(OUTPUT romfs.o
 		COMMAND cmake -E remove_directory ${romfs_temp_dir}
 		COMMAND cmake -E copy_directory ${romfs_src_dir} ${romfs_temp_dir}


Add a whitespace to have the Dependencies section parsed correctly

--- modules/python_libs.cmake
+++ modules/python_libs.cmake
@@ -5,6 +5,7 @@
 # will not find libraries and headers matching the interpreter version.
 #
 # Dependencies::
+#
 #   python_interpreter         - Sets the Python interpreter for headers and libraries detection
 #
 # Variables used::


Exclude graph_runtime_optimization_test.cc from reduced ops build. (#10191)

--- cmake/onnxruntime_unittests.cmake
+++ cmake/onnxruntime_unittests.cmake
@@ -233,7 +233,8 @@
   endif()
 endif()

-if(NOT onnxruntime_MINIMAL_BUILD OR onnxruntime_ENABLE_RUNTIME_OPTIMIZATION_REPLAY_IN_MINIMAL_BUILD)
+if((NOT onnxruntime_MINIMAL_BUILD OR onnxruntime_ENABLE_RUNTIME_OPTIMIZATION_REPLAY_IN_MINIMAL_BUILD)
+   AND NOT onnxruntime_REDUCED_OPS_BUILD)
   list(APPEND onnxruntime_test_optimizer_src
        "${TEST_SRC_DIR}/optimizer/runtime_optimization/graph_runtime_optimization_test.cc")
 endif()


Fix boost_1.61 download url

Fix boost_1.61 download url

--- cmake/projects/Boost/hunter.cmake
+++ cmake/projects/Boost/hunter.cmake
@@ -12,14 +12,13 @@
 # Disable searching in locations not specified by these hint variables.
 set(Boost_NO_SYSTEM_PATHS ON)

-# Version without tests and docs
 hunter_add_version(
     PACKAGE_NAME
     Boost
     VERSION
     "1.61.0"
     URL
-    "https://github.com/hunter-packages/boost/archive/v1.61.0.tar.gz"
+    "https://downloads.sourceforge.net/project/boost/boost/1.61.0/boost_1_61_0.tar.bz2"
     SHA1
     f84b1a1ce764108ec3c2b7bd7704cf8dfd3c9d01
 )


Removing backup file

Removing backup file

--- srslte/lib/bak.cmake
+++ srslte/lib/bak.cmake
@@ -1,137 +0,0 @@
-#
-# Copyright 2013-2015 Software Radio Systems Limited
-#
-# This file is part of the srsLTE library.
-#
-# srsLTE is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of
-# the License, or (at your option) any later version.
-#
-# srsLTE is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Affero General Public License for more details.
-#
-# A copy of the GNU Affero General Public License can be found in
-# the LICENSE file in the top-level directory of this distribution
-# and at http://www.gnu.org/licenses/.
-#
-
-
-########################################################################
-# Find Dependencies
-########################################################################
-include(CheckFunctionExistsMath)
-
-FIND_PACKAGE(SRSGUI)
-FIND_PACKAGE(FFTW3F REQUIRED)
-FIND_PACKAGE(FFTS)
-
-IF(${DISABLE_VOLK})
-  IF(${DISABLE_VOLK} EQUAL 0)
-    FIND_PACKAGE(Volk)
-  ELSE(${DISABLE_VOLK} EQUAL 0)
-    MESSAGE(STATUS "VOLK library disabled (DISABLE_VOLK=1)")
-  ENDIF(${DISABLE_VOLK} EQUAL 0)
-ELSE(${DISABLE_VOLK})
-  FIND_PACKAGE(Volk)
-ENDIF(${DISABLE_VOLK})
-
-IF(VOLK_FOUND)
-  INCLUDE_DIRECTORIES(${VOLK_INCLUDE_DIRS})
-  LINK_DIRECTORIES(${VOLK_LIBRARY_DIRS})
-ENDIF(VOLK_FOUND)
-
-IF(FFTW3F_FOUND)
-  INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS})
-  LINK_DIRECTORIES(${FFTW3F_LIBRARY_DIRS})
-ENDIF(FFTW3F_FOUND)
-
-IF(SRSGUI_FOUND)
-  INCLUDE_DIRECTORIES(${SRSGUI_INCLUDE_DIRS})
-  LINK_DIRECTORIES(${SRSGUI_LIBRARY_DIRS})
-ENDIF(SRSGUI_FOUND)
-
-########################################################################
-# Recurse subdirectories and compile all source files into the same lib
-########################################################################
-FILE(GLOB modules *)
-SET(SOURCES_ALL "")
-FOREACH (_module ${modules})
-  IF(IS_DIRECTORY ${_module})
-    IF (NOT ${_module} MATCHES "rf")
-      FILE(GLOB_RECURSE tmp "${_module}/src/*.c")
-      LIST(APPEND SOURCES_ALL ${tmp})
-    ENDIF (NOT ${_module} MATCHES "rf")
-  ENDIF(IS_DIRECTORY ${_module})
-ENDFOREACH()
-
-ADD_LIBRARY(srslte SHARED ${SOURCES_ALL})
-TARGET_LINK_LIBRARIES(srslte m ${FFTW3F_LIBRARIES})
-SET_TARGET_PROPERTIES(srslte
-  PROPERTIES VERSION ${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR}
-)
-
-IF(FFTS_FOUND)
-  TARGET_LINK_LIBRARIES(srslte ${FFTS_LIBRARIES})
-ENDIF(FFTS_FOUND)
-
-IF(RF_FOUND)
-  # Include common RF files
-  SET(SOURCES_RF "")
-  LIST(APPEND SOURCES_RF "rf/src/rf_imp.c" "rf/src/rf_utils.c")
-
-  IF (UHD_FOUND)
-    INCLUDE_DIRECTORIES(${UHD_INCLUDE_DIRS})
-    LINK_DIRECTORIES(${UHD_LIBRARY_DIRS})
-    add_definitions(-DENABLE_UHD)
-    LIST(APPEND SOURCES_RF "rf/src/rf_uhd_imp.c" "rf/src/uhd_c_api.cpp")
-  ENDIF (UHD_FOUND)
-
-  IF (BLADERF_FOUND)
-    INCLUDE_DIRECTORIES(${BLADERF_INCLUDE_DIRS})
-    add_definitions(-DENABLE_BLADERF)
-    LIST(APPEND SOURCES_RF "rf/src/rf_blade_imp.c")
-  ENDIF (BLADERF_FOUND)
-
-  ADD_LIBRARY(srslte_rf SHARED ${SOURCES_RF})
-  SET_TARGET_PROPERTIES(srslte_rf
-    PROPERTIES VERSION ${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR}
-  )
-
-  IF (UHD_FOUND)
-    TARGET_LINK_LIBRARIES(srslte_rf ${UHD_LIBRARIES})
-  ENDIF (UHD_FOUND)
-
-  IF (BLADERF_FOUND)
-    TARGET_LINK_LIBRARIES(srslte_rf ${BLADERF_LIBRARIES})
-  ENDIF (BLADERF_FOUND)
-
-  INSTALL(TARGETS srslte_rf DESTINATION ${LIBRARY_DIR})
-  SRSLTE_SET_PIC(srslte_rf)
-ENDIF(RF_FOUND)
-
-INSTALL(TARGETS srslte DESTINATION ${LIBRARY_DIR})
-SRSLTE_SET_PIC(srslte)
-
-IF(VOLK_FOUND)
-  INCLUDE_DIRECTORIES(${VOLK_INCLUDE_DIRS})
-  SET_TARGET_PROPERTIES(srslte PROPERTIES COMPILE_DEFINITIONS "${VOLK_DEFINITIONS}")
-  TARGET_LINK_LIBRARIES(srslte ${VOLK_LIBRARIES})
-  MESSAGE(STATUS "   Compiling with VOLK SIMD library.")
-ELSE(VOLK_FOUND)
-  MESSAGE(STATUS "   VOLK SIMD library NOT found. Using generic implementation.")
-ENDIF(VOLK_FOUND)
-
-########################################################################
-# Recurse subdirectories and find all directories with a CMakeLists.txt file in it
-########################################################################
-FILE(GLOB_RECURSE cmakefiles CMakeLists.txt)
-FOREACH (_file ${cmakefiles})
-  GET_FILENAME_COMPONENT(dir ${_file} PATH)
-  IF (NOT ${dir} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
-    ADD_SUBDIRECTORY(${dir})
-  ENDIF ()
-ENDFOREACH()
-


angle.h added to Find.cmake list

angle.h added to Find.cmake list

--- pose_state_time/Findpose_state_time.cmake
+++ pose_state_time/Findpose_state_time.cmake
@@ -1,7 +1,7 @@
 #edit the following line to add the librarie's header files
 FIND_PATH(
         pose_state_time_INCLUDE_DIRS
-        NAMES timeStamp.h quaternion.h rotation.h
+        NAMES timeStamp.h angle.h quaternion.h rotation.h
         PATHS /usr/local/include/btr-headers
 )


python: Accept Python 3.11

python: Accept Python 3.11

--- cmake/FindPython3Interp.cmake
+++ cmake/FindPython3Interp.cmake
@@ -56,7 +56,7 @@

 unset(_Python3_NAMES)

-set(_Python3_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+set(_Python3_VERSIONS 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)

 if(Python3Interp_FIND_VERSION)
     if(Python3Interp_FIND_VERSION_COUNT GREATER 1)


GENERICLOGGER_LINK_FLAGS [ci skip]

GENERICLOGGER_LINK_FLAGS [ci skip]

--- cmake/FindgenericLogger.cmake
+++ cmake/FindgenericLogger.cmake
@@ -216,13 +216,8 @@
     SET (_GENERICLOGGER_CXX_FLAGS_SHARED "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
   ENDIF ()

-  IF (NOT _GENERICLOGGER_LINK_FLAGS)
-    SET (_GENERICLOGGER_LINK_FLAGS ${GENERICLOGGER_LIBRARIES})
-  ENDIF ()
-
-  IF (NOT _GENERICLOGGER_STATIC_LINK_FLAGS)
-    SET (_GENERICLOGGER_STATIC_LINK_FLAGS ${GENERICLOGGER_STATIC_LIBRARIES})
-  ENDIF ()
+  SET (_GENERICLOGGER_LINK_FLAGS)
+  SET (_GENERICLOGGER_STATIC_LINK_FLAGS)

 ENDIF (GENERICLOGGER_INCLUDE_DIR)


Make HAVE_COVERAGE visible when not building for emscripten.

--- cmake/environmentchecks.cmake
+++ cmake/environmentchecks.cmake
@@ -156,11 +156,11 @@
   set(LLVM_COVERAGE_TESTING_AVAILABLE TRUE CACHE INTERNAL "Executables required to run the llvm coverage testing are available.")
 endif()

+if(HAVE_COVERAGE)
+  set(PYTHON_COVERAGE_TESTING_AVAILABLE TRUE CACHE INTERNAL "Module required to run Python coverage testing is available.")
+endif()
+
 if(WIN32 AND NOT EMSCRIPTEN)
-  if(HAVE_COVERAGE)
-    set(PYTHON_COVERAGE_TESTING_AVAILABLE TRUE CACHE INTERNAL "Module required to run Python coverage testing is available.")
-  endif()
-
   find_program(MAKENSIS_EXE NAMES ${PREFERRED_NSIS_NAMES} makensis
     HINTS "C:/Program\ Files/NSIS/" "C:/Program\ Files\ (x86)/NSIS/")
   mark_as_advanced(MAKENSIS_EXE)


SheafSystem now exporting VTK_LIBS. Didn't need to when we were linking against the (flawed) static prerequisites

--- cmake_modules/LPSCommon.cmake
+++ cmake_modules/LPSCommon.cmake
@@ -651,6 +651,8 @@
         file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "\n")
         file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "set(VTK_LIB_DIR @VTK_LIB_DIR@ CACHE PATH \"VTK library path\")\n")
         file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "\n")
+        file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "set(VTK_LIBS @VTK_LIBS@ CACHE PATH \"VTK libraries \")\n")
+        file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "\n")
         file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "set(VTK_BIN_DIR @VTK_BIN_DIR@ CACHE PATH  \"VTK DLL path\")\n")
         file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "\n")
         file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "set(VTK_INC_DIRS @VTK_INC_DIRS@ CACHE PATH  \"VTK DLL path\")\n")


--- SuperBuild/External_DTIProcess.cmake
+++ SuperBuild/External_DTIProcess.cmake
@@ -81,6 +81,9 @@
 =======
   set(${proj}_REPOSITORY "https://www.nitrc.org/svn/dtiprocess/trunk")
   set(${proj}_SVN_REVISION -r "234")
+<<<<<<< HEAD
+>>>>>>> 92aa4e7... ENH: Updated version of DTIProcess and updated ITKv4 configuration options to be able to build the new version of DTIProcess
+=======
 >>>>>>> 92aa4e7... ENH: Updated version of DTIProcess and updated ITKv4 configuration options to be able to build the new version of DTIProcess
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}


change DESTINATION argument name of ament_python_install_module()

--- ament_cmake_python/cmake/ament_python_install_module.cmake
+++ ament_cmake_python/cmake/ament_python_install_module.cmake
@@ -17,9 +17,9 @@
 #
 # :param module_file: the Python module file
 # :type MODULE_FILE: string
-# :param DESTINATION: the base package to install the module to, rooted on
-#   PYTHON_INSTALL_DIR (default: install as a top level module)
-# :type DESTINATION: string
+# :param DESTINATION_SUFFIX: the base package to install the module to
+#   (default: empty, install as a top level module)
+# :type DESTINATION_SUFFIX: string
 #
 macro(ament_python_install_module)
   _ament_cmake_python_register_environment_hook()
@@ -27,7 +27,7 @@
 endmacro()

 function(_ament_cmake_python_install_module module_file)
-  cmake_parse_arguments(ARG "" "DESTINATION" "" ${ARGN})
+  cmake_parse_arguments(ARG "" "DESTINATION_SUFFIX" "" ${ARGN})
   if(ARG_UNPARSED_ARGUMENTS)
     message(FATAL_ERROR "ament_python_install_module() called with unused "
       "arguments: ${ARG_UNPARSED_ARGUMENTS}")
@@ -46,16 +46,9 @@
       "'PYTHON_INSTALL_DIR' must not be empty")
   endif()

-  set(destination "")
-  set(module_name "")
-  get_filename_component(name "${module_file}" NAME_WE)
-
-  if(NOT ARG_DESTINATION)
-    set(destination "${PYTHON_INSTALL_DIR}")
-    set(module_name "${name}")
-  else()
-    set(destination "${PYTHON_INSTALL_DIR}/${ARG_DESTINATION}")
-    set(module_name "${ARG_DESTINATION}/${name}")
+  set(destination "${PYTHON_INSTALL_DIR}")
+  if(ARG_DESTINATION_SUFFIX)
+    set(destination "${destination}/${ARG_DESTINATION_SUFFIX}")
   endif()

   install(


Fix parsing error in CMake macro.

Fix parsing error in CMake macro.

One extra )

Change-Id: I47b64a06112a54a4199fd3fb23ded74d89bbcdef
Sanity-Review: Qt Sanity Bot <5581206bb7e0307f0d99eb71898ae6b694149ca5@ovi.com>
Reviewed-by: David Faure <86a8c136eda381b2295095fae2f365917f1ca4ea@kde.org>

--- src/qdbus/Qt5DBusToolsMacros.cmake
+++ src/qdbus/Qt5DBusToolsMacros.cmake
@@ -65,7 +65,7 @@
     qt5_generate_moc(${_header} ${_moc})

     list(APPEND ${_sources} ${_impl} ${_header} ${_moc})
-    macro_add_file_dependencies(${_impl} ${_moc}))
+    macro_add_file_dependencies(${_impl} ${_moc})
     set(${_sources} ${${_sources}} PARENT_SCOPE)
 endfunction()


Dashboard driver script now submit update info

--- CMake/ctkDashboardDriverScript.cmake
+++ CMake/ctkDashboardDriverScript.cmake
@@ -112,7 +112,6 @@
 MACRO(run_ctest)
   ctest_start(${model})
   ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res)
-  #ctest_submit(PARTS Update Notes)

   # force a build if this is the first run and the build dir is empty
   if(NOT EXISTS "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt")
@@ -132,6 +131,9 @@
   endif()

   if (res GREATER 0 OR force_build)
+
+    ctest_submit(PARTS Update)
+
     message("Configure SuperBuild")

     set_property(GLOBAL PROPERTY SubProject SuperBuild)


BUG: Do not let HDF5 set the CMAKE_INSTALL_PREFIX

Submitted upstream: https://github.com/HDFGroup/hdf5/pull/1380

--- Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake_ext_mod/HDFMacros.cmake
+++ Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake_ext_mod/HDFMacros.cmake
@@ -434,7 +434,9 @@
     endif ()
   endif ()

-  if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+# ITK --start. Do not let HDF5 set the CMAKE_INSTALL_PREFIX for externally configured projects. Submitted upstream: https://github.com/HDFGroup/hdf5/pull/1380
+  if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+# ITK -- stop
     if (CMAKE_HOST_UNIX)
       set (CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
         CACHE PATH "Install path prefix, prepended onto install directories." FORCE)


bug fix

bug fix

--- cmake/Modules/FindSpinnaker.cmake
+++ cmake/Modules/FindSpinnaker.cmake
@@ -31,9 +31,9 @@

 mark_as_advanced(SPINNAKER_INCLUDE_DIR SPINNAKER_LIBRARY )

-set(SPINNAKER_LIBRARIES ${SPINNAKER_LIBRARY} )
-set(SPINNAKER_INCLUDE_DIRS ${SPINNAKER_INCLUDE_DIR} )
+set(SPINNAKER_LIBRARIES ${SPINNAKER_LIBRARY})
+set(SPINNAKER_INCLUDE_DIRS ${SPINNAKER_INCLUDE_DIR})

-message(STATUS "SPINNAKER_LIBRARIES: ${SPINNAKER_LIBRARIES})
-message(STATUS "SPINNAKER_INCLUDE_DIRS: ${SPINNAKER_INCLUDE_DIRS})
+message(STATUS "SPINNAKER_LIBRARIES: ${SPINNAKER_LIBRARIES}")
+message(STATUS "SPINNAKER_INCLUDE_DIRS: ${SPINNAKER_INCLUDE_DIRS}")


let the test Video_AccSquared.accuracy pass on linux x64 debug

--- cmake/OpenCVCompilerOptions.cmake
+++ cmake/OpenCVCompilerOptions.cmake
@@ -201,9 +201,6 @@
         add_extra_compiler_option(-mpopcnt)
       endif()
     endif()
-    if((X86 OR X86_64) AND NOT MSVC AND NOT APPLE)
-        add_extra_compiler_option(-mf16c)
-    endif((X86 OR X86_64) AND NOT MSVC AND NOT APPLE)
   endif(NOT MINGW)

   if(X86 OR X86_64)


update boost base url (#381)

update boost base url (#381)

--- cmake/projects/Boost/hunter.cmake
+++ cmake/projects/Boost/hunter.cmake
@@ -14,7 +14,7 @@
 set(Boost_NO_SYSTEM_PATHS ON)

 # use base url for official boost releases
-set(_hunter_boost_base_url "https://dl.bintray.com/boostorg/release")
+set(_hunter_boost_base_url "https://boostorg.jfrog.io/artifactory/main/release")

 hunter_add_version(
     PACKAGE_NAME


More wx finder work

More wx finder work

--- cmake-scripts/Findwxwidgets3.cmake
+++ cmake-scripts/Findwxwidgets3.cmake
@@ -46,20 +46,15 @@
     SET(WXWIDGETS_LIBRARY "")

     EXECUTE_PROCESS(
-        COMMAND ${WX_CONFIG} "--cflags"
-        OUTPUT_VARIABLE WX_INC_OPTS
+        COMMAND ${WX_CONFIG} "--cxxflags" "--libs"
+        OUTPUT_VARIABLE WX_OPTS
     )

-    EXECUTE_PROCESS(
-        COMMAND ${WX_CONFIG} "--libs"
-        OUTPUT_VARIABLE WX_LIB_OPTS
-    )
+    STRING(REGEX REPLACE "(\r?\n)+$" "" WX_OPTS "${WX_OPTS}")

-    IF(WX_INC_OPTS AND WX_LIB_OPTS)
+    IF(WX_OPTS)
         SET(WXWIDGETS_FOUND TRUE)
-    ENDIF(WX_INC_OPTS AND WX_LIB_OPTS)
-
-    SET(WX_OPTS "${WX_LIB_OPTS} ${WX_INC_OPTS}")
+    ENDIF(WX_OPTS)
 ENDIF(MINGW)

 IF(WXWIDGETS_FOUND)


Set warnings for compiler individually

Set warnings for compiler individually

--- cmake/EnableCompilerWarnings.cmake
+++ cmake/EnableCompilerWarnings.cmake
@@ -20,192 +20,190 @@
     # endif ()

 else()
-    set(CMAKE_COMPILER_WARNINGS)
-    # use -Wall for gcc and clang
-    list(APPEND CMAKE_COMPILER_WARNINGS
-        -Wall
-        -Wextra
-        -Wcomment
-        -Wendif-labels
-        -Wformat
-        -Winit-self
-        -Wreturn-type
-        -Wsequence-point
-        -Wshadow
-        -Wswitch
-        -Wtrigraphs
-        -Wundef
-        -Wuninitialized
-        -Wunreachable-code
-        -Wunused
-
-        -Wno-sign-compare
-    )
-    if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-        list(APPEND CMAKE_COMPILER_WARNINGS
-            -Wabi
-            -Wabstract-final-class
-            -Waddress
-            -Waddress-of-array-temporary
-            -Waddress-of-temporary
-            -Waggregate-return
-            -Wambiguous-macro
-            -Wambiguous-member-template
-            -Wanonymous-pack-parens
-            -Warray-bounds
-            -Warray-bounds-pointer-arithmetic
-            -Wassign-enum
-            -Watomic-properties
-            -Wattributes
-            -Wavailability
-            -Wbackslash-newline-escape
-            -Wbad-array-new-length
-            -Wbad-function-cast
-            -Wbind-to-temporary-copy
-            -Wbuiltin-macro-redefined
-            -Wbuiltin-requires-header
-            -Wcast-align
-            -Wcast-qual
-            -Wchar-align
-            -Wcomments
-            -Wcompare-distinct-pointer-types
-            -Wconditional-type-mismatch
-            -Wconditional-uninitialized
-            -Wconfig-macros
-            -Wconstant-logical-operand
-            -Wconstexpr-not-const
-            -Wconversion-null
-            -Wcovered-switch-default
-            -Wctor-dtor-privacy
-            -Wdangling-field
-            -Wdangling-initializer-list
-            -Wdelete-incomplete
-            -Wdeprecated
-            -Wdivision-by-zero
-            -Wduplicate-decl-specifier
-            -Wduplicate-enum
-            -Wduplicate-method-arg
-            -Wduplicate-method-match
-            -Wdynamic-class-memaccess
-            -Wempty-body
-            -Wenum-compare
-            -Wexplicit-ownership-type
-            -Wextern-initializer
-            -Wfloat-equal
-            -Wgnu-array-member-paren-init
-            -Wheader-guard
-            -Wheader-hygiene
-            -Widiomatic-parentheses
-            -Wignored-attributes
-            -Wimplicit-conversion-floating-point-to-bool
-            -Wimplicit-exception-spec-mismatch
-            -Wimplicit-fallthrough
-            -Wincompatible-library-redeclaration
-            -Wincompatible-pointer-types
-            # -Winherited-variadic-ctor
-            -Winline
-            -Wint-conversions
-            -Wint-to-pointer-cast
-            -Winteger-overflow
-            -Winvalid-constexpr
-            -Winvalid-noreturn
-            -Winvalid-offsetof
-            -Winvalid-pch
-            -Winvalid-pp-token
-            -Winvalid-source-encoding
-            -Winvalid-token-paste
-            -Wloop-analysis
-            -Wmain
-            -Wmain-return-type
-            -Wmalformed-warning-check
-            -Wmethod-signatures
-            -Wmismatched-parameter-types
-            -Wmismatched-return-types
-            -Wmissing-declarations
-            -Wmissing-format-attribute
-            -Wmissing-include-dirs
-            -Wmissing-sysroot
-            -Wmissing-variable-declarations
-            -Wnarrowing
-            -Wnested-externs
-            -Wnewline-eof
-            -Wnon-pod-varargs
-            -Wnon-virtual-dtor
-            -Wnull-arithmetic
-            -Wnull-character
-            -Wnull-dereference
-            -Wodr
-            -Wold-style-definition
-            -Wout-of-line-declaration
-            -Wover-aligned
-            -Woverflow
-            -Woverriding-method-mismatch
-            -Wpacked
-            -Wpointer-sign
-            -Wpointer-to-int-cast
-            -Wpointer-type-mismatch
-            -Wpredefined-identifier-outside-function
-            -Wredundant-decls
-            -Wreinterpret-base-class
-            -Wreserved-user-defined-literal
-            -Wreturn-stack-address
-            -Wsection
-            -Wserialized-diagnostics
-            -Wshift-count-negative
-            -Wshift-count-overflow
-            -Wshift-overflow
-            -Wshift-sign-overflow
-            # -Wsign-compare
-            -Wsign-promo
-            -Wsizeof-pointer-memaccess
-            -Wstack-protector
-            -Wstatic-float-init
-            -Wstring-compare
-            -Wstrlcpy-strlcat-size
-            -Wstrncat-size
-            -Wswitch-default
-            -Wswitch-enum
-            -Wsynth
-            -Wtautological-compare
-            -Wtentative-definition-incomplete-type
-            -Wthread-safety
-            -Wtype-limits
-            -Wtype-safety
-            -Wtypedef-redefinition
-            -Wtypename-missing
-            -Wundefined-inline
-            -Wundefined-reinterpret-cast
-            -Wunicode
-            -Wunicode-whitespace
-            -Wunused-exception-parameter
-            -Wunused-macros
-            -Wunused-member-function
-            -Wunused-parameter
-            -Wunused-volatile-lvalue
-            -Wused-but-marked-unused
-            -Wuser-defined-literals
-            -Wvarargs
-            -Wvector-conversions
-            -Wvexing-parse
-            -Wvisibility
-            -Wvla
-            -Wweak-template-vtables
-            # -Wweak-vtables
-            -Wwrite-strings
+    foreach(COMPILER C CXX)
+        set(CMAKE_COMPILER_WARNINGS)
+        # use -Wall for gcc and clang
+        list(APPEND CMAKE_COMPILER_WARNINGS
+            -Wall
+            -Wextra
+            -Wcomment
+            -Wendif-labels
+            -Wformat
+            -Winit-self
+            -Wreturn-type
+            -Wsequence-point
+            -Wshadow
+            -Wswitch
+            -Wtrigraphs
+            -Wundef
+            -Wuninitialized
+            -Wunreachable-code
+            -Wunused
+
+            -Wno-sign-compare
         )
-    else()
-        list(APPEND CMAKE_COMPILER_WARNINGS
-            -Wno-missing-field-initializers
-        )
-    endif()
-
-    foreach(FLAG ${CMAKE_COMPILER_WARNINGS})
-        if(NOT CMAKE_CXX_FLAGS MATCHES ${FLAG})
-            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAG}")
+        if (CMAKE_${COMPILER}_COMPILER_ID MATCHES "Clang")
+            list(APPEND CMAKE_COMPILER_WARNINGS
+                -Wabi
+                -Wabstract-final-class
+                -Waddress
+                -Waddress-of-array-temporary
+                -Waddress-of-temporary
+                -Waggregate-return
+                -Wambiguous-macro
+                -Wambiguous-member-template
+                -Wanonymous-pack-parens
+                -Warray-bounds
+                -Warray-bounds-pointer-arithmetic
+                -Wassign-enum
+                -Watomic-properties
+                -Wattributes
+                -Wavailability
+                -Wbackslash-newline-escape
+                -Wbad-array-new-length
+                -Wbad-function-cast
+                -Wbind-to-temporary-copy
+                -Wbuiltin-macro-redefined
+                -Wbuiltin-requires-header
+                -Wcast-align
+                -Wcast-qual
+                -Wchar-align
+                -Wcomments
+                -Wcompare-distinct-pointer-types
+                -Wconditional-type-mismatch
+                -Wconditional-uninitialized
+                -Wconfig-macros
+                -Wconstant-logical-operand
+                -Wconstexpr-not-const
+                -Wconversion-null
+                -Wcovered-switch-default
+                -Wctor-dtor-privacy
+                -Wdangling-field
+                -Wdangling-initializer-list
+                -Wdelete-incomplete
+                -Wdeprecated
+                -Wdivision-by-zero
+                -Wduplicate-decl-specifier
+                -Wduplicate-enum
+                -Wduplicate-method-arg
+                -Wduplicate-method-match
+                -Wdynamic-class-memaccess
+                -Wempty-body
+                -Wenum-compare
+                -Wexplicit-ownership-type
+                -Wextern-initializer
+                -Wfloat-equal
+                -Wgnu-array-member-paren-init
+                -Wheader-guard
+                -Wheader-hygiene
+                -Widiomatic-parentheses
+                -Wignored-attributes
+                -Wimplicit-conversion-floating-point-to-bool
+                -Wimplicit-exception-spec-mismatch
+                -Wimplicit-fallthrough
+                -Wincompatible-library-redeclaration
+                -Wincompatible-pointer-types
+                # -Winherited-variadic-ctor
+                -Winline
+                -Wint-conversions
+                -Wint-to-pointer-cast
+                -Winteger-overflow
+                -Winvalid-constexpr
+                -Winvalid-noreturn
+                -Winvalid-offsetof
+                -Winvalid-pch
+                -Winvalid-pp-token
+                -Winvalid-source-encoding
+                -Winvalid-token-paste
+                -Wloop-analysis
+                -Wmain
+                -Wmain-return-type
+                -Wmalformed-warning-check
+                -Wmethod-signatures
+                -Wmismatched-parameter-types
+                -Wmismatched-return-types
+                -Wmissing-declarations
+                -Wmissing-format-attribute
+                -Wmissing-include-dirs
+                -Wmissing-sysroot
+                -Wmissing-variable-declarations
+                -Wnarrowing
+                -Wnested-externs
+                -Wnewline-eof
+                -Wnon-pod-varargs
+                -Wnon-virtual-dtor
+                -Wnull-arithmetic
+                -Wnull-character
+                -Wnull-dereference
+                -Wodr
+                -Wold-style-definition
+                -Wout-of-line-declaration
+                -Wover-aligned
+                -Woverflow
+                -Woverriding-method-mismatch
+                -Wpacked
+                -Wpointer-sign
+                -Wpointer-to-int-cast
+                -Wpointer-type-mismatch
+                -Wpredefined-identifier-outside-function
+                -Wredundant-decls
+                -Wreinterpret-base-class
+                -Wreserved-user-defined-literal
+                -Wreturn-stack-address
+                -Wsection
+                -Wserialized-diagnostics
+                -Wshift-count-negative
+                -Wshift-count-overflow
+                -Wshift-overflow
+                -Wshift-sign-overflow
+                # -Wsign-compare
+                -Wsign-promo
+                -Wsizeof-pointer-memaccess
+                -Wstack-protector
+                -Wstatic-float-init
+                -Wstring-compare
+                -Wstrlcpy-strlcat-size
+                -Wstrncat-size
+                -Wswitch-default
+                -Wswitch-enum
+                -Wsynth
+                -Wtautological-compare
+                -Wtentative-definition-incomplete-type
+                -Wthread-safety
+                -Wtype-limits
+                -Wtype-safety
+                -Wtypedef-redefinition
+                -Wtypename-missing
+                -Wundefined-inline
+                -Wundefined-reinterpret-cast
+                -Wunicode
+                -Wunicode-whitespace
+                -Wunused-exception-parameter
+                -Wunused-macros
+                -Wunused-member-function
+                -Wunused-parameter
+                -Wunused-volatile-lvalue
+                -Wused-but-marked-unused
+                -Wuser-defined-literals
+                -Wvarargs
+                -Wvector-conversions
+                -Wvexing-parse
+                -Wvisibility
+                -Wvla
+                -Wweak-template-vtables
+                # -Wweak-vtables
+                -Wwrite-strings
+            )
+        else()
+            list(APPEND CMAKE_COMPILER_WARNINGS
+                -Wno-missing-field-initializers
+            )
         endif()

-        if(NOT CMAKE_C_FLAGS MATCHES ${FLAG})
-            set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FLAG}")
-        endif()
+        foreach(FLAG ${CMAKE_COMPILER_WARNINGS})
+            if(NOT CMAKE_${COMPILER}_FLAGS MATCHES ${FLAG})
+                set(CMAKE_${COMPILER}_FLAGS "${CMAKE_${COMPILER}_FLAGS} ${FLAG}")
+            endif()
+        endforeach()
     endforeach()
 endif ()


Enable GCC 10 to pass version check

Enable GCC 10 to pass version check

--- cmake/Modules/cvmfs_compiler.cmake
+++ cmake/Modules/cvmfs_compiler.cmake
@@ -38,12 +38,12 @@
 if (CMAKE_COMPILER_IS_GNUCC)
   message (STATUS "checking gcc version...")
   execute_process (
-    COMMAND ${CMAKE_C_COMPILER} -v
+    COMMAND ${CMAKE_C_COMPILER} -dumpfullversion
     OUTPUT_VARIABLE CVMFS_GCC_VERSION
     ERROR_VARIABLE  CVMFS_GCC_VERSION
   )
-  STRING(REGEX REPLACE ".*([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" CVMFS_GCC_MAJOR "${CVMFS_GCC_VERSION}")
-  STRING(REGEX REPLACE ".*[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" CVMFS_GCC_MINOR "${CVMFS_GCC_VERSION}")
+  STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" CVMFS_GCC_MAJOR "${CVMFS_GCC_VERSION}")
+  STRING(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" CVMFS_GCC_MINOR "${CVMFS_GCC_VERSION}")
   if (${CVMFS_GCC_MAJOR} LESS 4)
     message (FATAL_ERROR "GCC < 4.1 unsupported")
   endif (${CVMFS_GCC_MAJOR} LESS 4)
@@ -94,4 +94,4 @@
     message("Enable inotify support")
     set(CVMFS_ENABLE_INOTIFY ON)
   endif(HAS_INOTIFY_INIT1)
-endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")+endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")


fix cmake build on master-next

fix cmake build on master-next

This re-applies the change to the location of LLVM
cmake config files.

--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -85,9 +85,9 @@
     message("-- Found PythonInterp: ${PYTHON_EXECUTABLE}")
   endif()
   # Import CMake library targets from LLVM and Clang.
-  include("${LLDB_PATH_TO_LLVM_BUILD}/share/llvm/cmake/LLVMConfig.cmake")
-  if (EXISTS "${LLDB_PATH_TO_CLANG_BUILD}/share/clang/cmake/ClangConfig.cmake")
-      include("${LLDB_PATH_TO_CLANG_BUILD}/share/clang/cmake/ClangConfig.cmake")
+  include("${LLDB_PATH_TO_LLVM_BUILD}/lib/cmake/llvm/LLVMConfig.cmake")
+  if (EXISTS "${LLDB_PATH_TO_CLANG_BUILD}/lib/cmake/clang/ClangConfig.cmake")
+      include("${LLDB_PATH_TO_CLANG_BUILD}/lib/cmake/clang/ClangConfig.cmake")
   endif()

   set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")


Fix OpenCV URL

Fix OpenCV URL

[skip ci]

--- cmake/projects/OpenCV/hunter.cmake
+++ cmake/projects/OpenCV/hunter.cmake
@@ -118,7 +118,7 @@
     VERSION
     "3.0.0-p11"
     URL
-    "https://github.com/hunter-packages/opencv/archive/v3.0.0-p11.tar.gz"
+    "https://github.com/hunter-packages/opencv/releases/download/v3.0.0-p11/v3.0.0-p11.tar.gz"
     SHA1
     3fa05fadc5c2b5e02ada00ccb7752ede660699ab
 )


docs: use PYTHON_EXECUTABLE to find Sphinx

--- misc/cmake/FindSphinx.cmake
+++ misc/cmake/FindSphinx.cmake
@@ -19,10 +19,13 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)

+get_filename_component(PYTHON_PATH ${PYTHON_EXECUTABLE} DIRECTORY)
+
 find_program(SPHINX_EXECUTABLE NAMES sphinx-build
   HINTS
   $ENV{SPHINX_DIR}
   HINTS ${SPHINX_ROOT}/bin
+  HINTS ${PYTHON_PATH}
   PATH_SUFFIXES bin
   DOC "Sphinx documentation generator"
 )


COMP: Apply latest version of KWStyle

COMP: Apply latest version of KWStyle

 - Use the latest version of KWStyle due to its following features:

   - Updated the boost library of KWStyle with the latest release version
     (August 13th, 2015 15:23 GMT)

   - Fixed warning messages of KWStyle related to format-nonliteral,
     unused-parameter and autological-compare warning messages.

Change-Id: I9b69a13c344e0bd869fafaf16ade7dd9c6ca7ded

--- Utilities/KWStyle/BuildKWStyle.cmake
+++ Utilities/KWStyle/BuildKWStyle.cmake
@@ -15,7 +15,7 @@

 ExternalProject_add(KWStyle
   GIT_REPOSITORY "https://github.com/Kitware/KWStyle.git"
-  GIT_TAG 3bf3cbbf5226e3cf0e0383dffa264c9396825ad7
+  GIT_TAG 55677ba8bc9e44472681341247096ff4f0ba45aa
   UPDATE_COMMAND ""
   DOWNLOAD_DIR ${KWStyle_SOURCE_DIR}
   SOURCE_DIR ${KWStyle_SOURCE_DIR}


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

 # 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
@@ -15,7 +15,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2011)

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

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


BUG: Add VTK_VERSION for older VTK versions

For older VTK's, VTK_VERSION is not defined. It needs to be setup manually.

See ITK-3304

Change-Id: I5efec656190e7417c7a2cbfa1b27b8b545261ca0

--- Modules/Bridge/VtkGlue/itk-module-init.cmake
+++ Modules/Bridge/VtkGlue/itk-module-init.cmake
@@ -1,8 +1,19 @@
 #
 # Find the packages required by this module
 #
+
+# Needed VTK version
+set(VERSION_MIN "5.9.20110419")
+
+# Look for VTK
 find_package(VTK REQUIRED)
-set(VERSION_MIN "5.9.20110419")
+
+# Older versions of VTK (VTK 5.5 for example) do not have VTK_VERSION, in this
+# case it needs to be defined manually
+if(NOT VTK_VERSION)
+set(VTK_VERSION "${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}")
+endif()
+
 if (${VTK_VERSION} VERSION_LESS ${VERSION_MIN})
   message(ERROR " VtkGlue requires VTK version ${VERSION_MIN} or newer but the current version is ${VTK_VERSION}")
 endif()


Lock down conan.cmake file version to avoid having upstream break our builds

--- desktop/CMakeModules/QtConfiguration.cmake
+++ desktop/CMakeModules/QtConfiguration.cmake
@@ -25,7 +25,7 @@
   # TODO: Create packages of qt5 for Linux and MacOS too, so that we can rely strictly on this branch of code
   if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
       message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
-      file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/master/conan.cmake"
+      file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/9cc97acda619b7917f140415241785a864482b11/conan.cmake"
                     "${CMAKE_BINARY_DIR}/conan.cmake")
   endif()

@@ -38,8 +38,7 @@
   endif()
   conan_cmake_run(REQUIRES qt5-mxe/5.11.2@status-im/stable
                   PROFILE ../node_modules/status-conan/profiles/status-mingw32-x86_64
-                  BASIC_SETUP
-                  SETTINGS "qt5-mxe:os=Windows qt5-mxe:arch=x86_64"
+                  SETTINGS "qt5-mxe:os=Windows" "qt5-mxe:arch=x86_64"
                   OPTIONS ${_QT_PACKAGE_OPTIONS}
                   BUILD never)


use ament_target_dependencies()

use ament_target_dependencies()

--- rosidl_typesupport_introspection_cpp/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_introspection_cpp/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake
@@ -49,18 +49,15 @@
 target_include_directories(${rosidl_generate_interfaces_TARGET}${_target_suffix}
   PUBLIC
   ${CMAKE_CURRENT_BINARY_DIR}/rosidl_generator_cpp
-  ${rosidl_generator_cpp_INCLUDE_DIRS}
 )
-target_link_libraries(${rosidl_generate_interfaces_TARGET}${_target_suffix}
-  ${rosidl_typesupport_introspection_cpp_LIBRARIES})
 foreach(_pkg_name ${rosidl_generate_interfaces_DEPENDENCY_PACKAGE_NAMES})
-  target_include_directories(${rosidl_generate_interfaces_TARGET}${_target_suffix}
-    PUBLIC
-    ${${_pkg_name}_INCLUDE_DIRS}
-  )
-  target_link_libraries(${rosidl_generate_interfaces_TARGET}${_target_suffix}
-    ${${_pkg_name}_LIBRARIES})
+  ament_target_dependencies(
+    ${rosidl_generate_interfaces_TARGET}${_target_suffix}
+    ${_pkg_name})
 endforeach()
+ament_target_dependencies(${rosidl_generate_interfaces_TARGET}${_target_suffix}
+  "rosidl_generator_cpp"
+  "rosidl_typesupport_introspection_cpp")

 add_dependencies(
   ${rosidl_generate_interfaces_TARGET}


add c++11 flags for generated targets

add c++11 flags for generated targets

--- rosidl_typesupport_introspection_cpp/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_introspection_cpp/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake
@@ -85,6 +85,10 @@
   target_compile_definitions(${rosidl_generate_interfaces_TARGET}${_target_suffix}
     PRIVATE "ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_BUILDING_DLL")
 endif()
+if(NOT WIN32)
+  set_target_properties(${rosidl_generate_interfaces_TARGET}${_target_suffix}
+    PROPERTIES COMPILE_FLAGS "-std=c++11 -Wall -Wextra")
+endif()
 target_include_directories(${rosidl_generate_interfaces_TARGET}${_target_suffix}
   PUBLIC
   ${CMAKE_CURRENT_BINARY_DIR}/rosidl_generator_cpp


COMP: Fix superbuild configuration error when OTB_WRAP_PYTHON is ON and USE_SYSTEM_SWIG is OFF

AFAIK, this configuration is not tested on the dashboard. Error before patch :

cmake -DCMAKE_CXX_FLAGS=-std=c++11 -DUSE_SYSTEM_SWIG=OFF -DOTB_WRAP_PYTHON=ON ~/dev/src/otb/SuperBuild/

Call Stack (most recent call first):
  CMake/SuperBuild_Macro.cmake:56 (include)
  CMake/External_otb.cmake:79 (ADDTO_DEPENDENCIES_IF_NOT_SYSTEM)
  CMakeLists.txt:326 (include)

CMake Error at CMake/External_swig.cmake:60 (ADD_SUPERBUILD_CONFIGURE_VAR):
  ADD_SUPERBUILD_CONFIGURE_VAR Macro invoked with incorrect arguments for
  macro named: ADD_SUPERBUILD_CONFIGURE_VAR
Call Stack (most recent call first):
  CMake/SuperBuild_Macro.cmake:56 (include)
  CMake/External_otb.cmake:79 (ADDTO_DEPENDENCIES_IF_NOT_SYSTEM)
  CMakeLists.txt:326 (include)

CMake Error at CMake/External_swig.cmake:61 (ADD_SUPERBUILD_CONFIGURE_VAR):
  ADD_SUPERBUILD_CONFIGURE_VAR Macro invoked with incorrect arguments for
  macro named: ADD_SUPERBUILD_CONFIGURE_VAR
Call Stack (most recent call first):
  CMake/SuperBuild_Macro.cmake:56 (include)
  CMake/External_otb.cmake:79 (ADDTO_DEPENDENCIES_IF_NOT_SYSTEM)
  CMakeLists.txt:326 (include)

--- SuperBuild/CMake/External_swig.cmake
+++ SuperBuild/CMake/External_swig.cmake
@@ -57,8 +57,8 @@
   # declare dependencies
   ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(SWIG PCRE BOOST)

-  ADD_SUPERBUILD_CONFIGURE_VAR(PCRE_ROOT --with-pcre-prefix)
-  ADD_SUPERBUILD_CONFIGURE_VAR(BOOST_ROOT --with-boost)
+  ADD_SUPERBUILD_CONFIGURE_VAR(SWIG PCRE_ROOT --with-pcre-prefix)
+  ADD_SUPERBUILD_CONFIGURE_VAR(SWIG BOOST_ROOT --with-boost)

   ExternalProject_Add(SWIG
     PREFIX SWIG


Don't set NODEFAULTLIB on non MSVC machines

--- support/cmake/support_macros.cmake
+++ support/cmake/support_macros.cmake
@@ -252,9 +252,11 @@
         )
         target_link_libraries(OpenSpaceTest gtest libOpenSpace)

-        set_target_properties(OpenSpaceTest PROPERTIES LINK_FLAGS
-            "/NODEFAULTLIB:LIBCMTD.lib /NODEFAULTLIB:LIBCMT.lib"
-        )
+        if (MSVC)
+            set_target_properties(OpenSpaceTest PROPERTIES LINK_FLAGS
+                "/NODEFAULTLIB:LIBCMTD.lib /NODEFAULTLIB:LIBCMT.lib"
+            )
+        endif ()
         set_property(TARGET OpenSpaceTest PROPERTY FOLDER "Unit Tests")
     endif (OPENSPACE_HAVE_TESTS)
     if (TARGET GhoulTest)


Output ABI info if HUNTER_STATUS_DEBUG.

Output ABI info if HUNTER_STATUS_DEBUG.

--- cmake/modules/hunter_create_cache_file.cmake
+++ cmake/modules/hunter_create_cache_file.cmake
@@ -1,6 +1,7 @@
 # Copyright (c) 2015, Ruslan Baratov
 # All rights reserved.

+include(hunter_status_debug)
 include(hunter_test_string_not_empty)

 function(hunter_create_cache_file cache_path)
@@ -54,6 +55,7 @@
   # Pass compiler ABI info through to avoid recalculating in every project
   foreach(lang C CXX)
     if(DEFINED CMAKE_${lang}_SIZEOF_DATA_PTR)
+      hunter_status_debug("ABI forwarding: CMAKE_${lang}_SIZEOF_DATA_PTR = ${CMAKE_${lang}_SIZEOF_DATA_PTR}")
       file(
           APPEND
           "${temp_path}"
@@ -61,34 +63,40 @@
       )
     endif()
     if(DEFINED CMAKE_${lang}_COMPILER_ABI)
+      hunter_status_debug("ABI forwarding: CMAKE_${lang}_COMPILER_ABI = ${CMAKE_${lang}_COMPILER_ABI}")
       file(
           APPEND
           "${temp_path}"
           "set(CMAKE_${lang}_COMPILER_ABI \"${CMAKE_${lang}_COMPILER_ABI}\" CACHE INTERNAL \"\")\n"
       )
     endif()
+    hunter_status_debug("ABI forwarding: CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES = ${CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES}")
     file(
         APPEND
         "${temp_path}"
         "set(CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES \"${CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES}\" CACHE INTERNAL \"\")\n"
     )
+    hunter_status_debug("ABI forwarding: CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES = ${CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES}")
     file(
         APPEND
         "${temp_path}"
         "set(CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES \"${CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES}\" CACHE INTERNAL \"\")\n"
     )
+    hunter_status_debug("ABI forwarding: CMAKE_${lang}_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES = ${CMAKE_${lang}_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES}")
     file(
         APPEND
         "${temp_path}"
         "set(CMAKE_${lang}_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES \"${CMAKE_${lang}_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES}\" CACHE INTERNAL \"\")\n"
     )
     if(DEFINED CMAKE_${lang}_LIBRARY_ARCHITECTURE)
+      hunter_status_debug("ABI forwarding: CMAKE_${lang}_LIBRARY_ARCHITECTURE = ${CMAKE_${lang}_LIBRARY_ARCHITECTURE}")
       file(
           APPEND
           "${temp_path}"
           "set(CMAKE_${lang}_LIBRARY_ARCHITECTURE \"${CMAKE_${lang}_LIBRARY_ARCHITECTURE}\" CACHE INTERNAL \"\")\n"
       )
     endif()
+    hunter_status_debug("ABI forwarding: CMAKE_${lang}_ABI_COMPILED = ${CMAKE_${lang}_ABI_COMPILED}")
     file(
         APPEND
         "${temp_path}"


added Matlab versions up to R2021b

added Matlab versions up to R2021b


Fix problem with possible incorrect detection of native products due to overriding of the CMAKE_PREFIX_PATH.

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -503,7 +503,9 @@

   # Override the variable - don't append to it, as it would give precedence
   # to what was stored there before!
-  SET(CMAKE_PREFIX_PATH "${${pkg_UC}_ROOT_DIR}")
+  IF(DEFINED ENV{${pkg_UC}_ROOT_DIR})
+    SET(CMAKE_PREFIX_PATH "${${pkg_UC}_ROOT_DIR}")
+  ENDIF()

   # Try find_package in config mode. This has the priority, but is
   # performed QUIET and not REQUIRED:


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

 # 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
@@ -12,10 +12,10 @@
 #=============================================================================

 # KWSys version date year component.  Format is CCYY.
-SET(KWSYS_DATE_STAMP_YEAR  2010)
+SET(KWSYS_DATE_STAMP_YEAR  2011)

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


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

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


hm it seems cmake does not understand CYGWIN (=> UNIX)

--- test/testsuite.cmake
+++ test/testsuite.cmake
@@ -1,7 +1,7 @@

 ####################################################################
 #
-# Usage:
+# Usage:
 #  - create a new folder, let's call it cdash
 #  - in that folder, do:
 #    ctest -S path/to/eigen2/test/testsuite.cmake[,option1=value1[,option2=value2]]
@@ -51,25 +51,25 @@
   # pick first
   string(REGEX MATCH "([^,]*)(,.*)?" DUMMY ${ARGLIST})
   SET(TOP ${CMAKE_MATCH_1})
-
+
   # remove first
   string(REGEX MATCHALL "[^,]*,(.*)" DUMMY ${ARGLIST})
   SET(ARGLIST ${CMAKE_MATCH_1})
-
+
   # decompose as a pair key=value
   string(REGEX MATCH "([^=]*)(=.*)?" DUMMY ${TOP})
   SET(KEY ${CMAKE_MATCH_1})
-
+
   string(REGEX MATCH "[^=]*=(.*)" DUMMY ${TOP})
   SET(VALUE ${CMAKE_MATCH_1})
-
+
   # set the variable to the specified value
   if(VALUE)
     SET(${KEY} ${VALUE})
   else(VALUE)
     SET(${KEY} ON)
   endif(VALUE)
-
+
 endwhile(${ARGLIST} MATCHES ".+.*")

 ####################################################################
@@ -158,7 +158,7 @@

 # this is the initial cache to use for the binary tree, be careful to escape
 # any quotes inside of this string if you use it
-if(WIN32 AND NOT CYGWIN)
+if(WIN32 AND NOT UNIX)
   #message(SEND_ERROR "win32")
   set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -G \"NMake Makefiles\" -DCMAKE_MAKE_PROGRAM=nmake")
   SET (CTEST_INITIAL_CACHE "
@@ -168,12 +168,12 @@
     BUILDNAME:STRING=${EIGEN_BUILD_STRING}
     SITE:STRING=${EIGEN_SITE}
   ")
-else(WIN32 AND NOT CYGWIN)
+else(WIN32 AND NOT UNIX)
   SET (CTEST_INITIAL_CACHE "
     BUILDNAME:STRING=${EIGEN_BUILD_STRING}
     SITE:STRING=${EIGEN_SITE}
   ")
-endif(WIN32 AND NOT CYGWIN)
+endif(WIN32 AND NOT UNIX)

 # set any extra environment variables to use during the execution of the script here:


fix win32 build undefined refernece to GetUserProfileDirectory

--- uv.cmake
+++ uv.cmake
@@ -187,6 +187,7 @@
     psapi.lib
     iphlpapi.lib
     advapi32.lib
+    Userenv.lib
   )
 endif()


Clean up run_binary_test on android (#7466)

--- build_tools/cmake/iree_run_binary_test.cmake
+++ build_tools/cmake/iree_run_binary_test.cmake
@@ -74,8 +74,7 @@
   endif()

   if(ANDROID)
-    set(_ANDROID_REL_DIR "${_PACKAGE_PATH}/${_RULE_NAME}")
-    set(_ANDROID_ABS_DIR "/data/local/tmp/${_ANDROID_REL_DIR}")
+    set(_ANDROID_ABS_DIR "/data/local/tmp/${_PACKAGE_PATH}/${_RULE_NAME}")
   endif()

   if (DEFINED _RULE_TEST_INPUT_FILE_ARG)
@@ -92,9 +91,6 @@
   string(REGEX REPLACE "^::" "${_PACKAGE_NS}::" _TEST_BINARY_TARGET ${_RULE_TEST_BINARY})

   if(ANDROID)
-    set(_ANDROID_REL_DIR "${_PACKAGE_PATH}/${_RULE_NAME}")
-    set(_ANDROID_ABS_DIR "/data/local/tmp/${_ANDROID_REL_DIR}")
-
     # Define a custom target for pushing and running the test on Android device.
     set(_TEST_NAME ${_TEST_NAME}_on_android_device)
     add_test(
@@ -102,7 +98,7 @@
         ${_TEST_NAME}
       COMMAND
         "${CMAKE_SOURCE_DIR}/build_tools/cmake/run_android_test.${IREE_HOST_SCRIPT_EXT}"
-        "${_ANDROID_REL_DIR}/$<TARGET_FILE_NAME:${_TEST_BINARY_TARGET}>"
+        "${_ANDROID_ABS_DIR}/$<TARGET_FILE_NAME:${_TEST_BINARY_TARGET}>"
         ${_RULE_ARGS}
     )
     # Use environment variables to instruct the script to push artifacts


Fix clang build

Fix clang build

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -71,7 +71,7 @@
       list(APPEND SPAGHETTI_WARNINGS -Weverything -Wno-c++98-compat -Wno-padded -Wno-exit-time-destructors)
       list(APPEND SPAGHETTI_WARNINGS -Wno-weak-vtables -Wno-global-constructors)
       list(APPEND SPAGHETTI_WARNINGS -Wno-missing-variable-declarations -Wno-float-equal -Wno-switch-enum)
-      list(APPEND SPAGHETTI_WARNINGS -Wno-missing-prototypes -Wno-date-time)
+      list(APPEND SPAGHETTI_WARNINGS -Wno-missing-prototypes -Wno-date-time -Wno-unused-command-line-argument)
     endif ()
   endif ()
 else ()


Clean linux compile flags

Clean linux compile flags

--- cmake/PlatformLinux.cmake
+++ cmake/PlatformLinux.cmake
@@ -24,19 +24,16 @@
 )

 set(LINUX_COMPILE_FLAGS
-    -Wno-error=unknown-pragmas
     -fvisibility=hidden
     -pthread
     -pipe
     -fPIC
     -fno-rtti
-    -Wreturn-type
-    -Wfloat-equal
-    -Wcast-qual
-    -Wcast-align
     -Wconversion
+    -Wall
+    -Wextra
+    -pedantic
     -Werror
-    -Wno-error=switch
     -fopenmp
 )
 # no-rtti       -> disable c++ rtti
@@ -44,19 +41,15 @@
 # -fvisibility=hidden -> only export symbols with __attribute__ ((visibility ("default")))

 set(LINUX_TEST_COMPILE_FLAGS
-    -Wno-error=unknown-pragmas
     -fvisibility=hidden
     -pthread
     -pipe
     -fPIC
     -fno-rtti
-    -Wreturn-type
-    -Wcast-qual
-    -Wcast-align
     -Werror
     -Wall
+    -Wextra
     -pedantic
-    -Wno-error=switch
     -Wno-sign-compare
     -fopenmp
 )
@@ -71,8 +64,9 @@
     set(LINUX_COMPILE_FLAGS
         ${LINUX_COMPILE_FLAGS}
         -Wtrampolines
-        -Wall
-        -pedantic
+        -Wfloat-equal
+        -Wcast-qual
+        -Wcast-align
     )

     set(LINUX_LINKER_FLAGS "-fopenmp")


Change RPI repository location

Change RPI repository location

--- cmake/externals/RPI.cmake
+++ cmake/externals/RPI.cmake
@@ -11,7 +11,7 @@
     ParseProjectArguments(RPI rpip "" "" ${ARGN})

     if (NOT DEFINED location)
-        set(location GIT_REPOSITORY "git://scm.gforge.inria.fr/asclepiospublic/asclepiospublic.git")
+        set(location GIT_REPOSITORY "git@github.com:Inria-Asclepios/RPI.git")
     endif()

     SetExternalProjectsDirs(RPI ep_build_dirs)


Clean up lyaml build a bit

Clean up lyaml build a bit

change LYAML_SRC to LYAML_ROOT, which points to the top source
directory now.

LYAML_LIB and (new) LYAML_LUA_DIR are based relative to that
directory.

There's no install step at all now--the static library and the .lua
files are now used directly from the source tree.

Signed-off-by: Mark Stemm <1b6cbc2e568a933a16c6fa30b73e50cd507debf7@gmail.com>

--- cmake/modules/lyaml.cmake
+++ cmake/modules/lyaml.cmake
@@ -11,9 +11,10 @@
 # specific language governing permissions and limitations under the License.
 #

-set(LYAML_SRC "${PROJECT_BINARY_DIR}/lyaml-prefix/src/lyaml/ext/yaml")
-set(LYAML_LIB "${LYAML_SRC}/.libs/yaml.a")
-message(STATUS "Using bundled lyaml in '${LYAML_SRC}'")
+set(LYAML_ROOT "${PROJECT_BINARY_DIR}/lyaml-prefix/src/lyaml")
+set(LYAML_LIB "${LYAML_ROOT}/ext/yaml/.libs/yaml.a")
+set(LYAML_LUA_DIR "${LYAML_ROOT}/lib")
+message(STATUS "Using bundled lyaml in '${LYAML_ROOT}'")
 externalproject_add(
   lyaml
   DEPENDS luajit libyaml
@@ -22,7 +23,6 @@
   BUILD_COMMAND ${CMD_MAKE}
   BUILD_IN_SOURCE 1
   BUILD_BYPRODUCTS ${LYAML_LIB}
+  INSTALL_COMMAND ""
   CONFIGURE_COMMAND ./configure --enable-static CFLAGS=-I${LIBYAML_INSTALL_DIR}/include CPPFLAGS=-I${LIBYAML_INSTALL_DIR}/include LDFLAGS=-L${LIBYAML_INSTALL_DIR}/lib LIBS=-lyaml LUA=${LUAJIT_SRC}/luajit LUA_INCLUDE=-I${LUAJIT_INCLUDE}
-  INSTALL_COMMAND sh -c
-  "cp -R ${PROJECT_BINARY_DIR}/lyaml-prefix/src/lyaml/lib/* ${PROJECT_SOURCE_DIR}/userspace/engine/lua"
 )


Add libdir test in logical blocks since that variable is used within the
blocks.

Put in pkgconfig debug messages but comment them out.

svn path=/trunk/; revision=7211

--- cmake/modules/psttf.cmake
+++ cmake/modules/psttf.cmake
@@ -50,7 +50,7 @@

 if(PLD_psttf)
   pkgconfig("pango;pangoft2;lasi" includedir libdir linkflags cflags)
-  if(linkflags AND cflags)
+  if(linkflags AND cflags AND libdir)
     set(psttf_COMPILE_FLAGS "${cflags}")
     set(psttf_LINK_FLAGS "${linkflags}")
     # Convert from blank-delimited to a cmake list
@@ -70,14 +70,18 @@
     ${psttf_LINK_FLAGS}
     ${psttf_TARGETS}
     )
-  else(linkflags AND cflags)
+  else(linkflags AND cflags AND libdir)
+    #message("includedir = ${includedir}")
+    #message("libdir = ${libdir}")
+    #message("linkflags = ${linkflags}")
+    #message("cflags = ${cflags}")
     message(STATUS
        "WARNING: pango, pangoft2, or lasi not found with pkg-config.\n"
     "   Setting PLD_psttf to OFF.  Please install all of these packages\n"
     "   and/or set the environment variable PKG_CONFIG_PATH appropriately."
     )
     set(PLD_psttf OFF CACHE BOOL "Enable psttf device" FORCE)
-  endif(linkflags AND cflags)
+  endif(linkflags AND cflags AND libdir)
 endif(PLD_psttf)
 # Test for correct version of liblasi by looking
 # for API that was added for 1.0.5 which is required by PLplot.???


Fix cmake's version string handling (change proposed by Jonathan Perkin). Before this, a text suffix (like "-rc") after the numeric version was needed.

--- cmake/mysql_version.cmake
+++ cmake/mysql_version.cmake
@@ -42,6 +42,9 @@
         IF(NOT VERSION_STRING)
           FILE(STRINGS  configure.in  str REGEX "AC_INIT\\(")
           STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+[-][a-zAZ0-9]+" VERSION_STRING "${str}")
+          IF(NOT VERSION_STRING)
+            STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" VERSION_STRING "${str}")
+          ENDIF()
         ENDIF()
       ENDIF()
     ENDIF()


switching from CUDA v4.1 to 4

switching from CUDA v4.1 to 4

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

--- cmake/pcl_find_cuda.cmake
+++ cmake/pcl_find_cuda.cmake
@@ -1,6 +1,6 @@
 # Find CUDA
 set(CUDA_FIND_QUIETLY TRUE)
-find_package(CUDA 4.1)
+find_package(CUDA 4)

 if(CUDA_FOUND)
 	message(STATUS "Found CUDA Toolkit v${CUDA_VERSION_STRING}")


(split) ENH: Bump ITK superbuild version to 4.4.0.

Change-Id: I2b6c3ed8c4b68607f4cef5e3f8a0b0a5642e963e

--- External-ITK.cmake
+++ External-ITK.cmake
@@ -7,7 +7,7 @@
   set( itk_depends VTK ) # because of ITKVtkGlue
 endif()

-set( ITK_TAG "v4.3.0" )
+set( ITK_TAG "v4.4.0" )
 ExternalProject_Add( ITK
   GIT_REPOSITORY "${git_protocol}://itk.org/ITK.git"
   GIT_TAG "${ITK_TAG}"


Configure iOS build to target iPhones and iPads

--- toolchains/iOS.cmake
+++ toolchains/iOS.cmake
@@ -77,6 +77,7 @@
     set_xcode_property(${EXECUTABLE_NAME} SUPPORTED_PLATFORMS "iphonesimulator iphoneos")
     set_xcode_property(${EXECUTABLE_NAME} ONLY_ACTIVE_ARCH "NO")
     set_xcode_property(${EXECUTABLE_NAME} VALID_ARCHS "${ARCH}")
+    set_xcode_property(${EXECUTABLE_NAME} TARGETED_DEVICE_FAMILY "1,2")
 endfunction()

 macro(add_framework FWNAME APPNAME LIBPATH)


Suppress 'missingIncludeSystem' in cppcheck, which really just complains about a lot of the std-headers.

--- src/cmake/code-analysis.cmake
+++ src/cmake/code-analysis.cmake
@@ -79,7 +79,7 @@

     add_custom_target( ${TARGET_ANALYSIS}
         # Run cppcheck
-        COMMAND ${CPPCHECK} --xml-version=2 --enable=all --force -I ${TARGET_INCLUDES} ${TARGET_SOURCES} 2> "${OUTPUT_FILE}"
+        COMMAND ${CPPCHECK} --xml-version=2 --enable=all --suppress=missingIncludeSystem --force -I ${TARGET_INCLUDES} ${TARGET_SOURCES} 2> "${OUTPUT_FILE}"
         # Below should (optionally? or always do both?) convert cppcheck format -> junit format.
         COMMAND ${CPPCHECK_JUNIT} "${OUTPUT_FILE}" "${OUTPUT_FILE_JUNIT}"
         COMMAND ${CPPCHECK_HTML} --report-dir=${OUTPUT_DIR_HTML};--title=${TARGET};--source-dir=${SOURCE_DIR};--file=${OUTPUT_FILE}


Update Qt version

Update Qt version

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -34,7 +34,7 @@
 hunter_config(cereal VERSION 1.1.2-p5)
 hunter_config(OpenCV VERSION 3.0.0-p6 CMAKE_ARGS "${OPENCV_CMAKE_ARGS}")
 hunter_config(spdlog VERSION 1.0.0-p0)
-hunter_config(Qt VERSION 5.5.1-cvpixelbuffer-2-p1)
+hunter_config(Qt VERSION 5.5.1-cvpixelbuffer-2-p3)
 hunter_config(BoostCompute VERSION 0.5-p0)

 #  CMAKE_ARGS


CMake: Fix ENABLE_STATIC_RUNTIME warning

Warning about unusable ENABLE_STATIC_RUNTIME appeared on non-MSVC
platforms even if this option was not set.

Related to 26e4737,  #546,

--- cmake/SndFileChecks.cmake
+++ cmake/SndFileChecks.cmake
@@ -220,8 +220,8 @@
 	set (CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS} -static-libgcc -static-libstdc++ -s")
 endif ()

-if (MSVC)
-	if (DEFINED ENABLE_STATIC_RUNTIME)
+if (DEFINED ENABLE_STATIC_RUNTIME)
+	if (MSVC)
 		if (CMAKE_VERSION VERSION_LESS 3.15)
 			if (ENABLE_STATIC_RUNTIME)
 				foreach (flag_var
@@ -249,9 +249,9 @@
 		else ()
 			message (FATAL_ERROR "ENABLE_STATIC_RUNTIME option is for CMake < 3.15, use CMAKE_MSVC_RUNTIME_LIBRARY standard option instead.")
 		endif ()
-	endif ()
-else ()
-	message(AUTHOR_WARNING "ENABLE_STATIC_RUNTIME option is for MSVC compiler only.")
+	else ()
+		message(AUTHOR_WARNING "ENABLE_STATIC_RUNTIME option is for MSVC compiler only.")
+	endif ()
 endif ()

 if (BUILD_SHARED_LIBS)


qi_sanitize_compile_flags: emit an error when no return value is specified

Change-Id: I99d8a3a95b5bf98b41a721e5f97e681416950557
Reviewed-on: http://gerrit.aldebaran.lan:8080/6240
Tested-by: cgestes <ddb78fe00abb42f91254c16a0860e38eb0781789@aldebaran-robotics.com>
Reviewed-by: cgestes <ddb78fe00abb42f91254c16a0860e38eb0781789@aldebaran-robotics.com>

--- cmake/qibuild/flags.cmake
+++ cmake/qibuild/flags.cmake
@@ -51,7 +51,8 @@
     # add_definitions("-ansi")

     # Activate warnings
-    add_definitions("-Wall -Wno-unused-parameter")
+    add_definitions("-Wall -Wno-unused-parameter -Werror=return-type")
+

     if (ARGS_HIDDEN_SYMBOLS)
       add_definitions("-fvisibility=hidden")
@@ -68,4 +69,3 @@
   endif()

 endfunction()
-


Force 'testing' if 'roottest' is enabled.

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -257,6 +257,11 @@
   set(root7_defvalue ON)
 endif()

+#---roottest option implies testing
+if(roottest)
+  set(testing ON CACHE BOOL "" FORCE)
+endif()
+
 #---Define at moment the options with the selected default values-----------------------------
 ROOT_APPLY_OPTIONS()


Disable unuran on aarch64

Disable unuran on aarch64

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -91,6 +91,7 @@
 # VC does not support yet Arm processors.
 if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
    set(vc_defvalue OFF)
+   set(unuran_defvalue OFF)
 endif()


fixes gh-2445 fixed naming issue in el6 dep file.

Signed-off-by: Philip Marc Schwartz <90179e62a462019a8b170b5c04a4f0541ad92702@lexisnexis.com>

--- cmake_modules/dependencies/el6.cmake
+++ cmake_modules/dependencies/el6.cmake
@@ -1 +1 @@
-set ( CPACK_RPM_PACKAGE_REQUIRES "boost141-regex, openldap, libicu, m4, libtool, libxslt, libxml2, gcc-c++, openssh-server, openssh-clients, expect, libarchive")
+set ( CPACK_RPM_PACKAGE_REQUIRES "boost-regex, openldap, libicu, m4, libtool, libxslt, libxml2, gcc-c++, openssh-server, openssh-clients, expect, libarchive")


BUGsFIX: Slicer Extension Building

BUGsFIX: Slicer Extension Building

--- SuperBuild/External_SlicerExecutionModel.cmake
+++ SuperBuild/External_SlicerExecutionModel.cmake
@@ -26,7 +26,12 @@
 endif()

 # Set dependency list
-set(${proj}_DEPENDENCIES ITKv4)
+set(${proj}_DEPENDENCIES )
+
+
+if(NOT DEFINED ITK_DIR)
+  set(${proj}_DEPENDENCIES ${${proj}_DEPENDENCIES} ITKv4)
+endif()

 SlicerMacroCheckExternalProjectDependency(${proj})


Fixes install command.

Fixes install command.

--- internal/cpp_install_common.cmake
+++ internal/cpp_install_common.cmake
@@ -1,9 +1,12 @@
-
 # only add install rules if the target is built
 IF(${BUILD_${target}})
-    STRING(REGEX REPLACE "${CMAKE_SOURCE_DIR}/(.*)" "\\1" dest_dir ${CMAKE_CURRENT_SOURCE_DIR})
-    INSTALL(TARGETS ${target} DESTINATION ${dest_dir} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE)
-    INSTALL(FILES ${_DATA} DESTINATION ${dest_dir} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE)
+    FILE(RELATIVE_PATH dest_dir ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
+    SET(OUT_DIR "${SNAP_INSTALL_PREFIX}/${dest_dir}")
+    INSTALL(TARGETS ${target}
+            DESTINATION ${OUT_DIR}
+            PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE)
+    INSTALL(FILES ${_DATA} DESTINATION "${OUT_DIR}/data" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE)
 ENDIF()

+


- Fix to FindOpenSSL again

- Fix to FindOpenSSL again

--- cmake/Find_Windows/FindOpenSSL.cmake
+++ cmake/Find_Windows/FindOpenSSL.cmake
@@ -21,13 +21,12 @@
     )

 find_path ( SSL_INCLUDE_DIR_TMP
-    ssl.h
-    ssl2.h
-    ssl3.h
+    openssl/ssl.h
+    openssl/ssl2.h
+    openssl/ssl3.h

     PATH_SUFFIXES
-    include/openssl
-    include/
+    include
     PATHS
     ${OPENSSL_SEARCH_PATHS}
     )


fix gtest errors with msvc2017

fix gtest errors with msvc2017

--- cmake/external/GoogleTestNMock.cmake
+++ cmake/external/GoogleTestNMock.cmake
@@ -2,12 +2,14 @@
 include(ExternalProject)

 IF (MSVC)
+	# see https://github.com/google/googletest/issues/1373
+	SET(GTEST_TR1_SILENCER "/D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING")
 	SET (CUSTOM_CMAKE_ARGS -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${THIRD_PARTY_DIR}/libs/gmock
 		-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${THIRD_PARTY_DIR}/libs/gmock
-		-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}${CMAKE_DEFINITIONS}
-		-DCMAKE_CXX_FLAGS_RELEASE:STRING=${CMAKE_CXX_FLAGS_RELEASE}
-		-DCMAKE_CXX_FLAGS_DISTRIBUTION:STRING=${CMAKE_CXX_FLAGS_DISTRIBUTION}
-		-DCMAKE_CXX_FLAGS_DEBUG:STRING=${CMAKE_CXX_FLAGS_DEBUG}
+		-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}${GTEST_TR1_SILENCER}${CMAKE_DEFINITIONS}
+		-DCMAKE_CXX_FLAGS_RELEASE:STRING=${CMAKE_CXX_FLAGS_RELEASE}${GTEST_TR1_SILENCER}
+		-DCMAKE_CXX_FLAGS_DISTRIBUTION:STRING=${CMAKE_CXX_FLAGS_DISTRIBUTION}${GTEST_TR1_SILENCER}
+		-DCMAKE_CXX_FLAGS_DEBUG:STRING=${CMAKE_CXX_FLAGS_DEBUG}${GTEST_TR1_SILENCER}
 		-DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
 		-DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
 	)


Bump minimum version of TelepathyQt4 required to 0.5

--- cmake/modules/FindTelepathyQt4.cmake
+++ cmake/modules/FindTelepathyQt4.cmake
@@ -17,7 +17,7 @@

 find_package(PkgConfig)
 if(PKG_CONFIG_FOUND)
-    pkg_check_modules(PC_TELEPATHY_QT4 QUIET TelepathyQt4>=0.1.9)
+    pkg_check_modules(PC_TELEPATHY_QT4 QUIET TelepathyQt4>=0.5)
 endif(PKG_CONFIG_FOUND)

 find_path(TELEPATHY_QT4_INCLUDE_DIR


Disable Vc for some old platforms

Disable Vc for some old platforms

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -63,6 +63,27 @@
   set(explicitlink_defvalue ON)
   set(cocoa_defvalue OFF)
   set(davix_defvalue OFF)
+endif()
+
+set(canBuildVC ON)
+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+    # require at least gcc 4.5
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.5)
+        message("GCC version must be at least 4.5!")
+	set(canBuildVC OFF)
+    endif()
+elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+    # require at least clang 4.0
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0)
+	set(canBuildVC OFF)
+        message("Clang version must be at least 4.0 to build Vc!")
+    endif()
+elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+    # require at least MSVC 2010 (corresponding number is 1600)
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 1600)
+	set(canBuildVC OFF)
+        message("MSVC version must be at least 2010 to build Vc!")
+    endif()
 endif()

 ROOT_BUILD_OPTION(afdsmgrd OFF "Dataset manager for PROOF-based analysis facilities")
@@ -141,7 +162,9 @@
 ROOT_BUILD_OPTION(table OFF "Build libTable contrib library")
 ROOT_BUILD_OPTION(tmva ON "Build TMVA multi variate analysis library")
 ROOT_BUILD_OPTION(unuran OFF "UNURAN - package for generating non-uniform random numbers")
+if (canBuildVC)
 ROOT_BUILD_OPTION(vc OFF "Vc adds a few new types for portable and intuitive SIMD programming")
+endif()
 ROOT_BUILD_OPTION(vdt OFF "VDT adds a set of fast and vectorisable mathematical functions")
 ROOT_BUILD_OPTION(winrtdebug OFF "Link against the Windows debug runtime library")
 ROOT_BUILD_OPTION(xft ON "Xft support (X11 antialiased fonts)")
@@ -165,7 +188,9 @@
  set(minuit2 ON CACHE BOOL "" FORCE)
  set(table   ON CACHE BOOL "" FORCE)
  set(unuran  ON CACHE BOOL "" FORCE)
- set(vc      ON CACHE BOOL "" FORCE)
+ if(canBuildVC)
+	set(vc      ON CACHE BOOL "" FORCE)
+ endif()
  set(vdt     ON CACHE BOOL "" FORCE)
 endif()


Fix root path to retrieve VTK6 files

Fix root path to retrieve VTK6 files

VTK6 will need to get the hierarchy three levels up.
VTK_ROOT should be retrieved "/VTK" finally.
VTK_DIR is different path by VTK version.
* VTK6 : "/VTK/lib/cmake/vtk-6.x"
* VTK5 : "/VTK/lib/vtk-5.x"

--- cmake/pcl_all_in_one_installer.cmake
+++ cmake/pcl_all_in_one_installer.cmake
@@ -10,6 +10,9 @@
     get_filename_component(FLANN_ROOT "${FLANN_INCLUDE_DIRS}" PATH)
     get_filename_component(VTK_ROOT "${VTK_DIR}" PATH)
     get_filename_component(VTK_ROOT "${VTK_ROOT}" PATH)
+    if(${VTK_MAJOR_VERSION} GREATER 5)
+        get_filename_component(VTK_ROOT "${VTK_ROOT}" PATH)
+    endif()
     set(PCL_3RDPARTY_COMPONENTS)
     foreach(dep Eigen Boost Qhull FLANN VTK)
         string(TOUPPER ${dep} DEP)


check for 32bit in build all configuration and disable python and numpy

--- CMake/BuildConfigurations/All.cmake
+++ CMake/BuildConfigurations/All.cmake
@@ -8,10 +8,18 @@
   )
 endif()

+set(_python_excludes )
+
+if(NOT (CMAKE_SIZEOF_VOID_P EQUAL 8) )
+  set(_python_excludes
+    Python
+    Numpy
+   )
+endif()
+
 set(_package_excludes
   ${_apple_package_excludes}
-  Python
-  Numpy
+  ${_python_excludes}
   OpenCL
   SYSTEM_Boost
   Boost_LIBRARIES


Issue #51: Set OPENCV_PYTHON_SKIP_DETECTION as OpenCV seems to correctly detect Python stuff, and then call CMake which sets things incorrectly.

--- CMake/ExternalProjects/OpenCV.cmake
+++ CMake/ExternalProjects/OpenCV.cmake
@@ -54,6 +54,7 @@
     -DWITH_OPENNI2:BOOL=OFF
     -DWITH_OPENVX:BOOL=OFF
     -DENABLE_PRECOMPILED_HEADERS:BOOL=OFF
+    -DOPENCV_PYTHON_SKIP_DETECTION:BOOL=ON
   )
   if (NOT APPLE)
     list(APPEND _vtk_options


Fix install of tools PDBs in debug mode

Fix install of tools PDBs in debug mode

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -363,7 +363,7 @@
     ogre_install_target(${TOOLNAME} "" FALSE)
     if (OGRE_INSTALL_PDB)
       # install debug pdb files
-      install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_DEBUG_PATH}/${TOOLNAME}.pdb
+      install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_DEBUG_PATH}/${TOOLNAME}_d.pdb
         DESTINATION bin${OGRE_DEBUG_PATH}
         CONFIGURATIONS Debug
         )


MDEV-12328, added building of AWS for release builds

--- cmake/build_configurations/mysql_release.cmake
+++ cmake/build_configurations/mysql_release.cmake
@@ -27,7 +27,10 @@
 IF(SIZEOF_VOIDP EQUAL 8)
   SET(64BIT 1)
 ENDIF()
-
+
+# include aws_key_management plugin in release builds
+SET(PLUGIN_AWS_KEY_MANAGEMENT DYNAMIC)
+
 SET(FEATURE_SET "community" CACHE STRING
 " Selection of features. Options are
  - xsmall :


fixed cmake linker errors appearing on cmake 3.4.1, need to verify compatibility with earlier versions

--- BasisProject.cmake
+++ BasisProject.cmake
@@ -106,7 +106,7 @@
     ZeroMQ
 	AZMQ
 	FlatBuffers
-	Boost{program_options,filesystem,unit_test_framework,system}
+	Boost{program_options,filesystem,unit_test_framework,system,log}
 	Eigen3
     #<dependency>
   OPTIONAL_DEPENDS


GC HAVE_PRINTF_A, HAVE_STD_ISINF_IN_CMATH and HAVE_STD_ISNAN_IN_CMATH

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@282789 91177308-0d34-0410-b5e6-96231b3b80d8

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -188,9 +188,6 @@
 /* Define to 1 if you have the `pread' function. */
 #cmakedefine HAVE_PREAD ${HAVE_PREAD}

-/* Define to have the %a format string */
-#undef HAVE_PRINTF_A
-
 /* Have pthread_getspecific */
 #cmakedefine HAVE_PTHREAD_GETSPECIFIC ${HAVE_PTHREAD_GETSPECIFIC}

@@ -223,12 +220,6 @@

 /* Define to 1 if you have the <stdint.h> header file. */
 #cmakedefine HAVE_STDINT_H ${HAVE_STDINT_H}
-
-/* Set to 1 if the std::isinf function is found in <cmath> */
-#undef HAVE_STD_ISINF_IN_CMATH
-
-/* Set to 1 if the std::isnan function is found in <cmath> */
-#undef HAVE_STD_ISNAN_IN_CMATH

 /* Define to 1 if you have the `strdup' function. */
 #cmakedefine HAVE_STRDUP ${HAVE_STRDUP}


Update git tag

Update git tag

--- vtkTriangleDelaunay2D.remote.cmake
+++ vtkTriangleDelaunay2D.remote.cmake
@@ -6,5 +6,5 @@
   "2D Delaunay triangulation using Shewchuk's Triangle"
   GIT_REPOSITORY https://github.com/jpouderoux/vtkTriangleDelaunay2D
   # June 15, 2016 - first working as a remote module
-  GIT_TAG cbf32b0370e2c3f0adde783e4a9c9a87e5b50be0
+  GIT_TAG 0960de5c96f1953603dd297f15c741dfd72953ba
   )


- solved problem with VS 2015

- solved problem with VS 2015

--- CMake/Common.cmake
+++ CMake/Common.cmake
@@ -11,7 +11,7 @@
 if (WIN32)
     set(CMAKE_USE_RELATIVE_PATHS "1")
     # Set compiler flags for "release"
-    set(CMAKE_CXX_FLAGS_RELEASE "/MD /Ox /Ob2 /Oi /Ot /GL /D NDEBUG /openmp")
+    set(CMAKE_CXX_FLAGS_RELEASE "/MD /EHsc /Ox /Ob2 /Oi /Ot /GL /D NDEBUG /openmp")
     set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/INCREMENTAL:NO /LTCG")
 	set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "/INCREMENTAL:NO /LTCG")
 	set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "/INCREMENTAL:NO /LTCG")


Fix undefined references when building with SZ

--- cmake/FindSZ.cmake
+++ cmake/FindSZ.cmake
@@ -53,6 +53,7 @@
       add_library(SZ::SZ UNKNOWN IMPORTED)
       set_target_properties(SZ::SZ PROPERTIES
         IMPORTED_LOCATION             "${SZ_LIBRARY}"
+        INTERFACE_LINK_LIBRARIES      "${ZLIB_LIBRARY}"
         INTERFACE_INCLUDE_DIRECTORIES "${SZ_INCLUDE_DIR}"
       )
     endif()


fix cmake function parsing

fix cmake function parsing

--- cmake/Macros.cmake
+++ cmake/Macros.cmake
@@ -23,7 +23,7 @@

 # Function to compile the shaders and generate a C++ source file to include
 function(compile_shader)
-    cmake_parse_arguments(SHADER "" "OUTPUT VERSION" "SOURCES" ${ARGN})
+    cmake_parse_arguments(SHADER "" "OUTPUT;VERSION" "SOURCES" ${ARGN})

     if (NOT DEFINED GLSL_VALIDATOR)
       vortex2d_find_program(GLSL_VALIDATOR glslangValidator hints "$ENV{VULKAN_SDK}/Bin")


Minor cleaning up (#57).

Minor cleaning up (#57).

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -12,7 +12,7 @@
         #       code which is /W3 and which is also what CMake uses by
         #       default...

-        SET(LINK_FLAGS_PROPERTIES "${LINK_FLAGS_PROPERTIES} /STACK:10000000 /machine:X86")
+        SET(LINK_FLAGS_PROPERTIES "${LINK_FLAGS_PROPERTIES} /STACK:10000000 /MACHINE:X86")
     ELSE()
         SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror")
     ENDIF()


cmake: Use virtualenv instead of venv

cmake: Use virtualenv instead of venv

windows runner fail when using venv...

--- cmake/python.cmake
+++ cmake/python.cmake
@@ -272,12 +272,15 @@
 ##  Python Test  ##
 ###################
 if(BUILD_TESTING)
-  search_python_internal_module(NAME venv)
+  search_python_module(NAME virtualenv PACKAGE virtualenv)
+  # venv not working on github runners
+  # search_python_internal_module(NAME venv)
   # Testing using a vitual environment
-  set(VENV_EXECUTABLE ${Python3_EXECUTABLE} -m venv)
+  set(VENV_EXECUTABLE ${Python3_EXECUTABLE} -m virtualenv)
+  #set(VENV_EXECUTABLE ${Python3_EXECUTABLE} -m venv)
   set(VENV_DIR ${CMAKE_CURRENT_BINARY_DIR}/python/venv)
   if(WIN32)
-    set(VENV_Python3_EXECUTABLE "${VENV_DIR}\\Scripts\\python.exe")
+    set(VENV_Python3_EXECUTABLE ${VENV_DIR}/Scripts/python.exe)
   else()
     set(VENV_Python3_EXECUTABLE ${VENV_DIR}/bin/python)
   endif()
@@ -285,7 +288,8 @@
   add_custom_command(TARGET python_package POST_BUILD
     # Clean previous install otherwise pip install may do nothing
     COMMAND ${CMAKE_COMMAND} -E remove_directory ${VENV_DIR}
-    COMMAND ${VENV_EXECUTABLE} ${VENV_DIR}
+    COMMAND ${VENV_EXECUTABLE} -p ${Python3_EXECUTABLE} ${VENV_DIR}
+    #COMMAND ${VENV_EXECUTABLE} ${VENV_DIR}
     # Must NOT call it in a folder containing the setup.py otherwise pip call it
     # (i.e. "python setup.py bdist") while we want to consume the wheel package
     COMMAND ${VENV_Python3_EXECUTABLE} -m pip install --find-links=${CMAKE_CURRENT_BINARY_DIR}/python/dist ${PYTHON_PROJECT}


COMP: use sse2 on *nix (ITK)

COMP: use sse2 on *nix (ITK)


SuperBuild: fix configure list QT5

SuperBuild: fix configure list QT5

--- SuperBuild/CMake/External_qt5.cmake
+++ SuperBuild/CMake/External_qt5.cmake
@@ -81,15 +81,7 @@
   -skip qtsensors  \
   -skip qtserialbus  \
   -skip qtserialport  \
-  -skip qtspeech hasing  \
-  -skip qtquickcontrols  \
-  -skip qtquickcontrols2  \
-  -skip qtremoteobjects  \
-  -skip qtscript  \
-  -skip qtsensors  \
-  -skip qtserialbus  \
-  -skip qtserialport  \
-  -skip qtspeech  \
+  -skip qtspeech \
   -skip qtsvg  \
   -skip qttools  \
   -skip qttranslations  \


Mostly aesthetics

Mostly aesthetics

--- scripts/PythonPackage.cmake
+++ scripts/PythonPackage.cmake
@@ -4,8 +4,9 @@
 # First check for python executable
 include(FindPackageHandleStandardArgs)
 include(Utilities)
+include(CMakeParseArguments)
+
 find_package(PythonInterp REQUIRED)
-include(CMakeParseArguments)

 function(_python_executable OUTVAR)
     cmake_parse_arguments(PYEXEC "LOCAL" "PYTHON_EXECUTABLE" "" ${ARGN})


fmu-v5_optimized: disable bl_update

fmu-v5_optimized: disable bl_update

to reduce FLASH usage

--- boards/px4/fmu-v5/optimized.cmake
+++ boards/px4/fmu-v5/optimized.cmake
@@ -85,7 +85,7 @@
 		#vmount
 		vtol_att_control
 	SYSTEMCMDS
-		bl_update
+		#bl_update
 		config
 		dmesg
 		dumpfile


Turning off python  binding build for windows to fix master link break in Win8

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -89,23 +89,24 @@
 endif()
 include (FindPythonInterp)
 else()
+	#turning off until link issues resolved with win8 batlab machine
 	#only for Visual Studio 2012
-	if(NOT (MSVC_VERSION LESS 1700))
-		message(STATUS "Searching for python installation")
+	#if(NOT (MSVC_VERSION LESS 1700))
+		#message(STATUS "Searching for python installation")
 		#set(Python_ADDITIONAL_VERSIONS 2.7 2.6)
-		find_package(PythonLibs 2.7)
-	  	if(NOT PYTHONLIBS_FOUND)
-	  		message(STATUS "PYTHONLIBS NOT FOUND")
-	  	else()
-		    find_package(PythonInterp)
-		    if(PYTHONINTERP_FOUND)
-		    	execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import sys;sys.stdout.write(sys.version[:3])" OUTPUT_VARIABLE PYTHON_VERSION)
-		    	message(STATUS "Found Python interpreter version ${PYTHON_VERSION}")
-		    	execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import sys;sys.stdout.write(sys.prefix)" OUTPUT_VARIABLE PYTHON_PREFIX)
-		    	set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${PYTHON_PREFIX})
-		 	endif()
- 		endif()
- 	endif()
+		#find_package(PythonLibs 2.7)
+	  	#if(NOT PYTHONLIBS_FOUND)
+	  		#message(STATUS "PYTHONLIBS NOT FOUND")
+	  	#else()
+		    #find_package(PythonInterp)
+		    #if(PYTHONINTERP_FOUND)
+		    	#execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import sys;sys.stdout.write(sys.version[:3])" OUTPUT_VARIABLE PYTHON_VERSION)
+		    	#message(STATUS "Found Python interpreter version ${PYTHON_VERSION}")
+		    	#execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import sys;sys.stdout.write(sys.prefix)" OUTPUT_VARIABLE PYTHON_PREFIX)
+		    	#set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${PYTHON_PREFIX})
+		 	#endif()
+ 		#endif()
+ 	#endif()
 endif()
 include (FindThreads)
 include (GlibcDetect)


removing rocksdb cmake file

removing rocksdb cmake file

--- CMake/FindRocksDB.cmake
+++ CMake/FindRocksDB.cmake
@@ -1,16 +0,0 @@
-INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/third-party/rocksdb/include")
-include(ExternalProject)
-
-if (APPLE)
-  set(OS_ROCKSDB_INSTALL_LIB librocksdb.dylib)
-else()
-  set(OS_ROCKSDB_INSTALL_LIB librocksdb.so)
-endif()
-
-ExternalProject_Add(librocksdb
-  SOURCE_DIR "${CMAKE_SOURCE_DIR}/third-party/rocksdb"
-  CONFIGURE_COMMAND ""
-  BUILD_IN_SOURCE 1
-  BUILD_COMMAND make shared_lib && make static_lib
-  INSTALL_COMMAND sudo cp "${OS_ROCKSDB_INSTALL_LIB}" /usr/local/lib/ && sudo cp librocksdb.a /usr/local/lib/
-)


STYLE: document MIDAS_FETCH_ONLY option in the script.

SVN-Revision: 3279

--- Application/CMakeScript/MIDAS.cmake
+++ Application/CMakeScript/MIDAS.cmake
@@ -34,7 +34,7 @@
 #   if the file test.php had already existed on disk.
 #
 # NOTES:
-# * The MIDAS{} substitution method can also be passed a relative path
+# * The MIDAS*{} substitution methods can also be passed a relative path
 #   from the MIDAS_KEY_DIR to the key file, so that you can place key files
 #   in subdirectories under MIDAS_KEY_DIR. Ex: MIDAS{test1/input/foo.png.md5}
 #


Don't install sample dlls unless OGRE_INSTALL_SAMPLES is true

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

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -288,7 +288,9 @@
     # disable "lib" prefix on Unix
     set_target_properties(${SAMPLENAME} PROPERTIES PREFIX "")
   endif (CMAKE_COMPILER_IS_GNUCXX)
-  ogre_install_target(${SAMPLENAME} ${OGRE_SAMPLE_PATH} FALSE)
+  if (OGRE_INSTALL_SAMPLES)
+	ogre_install_target(${SAMPLENAME} ${OGRE_SAMPLE_PATH} FALSE)
+  endif()

 endfunction(ogre_config_sample_common)


use file(GLOB LIST_DIRECTORIES

use file(GLOB LIST_DIRECTORIES

--- ament_cmake_core/cmake/index/ament_index_get_resources.cmake
+++ ament_cmake_core/cmake/index/ament_index_get_resources.cmake
@@ -54,15 +54,14 @@
   set(all_resources "")
   foreach(path IN LISTS paths_to_search)
     set(resource_index_path "${path}/share/ament_index/resource_index")
-    # TODO use LIST_DIRECTORIES false in GLOB call when available in CMake 3.5
     file(GLOB resources
+      LIST_DIRECTORIES FALSE
       RELATIVE "${resource_index_path}/${resource_type}"
       "${resource_index_path}/${resource_type}/*")
     foreach(resource IN LISTS resources)
       string(SUBSTRING "${resource}" 0 1 resource_char0)
-      # Ignore all subdirectories, and any files starting with a dot
-      if((NOT IS_DIRECTORY "${resource_index_path}/${resource_type}/${resource}")
-        AND (NOT resource_char0 STREQUAL "."))
+      # Ignore any files starting with a dot
+      if(NOT resource_char0 STREQUAL ".")
         list_append_unique(all_resources ${resource})
       endif()
     endforeach()


Add pkg-config integration for service_discovery, making the requirement of a using_library statement in the orogen spec obsolete. service_discovery functions are now activated once the library is present in the installation.

--- lib/orogen/templates/config/Deployment.cmake
+++ lib/orogen/templates/config/Deployment.cmake
@@ -18,9 +18,14 @@
 include_directories(${Boost_INCLUDE_DIRS})
 target_link_libraries(<%= deployer.name %> ${Boost_LIBRARIES})

+pkg_check_modules(service_discovery service_discovery)
 if(service_discovery_FOUND)
     add_definitions(-DOROGEN_SERVICE_DISCOVERY_ACTIVATED)
-    message(STATUS "ServiceDiscovery library found: Integrate specific source code to deployments")
+    message(STATUS "ServiceDiscovery library found: activating service discovery functionality for tasks")
+    include_directories(${service_discovery_INCLUDE_DIRS})
+    add_definitions(${service_discovery_CFLAGS_OTHER})
+    link_directories(${service_discovery_LIBRARY_DIRS})
+    target_link_libraries(<%= deployer.name %> ${service_discovery_LIBRARIES})
 endif()

 list(APPEND CMAKE_PREFIX_PATH ${OrocosRTT_PREFIX})


cmake: external_dependencies: add fpic option to fmt

--- cmake/external_dependencies.cmake
+++ cmake/external_dependencies.cmake
@@ -74,6 +74,10 @@
                   GIT_REPOSITORY https://github.com/fmtlib/fmt.git
                   TEST_LINK_LIBS fmt
                   )
+    get_target_property(TARGET_TYPE fmt::fmt TYPE)
+    if ("${TARGET_TYPE}" STREQUAL "SHARED_LIBRARY")
+        target_compile_options(fmt::fmt INTERFACE "-fpic")
+    endif()
 endfunction()

 function(setup_nlohmann_json)


Fixes Agent lookup

Fixes Agent lookup

svn path=/branches/work/polkit-qt-1/; revision=1034986

--- cmake/modules/FindPolkitQt1.cmake
+++ cmake/modules/FindPolkitQt1.cmake
@@ -6,6 +6,7 @@
 #  POLKITQT1_LIBRARIES - Link these to use all Polkit-qt-1 libs
 #  POLKITQT1_CORE_LIBRARY
 #  POLKITQT1_GUI_LIBRARY
+#  POLKITQT1_AGENT_LIBRARY
 #  POLKITQT1_DEFINITIONS - Compiler switches required for using Polkit-qt-1

 # Copyright (c) 2008, Adrien Bustany, <madcat@mymadcat.com>
@@ -48,14 +49,14 @@

 find_library( POLKITQT1_CORE_LIBRARY NAMES polkit-qt-core-1 )
 find_library( POLKITQT1_GUI_LIBRARY NAMES polkit-qt-gui-1 )
-find_library( POLKITQT1_GUI_LIBRARY NAMES polkit-qt-agent-1 )
+find_library( POLKITQT1_AGENT_LIBRARY NAMES polkit-qt-agent-1 )

-if (POLKITQT1_INCLUDE_DIR AND POLKITQT1_CORE_LIBRARY AND POLKITQT1_GUI_LIBRARY)
+if (POLKITQT1_INCLUDE_DIR AND POLKITQT1_CORE_LIBRARY AND POLKITQT1_GUI_LIBRARY AND POLKITQT1_AGENT_LIBRARY)
    set(POLKITQT1_FOUND TRUE)
-else (POLKITQT1_INCLUDE_DIR AND POLKITQT1_CORE_LIBRARY AND POLKITQT1_GUI_LIBRARY)
+else (POLKITQT1_INCLUDE_DIR AND POLKITQT1_CORE_LIBRARY AND POLKITQT1_GUI_LIBRARY AND POLKITQT1_AGENT_LIBRARY)
    set(POLKITQT1_FOUND FALSE)
-endif (POLKITQT1_INCLUDE_DIR AND POLKITQT1_CORE_LIBRARY AND POLKITQT1_GUI_LIBRARY)
+endif (POLKITQT1_INCLUDE_DIR AND POLKITQT1_CORE_LIBRARY AND POLKITQT1_GUI_LIBRARY AND POLKITQT1_AGENT_LIBRARY)

 set(POLKITQT1_LIBRARIES ${POLKITQT1_CORE_LIBRARY} ${POLKITQT1_GUI_LIBRARY} ${POLKITQT1_AGENT_LIBRARY})


Fix for ROOT-7788 - cmake build system disallow use of + character in build directory name

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -485,9 +485,11 @@
       set(obj ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}.build/${CMAKE_CFG_INTDIR}/${library}.build/Objects-normal/x86_64/${name}${CMAKE_CXX_OUTPUT_EXTENSION})
     else()
       if(IS_ABSOLUTE ${s})
-        if(${s} MATCHES ${CMAKE_CURRENT_SOURCE_DIR})
+        string(REGEX REPLACE "([][.?*+|()$^-])" "\\\\\\1" escaped_source_dir "${CMAKE_CURRENT_SOURCE_DIR}")
+        string(REGEX REPLACE "([][.?*+|()$^-])" "\\\\\\1" escaped_binary_dir "${CMAKE_CURRENT_BINARY_DIR}")
+        if(${s} MATCHES "^${escaped_source_dir}")
           string(REPLACE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${library}.dir src ${s})
-        elseif(${s} MATCHES ${CMAKE_CURRENT_BINARY_DIR})
+        elseif(${s} MATCHES "^${escaped_binary_dir}")
           string(REPLACE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${library}.dir src ${s})
         else()
           #message(WARNING "Unknown location of source ${s} for object library ${library}")


FIX (#4432): only use Bundle / .app path on Apple

--- CMake/CoreHelpers.cmake
+++ CMake/CoreHelpers.cmake
@@ -464,15 +464,15 @@
 FOREACH(_target ${_install_EXECUTABLES})

 GET_TARGET_PROPERTY(_is_bundle ${_target} MACOSX_BUNDLE)
-IF(_is_bundle)
+IF(APPLE AND _is_bundle)
   SET(_target_location ${CMAKE_INSTALL_PREFIX}/${_target}.app)
   SET(plugin_dest_dir ${_target}.app/Contents/MacOS)
   SET(qtconf_dest_dir ${_target}.app/Contents/Resources)
-ELSE(_is_bundle)
+ELSE()
   SET(_target_location ${CMAKE_INSTALL_PREFIX}/bin/${_target})
   SET(plugin_dest_dir bin)
   SET(qtconf_dest_dir bin)
-ENDIF(_is_bundle)
+ENDIF()

 IF(QT_PLUGINS_DIR)
   INSTALL(DIRECTORY "${QT_PLUGINS_DIR}" DESTINATION ${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir} COMPONENT Runtime)


BUG: FindJsonCpp wrong library identifier.

libjson.so is provided by the json-c project, not JsonCpp.

Also fix find_package_handle_standard_args variables.

Change-Id: Ia335dfc73f9651ef5ced017ddb4d151b7c7687f5

--- CMake/FindJsonCpp.cmake
+++ CMake/FindJsonCpp.cmake
@@ -33,7 +33,7 @@
   HINTS ${JsonCpp_INCLUDEDIR} ${PC_JsonCpp_INCLUDEDIR} ${PC_JsonCpp_INCLUDE_DIRS}
   PATH_SUFFIXES jsoncpp )

-find_library( JsonCpp_LIBRARY NAMES json jsoncpp libjson libjsoncpp
+find_library( JsonCpp_LIBRARY NAMES jsoncpp libjsoncpp
   HINTS ${JsonCpp_LIBDIR} ${PC_JsonCpp_LIBDIR} ${PC_JsonCpp_LIBRARY_DIRS} )

 set( JsonCpp_INCLUDE_DIRS ${JsonCpp_INCLUDE_DIR} )
@@ -41,7 +41,7 @@

 include( FindPackageHandleStandardArgs )

-find_package_handle_standard_args( JsonCpp DEFAULT_MSG JsonCpp_LIBRARY
-  JsonCpp_INCLUDE_DIR )
+find_package_handle_standard_args( JsonCpp DEFAULT_MSG JsonCpp_LIBRARIES
+  JsonCpp_INCLUDE_DIRS )

 mark_as_advanced( JsonCpp_INCLUDE_DIR JsonCpp_LIBRARY )


ENH: keep only integer types - that's a binary filter.

--- Wrapping/WrapITK/Modules/Review/wrap_itkBinaryProjectionImageFilter.cmake
+++ Wrapping/WrapITK/Modules/Review/wrap_itkBinaryProjectionImageFilter.cmake
@@ -2,7 +2,7 @@
   WRAP_IMAGE_FILTER_SCALAR(2)

   # reduce the output dimension by 1, if possible
-  FOREACH(t ${WRAP_ITK_SCALAR})
+  FOREACH(t ${WRAP_ITK_INT})
     FOREACH(d ${WRAP_ITK_DIMS})
       DECREMENT(d1 ${d})
       FILTER_DIMS(d2 "${d1}")


armadillo openblas wrapper

armadillo openblas wrapper

--- include/pass_bits/config.hpp.cmake
+++ include/pass_bits/config.hpp.cmake
@@ -2,6 +2,7 @@

 // Armadillo
 #define ARMA_DONT_PRINT_ERRORS
+#define ARMA_USE_WRAPPER
 #define ARMA_USE_CXX11
 #include <armadillo>
 #include <cblas.h>


CUDA uses Win32 to store 32 bit libraries

--- src/FindOpenCL.cmake
+++ src/FindOpenCL.cmake
@@ -85,7 +85,7 @@
             ${OPENCL_ROOT}/lib
             ENV AMDAPPSDKROOT/lib
 		DOC "OpenCL dynamic library path"
-		PATH_SUFFIXES x86
+		PATH_SUFFIXES x86 Win32
 	)
 endif( )
 mark_as_advanced( OPENCL_LIBRARIES )


Fix indentation whitespaces

Fix indentation whitespaces

--- cmake/FindCAF.cmake
+++ cmake/FindCAF.cmake
@@ -83,8 +83,8 @@
       endif ()
       find_library(CAF_LIBRARY_${UPPERCOMP}
                    NAMES
-                    "caf_${comp}"
-		      "caf_${comp}_static"
+                     "caf_${comp}"
+                     "caf_${comp}_static"
                    HINTS
                      ${library_hints}
                      /usr/lib


Added hardcoded paths to Qwt finder.

Added hardcoded paths to Qwt finder.

--- cmake/FindQwt.cmake
+++ cmake/FindQwt.cmake
@@ -47,6 +47,7 @@
   NAMES qwt_plot.h
   HINTS ${QT_INCLUDE_DIR}
   PATH_SUFFIXES qwt qwt-qt3 qwt-qt4 qwt-qt5
+  PATHS /usr/local/qwt-6.1.0/include
 )

 set ( QWT_INCLUDE_DIRS ${QWT_INCLUDE_DIR} )
@@ -82,6 +83,7 @@
 find_library ( QWT_LIBRARY
   NAMES qwt qwt-qt3 qwt-qt4 qwt-qt5
   HINTS ${QT_LIBRARY_DIR}
+  PATHS /usr/local/qwt-6.1.0/lib
 )

 set ( QWT_LIBRARIES ${QWT_LIBRARY} )


CMake fix for older TBB

CMake fix for older TBB

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -52,7 +52,7 @@
 # TBB_LIBRARIES, the libraries to link against to use TBB.
 # TBB_DEBUG_LIBRARIES, the libraries to link against to use TBB with debug symbols.
 # TBB_FOUND, If false, don't try to use TBB.
-# TBB_INTERFACE_VERSION, as defined in tbb/version.h
+# TBB_INTERFACE_VERSION, as defined in tbb/version.h or (oder versions) tbb/tbb_stddef.h

 if (WIN32)
@@ -278,7 +278,12 @@

 if (TBB_FOUND)
   set(TBB_INTERFACE_VERSION 0)
-  FILE(READ "${TBB_INCLUDE_DIRS}/tbb/version.h" _TBB_VERSION_CONTENTS)
+  if (EXISTS "${TBB_INCLUDE_DIRS}/tbb/version.h")
+    FILE(READ "${TBB_INCLUDE_DIRS}/tbb/version.h" _TBB_VERSION_CONTENTS)
+  else()
+    # Older TBB versions use tbb_stddef.h for that
+    FILE(READ "${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h" _TBB_VERSION_CONTENTS)
+  endif()
   STRING(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_TBB_VERSION_CONTENTS}")
   set(TBB_INTERFACE_VERSION "${TBB_INTERFACE_VERSION}")
 endif (TBB_FOUND)


Actually fix proto issue

Actually fix proto issue

--- cmake/Util/Op.cmake
+++ cmake/Util/Op.cmake
@@ -24,22 +24,27 @@

   include_directories("${CMAKE_CURRENT_BINARY_DIR}")

+  find_package(SaneProtobuf REQUIRED)
+
   # Build protobuf files if they exist
   if(NOT("${args_PROTO_SRC}" STREQUAL ""))
-    find_package(SaneProtobuf REQUIRED)
     set(PROTOBUF_IMPORT_DIRS "${SCANNER_PATH}")
     protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS OFF ${args_PROTO_SRC})
     protobuf_generate_python(PROTO_PY OFF ${args_PROTO_SRC})
     add_custom_target(${args_LIB_NAME}_proto_files
       DEPENDS ${PROTO_HDRS} ${PROTO_PY})
     add_library(${args_LIB_NAME} SHARED ${args_CPP_SRCS} ${PROTO_SRCS})
-    target_include_directories(${args_LIB_NAME} PUBLIC "${PROTOBUF_INCLUDE_DIRS}")
     target_link_libraries(${args_LIB_NAME} PUBLIC "${PROTOBUF_LIBRARY}")
     add_dependencies(${args_LIB_NAME} ${args_LIB_NAME}_proto_files)
     install(FILES ${PROTO_HDRS} ${PROTO_PY} DESTINATION .)
   else()
     add_library(${args_LIB_NAME} SHARED ${args_CPP_SRCS})
   endif()
+
+  # Note: this has to be done even if the library doesn't use protobuf, since when you include
+  # Scanner, if you have multiple protobuf installations on your machine, you'll get pointed to
+  # the wrong one and including Scanner's protobuf files will fail.
+  target_include_directories(${args_LIB_NAME} PUBLIC "${PROTOBUF_INCLUDE_DIRS}")

   install(TARGETS ${args_LIB_NAME} DESTINATION .)


Fix lapacke copying

Fix lapacke copying

--- cmake/lapacke.cmake
+++ cmake/lapacke.cmake
@@ -2391,6 +2391,6 @@
 endforeach ()

 set(lapacke_include_dir "${NETLIB_LAPACK_DIR}/LAPACKE/include")
-execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${lapacke_include_dir}/lapacke_mangling_with_flags.h.in" "${lapacke_include_dir}/lapacke_mangling.h")
+configure_file("${lapacke_include_dir}/lapacke_mangling_with_flags.h.in" "${lapacke_include_dir}/lapacke_mangling.h" COPYONLY)
 include_directories(${lapacke_include_dir})
 set_source_files_properties(${LAPACKE_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_CFLAGS}")


AVX512 support

AVX512 support

--- Plugin/cmake/ISPC.cmake
+++ Plugin/cmake/ISPC.cmake
@@ -47,11 +47,12 @@
             ${object}
             "${arg_OUTDIR}/${name}_sse4${CMAKE_CXX_OUTPUT_EXTENSION}"
             "${arg_OUTDIR}/${name}_avx${CMAKE_CXX_OUTPUT_EXTENSION}"
+            "${arg_OUTDIR}/${name}_avx512skx${CMAKE_CXX_OUTPUT_EXTENSION}"
         )
         set(outputs ${header} ${objects})
         add_custom_command(
             OUTPUT ${outputs}
-            COMMAND ${ISPC} ${source} -o ${object} -h ${header} --pic --target=sse4,avx --arch=x86-64 --opt=fast-masked-vload --opt=fast-math
+            COMMAND ${ISPC} ${source} -o ${object} -h ${header} --pic --target=sse4-i32x4,avx1-i32x8,avx512skx-i32x16 --arch=x86-64 --opt=fast-masked-vload --opt=fast-math
             DEPENDS ${source} ${arg_HEADERS}
         )


ENH: superbuild: unused code

ENH: superbuild: unused code

--- SuperBuild/CMake/External_png.cmake
+++ SuperBuild/CMake/External_png.cmake
@@ -21,21 +21,6 @@

   ADD_SUPERBUILD_CMAKE_VAR(ZLIB_INCLUDE_DIR)
   ADD_SUPERBUILD_CMAKE_VAR(ZLIB_LIBRARY)
-
-  if(USE_SYSTEM_ZLIB)
-    set(PNG_SB_ZLIB_CONFIG)
-  else()
-    if(MSVC)
-      set(PNG_SB_ZLIB_CONFIG
-        -DZLIB_INCLUDE_DIR:PATH=${SB_INSTALL_PREFIX}/include
-        -DZLIB_LIBRARY:FILEPATH=${SB_INSTALL_PREFIX}/lib/zlib.lib)
-    else(UNIX)
-      set(PNG_SB_ZLIB_CONFIG
-        -DZLIB_INCLUDE_DIR:PATH=${SB_INSTALL_PREFIX}/include
-        -DZLIB_LIBRARY:FILEPATH=${SB_INSTALL_PREFIX}/lib/libz${CMAKE_SHARED_LIBRARY_SUFFIX})
-    endif()
-    list(APPEND ${proj}_DEPENDENCIES ZLIB)
-  endif()

     ExternalProject_Add(${proj}
       PREFIX ${proj}


Re-add /fp:strict for MSVC builds

Re-add /fp:strict for MSVC builds

--- Source/cmake_core.cmake
+++ Source/cmake_core.cmake
@@ -118,6 +118,7 @@

             # MSVC compiler defines
             $<$<CXX_COMPILER_ID:MSVC>:/EHsc>
+            $<$<CXX_COMPILER_ID:MSVC>:/fp:strict>
             $<$<CXX_COMPILER_ID:MSVC>:/wd4324>

             # G++ and Clang++ compiler defines


fbcode_builder: add a license header to FBBuildOptions.cmake

Summary:
Add a license header to satisfy the open source linter. Use the same
header the other .cmake files have.

Reviewed By: mhlakhani

Differential Revision: D17404782

fbshipit-source-id: 66679d72c9e680f8bb8b27869e981a046b3520cf

--- build/fbcode_builder/CMake/FBBuildOptions.cmake
+++ build/fbcode_builder/CMake/FBBuildOptions.cmake
@@ -1,3 +1,5 @@
+# Copyright (c) Facebook, Inc. and its affiliates.
+
 function (fb_activate_static_library_option)
   option(USE_STATIC_DEPS_ON_UNIX
     "If enabled, use static dependencies on unix systems. This is generally discouraged."