COMP: Ensure that CMAKE_CFG_INTDIR is used in the exe paths.

--- vtkGenerateVTKConfig.cmake
+++ vtkGenerateVTKConfig.cmake
@@ -98,21 +98,21 @@
 SET(VTK_WRAP_TCL_EXE_CONFIG "")
 SET(VTK_WRAP_TCL_INIT_EXE_CONFIG "")
 IF(VTK_WRAP_TCL)
-  SET(VTK_WRAP_TCL_EXE_CONFIG ${EXECUTABLE_OUTPUT_PATH}/vtkWrapTcl${VTK_EXE_EXT})
-  SET(VTK_WRAP_TCL_INIT_EXE_CONFIG ${EXECUTABLE_OUTPUT_PATH}/vtkWrapTclInit${VTK_EXE_EXT})
+  SET(VTK_WRAP_TCL_EXE_CONFIG ${VTK_EXECUTABLE_DIR}/vtkWrapTcl${VTK_EXE_EXT})
+  SET(VTK_WRAP_TCL_INIT_EXE_CONFIG ${VTK_EXECUTABLE_DIR}/vtkWrapTclInit${VTK_EXE_EXT})
   SET(VTK_TCL_HOME_CONFIG ${VTK_TCL_HOME})
 ENDIF(VTK_WRAP_TCL)
 IF(VTK_WRAP_PYTHON)
   SET(VTK_PYTHONPATH_DIRS_CONFIG ${VTK_BINARY_DIR}/Wrapping/Python ${LIBRARY_OUTPUT_PATH})
-  SET(VTK_WRAP_PYTHON_EXE_CONFIG ${EXECUTABLE_OUTPUT_PATH}/vtkWrapPython${VTK_EXE_EXT})
-  SET(VTK_WRAP_PYTHON_INIT_EXE_CONFIG ${EXECUTABLE_OUTPUT_PATH}/vtkWrapPythonInit${VTK_EXE_EXT})
+  SET(VTK_WRAP_PYTHON_EXE_CONFIG ${VTK_EXECUTABLE_DIR}/vtkWrapPython${VTK_EXE_EXT})
+  SET(VTK_WRAP_PYTHON_INIT_EXE_CONFIG ${VTK_EXECUTABLE_DIR}/vtkWrapPythonInit${VTK_EXE_EXT})
 ENDIF(VTK_WRAP_PYTHON)
 IF(VTK_WRAP_JAVA)
-  SET(VTK_PARSE_JAVA_EXE_CONFIG ${EXECUTABLE_OUTPUT_PATH}/vtkParseJava${VTK_EXE_EXT})
-  SET(VTK_WRAP_JAVA_EXE_CONFIG ${EXECUTABLE_OUTPUT_PATH}/vtkWrapJava${VTK_EXE_EXT})
+  SET(VTK_PARSE_JAVA_EXE_CONFIG ${VTK_EXECUTABLE_DIR}/vtkParseJava${VTK_EXE_EXT})
+  SET(VTK_WRAP_JAVA_EXE_CONFIG ${VTK_EXECUTABLE_DIR}/vtkWrapJava${VTK_EXE_EXT})
   SET(VTK_JAVA_JAR_CONFIG ${LIBRARY_OUTPUT_PATH}/vtk.jar)
 ENDIF(VTK_WRAP_JAVA)
-SET(VTK_ENCODESTRING_EXE_CONFIG ${EXECUTABLE_OUTPUT_PATH}/vtkEncodeString${VTK_EXE_EXT})
+SET(VTK_ENCODESTRING_EXE_CONFIG ${VTK_EXECUTABLE_DIR}/vtkEncodeString${VTK_EXE_EXT})
 # VTK style script locations.
 SET(VTK_DOXYGEN_HOME_CONFIG ${VTK_SOURCE_DIR}/Utilities/Doxygen)
 SET(VTK_HEADER_TESTING_PY_CONFIG ${VTK_SOURCE_DIR}/Common/Testing/HeaderTesting.py)


added coverage support for clang/mac

added coverage support for clang/mac

--- contrib/CodeCoverage.cmake
+++ contrib/CodeCoverage.cmake
@@ -21,9 +21,9 @@
         MESSAGE(FATAL_ERROR "gcov not found! Aborting...")
 ENDIF() # NOT GCOV_PATH

