Bug in test when DYLD_LIBRARY_PATH not empty

--- tests/create_environment_script.cmake
+++ tests/create_environment_script.cmake
@@ -88,7 +88,7 @@
     "${PROJECT_BINARY_DIR}/lib32"
 )
 check_path()
-try_execute(dyld OUTPUT "${expected}")
+try_execute(dyld OUTPUT "$ENV{DYLD_LIBRARY_PATH}")

 # add a system environment path -- should not be added to ldpaths
 # for simplicity, do this first: the file ldpaths should not be created by call


No DA for MFT for the moment

No DA for MFT for the moment

--- cmake/CMakeDA.cmake
+++ cmake/CMakeDA.cmake
@@ -11,7 +11,7 @@

 #list of detectors
 #set(ONLINEDETECTORS T00)
-set(ONLINEDETECTORS SPD SDD SSD ACO GRP TST HLT EMC TRI T00 PMD CPV PHS FMD TPC TRD ZDC V00 MTR MCH HMP TOF MFT)
+set(ONLINEDETECTORS SPD SDD SSD ACO GRP TST HLT EMC TRI T00 PMD CPV PHS FMD TPC TRD ZDC V00 MTR MCH HMP TOF)
 function(expand output input)
     string(REGEX MATCH "\\\${[^}]*}" m "${input}")
     while(m)
@@ -25,7 +25,7 @@
 #function to get module for detector
 function (detector_module _module detector)
   #Map of online detectors to DA in pairs of ONLINEDETECTORNAME DAMODULE
-  set (DETECTORMODULEMAP SPD ITS SDD ITS SSD ITS HMP HMPID PHS PHOS CPV PHOS MCH MUON MTR MUON T00 T0 V00 VZERO ACO ACORDE EMC EMCAL MFT)
+  set (DETECTORMODULEMAP SPD ITS SDD ITS SSD ITS HMP HMPID PHS PHOS CPV PHOS MCH MUON MTR MUON T00 T0 V00 VZERO ACO ACORDE EMC EMCAL)
   list(FIND DETECTORMODULEMAP ${detector} _index)
   if(_index STREQUAL "-1")
     set(${_module} "${detector}" PARENT_SCOPE)


Remove debug message (#1950)

Remove debug message (#1950)

--- cmake/FindHIP.cmake
+++ cmake/FindHIP.cmake
@@ -75,7 +75,6 @@
         endif()
         # And push it back to the cache
         set(HIP_ROOT_DIR ${HIP_ROOT_DIR} CACHE PATH "HIP installed location" FORCE)
-        message("Found HIP at ${HIP_ROOT_DIR}")
     endif()

     # Find HIPCC executable


moved: FindXCB.cmake to hugh-build-system

--- cmake/FindXCB.cmake
+++ cmake/FindXCB.cmake
@@ -1,54 +0,0 @@
-#.rst:
-# FindXCB
-# -------
-#
-# Find XCB libraries
-#
-# Tries to find xcb libraries on unix systems.
-#
-# - Be sure to set the COMPONENTS to the components you want to link to
-# - COMPONENTS need to be specified by full name (e.g., xcb-util)
-# - The XCB_LIBRARIES variable is set ONLY to your COMPONENTS list
-# - To use only a specific component check the XCB_LIBRARIES_${COMPONENT} variable
-#
-# The following values are defined
-#
-# ::
-#
-#   XCB_FOUND         - True if xcb is available
-#   XCB_INCLUDE_DIRS  - Include directories for xcb
-#   XCB_LIBRARIES     - List of libraries for xcb
-#   XCB_DEFINITIONS   - List of definitions for xcb
-#
-#=============================================================================
-# Copyright (c) 2015 Jari Vetoniemi
-#
-# Distributed under the OSI-approved BSD License (the "License");
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-
-include(FeatureSummary)
-set_package_properties(XCB PROPERTIES
-   URL "http://xcb.freedesktop.org/"
-   DESCRIPTION "X protocol C-language Binding")
-
-find_package(PkgConfig)
-pkg_check_modules(PC_XCB QUIET xcb ${XCB_FIND_COMPONENTS})
-
-find_library(XCB_LIBRARIES xcb HINTS ${PC_XCB_LIBRARY_DIRS})
-find_path(XCB_INCLUDE_DIRS xcb/xcb.h PATH_SUFFIXES xcb HINTS ${PC_XCB_INCLUDE_DIRS})
-
-foreach(COMPONENT ${XCB_FIND_COMPONENTS})
-	find_library(XCB_LIBRARIES_${COMPONENT} ${COMPONENT} HINTS ${PC_XCB_LIBRARY_DIRS})
-	list(APPEND XCB_LIBRARIES ${XCB_LIBRARIES_${COMPONENT}})
-	mark_as_advanced(XCB_LIBRARIES_${COMPONENT})
-endforeach(COMPONENT ${XCB_FIND_COMPONENTS})
-
-set(XCB_DEFINITIONS ${PC_XCB_CFLAGS_OTHER})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(XCB DEFAULT_MSG XCB_LIBRARIES XCB_INCLUDE_DIRS)
-mark_as_advanced(XCB_INCLUDE_DIRS XCB_LIBRARIES XCB_DEFINITIONS)


Require explicit opt-in to use pre-compiled gbc

Before this change, the build would look for pre-compiled gbc in a lot
of places on the system. It would often find gbc from a prior install of
Bond. However, this frequently causes the build to fail. Now, it only
looks for pre-compiled gbc in the directory specified by the environment
variable BOND_GBC_PATH. Alternatively, if the CMake variable
BOND_GBC_PATH is set, that will be used directly.

--- cmake/Config.cmake
+++ cmake/Config.cmake
@@ -6,9 +6,12 @@
 find_program (BOND_GBC_PATH "gbc"
     HINTS ENV BOND_GBC_PATH
     DOC ${BOND_GBC_PATH_DESCRIPTION}
-    # We don't really want to pull gbc from the system path. If someone
-    # wants to do that, they'll need to set BOND_GBC_PATH instead.
-    NO_SYSTEM_ENVIRONMENT_PATH)
+    # We only want to look for gbc if the user explicitly set the
+    # environment variable BOND_GBC_PATH. (If they set the CMake variable
+    # BOND_GBC_PATH explicitly, find_program won't change it, allowing it to
+    # take precedence.) We don't want CMake to go looking elsewhere, so we
+    # turn off all its default search paths.
+    NO_DEFAULT_PATH)

 if (BOND_GBC_PATH)
     set (GBC_EXECUTABLE ${BOND_GBC_PATH})


Some minor cleaning up of common CMake file [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -50,7 +50,7 @@
             RUN_OUTPUT_VARIABLE ARCHITECTURE)

     IF(NOT ${ARCHITECTURE} EQUAL 32 AND NOT ${ARCHITECTURE} EQUAL 64)
-        MESSAGE(FATAL_ERROR "Sorry, but OpenCOR can only be built in 32-bit or 64-bit mode...")
+        MESSAGE(FATAL_ERROR "OpenCOR can only be built in 32-bit or 64-bit mode...")
     ENDIF()

     # By default, we are building a release version of OpenCOR, unless we are
@@ -297,7 +297,7 @@
     SET(TYPE_OF_PARAMETER 0)

     FOREACH(PARAMETER ${ARGN})
-        IF(${PARAMETER} STREQUAL "THIRD_PARTY")
+        IF("${PARAMETER}" STREQUAL "THIRD_PARTY")
             # We are dealing with a third-party plugin, so disable all warnings
             # since it may generate some and this is not something we have
             # control over
@@ -317,31 +317,31 @@
             IF(WIN32)
                 ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
             ENDIF()
-        ELSEIF(${PARAMETER} STREQUAL "SOURCES")
+        ELSEIF("${PARAMETER}" STREQUAL "SOURCES")
             SET(TYPE_OF_PARAMETER 1)
-        ELSEIF(${PARAMETER} STREQUAL "HEADERS_MOC")
+        ELSEIF("${PARAMETER}" STREQUAL "HEADERS_MOC")
             SET(TYPE_OF_PARAMETER 2)
-        ELSEIF(${PARAMETER} STREQUAL "UIS")
+        ELSEIF("${PARAMETER}" STREQUAL "UIS")
             SET(TYPE_OF_PARAMETER 3)
-        ELSEIF(${PARAMETER} STREQUAL "INCLUDE_DIRS")
+        ELSEIF("${PARAMETER}" STREQUAL "INCLUDE_DIRS")
             SET(TYPE_OF_PARAMETER 4)
-        ELSEIF(${PARAMETER} STREQUAL "DEFINITIONS")
+        ELSEIF("${PARAMETER}" STREQUAL "DEFINITIONS")
             SET(TYPE_OF_PARAMETER 5)
-        ELSEIF(${PARAMETER} STREQUAL "PLUGINS")
+        ELSEIF("${PARAMETER}" STREQUAL "PLUGINS")
             SET(TYPE_OF_PARAMETER 6)
-        ELSEIF(${PARAMETER} STREQUAL "PLUGIN_BINARIES")
+        ELSEIF("${PARAMETER}" STREQUAL "PLUGIN_BINARIES")
             SET(TYPE_OF_PARAMETER 7)
-        ELSEIF(${PARAMETER} STREQUAL "QT_MODULES")
+        ELSEIF("${PARAMETER}" STREQUAL "QT_MODULES")
             SET(TYPE_OF_PARAMETER 8)
-        ELSEIF(${PARAMETER} STREQUAL "QT_LIBRARIES")
+        ELSEIF("${PARAMETER}" STREQUAL "QT_LIBRARIES")
             SET(TYPE_OF_PARAMETER 9)
-        ELSEIF(${PARAMETER} STREQUAL "EXTERNAL_BINARIES_DIR")
+        ELSEIF("${PARAMETER}" STREQUAL "EXTERNAL_BINARIES_DIR")
             SET(TYPE_OF_PARAMETER 10)
-        ELSEIF(${PARAMETER} STREQUAL "EXTERNAL_BINARIES")
+        ELSEIF("${PARAMETER}" STREQUAL "EXTERNAL_BINARIES")
             SET(TYPE_OF_PARAMETER 11)
-        ELSEIF(${PARAMETER} STREQUAL "EXTERNAL_LIBRARIES")
+        ELSEIF("${PARAMETER}" STREQUAL "EXTERNAL_LIBRARIES")
             SET(TYPE_OF_PARAMETER 12)
-        ELSEIF(${PARAMETER} STREQUAL "TESTS")
+        ELSEIF("${PARAMETER}" STREQUAL "TESTS")
             SET(TYPE_OF_PARAMETER 13)
         ELSE()
             # Not one of the headers, so add the parameter to the corresponding
@@ -470,7 +470,7 @@

     # External binaries

-    IF(NOT ${EXTERNAL_BINARIES_DIR} STREQUAL "")
+    IF(NOT "${EXTERNAL_BINARIES_DIR}" STREQUAL "")
         FOREACH(EXTERNAL_BINARY ${EXTERNAL_BINARIES})
             TARGET_LINK_LIBRARIES(${PROJECT_NAME}
                 ${EXTERNAL_BINARIES_DIR}/${EXTERNAL_BINARY}
@@ -667,7 +667,7 @@

                 # External binaries

-                IF(NOT ${EXTERNAL_BINARIES_DIR} STREQUAL "")
+                IF(NOT "${EXTERNAL_BINARIES_DIR}" STREQUAL "")
                     FOREACH(EXTERNAL_BINARY ${EXTERNAL_BINARIES})
                         TARGET_LINK_LIBRARIES(${TEST_NAME}
                             ${EXTERNAL_BINARIES_DIR}/${EXTERNAL_BINARY}
@@ -713,9 +713,9 @@
     SET(TYPE_OF_PARAMETER 0)

     FOREACH(PARAMETER ${ARGN})
-        IF(${PARAMETER} STREQUAL "INCLUDE_DIRS")
+        IF("${PARAMETER}" STREQUAL "INCLUDE_DIRS")
             SET(TYPE_OF_PARAMETER 1)
-        ELSEIF(${PARAMETER} STREQUAL "QT_LIBRARIES")
+        ELSEIF("${PARAMETER}" STREQUAL "QT_LIBRARIES")
             SET(TYPE_OF_PARAMETER 2)
         ELSE()
             # Not one of the headers, so add the parameter to the corresponding


Some minor cleaning up [ci skip].

Some minor cleaning up [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -903,7 +903,7 @@

         COPY_FILE_TO_BUILD_DIR(DIRECT_COPY ${PLUGIN_ORIG_DIRNAME} ${PLUGIN_DEST_DIRNAME} ${PLUGIN_FILENAME})

-        # Strip the Qt plugin of all local symbols
+        # Strip the Qt plugin of all its local symbols

         IF(RELEASE_MODE)
             ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
@@ -920,7 +920,7 @@
 #===============================================================================

 MACRO(LINUX_DEPLOY_LIBRARY DIRNAME FILENAME)
-    # Strip the library of all local symbols
+    # Strip the library of all its local symbols

     IF(RELEASE_MODE)
         ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
@@ -961,7 +961,7 @@
 #===============================================================================

 MACRO(OS_X_CLEAN_UP_FILE_WITH_QT_LIBRARIES PROJECT_TARGET DIRNAME FILENAME)
-    # Strip the Qt file of all local symbols
+    # Strip the Qt file of all its local symbols

     SET(FULL_FILENAME ${DIRNAME}/${FILENAME})

@@ -1047,7 +1047,7 @@
                        COMMAND ${CMAKE_COMMAND} -E copy ${DIRNAME}/${LIBRARY_FILENAME}
                                                         ${LIBRARY_FILEPATH})

-    # Strip the library of all local symbols
+    # Strip the library of all its local symbols

     IF(RELEASE_MODE)
         ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD


Added __init__.py missing in ortools python subdirs

--- cmake/python.cmake
+++ cmake/python.cmake
@@ -15,6 +15,26 @@
     ${CMAKE_CURRENT_SOURCE_DIR}/ortools/__init__.py
     DESTINATION
     ${CMAKE_CURRENT_BINARY_DIR}/ortools/)
+
+FILE(COPY
+    ${CMAKE_CURRENT_SOURCE_DIR}/ortools/__init__.py
+    DESTINATION
+    ${CMAKE_CURRENT_BINARY_DIR}/ortools/constraint_solver/)
+
+FILE(COPY
+    ${CMAKE_CURRENT_SOURCE_DIR}/ortools/__init__.py
+    DESTINATION
+    ${CMAKE_CURRENT_BINARY_DIR}/ortools/linear_solver/)
+
+FILE(COPY
+    ${CMAKE_CURRENT_SOURCE_DIR}/ortools/__init__.py
+    DESTINATION
+    ${CMAKE_CURRENT_BINARY_DIR}/ortools/graph/)
+
+FILE(COPY
+    ${CMAKE_CURRENT_SOURCE_DIR}/ortools/__init__.py
+    DESTINATION
+    ${CMAKE_CURRENT_BINARY_DIR}/ortools/algorithms/)

 FILE(COPY
     ${CMAKE_CURRENT_SOURCE_DIR}/ortools
@@ -46,4 +66,4 @@
     COMMAND ${CMAKE_COMMAND} -E touch ${PY_OUTPUT}
     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ortools/__init__.py)
 ADD_CUSTOM_TARGET(py${PROJECT_NAME} ALL DEPENDS ${PY_OUTPUT})
-# INSTALL(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/setup.py install)")
+INSTALL(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/setup.py install)")


Added debug library detection in FindBuzz.cmake

--- src/utility/FindBuzz.cmake
+++ src/utility/FindBuzz.cmake
@@ -107,6 +107,14 @@
   DOC "Location of the Buzz library")

 #
+# Look for Buzz library
+#
+find_library(BUZZ_LIBRARY_DEBUG
+  NAMES buzzdbg
+  PATHS ${_BUZZ_LIBRARY_PATHS}
+  DOC "Location of the Buzz debug library")
+
+#
 # Look for Buzz C include files
 #
 find_path(BUZZ_C_INCLUDE_DIR
@@ -126,6 +134,6 @@
 # if all listed variables are TRUE
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(BUZZ
-  REQUIRED_VARS BUZZ_COMPILER BUZZ_PARSER BUZZ_ASSEMBLER BUZZ_LIBRARY BUZZ_C_INCLUDE_DIR BUZZ_BZZ_INCLUDE_DIR)
+  REQUIRED_VARS BUZZ_COMPILER BUZZ_PARSER BUZZ_ASSEMBLER BUZZ_LIBRARY BUZZ_LIBRARY_DEBUG BUZZ_C_INCLUDE_DIR BUZZ_BZZ_INCLUDE_DIR)

-mark_as_advanced(BUZZ_COMPILER BUZZ_PARSER BUZZ_ASSEMBLER BUZZ_LIBRARY BUZZ_C_INCLUDE_DIR BUZZ_BZZ_INCLUDE_DIR)
+mark_as_advanced(BUZZ_COMPILER BUZZ_PARSER BUZZ_ASSEMBLER BUZZ_LIBRARY BUZZ_LIBRARY_DEBUG BUZZ_C_INCLUDE_DIR BUZZ_BZZ_INCLUDE_DIR)


nv tools.

nv tools.


build: disable the tests of sinsp/scap deps

Co-authored-by: Lorenzo Fontana <638e8f0171575864326f06d2a5f8e72287427b15@linux.com>
Signed-off-by: Leonardo Di Donato <2012e0ca99d70aa6c893822ff73002216e5dba72@gmail.com>


Link linux tests against glfw

Link linux tests against glfw

--- toolchains/linux.tests.cmake
+++ toolchains/linux.tests.cmake
@@ -27,7 +27,7 @@

     add_executable(${EXECUTABLE_NAME} ${_src_file_path} ${LINUX_PLATFORM_SRC})

-    target_link_libraries(${EXECUTABLE_NAME} core -lcurl ${GLFW_LIBRARIES})
+    target_link_libraries(${EXECUTABLE_NAME} core -lcurl glfw ${GLFW_LIBRARIES})
 endforeach(_src_file_path ${TEST_SOURCES})

 # copy resources in order to make tests with resources dependency


(CMAKE) Put backends/cmake/ directory in CMAKE_MODULE_PATH.

--- backends/cmake/project.cmake
+++ backends/cmake/project.cmake
@@ -1,3 +1,5 @@
+set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/)
+
 #configure compiler
 include(arm-none-eabi-gcc)