-IF(NOT CMAKE_COMPILER_IS_GNUCXX)
-        MESSAGE(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
-ENDIF() # NOT CMAKE_COMPILER_IS_GNUCXX
+IF(NOT CMAKE_COMPILER_IS_GNUCXX AND NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+        MESSAGE(FATAL_ERROR "Compiler is not GNU gcc or clang! Aborting...")
+ENDIF() # NOT CMAKE_COMPILER_IS_GNUCXX AND NOT CLANG

 IF ( NOT CMAKE_BUILD_TYPE STREQUAL "Debug" )
   MESSAGE( WARNING "Code coverage results with an optimised (non-Debug) build may be misleading" )
@@ -31,9 +31,16 @@

 # Setup compiler options
-ADD_DEFINITIONS(-fprofile-arcs -ftest-coverage)
-LINK_LIBRARIES(gcov)
+IF(CMAKE_COMPILER_IS_GNUCXX)
+  ADD_DEFINITIONS(-fprofile-arcs -ftest-coverage)
+  LINK_LIBRARIES(gcov)
+ENDIF()

+IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+  ADD_DEFINITIONS("--coverage")
+  SET( CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} --coverage" )
+  SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_INIT} --coverage" )
+ENDIF()

 # Param _targetname     The name of new the custom make target
 # Param _testrunner     The name of the target which runs the tests


FFmpeg: fix build, finally remove pkg-config patch

--- packages/ffmpeg.cmake
+++ packages/ffmpeg.cmake
@@ -19,7 +19,6 @@
 #     GIT_REPOSITORY "git://source.ffmpeg.org/ffmpeg.git"
     GIT_REPOSITORY "git://github.com/FFmpeg/FFmpeg.git"
     UPDATE_COMMAND ""
-    PATCH_COMMAND ${EXEC} git am ${CMAKE_CURRENT_SOURCE_DIR}/ffmpeg-*.patch
     CONFIGURE_COMMAND ${EXEC} <SOURCE_DIR>/configure
     --cross-prefix=${TARGET_ARCH}-
     --prefix=${MINGW_INSTALL_PREFIX}


FindPackageHandleStandardArgs now can be used with pre CMake 3.0

--- CMake/NewCMake/FindPackageHandleStandardArgs.cmake
+++ CMake/NewCMake/FindPackageHandleStandardArgs.cmake
@@ -1,131 +1,130 @@
-#[=======================================================================[.rst:
-FindPackageHandleStandardArgs
------------------------------
-
-This module provides a function intended to be used in :ref:`Find Modules`
-implementing :command:`find_package(<PackageName>)` calls.  It handles the
-``REQUIRED``, ``QUIET`` and version-related arguments of ``find_package``.
-It also sets the ``<PackageName>_FOUND`` variable.  The package is
-considered found if all variables listed contain valid results, e.g.
-valid filepaths.
-
-.. command:: find_package_handle_standard_args
-
-  There are two signatures::
-
-    find_package_handle_standard_args(<PackageName>
-      (DEFAULT_MSG|<custom-failure-message>)
-      <required-var>...
-      )
-
-    find_package_handle_standard_args(<PackageName>
-      [FOUND_VAR <result-var>]
-      [REQUIRED_VARS <required-var>...]
-      [VERSION_VAR <version-var>]
-      [HANDLE_COMPONENTS]
-      [CONFIG_MODE]
-      [FAIL_MESSAGE <custom-failure-message>]
-      )
-
-  The ``<PackageName>_FOUND`` variable will be set to ``TRUE`` if all
-  the variables ``<required-var>...`` are valid and any optional
-  constraints are satisfied, and ``FALSE`` otherwise.  A success or
-  failure message may be displayed based on the results and on
-  whether the ``REQUIRED`` and/or ``QUIET`` option was given to
-  the :command:`find_package` call.
-
-  The options are:
-
-  ``(DEFAULT_MSG|<custom-failure-message>)``
-    In the simple signature this specifies the failure message.
-    Use ``DEFAULT_MSG`` to ask for a default message to be computed
-    (recommended).  Not valid in the full signature.
-
-  ``FOUND_VAR <result-var>``
-    Obsolete.  Specifies either ``<PackageName>_FOUND`` or
-    ``<PACKAGENAME>_FOUND`` as the result variable.  This exists only
-    for compatibility with older versions of CMake and is now ignored.
-    Result variables of both names are always set for compatibility.
-
-  ``REQUIRED_VARS <required-var>...``
-    Specify the variables which are required for this package.
-    These may be named in the generated failure message asking the
-    user to set the missing variable values.  Therefore these should
-    typically be cache entries such as ``FOO_LIBRARY`` and not output
-    variables like ``FOO_LIBRARIES``.
-
-  ``VERSION_VAR <version-var>``
-    Specify the name of a variable that holds the version of the package
-    that has been found.  This version will be checked against the
-    (potentially) specified required version given to the
-    :command:`find_package` call, including its ``EXACT`` option.
-    The default messages include information about the required
-    version and the version which has been actually found, both
-    if the version is ok or not.
-
-  ``HANDLE_COMPONENTS``
-    Enable handling of package components.  In this case, the command
-    will report which components have been found and which are missing,
-    and the ``<PackageName>_FOUND`` variable will be set to ``FALSE``
-    if any of the required components (i.e. not the ones listed after
-    the ``OPTIONAL_COMPONENTS`` option of :command:`find_package`) are
-    missing.
-
-  ``CONFIG_MODE``
-    Specify that the calling find module is a wrapper around a
-    call to ``find_package(<PackageName> NO_MODULE)``.  This implies
-    a ``VERSION_VAR`` value of ``<PackageName>_VERSION``.  The command
-    will automatically check whether the package configuration file
-    was found.
-
-  ``FAIL_MESSAGE <custom-failure-message>``
-    Specify a custom failure message instead of using the default
-    generated message.  Not recommended.
-
-Example for the simple signature:
-
-.. code-block:: cmake
-
-  find_package_handle_standard_args(LibXml2 DEFAULT_MSG
-    LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
-
-The ``LibXml2`` package is considered to be found if both
-``LIBXML2_LIBRARY`` and ``LIBXML2_INCLUDE_DIR`` are valid.
-Then also ``LibXml2_FOUND`` is set to ``TRUE``.  If it is not found
-and ``REQUIRED`` was used, it fails with a
-:command:`message(FATAL_ERROR)`, independent whether ``QUIET`` was
-used or not.  If it is found, success will be reported, including
-the content of the first ``<required-var>``.  On repeated CMake runs,
-the same message will not be printed again.
-
-Example for the full signature:
-
-.. code-block:: cmake
-
-  find_package_handle_standard_args(LibArchive
-    REQUIRED_VARS LibArchive_LIBRARY LibArchive_INCLUDE_DIR
-    VERSION_VAR LibArchive_VERSION)
-
-In this case, the ``LibArchive`` package is considered to be found if
-both ``LibArchive_LIBRARY`` and ``LibArchive_INCLUDE_DIR`` are valid.
-Also the version of ``LibArchive`` will be checked by using the version
-contained in ``LibArchive_VERSION``.  Since no ``FAIL_MESSAGE`` is given,
-the default messages will be printed.
-
-Another example for the full signature:
-
-.. code-block:: cmake
-
-  find_package(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
-  find_package_handle_standard_args(Automoc4  CONFIG_MODE)
-
-In this case, a ``FindAutmoc4.cmake`` module wraps a call to
-``find_package(Automoc4 NO_MODULE)`` and adds an additional search
-directory for ``automoc4``.  Then the call to
-``find_package_handle_standard_args`` produces a proper success/failure
-message.
-#]=======================================================================]
-
+#.rst:
+# FindPackageHandleStandardArgs
+# -----------------------------
+#
+# This module provides a function intended to be used in :ref:`Find Modules`
+# implementing :command:`find_package(<PackageName>)` calls.  It handles the
+# ``REQUIRED``, ``QUIET`` and version-related arguments of ``find_package``.
+# It also sets the ``<PackageName>_FOUND`` variable.  The package is
+# considered found if all variables listed contain valid results, e.g.
+# valid filepaths.
+#
+# .. command:: find_package_handle_standard_args
+#
+#   There are two signatures::
+#
+#     find_package_handle_standard_args(<PackageName>
+#       (DEFAULT_MSG|<custom-failure-message>)
+#       <required-var>...
+#       )
+#
+#     find_package_handle_standard_args(<PackageName>
+#       [FOUND_VAR <result-var>]
+#       [REQUIRED_VARS <required-var>...]
+#       [VERSION_VAR <version-var>]
+#       [HANDLE_COMPONENTS]
+#       [CONFIG_MODE]
+#       [FAIL_MESSAGE <custom-failure-message>]
+#       )
+#
+#   The ``<PackageName>_FOUND`` variable will be set to ``TRUE`` if all
+#   the variables ``<required-var>...`` are valid and any optional
+#   constraints are satisfied, and ``FALSE`` otherwise.  A success or
+#   failure message may be displayed based on the results and on
+#   whether the ``REQUIRED`` and/or ``QUIET`` option was given to
+#   the :command:`find_package` call.
+#
+#   The options are:
+#
+#   ``(DEFAULT_MSG|<custom-failure-message>)``
+#     In the simple signature this specifies the failure message.
+#     Use ``DEFAULT_MSG`` to ask for a default message to be computed
+#     (recommended).  Not valid in the full signature.
+#
+#   ``FOUND_VAR <result-var>``
+#     Obsolete.  Specifies either ``<PackageName>_FOUND`` or
+#     ``<PACKAGENAME>_FOUND`` as the result variable.  This exists only
+#     for compatibility with older versions of CMake and is now ignored.
+#     Result variables of both names are always set for compatibility.
+#
+#   ``REQUIRED_VARS <required-var>...``
+#     Specify the variables which are required for this package.
+#     These may be named in the generated failure message asking the
+#     user to set the missing variable values.  Therefore these should
+#     typically be cache entries such as ``FOO_LIBRARY`` and not output
+#     variables like ``FOO_LIBRARIES``.
+#
+#   ``VERSION_VAR <version-var>``
+#     Specify the name of a variable that holds the version of the package
+#     that has been found.  This version will be checked against the
+#     (potentially) specified required version given to the
+#     :command:`find_package` call, including its ``EXACT`` option.
+#     The default messages include information about the required
+#     version and the version which has been actually found, both
+#     if the version is ok or not.
+#
+#   ``HANDLE_COMPONENTS``
+#     Enable handling of package components.  In this case, the command
+#     will report which components have been found and which are missing,
+#     and the ``<PackageName>_FOUND`` variable will be set to ``FALSE``
+#     if any of the required components (i.e. not the ones listed after
+#     the ``OPTIONAL_COMPONENTS`` option of :command:`find_package`) are
+#     missing.
+#
+#   ``CONFIG_MODE``
+#     Specify that the calling find module is a wrapper around a
+#     call to ``find_package(<PackageName> NO_MODULE)``.  This implies
+#     a ``VERSION_VAR`` value of ``<PackageName>_VERSION``.  The command
+#     will automatically check whether the package configuration file
+#     was found.
+#
+#   ``FAIL_MESSAGE <custom-failure-message>``
+#     Specify a custom failure message instead of using the default
+#     generated message.  Not recommended.
+#
+# Example for the simple signature:
+#
+# .. code-block:: cmake
+#
+#   find_package_handle_standard_args(LibXml2 DEFAULT_MSG
+#     LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
+#
+# The ``LibXml2`` package is considered to be found if both
+# ``LIBXML2_LIBRARY`` and ``LIBXML2_INCLUDE_DIR`` are valid.
+# Then also ``LibXml2_FOUND`` is set to ``TRUE``.  If it is not found
+# and ``REQUIRED`` was used, it fails with a
+# :command:`message(FATAL_ERROR)`, independent whether ``QUIET`` was
+# used or not.  If it is found, success will be reported, including
+# the content of the first ``<required-var>``.  On repeated CMake runs,
+# the same message will not be printed again.
+#
+# Example for the full signature:
+#
+# .. code-block:: cmake
+#
+#   find_package_handle_standard_args(LibArchive
+#     REQUIRED_VARS LibArchive_LIBRARY LibArchive_INCLUDE_DIR
+#     VERSION_VAR LibArchive_VERSION)
+#
+# In this case, the ``LibArchive`` package is considered to be found if
+# both ``LibArchive_LIBRARY`` and ``LibArchive_INCLUDE_DIR`` are valid.
+# Also the version of ``LibArchive`` will be checked by using the version
+# contained in ``LibArchive_VERSION``.  Since no ``FAIL_MESSAGE`` is given,
+# the default messages will be printed.
+#
+# Another example for the full signature:
+#
+# .. code-block:: cmake
+#
+#   find_package(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
+#   find_package_handle_standard_args(Automoc4  CONFIG_MODE)
+#
+# In this case, a ``FindAutmoc4.cmake`` module wraps a call to
+# ``find_package(Automoc4 NO_MODULE)`` and adds an additional search
+# directory for ``automoc4``.  Then the call to
+# ``find_package_handle_standard_args`` produces a proper success/failure
+# message.
+#
 #=============================================================================
 # Copyright 2007-2009 Kitware, Inc.
 #


Use Prusa3D patched wxWidgets 3.1.1

Use Prusa3D patched wxWidgets 3.1.1

--- deps/deps-macos.cmake
+++ deps/deps-macos.cmake
@@ -89,8 +89,10 @@

 ExternalProject_Add(dep_wxwidgets
     EXCLUDE_FROM_ALL 1
-    URL "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.2/wxWidgets-3.1.2.tar.bz2"
-    URL_HASH SHA256=4cb8d23d70f9261debf7d6cfeca667fc0a7d2b6565adb8f1c484f9b674f1f27a
+    GIT_REPOSITORY "https://github.com/prusa3d/wxWidgets"
+    GIT_TAG v3.1.1-patched
+#    URL "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.2/wxWidgets-3.1.2.tar.bz2"
+#    URL_HASH SHA256=4cb8d23d70f9261debf7d6cfeca667fc0a7d2b6565adb8f1c484f9b674f1f27a
     BUILD_IN_SOURCE 1
     PATCH_COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/wxwidgets-pngprefix.h" src/png/pngprefix.h
     CONFIGURE_COMMAND env "CXXFLAGS=${DEP_WERRORS_SDK}" "CFLAGS=${DEP_WERRORS_SDK}" ./configure


explicitly define _GNU_SOURCE

explicitly define _GNU_SOURCE

--- flags.cmake
+++ flags.cmake
@@ -1,5 +1,5 @@
 add_definitions(-g -funwind-tables -ffast-math)
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -D_GNU_SOURCE")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
 if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
     add_definitions(-fsingle-precision-constant)


Correcting some errors in the environment variables definitions

--- Resources/MXAFindHDF5.cmake
+++ Resources/MXAFindHDF5.cmake
@@ -6,7 +6,7 @@
 #  HDF5_HL_INCLUDE_DIR - The High Level Include Directory
 #  HDF5_HL_LIBRARY - The Actual High Level Library
 #  HDF5_USE_HIGH_LEVEL - Set this to TRUE if you need to link against the HDF5 High level APIs.
-#  HDF_INSTALL - This is an Environment variable that can be used to help find the HDF5 libraries and Include Directories
+#  HDF5_INSTALL - This is an Environment variable that can be used to help find the HDF5 libraries and Include Directories
 #  HDF5_LIBRARIES - The List of HDF5 libraries that were found. This variable can be used in a LINK_LIBRARIES(...) command

 #-- Clear the Library List
@@ -18,7 +18,7 @@

 SET (HDF5_FOUND "NO")
 SET (HDF5_HL_FOUND "NO")
-SET (HDF5_INSTALL  $ENV{HDF_INSTALL})
+SET (HDF5_INSTALL  $ENV{HDF5_INSTALL})

 SET(HDF5_INCLUDE_SEARCH_DIRS
   $ENV{HDF5_INSTALL}/include


added use of the suppressions file to ctest

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -4,3 +4,4 @@
 SET (CTEST_DROP_SITE "http://fifthelement.inf.ethz.ch:8082")
 SET (CTEST_DROP_LOCATION "zorba")
 SET (CTEST_COMPRESS_SUBMISSION ON)
+SET (MEMORYCHECK_SUPPRESSIONS_FILE ${CMAKE_CURRENT_SOURCE_DIR}/test/valgrind.suppressions)


CakeInstall: better path comparison

CakeInstall: better path comparison

--- CakeInstall.cmake
+++ CakeInstall.cmake
@@ -60,7 +60,8 @@

 # set CAKE_ROOT and verify existing environment variable
 set(CAKE_ROOT ${CMAKE_CURRENT_LIST_DIR}/cake_root CACHE PATH "Cake install directory" FORCE)
-if(NOT "$ENV{CAKE_ROOT}" STREQUAL "" AND NOT "$ENV{CAKE_ROOT}" STREQUAL CAKE_ROOT)
+file(TO_CMAKE_PATH "$ENV{CAKE_ROOT}" _CAKE_ROOT_FROM_ENV)
+if(_CAKE_ROOT_FROM_ENV AND NOT _CAKE_ROOT_FROM_ENV STREQUAL CAKE_ROOT)
   message(FATAL_ERROR "[cake] The CAKE_ROOT environment variable set to $ENV{CAKE_ROOT} which is different from ${CAKE_ROOT} where CakeInstall.cmake intends to install Cake to. Remove CAKE_ROOT from the environment and re-run CakeInstall.cmake.")
 endif()


New Qt 5.9 components

New Qt 5.9 components

--- cmake/modules/hunter_generate_qt_5_9_info.cmake
+++ cmake/modules/hunter_generate_qt_5_9_info.cmake
@@ -34,26 +34,45 @@
       qtandroidextras
       qtbase
       qtcanvas3d
+      qtcharts
       qtconnectivity
+      qtdatavis3d
       qtdeclarative
       qtdoc
+      qtdocgallery
       qtenginio
+      qtfeedback
+      qtgamepad
       qtgraphicaleffects
       qtimageformats
       qtlocation
       qtmacextras
       qtmultimedia
+      qtnetworkauth
+      qtpim
+      qtpurchasing
+      qtqa
+      qtquick1
       qtquickcontrols
       qtquickcontrols2
+      qtremoteobjects
+      qtrepotools
       qtscript
+      qtscxml
       qtsensors
+      qtserialbus
       qtserialport
+      qtspeech
       qtsvg
+      qtsystems
       qttools
       qttranslations
+      qtvirtualkeyboard
       qtwayland
       qtwebchannel
       qtwebengine
+      qtwebkit
+      qtwebkit-examples
       qtwebsockets
       qtwebview
       qtwinextras


Switched off CUDA for OpenCV.

Switched off CUDA for OpenCV.

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


Ensure that log4qt uses the Qt defined by CTK.  This is accomplished by passing QT_QMAKE_EXECUTABLE into the cmake command used no configure log4Qt.

--- CMakeExternals/log4qt.cmake
+++ CMakeExternals/log4qt.cmake
@@ -14,6 +14,7 @@
         SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Utilities/${proj}
         CMAKE_ARGS
           ${ep_common_args}
+          -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
         )
     SET(log4qt_DIR ${ep_install_dir})
   ENDIF()


ManageRelease: Change message when targets are not found

--- Modules/ManageRelease.cmake
+++ Modules/ManageRelease.cmake
@@ -50,7 +50,7 @@
 	    ADD_DEPENDENCIES(${_target} tag)
 	    ADD_DEPENDENCIES(release ${_target})
 	ELSE(TARGET ${_target})
-	    M_MSG(${M_OFF} "Target ${_target} does not exist, skipped.")
+	    M_MSG(${M_OFF} "MANAGE_RELEASE: Target ${_target} does not exist, skipped.")
 	ENDIF(TARGET ${_target})
     ENDFOREACH(_target)
 ENDFUNCTION(MANAGE_RELEASE)


ENH: Add itk.Point wrapping for dimension 6

Needed for RANSAC where two corresponding 3D points will be passed
as one entry (concatenation) to ITK Ransac.

--- Wrapping/WrapITKTypes.cmake
+++ Wrapping/WrapITKTypes.cmake
@@ -318,7 +318,8 @@
 set(itk_Wrap_VariableLengthVector ${WRAPPER_TEMPLATES})

 WRAP_TYPE("itk::Point" "P" "itkPoint.h")
-  foreach(d ${ITK_WRAP_IMAGE_DIMS_INCREMENTED})
+  UNIQUE(dims "${ITK_WRAP_IMAGE_DIMS_INCREMENTED};6")
+  foreach(d ${dims})
     ADD_TEMPLATE("${ITKM_F}${d}"  "${ITKT_F},${d}")
     ADD_TEMPLATE("${ITKM_D}${d}"  "${ITKT_D},${d}")
   endforeach()


ffmpeg/4.x: update FFmpeg wrapper 2021.10

- FFmpeg 4.4 (no changes)

--- 3rdparty/ffmpeg/ffmpeg.cmake
+++ 3rdparty/ffmpeg/ffmpeg.cmake
@@ -1,8 +1,8 @@
-# Binaries branch name: ffmpeg/master_20210608
-# Binaries were created for OpenCV: eaa9228a4fdfb9c2465aea65a50ce2d16b55dce0
-ocv_update(FFMPEG_BINARIES_COMMIT "213fcd5d4897319a83207406036c4a5957fba010")
-ocv_update(FFMPEG_FILE_HASH_BIN32 "bab661341c30862fa88627130219c0a5")
-ocv_update(FFMPEG_FILE_HASH_BIN64 "ac99f9767a83103c31709628af685924")
+# Binaries branch name: ffmpeg/master_20211005
+# Binaries were created for OpenCV: 672399c751c431bbe52818b33fd3ca17b51e0e16
+ocv_update(FFMPEG_BINARIES_COMMIT "40b4666d1aa374205fd61373496e15d92ecd5313")
+ocv_update(FFMPEG_FILE_HASH_BIN32 "c2f9a897d464a2dce2286f8067ad9d90")
+ocv_update(FFMPEG_FILE_HASH_BIN64 "878a4e8fe5a4d68f18c9cdde543b9ead")
 ocv_update(FFMPEG_FILE_HASH_CMAKE "8862c87496e2e8c375965e1277dee1c7")

 function(download_win_ffmpeg script_var)


Fixed autogen.sh.

Fixed autogen.sh.

--- defaults.cmake
+++ defaults.cmake
@@ -444,8 +444,8 @@
   if(${MSVC})
     check_include_directory_msvc("SDL2-" "include")
     check_link_directory_msvc("SDL2-" "lib/x86")
-    set(SDL_LIBRARY_DEBUG "SDL2" "SDL2main" PARENT_SCOPE)
-    set(SDL_LIBRARY "SDL2" "SDL2main" PARENT_SCOPE)
+    set(SDL2_LIBRARY_DEBUG "SDL2" "SDL2main" PARENT_SCOPE)
+    set(SDL2_LIBRARY "SDL2" "SDL2main" PARENT_SCOPE)
   else()
     include(FindPkgConfig)
     pkg_search_module(SDL2 sdl2)


fix wrong lua_one.c location in non Windows systems.

--- deps/lua.cmake
+++ deps/lua.cmake
@@ -113,16 +113,11 @@
 target_link_libraries (lualib ${LIBS} )
 set_target_properties (lualib PROPERTIES OUTPUT_NAME "lua53")

+add_executable(lua ${LUA_DIR}/src/lua.c)
 IF(WIN32)
-  add_executable(lua ${LUA_DIR}/src/lua.c)
   target_link_libraries(lua lualib)
 ELSE()
-  IF(WITH_AMALG)
-    add_executable(lua ${LUA_DIR}/src/lua.c ${LUA_DIR}/lua_one.c)
-  ELSE()
-    add_executable(lua ${LUA_DIR}/src/lua.c ${SRC_LUACORE})
-  ENDIF()
-  target_link_libraries(lua ${LIBS})
+  target_link_libraries(lua lualib ${LIBS})
   SET_TARGET_PROPERTIES(lua PROPERTIES ENABLE_EXPORTS ON)
 ENDIF(WIN32)


equivalent tiles: corrected dependency issue

Signed-off-by: Alessandro Comodi <622632e70fd6771cf2cd943f69e5e51ab66adef8@antmicro.com>

--- xc7/make/project_xray.cmake
+++ xc7/make/project_xray.cmake
@@ -127,9 +127,11 @@
     append_file_dependency(TILES_DEPS ${symbiflow-arch-defs_SOURCE_DIR}/xc7/archs/${PART}/tiles/${EQUIVALENT_TILE_LOWER}/${EQUIVALENT_TILE_LOWER}.pb_type.xml)
     list(APPEND EQUIVALENT_TILES_INCLUDE_FILES ${symbiflow-arch-defs_SOURCE_DIR}/xc7/archs/${PART}/tiles/${EQUIVALENT_TILE_LOWER}/${EQUIVALENT_TILE_LOWER}.pb_type.xml)
   endforeach()
+  append_file_dependency(TILES_DEPS ${symbiflow-arch-defs_SOURCE_DIR}/xc7/archs/${PART}/tiles/${TILE}/${TILE}.pb_type.xml)
+  list(APPEND EQUIVALENT_TILES_INCLUDE_FILES ${symbiflow-arch-defs_SOURCE_DIR}/xc7/archs/${PART}/tiles/${TILE}/${TILE}.pb_type.xml)
+
   string(REPLACE ";" "," EQUIVALENT_TILES_COMMA "${PROJECT_XRAY_TILE_EQUIVALENT_TILES}")
   string(REPLACE ";" "," PIN_PREFIX_COMMA "${PROJECT_XRAY_TILE_PIN_PREFIX}")
-
   add_file_target(FILE ${TILE}.tile.xml GENERATED)
   get_file_target(TILE_TARGET ${TILE}.tile.xml)
   set_target_properties(${TILE_TARGET} PROPERTIES INCLUDE_FILES "${EQUIVALENT_TILES_INCLUDE_FILES}")


Remove broken package check

Remove broken package check

--- cmake/modules/hunter_boost_component_b2_args.cmake
+++ cmake/modules/hunter_boost_component_b2_args.cmake
@@ -6,42 +6,10 @@

 # for iostreams dependency on ZLIB and BZIP2
 include(hunter_add_package)
-include(hunter_report_broken_package)
 include("${CMAKE_CURRENT_LIST_DIR}/../Hunter")

 function(hunter_boost_component_b2_args compName boostCmakeArgs outList)
   hunter_test_string_not_empty("${BOOST_VERSION}")
-
-  string(COMPARE EQUAL "${BOOST_VERSION}" "1.64.0" is_boost_1_64)
-  string(COMPARE EQUAL "${CMAKE_HOST_SYSTEM_NAME}" "Linux" host_is_linux)
-
-  set(lib_detect_broken_message "")
-
-  if(ANDROID)
-    if(host_is_linux)
-      set(lib_detect_broken YES)
-      set(
-          lib_detect_broken_message
-          "ZLIB/BZip2 detection broken for Android if host is Linux."
-          " As a workaround you can build package on OSX host and upload binaries"
-          " to server. See details: https://github.com/ruslo/hunter/issues/417#issuecomment-220563231"
-      )
-    else()
-      if(is_boost_1_64)
-        set(lib_detect_broken NO)
-      else()
-        set(lib_detect_broken YES)
-        set(
-            lib_detect_broken_message
-            "ZLIB/BZip2 detection broken for Android."
-            " As a workaround you can use Boost 1.64.0."
-            " See issue: https://github.com/boostorg/build/issues/300"
-        )
-      endif()
-    endif()
-  else()
-    set(lib_detect_broken NO)
-  endif()

   string(TOUPPER ${compName} upperCompName)
   set(myList "")#empty
@@ -111,9 +79,6 @@

     if(NOT is_nocompress)
       if(NOT is_nozlib)
-        if(lib_detect_broken)
-          hunter_report_broken_package(${lib_detect_broken_message})
-        endif()
         # download ZLIB and set ZLIB_INCLUDE, ZLIB_LIBPATH
         hunter_add_package(ZLIB)
         find_package(ZLIB REQUIRED CONFIG)
@@ -141,9 +106,6 @@
       endif()

       if(NOT is_nobzip2)
-        if(lib_detect_broken)
-          hunter_report_broken_package(${lib_detect_broken_message})
-        endif()
         # download BZIP2 and set BZIP2_INCLUDE, BZIP2_LIBPATH
         hunter_add_package(BZip2)
         find_package(BZip2 REQUIRED CONFIG)


add target_architecture to build name

add target_architecture to build name

--- test.cmake
+++ test.cmake
@@ -30,7 +30,8 @@
 if(arch STREQUAL "linux")
    execute_process(COMMAND lsb_release -d COMMAND cut -f2 OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE arch)
 endif()
-set(CTEST_BUILD_NAME "${arch} ${chip} ${COMPILER_VERSION} $ENV{CXXFLAGS}")
+set(CTEST_BUILD_NAME "${arch} ${chip} ${COMPILER_VERSION} $ENV{CXXFLAGS} ${target_architecture}")
+string(STRIP "${CTEST_BUILD_NAME}" CTEST_BUILD_NAME)
 string(REPLACE "/" "_" CTEST_BUILD_NAME "${CTEST_BUILD_NAME}")
 string(REPLACE "+" "x" CTEST_BUILD_NAME "${CTEST_BUILD_NAME}") # CDash fails to escape '+' correctly in URIs
 string(REGEX REPLACE "[][ ()]" "_" CTEST_BINARY_DIRECTORY "${CTEST_BUILD_NAME}")


reenable active scripts

reenable active scripts

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


Removed old unused code.

Removed old unused code.

--- scripts/project.cmake
+++ scripts/project.cmake
@@ -316,12 +316,6 @@
     set(dllname ${libname})
   endif ()

-  #  set(dllname "${dllname}.dll")
-  #
-  #  if (MINGW)
-  #    set_lib_prefix(dllname ${MYTHIC_DEPENDENCIES}/${path}/bin)
-  #  endif ()
-
   link_external_static(${path} ${libname})

   set(fullpath "${MYTHIC_DEPENDENCIES}/${path}/bin")


removed debug messages.

removed debug messages.

--- scripts/project.cmake
+++ scripts/project.cmake
@@ -189,8 +189,8 @@
       #message("hello ${base_path}, ${resource_path}")
       get_filename_component(resource_dir ${resource_path} DIRECTORY)
       get_relative_path(relative_dir ${base_path} ${resource_dir})
-      message("resource ${resource_path}")
-      message("resource ${relative_dir}")
+      #      message("resource ${resource_path}")
+      #      message("resource ${relative_dir}")
       #set_source_files_properties(${BUNDLE_RESOURCES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
     endforeach ()

@@ -279,11 +279,11 @@
     endif ()
   endif ()

-#    message("1 ${name}")
+  #    message("1 ${name}")
   set(name2 name)
   set(extension2 extension)
   set(${varname} "${${name2}}.${${extension2}}" PARENT_SCOPE)
-#  message("2 ${name}")
+  #  message("2 ${name}")
 endmacro()

 function(doctor_dynamic varname path)
@@ -310,12 +310,8 @@
     set(extension "a")
   endif ()

-    message("a ${${varname}} ${name} ${extension}")
-  message("0 ${name}")
   doctor(${varname} ${path} ${name} ${extension})
-  message("3 ${name}")
-
-  message("b ${${varname}} - ${name} - ${extension}")
+
 endfunction()

 macro(link_external_static path)
@@ -333,7 +329,7 @@

   doctor_static(libname ${fullpath} ${is_dynamic})

-  message("${CURRENT_TARGET} ${fullpath}/${libname}")
+#  message("${CURRENT_TARGET} ${fullpath}/${libname}")
   if (IOS)
     target_link_libraries(${CURRENT_TARGET} "-l${fullpath}/${libname}")
   else ()
@@ -355,7 +351,7 @@

   if (IOS)
     link_external_static(${path} ${libname})
-  else()
+  else ()
     link_external_static(${path} ${libname} TRUE)

     set(fullpath "${MYTHIC_DEPENDENCIES}/${path}/bin")
@@ -364,5 +360,5 @@
     add_custom_command(TARGET ${CURRENT_TARGET} POST_BUILD
       COMMAND ${CMAKE_COMMAND} -E copy ${fullpath}/${dllname} $<TARGET_FILE_DIR:${CURRENT_TARGET}>
       )
-  endif()
-endmacro()
+  endif ()
+endmacro()


config: Add under-/overline properties

config: Add under-/overline properties

--- examples/config.cmake
+++ examples/config.cmake
@@ -23,13 +23,18 @@
 ;background = ${xrdb:color9}
 background = #ee222222
 foreground = #dfdfdf
-linecolor = #555
+
+;lineheight = 1
+;linecolor = #555
+overline-size = 2
+overline-color = #f00
+underline-size = 2
+underline-color = #00f

 border-bottom = 2
 border-bottom-color = #333

 spacing = 1
-lineheight = 1
 padding-left = 0
 padding-right = 2
 module-margin-left = 1


hunter_get_lang_standard_flag: Add C++20 check

--- cmake/modules/hunter_get_lang_standard_flag.cmake
+++ cmake/modules/hunter_get_lang_standard_flag.cmake
@@ -4,8 +4,10 @@
 include(hunter_status_debug)

 function(hunter_get_lang_standard_flag LANG OUTPUT)
-  set(CXX_standards 17 14 11 98)
+  # https://github.com/Kitware/CMake/blob/9d48d3f61b25400a191f12ea92b8e5496ab47a8f/Source/cmLocalGenerator.cxx#L1766-L1782
+  set(CXX_standards 20 17 14 11 98)
   set(C_standards 11 99 90)
+
   # Find the <lang> standard flag.
   # This maps the logic in the CMake code:
   # https://github.com/Kitware/CMake/blob/3bccdd89c88864839a0c8d4ea56bd069c90fa02b/Source/cmLocalGenerator.cxx#L1433-L1467


GLSL Optimizer has had the library name changed recently. Look for that new name.

--- CMake/Packages/FindGLSLOptimizer.cmake
+++ CMake/Packages/FindGLSLOptimizer.cmake
@@ -29,7 +29,7 @@
   GLSL_Optimizer_INCLUDE_DIR
 )

-set(GLSL_Optimizer_LIBRARY_NAMES mesaglsl2)
+set(GLSL_Optimizer_LIBRARY_NAMES mesaglsl2 glsl_optimizer)
 get_debug_names(GLSL_Optimizer_LIBRARY_NAMES)

 use_pkgconfig(GLSL_Optimizer_PKGC GLSL_Optimizer)


Bump TubeTK to benefit from Tortuosity module updates

--- CMake/Superbuild/External_TubeTK.cmake
+++ CMake/Superbuild/External_TubeTK.cmake
@@ -45,7 +45,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "https://github.com/KitwareMedical/TubeTK.git"
-    GIT_TAG "7744f4a5a8bc4364dd1f2e59b72ae445a1ef5672"
+    GIT_TAG "43c540093d981a47ec61d3b97e0f1f7395a2009b"
     CMAKE_CACHE_ARGS
       -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}


Fix typo

Fix typo

--- CMakeExternals/Customization/ITK.cmake
+++ CMakeExternals/Customization/ITK.cmake
@@ -3,7 +3,7 @@
     customizations into account.

     The file's name must be equal to the external project's name. It may
-    contain the following four variables:
+    contain the following three variables:

       - CUSTOM_CMAKE_ARGS
       - CUSTOM_CMAKE_CACHE_ARGS


Make sure CTK library name starts with 'CTK' uppercase

--- CMake/ctkMacroBuildLib.cmake
+++ CMake/ctkMacroBuildLib.cmake
@@ -33,6 +33,10 @@
   # Sanity checks
   IF(NOT DEFINED MY_NAME)
     MESSAGE(SEND_ERROR "NAME is mandatory")
+  ENDIF()
+  STRING(REGEX MATCH "^CTK.+" valid_library_name ${MY_NAME})
+  IF(NOT valid_library_name)
+    MESSAGE(SEND_ERROR "CTK library name [${MY_NAME}] should start with 'CTK' uppercase !")
   ENDIF()
   IF(NOT DEFINED MY_EXPORT_DIRECTIVE)
     MESSAGE(SEND_ERROR "EXPORT_DIRECTIVE is mandatory")


Make cmake play nice when iconv is in glibc

--- CMakeModules/FindIconv.cmake
+++ CMakeModules/FindIconv.cmake
@@ -83,6 +83,11 @@
             iconv(iconv_t(-1), &p, 0, 0, 0);
          }"
         ICONV_ACCEPTS_CONST_INPUT)
+
+    if (ICONV_LIBRARY)
+        list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY})
+        list(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES)
+    endif()
 endif()

 if(NOT ICONV_ACCEPTS_CONST_INPUT AND NOT ICONV_ACCEPTS_NONCONST_INPUT)
@@ -93,5 +98,3 @@

 mark_as_advanced(ICONV_LIBRARY ICONV_INCLUDE_DIR)

-list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY})
-list(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES)


cmake warning

cmake warning

--- Build.cmake
+++ Build.cmake
@@ -20,7 +20,7 @@
   # description
   #  1) http://kjellkod.wordpress.com/2013/09/23/experimental-g3log-with-clang/
   #  2) https://github.com/maidsafe/MaidSafe/wiki/Hacking-with-Clang-llvm-abi-and-llvm-libc
-IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang")
+IF (${CMAKE_CXX_COMPILER_ID} MATCHES ".*Clang")
    MESSAGE("")
    MESSAGE("cmake for Clang ")
    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 -Wunused -D_GLIBCXX_USE_NANOSLEEP")
@@ -44,7 +44,7 @@

-ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+ELSEIF(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
    MESSAGE("cmake for GCC ")
    IF (APPLE)
        set(CMAKE_CXX_FLAGS   "${CMAKE_CXX_FLAGS} -Wall -Wunused -std=c++11  -pthread -D_GLIBCXX_USE_NANOSLEEP")


update CMake android toolchain from https://github.com/taka-no-me/android-cmake

--HG--
branch : newandroidtoolchain

--- CMake/toolchain/android.toolchain.cmake
+++ CMake/toolchain/android.toolchain.cmake
@@ -1,10 +1,40 @@
+# Copyright (c) 2010-2011, Ethan Rublee
+# Copyright (c) 2011-2014, Andrey Kamaev
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1.  Redistributions of source code must retain the above copyright notice,
+#     this list of conditions and the following disclaimer.
+#
+# 2.  Redistributions in binary form must reproduce the above copyright notice,
+#     this list of conditions and the following disclaimer in the documentation
+#     and/or other materials provided with the distribution.
+#
+# 3.  Neither the name of the copyright holder nor the names of its
+#     contributors may be used to endorse or promote products derived from this
+#     software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
 # ------------------------------------------------------------------------------
 #  Android CMake toolchain file, for use with the Android NDK r5-r9
 #  Requires cmake 2.6.3 or newer (2.8.5 or newer is recommended).
 #  See home page: https://github.com/taka-no-me/android-cmake
 #
 #  The file is mantained by the OpenCV project. The latest version can be get at
-#  https://github.com/Itseez/opencv/tree/master/platforms/android/android.toolchain.cmake
+#  http://code.opencv.org/projects/opencv/repository/revisions/master/changes/android/android.toolchain.cmake
 #
 #  Usage Linux:
 #   $ export ANDROID_NDK=/absolute/path/to/the/android-ndk
@@ -57,8 +87,7 @@
 #        "armeabi-v6 with VFP" - tuned for ARMv6 processors having VFP.
 #        "x86" - matches to the NDK ABI with the same name.
 #            See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
-#        "mips" - matches to the NDK ABI with the same name
-#            (It is not tested on real devices by the authos of this toolchain)
+#        "mips" - matches to the NDK ABI with the same name.
 #            See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
 #
 #    ANDROID_NATIVE_API_LEVEL=android-8 - level of Android API compile for.
@@ -262,6 +291,18 @@
 #   - April 2013
 #     [+] support non-release NDK layouts (from Linaro git and Android git)
 #     [~] automatically detect if explicit link to crtbegin_*.o is needed
+#   - June 2013
+#     [~] fixed stl include path for standalone toolchain made by NDK >= r8c
+#   - July 2013
+#     [+] updated for NDK r9
+#   - November 2013
+#     [+] updated for NDK r9b
+#   - December 2013
+#     [+] updated for NDK r9c
+#   - January 2014
+#     [~] fix copying of shared STL
+#   - April 2014
+#     [+] updated for NDK r9d
 # ------------------------------------------------------------------------------

 cmake_minimum_required( VERSION 2.6.3 )
@@ -288,7 +329,7 @@
 # rpath makes low sence for Android
 set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." )

-set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r9c -r9b -r9 -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
+set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
 if(NOT DEFINED ANDROID_NDK_SEARCH_PATHS)
  if( CMAKE_HOST_WIN32 )
   file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS )
@@ -306,7 +347,7 @@
 set( ANDROID_SUPPORTED_ABIS_x86 "x86" )
 set( ANDROID_SUPPORTED_ABIS_mipsel "mips" )

-set( ANDROID_DEFAULT_NDK_API_LEVEL 9 )
+set( ANDROID_DEFAULT_NDK_API_LEVEL 8 )
 set( ANDROID_DEFAULT_NDK_API_LEVEL_x86 9 )
 set( ANDROID_DEFAULT_NDK_API_LEVEL_mips 9 )

@@ -434,7 +475,7 @@

 # detect current host platform
-if( NOT DEFINED ANDROID_NDK_HOST_X64 AND CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64|x86_64|AMD64")
+if( NOT DEFINED ANDROID_NDK_HOST_X64 AND (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64|x86_64|AMD64" OR CMAKE_HOST_APPLE) )
  set( ANDROID_NDK_HOST_X64 1 CACHE BOOL "Try to use 64-bit compiler toolchain" )
  mark_as_advanced( ANDROID_NDK_HOST_X64 )
 endif()
@@ -454,9 +495,7 @@
  message( FATAL_ERROR "Cross-compilation on your platform is not supported by this cmake toolchain" )
 endif()

-# CMAKE_HOST_SYSTEM_PROCESSOR on MacOS X always says i386 on Intel platform
-# So we do not trust ANDROID_NDK_HOST_X64 on Apple hosts
-if( NOT ANDROID_NDK_HOST_X64 AND NOT CMAKE_HOST_APPLE)
+if( NOT ANDROID_NDK_HOST_X64 )
  set( ANDROID_NDK_HOST_SYSTEM_NAME ${ANDROID_NDK_HOST_SYSTEM_NAME2} )
 endif()

@@ -479,7 +518,7 @@

   if( ANDROID_NDK )
    message( STATUS "Using default path for Android NDK: ${ANDROID_NDK}" )
-   message( STATUS "If you prefer to use a different location, please define a cmake or environment variable: ANDROID_NDK" )
+   message( STATUS "  If you prefer to use a different location, please define a cmake or environment variable: ANDROID_NDK" )
   else()
    #try to find Android standalone toolchain in one of the the default locations
    __INIT_VARIABLE( ANDROID_STANDALONE_TOOLCHAIN PATH ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH )
@@ -526,7 +565,7 @@
     or
       export ANDROID_STANDALONE_TOOLCHAIN=~/my-android-toolchain
     or put the toolchain or NDK in the default path:
-      sudo ln -s ~/my-android-ndk ${ANDROID_NDK_SEARCH_PATH}-XXX where XXX is your NDK version
+      sudo ln -s ~/my-android-ndk ${ANDROID_NDK_SEARCH_PATH}
       sudo ln -s ~/my-android-toolchain ${ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH}" )
 endif()

@@ -604,30 +643,27 @@

 macro( __GLOB_NDK_TOOLCHAINS __availableToolchainsVar __availableToolchainsLst __toolchain_subpath )
  foreach( __toolchain ${${__availableToolchainsLst}} )
-  # Skip renderscript folder. It's not C++ toolchain
-  if (NOT ${__toolchain} STREQUAL "renderscript")
-   if( "${__toolchain}" MATCHES "-clang3[.][0-9]$" AND NOT EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/${__toolchain}${__toolchain_subpath}" )
-     string( REGEX REPLACE "-clang3[.][0-9]$" "-4.6" __gcc_toolchain "${__toolchain}" )
-   else()
-     set( __gcc_toolchain "${__toolchain}" )
+  if( "${__toolchain}" MATCHES "-clang3[.][0-9]$" AND NOT EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/${__toolchain}${__toolchain_subpath}" )
+   string( REGEX REPLACE "-clang3[.][0-9]$" "-4.6" __gcc_toolchain "${__toolchain}" )
+  else()
+   set( __gcc_toolchain "${__toolchain}" )
+  endif()
+  __DETECT_TOOLCHAIN_MACHINE_NAME( __machine "${ANDROID_NDK_TOOLCHAINS_PATH}/${__gcc_toolchain}${__toolchain_subpath}" )
+  if( __machine )
+   string( REGEX MATCH "[0-9]+[.][0-9]+([.][0-9x]+)?$" __version "${__gcc_toolchain}" )
+   if( __machine MATCHES i686 )
+    set( __arch "x86" )
+   elseif( __machine MATCHES arm )
+    set( __arch "arm" )
+   elseif( __machine MATCHES mipsel )
+    set( __arch "mipsel" )
    endif()
-   __DETECT_TOOLCHAIN_MACHINE_NAME( __machine "${ANDROID_NDK_TOOLCHAINS_PATH}/${__gcc_toolchain}${__toolchain_subpath}" )
-   if( __machine )
-    string( REGEX MATCH "[0-9]+[.][0-9]+([.][0-9x]+)?$" __version "${__gcc_toolchain}" )
-    if( __machine MATCHES i686 )
-     set( __arch "x86" )
-    elseif( __machine MATCHES arm )
-     set( __arch "arm" )
-    elseif( __machine MATCHES mipsel )
-     set( __arch "mipsel" )
-    endif()
-    list( APPEND __availableToolchainMachines "${__machine}" )
-    list( APPEND __availableToolchainArchs "${__arch}" )
-    list( APPEND __availableToolchainCompilerVersions "${__version}" )
-    list( APPEND ${__availableToolchainsVar} "${__toolchain}" )
-   endif()
-   unset( __gcc_toolchain )
-  endif()
+   list( APPEND __availableToolchainMachines "${__machine}" )
+   list( APPEND __availableToolchainArchs "${__arch}" )
+   list( APPEND __availableToolchainCompilerVersions "${__version}" )
+   list( APPEND ${__availableToolchainsVar} "${__toolchain}" )
+  endif()
+  unset( __gcc_toolchain )
  endforeach()
 endmacro()

@@ -657,6 +693,7 @@
   endif()
   __LIST_FILTER( __availableToolchainsLst "^[.]" )
   __LIST_FILTER( __availableToolchainsLst "llvm" )
+  __LIST_FILTER( __availableToolchainsLst "renderscript" )
   __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH}" )
   if( NOT __availableToolchains AND NOT ANDROID_NDK_TOOLCHAINS_SUBPATH STREQUAL ANDROID_NDK_TOOLCHAINS_SUBPATH2 )
    __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH2}" )
@@ -945,7 +982,11 @@
  set( ANDROID_SYSROOT "${ANDROID_STANDALONE_TOOLCHAIN}/sysroot" )

  if( NOT ANDROID_STL STREQUAL "none" )
-  set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/include/c++/${ANDROID_COMPILER_VERSION}" )
+  set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_STANDALONE_TOOLCHAIN}/include/c++/${ANDROID_COMPILER_VERSION}" )
+  if( NOT EXISTS "${ANDROID_STL_INCLUDE_DIRS}" )
+   # old location ( pre r8c )
+   set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/include/c++/${ANDROID_COMPILER_VERSION}" )
+  endif()
   if( ARMEABI_V7A AND EXISTS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/${CMAKE_SYSTEM_PROCESSOR}/bits" )
    list( APPEND ANDROID_STL_INCLUDE_DIRS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/${CMAKE_SYSTEM_PROCESSOR}" )
   elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/thumb/bits" )
@@ -1100,15 +1141,7 @@
 # case of shared STL linkage
 if( ANDROID_STL MATCHES "shared" AND DEFINED __libstl )
  string( REPLACE "_static.a" "_shared.so" __libstl "${__libstl}" )
- if( NOT _CMAKE_IN_TRY_COMPILE AND __libstl MATCHES "[.]so$" )
-  get_filename_component( __libstlname "${__libstl}" NAME )
-  execute_process( COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${__libstl}" "${LIBRARY_OUTPUT_PATH}/${__libstlname}" RESULT_VARIABLE __fileCopyProcess )
-  if( NOT __fileCopyProcess EQUAL 0 OR NOT EXISTS "${LIBRARY_OUTPUT_PATH}/${__libstlname}")
-   message( SEND_ERROR "Failed copying of ${__libstl} to the ${LIBRARY_OUTPUT_PATH}/${__libstlname}" )
-  endif()
-  unset( __fileCopyProcess )
-  unset( __libstlname )
- endif()
+ # TODO: check if .so file exists before the renaming
 endif()

@@ -1472,8 +1505,9 @@
 endif()

 # global includes and link directories
-include_directories( SYSTEM "${ANDROID_SYSROOT}/usr/include" ${ANDROID_NDK}/sources/cpufeatures ${ANDROID_STL_INCLUDE_DIRS} )
-link_directories( "${CMAKE_INSTALL_PREFIX}/libs/${ANDROID_NDK_ABI_NAME}" )
+include_directories( SYSTEM "${ANDROID_SYSROOT}/usr/include" ${ANDROID_STL_INCLUDE_DIRS} )
+get_filename_component(__android_install_path "${CMAKE_INSTALL_PREFIX}/libs/${ANDROID_NDK_ABI_NAME}" ABSOLUTE) # avoid CMP0015 policy warning
+link_directories( "${__android_install_path}" )

 # detect if need link crtbegin_so.o explicitly
 if( NOT DEFINED ANDROID_EXPLICIT_CRT_LINK )
@@ -1525,12 +1559,24 @@
  set( LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME}" CACHE PATH "path for android libs" )
 endif()

+# copy shaed stl library to build directory
+if( NOT _CMAKE_IN_TRY_COMPILE AND __libstl MATCHES "[.]so$" )
+ get_filename_component( __libstlname "${__libstl}" NAME )
+ execute_process( COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${__libstl}" "${LIBRARY_OUTPUT_PATH}/${__libstlname}" RESULT_VARIABLE __fileCopyProcess )
+ if( NOT __fileCopyProcess EQUAL 0 OR NOT EXISTS "${LIBRARY_OUTPUT_PATH}/${__libstlname}")
+  message( SEND_ERROR "Failed copying of ${__libstl} to the ${LIBRARY_OUTPUT_PATH}/${__libstlname}" )
+ endif()
+ unset( __fileCopyProcess )
+ unset( __libstlname )
+endif()
+
+
 # set these global flags for cmake client scripts to change behavior
 set( ANDROID True )
 set( BUILD_ANDROID True )

 # where is the target environment
-set( CMAKE_FIND_ROOT_PATH "${CMAKE_SOURCE_DIR}" "${OGRE_DEPENDENCIES_DIR}" "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share")
+set( CMAKE_FIND_ROOT_PATH "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" )

 # only search for libraries and includes in the ndk toolchain
 set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
@@ -1633,6 +1679,19 @@
 endif()

+# force cmake to produce / instead of \ in build commands for Ninja generator
+if( CMAKE_GENERATOR MATCHES "Ninja" AND CMAKE_HOST_WIN32 )
+ # it is a bad hack after all
+ # CMake generates Ninja makefiles with UNIX paths only if it thinks that we are going to build with MinGW
+ set( CMAKE_COMPILER_IS_MINGW TRUE ) # tell CMake that we are MinGW
+ set( CMAKE_CROSSCOMPILING TRUE )    # stop recursion
+ enable_language( C )
+ enable_language( CXX )
+ # unset( CMAKE_COMPILER_IS_MINGW ) # can't unset because CMake does not convert back-slashes in response files without it
+ unset( MINGW )
+endif()
+
+
 # set some obsolete variables for backward compatibility
 set( ANDROID_SET_OBSOLETE_VARIABLES ON CACHE BOOL "Define obsolete Andrid-specific cmake variables" )
 mark_as_advanced( ANDROID_SET_OBSOLETE_VARIABLES )
@@ -1687,7 +1746,7 @@
 #   BUILD_WITH_STANDALONE_TOOLCHAIN : TRUE if standalone toolchain is used
 #   ANDROID_NDK_HOST_SYSTEM_NAME : "windows", "linux-x86" or "darwin-x86" depending on host platform
 #   ANDROID_NDK_ABI_NAME : "armeabi", "armeabi-v7a", "x86" or "mips" depending on ANDROID_ABI
-#   ANDROID_NDK_RELEASE : one of r5, r5b, r5c, r6, r6b, r7, r7b, r7c, r8, r8b, r8c, r8d, r8e; set only for NDK
+#   ANDROID_NDK_RELEASE : one of r5, r5b, r5c, r6, r6b, r7, r7b, r7c, r8, r8b, r8c, r8d, r8e, r9, r9b, r9c, r9d; set only for NDK
 #   ANDROID_ARCH_NAME : "arm" or "x86" or "mips" depending on ANDROID_ABI
 #   ANDROID_SYSROOT : path to the compiler sysroot
 #   TOOL_OS_SUFFIX : "" or ".exe" depending on host platform
@@ -1717,4 +1776,3 @@
 #   ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH
 #   ANDROID_SUPPORTED_ABIS_${ARCH}
 #   ANDROID_SUPPORTED_NDK_VERSIONS
-


Fix var name

Fix var name

--- conan.cmake
+++ conan.cmake
@@ -145,8 +145,8 @@

         if (CMAKE_GENERATOR_TOOLSET)
             set(_SETTINGS ${_SETTINGS} -s compiler.toolset=${CMAKE_GENERATOR_TOOLSET})
-        elseif(CMAKE_VS_PLATHORM_TOOLSET AND (CMAKE_GENERATOR STREQUAL "Ninja"))
-            set(_SETTINGS ${_SETTINGS} -s compiler.toolset=${CMAKE_VS_PLATHORM_TOOLSET})
+        elseif(CMAKE_VS_PLATFORM_TOOLSET AND (CMAKE_GENERATOR STREQUAL "Ninja"))
+            set(_SETTINGS ${_SETTINGS} -s compiler.toolset=${CMAKE_VS_PLATFORM_TOOLSET})
         endif()
     else()
         message(FATAL_ERROR "Conan: compiler setup not recognized")


Re-run cmake when conanfile is changed (#18)

--- conan.cmake
+++ conan.cmake
@@ -186,14 +186,22 @@
 endfunction()

+function(conan_cmake_setup_conanfile)
+  parse_arguments(${ARGV})
+  if(ARGUMENTS_CONANFILE)
+    # configure_file will make sure cmake re-runs when conanfile is updated
+    configure_file(${ARGUMENTS_CONANFILE} ${ARGUMENTS_CONANFILE}.junk)
+    file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${ARGUMENTS_CONANFILE}.junk)
+  else()
+    conan_cmake_generate_conanfile(${ARGV})
+  endif()
+endfunction()
+
 function(conan_cmake_generate_conanfile)
   # Generate, writing in disk a conanfile.txt with the requires, options, and imports
   # specified as arguments
   # This will be considered as temporary file, generated in CMAKE_BINARY_DIR
   parse_arguments(${ARGV})
-  if(ARGUMENTS_CONANFILE)
-    return()
-  endif()
   set(_FN "${CMAKE_BINARY_DIR}/conanfile.txt")

   file(WRITE ${_FN} "[generators]\ncmake\n\n[requires]\n")
@@ -245,7 +253,7 @@
         set(CONAN_CMAKE_MULTI OFF)
     endif()
     if(NOT CONAN_EXPORTED)
-        conan_cmake_generate_conanfile(${ARGV})
+        conan_cmake_setup_conanfile(${ARGV})
         if(CONAN_CMAKE_MULTI)
             foreach(CMAKE_BUILD_TYPE "Release" "Debug")
                 conan_cmake_settings(settings)


Graph Control 4.2.0-rc2 Release Candidate 2

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

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


Split off 7.12.30

Split off 7.12.30

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

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


Split off 7.10.42

Split off 7.10.42

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

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


Bump GAPID version to v0.5.0

Bump GAPID version to v0.5.0

--- version.cmake
+++ version.cmake
@@ -15,7 +15,7 @@
 # True source of GAPID versions.
 # Increment these numbers before releasing a new version.
 set(GAPID_VERSION_MAJOR 0)
-set(GAPID_VERSION_MINOR 4)
+set(GAPID_VERSION_MINOR 5)
 set(GAPID_VERSION_POINT 0)

 if (NOT DEFINED GAPID_BUILD_NUMBER)


bump version to 0.5.0

bump version to 0.5.0

--- src/CPackConfig.cmake
+++ src/CPackConfig.cmake
@@ -3,8 +3,8 @@
 set(CPACK_PACKAGE_NAME "libes0")

 set(CPACK_PACKAGE_VERSION_MAJOR "0")
-set(CPACK_PACKAGE_VERSION_MINOR "4")
-set(CPACK_PACKAGE_VERSION_PATCH "1")
+set(CPACK_PACKAGE_VERSION_MINOR "5")
+set(CPACK_PACKAGE_VERSION_PATCH "0")
 set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")

 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "libes")


Version: Update development date

Version: Update development date

--- src/Version.cmake
+++ src/Version.cmake
@@ -1,7 +1,7 @@
 # CastXML version number components.
 set(CastXML_VERSION_MAJOR 0)
 set(CastXML_VERSION_MINOR 4)
-set(CastXML_VERSION_PATCH 20220308)
+set(CastXML_VERSION_PATCH 20220831)
 set(CastXML_VERSION_RC 0)
 set(CastXML_VERSION_IS_DIRTY 0)


CastXML 0.4.6

CastXML 0.4.6

--- src/Version.cmake
+++ src/Version.cmake
@@ -1,7 +1,7 @@
 # CastXML version number components.
 set(CastXML_VERSION_MAJOR 0)
 set(CastXML_VERSION_MINOR 4)
-set(CastXML_VERSION_PATCH 5)
+set(CastXML_VERSION_PATCH 6)
 set(CastXML_VERSION_RC 0)
 set(CastXML_VERSION_IS_DIRTY 0)


Properly check if {SYS_SELECT, TIME}_WITH_SYS_TIME should be set

The usage of "check_include_files" introduced in commit 9baa8f
is not appropriate in that particular case. The variable was set to True
if both header were present on the system.

Instead, a compile test checking that both headers can be included
together in a same file is done.

--- cmake/ConfigureChecks.cmake
+++ cmake/ConfigureChecks.cmake
@@ -576,6 +576,8 @@
 endif(NOT HAVE_STRUCT_TM_TM_ZONE)

 check_type_exists("struct tm" "sys/time.h" TM_IN_SYS_TIME)
+check_c_source_compiles("#include <sys/types.h>\n #include <sys/time.h>\n #include <time.h>\n int main() {if ((struct tm *) 0) return 0;}" TIME_WITH_SYS_TIME)
+check_c_source_compiles("#include <sys/types.h>\n #include <sys/select.h>\n #include <sys/time.h>\n int main(){return 0;}" SYS_SELECT_WITH_SYS_TIME)

 check_c_source_compiles("#include <sys/time.h>\n int main() {gettimeofday((struct timeval*)0,(struct timezone*)0);}" GETTIMEOFDAY_WITH_TZ)

@@ -1046,19 +1048,6 @@
     else { exit(1); } }"
     HAVE_BROKEN_POLL)

-if(HAVE_SYS_TIME_H)
-  check_include_files("sys/time.h;time.h" TIME_WITH_SYS_TIME)
-else(HAVE_SYS_TIME_H)
-  set(TIME_WITH_SYS_TIME 0)
-endif(HAVE_SYS_TIME_H)
-
-if(HAVE_SYS_TIME_H AND HAVE_SYS_SELECT_H)
-  check_include_files("sys/select.h;sys/time.h" SYS_SELECT_WITH_SYS_TIME)
-else(HAVE_SYS_TIME_H AND HAVE_SYS_SELECT_H)
-  set(SYS_SELECT_WITH_SYS_TIME 0)
-endif(HAVE_SYS_TIME_H AND HAVE_SYS_SELECT_H)
-
-

 # Check tzset(3) exists and works like we expect it to
 set(check_src ${PROJECT_BINARY_DIR}/ac_cv_working_tzset.c)


Implement HAVE_DECL_TZNAME declaration check

"If struct tm has a tm_zone member, define HAVE_STRUCT_TM_TM_ZONE
(and the obsoleted HAVE_TM_ZONE). Otherwise, if the external
array tzname is found, define HAVE_TZNAME; if it is declared,
define HAVE_DECL_TZNAME."
Source: http://www.gnu.org/software/autoconf/manual/autoconf.html#Particular-Structures

--- cmake/ConfigureChecks.cmake
+++ cmake/ConfigureChecks.cmake
@@ -548,8 +548,10 @@

 if(NOT HAVE_STRUCT_TM_TM_ZONE)
   check_variable_exists(tzname HAVE_TZNAME)
+  check_symbol_exists(tzname "time.h" HAVE_DECL_TZNAME)
 else(NOT HAVE_STRUCT_TM_TM_ZONE)
   set(HAVE_TZNAME 0)
+  set(HAVE_DECL_TZNAME 0)
 endif(NOT HAVE_STRUCT_TM_TM_ZONE)

 check_type_exists("struct tm" "sys/time.h" TM_IN_SYS_TIME)
@@ -1061,7 +1063,6 @@
 set(HAVE_PROTOTYPES 1)
 set(PTHREAD_SYSTEM_SCHED_SUPPORTED 1)
 set(HAVE_WORKING_TZSET 1)
-set(HAVE_DECL_TZNAME 0) # no test in python sources
 set(HAVE_DEVICE_MACROS ${HAVE_MAKEDEV})

 endif(WIN32)


Minor CTest updates

Minor CTest updates

- SRUN_COMMAND does not specify number of tasks
- Passing full path to ctest-wrapper.sh

--- cmake/Modules/Testing.cmake
+++ cmake/Modules/Testing.cmake
@@ -198,7 +198,7 @@
 # ------------------------------------------------------------------------ #
 set(SRUN_COMMAND )
 if(USE_SLURM AND SLURM_SRUN_COMMAND)
-    set(SRUN_COMMAND ${SLURM_SRUN_COMMAND} -n 1 -N 1 -C ${_MACHINE} -A ${ACCOUNT} -p ${QUEUE} --time=${TIME})
+    set(SRUN_COMMAND ${SLURM_SRUN_COMMAND} -N 1 -C ${_MACHINE} -A ${ACCOUNT} -p ${QUEUE} --time=${TIME})
 endif(USE_SLURM AND SLURM_SRUN_COMMAND)

 # get the python sets
@@ -214,7 +214,7 @@
 # add CXX unit test
 add_test(NAME cxx_toast_test
     WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-    COMMAND ${SRUN_COMMAND} ctest-wrapper.sh toast_test)
+    COMMAND ${SRUN_COMMAND} ${CMAKE_BINARY_DIR}/ctest-wrapper.sh ${CMAKE_BINARY_DIR}/toast_test)
 set_tests_properties(cxx_toast_test PROPERTIES
     LABELS "UnitTest;CXX" TIMEOUT 7200)

@@ -235,7 +235,7 @@
 if(USE_COVERAGE)
     add_test(NAME pyc_coverage
     WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-    COMMAND ${SRUN_COMMAND} ctest-wrapper.sh ${PYTHON_EXECUTABLE}
+    COMMAND ${SRUN_COMMAND} ${CMAKE_BINARY_DIR}/ctest-wrapper.sh ${PYTHON_EXECUTABLE}
         ${CMAKE_BINARY_DIR}/pyc_toast_test_coverage.py)
     set_tests_properties(pyc_coverage PROPERTIES
         LABELS "Coverage;Python" TIMEOUT 7200)


Fixed -samples debian package dependencies.

--- cmake/OpenCVPackaging.cmake
+++ cmake/OpenCVPackaging.cmake
@@ -64,7 +64,7 @@

 #depencencies
 set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE)
-set(CPACK_COMPONENT_samples_DEPENDS libs)
+set(CPACK_COMPONENT_samples_DEPENDS libs dev)
 set(CPACK_COMPONENT_dev_DEPENDS libs)
 set(CPACK_COMPONENT_docs_DEPENDS libs)
 set(CPACK_COMPONENT_java_DEPENDS libs)


fail the build if cppcheck emits errors

fail the build if cppcheck emits errors

consistently to the other "warnings as error" settings (e.g. clang-tidy), cppcheck should
return a nonzero exitcode when there are warnings

--- cmake/StaticAnalyzers.cmake
+++ cmake/StaticAnalyzers.cmake
@@ -7,6 +7,7 @@
   if(CPPCHECK)
     set(CMAKE_CXX_CPPCHECK
         ${CPPCHECK}
+        --error-exitcode=2
         --suppress=missingInclude
         --enable=all
         --inline-suppr


cmake: boilerplate update comment to CMake 3.20

boilerplate.cmake contained a comment referring to CMake 3.13.1 but
minimal required version is 3.20, so update the comment to 3.20.

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

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -17,7 +17,7 @@
 # It exists to reduce boilerplate code that Zephyr expects to be in
 # application CMakeLists.txt code.

-# CMake version 3.13.1 is the real minimum supported version.
+# CMake version 3.20 is the real minimum supported version.
 #
 # Unfortunately CMake requires the toplevel CMakeLists.txt file to
 # define the required version, not even invoking it from an included


compiler optimizations add -fno-math-errno

--- cmake/common/px4_base.cmake
+++ cmake/common/px4_base.cmake
@@ -371,6 +371,7 @@
 		-funsafe-math-optimizations
 		-ffunction-sections
 		-fdata-sections
+		-fno-math-errno
 		${PIC_FLAG}
 		)


fix mkldnn compile issue

fix mkldnn compile issue

--- cmake/external/mkldnn.cmake
+++ cmake/external/mkldnn.cmake
@@ -45,7 +45,8 @@
 ELSE()
     MESSAGE(FATAL_ERROR "Should enable MKLML when build MKLDNN")
 ENDIF()
-SET(MKLDNN_FLAG "-Wno-error=strict-overflow -Wno-error=unused-result -Wno-unused-result")
+SET(MKLDNN_FLAG "-Wno-error=strict-overflow -Wno-error=unused-result")
+SET(MKLDNN_FLAG "${MKLDNN_FLAG} -Wno-unused-result -Wno-unused-value")
 SET(MKLDNN_CFLAG "${CMAKE_C_FLAGS} ${MKLDNN_FLAG}")
 SET(MKLDNN_CXXFLAG "${CMAKE_CXX_FLAGS} ${MKLDNN_FLAG}")
 ExternalProject_Add(


CMake: Propagate build type to MKLDNN (#812)

--- cmake/external_mkldnn.cmake
+++ cmake/external_mkldnn.cmake
@@ -35,6 +35,7 @@
             # Uncomment below with any in-flight MKL-DNN patches
             # PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/third-party/patches/mkldnn-cmake-openmp.patch
             CMAKE_ARGS
+                -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
                 -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
                 -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
                 -DCMAKE_INSTALL_PREFIX=${EXTERNAL_PROJECTS_ROOT}/mkldnn
@@ -55,6 +56,7 @@
             # Uncomment below with any in-flight MKL-DNN patches
             # PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/third-party/patches/mkldnn-cmake-openmp.patch
             CMAKE_ARGS
+                -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
                 -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
                 -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
                 -DCMAKE_INSTALL_PREFIX=${EXTERNAL_PROJECTS_ROOT}/mkldnn


Export JARs as well as JAR_PATHS

Export JARs as well as JAR_PATHS

--- cmake/includes/Export.cmake
+++ cmake/includes/Export.cmake
@@ -170,8 +170,22 @@
         message(FATAL_ERROR "Set NAME parameter to the project name")
     endif()

+    string(TOUPPER ${EXP_NAME} EXP_NAME_uc)
+
+    set(export_file "${CMAKE_CURRENT_BINARY_DIR}/${EXP_NAME}Targets.cmake")
+    set(export_location ${CMAKE_PREFIX_PATH}/lib/cmake/${EXP_NAME})
+    set(export_config ${export_location}/${EXP_NAME}Config.cmake)
+    make_directory(${export_location})
+    file(WRITE ${export_config} "\n")
+
     # copy Java/Android targets
     if(EXP_JARS)
+        file(APPEND ${export_config} "set(${EXP_NAME_uc}_JARS \"\")\n")
+        foreach(j ${EXP_JARS})
+            file(APPEND ${export_config}
+                "list(APPEND ${EXP_NAME_uc}_JARS ${j})\n")
+        endforeach()
+
         install(
             FILES
                 ${EXP_JARS}
@@ -189,18 +203,12 @@
         )
     endif()

-    string(TOUPPER ${EXP_NAME} EXP_NAME_uc)
-
     # export jar files
     if (EXP_JAR_PATHS)
-        set(export_location ${CMAKE_PREFIX_PATH}/lib/cmake/${EXP_NAME})
-        set(export_config ${export_location}/${EXP_NAME}Config.cmake)
-        make_directory(${export_location})
-
-        file(WRITE ${export_config} "set(${EXP_NAME_uc}_JARS \"\")\n")
+        file(APPEND ${export_config} "set(${EXP_NAME_uc}_JAR_PATHS \"\")\n")
         foreach(j ${EXP_JAR_PATHS})
             file(APPEND ${export_config}
-                "list(APPEND ${EXP_NAME_uc}_JARS ${j})\n")
+                "list(APPEND ${EXP_NAME_uc}_JAR_PATHS ${j})\n")
         endforeach()
     endif()


Add order-dependencies to object libraries

Summary: If you are generating an object library that depends on table-gen generate sources, you need the object library to depend on the tablgen target. Currently llvm_add_library doesn't add dependencies for object libraries at all, which is clearly problematic.

Reviewers: compnerd, hintonda, smeenai

Reviewed By: smeenai

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65818

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -448,6 +448,9 @@
     list(APPEND objlibs ${obj_name})

     set_target_properties(${obj_name} PROPERTIES FOLDER "Object Libraries")
+    if(ARG_DEPENDS)
+      add_dependencies(${obj_name} ${ARG_DEPENDS})
+    endif()
   endif()

   if(ARG_SHARED AND ARG_STATIC)


updated macro

updated macro

--- cmake/oskar_packaging.cmake
+++ cmake/oskar_packaging.cmake
@@ -26,7 +26,7 @@
     find_program(SVN_EXECUTABLE svn DOC "subversion command line client")
     if (SVN_EXECUTABLE AND EXISTS ${OSKAR_SOURCE_DIR}/.svn)
         execute_process(COMMAND
-            ${SVN_EXECUTABLE} info ${dir}/oskar_global.h
+            ${SVN_EXECUTABLE} info ${dir}/oskar_global.h.in
             OUTPUT_VARIABLE ${variable}
             OUTPUT_STRIP_TRAILING_WHITESPACE)
         string(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*"


ISSUE #262 add .tx as one of the extensions for library?

--- cmake_modules/FindODA.cmake
+++ cmake_modules/FindODA.cmake
@@ -20,6 +20,10 @@

 set(ODA_LIB_NAMES
 	TD_ExamplesCommon TG_ExamplesCommon TG_Db TD_DbRoot TD_Gs TD_Gi TD_Ge TD_Root TD_Alloc)
+
+if(UNIX)
+	SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a" ".tx")
+endif(UNIX)

 if(DEFINED ENV{ODA_LIB_DIR})
 	set(ODA_LIB_DIR $ENV{ODA_LIB_DIR})


cmake: Fixup shield overlay and conf file search locations

* Fix dir name when shield name doesn't match the dir name.  So for
  shield 'x_nucleo_iks01a3_shub' we will look in now for
  x_nucleo_iks01a3/boards/<BOARD>.{overlay,conf} instead of
  x_nucleo_iks01a3_shub/boards/<BOARD>.{overlay,conf}

Signed-off-by: Kumar Gala <a5e5248af4cd4f0ed8c515f61d40a6e2db46a66e@linaro.org>

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -298,6 +298,7 @@
       list(FIND SHIELD_LIST ${s} _idx)
       if (NOT _idx EQUAL -1)
         list(GET shields_refs_list ${_idx} s_path)
+        get_filename_component(s_dir ${s_path} DIRECTORY)

         # if shield config flag is on, add shield overlay to the shield overlays
         # list and dts_fixup file to the shield fixup file
@@ -307,33 +308,33 @@
         )
         list(APPEND
           shield_dts_fixups
-          ${shield_dir}/${s}/dts_fixup.h
+          ${shield_dir}/${s_dir}/dts_fixup.h
         )

         # search for shield/boards/board.overlay file
-        if(EXISTS ${shield_dir}/${s}/boards/${BOARD}.overlay)
+        if(EXISTS ${shield_dir}/${s_dir}/boards/${BOARD}.overlay)
           # add shield/board overlay to the shield overlays list
           list(APPEND
             shield_dts_files
-            ${shield_dir}/${s}/boards/${BOARD}.overlay
+            ${shield_dir}/${s_dir}/boards/${BOARD}.overlay
           )
         endif()

         # search for shield/shield.conf file
-        if(EXISTS ${shield_dir}/${s}/${s}.conf)
+        if(EXISTS ${shield_dir}/${s_dir}/${s}.conf)
           # add shield.conf to the shield config list
           list(APPEND
             shield_conf_files
-            ${shield_dir}/${s}/${s}.conf
+            ${shield_dir}/${s_dir}/${s}.conf
           )
         endif()

         # search for shield/boards/board.conf file
-        if(EXISTS ${shield_dir}/${s}/boards/${BOARD}.conf)
+        if(EXISTS ${shield_dir}/${s_dir}/boards/${BOARD}.conf)
           # add HW specific board.conf to the shield config list
           list(APPEND
             shield_conf_files
-            ${shield_dir}/${s}/boards/${BOARD}.conf
+            ${shield_dir}/${s_dir}/boards/${BOARD}.conf
           )
         endif()
       else()


cmake: only optimize for size on NuttX

cmake: only optimize for size on NuttX

With this change only builds for NuttX which are very much flash size
constraint are optimized for size. All other builds (e.g. SITL,
Snapdragon, etc.) are left at the default for debugging or -O2 for the
usual use.

--- cmake/common/px4_base.cmake
+++ cmake/common/px4_base.cmake
@@ -675,7 +675,9 @@

 	if ($ENV{MEMORY_DEBUG} MATCHES "1")
 		message(STATUS "address sanitizer enabled")
-		set(max_optimization -Os)
+		if ("${OS}" STREQUAL "nuttx")
+			set(max_optimization -Os)
+		endif()

 		# Do not use optimization_flags (without _) as that is already used.
 		set(_optimization_flags
@@ -687,7 +689,11 @@
 			-g3 -fsanitize=address
 			)
 	else()
-		set(max_optimization -Os)
+		if ("${OS}" STREQUAL "nuttx")
+			set(max_optimization -Os)
+		else()
+			set(max_optimization -O2)
+		endif()

 		if ("${OS}" STREQUAL "qurt")
 			set(PIC_FLAG -fPIC)


px4_base.cmake: make sure px_update_git_header.py is executed in the source directory

otherwise the 'git describe' command can fail.

--- cmake/common/px4_base.cmake
+++ cmake/common/px4_base.cmake
@@ -932,6 +932,7 @@
 	add_custom_command(
 		OUTPUT __fake
 		COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_update_git_header.py ${OUT}
+		WORKING_DIRECTORY ${PX4_SOURCE_DIR}
 		COMMENT "Generating git hash header"
 		)
 	add_custom_target(ver_gen ALL


[CMake] Use if(... IN_LIST ...) instead of list(FIND...)

NFC. This is just a little code cleanup to make things easier to read and understand.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -776,8 +776,7 @@
   endif()
   add_llvm_executable(${name} ${ARGN})

-  list(FIND LLVM_TOOLCHAIN_TOOLS ${name} LLVM_IS_${name}_TOOLCHAIN_TOOL)
-  if (LLVM_IS_${name}_TOOLCHAIN_TOOL GREATER -1 OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+  if ( ${name} IN_LIST LLVM_TOOLCHAIN_TOOLS OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
     if( LLVM_BUILD_TOOLS )
       install(TARGETS ${name}
               EXPORT LLVMExports
@@ -1264,20 +1263,13 @@
     add_custom_target(${target_name} ALL DEPENDS ${output_path})
     set_target_properties(${target_name} PROPERTIES FOLDER Tools)

-    # Make sure the parent tool is a toolchain tool, otherwise exclude this tool
-    list(FIND LLVM_TOOLCHAIN_TOOLS ${dest} LLVM_IS_${dest}_TOOLCHAIN_TOOL)
-    if (NOT LLVM_IS_${dest}_TOOLCHAIN_TOOL GREATER -1)
-      set(LLVM_IS_${name}_TOOLCHAIN_TOOL ${LLVM_IS_${dest}_TOOLCHAIN_TOOL})
-    else()
-      list(FIND LLVM_TOOLCHAIN_TOOLS ${name} LLVM_IS_${name}_TOOLCHAIN_TOOL)
-    endif()
-
-    # LLVM_IS_${name}_TOOLCHAIN_TOOL will only be greater than -1 if both this
-    # tool and its parent tool are in LLVM_TOOLCHAIN_TOOLS
-    if (LLVM_IS_${name}_TOOLCHAIN_TOOL GREATER -1 OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
-      if( LLVM_BUILD_TOOLS )
-        llvm_install_symlink(${name} ${dest})
-      endif()
+    # Make sure both the link and target are toolchain tools
+    if (NOT ${name} IN_LIST LLVM_TOOLCHAIN_TOOLS OR NOT ${dest} IN_LIST LLVM_TOOLCHAIN_TOOLS)
+      return()
+    endif()
+
+    if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_TOOLS )
+      llvm_install_symlink(${name} ${dest})
     endif()
   endif()
 endfunction()


[CMake] Make LLVM_EXTERNAL_*_SOURCE_DIR consistent against older buildsites.

If corresponding in-tree subdirectory exists, just ignore LLVM_EXTERNAL* stuff.
Otherwise, set LLVM_TOOL_*_BUILD ON/OFF properly according to LLVM_EXTERNAL_*.

This makes easier to walk among old revisions *without* deleteing CMakeCache.txt.

Before r242059, LLVM_EXTERNAL_* was working like;

  if(EXISTS ${*_SOURCE_DIR}/CMakeLists.txt)
    set(*_BUILD ON CACHE)
    if(*_BUILD is ON)
      add_subdirectory(*_SOURCE_DIR)
    endif()
  endif()

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -694,20 +694,33 @@
     set(add_llvm_external_dir ${name})
   endif()
   canonicalize_tool_name(${name} nameUPPER)
-  if(NOT DEFINED LLVM_TOOL_${nameUPPER}_BUILD)
+  if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir}/CMakeLists.txt)
+    # Treat it as in-tree subproject.
     option(LLVM_TOOL_${nameUPPER}_BUILD
            "Whether to build ${name} as part of LLVM" On)
-  endif()
-  if (LLVM_TOOL_${nameUPPER}_BUILD)
-    if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir}/CMakeLists.txt)
-        add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir} ${add_llvm_external_dir})
-        set(LLVM_TOOL_${nameUPPER}_BUILD Off)
-    elseif(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR)
-      set(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR
-        "${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR}"
-        CACHE PATH "Path to ${name} source directory")
-      mark_as_advanced(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR)
+    mark_as_advanced(LLVM_TOOL_${name}_BUILD)
+    if(LLVM_TOOL_${nameUPPER}_BUILD)
+      add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir} ${add_llvm_external_dir})
+      # Don't process it in add_llvm_implicit_projects().
+      set(LLVM_TOOL_${nameUPPER}_BUILD OFF)
+    endif()
+  else()
+    set(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR
+      "${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR}"
+      CACHE PATH "Path to ${name} source directory")
+    set(LLVM_TOOL_${nameUPPER}_BUILD_DEFAULT ON)
+    if(NOT LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR OR NOT EXISTS ${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR})
+      set(LLVM_TOOL_${nameUPPER}_BUILD_DEFAULT OFF)
+    endif()
+    if("${LLVM_EXTERNAL_${nameUPPER}_BUILD}" STREQUAL "OFF")
+      set(LLVM_TOOL_${nameUPPER}_BUILD_DEFAULT OFF)
+    endif()
+    option(LLVM_TOOL_${nameUPPER}_BUILD
+      "Whether to build ${name} as part of LLVM"
+      ${LLVM_TOOL_${nameUPPER}_BUILD_DEFAULT})
+    if (LLVM_TOOL_${nameUPPER}_BUILD)
       add_subdirectory(${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR} ${add_llvm_external_dir})