boards: mps3_an547: Update obsolete emulation instructions

The commit 94428044e2addec0bb631d33821cd0c6086bc243, which introduced
this behavioural change, forgot to update the instructions provided in
the comments.

This commit updates the obsolete instructions for using an alternate
emulation platform in the comments.

Signed-off-by: Stephanos Ioannidis <dc76e9f0c0006e8f919e0c515c66dbba3982f785@stephanos.io>

--- boards/arm/mps3_an547/board.cmake
+++ boards/arm/mps3_an547/board.cmake
@@ -4,10 +4,10 @@
 # The AN547 FVP must be used to enable Ethos-U55 NPU support, but QEMU also
 # supports the AN547 without the NPU.
 #
-# To use QEMU instead of the FVP as an emulation platform, set 'EMU_PLATFORM'
-# to 'qemu' instead of 'armfvp', for example:
+# For emulation, QEMU is used by default. To use AN547 FVP as an emulation
+# use the 'run_armfvp' target, for example:
 #
-# $ west build -b mps3_an547 samples/hello°world -DEMU_PLATFORM=qemu -t run
+# $ west build -b mps3_an547 samples/hello_world -t run_armfvp

 set(SUPPORTED_EMU_PLATFORMS qemu armfvp)


HTCONDOR-1133 Turn off boinc backfill support by default

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -708,7 +708,7 @@
 option(HAVE_HIBERNATION "Support for condor controlled hibernation" ON)
 option(HAVE_JOB_HOOKS "Enable job hook functionality" ON)
 option(HAVE_BACKFILL "Compiling support for any backfill system" ON)
-option(HAVE_BOINC "Compiling support for backfill with BOINC" ON)
+option(HAVE_BOINC "Compiling support for backfill with BOINC" OFF)
 option(SOFT_IS_HARD "Enable strict checking for WITH_<LIB>" OFF)
 option(WANT_CONTRIB "Enable building of contrib modules" OFF)
 option(WANT_GLEXEC "Build and install condor glexec functionality" OFF)
@@ -962,7 +962,9 @@
             add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/voms/2.1.0)
         endif()
     endif()
-	add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/boinc/7.14.1)
+	if (HAVE_BOINC)
+		add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/boinc/7.14.1)
+	endif()

         if (LINUX)
           option(WITH_GANGLIA "Compiling with support for GANGLIA" ON)


cmake: clang: Provide toolchain_cc_nostdinc() macro

native_posix should build with standard includes.

Signed-off-by: Oleg Zhurakivskyy <cdb82bfa180f8df716a77d2c2557196a597a233c@intel.com>

--- cmake/compiler/clang/target.cmake
+++ cmake/compiler/clang/target.cmake
@@ -62,6 +62,13 @@
 string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")

 # Load toolchain_cc-family macros
+
+macro(toolchain_cc_nostdinc)
+  if(NOT "${ARCH}" STREQUAL "posix")
+    zephyr_compile_options( -nostdinc)
+  endif()
+endmacro()
+
 # Clang and GCC are almost feature+flag compatible, so reuse freestanding gcc
 include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_security_canaries.cmake)
 include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_optimizations.cmake)


Update onnxruntime_unittests.cmake (#10215)

--- cmake/onnxruntime_unittests.cmake
+++ cmake/onnxruntime_unittests.cmake
@@ -1170,6 +1170,9 @@
   onnxruntime_add_shared_library_module(custom_op_library ${ONNXRUNTIME_SHARED_LIB_TEST_SRC_DIR}/cuda_ops.cu
                                                           ${TEST_SRC_DIR}/testdata/custom_op_library/custom_op_library.cc)
   target_include_directories(custom_op_library PRIVATE ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
+  if (HAS_QSPECTRE)
+    target_compile_options(custom_op_library PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /Qspectre>")
+  endif()
 else()
   onnxruntime_add_shared_library_module(custom_op_library ${TEST_SRC_DIR}/testdata/custom_op_library/custom_op_library.cc)
 endif()


Fix Catch URL

Fix Catch URL

--- cmake/projects/Catch/hunter.cmake
+++ cmake/projects/Catch/hunter.cmake
@@ -37,7 +37,7 @@
     VERSION
     "1.5.9"
     URL
-    "https://github.com/hunter-packages/Catch/archive/v1.5.9-hunter.tar.gz"
+    "https://github.com/hunter-packages/Catch/releases/download/v1.5.9-hunter/v1.5.9-hunter.tar.gz"
     SHA1
     737cb1c98fedccceb95e7bfd385e5dea0ad5d047
 )


Remove broken FindOpenCV.cmake

Remove broken FindOpenCV.cmake

Use the system FindOpenCV.cmake instead, which also detects OpenCV3.

--- build/cmake/FindOpenCV.cmake
+++ build/cmake/FindOpenCV.cmake
@@ -1,137 +0,0 @@
-# Find OpenCV Library
-#
-# Input variables:
-# - OpenCV_ROOT_DIR:          (optional) Force a certain version of the OpenCV library.
-#                             When not specified, a best guess will be made.
-#
-# Output variables:
-# - OpenCV_FOUND:             True if OpenCV library was found properly and is ready to be used.
-# - OpenCV_INCLUDE_DIRS:      Include directories for OpenCV library.
-# - OpenCV_LIBRARIES_RELEASE: Release version of OpenCV libraries.
-# - OpenCV_LIBRARIES_DEBUG:   Debug version of OpenCV libraries.
-# - OpenCV_LIBRARIES:         Release and debug version of OpenCV libraries.
-
-# create possible root directory list
-if(WIN32)
-    if(MSVC_VERSION MATCHES "^1400$")
-        set(_compiler vs2005)
-    elseif(MSVC_VERSION MATCHES "^1500$")
-        set(_compiler vs2008)
-    elseif(MSVC_VERSION MATCHES "^1600$")
-        set(_compiler vs2010)
-    endif(MSVC_VERSION MATCHES "^1400$")
-else(WIN32)
-    execute_process(COMMAND ${CMAKE_C_COMPILER} "-dumpversion" RESULT_VARIABLE _result OUTPUT_VARIABLE _output)
-    if(NOT _result AND _output)
-        string(REGEX REPLACE "^\([0-9]+\)\\.\([0-9]+\)\\.[0-9]+[^0-9]*" "\\1\\2" _version "${_output}")
-    endif(NOT _result AND _output)
-    set(_compiler "gcc${_version}")
-endif(WIN32)
-if(WIN32)
-    if(CMAKE_CL_64)
-        set(_bitness 64)
-    else(CMAKE_CL_64)
-        set(_bitness 32)
-    endif(CMAKE_CL_64)
-else(WIN32)
-    if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "64$")
-        set(_bitness 64)
-    else(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "64$")
-        set(_bitness 32)
-    endif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "64$")
-endif(WIN32)
-get_filename_component(_registry_v2.4.0 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenCV 2.4.0 win${_bitness} ${_compiler};UninstallString]" ABSOLUTE)
-string(REGEX REPLACE "(.*)/Uninstall.exe" "\\1" _registry_v2.4.0 ${_registry_v2.4.0})
-set(OpenCV_POSSIBLE_ROOT_DIRS
-    ${OpenCV_POSSIBLE_ROOT_DIRS}
-    $ENV{OPENCV}
-    $ENV{OPENCV_ROOT}
-    # windows
-    ${_registry_v2.4.0}
-    "C:/OpenCV 2.4.0 win${_bitness} ${_compiler}"
-    "$ENV{ProgramFiles}/OpenCV 2.4.0 win${_bitness} ${_compiler}"
-    # linux
-    $ENV{OPENCV_ROOT}/OpenCV-2.4.0-linux${_bitness}-${_compiler}
-    $ENV{OPENCV_ROOT}/opencv-2.4.0-linux${_bitness}-${_compiler}
-    /usr/local
-    /usr
-    /opt/local
-    /opt
-)
-
-# create components list
-set(OpenCV_COMPONENTS "core")
-foreach(_component ${OpenCV_FIND_COMPONENTS})
-    list(APPEND OpenCV_COMPONENTS ${_component})
-endforeach()
-list(REMOVE_DUPLICATES OpenCV_COMPONENTS)
-
-# find root directory if necessary
-if(NOT OpenCV_ROOT_DIR)
-    find_path(OpenCV_ROOT_DIR
-        NAMES include/opencv2/opencv.hpp
-        PATHS ${OpenCV_POSSIBLE_ROOT_DIRS}
-    )
-endif(NOT OpenCV_ROOT_DIR)
-
-# set include directory
-set(OpenCV_INCLUDE_DIRS
-    ${OpenCV_ROOT_DIR}/include
-    ${OpenCV_ROOT_DIR}/include/opencv
-)
-
-# find library for each component
-set(OpenCV_LIBRARIES_RELEASE)
-set(OpenCV_LIBRARIES_DEBUG)
-foreach(_component ${OpenCV_COMPONENTS})
-    string(TOLOWER ${_component} _name)
-
-    # set path and postfix
-    if(WIN32)
-        set(_version 240) # hack to find the libs, set this to the version you are using
-    else(WIN32)
-        set(_version)
-    endif(WIN32)
-
-    # find release and debug library
-    find_library(OpenCV_${_name}_LIBRARY_RELEASE
-        NAMES opencv_${_name}${_version}
-        PATHS ${OpenCV_ROOT_DIR}
-        PATH_SUFFIXES lib
-        NO_DEFAULT_PATH
-    )
-    find_library(OpenCV_${_name}_LIBRARY_DEBUG
-        NAMES opencv_${_name}${_version}d
-        PATHS ${OpenCV_ROOT_DIR}
-        PATH_SUFFIXES lib
-        NO_DEFAULT_PATH
-    )
-
-    # mark as advanced
-    mark_as_advanced(OpenCV_${_name}_LIBRARY_RELEASE)
-    mark_as_advanced(OpenCV_${_name}_LIBRARY_DEBUG)
-
-    # append to lists
-    list(APPEND OpenCV_LIBRARIES_RELEASE ${OpenCV_${_name}_LIBRARY_RELEASE})
-    list(APPEND OpenCV_LIBRARIES_DEBUG ${OpenCV_${_name}_LIBRARY_DEBUG})
-endforeach(_component)
-
-# create cmake compatible library list
-set(OpenCV_LIBRARIES)
-foreach(_library ${OpenCV_LIBRARIES_RELEASE})
-    list(APPEND OpenCV_LIBRARIES optimized ${_library})
-endforeach(_library ${OpenCV_LIBRARIES_RELEASE})
-foreach(_library ${OpenCV_LIBRARIES_DEBUG})
-    list(APPEND OpenCV_LIBRARIES debug ${_library})
-endforeach(_library ${OpenCV_LIBRARIES_DEBUG})
-
-# handle required and quiet parameters
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenCV DEFAULT_MSG
-    OpenCV_ROOT_DIR
-    OpenCV_INCLUDE_DIRS
-    OpenCV_LIBRARIES_RELEASE
-    OpenCV_LIBRARIES_DEBUG
-    OpenCV_LIBRARIES
-)
-set(OpenCV_FOUND ${OPENCV_FOUND})


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


Update FindMoab.cmake to follow cmake conventions.

--- FindMoab/FindMOAB.cmake
+++ FindMoab/FindMOAB.cmake
@@ -24,7 +24,7 @@
 # Search Variables defined by this module:
 #
 #  MOAB_FOUND              System has MOAB libs/headers
-#  MOAB_INCLUDE_DIR        The location of MOAB headers
+#  MOAB_INCLUDE_DIRS        The location of MOAB headers
 #  MOAB_LIBRARIES          The moab library to link too
 #

@@ -46,13 +46,15 @@
     lib/moab lib
 )

-if (MOAB_LIBRARY)
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(MOAB DEFAULT_MSG
+                                  MOAB_LIBRARY
+                                  MOAB_INCLUDE_DIR)

-  list(APPEND MOAB_LIBRARIES ${MOAB_LIBRARY})
-
+if(MOAB_FOUND)
   if(MOAB_WITH_NETCDF)