+      # FIXME: It'd be redundant.
       set(LLVM_TOOL_${nameUPPER}_BUILD Off)
     endif()
   endif()
@@ -733,15 +746,6 @@
     if(IS_DIRECTORY "${dir}" AND EXISTS "${dir}/CMakeLists.txt")
       canonicalize_tool_name(${dir} name)
       option(LLVM_TOOL_${name}_BUILD
-           "Whether to build ${name} as part of LLVM" On)
-      mark_as_advanced(LLVM_TOOL_${name}_BUILD)
-    endif()
-  endforeach()
-  get_cmake_property(variableNames VARIABLES)
-  foreach (variableName ${variableNames})
-    get_project_name_from_src_var(${variableName} projectName)
-    if(projectName)
-      option(LLVM_TOOL_${projectName}_BUILD
            "Whether to build ${name} as part of LLVM" On)
       mark_as_advanced(LLVM_TOOL_${name}_BUILD)
     endif()


Edited gresource.cmake

Edited gresource.cmake

--- gresource.cmake
+++ gresource.cmake
@@ -3,33 +3,38 @@
 # resource_dir: Directory where the .gresource.xml is located.
 # resource_file: Filename of the .gresource.xml file (just the
 # filename, not the complete path).
-# output_dir: Directory where the C output file is written.
-# output_file: This variable will be set with the complete path of the
-# output C file.
+# output_dir: Directory where the .c and .h output files are written.
+# output_name: Basename of the output files (don't write extension)

 function (gresource resource_dir resource_file output_dir output_name)