-    find_package(NetCDF)
-    list(APPEND MOAB_LIBRARIES
+    find_package(NetCDF REQUIRED)
+    list(APPEND MOAB_LIBRARY
         ${NetCDF_LIBRARIES})
   endif()

@@ -60,17 +62,15 @@
     #TODO: determine what exact bindings to HDF5 moab uses.
     #are they using the C library, C++ library or high level C bindings
     find_package(HDF5 COMPONENTS C CXX HL)
-    list(APPEND MOAB_LIBRARIES
+    list(APPEND MOAB_LIBRARY
           ${HDF5_C_LIBRARIES}
           ${HDF5_CXX_LIBRARIES}
           ${HDF5_HL_LIBRARIES})
   endif()
-
+
+  set(MOAB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
+  set(MOAB_LIBRARIES ${ZLIB_LIBRARY})
 endif()

-include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(MOAB DEFAULT_MSG
-                                  MOAB_LIBRARIES MOAB_INCLUDE_DIR)
+mark_as_advanced(MOAB_INCLUDE_DIR MOAB_LIBRARY)

-mark_as_advanced(MOAB_INCLUDE_DIR MOAB_LIBRARIES)
-


Bug found: the INVALID_SOCKET definition is not present on Linux /
Mac, added #defineto header

git-svn-id: f70d4c833b20674991d6651a5f592bbdbe6b47b2@8364 30ced1d1-d8fb-0310-b896-84269ee58dd6

--- CMake/CMakeExternals/OPENIGTLINK.cmake
+++ CMake/CMakeExternals/OPENIGTLINK.cmake
@@ -35,7 +35,7 @@
 IF(NOT DEFINED OpenIGTLink_DIR)

     #1273 - OpenIGTLink version update due to bugfixes.
-    SET(revision_tag 5eb292af9a)
+    SET(revision_tag 936772e09d)
     IF(${proj}_REVISION_TAG)
         SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


Fix FEATURE_PREJIT option setup (#24760)

--- clrdefinitions.cmake
+++ clrdefinitions.cmake
@@ -175,6 +175,9 @@
 if(CLR_CMAKE_PLATFORM_LINUX OR CLR_CMAKE_PLATFORM_FREEBSD)
     add_definitions(-DFEATURE_PERFMAP)
 endif(CLR_CMAKE_PLATFORM_LINUX OR CLR_CMAKE_PLATFORM_FREEBSD)
+if(FEATURE_PREJIT)
+  add_definitions(-DFEATURE_PREJIT)
+endif(FEATURE_PREJIT)

 if(WIN32 OR CLR_CMAKE_PLATFORM_LINUX)
     add_definitions(-DFEATURE_PROFAPI_ATTACH_DETACH)


first test the ICC flags, then the GCC flags

ICC implements some but not all of the GCC flags but gives warnings when
some of the GCC flags are used together with other ICC flags.

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -522,15 +522,15 @@

    _vc_compile_one_implementation(${_objs} Scalar NO_FLAG)
    if(NOT Vc_SSE_INTRINSICS_BROKEN)
-      _vc_compile_one_implementation(${_objs} SSE2   "-msse2"   "-xSSE2"   "/arch:SSE2")
-      _vc_compile_one_implementation(${_objs} SSE3   "-msse3"   "-xSSE3"   "/arch:SSE2")
-      _vc_compile_one_implementation(${_objs} SSSE3  "-mssse3"  "-xSSSE3"  "/arch:SSE2")
-      _vc_compile_one_implementation(${_objs} SSE4_1 "-msse4.1" "-xSSE4.1" "/arch:SSE2")
-      _vc_compile_one_implementation(${_objs} SSE4_2 "-msse4.2" "-xSSE4.2" "/arch:SSE2")
+      _vc_compile_one_implementation(${_objs} SSE2   "-xSSE2"   "-msse2"   "/arch:SSE2")
+      _vc_compile_one_implementation(${_objs} SSE3   "-xSSE3"   "-msse3"   "/arch:SSE2")
+      _vc_compile_one_implementation(${_objs} SSSE3  "-xSSSE3"  "-mssse3"  "/arch:SSE2")
+      _vc_compile_one_implementation(${_objs} SSE4_1 "-xSSE4.1" "-msse4.1" "/arch:SSE2")
+      _vc_compile_one_implementation(${_objs} SSE4_2 "-xSSE4.2" "-msse4.2" "/arch:SSE2")
       _vc_compile_one_implementation(${_objs} SSE3+SSE4a  "-msse4a")
    endif()
    if(NOT Vc_AVX_INTRINSICS_BROKEN)
-      _vc_compile_one_implementation(${_objs} AVX      "-mavx"    "-xAVX"    "/arch:AVX")
+      _vc_compile_one_implementation(${_objs} AVX      "-xAVX"    "-mavx"    "/arch:AVX")
       if(NOT Vc_XOP_INTRINSICS_BROKEN)
          if(NOT Vc_FMA4_INTRINSICS_BROKEN)
             _vc_compile_one_implementation(${_objs} SSE+XOP+FMA4 "-mxop -mfma4"        ""    "")
@@ -542,6 +542,6 @@
       _vc_compile_one_implementation(${_objs} AVX+FMA "-mavx -mfma"  ""    "")
    endif()
    if(NOT Vc_AVX2_INTRINSICS_BROKEN)
-      _vc_compile_one_implementation(${_objs} AVX2 "-mavx2"  "-xCORE-AVX2"    "/arch:AVX2")
-   endif()
-endmacro()
+      _vc_compile_one_implementation(${_objs} AVX2 "-xCORE-AVX2"  "-mavx2"    "/arch:AVX2")
+   endif()
+endmacro()


flatzinc: Fix ortools.msc (#3333)

flatzinc: Fix ortools.msc (#3333)

--- cmake/flatzinc.cmake
+++ cmake/flatzinc.cmake
@@ -163,7 +163,7 @@
 # MiniZinc solver configuration
 file(RELATIVE_PATH FZ_REL_INSTALL_BINARY
   ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/minizinc/solvers
-  ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/fzn)
+  ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/fzn-${PROJECT_NAME})
 configure_file(
   ortools/flatzinc/ortools.msc.in
   ${PROJECT_BINARY_DIR}/ortools.msc


Obsoleting g95

Obsoleting g95

--- cmake/CMakemacosx64.cmake
+++ cmake/CMakemacosx64.cmake
@@ -77,16 +77,7 @@

 set ( CFLAGS  "${COPT} -Wall -W -fno-common -pipe -I${FINK_ROOT}/include")

-if(F77 MATCHES "g95")
-
-	set ( FFLAGS "${FFLAGS}  -ftrace=full")
-	set ( FFLAGS "${FFLAGS} -DFORTRAN_G95")
-
-else()
-
-	set ( FFLAGS "${FFLAGS} -DFORTRAN_GFORTRAN")
-
-endif(F77 MATCHES "g95")
+set ( FFLAGS "${FFLAGS} -DFORTRAN_GFORTRAN")

 set ( CINTFLAGS )

@@ -98,27 +89,13 @@

 set ( SYSLIBS  "-L/usr/X11R6/lib -lX11")

-
 set ( EXEFLAGS  "-bind_at_load")

-if( F77 MATCHES "g95")
-
-  execute_process(COMMAND ${CMAKE_Fortran_COMPILER} --print-search-dirs
-                  OUTPUT_VARIABLE SYSLIBS
-                  OUTPUT_STRIP_TRAILING_WHITESPACE)
-  string(REGEX MATCH "^.*install:[^\n]*" SYSLIBS ${SYSLIBS})
-  string(REGEX REPLACE "^.*install: " "" SYSLIBS ${SYSLIBS})
-  set(SYSLIBS "-L${SHLIB} -lf95")
-  set(DYLIB ${SYSLIBS})
+execute_process(COMMAND ${CMAKE_Fortran_COMPILER} -m64 -print-file-name=libgfortran.dylib
+                OUTPUT_VARIABLE _shlib
+                OUTPUT_STRIP_TRAILING_WHITESPACE)
+execute_process(COMMAND ${CMAKE_Fortran_COMPILER} -m64 -print-file-name=libgfortranbegin.a
+                OUTPUT_VARIABLE _alib
+                OUTPUT_STRIP_TRAILING_WHITESPACE)
+set( SYSLIBS "${SYSLIBS} -ldl ${_shlib} ${_alib}")

-else()
-
-  execute_process(COMMAND ${CMAKE_Fortran_COMPILER} -m64 -print-file-name=libgfortran.dylib
-                  OUTPUT_VARIABLE _shlib
-                  OUTPUT_STRIP_TRAILING_WHITESPACE)
-  execute_process(COMMAND ${CMAKE_Fortran_COMPILER} -m64 -print-file-name=libgfortranbegin.a
-                  OUTPUT_VARIABLE _alib
-                  OUTPUT_STRIP_TRAILING_WHITESPACE)
-  set( SYSLIBS "${SYSLIBS} -ldl ${_shlib} ${_alib}")
-
-endif(F77 MATCHES "g95")


changed spdlog visibility

changed spdlog visibility

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -25,6 +25,8 @@
     CMAKE_ARGS
         SPDLOG_BUILD_EXAMPLE=OFF
         SPDLOG_FMT_EXTERNAL=OFF
+        CMAKE_CXX_VISIBILITY_PRESET=hidden
+        CMAKE_C_VISIBILITY_PRESET=hidden
 )

 # libarchive, luxonis fork


Check if OpenCogAtomTypes is installed

Check if OpenCogAtomTypes is installed

--- cmake/OpenCogMacros.cmake
+++ cmake/OpenCogMacros.cmake
@@ -1,12 +1,17 @@
 MACRO(OPENCOG_ADD_ATOM_TYPES SCRIPT_FILE HEADER_FILE DEFINITIONS_FILE INHERITANCE_FILE SCM_FILE PYTHON_FILE)
+    IF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/OpenCogAtomTypes.cmake)
+        SET(OC_ATOM_TYPES_PATH ${CMAKE_SOURCE_DIR}/cmake/OpenCogAtomTypes.cmake)
+    ELSE()
+        SET(OC_ATOM_TYPES_PATH ${DATADIR}/cmake/OpenCogAtomTypes.cmake)
+    ENDIF()
     ADD_CUSTOM_COMMAND (
-        COMMAND "${CMAKE_COMMAND}" -DSCRIPT_FILE=\"${CMAKE_CURRENT_SOURCE_DIR}/${SCRIPT_FILE}\" -DHEADER_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILE}\" -DDEFINITIONS_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/${DEFINITIONS_FILE}\" -DINHERITANCE_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/${INHERITANCE_FILE}\" -DSCM_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/${SCM_FILE}\" -DPYTHON_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/${PYTHON_FILE}\" -P "${CMAKE_SOURCE_DIR}/cmake/OpenCogAtomTypes.cmake"
+        COMMAND "${CMAKE_COMMAND}" -DSCRIPT_FILE=\"${CMAKE_CURRENT_SOURCE_DIR}/${SCRIPT_FILE}\" -DHEADER_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILE}\" -DDEFINITIONS_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/${DEFINITIONS_FILE}\" -DINHERITANCE_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/${INHERITANCE_FILE}\" -DSCM_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/${SCM_FILE}\" -DPYTHON_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/${PYTHON_FILE}\" -P "${OC_ATOM_TYPES_PATH}"
         OUTPUT  "${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILE}"
                 "${CMAKE_CURRENT_BINARY_DIR}/${DEFINITIONS_FILE}"
                 "${CMAKE_CURRENT_BINARY_DIR}/${INHERITANCE_FILE}"
                 "${CMAKE_CURRENT_BINARY_DIR}/${SCM_FILE}"
                 "${CMAKE_CURRENT_BINARY_DIR}/${PYTHON_FILE}"
-        DEPENDS "${SCRIPT_FILE}" "${CMAKE_SOURCE_DIR}/cmake/OpenCogAtomTypes.cmake"
+        DEPENDS "${SCRIPT_FILE}" "${OC_ATOM_TYPES_PATH}"
         WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
         COMMENT "Generating opencog types"
     )


Added new build options.

Added new build options.

--- cmake/ROCSBuildOpts.cmake
+++ cmake/ROCSBuildOpts.cmake
@@ -34,31 +34,48 @@

 if(NOT ROCS_DONT_DEFINE_OPTIONS)
 	# Documentation
-	option(ROCS_BUILD_DOC "Build documentation." NO)
+	if("${ROCS_BUILD_DOC}" STREQUAL "")
+		set(ROCS_BUILD_DOC NO)
+	endif("${ROCS_BUILD_DOC}" STREQUAL "")
+	option(ROCS_BUILD_DOC "Build documentation." ${ROCS_BUILD_DOC})
 	# Tests
-	option(ROCS_BUILD_TESTS "Build tests." NO)
-	# Modules and components
-	## Core
+	if("${ROCS_BUILD_TESTS}" STREQUAL "")
+		set(ROCS_BUILD_TESTS YES)
+	endif("${ROCS_BUILD_TESTS}" STREQUAL "")
+	option(ROCS_BUILD_TESTS "Build tests." ${ROCS_BUILD_TESTS})
+	# GPL 3rd-party components
+	if("${ROCS_BUILD_GPL}" STREQUAL "")
+		set(ROCS_BUILD_GPL YES)
+	endif("${ROCS_BUILD_GPL}" STREQUAL "")
+	option(ROCS_BUILD_GPL "Should ROCS be compiled with GPL components?" ${ROCS_BUILD_GPL})
+	add_definitions(-DROCS_BUILD_GPL=${ROCS_BUILD_GPL})
+	# Build Qt GUI
+	if("${ROCS_BUILD_QTGUI}" STREQUAL "")
+		set(ROCS_BUILD_QTGUI YES)
+	endif("${ROCS_BUILD_QTGUI}" STREQUAL "")
+	option(ROCS_BUILD_QTGUI "Build components depending on Qt GUI." ${ROCS_BUILD_QTGUI})
+	add_definitions(-DROCS_BUILD_QTGUI=${ROCS_BUILD_QTGUI})
+	# Core
 	option(USE_MODULE_CORE "Use the module Core." NO)
 	if(USE_MODULE_CORE)
 		set(ROCS_BUILD_MODULE_CORE YES)
 	endif(USE_MODULE_CORE)
-	## Math
+	# Math
 	option(USE_MODULE_MATH "Use the module Math." NO)
 	if(USE_MODULE_MATH)
 		set(ROCS_BUILD_MODULE_MATH YES)
 	endif(USE_MODULE_MATH)
-	## CV
+	# CV
 	option(USE_MODULE_CV "Use the module CV." NO)
 	if(USE_MODULE_CV)
 		set(ROCS_BUILD_MODULE_CV YES)
 	endif(USE_MODULE_CV)
-	## CV Apps
+	# CV Apps
 	option(USE_MODULE_CV_APPS "Use applications of the module CV." NO)
 	if(USE_MODULE_CV_APPS)
 		set(ROCS_BUILD_MODULE_CV_APPS YES)
 	endif(USE_MODULE_CV_APPS)
-	## Concept
+	# Concept
 	option(USE_MODULE_CONCEPT "Use the module Concept." NO)
 	if(USE_MODULE_CONCEPT)
 		set(ROCS_BUILD_MODULE_CONCEPT YES)


Remove sm_72 from CUDA 9.0 in cmake/pcl_find_cuda.cmake

--- cmake/pcl_find_cuda.cmake
+++ cmake/pcl_find_cuda.cmake
@@ -44,8 +44,10 @@

   if(NOT ${CUDA_VERSION_STRING} VERSION_LESS "10.0")
     set(__cuda_arch_bin "3.0 3.5 5.0 5.2 5.3 6.0 6.1 7.0 7.2 7.5")
+  elseif(NOT ${CUDA_VERSION_STRING} VERSION_LESS "9.1")
+    set(__cuda_arch_bin "3.0 3.5 5.0 5.2 5.3 6.0 6.1 7.0 7.2")
   elseif(NOT ${CUDA_VERSION_STRING} VERSION_LESS "9.0")
-    set(__cuda_arch_bin "3.0 3.5 5.0 5.2 5.3 6.0 6.1 7.0 7.2")
+    set(__cuda_arch_bin "3.0 3.5 5.0 5.2 5.3 6.0 6.1 7.0")
   elseif(NOT ${CUDA_VERSION_STRING} VERSION_LESS "8.0")
     set(__cuda_arch_bin "2.0 2.1(2.0) 3.0 3.5 5.0 5.2 5.3 6.0 6.1")
   elseif(NOT ${CUDA_VERSION_STRING} VERSION_LESS "6.5")


add 13.0 to list of supported versions

add 13.0 to list of supported versions

--- CMake/Mathematica/FindMathematica.cmake
+++ CMake/Mathematica/FindMathematica.cmake
@@ -248,6 +248,7 @@
 		"gridMathematica Server")
 	# Mathematica product versions in order of preference
 	set (_MathematicaVersions
+		"13.0"
 		"12.3" "12.2" "12.1" "12.0"
 		"11.3" "11.2" "11.1" "11.0"
 		"10.4" "10.3" "10.2" "10.1" "10.0"


Generate tegra nsight project instead of nmake.

--- CMake/toolchain/android.toolchain.cmake
+++ CMake/toolchain/android.toolchain.cmake
@@ -331,14 +331,20 @@
 endif()

 # this one is important
-set( CMAKE_SYSTEM_NAME Linux )
+if( CMAKE_VERSION VERSION_GREATER "3.0.99" AND WIN32)
+	set( CMAKE_SYSTEM_NAME "Android" )
+	 set(CMAKE_VS_PLATFORM_NAME "Tegra-Android")
+else()
+	set( CMAKE_SYSTEM_NAME Linux )
+endif()
+
 # this one not so much
 set( CMAKE_SYSTEM_VERSION 1 )

 # 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} -r10c -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
+set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r10d -r10c -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 )


Updated Test Config

Updated Test Config

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -11,7 +11,12 @@
 	SET (CTEST_DROP_METHOD "http")
 	SET (CTEST_DROP_SITE "yakov.unidata.ucar.edu/")
 	SET (CTEST_DROP_LOCATION "CDash/submit.php?project=netCDF")
-	SET (CTEST_DROP_SITE_CDASH TRUE)
+	SET (CTEST_DROP_SITE_CDASH TRUE)
+ELSEIF(WORKING_FROM_HOME)
+	SET (CTEST_DROP_METHOD "http")
+	SET (CTEST_DROP_SITE "localhost:4111/")
+	SET (CTEST_DROP_LOCATION "CDash/submit.php?project=WinNETCDF")
+	SET (CTEST_DROP_SITE_CDASH TRUE)
 ELSE()
 	SET (CTEST_DROP_METHOD "http")
 	SET (CTEST_DROP_SITE "yakov.unidata.ucar.edu/")


lcov/travis fix

lcov/travis fix

--- CommonCTest.cmake
+++ CommonCTest.cmake
@@ -22,10 +22,7 @@
   endif()
   if($ENV{TRAVIS})
     message(STATUS "Disable code coverage on Travis, causes build timeouts")
-    set(LCOV)
-  endif()
-
-  if(LCOV AND GENHTML)
+  elseif(LCOV AND GENHTML)
     set(COVERAGE ON)
     add_custom_target(lcov-clean
       COMMAND ${LCOV} -q --directory ${CMAKE_BINARY_DIR} --zerocounters


cmake: fix ninja build

cmake: fix ninja build

When using the ninja generator:

  $ cmake -G Ninja <dir>
  $ ninja -C <dir>

This commit fixes the warning:

ninja: warning: multiple rules generate bin/wayland-desktop-shell-protocol.c.  builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]

--- CMake/Wayland.cmake
+++ CMake/Wayland.cmake
@@ -40,7 +40,7 @@

     get_filename_component(_infile ${_protocol} ABSOLUTE)
     set(_client_header "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-client-protocol.h")
-    set(_code "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-protocol.c")
+    set(_code "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-client-protocol.c")

     add_custom_command(OUTPUT "${_client_header}"
         COMMAND ${WAYLAND_SCANNER_EXECUTABLE} client-header < ${_infile} > ${_client_header}
@@ -62,7 +62,7 @@

     get_filename_component(_infile ${_protocol} ABSOLUTE)
     set(_server_header "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-server-protocol.h")
-    set(_code "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-protocol.c")
+    set(_code "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-server-protocol.c")

     add_custom_command(OUTPUT "${_server_header}"
         COMMAND ${WAYLAND_SCANNER_EXECUTABLE} server-header < ${_infile} > ${_server_header}


BUILD: Bump veloview version

BUILD: Bump veloview version

--- CMake/version.cmake
+++ CMake/version.cmake
@@ -1,3 +1,3 @@
 set (VV_VERSION_MAJOR 1)
 set (VV_VERSION_MINOR 1)
-set (VV_VERSION_PATCH 0)
+set (VV_VERSION_PATCH 1)


fix missing keyword

fix missing keyword

--- Shared/CMake/JamomaUtilFunctions.cmake
+++ Shared/CMake/JamomaUtilFunctions.cmake
@@ -192,7 +192,7 @@
 	foreach(THE_FRAMEWORK ${target_link_frameworks_FRAMEWORKS})
 		unset(THE_LIBRARY CACHE)
 		find_library(THE_LIBRARY ${THE_FRAMEWORK})
-		target_link_libraries(${target_link_frameworks_TARGET} ${THE_LIBRARY})
+		target_link_libraries(${target_link_frameworks_TARGET} PUBLIC ${THE_LIBRARY})
 		message("Linking ${target_link_frameworks_TARGET} with ${THE_LIBRARY}")
 	endforeach()
 	endif()


cmake: PCH: use DEFINE_SYMBOL target property

--- cmake/OpenCVPCHSupport.cmake
+++ cmake/OpenCVPCHSupport.cmake
@@ -25,11 +25,13 @@

     SET(_PCH_include_prefix "-I")
     SET(_PCH_isystem_prefix "-isystem")
+    SET(_PCH_define_prefix "-D")

 ELSEIF(CMAKE_GENERATOR MATCHES "^Visual.*$")
     SET(PCHSupport_FOUND TRUE)
     SET(_PCH_include_prefix "/I")
     SET(_PCH_isystem_prefix "/I")
+    SET(_PCH_define_prefix "/D")
 ELSE()
     SET(PCHSupport_FOUND FALSE)
 ENDIF()
@@ -237,6 +239,14 @@

     _PCH_GET_COMPILE_FLAGS(_compile_FLAGS)

+    get_target_property(type ${_targetName} TYPE)
+    if(type STREQUAL "SHARED_LIBRARY")
+        get_target_property(__DEFINES ${_targetName} DEFINE_SYMBOL)
+        if(NOT __DEFINES MATCHES __DEFINES-NOTFOUND)
+            list(APPEND _compile_FLAGS "${_PCH_define_prefix}${__DEFINES}")
+        endif()
+    endif()
+
     #MESSAGE("_compile_FLAGS: ${_compile_FLAGS}")
     #message("COMMAND ${CMAKE_CXX_COMPILER}	${_compile_FLAGS} -x c++-header -o ${_output} ${_input}")


Skip generated sources in function find_arduino_libraries

--- cmake/Platform/Arduino.cmake
+++ cmake/Platform/Arduino.cmake
@@ -608,26 +608,33 @@
 function(find_arduino_libraries VAR_NAME SRCS)
     set(ARDUINO_LIBS )
     foreach(SRC ${SRCS})
-        if(NOT (EXISTS ${SRC} OR
-                EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${SRC} OR
-                EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${SRC}))
-            message(FATAL_ERROR "Invalid source file: ${SRC}")
+
+        # Skipping generated files. They are, probably, not exist yet.
+        # TODO: Maybe it's possible to skip only really nonexisting files,
+        # but then it wiil be less deterministic.
+        get_source_file_property(_srcfile_generated ${SRC} GENERATED)
+        if(NOT ${_srcfile_generated})
+            if(NOT (EXISTS ${SRC} OR
+                    EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${SRC} OR
+                    EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${SRC}))
+                message(FATAL_ERROR "Invalid source file: ${SRC}")
+            endif()
+            file(STRINGS ${SRC} SRC_CONTENTS)
+            foreach(SRC_LINE ${SRC_CONTENTS})
+                if("${SRC_LINE}" MATCHES "^ *#include *[<\"](.*)[>\"]")
+                    get_filename_component(INCLUDE_NAME ${CMAKE_MATCH_1} NAME_WE)
+                    get_property(LIBRARY_SEARCH_PATH
+                                 DIRECTORY     # Property Scope
+                                 PROPERTY LINK_DIRECTORIES)
+                    foreach(LIB_SEARCH_PATH ${LIBRARY_SEARCH_PATH} ${ARDUINO_LIBRARIES_PATH} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/libraries ${ARDUINO_EXTRA_LIBRARIES_PATH})
+                        if(EXISTS ${LIB_SEARCH_PATH}/${INCLUDE_NAME}/${CMAKE_MATCH_1})
+                            list(APPEND ARDUINO_LIBS ${LIB_SEARCH_PATH}/${INCLUDE_NAME})
+                            break()
+                        endif()
+                    endforeach()
+                endif()
+            endforeach()
         endif()
-        file(STRINGS ${SRC} SRC_CONTENTS)
-        foreach(SRC_LINE ${SRC_CONTENTS})
-            if("${SRC_LINE}" MATCHES "^ *#include *[<\"](.*)[>\"]")
-                get_filename_component(INCLUDE_NAME ${CMAKE_MATCH_1} NAME_WE)
-                get_property(LIBRARY_SEARCH_PATH
-                             DIRECTORY     # Property Scope
-                             PROPERTY LINK_DIRECTORIES)
-                foreach(LIB_SEARCH_PATH ${LIBRARY_SEARCH_PATH} ${ARDUINO_LIBRARIES_PATH} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/libraries ${ARDUINO_EXTRA_LIBRARIES_PATH})
-                    if(EXISTS ${LIB_SEARCH_PATH}/${INCLUDE_NAME}/${CMAKE_MATCH_1})
-                        list(APPEND ARDUINO_LIBS ${LIB_SEARCH_PATH}/${INCLUDE_NAME})
-                        break()
-                    endif()
-                endforeach()
-            endif()
-        endforeach()
     endforeach()
     if(ARDUINO_LIBS)
         list(REMOVE_DUPLICATES ARDUINO_LIBS)


OSX: disable obsolete line ( was already handled earlier )

--- cmake/PlatformSpecific.cmake
+++ cmake/PlatformSpecific.cmake
@@ -218,7 +218,7 @@
 	set(LUXRAYS_CUSTOM_CONFIG Config_OSX)

 	if(NOT ${CMAKE_GENERATOR} MATCHES "Xcode") # will be set later in XCode
-		SET(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "assure config" FORCE)
+		#SET(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "assure config" FORCE)
 		# Setup binaries output directory in Xcode manner
 		SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE} CACHE PATH "per configuration" FORCE)
 		SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE} CACHE PATH "per configuration" FORCE)


fix xnnpack wasm build (#12845)

fix xnnpack wasm build (#12845)

--- cmake/external/xnnpack.cmake
+++ cmake/external/xnnpack.cmake
@@ -30,7 +30,13 @@
   endif()

   message("Adding WebAssembly Source Files to XNNPACK")
-  set(wasm_src_patterns "${XNNPACK_DIR}/src/wasm-*.c"
+  set(wasm_src_patterns "${XNNPACK_DIR}/src/init.c"
+                        "${XNNPACK_DIR}/src/params-init.c"
+                        "${XNNPACK_DIR}/src/qu8-avgpool/9*-minmax-scalar-c1.c"
+                        "${XNNPACK_DIR}/src/u8-rmax/scalar.c"
+                        "${XNNPACK_DIR}/src/x8-zip/x*-scalar.c"
+                        "${XNNPACK_DIR}/src/x*-transposec/gen/2x4-scalar-int.c"
+                        "${XNNPACK_DIR}/src/wasm-*.c"
                         "${XNNPACK_DIR}/src/*-wasm-*.c"
                         "${XNNPACK_DIR}/src/*-wasm.c")
   set(wasm32_asm_src_patterns "${XNNPACK_DIR}/src/wasm_shr_*.S")
@@ -57,4 +63,4 @@

     target_sources(XNNPACK PRIVATE ${XNNPACK_WASMSIMD_MICROKERNEL_SRCS})
   endif()
-endif()+endif()


Removed some of the image formats from QtPlugins

--- cmake/installQtPlugins.cmake
+++ cmake/installQtPlugins.cmake
@@ -1,9 +1,6 @@

 if (${MSVC_BUILD_CONFIG_DIR} STREQUAL "Debug")
 	set (IMGFORMATS
-			${QTDIRPLUGINS}/imageformats/qddsd.dll
-			${QTDIRPLUGINS}/imageformats/qgifd.dll
-			${QTDIRPLUGINS}/imageformats/qicnsd.dll
 			${QTDIRPLUGINS}/imageformats/qicod.dll
 			${QTDIRPLUGINS}/imageformats/qjpegd.dll
 			${QTDIRPLUGINS}/imageformats/qsvgd.dll
@@ -22,9 +19,6 @@

 else (${MSVC_BUILD_CONFIG_DIR} STREQUAL "Debug")
 	set (IMGFORMATS
-			${QTDIRPLUGINS}/imageformats/qdds.dll
-			${QTDIRPLUGINS}/imageformats/qgif.dll
-			${QTDIRPLUGINS}/imageformats/qicns.dll
 			${QTDIRPLUGINS}/imageformats/qico.dll
 			${QTDIRPLUGINS}/imageformats/qjpeg.dll
 			${QTDIRPLUGINS}/imageformats/qsvg.dll


Coalesce protocol conformance sections on FreeBSD.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1090,10 +1090,11 @@
     set(PLIST_INFO_BUILD_VERSION)
   endif()

-  # On Linux add the linker script that coalesces protocol conformance
-  # sections. This wouldn't be necessary if the link was done by the swift
-  # binary: rdar://problem/19007002
-  if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
+  # On Linux and FreeBSD add the linker script that coalesces protocol
+  # conformance sections. This wouldn't be necessary if the link was done by
+  # the swift binary: rdar://problem/19007002
+  if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR
+    "${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
     list(APPEND link_flags
         "-Xlinker" "-T"
         "-Xlinker" "${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR}/swift.ld")


Properly configure the target library name used by magic-symbols-for-install-name.c.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1881,9 +1881,12 @@
       endforeach()

       # Add PrivateFrameworks, rdar://28466433
+      set(swiftlib_c_compile_flags_all ${SWIFTLIB_C_COMPILE_FLAGS})
       if(sdk IN_LIST SWIFT_APPLE_PLATFORMS AND SWIFTLIB_IS_SDK_OVERLAY)
         set(swiftlib_swift_compile_private_frameworks_flag "-Fsystem" "${SWIFT_SDK_${sdk}_ARCH_${arch}_PATH}/System/Library/PrivateFrameworks/")
       endif()
+
+      list(APPEND swiftlib_c_compile_flags_all "-DSWIFT_TARGET_LIBRARY_NAME=${name}")

       # Add this library variant.
       _add_swift_library_single(
@@ -1902,7 +1905,7 @@
         FRAMEWORK_DEPENDS_WEAK ${SWIFTLIB_FRAMEWORK_DEPENDS_WEAK}
         LLVM_COMPONENT_DEPENDS ${SWIFTLIB_LLVM_COMPONENT_DEPENDS}
         FILE_DEPENDS ${SWIFTLIB_FILE_DEPENDS} ${swiftlib_module_dependency_targets}
-        C_COMPILE_FLAGS ${SWIFTLIB_C_COMPILE_FLAGS}
+        C_COMPILE_FLAGS ${swiftlib_c_compile_flags_all}
         SWIFT_COMPILE_FLAGS ${swiftlib_swift_compile_flags_all} ${swiftlib_swift_compile_flags_arch} ${swiftlib_swift_compile_private_frameworks_flag}
         LINK_FLAGS ${swiftlib_link_flags_all}
         PRIVATE_LINK_LIBRARIES ${swiftlib_private_link_libraries_targets}


cmake: Set minimum required Zephyr SDK version to 0.13.1

This commit sets the minimum required Zephyr SDK version to 0.13.1,
which fixes the following critical issues:

1. Xtensa initial malloc failure (GitHub issue #38258)
2. ARMv8-M security extension vulnerability (CVE-2021-35465)

Signed-off-by: Stephanos Ioannidis <dc76e9f0c0006e8f919e0c515c66dbba3982f785@stephanos.io>

--- cmake/verify-toolchain.cmake
+++ cmake/verify-toolchain.cmake
@@ -16,7 +16,7 @@
 # FORMAT=json: Print the output as a json formatted string, useful for Python

 # This is the minimum required Zephyr-SDK version which supports CMake package
-set(TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION 0.13)
+set(TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION 0.13.1)

 # Set internal variables if set in environment.
 if(NOT DEFINED ZEPHYR_TOOLCHAIN_VARIANT)


- Fixed ogre_find_plugin macro in FindOGRE.cmake by adding new path suffix OGRE-${OGRE_VERSION}

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -444,9 +444,9 @@
   get_debug_names(OGRE_${PLUGIN}_LIBRARY_NAMES)
   set(OGRE_${PLUGIN}_LIBRARY_FWK ${OGRE_LIBRARY_FWK})
   find_library(OGRE_${PLUGIN}_LIBRARY_REL NAMES ${OGRE_${PLUGIN}_LIBRARY_NAMES}
-    HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} ${OGRE_FRAMEWORK_PATH} PATH_SUFFIXES "" OGRE opt Release Release/opt RelWithDebInfo RelWithDebInfo/opt MinSizeRel MinSizeRel/opt)
+    HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} ${OGRE_FRAMEWORK_PATH} PATH_SUFFIXES "" OGRE OGRE-${OGRE_VERSION} opt Release Release/opt RelWithDebInfo RelWithDebInfo/opt MinSizeRel MinSizeRel/opt)
   find_library(OGRE_${PLUGIN}_LIBRARY_DBG NAMES ${OGRE_${PLUGIN}_LIBRARY_NAMES_DBG}
-    HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} ${OGRE_FRAMEWORK_PATH} PATH_SUFFIXES "" OGRE opt Debug Debug/opt)
+    HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} ${OGRE_FRAMEWORK_PATH} PATH_SUFFIXES "" OGRE OGRE-${OGRE_VERSION} opt Debug Debug/opt)
   make_library_set(OGRE_${PLUGIN}_LIBRARY)

   if (OGRE_${PLUGIN}_LIBRARY OR OGRE_${PLUGIN}_INCLUDE_DIR)


adjusted dicom test data

adjusted dicom test data

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -13,7 +13,7 @@

 if(BUILD_TESTING)

-  set(revision_tag 0da57f48) # first 8 characters of hash-tag
+  set(revision_tag 9073a849) # first 8 characters of hash-tag
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


Updated XLink library

Updated XLink library

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -8,8 +8,8 @@
 hunter_config(
     XLink
     VERSION "luxonis-2021.4.2-develop"
-    URL "https://github.com/luxonis/XLink/archive/4a20a87dd1c8f120a9a067836283ee8044ba9c71.tar.gz"
-    SHA1 "18741e1492654b52c99167458a7982098d0d52af"
+    URL "https://github.com/luxonis/XLink/archive/b27656e4b1f21d4c3ddccdbd287fce84d2bac273.tar.gz"
+    SHA1 "0b640651e7ae5475ad832d1833816b16157c99d5"
 )

 hunter_config(


Set Windows Zinc system architecture to match that used by PyZinc.  https://tracker.physiomeproject.org/show_bug.cgi?id=3439

git-svn-id: b9baf8c2d14a71b3ba9c27a102eb6e792fc13348@9825 3c1deb5b-d424-0410-962d-aba41a686d42

--- cmake/ZincPackaging.cmake
+++ cmake/ZincPackaging.cmake
@@ -1,7 +1,7 @@

 SET(ZINC_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
-IF(CMAKE_CL_64)
-	SET(ZINC_ARCHITECTURE x86_64)
+IF(WIN32)
+	STRING(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} ZINC_ARCHITECTURE)
 ENDIF()

 SET(CPACK_PACKAGE_VERSION_MAJOR "1")


fix the dependencies of third party and inference lib (#19684)

--- cmake/inference_lib.cmake
+++ cmake/inference_lib.cmake
@@ -24,9 +24,8 @@
 function(copy TARGET)
     set(options "")
     set(oneValueArgs "")
-    set(multiValueArgs SRCS DSTS DEPS)
+    set(multiValueArgs SRCS DSTS)
     cmake_parse_arguments(copy_lib "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-    set(fluid_lib_dist_dep ${TARGET} ${fluid_lib_dist_dep} PARENT_SCOPE)

     list(LENGTH copy_lib_SRCS copy_lib_SRCS_len)
     list(LENGTH copy_lib_DSTS copy_lib_DSTS_len)
@@ -34,7 +33,6 @@
         message(FATAL_ERROR "${TARGET} source numbers are not equal to destination numbers")
     endif ()
     math(EXPR len "${copy_lib_SRCS_len} - 1")
-    add_custom_target(${TARGET} DEPENDS ${copy_lib_DEPS})
     foreach (index RANGE ${len})
         list(GET copy_lib_SRCS ${index} src)
         list(GET copy_lib_DSTS ${index} dst)
@@ -44,7 +42,7 @@
             add_custom_command(TARGET ${TARGET} POST_BUILD
                     COMMAND ${PYTHON_EXECUTABLE} ${COPY_SCRIPT_DIR}/copyfile.py ${native_src} ${native_dst})
         else (WIN32) #not windows
-            add_custom_command(TARGET ${TARGET} PRE_BUILD
+            add_custom_command(TARGET ${TARGET} POST_BUILD
                     COMMAND mkdir -p "${dst}"
                     COMMAND cp -r "${src}" "${dst}"
                     COMMENT "copying ${src} -> ${dst}")
@@ -53,195 +51,188 @@
 endfunction()

 # third party
-set(dst_dir "${FLUID_INSTALL_DIR}/third_party/eigen3")
-copy(eigen3_lib
-        SRCS ${EIGEN_INCLUDE_DIR}/Eigen/Core ${EIGEN_INCLUDE_DIR}/Eigen/src ${EIGEN_INCLUDE_DIR}/unsupported/Eigen
-        DSTS ${dst_dir}/Eigen ${dst_dir}/Eigen ${dst_dir}/unsupported
-        DEPS eigen3
-        )
-
-set(dst_dir "${FLUID_INSTALL_DIR}/third_party/install/gflags")
-copy(gflags_lib
-        SRCS ${GFLAGS_INCLUDE_DIR} ${GFLAGS_LIBRARIES}
-        DSTS ${dst_dir} ${dst_dir}/lib
-        DEPS gflags
-        )
-
-set(dst_dir "${FLUID_INSTALL_DIR}/third_party/install/glog")
-copy(glog_lib
-        SRCS ${GLOG_INCLUDE_DIR} ${GLOG_LIBRARIES}
-        DSTS ${dst_dir} ${dst_dir}/lib
-        DEPS glog
-        )
-
-set(dst_dir "${FLUID_INSTALL_DIR}/third_party/boost/")
-copy(boost_lib
-        SRCS ${BOOST_INCLUDE_DIR}/boost
-        DSTS ${dst_dir}
-        DEPS boost
-        )
-
-set(dst_dir "${FLUID_INSTALL_DIR}/third_party/install/xxhash")
-copy(xxhash_lib
-        SRCS ${XXHASH_INCLUDE_DIR} ${XXHASH_LIBRARIES}
-        DSTS ${dst_dir} ${dst_dir}/lib
-        DEPS xxhash
-        )
-
-if (NOT PROTOBUF_FOUND OR WIN32)
-    set(dst_dir "${FLUID_INSTALL_DIR}/third_party/install/protobuf")
-    copy(protobuf_lib
-            SRCS ${PROTOBUF_INCLUDE_DIR} ${PROTOBUF_LIBRARY}
-            DSTS ${dst_dir} ${dst_dir}/lib
-            DEPS extern_protobuf
-            )
+set(third_party_deps eigen3 gflags glog boost xxhash zlib)
+if(NOT PROTOBUF_FOUND OR WIN32)
+    list(APPEND third_party_deps extern_protobuf)
 endif ()

 if (WITH_MKLML)
-    set(dst_dir "${FLUID_INSTALL_DIR}/third_party/install/mklml")
+    list(APPEND third_party_deps mklml)
+elseif (NOT CBLAS_FOUND OR WIN32)
+    list(APPEND third_party_deps extern_openblas)
+endif ()
+
+if (WITH_MKLDNN)
+    list(APPEND third_party_deps mkldnn_shared_lib)
+endif ()
+
+if (WITH_NGRAPH)
+    list(APPEND third_party_deps ngraph)
+endif ()
+
+add_custom_target(third_party DEPENDS ${third_party_deps})
+
+# inference-only library
+set(inference_lib_deps third_party paddle_fluid paddle_fluid_shared)
+add_custom_target(inference_lib_dist DEPENDS ${inference_lib_deps})
+
+set(dst_dir "${FLUID_INFERENCE_INSTALL_DIR}/third_party/eigen3")
+copy(inference_lib_dist
+    SRCS ${EIGEN_INCLUDE_DIR}/Eigen/Core ${EIGEN_INCLUDE_DIR}/Eigen/src ${EIGEN_INCLUDE_DIR}/unsupported/Eigen
+    DSTS ${dst_dir}/Eigen ${dst_dir}/Eigen ${dst_dir}/unsupported)
+
+set(dst_dir "${FLUID_INFERENCE_INSTALL_DIR}/third_party/boost")
+copy(inference_lib_dist
+    SRCS ${BOOST_INCLUDE_DIR}/boost
+    DSTS ${dst_dir})
+
+if(WITH_MKLML)
+    set(dst_dir "${FLUID_INFERENCE_INSTALL_DIR}/third_party/install/mklml")
     if(WIN32)
-        copy(mklml_lib
-                SRCS ${MKLML_LIB} ${MKLML_IOMP_LIB} ${MKLML_SHARED_LIB}
-                    ${MKLML_SHARED_LIB_DEPS} ${MKLML_SHARED_IOMP_LIB} ${MKLML_INC_DIR}
-                DSTS ${dst_dir}/lib ${dst_dir}/lib ${dst_dir}/lib
-                    ${dst_dir}/lib ${dst_dir}/lib ${dst_dir}
-                DEPS mklml
-                )
+        copy(inference_lib_dist
+            SRCS ${MKLML_LIB} ${MKLML_IOMP_LIB} ${MKLML_SHARED_LIB}
+                ${MKLML_SHARED_LIB_DEPS} ${MKLML_SHARED_IOMP_LIB} ${MKLML_INC_DIR}
+            DSTS ${dst_dir}/lib ${dst_dir}/lib ${dst_dir}/lib
+                ${dst_dir}/lib ${dst_dir}/lib ${dst_dir})
     else()
-        copy(mklml_lib
-                SRCS ${MKLML_LIB} ${MKLML_IOMP_LIB} ${MKLML_INC_DIR}
-                DSTS ${dst_dir}/lib ${dst_dir}/lib ${dst_dir}
-                DEPS mklml
-                )
+        copy(inference_lib_dist
+            SRCS ${MKLML_LIB} ${MKLML_IOMP_LIB} ${MKLML_INC_DIR}
+            DSTS ${dst_dir}/lib ${dst_dir}/lib ${dst_dir})
     endif()
 elseif (NOT CBLAS_FOUND OR WIN32)
-    set(dst_dir "${FLUID_INSTALL_DIR}/third_party/install/openblas")
-    copy(openblas_lib
+    set(dst_dir "${FLUID_INFERENCE_INSTALL_DIR}/third_party/install/openblas")
+    copy(inference_lib_dist
             SRCS ${CBLAS_INSTALL_DIR}/lib ${CBLAS_INSTALL_DIR}/include
-            DSTS ${dst_dir} ${dst_dir}
-            DEPS extern_openblas
-            )
-endif ()
-
-if (WITH_MKLDNN)
-    set(dst_dir "${FLUID_INSTALL_DIR}/third_party/install/mkldnn")
-    if(WIN32)
-        copy(mkldnn_lib
-                SRCS ${MKLDNN_INC_DIR} ${MKLDNN_SHARED_LIB} ${MKLDNN_LIB}
-                DSTS ${dst_dir} ${dst_dir}/lib ${dst_dir}/lib
-                DEPS mkldnn_shared_lib
-                )
-    else()
-        copy(mkldnn_lib
-                SRCS ${MKLDNN_INC_DIR} ${MKLDNN_SHARED_LIB}
-                DSTS ${dst_dir} ${dst_dir}/lib
-                DEPS mkldnn_shared_lib
-                )
-    endif()
+            DSTS ${dst_dir} ${dst_dir})
+endif ()
+
+if(WITH_MKLDNN)
+set(dst_dir "${FLUID_INFERENCE_INSTALL_DIR}/third_party/install/mkldnn")
+if(WIN32)
+    copy(inference_lib_dist
+        SRCS ${MKLDNN_INC_DIR} ${MKLDNN_SHARED_LIB} ${MKLDNN_LIB}
+        DSTS ${dst_dir} ${dst_dir}/lib ${dst_dir}/lib)
+else()
+    copy(inference_lib_dist
+        SRCS ${MKLDNN_INC_DIR} ${MKLDNN_SHARED_LIB}
+        DSTS ${dst_dir} ${dst_dir}/lib)
+endif()
+endif()
+
+set(dst_dir "${FLUID_INFERENCE_INSTALL_DIR}/third_party/install/gflags")
+copy(inference_lib_dist
+        SRCS ${GFLAGS_INCLUDE_DIR} ${GFLAGS_LIBRARIES}
+        DSTS ${dst_dir} ${dst_dir}/lib)
+
+set(dst_dir "${FLUID_INFERENCE_INSTALL_DIR}/third_party/install/glog")
+copy(inference_lib_dist
+        SRCS ${GLOG_INCLUDE_DIR} ${GLOG_LIBRARIES}
+        DSTS ${dst_dir} ${dst_dir}/lib)
+
+set(dst_dir "${FLUID_INFERENCE_INSTALL_DIR}/third_party/install/xxhash")
+copy(inference_lib_dist
+        SRCS ${XXHASH_INCLUDE_DIR} ${XXHASH_LIBRARIES}
+        DSTS ${dst_dir} ${dst_dir}/lib)
+
+set(dst_dir "${FLUID_INFERENCE_INSTALL_DIR}/third_party/install/zlib")
+copy(inference_lib_dist
+        SRCS ${ZLIB_INCLUDE_DIR} ${ZLIB_LIBRARIES}
+        DSTS ${dst_dir} ${dst_dir}/lib)
+
+if (NOT PROTOBUF_FOUND OR WIN32)
+    set(dst_dir "${FLUID_INFERENCE_INSTALL_DIR}/third_party/install/protobuf")
+    copy(inference_lib_dist
+            SRCS ${PROTOBUF_INCLUDE_DIR} ${PROTOBUF_LIBRARY}
+            DSTS ${dst_dir} ${dst_dir}/lib)
 endif ()

 if (WITH_NGRAPH)
-    set(dst_dir "${FLUID_INSTALL_DIR}/third_party/install/ngraph")
-    copy(ngraph_lib
+    set(dst_dir "${FLUID_INFERENCE_INSTALL_DIR}/third_party/install/ngraph")
+    copy(inference_lib_dist
             SRCS ${NGRAPH_INC_DIR} ${NGRAPH_LIB_DIR}
-            DSTS ${dst_dir} ${dst_dir}
-            DEPS ngraph
-            )
-endif ()
-
-set(dst_dir "${FLUID_INSTALL_DIR}/third_party/install/zlib")
-copy(zlib_lib
-        SRCS ${ZLIB_INCLUDE_DIR} ${ZLIB_LIBRARIES}
-        DSTS ${dst_dir} ${dst_dir}/lib
-        DEPS zlib)
-
-# paddle fluid module
+            DSTS ${dst_dir} ${dst_dir})
+endif ()
+
+if (TENSORRT_FOUND)
+    set(dst_dir "${FLUID_INFERENCE_INSTALL_DIR}/third_party/install/tensorrt")
+    copy(inference_lib_dist
+        SRCS ${TENSORRT_ROOT}/include/Nv*.h ${TENSORRT_ROOT}/lib/*nvinfer*
+        DSTS ${dst_dir}/include ${dst_dir}/lib)
+endif ()
+
+if (ANAKIN_FOUND)
+    set(dst_dir "${FLUID_INFERENCE_INSTALL_DIR}/third_party/install/anakin")
+    copy(inference_lib_dist
+        SRCS ${ANAKIN_ROOT}/*
+        DSTS ${dst_dir})
+endif ()
+
+copy(inference_lib_dist
+     SRCS ${CMAKE_CURRENT_BINARY_DIR}/CMakeCache.txt
+     DSTS ${FLUID_INFERENCE_INSTALL_DIR})
+
 set(src_dir "${PADDLE_SOURCE_DIR}/paddle/fluid")
-set(dst_dir "${FLUID_INSTALL_DIR}/paddle/fluid")
-set(module "framework")
-set(framework_lib_deps framework_proto)
-
-copy(framework_lib DEPS ${framework_lib_deps}
-        SRCS ${src_dir}/${module}/*.h ${src_dir}/${module}/details/*.h ${PADDLE_BINARY_DIR}/paddle/fluid/framework/framework.pb.h ${PADDLE_BINARY_DIR}/paddle/fluid/framework/data_feed.pb.h ${src_dir}/${module}/ir/memory_optimize_pass/*.h
-        ${src_dir}/${module}/ir/*.h ${src_dir}/${module}/fleet/*.h
-        DSTS ${dst_dir}/${module} ${dst_dir}/${module}/details ${dst_dir}/${module} ${dst_dir}/${module} ${dst_dir}/${module}/ir/memory_optimize_pass ${dst_dir}/${module}/ir ${dst_dir}/${module}/fleet
-        )
-
-set(module "memory")
-copy(memory_lib
-        SRCS ${src_dir}/${module}/*.h ${src_dir}/${module}/detail/*.h ${src_dir}/${module}/allocation/*.h
-        DSTS ${dst_dir}/${module} ${dst_dir}/${module}/detail ${dst_dir}/${module}/allocation
-        )
-
-set(inference_deps paddle_fluid_shared paddle_fluid)
-
-set(module "inference/api")
-
-if (TENSORRT_FOUND)
-    copy(tensorrt_lib DEPS ${inference_deps}
-        SRCS ${TENSORRT_ROOT}/include/Nv*.h ${TENSORRT_ROOT}/lib/*nvinfer*
-        DSTS ${FLUID_INSTALL_DIR}/third_party/install/tensorrt/include ${FLUID_INSTALL_DIR}/third_party/install/tensorrt/lib)
-endif ()
-
-if (ANAKIN_FOUND)
-    copy(anakin_lib DEPS ${inference_deps}
-        SRCS ${ANAKIN_ROOT}/*
-        DSTS ${FLUID_INSTALL_DIR}/third_party/install/anakin)
-endif ()
-
-set(module "inference")
 if(WIN32)
     set(paddle_fluid_lib ${PADDLE_BINARY_DIR}/paddle/fluid/inference/${CMAKE_BUILD_TYPE}/libpaddle_fluid.*)
 else(WIN32)
     set(paddle_fluid_lib ${PADDLE_BINARY_DIR}/paddle/fluid/inference/libpaddle_fluid.*)
 endif(WIN32)
-copy(inference_lib DEPS ${inference_deps}
-  SRCS ${src_dir}/${module}/*.h ${paddle_fluid_lib}
-       ${src_dir}/${module}/api/paddle_*.h
+
+copy(inference_lib_dist
+     SRCS  ${src_dir}/inference/api/paddle_*.h ${paddle_fluid_lib}
+     DSTS  ${FLUID_INFERENCE_INSTALL_DIR}/paddle/include ${FLUID_INFERENCE_INSTALL_DIR}/paddle/lib)
+
+
+# fluid library for both train and inference
+set(fluid_lib_deps inference_lib_dist)
+add_custom_target(fluid_lib_dist ALL DEPENDS ${fluid_lib_deps})
+
+set(dst_dir "${FLUID_INSTALL_DIR}/paddle/fluid")
+set(module "inference")
+copy(fluid_lib_dist
+  SRCS ${src_dir}/${module}/*.h ${src_dir}/${module}/api/paddle_*.h ${paddle_fluid_lib}
   DSTS ${dst_dir}/${module} ${dst_dir}/${module} ${dst_dir}/${module}
+)
+
+set(module "framework")
+set(framework_lib_deps framework_proto)
+add_dependencies(fluid_lib_dist ${framework_lib_deps})
+copy(fluid_lib_dist
+    SRCS ${src_dir}/${module}/*.h ${src_dir}/${module}/details/*.h ${PADDLE_BINARY_DIR}/paddle/fluid/framework/framework.pb.h ${PADDLE_BINARY_DIR}/paddle/fluid/framework/data_feed.pb.h ${src_dir}/${module}/ir/memory_optimize_pass/*.h
+    ${src_dir}/${module}/ir/*.h ${src_dir}/${module}/fleet/*.h
+    DSTS ${dst_dir}/${module} ${dst_dir}/${module}/details ${dst_dir}/${module} ${dst_dir}/${module} ${dst_dir}/${module}/ir/memory_optimize_pass ${dst_dir}/${module}/ir ${dst_dir}/${module}/fleet)
+
+set(module "memory")
+copy(fluid_lib_dist
+        SRCS ${src_dir}/${module}/*.h ${src_dir}/${module}/detail/*.h ${src_dir}/${module}/allocation/*.h
+        DSTS ${dst_dir}/${module} ${dst_dir}/${module}/detail ${dst_dir}/${module}/allocation
         )

 set(module "platform")
-copy(platform_lib DEPS profiler_py_proto
-        SRCS ${src_dir}/${module}/*.h ${src_dir}/${module}/dynload/*.h ${src_dir}/${module}/details/*.h
-        DSTS ${dst_dir}/${module} ${dst_dir}/${module}/dynload ${dst_dir}/${module}/details
+set(platform_lib_deps profiler_proto)
+add_dependencies(fluid_lib_dist ${platform_lib_deps})
+copy(fluid_lib_dist
+        SRCS ${src_dir}/${module}/*.h ${src_dir}/${module}/dynload/*.h ${src_dir}/${module}/details/*.h ${PADDLE_BINARY_DIR}/paddle/fluid/platform/profiler.pb.h
+        DSTS ${dst_dir}/${module} ${dst_dir}/${module}/dynload ${dst_dir}/${module}/details ${dst_dir}/${module}
         )

 set(module "string")
-copy(string_lib
+copy(fluid_lib_dist
         SRCS ${src_dir}/${module}/*.h ${src_dir}/${module}/tinyformat/*.h
         DSTS ${dst_dir}/${module} ${dst_dir}/${module}/tinyformat
         )

 set(module "pybind")
-copy(pybind_lib
+copy(fluid_lib_dist
         SRCS ${CMAKE_CURRENT_BINARY_DIR}/paddle/fluid/${module}/pybind.h
         DSTS ${dst_dir}/${module}
         )

 # CMakeCache Info
-copy(cmake_cache
-        SRCS ${CMAKE_CURRENT_BINARY_DIR}/CMakeCache.txt
-        DSTS ${FLUID_INSTALL_DIR})
-
-# This command generates a complete fluid library for both train and inference
-add_custom_target(fluid_lib_dist DEPENDS ${fluid_lib_dist_dep})
-
-# Following commands generate a inference-only fluid library
-# third_party, version.txt and CMakeCache.txt are the same position with ${FLUID_INSTALL_DIR}
-copy(third_party DEPS fluid_lib_dist
-        SRCS ${FLUID_INSTALL_DIR}/third_party ${FLUID_INSTALL_DIR}/CMakeCache.txt
-        DSTS ${FLUID_INFERENCE_INSTALL_DIR} ${FLUID_INFERENCE_INSTALL_DIR}
-        )
-
-# only need libpaddle_fluid.so/a and paddle_*.h for inference-only library
-copy(inference_api_lib DEPS fluid_lib_dist
-  SRCS ${paddle_fluid_lib}
-       ${FLUID_INSTALL_DIR}/paddle/fluid/inference/paddle_*.h
-  DSTS ${FLUID_INFERENCE_INSTALL_DIR}/paddle/lib ${FLUID_INFERENCE_INSTALL_DIR}/paddle/include
-)
-
-add_custom_target(inference_lib_dist DEPENDS third_party inference_api_lib)
+copy(fluid_lib_dist
+        SRCS ${FLUID_INFERENCE_INSTALL_DIR}/third_party ${CMAKE_CURRENT_BINARY_DIR}/CMakeCache.txt
+        DSTS ${FLUID_INSTALL_DIR} ${FLUID_INSTALL_DIR}
+        )

 # paddle fluid version
 function(version version_file)


switching from CUDA v4.1 to 4

switching from CUDA v4.1 to 4

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

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

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


CMake: Clean up configure_boost.cmake and simplify detection logic

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

--- deal.II/cmake/configure/configure_boost.cmake
+++ deal.II/cmake/configure/configure_boost.cmake
@@ -38,11 +38,16 @@

 MACRO(FEATURE_BOOST_FIND_EXTERNAL var)

+  #
+  # This mumbo jumbo is necessary because CMake won't let us test against
+  # BOOST_DIR directly. WTF?!
+  #
   IF(NOT DEFINED BOOST_DIR)
     SET(BOOST_DIR "$ENV{BOOST_DIR}")
   ELSE()
     SET_IF_EMPTY(BOOST_DIR "$ENV{BOOST_DIR}")
   ENDIF()
+
   IF(NOT "${BOOST_DIR}" STREQUAL "")
     SET(BOOST_ROOT "${BOOST_DIR}")
   ENDIF()
@@ -65,20 +70,14 @@
   #
   # Fall back to dynamic libraries if no static libraries could be found:
   #
-  IF( Boost_USE_STATIC_LIBS AND
-      (NOT Boost_SERIALIZATION_FOUND OR NOT Boost_SYSTEM_FOUND)
-    )
+  IF(NOT Boost_FOUND AND Boost_USE_STATIC_LIBS)
     SET(Boost_USE_STATIC_LIBS FALSE)
     FIND_PACKAGE(Boost 1.44 COMPONENTS ${_boost_components})
   ENDIF()

   MARK_AS_ADVANCED(Boost_DIR)

-
-  IF( Boost_SERIALIZATION_FOUND AND
-      Boost_SYSTEM_FOUND AND
-      (NOT DEAL_II_WITH_THREADS OR Boost_THREAD_FOUND) )
-
+  IF(Boost_FOUND)
     SET(BOOST_VERSION_MAJOR "${Boost_MAJOR_VERSION}")
     SET(BOOST_VERSION_MINOR "${Boost_MINOR_VERSION}")
     SET(BOOST_VERSION_SUBMINOR "${Boost_SUBMINOR_VERSION}")
@@ -101,9 +100,7 @@

   ELSE()

-    SET(BOOST_DIR "" CACHE PATH
-      "An optional hint to a boost directory"
-      )
+    SET(BOOST_DIR "" CACHE PATH "An optional hint to a boost directory")
   ENDIF()
 ENDMACRO()

@@ -119,12 +116,8 @@
   # We need to set some definitions to use the headers of the bundled boost
   # library:
   #
-  LIST(APPEND DEAL_II_DEFINITIONS
-    "BOOST_NO_HASH" "BOOST_NO_SLIST"
-    )
-  LIST(APPEND DEAL_II_USER_DEFINITIONS
-    "BOOST_NO_HASH" "BOOST_NO_SLIST"
-    )
+  LIST(APPEND DEAL_II_DEFINITIONS "BOOST_NO_HASH" "BOOST_NO_SLIST")
+  LIST(APPEND DEAL_II_USER_DEFINITIONS "BOOST_NO_HASH" "BOOST_NO_SLIST")

   INCLUDE_DIRECTORIES(${BOOST_FOLDER}/include)
 ENDMACRO()


add CIL Framework Test in SuperBuild

add CIL Framework Test in SuperBuild

--- SuperBuild/External_CCPi-Framework.cmake
+++ SuperBuild/External_CCPi-Framework.cmake
@@ -66,9 +66,9 @@
     CONFIGURE_COMMAND ""
     BUILD_COMMAND ""
     INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${${proj}_SOURCE_DIR}/Wrappers/Python/ccpi ${PYTHON_DEST}/ccpi
-    TEST_COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_Data*.py &&
-    ${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_algor*.py &&
-    ${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_run_*.py
+    #TEST_COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_Data*.py &&
+    #${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_algor*.py &&
+    #${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/Wrappers/Python/test/ -p test_run_*.py
     CMAKE_ARGS
         -DCMAKE_INSTALL_PREFIX=${libcilreg_Install_Dir}
     DEPENDS
@@ -103,6 +103,16 @@
     set(${proj}_ROOT        ${${proj}_SOURCE_DIR})
     set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR})

+    add_test(NAME CIL_FRAMEWORK_TESTS_1
+             COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -p test_Data*.py
+    WORKING_DIRECTORY ${${proj}_SOURCE_DIR}/Wrappers/Python/test)
+    add_test(NAME CIL_FRAMEWORK_TESTS_2
+             COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -p test_algor*.p
+    WORKING_DIRECTORY ${${proj}_SOURCE_DIR}/Wrappers/Python/test)
+    add_test(NAME CIL_FRAMEWORK_TESTS_3
+             COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -p test_run_*.py
+    WORKING_DIRECTORY ${${proj}_SOURCE_DIR}/Wrappers/Python/test)
+
    else()
       if(${USE_SYSTEM_${externalProjName}})
         find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED)


Squashed 'cmake/' changes from f118ccd..6daa7a1

6daa7a1 fixed old target residuals

git-subtree-dir: cmake
git-subtree-split: 6daa7a13e2e4e441982fddbe4d0245c41f0847c9

--- helpers.cmake
+++ helpers.cmake
@@ -44,7 +44,9 @@
   if(INCLUDE_DIRECTORIES)
     set(RESULT ${RESULT} ${INCLUDE_DIRECTORIES})
   endif()
-  list(REMOVE_DUPLICATES RESULT)
+  if(RESULT)
+    list(REMOVE_DUPLICATES RESULT)
+  endif()
   set(${RESULT_NAME} ${RESULT} PARENT_SCOPE)
 endfunction()

@@ -55,7 +57,9 @@
   if(COMPILE_DEFINITIONS)
     set(RESULT ${RESULT} ${COMPILE_DEFINITIONS})
   endif()
-  list(REMOVE_DUPLICATES RESULT)
+  if(RESULT)
+    list(REMOVE_DUPLICATES RESULT)
+  endif()
   set(${RESULT_NAME} ${RESULT} PARENT_SCOPE)
 endfunction()

@@ -71,14 +75,14 @@

     foreach(ARG ${ARGV})
       if(${ARG} STREQUAL "INCLUDES")
-        get_all_include_directories(INCLUDE_DIRECTORIES acclimate)
+        get_all_include_directories(INCLUDE_DIRECTORIES ${TARGET})
         if(INCLUDE_DIRECTORIES)
           foreach(INCLUDE_DIRECTORY ${INCLUDE_DIRECTORIES})
             set(ARGS ${ARGS} "-I${INCLUDE_DIRECTORY}")
           endforeach()
         endif()
       elseif(${ARG} STREQUAL "DEFINITIONS")
-        get_all_compile_definitions(COMPILE_DEFINITIONS acclimate)
+        get_all_compile_definitions(COMPILE_DEFINITIONS ${TARGET})
         if(COMPILE_DEFINITIONS)
           foreach(COMPILE_DEFINITION ${COMPILE_DEFINITIONS})
             set(ARGS ${ARGS} "-D${COMPILE_DEFINITION}")


change -dl to ${CMAKE_DL_LIBS}

change -dl to ${CMAKE_DL_LIBS}

--- PI.cmake
+++ PI.cmake
@@ -6,7 +6,6 @@
 cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)

 SET(CMAKE_SYSTEM_NAME Linux)
-SET(CMAKE_SYSTEM_VERSION 1)
 SET(CMAKE_SYSTEM_PROCESSOR arm)

 ## Target Sysroot environment
@@ -14,7 +13,7 @@
 SET(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})

-## Flags
+## Adding manual flags
 #SET( CMAKE_CXX_FLAGS           "-std=c++11"                        CACHE STRING "c++ flags" )
 #SET( CMAKE_C_FLAGS             ""                        CACHE STRING "c flags" )
 #SET( CMAKE_CXX_FLAGS_RELEASE   "-O3 -DNDEBUG"            CACHE STRING "c++ Release flags" )
@@ -26,12 +25,12 @@
 #SET( CMAKE_EXE_LINKER_FLAGS    "-Wl,-z,nocopyreloc"      CACHE STRING "executable linker flags" )

 ##
-SET(WARNINGS "-Wall -Wextra -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-form    at-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls" )
+#SET(WARNINGS "-Wall -Wextra -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-form    at-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls" )

 ## Additional Flags
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE INTERNAL "" FORCE)
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}"  CACHE INTERNAL "" FORCE)
-SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ldl"  CACHE INTERNAL "" FORCE)
+#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE INTERNAL "" FORCE)
+#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}"  CACHE INTERNAL "" FORCE)
+SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_DL_LIBS}"  CACHE INTERNAL "" FORCE)

 ##
@@ -77,6 +76,8 @@
     "${CMAKE_SYSROOT}/usr/lib/arm-linux-gnueabihf/libcrypto.a"
     )

+OPTION(BUILD_SHARED_LIBS "Build shared Libraries." OFF)
+
 ## dump some variables
 #MESSAGE( STATUS "CMAKE_C_FLAGS : " ${CMAKE_C_FLAGS} )
 #MESSAGE( STATUS "CMAKE_CXX_FLAGS : " ${CMAKE_CXX_FLAGS} )


remove pc.cmake

remove pc.cmake

--- Firmware/pc.cmake
+++ Firmware/pc.cmake
@@ -1,31 +0,0 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
-SET(CMAKE_SYSTEM_NAME  Windows)
-
-SET(CMAKE_VERBOSE_MAKEFILE ON)
-
-PROJECT(main C CXX ASM)
-
-SET(CSTANDARD "-std=gnu99 -pedantic")
-SET(COPT "-Os")
-#SET(CDEBUG "-gdwarf-2")
-SET(CDEBUG "")
-SET(CWARN "-Wall -Wstrict-prototypes -Wundef")
-#SET(CTUNING "-funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums")
-SET(CTUNING "")
-
-SET(CFLAGS "${CSTANDARD} ${COPT} ${CDEBUG} ${CWARN} ${CTUNING}")
-SET(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} ${CFLAGS} CACHE STRING "" FORCE)
-
-#ADD_EXECUTABLE(${CMAKE_PROJECT_NAME}.elf src/${CMAKE_PROJECT_NAME}.c src/app.c src/hal.c src/lk.c)
-
-#ADD_LIBRARY (HAL_LIB src/hal.c)
-
-ADD_EXECUTABLE(${CMAKE_PROJECT_NAME} src/${CMAKE_PROJECT_NAME}.c src/hal_pc.c)
-
-INCLUDE(FindPkgConfig)
-
-PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2)
-PKG_SEARCH_MODULE(SDL2IMAGE REQUIRED SDL2_image>=2.0.0)
-
-INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS} ${SDL2IMAGE_INCLUDE_DIRS})
-TARGET_LINK_LIBRARIES(${CMAKE_PROJECT_NAME} ${SDL2_LIBRARIES} ${SDL2IMAGE_LIBRARIES})


BUG: avoif including all static libs from lib

This will break ofcourse building external modules for OTB.
But now that we have a test Tu_build_examples, these issues
will not go un-noticed or fixed with a hack!. We find the
bug and fix right way

--- Packaging/install_staticlib_files.cmake
+++ Packaging/install_staticlib_files.cmake
@@ -9,25 +9,25 @@
       # )

-    file(GLOB MY_LIB_FILES
-    "${SUPERBUILD_INSTALL_DIR}/lib/*${STATIC_LIB_EXT}"
-    "${SUPERBUILD_INSTALL_DIR}/${DEST_LIB_DIR}/${LIB_PREFIX}itk*${LIB_EXT}*"
-    "${SUPERBUILD_INSTALL_DIR}/${DEST_LIB_DIR}/${LIB_PREFIX}ITK*${LIB_EXT}*"
-    )
-    foreach(MY_LIB_FILE ${MY_LIB_FILES})
-    set(a_symlink FALSE)
-     isfile_symlink("${itk_lib_file}" a_symlink itk_lib_file_target)
-     if(a_symlink)
-          #TODO
-     else()
-       install_rule(${MY_LIB_FILE})
-       #list(APPEND file_list "${itk_lib_file}")
-     endif()
+    # file(GLOB MY_LIB_FILES
+    # "${SUPERBUILD_INSTALL_DIR}/lib/*${STATIC_LIB_EXT}"
+    # "${SUPERBUILD_INSTALL_DIR}/${DEST_LIB_DIR}/${LIB_PREFIX}itk*${LIB_EXT}*"
+    # "${SUPERBUILD_INSTALL_DIR}/${DEST_LIB_DIR}/${LIB_PREFIX}ITK*${LIB_EXT}*"
+    # )
+    # foreach(MY_LIB_FILE ${MY_LIB_FILES})
+    # set(a_symlink FALSE)
+    #  isfile_symlink("${itk_lib_file}" a_symlink itk_lib_file_target)
+    #  if(a_symlink)
+    #       #TODO
+    #  else()
+    #    install_rule(${MY_LIB_FILE})
+    #    #list(APPEND file_list "${itk_lib_file}")
+    #  endif()

       #get_filename_component(MY_LIB_FILE_name ${MY_LIB_FILE} NAME)
       #list(APPEND file_list "${MY_LIB_FILE_name}")

-    endforeach()
+    #endforeach()

     #RK: there is a bug in itk cmake files in install tree
     #we workaround with below code


Update documentation reference

Update documentation reference

--- UNITTESTS/empty_baseline/unittest.cmake
+++ UNITTESTS/empty_baseline/unittest.cmake
@@ -9,10 +9,6 @@
   ../features/mbedtls/inc/mbedtls/
   ../features/mbedtls/platform/inc/
   ../features/frameworks/mbed-trace/mbed-trace/
-)
-
-set(unittest-sources
-    ../storage/system_storage/SystemStorage.cpp
 )

 set(unittest-test-sources


enable creation of debug information in Release

--- cmake/FindCUTI.cmake
+++ cmake/FindCUTI.cmake
@@ -68,6 +68,9 @@
     target_include_directories(${target} PUBLIC ${CPPUNIT_INCLUDE_DIRS})
   ENDIF(USE_CUTI_INTEGRATION AND WIN32)
   target_include_directories(${target} PUBLIC ${CUTI_INCLUDE_DIRS})
+  #Enable debug information for xcode
+  set_target_properties (${target} PROPERTIES XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT[variant=Debug] "dwarf")
+  set_target_properties (${target} PROPERTIES XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym")
 endfunction(cuti_init_target_flags)

 function(cuti_xctest_add_bundle target testee)


march=native

march=native

--- cmake/compiler.cmake
+++ cmake/compiler.cmake
@@ -1,15 +1,17 @@
 if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
   if(WIN32)
     string(APPEND CMAKE_Fortran_FLAGS " /warn /heap-arrays")
+    add_compile_options(/arch=native)
   else()
     string(APPEND CMAKE_Fortran_FLAGS " -warn -heap-arrays")
+    add_compile_options(-march=native)
   endif()

   string(APPEND CMAKE_Fortran_FLAGS_DEBUG " -traceback -debug extended -check all -fpe0")
 elseif(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
   string(APPEND CMAKE_Fortran_FLAGS " -fimplicit-none")

-  add_compile_options(-mtune=native -Wall -Wextra)
+  add_compile_options(-march=native -Wall -Wextra)

   string(APPEND CMAKE_Fortran_FLAGS_DEBUG " -ffpe-trap=zero,overflow,underflow")


Policy update

Policy update

--- cmake/platform.cmake
+++ cmake/platform.cmake
@@ -1,4 +1,8 @@
 cmake_minimum_required(VERSION 3.0.0)
+
+# always link with absolute path, even implicit directories. avoids problems with
+# running targets on IDE when dll's are not in the environment search path.
+cmake_policy(SET CMP0060 NEW)

 if(UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
     set(OSX 1)


Only link to DirectX 11.3

Only link to DirectX 11.3

--- CMake/Packages/FindDirectX11.cmake
+++ CMake/Packages/FindDirectX11.cmake
@@ -7,7 +7,7 @@
 if(WIN32) # The only platform it makes sense to check for DirectX11 SDK
     include(FindPkgMacros)
     findpkg_begin(DirectX11)
-
+
     # Windows 10 Universal SDK
     if(MSVC14)
         if(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION)
@@ -15,102 +15,12 @@
         else()
             set(W10SDK_VER 10.0.10240.0)
         endif()
-        find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS "C:/Program Files (x86)/Windows Kits/10/include/${W10SDK_VER}/um" "C:/Program Files/Windows Kits/10/include/${W10SDK_VER}/um")
-        set(DirectX11_LIBRARY d3d11.lib dxgi.lib dxguid.lib) # in "C:/Program Files (x86)/Windows Kits/10/lib/${W10SDK_VER}/um/${MSVC_CXX_ARCHITECTURE_ID}/"
-
-    # Windows Phone 8.1 SDK
-    elseif(WINDOWS_PHONE AND MSVC12)
-        find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS "C:/Program Files (x86)/Windows Phone Kits/8.1/include" "C:/Program Files/Windows Phone Kits/8.1/include")
-        set(DirectX11_LIBRARY d3d11.lib dxgi.lib dxguid.lib) # in "C:/Program Files (x86)/Windows Phone Kits/8.1/lib/${MSVC_CXX_ARCHITECTURE_ID}/"
-
-    # Windows Phone 8.0 SDK
-    elseif(WINDOWS_PHONE AND MSVC11)
-        find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS "C:/Program Files (x86)/Windows Phone Kits/8.0/include" "C:/Program Files/Windows Phone Kits/8.0/include")
-        set(DirectX11_LIBRARY d3d11.lib dxgi.lib dxguid.lib) # in "C:/Program Files (x86)/Windows Phone Kits/8.0/lib/${MSVC_CXX_ARCHITECTURE_ID}/"
-
-    # Windows 8.1 SDK
-    elseif(MSVC12)
-        find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS "C:/Program Files (x86)/Windows Kits/8.1/include/um" "C:/Program Files/Windows Kits/8.1/include/um")
-        set(DirectX11_LIBRARY d3d11.lib dxgi.lib dxguid.lib) # in "C:/Program Files (x86)/Windows Kits/8.1/lib/winv6.3/um/${MSVC_CXX_ARCHITECTURE_ID}/"
-
-    # Windows 8.0 SDK
-    elseif(MSVC11)
-        find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS "C:/Program Files (x86)/Windows Kits/8.0/include/um" "C:/Program Files/Windows Kits/8.0/include/um")
-        set(DirectX11_LIBRARY d3d11.lib dxgi.lib dxguid.lib) # in "C:/Program Files (x86)/Windows Kits/8.0/lib/win8/um/${MSVC_CXX_ARCHITECTURE_ID}/"
-
-    # Legacy Direct X SDK
-    else()
-
-    # Get path, convert backslashes as ${ENV_DXSDK_DIR}
-    getenv_path(DXSDK_DIR)
-    getenv_path(DIRECTX_HOME)
-    getenv_path(DIRECTX_ROOT)
-    getenv_path(DIRECTX_BASE)
-
-    # construct search paths
-    set(DirectX11_PREFIX_PATH
-    "${DXSDK_DIR}" "${ENV_DXSDK_DIR}"
-    "${DIRECTX_HOME}" "${ENV_DIRECTX_HOME}"
-    "${DIRECTX_ROOT}" "${ENV_DIRECTX_ROOT}"
-    "${DIRECTX_BASE}" "${ENV_DIRECTX_BASE}"
-    "C:/apps_x86/Microsoft DirectX SDK*"
-    "C:/Program Files (x86)/Microsoft DirectX SDK*"
-    "C:/apps/Microsoft DirectX SDK*"
-    "C:/Program Files/Microsoft DirectX SDK*"
-    "$ENV{ProgramFiles}/Microsoft DirectX SDK*"
-    )
-
-    create_search_paths(DirectX11)
-    # redo search if prefix path changed
-    clear_if_changed(DirectX11_PREFIX_PATH
-        DirectX11_LIBRARY
-        DirectX11_INCLUDE_DIR
-    )
-
-    # dlls are in DirectX11_ROOT_DIR/Developer Runtime/x64|x86
-    # lib files are in DirectX11_ROOT_DIR/Lib/x64|x86
-    if(CMAKE_CL_64)
-        set(DirectX11_LIBPATH_SUFFIX "x64")
-    else(CMAKE_CL_64)
-        set(DirectX11_LIBPATH_SUFFIX "x86")
-    endif(CMAKE_CL_64)
-
-    # look for D3D11 components
-    find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS ${DirectX11_INC_SEARCH_PATH})
-    find_library(DirectX11_DXERR_LIBRARY NAMES DxErr HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX})
-    find_library(DirectX11_DXGUID_LIBRARY NAMES dxguid HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX})
-    find_library(DirectX11_DXGI_LIBRARY NAMES dxgi HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX})
-    find_library(DirectX11_D3DCOMPILER_LIBRARY NAMES d3dcompiler HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX})
-    find_library(DirectX11_D3D11_LIBRARY NAMES d3d11 HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX})
-    find_library(DirectX11_D3DX11_LIBRARY NAMES d3dx11 HINTS ${DirectX11_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX11_LIBPATH_SUFFIX})
-
-    if (DirectX11_INCLUDE_DIR AND DirectX11_D3D11_LIBRARY)
-      set(DirectX11_D3D11_LIBRARIES ${DirectX11_D3D11_LIBRARIES}
-        ${DirectX11_D3D11_LIBRARY}
-        ${DirectX11_DXGI_LIBRARY}
-        ${DirectX11_DXGUID_LIBRARY}
-        ${DirectX11_D3DCOMPILER_LIBRARY}
-      )
-    endif ()
-    if (DirectX11_D3DX11_LIBRARY)
-        set(DirectX11_D3D11_LIBRARIES ${DirectX11_D3D11_LIBRARIES} ${DirectX11_D3DX11_LIBRARY})
-    endif ()
-    if (DirectX11_DXERR_LIBRARY)
-        set(DirectX11_D3D11_LIBRARIES ${DirectX11_D3D11_LIBRARIES} ${DirectX11_DXERR_LIBRARY})
-    endif ()
-
-    set(DirectX11_LIBRARY
-        ${DirectX11_D3D11_LIBRARIES}
-    )
+    else()
+        set(W10SDK_VER 10.0.15063.0)
+    endif()

-    mark_as_advanced(DirectX11_D3D11_LIBRARY
-                     DirectX11_D3DX11_LIBRARY
-                     DirectX11_DXERR_LIBRARY
-                     DirectX11_DXGUID_LIBRARY
-                     DirectX11_DXGI_LIBRARY
-                     DirectX11_D3DCOMPILER_LIBRARY)
-
-    endif () # Legacy Direct X SDK
+    find_path(DirectX11_INCLUDE_DIR NAMES d3d11.h HINTS "C:/Program Files (x86)/Windows Kits/10/include/${W10SDK_VER}/um" "C:/Program Files/Windows Kits/10/include/${W10SDK_VER}/um")
+    set(DirectX11_LIBRARY d3d11.lib dxgi.lib dxguid.lib) # in "C:/Program Files (x86)/Windows Kits/10/lib/${W10SDK_VER}/um/${MSVC_CXX_ARCHITECTURE_ID}/"

     findpkg_finish(DirectX11)


FindVOTCA_TOOLS.cmake: fix build without sqlite3

--- CMakeModules/FindVOTCA_TOOLS.cmake
+++ CMakeModules/FindVOTCA_TOOLS.cmake
@@ -34,12 +34,14 @@
 endif()

 find_path(VOTCA_TOOLS_HAS_SQLITE3 votca/tools/database.h HINTS ${VOTCA_TOOLS_INCLUDE_DIR} ${PC_VOTCA_TOOLS_INCLUDE_DIRS})
-if (VOTCA_TOOLS_HAS_SQLITE3)
+if(DEFINED WITH_SQLITE3 AND NOT WITH_SQLITE3)
+  set(SQLITE3_INCLUDE_DIR)
+elseif(VOTCA_TOOLS_HAS_SQLITE3)
   #due to include <sqlite3.h> in database.h
   find_package(SQLITE3 REQUIRED)
-else(VOTCA_TOOLS_HAS_SQLITE3)
+else()
   set(SQLITE3_INCLUDE_DIR)
-endif (VOTCA_TOOLS_HAS_SQLITE3)
+endif()

 find_library(VOTCA_TOOLS_LIBRARY NAMES votca_tools HINTS ${PC_VOTCA_TOOLS_LIBRARY_DIRS} )


Check for correctly named CLR_LINKER_FILE (#2124)

***NO_CI***

(cherry picked from commit f29a51b6ab2d2b1e32d4de5c696a155e7b817673)

--- CMake/binutils.common.cmake
+++ CMake/binutils.common.cmake
@@ -456,7 +456,7 @@
         message(FATAL_ERROR "Need to provide BOOTER_LINKER_FILE argument when target has HAS_NANOBOOTER defined")
     endif()

-    if(NOT NFSTBC_BOOTER_LINKER_FILE OR "${NFSTBC_BOOTER_LINKER_FILE}" STREQUAL "")
+    if(NOT NFSTBC_CLR_LINKER_FILE OR "${NFSTBC_CLR_LINKER_FILE}" STREQUAL "")
         message(FATAL_ERROR "Need to provide CLR_LINKER_FILE argument")
     endif()


add numpy include dir to python build for out of the source numpy builds

--- CMakeExternals/OpenCV.cmake
+++ CMakeExternals/OpenCV.cmake
@@ -44,6 +44,9 @@
       # use the numpy build within mitk
       if(MITK_USE_NUMPY)
         list(APPEND proj_DEPENDENCIES Numpy)
+        list(APPEND additional_cmake_args
+             -DPYTHON_NUMPY_INCLUDE_DIR:PATH=${NUMPY_INCLUDE_DIR}
+        )
       endif()
     else()
       list(APPEND additional_cmake_args


[Build] Fixed a packaging issue about the INSTALL file when not existing.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -104,7 +104,11 @@

   ##
   # Basic documentation (i.e., AUTHORS, NEWS, README, INSTALL)
-  set (BASICDOC_FILES AUTHORS NEWS README INSTALL)
+  set (DOC_INSTALL_FILE INSTALL)
+  if (NOT EXISTS ${DOC_INSTALL_FILE})
+    unset (DOC_INSTALL_FILE)
+  endif (NOT EXISTS ${DOC_INSTALL_FILE})
+  set (BASICDOC_FILES AUTHORS NEWS README ${DOC_INSTALL_FILE})
   set (BASICDOC_PATH "share/doc/${PACKAGE}-${PACKAGE_VERSION}")

 endmacro (set_project_options)


CI: test prepare build with .ssh/config set on maki

--- CI/prepare_superbuild.cmake
+++ CI/prepare_superbuild.cmake
@@ -20,7 +20,7 @@
 # This script is for the superbuild build on the CI platform

 include( "${CMAKE_CURRENT_LIST_DIR}/macros.cmake" )
-
+set ( DEBUG "1" )
 set (ENV{LANG} "C") # Only ascii output
 get_filename_component(OTB_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR} DIRECTORY)


Fix Win32 build

Fix Win32 build

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

--- UseGnuWin32.cmake
+++ UseGnuWin32.cmake
@@ -10,9 +10,7 @@
     ${GNUWIN32_TGZ} WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
 endif(NOT EXISTS ${GNUWIN32_DIR})

-file(WRITE ${CMAKE_BINARY_DIR}/unistd.h.in "\n")
-configure_file(${CMAKE_BINARY_DIR}/unistd.h.in
-  ${CMAKE_BINARY_DIR}/include/unistd.h COPYONLY)
+file(WRITE ${OUTPUT_INCLUDE_DIR}/unistd.h "\n")

 set(BISON_EXECUTABLE ${GNUWIN32_DIR}/bin/bison.bat)
 set(FLEX_EXECUTABLE ${GNUWIN32_DIR}/bin/flex.exe)


Update leveldb

Update leveldb

--- leveldb.cmake
+++ leveldb.cmake
@@ -13,9 +13,9 @@
 include (snappy)

 external_source (leveldb
-    1.9.0
-    leveldb-1.9.0.tar.gz
-    12f11385cb58ae0de66d4bc2cc7f8194
+    1.14
+    leveldb-1.14.0.tar.gz
+    38ce005460d71040f959d71fd8d7fc78
     http://leveldb.googlecode.com/files)

 message ("Installing ${leveldb_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
@@ -32,7 +32,7 @@
         BUILD_COMMAND     ${BUILDEM_ENV_STRING} make
         BUILD_IN_SOURCE   1
         INSTALL_COMMAND   ${CMAKE_COMMAND} -E copy
-            ${leveldb_SRC_DIR}/libleveldb.dylib.1.9 ${BUILDEM_LIB_DIR}/libleveldb.dylib
+            ${leveldb_SRC_DIR}/libleveldb.dylib.${leveldb_RELEASE} ${BUILDEM_LIB_DIR}/libleveldb.dylib
     )
 elseif (${UNIX})
     message ("Leveldb cmake system: Detected UNIX-like platform.")
@@ -47,7 +47,7 @@
         BUILD_COMMAND     ${BUILDEM_ENV_STRING} make
         BUILD_IN_SOURCE   1
         INSTALL_COMMAND   ${CMAKE_COMMAND} -E copy
-            ${leveldb_SRC_DIR}/libleveldb.so.1.9 ${BUILDEM_LIB_DIR}/libleveldb.so
+            ${leveldb_SRC_DIR}/libleveldb.so.${leveldb_RELEASE} ${BUILDEM_LIB_DIR}/libleveldb.so
     )
     ExternalProject_add_step(${leveldb_NAME} install_lib_link
         DEPENDEES   install


Support both debug and release versions of GTest

--- cmake.modules/build-googletest.cmake
+++ cmake.modules/build-googletest.cmake
@@ -1,6 +1,7 @@
 if (NOT EXISTS ${CMAKE_BINARY_DIR}/external/googletest)
   message("--googletest not found. Installing")
-  ExternalProject_Add(googletest
+
+  ExternalProject_Add(googletest-release
     GIT_REPOSITORY "https://github.com/google/googletest.git"
     GIT_TAG "release-1.8.0"
     PREFIX external/googletest
@@ -12,8 +13,24 @@
       -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
       -DBUILD_GMOCK:BOOL=OFF
       -DBUILD_GTEST:BOOL=ON
-      -DCMAKE_BUILD_TYPE:STRING=Debug
+      -DCMAKE_BUILD_TYPE:STRING=Release
   )
+
+  ExternalProject_Add(googletest-debug
+    GIT_REPOSITORY "https://github.com/google/googletest.git"
+    GIT_TAG "release-1.8.0"
+    PREFIX external/googletest
+    BUILD_IN_SOURCE
+    UPDATE_COMMAND ""
+    CMAKE_CACHE_ARGS
+     -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
+     -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+     -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
+     -DBUILD_GMOCK:BOOL=OFF
+     -DBUILD_GTEST:BOOL=ON
+     -DCMAKE_BUILD_TYPE:STRING=Debug
+     -DCMAKE_DEBUG_POSTFIX:STRING=d
+ )
 endif()

 set(GTEST_ROOT ${CMAKE_BINARY_DIR}/external/googletest)


Fix cmake typo

Fix cmake typo

--- tools/cmake/targets.cmake
+++ tools/cmake/targets.cmake
@@ -37,7 +37,7 @@
     idf_build_get_property(idf_target IDF_TARGET)
     if(NOT ${idf_target} STREQUAL ${CONFIG_IDF_TARGET})
         message(FATAL_ERROR "CONFIG_IDF_TARGET in sdkconfig does not match "
-            "IDF_TARGET environement variable. To change the target, delete "
+            "IDF_TARGET environment variable. To change the target, delete "
             "sdkconfig file and build the project again.")
     endif()
 endfunction()
@@ -66,4 +66,4 @@
                     "checked ${toolchain_file_global} and ${toolchain_file_component}")
         endif()
     endif()
-endmacro()+endmacro()


cmake: internal/stage: document a tricky part

--- cmake/qibuild/internal/stage.cmake
+++ cmake/qibuild/internal/stage.cmake
@@ -247,6 +247,40 @@
   set(_sdk_file "${QI_SDK_DIR}/${QI_SDK_CMAKE_MODULES}/${target}-config.cmake")
   file(WRITE "${_sdk_file}" "${_sdk}")

+  # OK, this one is tricky.
+  # with qibuild, when you have a target named "foo", you always prefix
+  # the variables concerning the foo target with the upper-case name
+  # of the target (FOO_INCLUDE_DIRS, FOO_DEFINITIONS, FOO_DEPENDS....)
+
+  # previously, when using toc/t001chain, you could stage a library
+  # with whatever named you wanted. For instance, you could use:
+  # stage_lib(foo LIBFOO)
+
+  # In order to preserve backward compatibility, (for instance use_lib(bar LIBFOO)
+  # MUST continue to work), when we stumble upon this kind of call in compat/compat.cmake,
+  # we create two different modules.
+
+  # one is still called foo-config.cmake, the other one is a copy of foo-config.cmake,
+  # named libfoo-config.cmake, where every occurrence of "FOO" is replaced by
+  # LIBFOO.
+  # This way, only the *names* of the values changed, but not their value, so
+  # LIBFOO_DEPENDS is the same as FOO_DEPENDS
+
+  # TODO: this little final hack is not very safe. Maybe a better way to do it will
+  # be to generate a file looking like
+
+  #   message(STAUS "Usage of
+  #       use_lib(... LIBFOO)
+  #   is deprecated, please use
+  #       qi_use_lib(.. foo)
+  #   find_package(foo)
+  #   ")
+  #
+  #   set(LIBFOO_DEPENDS ${FOO_DEPENDS}
+  #   set(LIBFOO_INLUDE_DIRS ${FOO_INCLUDE_DIRS}
+  #
+  #
+
   if(_staged_name)
     message(STATUS "Staging ${_staged_name} instead of ${target}!")
     string(TOUPPER ${target} _U_target)


cmake: Add GCC linker flags for AIX platform

--- platforms/aix-gcc/platform.cmake
+++ platforms/aix-gcc/platform.cmake
@@ -3,7 +3,8 @@
 set (PLIB_TIME_PROFILER_MODEL posix)
 set (PLIB_DIR_MODEL posix)

-set (PLIB_PLATFORM_LINK_LIBRARIES c_r pthreads)
+set (PLIB_PLATFORM_LDFLAGS -L/usr/lib/threads)
+set (PLIB_PLATFORM_LINK_LIBRARIES c_r -pthread)

 set (PLIB_PLATFORM_DEFINES
         -D_REENTRANT


WIP: Fix VTK_USE_QVTKOPENGLWIDGET condition

--- ShapePopulationViewer.cmake
+++ ShapePopulationViewer.cmake
@@ -33,7 +33,7 @@
     list(APPEND qt_components X11Extras)
   endif()
   find_package(Qt5 COMPONENTS ${qt_components} REQUIRED)
-  if (VTK_VERSION VERSION_GREATER "7" AND VTK_RENDERING_BACKEND STREQUAL "OpenGL2")
+  if (VTK_VERSION VERSION_GREATER "7" AND (VTK_RENDERING_BACKEND STREQUAL "OpenGL2" OR VTK_RENDERING_BACKEND STREQUAL "OpenGL"))
     set(ShapePopulationViewer_VTK_USE_QVTKOPENGLWIDGET 1)
     set(ShapePopulationViewer_VTK_USE_QVTKOPENGLNATIVEWIDGET 0)


BUG: disable cip_python to avoid problems with Cython. TG-117 #done

--- SuperBuild/External_CIP.cmake
+++ SuperBuild/External_CIP.cmake
@@ -66,6 +66,7 @@
       -DCIP_CLI_INSTALL_LIBRARY_DESTINATION:PATH=${Slicer_INSTALL_CLIMODULES_LIB_DIR}
       -DCIP_CLI_INSTALL_ARCHIVE_DESTINATION:PATH=${Slicer_INSTALL_CLIMODULES_LIB_DIR}
       -DCIP_CLI_INSTALL_RUNTIME_DESTINATION:PATH=${Slicer_INSTALL_CLIMODULES_BIN_DIR}
+      -DINSTALL_CIP_PYTHON_LIBRARY:BOOL=OFF
       -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
       -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}


Switch back to using Slicer fork of ChestImagingPlatform

Pull request that fixed critical issues was not integrated for over a week.

--- SuperBuild/External_CIP.cmake
+++ SuperBuild/External_CIP.cmake
@@ -30,7 +30,7 @@

   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
-    GIT_REPOSITORY "https://github.com/acil-bwh/ChestImagingPlatform.git"
+    GIT_REPOSITORY "https://github.com/Slicer/ChestImagingPlatform.git"
     GIT_TAG develop
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     #DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E echo "Remove this line and uncomment GIT_REPOSITORY and GIT_TAG"