-_pkgconfig_invoke("glib-2.0" GLIB2 PREFIX
-  "" "--variable=prefix")
-find_program(GLIB_COMPILE_RESOURCES
-             NAMES glib-compile-resources
-             HINTS ${GLIB2_PREFIX})
+	_pkgconfig_invoke("glib-2.0" GLIB2 PREFIX
+	  "" "--variable=prefix")
+	find_program(GLIB_COMPILE_RESOURCES
+	             NAMES glib-compile-resources
+	             HINTS ${GLIB2_PREFIX})

-if (NOT GLIB_COMPILE_RESOURCES)
-message(FATAL "Could not find glib-compile-resources")
-endif()
+	if (NOT GLIB_COMPILE_RESOURCES)
+		message(FATAL "Could not find glib-compile-resources")
+	endif()

-# Get the output file path
-set (output_c "${output_dir}/${output_name}.c")
-set (output_h "${output_dir}/${output_name}.h")
-set (${output_source} ${output_c} PARENT_SCOPE)
+	# Get the output file path
+	set (output_c "${output_dir}/${output_name}.c")
+	set (output_h "${output_dir}/${output_name}.h")

-# Command to compile the resources
-add_custom_command (
-	OUTPUT ${output_c}
-	WORKING_DIRECTORY ${resource_dir}
-	COMMAND ${GLIB_COMPILE_RESOURCES} --generate-source --manual-register --target=${output_c} ${resource_file}
-	COMMAND ${GLIB_COMPILE_RESOURCES} --generate-header --manual-register --target=${output_h} ${resource_file}
-	DEPENDS ${resource_dir}/${resource_file}
-)
+	# Command to compile the resources
+	add_custom_command (
+		OUTPUT ${output_c}
+		WORKING_DIRECTORY ${resource_dir}
+		COMMAND ${GLIB_COMPILE_RESOURCES}
+			--generate-source
+			--manual-register
+			--target=${output_c} ${resource_file}
+		COMMAND ${GLIB_COMPILE_RESOURCES}
+			--generate-header
+			--manual-register
+			--target=${output_h} ${resource_file}
+		DEPENDS ${resource_dir}/${resource_file}
+	)
+
 endfunction ()


Change url in AddTemplateAssembly to macth upstream

--- AddTemplateAssembly.cmake
+++ AddTemplateAssembly.cmake
@@ -5,7 +5,7 @@
 ExternalProject_Add(
     template-assembly
     PREFIX ${CMAKE_BINARY_DIR}/template-assembly
-    GIT_REPOSITORY https://github.com/izissise/Template-Assembly.git
+    GIT_REPOSITORY https://github.com/mattbierner/Template-Assembly.git
     TIMEOUT 10
     UPDATE_COMMAND ""
     CONFIGURE_COMMAND ""


Use ABSL_RUN_TESTS instead of BUILD_TESTING

--- CMake/AbseilHelpers.cmake
+++ CMake/AbseilHelpers.cmake
@@ -121,7 +121,7 @@
     ${ARGN}
   )

-  if (NOT ABSL_CC_LIB_TESTONLY OR BUILD_TESTING)
+  if (NOT ABSL_CC_LIB_TESTONLY OR ABSL_RUN_TESTS)
     set(_NAME "absl_${ABSL_CC_LIB_NAME}")
     string(TOUPPER ${_NAME} _UPPER_NAME)


Try to fix Mac compilation issues

Try to fix Mac compilation issues

--- CMake/hoomd/FindTBB.cmake
+++ CMake/hoomd/FindTBB.cmake
@@ -31,6 +31,7 @@
     add_library(TBB::tbb UNKNOWN IMPORTED)
     set_target_properties(TBB::tbb PROPERTIES
         IMPORTED_LOCATION_RELEASE "${TBB_LIBRARY}"
+        IMPORTED_LOCATION "${TBB_LIBRARY}"
         INTERFACE_INCLUDE_DIRECTORIES "${TBB_INCLUDE_DIR}")

     if (TBB_USE_GLIBCXX_VERSION)


CMake/Clang: suppress several warnings

CMake/Clang: suppress several warnings

--- modules/acore/cmake/compiler/clang/settings.cmake
+++ modules/acore/cmake/compiler/clang/settings.cmake
@@ -2,7 +2,7 @@
 add_definitions(-D_BUILD_DIRECTIVE='"$(CONFIGURATION)"')

 if(WITH_WARNINGS)
-  set(WARNING_FLAGS "-W -Wall -Wextra -Winit-self -Wfatal-errors")
+  set(WARNING_FLAGS "-W -Wall -Wextra -Winit-self -Wfatal-errors -Wno-mismatched-tags")
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS}")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS} -Woverloaded-virtual")
   message(STATUS "Clang: All warnings enabled")
@@ -14,4 +14,7 @@
   message(STATUS "Clang: Debug-flags set (-g3)")
 endif()

+# -Wno-narrowing needed to suppress a warning in g3d
+# -Wno-deprecated-register is needed to suppress 185 gsoap warnings on Unix systems.
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-narrowing -Wno-deprecated-register")
+set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG=1")


CMake: Bugfixes in configure_boost.cmake

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@29003 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/configure/configure_boost.cmake
+++ deal.II/cmake/configure/configure_boost.cmake
@@ -38,14 +38,17 @@
   #
   # We require at least version 1.44
   #
-  FIND_PACKAGE(Boost 1.44 COMPONENTS serialization system thread)
+  IF(DEAL_II_WITH_THREADS)
+    FIND_PACKAGE(Boost 1.44 COMPONENTS serialization system thread)
+  ELSE()
+    FIND_PACKAGE(Boost 1.44 COMPONENTS serialization system)
+  ENDIF()

-  IF(Boost_THREAD_FOUND AND
-     Boost_SERIALIZATION_FOUND AND
-     Boost_SYSTEM_FOUND)
+  IF( Boost_SERIALIZATION_FOUND AND
+      Boost_SYSTEM_FOUND AND
+      (NOT DEAL_II_WITH_THREADS OR Boost_THREAD_FOUND)
+    )
     SET(${var} TRUE)
-
-    # Get rid of this annoying unimportant variable:
     MARK_AS_ADVANCED(Boost_DIR)
   ENDIF()
 ENDMACRO()
@@ -53,6 +56,12 @@

 MACRO(FEATURE_BOOST_CONFIGURE_EXTERNAL)
   INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS})
+
+  #
+  # Remove "pthread" from Boost_LIBRARIES. Threading, if necessary, is
+  # already set up via configure_1_threads.cmake.
+  #
+  LIST(REMOVE_ITEM Boost_LIBRARIES "pthread")

   #
   # Transform  Boost_LIBRARIES into a list of debug and release libraries


Test documentation shortcut from istaller

git-svn-id: e0b5bbb11d0e9fdbbfcabba14dc32ad5d6b235bd@439 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/OpenMeshPackage.cmake
+++ cmake/OpenMeshPackage.cmake
@@ -22,8 +22,6 @@
 set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}")
 set (CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
 set (CPACK_SOURCE_STRIP_FILES "")
-
-# set (CPACK_STRIP_FILES "bin/OpenFlipper")

 # source package generation
 set (CPACK_SOURCE_GENERATOR "TGZ;TBZ2;ZIP")
@@ -119,25 +117,22 @@
   endif()

   # copy the glut library if it exists on windows
-  IF ( WIN32)
-    if (EXISTS ${CMAKE_BINARY_DIR}/Build/glut32.dll)
-	    install(FILES ${CMAKE_BINARY_DIR}/Build/glut32.dll
-	    DESTINATION ./
-           COMPONENT Applications
+  if (EXISTS ${CMAKE_BINARY_DIR}/Build/glut32.dll)
+    install(FILES ${CMAKE_BINARY_DIR}/Build/glut32.dll
+            DESTINATION ./
+            COMPONENT Applications
            )
-    endif()
   endif()

-   # copy the documentation if it exists
-   IF ( WIN32 )
-     if (EXISTS ${CMAKE_BINARY_DIR}/Build/Doc)
-	     install(DIRECTORY ${CMAKE_BINARY_DIR}/Build/Doc
-	     DESTINATION ./
+  # copy the documentation if it exists
+  if (EXISTS ${CMAKE_BINARY_DIR}/Build/Doc)
+    install(DIRECTORY ${CMAKE_BINARY_DIR}/Build/Doc
+            DESTINATION ./
             COMPONENT Applications
-            )
-     endif()
-   endif()
+           )
+  endif()

+  set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "CreateShortcut \\\"$SMPROGRAMS\\\\${CPACK_NSIS_DISPLAY_NAME}\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\Doc\\\\html\\\\index.html \\\" "  )

   # append dll's to installed package
   #if (EXISTS ${CMAKE_SOURCE_DIR}/WIN)


CMake: fix version comparison (#192)

CMake: fix version comparison (#192)

--- cmake/compilerOptions.cmake
+++ cmake/compilerOptions.cmake
@@ -89,7 +89,7 @@
 set(USE_GNU_LINK_FLAGS 0)
 set(USE_LLVM_MACOS_LINK_FLAGS 0)
 if (NOT MSVC)
-    if(${CMAKE_VERSION} GREATER "3.17")
+    if(${CMAKE_VERSION} VERSION_GREATER "3.17")
         include(CheckLinkerFlag)
         check_linker_flag(C "-Wl,--no-undefined" HAVE_LINK_NO_UNDEFINED)
         check_linker_flag(C "-Wl,-undefined,error" HAVE_LINK_UNDEFINED_ERROR)


Update default.cmake

Update default.cmake

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -24,7 +24,7 @@

 # NOTE: no names with spaces!

-hunter_config(buffer VERSION 0.1.6)
+hunter_config(buffer VERSION 0.1.7)
 hunter_config(AllTheFlopsThreads VERSION 0.1-p0)
 hunter_config(Android-Apk VERSION 1.1.13)
 hunter_config(Android-Build-Tools VERSION 22.0.1)


Update default.cmake

Update default.cmake

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -24,7 +24,7 @@

 # NOTE: no names with spaces!

-hunter_config(puffin-buffer VERSION 0.2.0.1)
+hunter_config(puffin-buffer VERSION 0.3.0.0)
 hunter_config(AllTheFlopsThreads VERSION 0.1-p0)
 hunter_config(Android-Apk VERSION 1.1.13)
 hunter_config(Android-Build-Tools VERSION 22.0.1)


[CMake] add_llvm_symbol_exports: Use unique name for each target.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -4,7 +4,7 @@

 function(add_llvm_symbol_exports target_name export_file)
   if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-    set(native_export_file "symbol.exports")
+    set(native_export_file "${target_name}.exports")
     add_custom_command(OUTPUT ${native_export_file}
       COMMAND sed -e "s/^/_/" < ${export_file} > ${native_export_file}
       DEPENDS ${export_file}
@@ -14,7 +14,7 @@
                  LINK_FLAGS " -Wl,-exported_symbols_list,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
   elseif(LLVM_HAVE_LINK_VERSION_SCRIPT)
     # Gold and BFD ld require a version script rather than a plain list.
-    set(native_export_file "symbol.exports")
+    set(native_export_file "${target_name}.exports")
     # FIXME: Don't write the "local:" line on OpenBSD.
     add_custom_command(OUTPUT ${native_export_file}
       COMMAND echo "{" > ${native_export_file}
@@ -28,7 +28,7 @@
     set_property(TARGET ${target_name} APPEND_STRING PROPERTY
                  LINK_FLAGS " -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
   else()
-    set(native_export_file "symbol.def")
+    set(native_export_file "${target_name}.def")

     set(CAT "type")
     if(CYGWIN)


cmake: fix CMP0046 warnings in case doxygen is not found

--- cmake/modules/Doxygen.cmake
+++ cmake/modules/Doxygen.cmake
@@ -34,4 +34,9 @@
     set(GENERATE_QHP     ${QHELPGENERATOR_FOUND})
     configure_file(doxygen.cfg.in ${CMAKE_BINARY_DIR}/doxygen.cfg)
     add_custom_target(doxygen-doc ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/doxygen.cfg)
+else()
+    # Suppress cmake policy CMP0046 warnings.
+    # This target is being used as a dependency in other targets,
+    # so it always needs to be available, even if empty.
+    add_custom_target(doxygen-doc)
 endif()


SET_SOURCE_FILES_PROPERTIES seems to be available from CMake 2.2.x no need to check for CMake version

--- make/FindONCRPC.cmake
+++ make/FindONCRPC.cmake
@@ -210,7 +210,6 @@
  ENDIF (WIN32)
  #inhibit compiler warning for generated files
  # Note that the inhibition is COMPILER dependent ...
- IF (CMAKE_PATCH_VERSION GREATER 3)
     # GNU CC specific warning stop
     IF (CMAKE_COMPILER_IS_GNUCC)
       MESSAGE(STATUS "INHIBIT Compiler warning for  generated files")
@@ -219,8 +218,7 @@

 	  SET_SOURCE_FILES_PROPERTIES(${${RPC_PREFIX}_RPCGEN_OUTPUT_SVC}
 	                                                           PROPERTIES COMPILE_FLAGS "-w -Wno-unused")
-    ENDIF(CMAKE_COMPILER_IS_GNUCC)
-  ENDIF(CMAKE_PATCH_VERSION GREATER 3)
+    ENDIF(CMAKE_COMPILER_IS_GNUCC)
 ENDMACRO(ONCRPC_SETUP)

 MARK_AS_ADVANCED(


build error on dependent projects

build error on dependent projects

--- build/build.cmake
+++ build/build.cmake
@@ -64,12 +64,12 @@

 	add_custom_command(TARGET platform_tests POST_BUILD
     COMMAND ${CMAKE_COMMAND} -E copy_if_different
-        "${PROJECT_SOURCE_DIR}/../tests/content/testdll.dll"
+        "${CMAKE_CURRENT_LIST_DIR}/../tests/content/testdll.dll"
         $<TARGET_FILE_DIR:platform_tests>)

 	add_custom_command(TARGET platform_tests POST_BUILD
     COMMAND ${CMAKE_COMMAND} -E copy_if_different
-        "${PROJECT_SOURCE_DIR}/../tests/content/test.txt"
+        "${CMAKE_CURRENT_LIST_DIR}/../tests/content/test.txt"
         $<TARGET_FILE_DIR:platform_tests>)

 endif()


Graph Control 5.2.0-rc5 Release Candidate 5

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

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


Split off 7.10.6

Split off 7.10.6

Signed-off-by: Gavin Halliday <2edfa8aca9fb78974188e5b35be8b52d4e4967ae@lexisnexis.com>

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


Split off 8.4.56

Split off 8.4.56

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

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


PKG: don't include xxx-config files in packages

--- Packaging/install_rule.cmake
+++ Packaging/install_rule.cmake
@@ -80,6 +80,8 @@
       continue()
     elseif("${sfile_ABS_LOWER}" MATCHES "\\.settings$")
       continue()
+    elseif("${sfile_ABS_LOWER}" MATCHES "-config$")
+      continue()
     else()
       if(UNIX)
         #the last else() loop where we run a 'file' command to find file type and directory


dummy commit-id

dummy commit-id

--- src/version_string.cmake
+++ src/version_string.cmake
@@ -16,8 +16,9 @@
     )
     if( NOT ${res_var} EQUAL 0 )
         message( WARNING "Git failed (not a repo, or no tags)." )
-        file(READ "git-tag.txt" GIT_COMMIT_ID)
-        message( STATUS "version_string.cmake read from file GIT_COMMIT_ID: " ${GIT_COMMIT_ID})
+        #file(READ "git-tag.txt" GIT_COMMIT_ID)
+        set( GIT_COMMIT_ID "unknown")
+        message( STATUS "version_string.cmake fallback GIT_COMMIT_ID: " ${GIT_COMMIT_ID})
     else()
         string( REPLACE "\n" "" GIT_COMMIT_ID ${GIT_COM_ID} )
         message( STATUS "version_string.cmake git set GIT_COMMIT_ID: " ${GIT_COMMIT_ID})


Making the inclusion of cad_tool.xrc conditional on wether OpenCASCADE is being built.

https://tracker.physiomeproject.org/show_bug.cgi?id=2648

git-svn-id: 4705079bc6b8aadf675e3696f5c015a6aa4916e3@7960 3c1deb5b-d424-0410-962d-aba41a686d42

--- source/cmake/xrc_source_files.cmake
+++ source/cmake/xrc_source_files.cmake
@@ -6,5 +6,7 @@
 	source/element/element_tool.xrc source/graphics/graphics_window.xrc
 	source/graphics/region_tree_viewer_wx.xrc source/graphics/spectrum_editor_wx.xrc
 	source/graphics/transform_tool.xrc source/material/material_editor_wx.xrc
-	source/node/node_tool.xrc source/node/node_viewer_wx.xrc
-	source/cad/cad_tool.xrc )
+	source/node/node_tool.xrc source/node/node_viewer_wx.xrc )
+IF( USE_OPENCASCADE )
+	SET( XRC_SRCS ${XRC_SRCS} source/cad/cad_tool.xrc )
+ENDIF( USE_OPENCASCADE )


applied python 3 compat patch from #3222

--- core/rosbuild/private.cmake
+++ core/rosbuild/private.cmake
@@ -369,7 +369,7 @@

 macro(_rosbuild_get_clock var)
   execute_process(
-    COMMAND python -c "import time; print time.time()"
+    COMMAND python -c "import time, sys; sys.stdout.write(str(time.time()));"
     OUTPUT_VARIABLE ${var}
     ERROR_VARIABLE _time_error
     RESULT_VARIABLE _time_failed
@@ -403,7 +403,7 @@
     # Call Python to compare the provided time to the latest mtime on all
     # the files
     execute_process(
-      COMMAND python -c "import os; print 1 if set(${_pylist}) != set(${_cached_pylist}) or ${_t} < max(os.stat(f).st_mtime for f in ${_pylist}) else 0;"
+      COMMAND python -c "import os, sys; sys.stdout.write('1' if set(${_pylist}) != set(${_cached_pylist}) or ${_t} < max(os.stat(f).st_mtime for f in ${_pylist}) else '0');"
       OUTPUT_VARIABLE ${var}
       ERROR_VARIABLE _mtime_error
       RESULT_VARIABLE _mtime_failed


more debug output from test.cmake script

--- scripts/test.cmake
+++ scripts/test.cmake
@@ -132,7 +132,13 @@
   update_test_models()
 ENDIF()
 ctest_configure()
-ctest_build()
+
+ctest_build(RETURN_VALUE retval)
+message("test.cmake: ctest_build return value = ${retval}")
+IF (NOT retval EQUAL 0)
+  message(FATAL_ERROR "test.cmake: build failed")
+ENDIF()
+
 IF (EMBREE_TESTING_INTENSITY GREATER 0)
   ctest_test(RETURN_VALUE retval)
   message("test.cmake: ctest_test return value = ${retval}")


test QuickDraw.FrameRoundRect no longer expected to fail

--- tests/test-properties.cmake
+++ tests/test-properties.cmake
@@ -8,5 +8,4 @@
         FileTest.MakeFSSpec
         QuickDraw.PaintCircle
         QuickDraw.FrameCircle1
-        QuickDraw.FrameRoundRect
     APPEND PROPERTIES LABELS xfail)


Squashed 'lib/settingsnode/' changes from dc32d18..838ff6e

838ff6e Use keyword version of target_link_libraries

git-subtree-dir: lib/settingsnode
git-subtree-split: 838ff6e5e4c727fc04300d22e9a9bba6b92b6efc

--- settingsnode.cmake
+++ settingsnode.cmake
@@ -18,6 +18,6 @@
   add_library(settingsnode INTERFACE)
   function(include_settingsnode TARGET)
     set_property(TARGET settingsnode PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SETTINGSNODE_MODULES_PATH}/include)
-    target_link_libraries(${TARGET} settingsnode)
+    target_link_libraries(${TARGET} PRIVATE settingsnode)
   endfunction()
 endif()


ci: Workaround ASAN ODR failures

ci: Workaround ASAN ODR failures

--- scripts/ci/cmake/ci-fedora-asan.cmake
+++ scripts/ci/cmake/ci-fedora-asan.cmake
@@ -2,10 +2,10 @@

 set(ENV{CC}  clang)
 set(ENV{CXX} clang++)
-set(ASAN_FLAGS "-fsanitize=address -fno-omit-frame-pointer -pthread")
+set(ASAN_FLAGS "-fsanitize=address -fno-omit-frame-pointer -pthread -mllvm -asan-use-private-alias=1 -Wno-unused-command-line-argument")
+set(ENV{ASAN_OPTIONS} "use_odr_indicator=1")
 set(ENV{CFLAGS}   "${ASAN_FLAGS}")
 set(ENV{CXXFLAGS} "${ASAN_FLAGS}")
-set(ENV{FFLAGS}   "${ASAN_FLAGS}")

 set(dashboard_cache "
 ADIOS2_USE_Fortran:STRING=OFF


Rewrite of FindMKL.cmake: parse MKL_VERSION

--- modules/FindMKL.cmake
+++ modules/FindMKL.cmake
@@ -230,3 +230,47 @@
     PATH_SUFFIXES ${_MKL_PATH_SUFFIXES}
   )
 endif()
+
+# ------------------------------------------------------------------------------
+#  Extract version information from mkl.h (or mkl_version.h in newer versions)
+# ------------------------------------------------------------------------------
+
+# Set MKL_FOUND based only on header location and version.
+# It will be updated below for component libraries.
+if (MKL_INCLUDE_DIR)
+  # Extract __INTEL_MKL__, __INTEL_MKL_MINOR__ and __INTEL_MKL_UPDATE__ from
+  # mkl.h or mkl_version.h
+  if(EXISTS "${MKL_INCLUDE_DIR}/mkl_version.h")
+    file(STRINGS "${MKL_INCLUDE_DIR}/mkl_version.h" _MKL_VERSION_CONTENTS REGEX "#define __INTEL_MKL(_MINOR|_UPDATE)?__ ")
+  else()
+    file(STRINGS "${MKL_INCLUDE_DIR}/mkl.h" _MKL_VERSION_CONTENTS REGEX "#define __INTEL_MKL(_MINOR|_UPDATE)?__ ")
+  endif()
+
+  if("${_MKL_VERSION_CONTENTS}" MATCHES "#define __INTEL_MKL__ ([0-9]+)")
+    set(MKL_MAJOR_VERSION "${CMAKE_MATCH_1}")
+  endif()
+  if("${_MKL_VERSION_CONTENTS}" MATCHES "#define __INTEL_MKL_MINOR__ ([0-9]+)")
+    set(MKL_MINOR_VERSION "${CMAKE_MATCH_1}")
+  endif()
+  if("${_MKL_VERSION_CONTENTS}" MATCHES "#define __INTEL_MKL_UPDATE__ ([0-9]+)")
+    set(MKL_UPDATE_VERSION "${CMAKE_MATCH_1}")
+  endif()
+  unset(_MKL_VERSION_CONTENTS)
+
+  math(EXPR MKL_VERSION "${MKL_MAJOR_VERSION} * 10000 + ${MKL_MINOR_VERSION} * 100 + ${MKL_UPDATE_VERSION}")
+  set(_MKL_VERSION "${MKL_MAJOR_VERSION}.${MKL_MINOR_VERSION}.${MKL_UPDATE_VERSION}")
+  if (NOT MKL_FIND_QUIETLY)
+    message(STATUS "Found MKL: ${MKL_INCLUDE_DIR} (found version \"${_MKL_VERSION}\")")
+  endif()
+
+  # Check version against any requested
+  if (MKL_FIND_VERSION_EXACT AND NOT "${_MKL_VERSION}" VERSION_EQUAL "${MKL_FIND_VERSION}")
+    set(MKL_FOUND 0)
+  elseif (MKL_FIND_VERSION AND "${_MKL_VERSION}" VERSION_LESS "${MKL_FIND_VERSION}")
+    set(MKL_FOUND 0)
+  else()
+    set(MKL_FOUND 1)
+    set(MKL_INCLUDE_DIRS ${MKL_INCLUDE_DIR})
+  endif()
+  unset(_MKL_VERSION)
+endif()