Minor cleanup to FindCBLAS.cmake

Minor cleanup to FindCBLAS.cmake

- Remove searching for MKL
- Fix bug when looking up symbols
- Now check for libblas on ubuntu based systems

--- CMakeModules/FindCBLAS.cmake
+++ CMakeModules/FindCBLAS.cmake
@@ -36,7 +36,7 @@
     IF (NOT ${PC_LIB}_LIBRARY)
       message(FATAL_ERROR "Something is wrong in your pkg-config file - lib ${PC_LIB} not found in ${PC_CBLAS_LIBRARY_DIRS}")
     ENDIF (NOT ${PC_LIB}_LIBRARY)
-    LIST(APPEND CBLAS_LIBRARIES ${${PC_LIB}_LIBRARY})
+    LIST(APPEND CBLAS_LIBRARIES ${${PC_LIB}_LIBRARY})
   ENDFOREACH(PC_LIB)

   FIND_PACKAGE_HANDLE_STANDARD_ARGS(CBLAS DEFAULT_MSG CBLAS_LIBRARIES)
@@ -146,12 +146,12 @@

       SET(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})
       SET(_libraries_work ${${_prefix}_${_library}_LIBRARY})
-
     ENDIF(_libraries_work)
   ENDFOREACH(_library)

   # Test include
   SET(_bug_search_include ${_search_include}) #CMAKE BUG!!! SHOULD NOT BE THAT
+  SET(_bug_libraries_work_check ${_libraries_work_check}) #CMAKE BUG!!! SHOULD NOT BE THAT

   IF(_bug_search_include)
     FIND_PATH(${_prefix}${_combined_name}_INCLUDE ${_include} ${_paths})
@@ -170,8 +170,7 @@
     SET(${_prefix}_INCLUDE_FILE ${_include})
   ENDIF(_bug_search_include)

-
-  IF (_libraries_work_check)
+  IF (_bug_libraries_work_check)
     # Test this combination of libraries.
     IF(_libraries_work)
       SET(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}})
@@ -179,9 +178,13 @@
       SET(CMAKE_REQUIRED_LIBRARIES)
       MARK_AS_ADVANCED(${_prefix}${_combined_name}_WORKS)
       SET(_libraries_work ${${_prefix}${_combined_name}_WORKS})
+
       IF(_verbose AND _libraries_work)
-        MESSAGE(STATUS "Libraries found")
+        MESSAGE(STATUS "CBLAS Symbols FOUND")
+      ELSE()
+        MESSAGE(STATUS "CBLAS Symbols NOTFOUND")
       ENDIF(_verbose AND _libraries_work)
+
     ENDIF(_libraries_work)
   ENDIF()

@@ -216,31 +219,6 @@
     TRUE)
 ENDIF( NOT CBLAS_LIBRARIES )

-# MKL
-IF (INTEL_MKL_ROOT_DIR)
-  IF ("${SIZE_OF_VOIDP}" EQUAL 8)
-    SET(MKL_CBLAS_EXT mkl_gf_lp64)
-  ELSE()
-    SET(MKL_CBLAS_EXT mkl_gf)
-  ENDIF()
-
-  IF(NOT CBLAS_LIBRARIES)
-    CHECK_ALL_LIBRARIES(
-      CBLAS_LIBRARIES
-      CBLAS
-      cblas_dgemm
-      ""
-      "${MKL_CBLAS_EXT};mkl_intel_thread"
-      "mkl_cblas.h"
-      TRUE,
-      FALSE)
-  ENDIF(NOT CBLAS_LIBRARIES)
-
-  IF (CBLAS_LIBRARIES)
-    SET(MKL_CBLAS_FOUND TRUE)
-  ENDIF()
-ENDIF()
-
 # CBLAS in ATLAS library? (http://math-atlas.sourceforge.net/)
 IF(NOT CBLAS_LIBRARIES)
   CHECK_ALL_LIBRARIES(
@@ -275,6 +253,20 @@
     cblas_dgemm
     ""
     "cblas"
+    "cblas.h"
+    TRUE,
+    TRUE)
+ENDIF(NOT CBLAS_LIBRARIES)
+
+# Generic BLAS+CBLAS library
+# Debian based systems have them as single library
+IF(NOT CBLAS_LIBRARIES)
+  CHECK_ALL_LIBRARIES(
+    CBLAS_LIBRARIES
+    CBLAS
+    cblas_dgemm
+    ""
+    "blas"
     "cblas.h"
     TRUE,
     TRUE)


update

update

--- modules/fmt.cmake
+++ modules/fmt.cmake
@@ -3,7 +3,7 @@
   # Module library
   file(GLOB SOURCE_FILES "fmt/include/fmt/*.cc")
   if(NOT MSVC)
-    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS}")
+    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} -Wno-shadow")
   else()
     # C4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data
     # C4267: conversion from 'size_t' to 'type', possible loss of data


commented out line removed from wasm.cmake

--- CMakeModules/wasm.cmake
+++ CMakeModules/wasm.cmake
@@ -96,7 +96,6 @@
     foreach(folder ${INCLUDE_FOLDERS})
        list(APPEND WASM_COMMAND -I ${folder})
     endforeach()
-    #string(REPLACE ";" " -I " INCLUDE_FOLDERS_STR "${INCLUDE_FOLDERS}")

     add_custom_command(OUTPUT ${outfile}.bc
       DEPENDS ${infile}


[Build] The CMake framework now takes into account the CXXFLAGS environment variable.

--- project_config_embeddable.cmake
+++ project_config_embeddable.cmake
@@ -129,6 +129,10 @@
 	"Where to install ${PROJECT_NAME}" FORCE)
   set (CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
 	"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
+  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING
+	"C++ compilation flags" FORCE)
+  set (COMPILE_FLAGS "${COMPILE_FLAGS}" CACHE STRING
+	"Supplementary C++ compilation flags" FORCE)
   set (CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" CACHE PATH
 	"Path to custom CMake Modules" FORCE)
   set (INSTALL_DOC "${INSTALL_DOC}" CACHE BOOL
@@ -537,11 +541,20 @@
 macro (init_build)
   ##
   # Compilation
-  # Note: the debug flag (-g) is set (or not) by giving the
-  # corresponding option when calling cmake:
-  # cmake -DCMAKE_BUILD_TYPE:STRING={Debug,Release,MinSizeRel,RelWithDebInfo}
-  #set (CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -Werror")
-  set (CMAKE_CXX_FLAGS "-Wall -Werror")
+  # Note:
+  #  * The debug flag (-g) is set (or not) by giving the corresponding option
+  #    when calling cmake:
+  #    cmake -DCMAKE_BUILD_TYPE:STRING={Debug,Release,MinSizeRel,RelWithDebInfo}
+  #  * The CMAKE_CXX_FLAGS is set by CMake to be equal to the CXXFLAGS
+  #    environment variable. Hence:
+  #    CXXFLAGS="-O2"; export CXXFLAGS; cmake ..
+  #    will set CMAKE_CXX_FLAGS as being equal to -O2.
+  if (NOT CMAKE_CXX_FLAGS)
+	#set (CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -Werror")
+	set (CMAKE_CXX_FLAGS "-Wall -Werror")
+  endif (NOT CMAKE_CXX_FLAGS)
+
+  #
   include_directories (BEFORE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})

   ##
@@ -1289,6 +1302,10 @@
   message (STATUS)
   message (STATUS "BUILD_SHARED_LIBS .............. : ${BUILD_SHARED_LIBS}")
   message (STATUS "CMAKE_BUILD_TYPE ............... : ${CMAKE_BUILD_TYPE}")
+  message (STATUS " * CMAKE_C_FLAGS ............... : ${CMAKE_C_FLAGS}")
+  message (STATUS " * CMAKE_CXX_FLAGS ............. : ${CMAKE_CXX_FLAGS}")
+  message (STATUS " * BUILD_FLAGS ................. : ${BUILD_FLAGS}")
+  message (STATUS " * COMPILE_FLAGS ............... : ${COMPILE_FLAGS}")
   message (STATUS "CMAKE_MODULE_PATH .............. : ${CMAKE_MODULE_PATH}")
   message (STATUS "CMAKE_INSTALL_PREFIX ........... : ${CMAKE_INSTALL_PREFIX}")
   display_doxygen ()


added develop merged depthai device side

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "f9df8e9f3115e796682ff3499068b04f782f888f")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "24c8d75789be175cad5093acc3d93da45464bf0e")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Update FW

Update FW

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "857af1721bc40242530557acd86d8d8b9ed245bc")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "4cdecf221d5d4b0ab1821034a2f26b14c1bfe787")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Update FW: yolov7 support

Update FW: yolov7 support

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "c9cb313f127e628d213a4d830a78250b8eb57a15")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "adc0375d7ec059f253627e076edc4aab7f7a1a6b")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


stability test

stability test

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "a555263a9dbff1166088bcb758ab4306dca9ae1a")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "1324b27d4e69a633d66812e71c1944b053e90433")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Revert "Add VecCore as external project"

This reverts commit 5d3a1150015057bcdb7bb90481fea78782857647.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1268,7 +1268,7 @@
   endif()
 endif()

-if(vc AND NOT Vc_FOUND AND NOT (veccore OR builtin_veccore))
+if(vc AND NOT Vc_FOUND)
   set(Vc_VERSION "1.3.0")
   set(Vc_PROJECT "Vc-${Vc_VERSION}")
   set(Vc_SRC_URI "${lcgpackages}/${Vc_PROJECT}.tar.gz")
@@ -1313,90 +1313,6 @@
 if(Vc_FOUND)
   # Missing from VcConfig.cmake
   set(Vc_INCLUDE_DIRS ${Vc_INCLUDE_DIR})
-endif()
-
-#---Check for VecCore--------------------------------------------------------------------
-if(veccore AND builtin_vc)
-  message(WARNING "Vc is not relocatable, so 'builtin_vc' requires 'builtin_veccore' to set up Vc properly.")
-  set(builtin_veccore ON CACHE BOOL "" FORCE)
-endif()
-
-if(builtin_veccore)
-  unset(VecCore_FOUND)
-  unset(VecCore_FOUND CACHE)
-  set(veccore ON CACHE BOOL "" FORCE)
-elseif(veccore)
-  if(fail-on-missing)
-    find_package(VecCore 0.4.0 CONFIG QUIET REQUIRED)
-  else()
-    find_package(VecCore 0.4.0 CONFIG QUIET)
-    if(NOT VecCore_FOUND)
-      message(STATUS "VecCore not found, support for it disabled.")
-      message(STATUS "Please enable the option 'builtin_veccore' to build VecCore internally.")
-      set(veccore OFF CACHE BOOL "" FORCE)
-    endif()
-  endif()
-endif()
-
-if(veccore AND NOT VecCore_FOUND)
-  set(VecCore_VERSION "0.4.0")
-  set(VecCore_PROJECT "VecCore-${VecCore_VERSION}")
-  set(VecCore_DESTDIR "${CMAKE_BINARY_DIR}/${VecCore_PROJECT}")
-  set(VecCore_ROOTDIR "${VecCore_DESTDIR}/${CMAKE_INSTALL_PREFIX}")
-
-  if(builtin_vc)
-    set(Vc_LIBNAME "${CMAKE_STATIC_LIBRARY_PREFIX}Vc${CMAKE_STATIC_LIBRARY_SUFFIX}")
-    set(Vc_LIBRARY "${VecCore_ROOTDIR}/${_LIBDIR_DEFAULT}/${Vc_LIBNAME}")
-  endif()
-
-  ExternalProject_Add(${VecCore_PROJECT}
-    GIT_REPOSITORY https://gitlab.cern.ch/VecGeom/VecCore.git
-    GIT_TAG v${VecCore_VERSION}
-    BUILD_IN_SOURCE 0
-    BUILD_BYPRODUCTS ${Vc_LIBRARY}
-    LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
-    CMAKE_ARGS -G ${CMAKE_GENERATOR}
-               -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}
-               -DBUILD_TESTING=OFF -DVC=${vc} -DBUILD_VC=${builtin_vc}
-               -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-               -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-               -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-               -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-               -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-               -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-    INSTALL_COMMAND env DESTDIR=${VecCore_DESTDIR} ${CMAKE_COMMAND} --build . --target install
-  )
-
-  if(builtin_vc)
-    add_library(Vc STATIC IMPORTED)
-    set_property(TARGET Vc PROPERTY IMPORTED_LOCATION ${Vc_LIBRARY})
-    add_dependencies(Vc ${VecCore_PROJECT})
-
-    set(Vc_LIBRARIES Vc)
-    set(Vc_INCLUDE_DIR ${VecCore_ROOTDIR}/include)
-    set(Vc_INCLUDE_DIRS ${VecCore_ROOTDIR}/include)
-    set(Vc_CMAKE_MODULES_DIR "${VecCore_ROOTDIR}/${_LIBDIR_DEFAULT}/cmake/Vc")
-
-    find_package_handle_standard_args(Vc
-      FOUND_VAR Vc_FOUND
-      REQUIRED_VARS Vc_INCLUDE_DIR Vc_LIBRARIES Vc_CMAKE_MODULES_DIR
-      VERSION_VAR Vc_VERSION)
-  endif()
-
-  if (vc OR builtin_vc)
-    set(VecCore_ENABLE_VC True)
-    set(VecCore_INCLUDE_DIRS ${Vc_INCLUDE_DIRS})
-    set(VecCore_LIBRARIES ${Vc_LIBRARIES})
-  endif()
-
-  set(VecCore_INCLUDE_DIRS ${VecCore_INCLUDE_DIRS} ${VecCore_ROOTDIR}/include)
-
-  find_package_handle_standard_args(VecCore
-    FOUND_VAR VecCore_FOUND
-    REQUIRED_VARS VecCore_INCLUDE_DIRS
-    VERSION_VAR VecCore_VERSION)
-
-  install(DIRECTORY ${VecCore_ROOTDIR}/ DESTINATION ".")
 endif()

 #---Check for Vdt--------------------------------------------------------------------


Python is always required, move it outside of conditional

Python is required by header and manpage generation. However,
since LLVM requires python as well, this only breaks when
configuring with external LLVM/Clang and -Dpython=OFF.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -459,9 +459,12 @@
 endif()

 #---Check for Python installation-------------------------------------------------------
+
+message(STATUS "Looking for python")
+# Python is required by header and manpage generation
+find_package(PythonInterp ${python_version} REQUIRED)
+
 if(python)
-  message(STATUS "Looking for python")
-  find_package(PythonInterp ${python_version} REQUIRED)
   find_package(PythonLibs ${python_version} REQUIRED)

   if(NOT "${PYTHONLIBS_VERSION_STRING}" MATCHES "${PYTHON_VERSION_STRING}")


BUG: Detect mapnik version and AGG header for version 2.2 and backwards

--- CMake/ImportMapnik.cmake
+++ CMake/ImportMapnik.cmake
@@ -69,20 +69,33 @@
         STRING(REGEX REPLACE ".*#define MAPNIK_MAJOR_VERSION ([0-9]+).*" "\\1" MAPNIK_MAJOR_VERSION  ${_mapnik_version_hpp_CONTENTS})
         STRING(REGEX REPLACE ".*#define MAPNIK_MINOR_VERSION ([0-9]+).*" "\\1" MAPNIK_MINOR_VERSION  ${_mapnik_version_hpp_CONTENTS})
         STRING(REGEX REPLACE ".*#define MAPNIK_PATCH_VERSION ([0-9]+).*" "\\1" MAPNIK_PATCH_VERSION  ${_mapnik_version_hpp_CONTENTS})
-        SET(MAPNIK_VERSION ${MAPNIK_MAJOR_VERSION}.${MAPNIK_MINOR_VERSION}.${MAPNIK_PATCH_VERSION})
-        if(${MAPNIK_MAJOR_VERSION} LESS "2")
+        #make version number as in version.hpp of mapnik
+        #//#define MAPNIK_VERSION (MAPNIK_MAJOR_VERSION*100000) + (MAPNIK_MINOR_VERSION*100) + (MAPNIK_PATCH_VERSION)
+        #if no MAPNIK_MAJOR_VERSION macro is defined then
+        #we read only MAPNIK_VERSION macro which contains the version number. This is for version less than 2.1
+        #as major, minor, patch are introduced in version 2.1
+        #See mapnik commit - https://github.com/mapnik/mapnik/commit/2abe02bd96104988ea76869d1203aa270cf9a68c
+        if(MAPNIK_MAJOR_VERSION)
+          MATH(EXPR OTB_MAPNIK_VERSION "(${MAPNIK_MAJOR_VERSION}*100000) + (${MAPNIK_MINOR_VERSION}*100) + (${MAPNIK_PATCH_VERSION})" )
+          #make MAPNIK_VERSION to have a standard version style eg: 2.2.0 instead of 020020
+          SET(MAPNIK_VERSION ${MAPNIK_MAJOR_VERSION}.${MAPNIK_MINOR_VERSION}.${MAPNIK_PATCH_VERSION})
+       else()
+         STRING(REGEX REPLACE ".*#define MAPNIK_VERSION ([0-9]+).*" "\\1" MAPNIK_VERSION  ${_mapnik_version_hpp_CONTENTS})
+       endif()
+        #should we check for 2.0 here instead of 2.2 to include agg2
+        if(${OTB_MAPNIK_VERSION} LESS "200200")
           message(STATUS "Does not support mapnik2 interface:  ${MAPNIK_VERSION}")
           add_definitions(-DOTB_MAPNIK_COMPATIBILITY_API07)
           # This should be dropped when we don't want to support this any more
           # Estimated date: 02/2013.
         else()
-          find_path(AGG2_INCLUDE_DIR agg_pixfmt_rgba.h PATHS /usr/include/)
-          mark_as_advanced(AGG2_INCLUDE_DIR)
-          if(NOT AGG2_INCLUDE_DIR)
+          find_path(AGG_INCLUDE_DIR agg_pixfmt_rgba.h PATHS /usr/include /usr/include/agg2)
+          mark_as_advanced(AGG_INCLUDE_DIR)
+          if(NOT AGG_INCLUDE_DIR)
             message(FATAL_ERROR
-              "Cannot find AGG2 library, needed by MAPNIK. Please set AGG2_INCLUDE_DIR or set OTB_USE_MAPNIK OFF.")
+              "Cannot find AGG headers, needed by MAPNIK. Please set AGG_INCLUDE_DIR or set OTB_USE_MAPNIK OFF.")
           endif()
-          include_directories(${AGG2_INCLUDE_DIR})
+          include_directories(${AGG_INCLUDE_DIR})
           SET(OTB_MAPNIK_SUPPORTS_API20 TRUE)
         endif()


apply ctk changes

apply ctk changes

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -15,7 +15,7 @@

   IF(NOT DEFINED CTK_DIR)

-    SET(revision_tag bf3817c0a7876a0b789b6f9a6f658e7f3bc6dfaf)
+    SET(revision_tag 8efba9f617bf7e67ce55e010d20dcad4d37264c9)
     IF(${proj}_REVISION_TAG)
       SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


Another CTK version update

Another CTK version update

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -15,7 +15,7 @@

   if(NOT DEFINED CTK_DIR)

-    set(revision_tag 574e4f43)
+    set(revision_tag 2899bd85)
     #IF(${proj}_REVISION_TAG)
     #  SET(revision_tag ${${proj}_REVISION_TAG})
     #ENDIF()
@@ -61,7 +61,7 @@
       BINARY_DIR ${proj}-build
       PREFIX ${proj}-cmake
       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
-      URL_MD5 fe37003ffab6c57e6f15c437fba4bacf
+      URL_MD5 56543b95bfb3fea7915b893c4619de3f
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}


Fix error preventing normal configuration with direct specifying of product directory via cmake option.

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -507,7 +507,7 @@

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


Python extensions accept explicit target name


cpack: remove rpath

cpack: remove rpath

--- scripts/cmake/ElektraPackaging.cmake
+++ scripts/cmake/ElektraPackaging.cmake
@@ -39,10 +39,6 @@
 set (ALL_PLUGINS ${CPACK_COMPONENTS_ALL})
 list(FILTER ALL_PLUGINS INCLUDE REGEX "^libelektra4-.*")
 string (REPLACE ";" ", " ALL_PLUGINS_STR "${ALL_PLUGINS}")
-
-set (CMAKE_BUILD_WITH_INSTALL_RPATH 1)
-
-list(APPEND CMAKE_INSTALL_RPATH "${CMAKE_CURRENT_BINARY_DIR}")

 set (
 	PACKAGE_DESCRIPTION


Fix minor version number increment.

Fix minor version number increment.

	* build-aux/cmake/modules/ProjectInfo.cmake: Here.

--- build-aux/cmake/modules/ProjectInfo.cmake
+++ build-aux/cmake/modules/ProjectInfo.cmake
@@ -182,14 +182,15 @@
   # Set PROJECT_XXXX variables according to project_describe_info results.
   function(project_set_info)
     project_describe_info(major minor patch rc vendor vendor_ver n sha1)
+    echo("Previous release info: major=${major} minor=${minor} patch=${patch} rc=${rc} vendor=${vendor} vendor_ver=${vendor_ver} n=${n} sha1=${sha1}")
     # Minor
     if(PROJECT_VERSION_MAJOR GREATER ${major})
       set(minor 0)
     elseif(PROJECT_VERSION_MAJOR EQUAL ${major})
       if(NOT n EQUAL 0)
-	if(NOT RELEASE_CANDIDATE OR rc EQUAL 0)
-	  math(EXPR minor "${minor} + 1")
-	endif(NOT RELEASE_CANDIDATE OR rc EQUAL 0)
+	if(NOT RELEASE_CANDIDATE AND rc EQUAL 0)
+ 	  math(EXPR minor "${minor} + 1")
+	endif(NOT RELEASE_CANDIDATE AND rc EQUAL 0)
       endif(NOT n EQUAL 0)
     else(PROJECT_VERSION_MAJOR GREATER ${major})
       message(SEND_ERROR
@@ -207,9 +208,9 @@
     # Vendor version
     if(vendor)
       if(NOT n EQUAL 0)
-	if(NOT RELEASE_CANDIDATE OR rc EQUAL 0)
+	if(NOT RELEASE_CANDIDATE AND rc EQUAL 0)
 	  math(EXPR vendor_ver "${vendor_ver} + 1")
-	endif(NOT RELEASE_CANDIDATE OR rc EQUAL 0)
+	endif(NOT RELEASE_CANDIDATE AND rc EQUAL 0)
       endif(NOT n EQUAL 0)
     elseif(vendor)
       set(vendor_ver -1)
@@ -304,6 +305,7 @@
   # ========================== #

   # Format the next tag name.
+  # We remove the trailing additional commit number and sha1
   string(REGEX REPLACE
     "-([0-9]+)-([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]+)$"
     ""


Handle empty PROJECT_VENDOR.

Handle empty PROJECT_VENDOR.

	* build-aux/cmake/modules/ProjectInfo.cmake: Here.

--- build-aux/cmake/modules/ProjectInfo.cmake
+++ build-aux/cmake/modules/ProjectInfo.cmake
@@ -322,11 +322,11 @@
     set(vendor_prefix "${PROJECT_VENDOR}")
   endif(PROJECT_VENDOR STREQUAL "")
   # Do not prefix by vendor if it is already in the project's name.
-  if(${PROJECT_NAME} MATCHES ${vendor_prefix})
+  if(${PROJECT_NAME} MATCHES "${vendor_prefix}")
     set(vendor_prefix)
-  else(${PROJECT_NAME} MATCHES ${vendor_prefix})
+  else(${PROJECT_NAME} MATCHES "${vendor_prefix}")
     set(vendor_prefix "${vendor_prefix}-")
-  endif(${PROJECT_NAME} MATCHES ${vendor_prefix})
+  endif(${PROJECT_NAME} MATCHES "${vendor_prefix}")
   set(PROJECT_TARNAME "${vendor_prefix}${PROJECT_NAME}-${PROJECT_VERSION}")

   # ========================== #


Cleanup in c++11 thread support test

Cleanup in c++11 thread support test

git-svn-id: fbbf69ba8011aca0e74e1c67904b11cccbdbe66b@28162 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/checks/check_01_cxx_features.cmake
+++ deal.II/cmake/checks/check_01_cxx_features.cmake
@@ -104,30 +104,26 @@
     "
     DEAL_II_HAVE_CXX11_SHARED_PTR)

-  CHECK_CXX_SOURCE_COMPILES(
+  #
+  # On some systems with gcc 4.5.0, we can compile the code
+  # below but it will throw an exception when run. So test
+  # that as well.
+  #
+  # TODO: Get somehow rid of the platform introspection...
+  #
+  # TODO: This test will only succeed on platforms where "-pthread" is
+  #       recognized. But this isn't easily fixable:
+  #       configure_threads.cmake which will determine and setup threads
+  #       has to be called later...
+  #
+  PUSH_TEST_FLAG("-pthread")
+  CHECK_CXX_SOURCE_RUNS(
     "
     #include <thread>
     void f(int){}
     int main(){ std::thread t(f,1); t.join(); return 0; }
     "
     DEAL_II_HAVE_CXX11_THREAD)
-
-  #
-  # On some systems with gcc 4.5.0, we can compile the code
-  # above but it will throw an exception when run. So test
-  # that as well. The test will only be successful if we have
-  # libpthread available, so link it in for this test. If
-  # multithreading is requested, it will be added to CXXFLAGS
-  # later on so there is no need to do this here.
-  #
-  PUSH_TEST_FLAG("-lpthread")
-  CHECK_CXX_SOURCE_RUNS(
-    "
-    #include <thread>
-    void f(int){}
-    int main(){ std::thread t(f,1); t.join(); return 0; }
-    "
-    DEAL_II_HAVE_CXX11_THREAD_RUN_OK)
   POP_TEST_FLAG()

   CHECK_CXX_SOURCE_COMPILES(
@@ -162,7 +158,6 @@
       DEAL_II_HAVE_CXX11_FUNCTIONAL_GCCBUG35569_OK AND
       DEAL_II_HAVE_CXX11_SHARED_PTR AND
       DEAL_II_HAVE_CXX11_THREAD AND
-      DEAL_II_HAVE_CXX11_THREAD_RUN_OK AND
       DEAL_II_HAVE_CXX11_MUTEX AND
       DEAL_II_HAVE_CXX11_TUPLE AND
       DEAL_II_HAVE_CXX11_TYPE_TRAITS )


ENH: Setting policy CMP0011 to prevent warning from CMake 2.6.3.

--- Utilities/vxl/config/cmake/config/vxl_utils.cmake
+++ Utilities/vxl/config/cmake/config/vxl_utils.cmake
@@ -4,6 +4,9 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
 IF(COMMAND CMAKE_POLICY)
   CMAKE_POLICY(SET CMP0003 NEW)
+  IF(POLICY CMP0011)
+    CMAKE_POLICY(SET CMP0011 NEW)
+  ENDIF(POLICY CMP0011)
 ENDIF(COMMAND CMAKE_POLICY)

 #IF(CMAKE_MINIMUM_REQUIRED_VERSION GREATER "2.3")


COMP: Removed unused argument in LIBSVM build.

--- CMake/Superbuild/External_LIBSVM.cmake
+++ CMake/Superbuild/External_LIBSVM.cmake
@@ -67,7 +67,6 @@
     CMAKE_ARGS
       -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
       -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-      -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
       -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
       -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
       -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}


COMP: Update rule forcing re-build of inner project to work with VS2012 and above

This commit integrates changes done in these Slicer revisions:

* r23141 (BUG: Fix force build for Slicer)
* r24309 (COMP: Update Slicer, CTK and BRAINSTools to fix outdated builds on VS2012)

--- CMake/Superbuild/External_Slicer.cmake
+++ CMake/Superbuild/External_Slicer.cmake
@@ -137,15 +137,24 @@

   # This custom external project step forces the build and later
   # steps to run whenever a top level build is done...
+  #
+  # BUILD_ALWAYS flag is available in CMake 3.1 that allows force build
+  # of external projects without this workaround. Remove this workaround
+  # and use the CMake flag instead, when Slicer's required minimum CMake
+  # version will be at least 3.1.
+  #
+  if(CMAKE_CONFIGURATION_TYPES)
+    set(BUILD_STAMP_FILE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-prefix/src/${proj}-stamp/${CMAKE_CFG_INTDIR}/${proj}-build")
+  else()
+    set(BUILD_STAMP_FILE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-prefix/src/${proj}-stamp/${proj}-build")
+  endif()
   ExternalProject_Add_Step(${proj} forcebuild
-    COMMAND ${CMAKE_COMMAND} -E echo_append ""
+    COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_STAMP_FILE}
     COMMENT "Forcing build step for '${proj}'"
-    DEPENDEES configure
-    DEPENDERS build
+    DEPENDEES build
     ALWAYS 1
     )

 else()
   ExternalProject_Add_Empty(${proj} DEPENDS ${${proj}_DEPENDENCIES})
 endif()
-


Supress gcov output

Supress gcov output

--- cmake/Modules/CoverallsGenerateGcov.cmake
+++ cmake/Modules/CoverallsGenerateGcov.cmake
@@ -200,12 +200,11 @@
 	# /path/to/project/root/subdir/the_file.c:creating '#path#to#project#root#subdir#the_file.c.gcov'
 	#
 	# If -p is not specified then the file is named only "the_file.c.gcov"
-  # The -r flag ensures gcov only looks are files with relative path names, and exclused files with
-  # absolute names (i.e., STL headers).
 	#
 	execute_process(
-		COMMAND ${GCOV_EXECUTABLE} -r -p -o ${GCDA_DIR} ${GCDA}
+		COMMAND ${GCOV_EXECUTABLE} -p -o ${GCDA_DIR} ${GCDA}
 		WORKING_DIRECTORY ${COV_PATH}
+		OUTPUT_QUIET
 	)
 endforeach()


Uppercase CMake argument

Uppercase CMake argument

In this case CMake is picky about uppercase.

--- cmake/msvc_xp_support.cmake
+++ cmake/msvc_xp_support.cmake
@@ -10,7 +10,7 @@
 #  - v120 (Normal Visual Studio 2013)
 #  - v140 (Normal Visual Studio 2015)
 #  - v141 (Normal isual Studio 2017)
-set(CMAKE_GENERATOR_TOOLSET ${CMAKE_GENERATOR_TOOLSET} CACHE string "Use to target a toolset not available in the CMake GUI list of options, e.g. 'v141_xp'" FORCE)
+set(CMAKE_GENERATOR_TOOLSET ${CMAKE_GENERATOR_TOOLSET} CACHE STRING "Use to target a toolset not available in the CMake GUI list of options, e.g. 'v141_xp'" FORCE)

 ####################################################################################################
 #                                                                                #


Print some extra info searching for python lib on linux

--- FindPythonLibsNew.cmake
+++ FindPythonLibsNew.cmake
@@ -147,12 +147,14 @@
     else()
         set(_PYTHON_LIBS_SEARCH "${PYTHON_PREFIX}/lib")
     endif()
+    message(STATUS "Searching for Python libs in ${_PYTHON_LIBS_SEARCH}")
     # Probably this needs to be more involved. It would be nice if the config
     # information the python interpreter itself gave us were more complete.
     find_library(PYTHON_LIBRARY
         NAMES "python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
         PATHS ${_PYTHON_LIBS_SEARCH}
         NO_DEFAULT_PATH)
+    message(STATUS "Found Python lib ${PYTHON_LIBRARY}")
 endif()

 # For backward compatibility, set PYTHON_INCLUDE_PATH, but make it internal.


Fix for SALOME_CONFIGURE_PREPARE() macros: avoiding redundant ';' at the beginning of the _PREREQ_COMPO_LIST list

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -846,7 +846,14 @@
 MACRO(SALOME_APPEND_LIST_OF_LIST result element_list)
   SET(_tmp_res)
   STRING(REPLACE ";" "," _tmp_res "${${element_list}}")
-  SET(${result} "${${result}};${_tmp_res}")  # LIST(APPEND ...) doesn't handle well empty elements!?
+
+  LIST(LENGTH result _list_len)
+  IF(NOT _list_len EQUAL 0)
+    SET(${result} "${${result}}${_tmp_res};")  # LIST(APPEND ...) doesn't handle well empty elements!?
+  ELSE()
+    SET(${result} "${_tmp_res};")              # to avoid redundant ';' at the beginning of the list
+  ENDIF()
+
 ENDMACRO(SALOME_APPEND_LIST_OF_LIST)

 #########################################################################


GLEW is now needed for GLdraw

GLEW is now needed for GLdraw

--- CMakeModules/KrisLibraryDependencies.cmake
+++ CMakeModules/KrisLibraryDependencies.cmake
@@ -102,6 +102,18 @@
 SET(KRISLIBRARY_INCLUDE_DIRS ${KRISLIBRARY_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIR})
 SET(KRISLIBRARY_LIBRARIES ${KRISLIBRARY_LIBRARIES} ${OPENGL_LIBRARIES})

+# GL Extension Wrangler (GLEW)
+OPTION(USE_GLEW "Build with GLEW support" ON)
+FIND_PACKAGE(GLEW)
+IF(GLEW_FOUND)
+  SET(KRISLIBRARY_DEFINITIONS ${KRISLIBRARY_DEFINITIONS} -DHAVE_GLEW=1)
+  SET(KRISLIBRARY_INCLUDE_DIRS ${KRISLIBRARY_INCLUDE_DIRS} ${GLEW_INCLUDE_DIR})
+  SET(KRISLIBRARY_LIBRARIES ${KRISLIBRARY_LIBRARIES} ${GLEW_LIBRARY})
+ELSE(GLEW_FOUND)
+  MESSAGE("GLEW library not found, setting HAVE_GLEW=0")
+  SET(KRISLIBRARY_DEFINITIONS ${KRISLIBRARY_DEFINITIONS} -DHAVE_GLEW=0)
+ENDIF(GLEW_FOUND)
+
 # GLPK
 OPTION(USE_GLPK "Build with GLPK support" ON)
 IF(USE_GLPK)


add tests to auavx21 config

add tests to auavx21 config

--- cmake/configs/nuttx_auav-x21_default.cmake
+++ cmake/configs/nuttx_auav-x21_default.cmake
@@ -71,15 +71,16 @@
 	#
 	# Testing
 	#
-	#drivers/sf0x/sf0x_tests
-	#drivers/test_ppm
+	drivers/sf0x/sf0x_tests
+	drivers/test_ppm
 	#lib/rc/rc_tests
-	#modules/commander/commander_tests
-	#modules/controllib_test
-	#modules/mavlink/mavlink_tests
-	#modules/unit_test
-	#modules/uORB/uORB_tests
-	#systemcmds/tests
+	modules/commander/commander_tests
+	modules/controllib_test
+	modules/mavlink/mavlink_tests
+	modules/mc_pos_control/mc_pos_control_tests
+	modules/unit_test
+	modules/uORB/uORB_tests
+	systemcmds/tests

 	#
 	# General system control
@@ -96,7 +97,7 @@
 	# Estimation modules
 	#
 	modules/attitude_estimator_q
-	#modules/position_estimator_inav
+	modules/position_estimator_inav
 	modules/local_position_estimator
 	modules/ekf2

@@ -112,7 +113,7 @@
 	#
 	# Logging
 	#
-	#modules/logger
+	modules/logger
 	modules/sdlog2

 	#


Activate git version of vtk 5.10.

Activate git version of vtk 5.10.

--- cmake/externals/projects_modules/VTK.cmake
+++ cmake/externals/projects_modules/VTK.cmake
@@ -50,10 +50,8 @@
 ## #############################################################################

 if (NOT DEFINED ${ep}_SOURCE_DIR)
-    set(location
-      URL "http://www.vtk.org/files/release/5.8/vtk-5.8.0.tar.gz"
-      URL_MD5 "37b7297d02d647cc6ca95b38174cb41f"
-      )
+    set(location GIT_REPOSITORY "git://vtk.org/VTK.git")
+    set(branch GIT_TAG "release-5.10")
 endif()

@@ -89,6 +87,7 @@
 ExternalProject_Add(${ep}
   ${ep_dirs}
   ${location}
+  ${branch}
   UPDATE_COMMAND ""
   CMAKE_GENERATOR ${gen}
   CMAKE_ARGS ${cmake_args}


[fixed] intel cxx11 compiler flag

[fixed] intel cxx11 compiler flag


added new line at the end of the file

added new line at the end of the file

--- cmake/Cuti.cmake
+++ cmake/Cuti.cmake
@@ -43,4 +43,4 @@

 	target_link_libraries(${target} PRIVATE debug ${CUTI_UNIT_TEST_LIBRARIES_DEBUG} ${testee})
 	target_link_libraries(${target} PRIVATE optimized ${CUTI_UNIT_TEST_LIBRARIES_RELEASE} ${testee})
-endfunction(cuti_creates_test_target)+endfunction(cuti_creates_test_target)


Updated SDK generation/Build only logic to make sure sdks generate prior to the directory exists check. Also, regenerating with build only no longer clears or regenerates unneeded SDKs.

--- cmake/sdks.cmake
+++ cmake/sdks.cmake
@@ -185,8 +185,6 @@
     SET(${DEPENDING_SDKS_VAR} "${TEMP_SDK_LIST}" PARENT_SCOPE)
 endfunction()

-# when building a fixed target set, missing SDKs are an error
-# when building "everything", we forgive missing SDKs; should this become an option instead?
 set(SDK_DEPENDENCY_BUILD_LIST "")
 if(BUILD_ONLY)
     set(SDK_BUILD_LIST ${BUILD_ONLY})
@@ -209,52 +207,8 @@
             endforeach()
         endif()
     endforeach()
-
     LIST(REMOVE_DUPLICATES SDK_BUILD_LIST)
-    LIST(REMOVE_DUPLICATES SDK_DEPENDENCY_BUILD_LIST)
-
-    # make sure all the sdks/c2js are present; a missing sdk-directory or c2j file is a build error when building a manually-specified set
-    foreach(SDK IN LISTS SDK_BUILD_LIST)
-        SET(SDK_DIR "aws-cpp-sdk-${SDK}")
-        if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SDK_DIR}")
-            message(FATAL_ERROR "${SDK} is required for build, but ${SDK_DIR} directory is missing!")
-        endif()
-
-        get_c2j_date_for_service(${SDK} SDK_C2J_DATE)
-        SET(SDK_C2J_FILE "${CMAKE_CURRENT_SOURCE_DIR}/code-generation/api-descriptions/${SDK}-${SDK_C2J_DATE}.normal.json")
-        if(REGENERATE_CLIENTS AND SDK_C2J_DATE AND NOT (EXISTS ${SDK_C2J_FILE}))
-            message(FATAL_ERROR "${SDK} is required for build, but C2J file '${SDK_C2J_FILE}' is missing!")
-        endif()
-    endforeach()
-
-    set(TEMP_SDK_DEPENDENCY_BUILD_LIST ${SDK_DEPENDENCY_BUILD_LIST})
-    foreach (SDK IN LISTS TEMP_SDK_DEPENDENCY_BUILD_LIST)
-        list(FIND SDK_BUILD_LIST ${SDK} DEPENDENCY_INDEX)
-
-        if(DEPENDENCY_INDEX LESS 0)
-            find_package("aws-cpp-sdk-${SDK}" QUIET)
-            if (NOT ${SDK}_FOUND)
-                set(SDK_DIR "aws-cpp-sdk-${SDK}")
-                if (NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SDK_DIR}")
-                    message(FATAL_ERROR "${SDK} is required for build, but ${SDK_DIR} directory is missing!")
-                endif ()
-
-                get_c2j_date_for_service(${SDK} SDK_C2J_DATE)
-                set(SDK_C2J_FILE "${CMAKE_CURRENT_SOURCE_DIR}/code-generation/api-descriptions/${SDK}-${SDK_C2J_DATE}.normal.json")
-                if (REGENERATE_CLIENTS AND SDK_C2J_DATE AND NOT (EXISTS ${SDK_C2J_FILE}))
-                    message(FATAL_ERROR "${SDK} is required for build, but C2J file '${SDK_C2J_FILE}' is missing")
-                endif ()
-            else ()
-                list(REMOVE_ITEM SDK_DEPENDENCY_BUILD_LIST ${SDK})
-            endif ()
-        else ()
-            list(REMOVE_ITEM SDK_DEPENDENCY_BUILD_LIST ${SDK})
-        endif ()
-    endforeach ()
-
-    foreach (SDK IN LISTS SDK_DEPENDENCY_BUILD_LIST)
-        list(APPEND SDK_BUILD_LIST "${SDK}")
-    endforeach()
+    LIST(REMOVE_DUPLICATES SDK_DEPENDENCY_BUILD_LIST)
 else()
     set(TEMP_SDK_BUILD_LIST ${GENERATED_SERVICE_LIST})
     list(APPEND TEMP_SDK_BUILD_LIST "access-management")
@@ -270,17 +224,10 @@
     foreach(SDK IN LISTS TEMP_SDK_BUILD_LIST)
         SET(REMOVE_SDK 0)

-        get_c2j_date_for_service(${SDK} SDK_C2J_DATE)
-        SET(SDK_C2J_FILE "${CMAKE_CURRENT_SOURCE_DIR}/code-generation/api-descriptions/${SDK}-${SDK_C2J_DATE}.normal.json")
-        if(REGENERATE_CLIENTS AND SDK_C2J_DATE AND NOT (EXISTS ${SDK_C2J_FILE}))
+        SET(SDK_DIR "aws-cpp-sdk-${SDK}")
+
+        if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SDK_DIR}")
             SET(REMOVE_SDK 1)
-        endif()
-
-        SET(SDK_DIR "aws-cpp-sdk-${SDK}")
-        if(NOT REGENERATE_CLIENTS OR NOT SDK_C2J_DATE)
-            if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SDK_DIR}")
-                SET(REMOVE_SDK 1)
-            endif()
         endif()

         if(REMOVE_SDK)
@@ -293,7 +240,6 @@
 endif()

 # SDK_BUILD_LIST is now a list of present SDKs that can be processed unconditionally
-
 if(ADD_CUSTOM_CLIENTS OR REGENERATE_CLIENTS)
     execute_process(
         COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --prepareTools
@@ -303,17 +249,92 @@

 if(REGENERATE_CLIENTS)
     message(STATUS "Regenerating clients that have been selected for build.")
-
-    execute_process( COMMAND ${PYTHON_CMD} scripts/wipe_generated_code.py  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
-
-    foreach(SDK IN LISTS SDK_BUILD_LIST)
+
+    SET(MERGED_BUILD_LIST ${SDK_BUILD_LIST})
+    list(APPEND MERGED_BUILD_LIST ${SDK_DEPENDENCY_BUILD_LIST})
+    LIST(REMOVE_DUPLICATES MERGED_BUILD_LIST)
+
+    foreach(SDK IN LISTS MERGED_BUILD_LIST)
         get_c2j_date_for_service(${SDK} C2J_DATE)
-        if(C2J_DATE)
+        SET(SDK_C2J_FILE "${CMAKE_CURRENT_SOURCE_DIR}/code-generation/api-descriptions/${SDK}-${C2J_DATE}.normal.json")
+
+        if(EXISTS ${SDK_C2J_FILE})
+            message(STATUS "Clearing existing directory for ${SDK} to prepare for generation.")
+            file(REMOVE_RECURSE "${CMAKE_CURRENT_SOURCE_DIR}/aws-cpp-sdk-${SDK}")
+
             execute_process(
                 COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName ${SDK} --apiVersion ${C2J_DATE} --outputLocation ./
                 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
             )
-        endif()
+            message(STATUS "Generated service: ${SDK}, version: ${C2J_DATE}")
+        else()
+           message(STATUS "Directory for ${SDK} is either missing a service definition, is a custom client, or it is not a generated client. Skipping.")
+        endif()
+    endforeach()
+endif()
+
+#at this point, if user has specified some customized clients, generate them and add them to the build here.
+foreach(custom_client ${ADD_CUSTOM_CLIENTS})
+    message(STATUS "${custom_client}")
+    STRING(REGEX MATCHALL "serviceName=(.*), ?version=(.*)" CLIENT_MATCHES "${custom_client}")
+    SET(C_LEN 0)
+    LIST(LENGTH CLIENT_MATCHES C_LEN)
+    if(CMAKE_MATCH_COUNT GREATER 0)
+        SET(C_SERVICE_NAME ${CMAKE_MATCH_1})
+        SET(C_VERSION ${CMAKE_MATCH_2})
+
+        SET(SDK_C2J_FILE "${CMAKE_CURRENT_SOURCE_DIR}/code-generation/api-descriptions/${C_SERVICE_NAME}-${C_VERSION}.normal.json")
+        if(NOT (EXISTS ${SDK_C2J_FILE}))
+            message(FATAL_ERROR "${C_SERVICE_NAME} is required for build, but C2J file '${SDK_C2J_FILE}' is missing!")
+        endif()
+
+        message(STATUS "Clearing existing directory for ${C_SERVICE_NAME} to prepare for generation.")
+        file(REMOVE_RECURSE "${CMAKE_CURRENT_SOURCE_DIR}/aws-cpp-sdk-${C_SERVICE_NAME}")
+        message(STATUS "generating client for ${C_SERVICE_NAME} version ${C_VERSION}")
+        execute_process(
+            COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName ${C_SERVICE_NAME} --apiVersion ${C_VERSION} --outputLocation ./
+            WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+        )
+        LIST(APPEND SDK_BUILD_LIST ${C_SERVICE_NAME})
+    endif()
+endforeach(custom_client)
+
+LIST(REMOVE_DUPLICATES SDK_BUILD_LIST)
+LIST(REMOVE_DUPLICATES SDK_DEPENDENCY_BUILD_LIST)
+
+# when building a fixed target set, missing SDKs are an error
+# when building "everything", we forgive missing SDKs; should this become an option instead?
+if(BUILD_ONLY)
+    # make sure all the sdks/c2js are present; a missing sdk-directory or c2j file is a build error when building a manually-specified set
+    foreach(SDK IN LISTS SDK_BUILD_LIST)
+        SET(SDK_DIR "aws-cpp-sdk-${SDK}")
+
+        if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SDK_DIR}")
+            message(FATAL_ERROR "${SDK} is required for build, but ${SDK_DIR} directory is missing!")
+        endif()
+    endforeach()
+
+    set(TEMP_SDK_DEPENDENCY_BUILD_LIST ${SDK_DEPENDENCY_BUILD_LIST})
+    foreach (SDK IN LISTS TEMP_SDK_DEPENDENCY_BUILD_LIST)
+        list(FIND SDK_BUILD_LIST ${SDK} DEPENDENCY_INDEX)
+
+        if(DEPENDENCY_INDEX LESS 0)
+            find_package("aws-cpp-sdk-${SDK}" QUIET)
+            if (NOT ${SDK}_FOUND)
+                set(SDK_DIR "aws-cpp-sdk-${SDK}")
+                if (NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SDK_DIR}")
+                    message(FATAL_ERROR "${SDK} is required for build, but ${SDK_DIR} directory is missing!")
+                endif ()
+            else ()
+                list(REMOVE_ITEM SDK_DEPENDENCY_BUILD_LIST ${SDK})
+            endif ()
+        else ()
+            list(REMOVE_ITEM SDK_DEPENDENCY_BUILD_LIST ${SDK})
+        endif ()
+    endforeach ()
+
+    foreach (SDK IN LISTS SDK_DEPENDENCY_BUILD_LIST)
+        list(APPEND SDK_BUILD_LIST "${SDK}")
     endforeach()
 endif()

@@ -324,26 +345,7 @@
         SET(SDK_DIR "aws-cpp-sdk-${SDK}")
         add_subdirectory("${SDK_DIR}")
         LIST(APPEND EXPORTS "${SDK_DIR}")
-    endforeach()
-
-    #at this point, if user has specified some customized clients, generate them and add them to the build here.
-    foreach(custom_client ${ADD_CUSTOM_CLIENTS})
-        message(STATUS "${custom_client}")
-        STRING(REGEX MATCHALL "serviceName=(.*), ?version=(.*)" CLIENT_MATCHES "${custom_client}")
-        SET(C_LEN 0)
-        LIST(LENGTH CLIENT_MATCHES C_LEN)
-        if(CMAKE_MATCH_COUNT GREATER 0)
-            SET(C_SERVICE_NAME ${CMAKE_MATCH_1})
-            SET(C_VERSION ${CMAKE_MATCH_2})
-            message(STATUS "generating client for ${C_SERVICE_NAME} version ${C_VERSION}")
-            execute_process(
-                COMMAND ${PYTHON_CMD} scripts/generate_sdks.py --serviceName ${C_SERVICE_NAME} --apiVersion ${C_VERSION} --outputLocation ./
-                WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-            )
-            STRING(CONCAT C_DIR "aws-cpp-sdk-" ${C_SERVICE_NAME})
-            add_subdirectory(${C_DIR})
-        endif()
-    endforeach(custom_client)
+    endforeach()

     #testing
     if(ENABLE_TESTING)


Remove typo in findglew

Remove typo in findglew

--- CMake/FindGLEW.cmake
+++ CMake/FindGLEW.cmake
@@ -35,7 +35,7 @@
 # GLEW_LIBRARY
 #

-*# This whole file could be deleted. Find Packages GLEW can be used now
+# This whole file could be deleted. Find Packages GLEW can be used now
 find_path(
   GLEW_INCLUDE_DIR GL/glew.h
   DOC "The directory where GL/glew.h resides"


Do not re-add default conan repositories

Former-commit-id: cd9904cd84568e93f68378d2fcc5df440882d2c5

--- cmake-modules/SetupDependenciesConan.cmake
+++ cmake-modules/SetupDependenciesConan.cmake
@@ -104,10 +104,7 @@
         endif()

         include(${CMAKE_BINARY_DIR}/conan.cmake)
-        conan_add_remote(NAME conan-center       URL https://conan.bintray.com)
-        conan_add_remote(NAME conan-community    URL https://api.bintray.com/conan/conan-community/conan)
-        conan_add_remote(NAME bincrafters        URL https://api.bintray.com/conan/bincrafters/public-conan)
-        conan_add_remote(NAME conan-dmrg INDEX 1 URL https://api.bintray.com/conan/davidace/conan-dmrg)
+        conan_add_remote(NAME conan-dmrg URL https://api.bintray.com/conan/davidace/conan-dmrg)

         conan_cmake_run(
                 CONANFILE conanfile.txt


fix installation path for PureData on Windows

since it seems there is no rpath on windows, I put all DLL on the root of the installation path

--- Shared/CMake/JamomaUtilFunctions.cmake
+++ Shared/CMake/JamomaUtilFunctions.cmake
@@ -97,11 +97,17 @@
                                 COMPONENT JamomaMaxModularOnly)
 	endif()

-        if(BUILD_JAMOMAPD)
-                install(TARGETS ${PROJECT_NAME}
-                                DESTINATION "${JAMOMAPD_INSTALL_FOLDER}/Jamoma/support"
-                                COMPONENT JamomaPd)
-        endif()
+  if(BUILD_JAMOMAPD)
+  	if(WIN32 OR MINGW )
+      install(TARGETS ${PROJECT_NAME}
+              DESTINATION "${JAMOMAPD_INSTALL_FOLDER}/Jamoma"
+              COMPONENT JamomaPd)
+  	else()
+      install(TARGETS ${PROJECT_NAME}
+              DESTINATION "${JAMOMAPD_INSTALL_FOLDER}/Jamoma/support"
+              COMPONENT JamomaPd)
+    endif()
+  endif()
 endFunction()


xpFlatBuffersBuildTS enhancement - PROPERTY STAMP

issue https://github.com/smanders/externpro/issues/350

--- projects/use/usexp-flatbuffers-config.cmake
+++ projects/use/usexp-flatbuffers-config.cmake
@@ -62,5 +62,5 @@
     )
   set(tgtName ${P_TARGET}_fbs_ts)
   add_custom_target(${tgtName} ALL DEPENDS ${cmdFile})
-  set_property(TARGET ${tgtName} PROPERTY FOLDER ${folder})
+  set_property(TARGET ${tgtName} PROPERTY FOLDER ${folder} STAMP ${cmdFile})
 endfunction()


Remove debug messages

Remove debug messages

--- tools/cmake/create_distro.cmake
+++ tools/cmake/create_distro.cmake
@@ -48,8 +48,6 @@

 		list(GET REMAINING_MODULES 0 CURR_MODULE)

-		#message("Processing ${CURR_MODULE}")
-
 		copy_append_property(INTERFACE_COMPILE_DEFINITIONS ${CURR_MODULE} ${NAME})
 		copy_append_property(INTERFACE_COMPILE_OPTIONS ${CURR_MODULE} ${NAME})
 		copy_append_property(INTERFACE_INCLUDE_DIRECTORIES ${CURR_MODULE} ${NAME})
@@ -60,7 +58,6 @@

 		# find sub-modules of this module
 		get_property(SUBMODULES TARGET ${CURR_MODULE} PROPERTY INTERFACE_LINK_LIBRARIES)
-		#message("Deps of ${CURR_MODULE}: ${SUBMODULES}")
 		foreach(SUBMODULE ${SUBMODULES})
 			if(NOT "${SUBMODULE}" MATCHES "::@") # remove CMake internal CMAKE_DIRECTORY_ID_SEP markers
 				if(NOT ${SUBMODULE} IN_LIST COMPLETED_MODULES)
@@ -68,9 +65,7 @@
 				endif()
 			endif()
 		endforeach()
-
-		#message("REMAINING_MODULES: ${REMAINING_MODULES}")
-
+
 	endwhile()

 endfunction(mbed_create_distro)


CMake: Remove alias for TEST_NAME argument

The mbed_greentea_add_test macro previously set a variable in order to
use the un-prefixed TEST_NAME to refer to the argument in the macro
body. Whilst pair-programming with LDong, this was identified and
determined to be unecessary (maybe it was a failed attempt to fix
something, that was never reversed?) and so it has been removed.

--- tools/cmake/mbed_greentea.cmake
+++ tools/cmake/mbed_greentea.cmake
@@ -35,24 +35,22 @@
         ${ARGN}
     )

-    set(TEST_NAME ${MBED_GREENTEA_TEST_NAME})
-
     add_subdirectory(${MBED_PATH} build)

-    add_executable(${TEST_NAME})
+    add_executable(${MBED_GREENTEA_TEST_NAME})

     # Explicitly enable BUILD_TESTING until CTest is added to the Greentea client
     set(BUILD_TESTING ON)

-    mbed_configure_app_target(${TEST_NAME})
+    mbed_configure_app_target(${MBED_GREENTEA_TEST_NAME})

-    target_include_directories(${TEST_NAME}
+    target_include_directories(${MBED_GREENTEA_TEST_NAME}
         PRIVATE
             .
             ${MBED_GREENTEA_TEST_INCLUDE_DIRS}
     )

-    target_sources(${TEST_NAME}
+    target_sources(${MBED_GREENTEA_TEST_NAME}
         PRIVATE
             main.cpp
             ${MBED_GREENTEA_TEST_SOURCES}
@@ -67,16 +65,16 @@
     if (DEFINED MBED_TEST_LINK_LIBRARIES)
         separate_arguments(MBED_TEST_LINK_LIBRARIES)
         list(APPEND MBED_GREENTEA_TEST_REQUIRED_LIBS ${MBED_TEST_LINK_LIBRARIES} mbed-greentea)
-    else()
+    else()
         list(APPEND MBED_GREENTEA_TEST_REQUIRED_LIBS mbed-greentea)
     endif()

-    target_link_libraries(${TEST_NAME}
+    target_link_libraries(${MBED_GREENTEA_TEST_NAME}
         PRIVATE
             ${MBED_GREENTEA_TEST_REQUIRED_LIBS}
     )

-    mbed_set_post_build(${TEST_NAME})
+    mbed_set_post_build(${MBED_GREENTEA_TEST_NAME})

     option(VERBOSE_BUILD "Have a verbose build process")
     if(VERBOSE_BUILD)


do header path prefixing within the find_path function

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

--- CMakeModules/Sagase.cmake
+++ CMakeModules/Sagase.cmake
@@ -49,17 +49,22 @@
     # add prefix+name paths
     foreach (prefix ${path_prefixes})
         foreach (pkgname ${path_names})
-            foreach (subpkgname ${path_names})
+            #foreach (subpkgname ${path_names})

                 set (includes ${includes}
-                    ${prefix}/${pkgname}/include/${subpkgname})
+                    ${prefix}/${pkgname}/include
+                    ${prefix}/include/${pkgname})
+                    #${prefix}/${pkgname}/include/${subpkgname})

                 set (libraries ${libraries}
-                    ${prefix}/${pkgname}/lib/${subpkgname}
-                    ${prefix}/${pkgname}/bin/${subpkgname}
-                    ${prefix}/${pkgname}/dll/${subpkgname})
-
-            endforeach ()
+                    ${prefix}/${pkgname}/lib ${prefix}/lib/${pkgname}
+                    ${prefix}/${pkgname}/bin ${prefix}/bin/${pkgname}
+                    ${prefix}/${pkgname}/dll ${prefix}/dll/${pkgname})
+                    #${prefix}/${pkgname}/lib/${subpkgname}
+                    #${prefix}/${pkgname}/bin/${subpkgname}
+                    #${prefix}/${pkgname}/dll/${subpkgname})
+
+                #endforeach ()
         endforeach ()
     endforeach ()

@@ -200,12 +205,14 @@
         foreach (component_ ${PKG_COMPONENTS})

             # get header path
-            foreach (header_extension_ ${HEADER_POSTFIXES})
-                find_path (${PREFIX}_${component_}_INCLUDE_DIR ${component_}${header_extension_} ${include_paths})
-
-                if (${PREFIX}_${component_}_INCLUDE_DIR)
-                    set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${PREFIX}_${component_}_INCLUDE_DIR})
-                endif ()
+            foreach (pkgname_ ${PKG_NAMES})
+                foreach (header_extension_ ${HEADER_POSTFIXES})
+                    find_path (${PREFIX}_${component_}_INCLUDE_DIR ${pkgname_}/${component_}${header_extension_} ${include_paths})
+
+                    if (${PREFIX}_${component_}_INCLUDE_DIR)
+                        set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${PREFIX}_${component_}_INCLUDE_DIR})
+                    endif ()
+                endforeach ()
             endforeach ()

             # get library path


fixed FindLuabind.cmake to print friendly messages when the required version of the library is not found

--- lib/FindLuabind.cmake
+++ lib/FindLuabind.cmake
@@ -31,31 +31,36 @@

 # check luabind's version if we're using cmake >= 2.6
 IF(LUABIND_FOUND AND NOT CMAKE_MAJOR_VERSION LESS 2 AND NOT CMAKE_MINOR_VERSION LESS 6)
+    # check version, if required
+    IF (Luabind_FIND_VERSION_MAJOR)
         # Extract the luabind version from the 'version.hpp' file
-        SET(LUABIND_VERSION 0)
-        FILE(READ "${LUABIND_INCLUDE_DIR}/luabind/version.hpp" _LUABIND_VERSION_H_CONTENTS)
+        IF (NOT EXISTS "${LUABIND_INCLUDE_DIR}/luabind/version.hpp")
+            SET(LUABIND_FOUND FALSE)
+        ELSE (NOT EXISTS "${LUABIND_INCLUDE_DIR}/luabind/version.hpp")
+            FILE(READ "${LUABIND_INCLUDE_DIR}/luabind/version.hpp" _LUABIND_VERSION_H_CONTENTS)
+            STRING(REGEX MATCH "# *define LUABIND_VERSION[   ]+([0-9]+)" _MATCH "${_LUABIND_VERSION_H_CONTENTS}")
+            SET(LUABIND_VERSION ${CMAKE_MATCH_1})
+            MESSAGE(STATUS "LUABIND_VERSION=${LUABIND_VERSION}")

-        STRING(REGEX MATCH "# *define LUABIND_VERSION[   ]+([0-9]+)" _MATCH "${_LUABIND_VERSION_H_CONTENTS}")
-        SET(LUABIND_VERSION ${CMAKE_MATCH_1})
-        MESSAGE(STATUS "LUABIND_VERSION=${LUABIND_VERSION}")
+            #Sets the required version
+            SET(LUABIND_FIND_VERSION ${Luabind_FIND_VERSION_MAJOR})
+            IF (Luabind_FIND_VERSION_MINOR)
+                SET(LUABIND_FIND_VERSION "${LUABIND_FIND_VERSION}${Luabind_FIND_VERSION_MINOR}")
+                IF (Luabind_FIND_VERSION_PATCH)
+                    SET(LUABIND_FIND_VERSION "${LUABIND_FIND_VERSION}${Luabind_FIND_VERSION_PATCH}")
+                ELSE (Luabind_FIND_VERSION_PATCH)
+                    SET(LUABIND_FIND_VERSION "${LUABIND_FIND_VERSION}0")
+                ENDIF (Luabind_FIND_VERSION_PATCH)
+            ELSE (Luabind_FIND_VERSION_MINOR)
+                SET(LUABIND_FIND_VERSION "${LUABIND_FIND_VERSION}00")
+            ENDIF (Luabind_FIND_VERSION_MINOR)

-        # check found version against required one
-        IF (Luabind_FIND_VERSION_MAJOR)
-                SET(LUABIND_FIND_VERSION ${Luabind_FIND_VERSION_MAJOR})
-                IF (Luabind_FIND_VERSION_MINOR)
-                        SET(LUABIND_FIND_VERSION "${LUABIND_FIND_VERSION}${Luabind_FIND_VERSION_MINOR}")
-                        IF (Luabind_FIND_VERSION_PATCH)
-                                SET(LUABIND_FIND_VERSION "${LUABIND_FIND_VERSION}${Luabind_FIND_VERSION_PATCH}")
-                        ELSE (Luabind_FIND_VERSION_PATCH)
-                                SET(LUABIND_FIND_VERSION "${LUABIND_FIND_VERSION}0")
-                        ENDIF (Luabind_FIND_VERSION_PATCH)
-                ELSE (Luabind_FIND_VERSION_MINOR)
-                        SET(LUABIND_FIND_VERSION "${LUABIND_FIND_VERSION}00")
-                ENDIF (Luabind_FIND_VERSION_MINOR)
-                IF (${LUABIND_VERSION} LESS LUABIND_FIND_VERSION)
-                        SET(LUABIND_FOUND FALSE )
-                ENDIF (${LUABIND_VERSION} LESS LUABIND_FIND_VERSION)
-        ENDIF (Luabind_FIND_VERSION_MAJOR)
+           #Finally, check version agains required one
+           IF (${LUABIND_VERSION} LESS ${LUABIND_FIND_VERSION})
+               SET(LUABIND_FOUND FALSE)
+           ENDIF (${LUABIND_VERSION} LESS ${LUABIND_FIND_VERSION})
+        ENDIF (NOT EXISTS "${LUABIND_INCLUDE_DIR}/luabind/version.hpp")
+    ENDIF (Luabind_FIND_VERSION_MAJOR)
 ENDIF(LUABIND_FOUND AND NOT CMAKE_MAJOR_VERSION LESS 2 AND NOT CMAKE_MINOR_VERSION LESS 6)

 # Report the results.


boards: mm_swiftio: support west command

Modify burner for pyocd to support:
west flash
west debug
west debugserver

Signed-off-by: Frank Li <49244b28ad48c35f973a9a3c4ee9a34d02acfa11@163.com>

--- boards/arm/mm_swiftio/board.cmake
+++ boards/arm/mm_swiftio/board.cmake
@@ -7,6 +7,6 @@
 board_set_debugger_ifnset(pyocd)
 board_set_flasher_ifnset(pyocd)

-board_runner_args(pyocd "--target=mimxrt1050_hyperflash")
+board_runner_args(pyocd "--target=mimxrt1050_quadspi")

 include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)


Make macro safe for "selected modules only" build

mb:d1cd88a6-7434-4b95-ad3f-b3b52546dea2.

--- CMake/mitkFunctionAddCustomModuleTest.cmake
+++ CMake/mitkFunctionAddCustomModuleTest.cmake
@@ -7,6 +7,10 @@
 #! Additional parameters will be passed as command line parameters to the test.
 #!
 function(mitkAddCustomModuleTest test_name test_function)
-  add_test(${test_name} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TESTDRIVER} ${test_function} ${ARGN})
-  set_property(TEST ${test_name} PROPERTY LABELS ${MODULE_SUBPROJECTS} MITK)
+
+  if (BUILD_TESTING AND NOT ${MODULE_NAME}_IS_ENABLED)
+    add_test(${test_name} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TESTDRIVER} ${test_function} ${ARGN})
+    set_property(TEST ${test_name} PROPERTY LABELS ${MODULE_SUBPROJECTS} MITK)
+  endif()
+
 endfunction()


properly install Jamoma library and extesions into jamoma/support folder

--- Shared/CMake/JamomaUtilFunctions.cmake
+++ Shared/CMake/JamomaUtilFunctions.cmake
@@ -92,6 +92,12 @@
                                 DESTINATION "${JAMOMAMAX_MODULAR_INSTALL_FOLDER}/Jamoma/support"
                                 COMPONENT JamomaMaxModularOnly)
 	endif()
+
+        if(BUILD_JAMOMAPD)
+                install(TARGETS ${PROJECT_NAME}
+                                DESTINATION "${JAMOMAPD_INSTALL_FOLDER}/Jamoma/support"
+                                COMPONENT JamomaPd)
+        endif()
 endFunction()

@@ -143,6 +149,12 @@
 				DESTINATION "${JAMOMAMAX_INSTALL_FOLDER}/Jamoma/support"
 				COMPONENT JamomaMax)
 	endif()
+
+        if(BUILD_JAMOMAPD)
+                install(TARGETS ${PROJECT_NAME}
+                                DESTINATION "${JAMOMAPD_INSTALL_FOLDER}/Jamoma/support"
+                                COMPONENT JamomaPd)
+        endif()
 endfunction()


Print compiler

Print compiler

Former-commit-id: 8f307f8b7db2c572e2bb8ddd29f66634fd37c841

--- cmake-modules/CompilerFlags.cmake
+++ cmake-modules/CompilerFlags.cmake
@@ -1,3 +1,8 @@
+
+message(STATUS "C compiler ${CMAKE_C_COMPILER}")
+message(STATUS "FC compiler ${CMAKE_Fortran_COMPILER}")
+message(STATUS "CXX compiler ${CMAKE_CXX_COMPILER}")
+
 ############################################################
 ### Set  the same microarchitecture for c++ and OpenBLAS ###
 ############################################################
@@ -27,7 +32,7 @@
     list(APPEND CMAKE_CXX_FLAGS            -march=${CXX_MARCH} -mtune=${CXX_MARCH})
 endif()
 list(APPEND CMAKE_CXX_FLAGS                )
-list(APPEND CMAKE_CXX_FLAGS_RELEASE        -fstack-protector -D_FORTIFY_SOURCE=2 -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC)
+list(APPEND CMAKE_CXX_FLAGS_RELEASE        )
 list(APPEND CMAKE_CXX_FLAGS_DEBUG          -fstack-protector -D_FORTIFY_SOURCE=2 -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC)
 list(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO )
 list(APPEND CMAKE_CXX_FLAGS_MINSIZEREL)
@@ -51,7 +56,6 @@
 string (REPLACE ";" " " CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO_LIST}")
 string (REPLACE ";" " " CMAKE_CXX_FLAGS_MINSIZEREL     "${CMAKE_CXX_FLAGS_MINSIZEREL_LIST}")

-
 set(CMAKE_CXX_STANDARD 17)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 set(CMAKE_CXX_EXTENSIONS OFF)


Fix bug 738: use the "current" version of cmake project directories to ease the inclusion of Eigen within other projects.

--HG--
branch : 3.2

--- cmake/EigenConfigureTesting.cmake
+++ cmake/EigenConfigureTesting.cmake
@@ -41,7 +41,7 @@

 # copy ctest properties, which currently
 # o raise the warning levels
-configure_file(${CMAKE_BINARY_DIR}/DartConfiguration.tcl ${CMAKE_BINARY_DIR}/DartConfiguration.tcl)
+configure_file(${CMAKE_CURRENT_BINARY_DIR}/DartConfiguration.tcl ${CMAKE_BINARY_DIR}/DartConfiguration.tcl)

 # restore default CMAKE_MAKE_PROGRAM
 set(CMAKE_MAKE_PROGRAM ${CMAKE_MAKE_PROGRAM_SAVE})
@@ -50,7 +50,7 @@
 set(CMAKE_MAKE_PROGRAM_SAVE)
 set(EIGEN_MAKECOMMAND_PLACEHOLDER)

-configure_file(${CMAKE_SOURCE_DIR}/CTestCustom.cmake.in ${CMAKE_BINARY_DIR}/CTestCustom.cmake)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake.in ${CMAKE_BINARY_DIR}/CTestCustom.cmake)

 # some documentation of this function would be nice
 ei_init_testing()


[compiler-rt] build compiler-rt runtimes without LTO

Summary: Currently, we build the compiler-rt runtimes with link-time optimization if LTO is configured for the LLVM project. This will break external programs that don't invoke the linker in such a way that it supports LLVM's LTO. To avoid this, this change causes the compiler-rt runtimes to be compiled with -fno-lto. This also makes the check-profile tests work on systems when doing a lld LTO build on a system where the system linker does not support LLVM LTO.

Reviewers: rnk, davidxl

Reviewed By: davidxl

Subscribers: dberris, mgorny, llvm-commits, mehdi_amini

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

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@298525 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/AddCompilerRT.cmake
+++ cmake/Modules/AddCompilerRT.cmake
@@ -110,6 +110,13 @@
     "OS;ARCHS;SOURCES;CFLAGS;LINK_FLAGS;DEFS;LINK_LIBS;OBJECT_LIBS"
     ${ARGN})
   set(libnames)
+  # Until we support this some other way, build compiler-rt runtime without LTO
+  # to allow non-LTO projects to link with it.
+  if(COMPILER_RT_HAS_FNO_LTO_FLAG)
+    set(NO_LTO_FLAGS "-fno-lto")
+  else()
+    set(NO_LTO_FLAGS "")
+  endif()
   if(APPLE)
     foreach(os ${LIB_OS})
       if(type STREQUAL "STATIC")
@@ -121,7 +128,7 @@
       list_intersect(LIB_ARCHS_${libname} DARWIN_${os}_ARCHS LIB_ARCHS)
       if(LIB_ARCHS_${libname})
         list(APPEND libnames ${libname})
-        set(extra_cflags_${libname} ${DARWIN_${os}_CFLAGS} ${LIB_CFLAGS})
+        set(extra_cflags_${libname} ${DARWIN_${os}_CFLAGS} ${NO_LTO_FLAGS} ${LIB_CFLAGS})
         set(output_name_${libname} ${libname}${COMPILER_RT_OS_SUFFIX})
         set(sources_${libname} ${LIB_SOURCES})
         format_object_libs(sources_${libname} ${os} ${LIB_OBJECT_LIBS})
@@ -149,7 +156,7 @@
       set(sources_${libname} ${LIB_SOURCES})
       format_object_libs(sources_${libname} ${arch} ${LIB_OBJECT_LIBS})
       set(libnames ${libnames} ${libname})
-      set(extra_cflags_${libname} ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS})
+      set(extra_cflags_${libname} ${TARGET_${arch}_CFLAGS} ${NO_LTO_FLAGS} ${LIB_CFLAGS})
     endforeach()
   endif()


Remove the roottest dictionary generation from the all target.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -190,12 +190,7 @@

     set(targetname "${targetname}-dictgen")

-    # Target onepcm is only available, if roottest is built within root.
-    if(TARGET onepcm)
-      add_custom_target(${targetname} ALL DEPENDS ${gensrcdict} onepcm)
-    else()
-      add_custom_target(${targetname} ALL DEPENDS ${gensrcdict})
-    endif()
+    add_custom_target(${targetname} DEPENDS ${gensrcdict} ${ROOT_LIBRARIES})
   else()
     set(targetname "${dictionary}-dictgen")
     # Creating this target at ALL level enables the possibility to generate dictionaries (genreflex step)
@@ -321,7 +316,7 @@

   #---roottest compability
   if(CMAKE_ROOTTEST_DICT)
-    add_custom_target(${dictname} ALL DEPENDS ${dictionary}.cxx)
+    add_custom_target(${dictname} DEPENDS ${dictionary}.cxx)
   else()
     add_custom_target(${dictname} DEPENDS ${dictionary}.cxx)


Update hunter.cmake

Update hunter.cmake

--- cmake/projects/vmime/hunter.cmake
+++ cmake/projects/vmime/hunter.cmake
@@ -5,16 +5,16 @@
 include(hunter_pick_scheme)

 hunter_add_version(
-  PACKAGE_NAME vmime
-  VERSION "0.9.2"
-  URL "https://github.com/designerror/vmime/archive/v0.9.2.tar.gz"
-  SHA1 efe1dcad4815cd88b710fb14bf61fd7973b8ee91
+	PACKAGE_NAME vmime
+	VERSION "0.9.2"
+	URL "https://github.com/designerror/vmime/archive/v0.9.2.tar.gz"
+	SHA1 efe1dcad4815cd88b710fb14bf61fd7973b8ee91
 )

 if(WIN32)
-  hunter_cmake_args(vmime CMAKE_ARGS
+	hunter_cmake_args(vmime CMAKE_ARGS
 		VMIME_BUILD_TESTS=OFF
-		VMIME_TLS_SUPPORT_LIB="openssl"
+		VMIME_TLS_SUPPORT_LIB=openssl
 		VMIME_BUILD_SAMPLES=OFF
 		VMIME_HAVE_MESSAGING_PROTO_MAILDIR=OFF
 		VMIME_HAVE_MESSAGING_PROTO_SENDMAIL=OFF
@@ -24,23 +24,23 @@
 		VMIME_BUILD_SHARED_LIBRARY=OFF
 		VMIME_BUILD_DOCUMENTATION=OFF
 		VMIME_HAVE_STRERROR_R=OFF
-		VMIME_CHARSETCONV_LIB="win"
-)
+		VMIME_CHARSETCONV_LIB=win
+	)
 else()
-  hunter_cmake_args(vmime CMAKE_ARGS
-    VMIME_BUILD_TESTS=OFF
-	  VMIME_TLS_SUPPORT_LIB="openssl"
-	  VMIME_BUILD_SAMPLES=OFF
-    VMIME_HAVE_MESSAGING_PROTO_MAILDIR=OFF
-    VMIME_HAVE_MESSAGING_PROTO_SENDMAIL=OFF
-    VMIME_HAVE_SASL_SUPPORT=OFF
-    VMIME_HAVE_MESSAGING_PROTO_SMTP=OFF
-    VMIME_HAVE_MESSAGING_PROTO_POP3=OFF
-    VMIME_BUILD_SHARED_LIBRARY=OFF
-    VMIME_BUILD_DOCUMENTATION=OFF
-    VMIME_HAVE_STRERROR_R=OFF
-    VMIME_CHARSETCONV_LIB="iconv"
-)
+	hunter_cmake_args(vmime CMAKE_ARGS
+		VMIME_BUILD_TESTS=OFF
+		VMIME_TLS_SUPPORT_LIB=openssl
+		VMIME_BUILD_SAMPLES=OFF
+		VMIME_HAVE_MESSAGING_PROTO_MAILDIR=OFF
+		VMIME_HAVE_MESSAGING_PROTO_SENDMAIL=OFF
+		VMIME_HAVE_SASL_SUPPORT=OFF
+		VMIME_HAVE_MESSAGING_PROTO_SMTP=OFF
+		VMIME_HAVE_MESSAGING_PROTO_POP3=OFF
+		VMIME_BUILD_SHARED_LIBRARY=OFF
+		VMIME_BUILD_DOCUMENTATION=OFF
+		VMIME_HAVE_STRERROR_R=OFF
+		VMIME_CHARSETCONV_LIB=iconv
+	)
 endif()

 hunter_pick_scheme(DEFAULT url_sha1_cmake)


CI: also enable Vulkan on Android

CI: also enable Vulkan on Android

--- ci-build.cmake
+++ ci-build.cmake
@@ -69,13 +69,14 @@
 if(DEFINED ENV{ANDROID})
     set(CMAKE_BUILD_TYPE RelWithDebInfo)
     set(CROSS
-        -DANDROID_PLATFORM=android-16
+        -DANDROID_PLATFORM=android-24
         -DANDROID_NDK=${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r21e
         -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r21e/build/cmake/android.toolchain.cmake
         -DANDROID_ARM_NEON=TRUE
         -DANDROID_ABI=arm64-v8a)

     set(RENDERSYSTEMS
+        -DOGRE_BUILD_RENDERSYSTEM_VULKAN=TRUE
         -DOGRE_BUILD_RENDERSYSTEM_GLES2=TRUE)

     set(OTHER


Refactor c11/atomic patch for riscv64

Refactor c11/atomic patch for riscv64

The commit 87fe7c1 introduced a patch to handle architectures where
c11/atomics are implemented in gcc/libatomic. It turns out that this
patch did not work for riscv64, since a symbol `__atomic_fetch_and_1`
is present in `jxl/dec_group_border.cc.o`. This eventually lead to a
compilation error:

  libjxl_dec.so.0.7.0: undefined reference to __atomic_fetch_or_1'

when compiling executable: `djxl_conformance`.

This issue was not noticed since on riscv64, the flag `-pthread`
actually imply libatomic, which is implemented by cmake line
`Threads::Threads`.

--- lib/jxl.cmake
+++ lib/jxl.cmake
@@ -347,6 +347,7 @@
   brotlicommon-static
   hwy
   Threads::Threads
+  ${ATOMICS_LIBRARIES}
 )

 if(JPEGXL_ENABLE_PROFILER)
@@ -356,7 +357,6 @@
 set(JPEGXL_INTERNAL_LIBS
   ${JPEGXL_DEC_INTERNAL_LIBS}
   brotlienc-static
-  ${ATOMICS_LIBRARIES}
 )

 # strips the -static suffix from all the elements in LIST


Split off 8.4.36

Split off 8.4.36

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

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


Update SimpleITKExamples version

Update SimpleITKExamples version

Change-Id: I464ea2ddef8f8a43171dd6c22419d89d10a10e5c

--- SuperBuild/External_SimpleITKExamples.cmake
+++ SuperBuild/External_SimpleITKExamples.cmake
@@ -20,7 +20,7 @@
       --no-warn-unused-cli
       -C "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt"
       ${ep_common_args}
-      -DSimpleITK_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/SimpleITK-0.9/
+      -DSimpleITK_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/SimpleITK-0.10/
       -DCMAKE_SKIP_RPATH:BOOL=ON
       -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
     BUILD_COMMAND ${BUILD_COMMAND_STRING}


Renamed find_dont_install_intelmkl to something sane: SetupMKL.cmake

Former-commit-id: 61f1799b2c7428528f0eec8f6720c19a3755e33c

--- cmake-modules/SetupDependenciesConan.cmake
+++ cmake-modules/SetupDependenciesConan.cmake
@@ -22,7 +22,7 @@

     if(DMRG_ENABLE_MKL)
         find_package(Fortran REQUIRED)
-        include(cmake-modules/Find_dont_install_INTELMKL.cmake)         # MKL - Intel's math Kernel Library, use the BLAS implementation in Eigen and Arpack. Includes lapack.
+        include(cmake-modules/SetupMKL.cmake)         # MKL - Intel's math Kernel Library, use the BLAS implementation in Eigen and Arpack. Includes lapack.
         if(TARGET mkl::mkl)
             expand_target_libs(mkl::mkl MKL_LIBRARIES)
             # Passing MKL_LIBRARIES as-is will result in cmake-conan injecting -o= between each element
@@ -43,8 +43,6 @@
     endif()

     list(APPEND NATIVE_TARGETS openmp::openmp)
-
-

     find_program (
             CONAN_COMMAND


[cmake] Remove direct computation of dependencies on LLVM libraries and exact paths to those libraries.

Now that we have the full dependency information from LLVM/Clang, this is no
longer necessary. We will just do the *right* thing.

Additionally, since we were passing these libraries as absolute paths, cmake was
always passing through all of the given libraries even if CMake had already
added them to the link line in its non-absolute form. It is not clear to me how
if all linkers would be smart about this.

Regardless, now we just translate components to libraries and continue on our
merry way. In the future, we can even remove the llvm-build code period by just
specifying LLVM dependencies directly via LINK_LIBRARIES instead of having to do
anything with COMPONENT_DEPENDS.

But that is for a future commit.

--- cmake/modules/SwiftSharedCMakeConfig.cmake
+++ cmake/modules/SwiftSharedCMakeConfig.cmake
@@ -376,32 +376,6 @@
   if((SWIFT_BUILT_STANDALONE OR SOURCEKIT_BUILT_STANDALONE) AND NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
     llvm_map_components_to_libnames(libnames ${link_components})

-    # Collect dependencies.
-    set(new_libnames)
-    foreach(lib ${libnames})
-      list(APPEND new_libnames "${lib}")
-      get_target_property(extra_libraries "${lib}" INTERFACE_LINK_LIBRARIES)
-      foreach(dep ${extra_libraries})
-        if(NOT "${new_libnames}" STREQUAL "")
-          list(REMOVE_ITEM new_libnames "${dep}")
-        endif()
-        list(APPEND new_libnames "${dep}")
-      endforeach()
-    endforeach()
-    set(libnames "${new_libnames}")
-
-    # Translate library names into full path names.
-    set(new_libnames)
-    foreach(dep ${libnames})
-      if("${dep}" MATCHES "^LLVM")
-        list(APPEND new_libnames
-            "${LLVM_LIBRARY_OUTPUT_INTDIR}/lib${dep}.a")
-      else()
-        list(APPEND new_libnames "${dep}")
-      endif()
-    endforeach()
-    set(libnames "${new_libnames}")
-
     get_target_property(target_type "${target}" TYPE)
     if("${target_type}" STREQUAL "STATIC_LIBRARY")
       target_link_libraries("${target}" INTERFACE ${libnames})


define SQLITE_HAVE_ISNAN so the xcode 10 will compile

--- CMake/unix_config.cmake
+++ CMake/unix_config.cmake
@@ -43,6 +43,8 @@
     else()
         set(BACKEND RS2_USE_V4L2_BACKEND)
     endif()
+
+    add_definitions(-DSQLITE_HAVE_ISNAN)
 endmacro()

 macro(os_target_config)


Added URLs to netcdf menu item on start bar on Windows.

--- CMakeInstallation.cmake
+++ CMakeInstallation.cmake
@@ -18,6 +18,11 @@
   SET(CPACK_NSIS_URL_INFO_ABOUT "http://www.unidata.ucar.edu/netcdf")
   SET(CPACK_NSIS_CONTACT "support-netcdf@unidata.ucar.edu")
   SET(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
+  SET(CPACK_NSIS_MENU_LINKS
+	"http://www.unidata.ucar.edu/netcdf" "Unidata Website"
+	"http://www.unidata.ucar.edu/netcdf/docs" "NetCDF Stable Documentation"
+	"http://www.unidata.ucar.edu/netcdf/docs_rc" "NetCDF Unstable Documentation")
+
 ENDIF()

 INCLUDE(CPack)


[cmake] WASM_TOOLCHAIN found by cmake tools

--- CMakeModules/wasm.cmake
+++ CMakeModules/wasm.cmake
@@ -1,9 +1,8 @@
 find_package(Wasm REQUIRED)
 find_package(Binaryen REQUIRED)

-if(WASM_FOUND AND BINARYEN_FOUND)
-  set(WASM_TOOLCHAIN_FOUND TRUE)
-endif()
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(WASM_TOOLCHAIN DEFAULT_MSG WASM_FOUND BINARYEN_FOUND)

 macro(compile_wast)
   #read arguments include ones that we don't since arguments get forwared "as is" and we don't want to threat unknown argument names as values


BUG: When a try-run fails to compile create the run result cache entry with a bogus non-zero return value to avoid running the test again.

--- Utilities/kwsys/kwsysPlatformCxxTests.cmake
+++ Utilities/kwsys/kwsysPlatformCxxTests.cmake
@@ -68,6 +68,7 @@
       FILE(APPEND
         ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
         "${description} failed to compile with the following output:\n${OUTPUT}\n\n")
+      SET(${var} -1 CACHE INTERNAL "${description} failed to compile.")
     ENDIF(${var}_COMPILED)

     IF(${invert} MATCHES INVERT)


Update & propagate the target triples and added missing information. Also, added ASM compiler flags

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -275,7 +275,7 @@
   set(SDK_NAME iphoneos)
   if(NOT ARCHS)
     set(ARCHS armv7 armv7s arm64)
-    set(APPLE_TARGET_TRIPLE_INT arm-apple-ios)
+    set(APPLE_TARGET_TRIPLE_INT arm-apple-ios$${DEPLOYMENT_TARGET})
   endif()
 elseif(PLATFORM_INT STREQUAL "OS64")
   set(SDK_NAME iphoneos)
@@ -285,9 +285,9 @@
     else()
       set(ARCHS arm64)
     endif()
-    set(APPLE_TARGET_TRIPLE_INT aarch64-apple-ios)
-  else()
-    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios)
+    set(APPLE_TARGET_TRIPLE_INT arm64-apple-ios${DEPLOYMENT_TARGET})
+  else()
+    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET})
   endif()
 elseif(PLATFORM_INT STREQUAL "OS64COMBINED")
   set(SDK_NAME iphoneos)
@@ -306,9 +306,9 @@
         set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] "arm64")
         set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] "x86_64")
       endif()
-      set(APPLE_TARGET_TRIPLE_INT aarch64-x86_64-apple-ios)
+      set(APPLE_TARGET_TRIPLE_INT arm64-x86_64-apple-ios${DEPLOYMENT_TARGET})
     else()
-      set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios)
+      set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET})
     endif()
   else()
     message(FATAL_ERROR "Please make sure that you are running CMake 3.14+ to make the OS64COMBINED setting work")
@@ -317,47 +317,47 @@
   set(SDK_NAME iphonesimulator)
   if(NOT ARCHS)
     set(ARCHS i386)
-    set(APPLE_TARGET_TRIPLE_INT i386-apple-ios)
-  else()
-    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios)
+    set(APPLE_TARGET_TRIPLE_INT i386-apple-ios${DEPLOYMENT_TARGET})
+  else()
+    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET})
   endif()
   message(DEPRECATION "SIMULATOR IS DEPRECATED. Consider using SIMULATOR64 instead.")
 elseif(PLATFORM_INT STREQUAL "SIMULATOR64")
   set(SDK_NAME iphonesimulator)
   if(NOT ARCHS)
     set(ARCHS x86_64)
-    set(APPLE_TARGET_TRIPLE_INT x86_64-apple-ios)
-  else()
-    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios)
+    set(APPLE_TARGET_TRIPLE_INT x86_64-apple-ios${DEPLOYMENT_TARGET})
+  else()
+    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET})
   endif()
 elseif(PLATFORM_INT STREQUAL "SIMULATORARM64")
   set(SDK_NAME iphonesimulator)
   if(NOT ARCHS)
     set(ARCHS arm64)
-    set(APPLE_TARGET_TRIPLE_INT aarch64-apple-ios)
-  else()
-    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios)
+    set(APPLE_TARGET_TRIPLE_INT arm64-apple-ios${DEPLOYMENT_TARGET})
+  else()
+    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET})
   endif()
 elseif(PLATFORM_INT STREQUAL "TVOS")
   set(SDK_NAME appletvos)
   if(NOT ARCHS)
     set(ARCHS arm64)
-    set(APPLE_TARGET_TRIPLE_INT aarch64-apple-tvos)
-  else()
-    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-tvos)
+    set(APPLE_TARGET_TRIPLE_INT arm64-apple-tvos${DEPLOYMENT_TARGET})
+  else()
+    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-tvos${DEPLOYMENT_TARGET})
   endif()
 elseif (PLATFORM_INT STREQUAL "TVOSCOMBINED")
   set(SDK_NAME appletvos)
   if(MODERN_CMAKE)
     if(NOT ARCHS)
       set(ARCHS arm64 x86_64)
-      set(APPLE_TARGET_TRIPLE_INT aarch64-x86_64-apple-tvos)
+      set(APPLE_TARGET_TRIPLE_INT arm64-x86_64-apple-tvos${DEPLOYMENT_TARGET})
       set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=appletvos*] "arm64")
       set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=appletvsimulator*] "x86_64")
       set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=appletvos*] "arm64")
       set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=appletvsimulator*] "x86_64")
     else()
-      set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-tvos)
+      set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-tvos${DEPLOYMENT_TARGET})
     endif()
   else()
     message(FATAL_ERROR "Please make sure that you are running CMake 3.14+ to make the TVOSCOMBINED setting work")
@@ -366,22 +366,22 @@
   set(SDK_NAME appletvsimulator)
   if(NOT ARCHS)
     set(ARCHS x86_64)
-    set(APPLE_TARGET_TRIPLE_INT x86_64-apple-tvos)
-  else()
-    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-tvos)
+    set(APPLE_TARGET_TRIPLE_INT x86_64-apple-tvos${DEPLOYMENT_TARGET})
+  else()
+    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-tvos${DEPLOYMENT_TARGET})
   endif()
 elseif(PLATFORM_INT STREQUAL "WATCHOS")
   set(SDK_NAME watchos)
   if(NOT ARCHS)
     if (XCODE_VERSION_INT VERSION_GREATER 10.0)
       set(ARCHS armv7k arm64_32)
-      set(APPLE_TARGET_TRIPLE_INT aarch64_32-apple-watchos)
+      set(APPLE_TARGET_TRIPLE_INT arm64_32-apple-watchos${DEPLOYMENT_TARGET})
     else()
       set(ARCHS armv7k)
-      set(APPLE_TARGET_TRIPLE_INT arm-apple-watchos)
+      set(APPLE_TARGET_TRIPLE_INT arm-apple-watchos${DEPLOYMENT_TARGET})
     endif()
   else()
-    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-watchos)
+    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-watchos${DEPLOYMENT_TARGET})
   endif()
 elseif(PLATFORM_INT STREQUAL "WATCHOSCOMBINED")
   set(SDK_NAME watchos)
@@ -389,21 +389,21 @@
     if(NOT ARCHS)
       if (XCODE_VERSION_INT VERSION_GREATER 10.0)
         set(ARCHS armv7k arm64_32 i386)
-        set(APPLE_TARGET_TRIPLE_INT aarch64_32-i386-apple-watchos)
+        set(APPLE_TARGET_TRIPLE_INT arm64_32-i386-apple-watchos${DEPLOYMENT_TARGET})
         set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=watchos*] "armv7k arm64_32")
         set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=watchsimulator*] "i386")
         set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=watchos*] "armv7k arm64_32")
         set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=watchsimulator*] "i386")
       else()
         set(ARCHS armv7k i386)
-        set(APPLE_TARGET_TRIPLE_INT arm-i386-apple-watchos)
+        set(APPLE_TARGET_TRIPLE_INT arm-i386-apple-watchos${DEPLOYMENT_TARGET})
         set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=watchos*] "armv7k")
         set(CMAKE_XCODE_ATTRIBUTE_ARCHS[sdk=watchsimulator*] "i386")
         set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=watchos*] "armv7k")
         set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS[sdk=watchsimulator*] "i386")
       endif()
     else()
-      set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-watchos)
+      set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-watchos${DEPLOYMENT_TARGET})
     endif()
   else()
     message(FATAL_ERROR "Please make sure that you are running CMake 3.14+ to make the WATCHOSCOMBINED setting work")
@@ -412,9 +412,9 @@
   set(SDK_NAME watchsimulator)
   if(NOT ARCHS)
     set(ARCHS i386)
-    set(APPLE_TARGET_TRIPLE_INT i386-apple-watchos)
-  else()
-    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-watchos)
+    set(APPLE_TARGET_TRIPLE_INT i386-apple-watchos${DEPLOYMENT_TARGET})
+  else()
+    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-watchos${DEPLOYMENT_TARGET})
   endif()
 elseif(PLATFORM_INT STREQUAL "MAC" OR PLATFORM_INT STREQUAL "MAC_CATALYST")
   set(SDK_NAME macosx)
@@ -423,7 +423,7 @@
   endif()
   string(REPLACE ";" "-" ARCHS_SPLIT "${ARCHS}")
   if(PLATFORM_INT STREQUAL "MAC")
-    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-macosx)
+    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-macosx${DEPLOYMENT_TARGET})
   elseif(PLATFORM_INT STREQUAL "MAC_CATALYST")
     set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}-macabi)
   endif()
@@ -434,7 +434,7 @@
   endif()
   string(REPLACE ";" "-" ARCHS_SPLIT "${ARCHS}")
   if(PLATFORM_INT STREQUAL "MAC_ARM64")
-    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-macosx)
+    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-macosx${DEPLOYMENT_TARGET})
   elseif(PLATFORM_INT STREQUAL "MAC_CATALYST_ARM64")
     set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}-macabi)
   endif()
@@ -554,11 +554,13 @@
   set(ENV{_CMAKE_C_COMPILER} "${CMAKE_C_COMPILER}")
 elseif(DEFINED ENV{_CMAKE_C_COMPILER})
   set(CMAKE_C_COMPILER "$ENV{_CMAKE_C_COMPILER}")
+  set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER})
 elseif(NOT DEFINED CMAKE_C_COMPILER)
   execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT_INT} -find clang
           OUTPUT_VARIABLE CMAKE_C_COMPILER
           ERROR_QUIET
           OUTPUT_STRIP_TRAILING_WHITESPACE)
+  set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER})
 endif()
 if(DEFINED CMAKE_CXX_COMPILER)
   # Environment variables are always preserved.
@@ -723,6 +725,9 @@

 if(DEFINED APPLE_TARGET_TRIPLE_INT)
   set(APPLE_TARGET_TRIPLE ${APPLE_TARGET_TRIPLE_INT} CACHE INTERNAL "")
+  set(CMAKE_C_COMPILER_TARGET ${APPLE_TARGET_TRIPLE})
+  set(CMAKE_CXX_COMPILER_TARGET ${APPLE_TARGET_TRIPLE})
+  set(CMAKE_ASM_COMPILER_TARGET ${APPLE_TARGET_TRIPLE})
 endif()

 if(PLATFORM_INT MATCHES "^MAC_CATALYST")
@@ -834,8 +839,11 @@
         CMAKE_OSX_SYSROOT_INT
         ENABLE_BITCODE
         ENABLE_ARC
+        CMAKE_ASM_COMPILER
         CMAKE_C_COMPILER
+        CMAKE_C_COMPILER_TARGET
         CMAKE_CXX_COMPILER
+        CMAKE_CXX_COMPILER_TARGET
         BUILD_LIBTOOL
         CMAKE_INSTALL_NAME_TOOL
         CMAKE_C_FLAGS


Fixed mistakes in last change.

Fixed mistakes in last change.

--- Tests/VisualTests/PostTest.cmake
+++ Tests/VisualTests/PostTest.cmake
@@ -8,9 +8,10 @@

 if (UNIX)
   # escape spaces
-  string(REPLACE " " "\ " USER_HOME_DIRECTORY "$ENV{HOMEDRIVE}$ENV{HOMEPATH}")
+  string(REPLACE " " "\ " USER_HOME_DIRECTORY "$ENV{HOME}")
 elseif (WIN32)
-  string(REPLACE "\\" "/" USER_HOME_DIRECTORY "$ENV{HOMEDRIVE}$ENV{HOMEPATH}")
+  # make sure we've got backslashes
+  string(REPLACE "/" "\\" USER_HOME_DIRECTORY "$ENV{HOMEDRIVE}$ENV{HOMEPATH}")
 # other platforms?
 endif ()

@@ -18,6 +19,6 @@
 if (UNIX)
   exec_program("rm ${USER_HOME_DIRECTORY}/TestResults_*RenderingSubsystem.txt")
 elseif (WIN32)
-  exec_program("cmd /c del \"${USER_HOME_DIRECTORY}\TestResults_*RenderingSubsystem.txt\"")
+  exec_program("cmd /c del \"${USER_HOME_DIRECTORY}\\TestResults_*RenderingSubsystem.txt\"")
 # other platforms?
 endif ()


Add minimum width to CPU percentage

Add minimum width to CPU percentage

It's quite obscure where to find that you can set a minimum width for tokens, and CPU usage will oscillate between 0-9 and 10+ quite frequently. I think that adding this to the example config will help users to find out that this feature exists, and avoid this annoying default.

--- doc/config.cmake
+++ doc/config.cmake
@@ -193,7 +193,7 @@
 format-prefix = " "
 format-prefix-foreground = ${colors.foreground-alt}
 format-underline = #f90000
-label = %percentage%%
+label = %percentage:2%%

 [module/memory]
 type = internal/memory


Add binary directory to add_subdirectory

--- CPM.cmake
+++ CPM.cmake
@@ -534,7 +534,7 @@
   set(__CPM_BASE_MODULE_DIR)

   # Setup the project.
-  add_subdirectory(${__CPM_MODULE_SOURCE_DIR})
+  add_subdirectory("${__CPM_MODULE_SOURCE_DIR}" "${__CPM_MODULE_BIN_DIR}")

   # Append a definition to the cpm header file that must be included to
   # correct for the namespace modifications.


BuildEnvironment.cmake: use CMAKE_CURRENT_LIST_DIR


Improved formatting of FindMagnum.cmake documentation.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -1,56 +1,51 @@
 # - Find Magnum
 #
 # Basic usage:
-#
 #  find_package(Magnum [REQUIRED])
-#
 # This command tries to find Magnum library and then defines:
-#
 #  MAGNUM_FOUND                 - Whether the library was found
-#  MAGNUM_TARGET_GLES           - Defined if Magnum was built for OpenGL ES,
-#   slightly reducing feature count. The same variable is also #defined in
-#   Magnum headers.
+#  MAGNUM_TARGET_GLES           - Defined if Magnum was built for OpenGL
+#   ES, slightly reducing feature count. The same variable is also
+#   #defined in Magnum headers.
 #  MAGNUM_LIBRARIES             - Magnum library and dependent libraries
 #  MAGNUM_INCLUDE_DIRS          - Root include dir and include dirs of
 #   dependencies
 #  MAGNUM_PLUGINS_IMPORTER_DIR  - Directory with importer plugins
-#
 # This command will try to find only the base library, not the optional
-# components. The base library depends on Corrade, OpenGL and GLEW libraries.
-# Additional dependencies are specified by the components. The optional
-# components are:
-#
+# components. The base library depends on Corrade, OpenGL and GLEW
+# libraries. Additional dependencies are specified by the components. The
+# optional components are:
 #  MeshTools     - MeshTools library
 #  Physics       - Physics library
 #  Primitives    - Library with stock geometric primitives (static)
 #  Shaders       - Library with stock shaders
-#
 #  EglContext    - EGL context (depends on EGL and X11 libraries)
 #  GlutContext   - GLUT context (depends on GLUT library)
 #  Sdl2Context   - SDL2 context (depends on SDL2 library)
-#
 # Example usage with specifying additional components is:
-#
-#  find_package(Magnum [REQUIRED|COMPONENTS] MeshTools Primitives GlutContext)
-#
+#  find_package(Magnum [REQUIRED|COMPONENTS]
+#               MeshTools Primitives GlutContext)
 # For each component is then defined:
-#
 #  MAGNUM_*_FOUND   - Whether the component was found
 #  MAGNUM_*_LIBRARIES - Component library and dependent libraries
 #  MAGNUM_*_INCLUDE_DIRS - Include dirs of module dependencies
 #
 # Additionally these variables are defined for internal usage:
-#
-#  MAGNUM_INCLUDE_DIR                   - Root include dir (w/o dependencies)
-#  MAGNUM_LIBRARY                       - Magnum library (w/o dependencies)
-#  MAGNUM_*_LIBRARY                     - Component libraries (w/o dependencies)
-#
+#  MAGNUM_INCLUDE_DIR                   - Root include dir (w/o
+#   dependencies)
+#  MAGNUM_LIBRARY                       - Magnum library (w/o
+#   dependencies)
+#  MAGNUM_*_LIBRARY                     - Component libraries (w/o
+#   dependencies)
 #  MAGNUM_LIBRARY_INSTALL_DIR           - Library installation directory
 #  MAGNUM_PLUGINS_INSTALL_DIR           - Plugin installation directory
-#  MAGNUM_PLUGINS_IMPORTER_INSTALL_DIR  - Importer plugin installation directory
-#  MAGNUM_CMAKE_MODULE_INSTALL_DIR      - Installation dir for CMake modules
+#  MAGNUM_PLUGINS_IMPORTER_INSTALL_DIR  - Importer plugin installation
+#   directory
+#  MAGNUM_CMAKE_MODULE_INSTALL_DIR      - Installation dir for CMake
+#   modules
 #  MAGNUM_INCLUDE_INSTALL_DIR           - Header installation directory
-#  MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR   - Plugin header installation directory
+#  MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR   - Plugin header installation
+#   directory
 #

 # Dependencies


rm build_info.cmake (broken and needs to be split); fixes #6

--- modules/build_info.cmake
+++ modules/build_info.cmake
@@ -1,150 +0,0 @@
-#.rst:
-#
-# Generates source code that echoes configuration, version, and build
-# information to the program output.
-
-find_package(PythonInterp REQUIRED)
-
-# generated cmake files will be written to this path
-# only build info is generated
-# everything else is static for the user
-file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/generated_by_cmake)
-set(CMAKE_MODULE_PATH
-    ${CMAKE_MODULE_PATH}
-    ${PROJECT_BINARY_DIR}/generated_by_cmake
-    )
-
-#-------------------------------------------------------------------------------
-
-function(get_git_info
-         in_python_executable
-         out_git_last_commit_hash
-         out_git_last_commit_author
-         out_git_last_commit_date
-         out_git_branch
-         out_git_status_at_build)
-
-    find_package(Git)
-    if(GIT_FOUND)
-        execute_process(
-            COMMAND ${GIT_EXECUTABLE} rev-list --max-count=1 --abbrev-commit HEAD
-            OUTPUT_VARIABLE _git_last_commit_hash
-            ERROR_QUIET
-            )
-
-        if(_git_last_commit_hash)
-            string(STRIP ${_git_last_commit_hash} _git_last_commit_hash)
-        endif()
-
-        execute_process(
-            COMMAND ${GIT_EXECUTABLE} log --max-count=1 HEAD
-            OUTPUT_VARIABLE _git_last_commit
-            ERROR_QUIET
-            )
-
-        if(_git_last_commit)
-            string(REGEX MATCH "Author:[ ]*(.+)<" temp "${_git_last_commit}")
-            set(_git_last_commit_author ${CMAKE_MATCH_1})
-            string(REGEX MATCH "Date:[ ]*(.+(\\+|-)[0-9][0-9][0-9][0-9])" temp "${_git_last_commit}")
-            set(_git_last_commit_date ${CMAKE_MATCH_1})
-        endif()
-
-        execute_process(
-            COMMAND ${in_python_executable} -c "import subprocess; import re; print(re.search(r'\\*.*', subprocess.Popen(['${GIT_EXECUTABLE}', 'branch'], stdout=subprocess.PIPE).communicate()[0], re.MULTILINE).group())"
-            OUTPUT_VARIABLE _git_branch
-            ERROR_QUIET
-            )
-
-        if(_git_branch)
-            string(REPLACE "*" "" _git_branch ${_git_branch})
-            string(STRIP ${_git_branch} _git_branch)
-        endif()
-
-        execute_process(
-            COMMAND ${GIT_EXECUTABLE} status -uno
-            OUTPUT_VARIABLE _git_status_at_build
-            ERROR_QUIET
-        )
-
-        set(${out_git_last_commit_hash}   ${_git_last_commit_hash}   PARENT_SCOPE)
-        set(${out_git_last_commit_author} ${_git_last_commit_author} PARENT_SCOPE)
-        set(${out_git_last_commit_date}   ${_git_last_commit_date}   PARENT_SCOPE)
-        set(${out_git_branch}             ${_git_branch}             PARENT_SCOPE)
-        set(${out_git_status_at_build}    ${_git_status_at_build}    PARENT_SCOPE)
-    else()
-        set(${out_git_last_commit_hash}   "" PARENT_SCOPE)
-        set(${out_git_last_commit_author} "" PARENT_SCOPE)
-        set(${out_git_last_commit_date}   "" PARENT_SCOPE)
-        set(${out_git_branch}             "" PARENT_SCOPE)
-        set(${out_git_status_at_build}    "" PARENT_SCOPE)
-    endif()
-endfunction()
-
-get_git_info(${PYTHON_EXECUTABLE}
-             GIT_COMMIT_HASH
-             GIT_COMMIT_AUTHOR
-             GIT_COMMIT_DATE
-             GIT_BRANCH
-             GIT_STATUS_AT_BUILD)
-
-# get configuration time in UTC
-execute_process(
-    COMMAND ${PYTHON_EXECUTABLE} -c "import datetime; print(datetime.datetime.utcnow())"
-    OUTPUT_VARIABLE _configuration_time
-    )
-string(STRIP ${_configuration_time} _configuration_time) # delete newline
-
-execute_process(
-    COMMAND whoami
-    TIMEOUT 1
-    OUTPUT_VARIABLE _user_name
-    OUTPUT_STRIP_TRAILING_WHITESPACE
-    )
-
-execute_process(
-    COMMAND hostname
-    TIMEOUT 1
-    OUTPUT_VARIABLE _host_name
-    OUTPUT_STRIP_TRAILING_WHITESPACE
-    )
-
-get_directory_property(_list_of_definitions DIRECTORY ${PROJECT_SOURCE_DIR} COMPILE_DEFINITIONS)
-
-# set python version variable when it is not defined automatically
-# this can happen when cmake version is equal or less than 2.8.5
-if(NOT _python_version)
-    execute_process(
-        COMMAND ${PYTHON_EXECUTABLE} -V
-        OUTPUT_VARIABLE _python_version
-        ERROR_VARIABLE _python_version
-        )
-    string(REGEX MATCH "Python ([0-9].[0-9].[0-9])" temp "${_python_version}")
-    set(_python_version ${CMAKE_MATCH_1})
-endif()
-
-configure_file(
-    ${PROJECT_SOURCE_DIR}/cmake/lib/config_info.in.py
-    ${PROJECT_BINARY_DIR}/config_info.py
-    )
-
-unset(_configuration_time)
-unset(_user_name)
-unset(_host_name)
-unset(_list_of_definitions)
-unset(_python_version)
-
-exec_program(
-    ${PYTHON_EXECUTABLE}
-    ${PROJECT_BINARY_DIR}
-    ARGS config_info.py Fortran > ${PROJECT_BINARY_DIR}/config_info.F90
-    OUTPUT_VARIABLE _discard # we don't care about the output
-    )
-
-exec_program(
-    ${PYTHON_EXECUTABLE}
-    ${PROJECT_BINARY_DIR}
-    ARGS config_info.py CMake > ${PROJECT_BINARY_DIR}/generated_by_cmake/config_info_generated.cmake
-    OUTPUT_VARIABLE _discard # we don't care about the output
-    )
-
-include(config_info_generated)


FindSodium: Do not create target unconditionally (#430)

Summary:
This fixes  https://github.com/facebook/fbthrift/issues/429

Pull Request resolved: https://github.com/facebook/fbthrift/pull/430

Reviewed By: iahs

Differential Revision: D28832985

Pulled By: vitaut

fbshipit-source-id: 0719f27207d11bb7970cc43c621640c425d8f55d

--- build/fbcode_builder/CMake/FindSodium.cmake
+++ build/fbcode_builder/CMake/FindSodium.cmake
@@ -254,7 +254,10 @@
 else()
     set(_LIB_TYPE SHARED)
 endif()
-add_library(sodium ${_LIB_TYPE} IMPORTED)
+
+if(NOT TARGET sodium)
+    add_library(sodium ${_LIB_TYPE} IMPORTED)
+endif()

 set_target_properties(sodium PROPERTIES
     INTERFACE_INCLUDE_DIRECTORIES "${sodium_INCLUDE_DIR}"


Fixed NN deadlock edge case

Fixed NN deadlock edge case

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "9628a4701a703d4654d2e965bbfcb74b6cee4915")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "d98e1b5b0d8681533916eb4733f27096ed6000b9")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Update FW with latest apriltag

Update FW with latest apriltag

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "f503b7adfd44b696187b7825a12a134ded0ca3f3")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "bf00dcbe8bfcdb9d6ce1c029f3e125785827a93f")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Update FW with runtime disparity range fix

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "238b43b7fbd0af171e301e764699776538594b8d")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "db62f875ea8aca53e22b4095daff67a26e1cfdd2")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


FMUv1: Do not support CAN build, since its out of reach memory wise anyway

--- cmake/configs/nuttx_px4fmu-v1_default.cmake
+++ cmake/configs/nuttx_px4fmu-v1_default.cmake
@@ -63,7 +63,6 @@
 	modules/navigator
 	modules/mavlink
 	modules/gpio_led
-	modules/uavcan
 	modules/land_detector

 	#


px4fmu-v2_default sort driver list

px4fmu-v2_default sort driver list

--- cmake/configs/nuttx_px4fmu-v2_default.cmake
+++ cmake/configs/nuttx_px4fmu-v2_default.cmake
@@ -12,26 +12,34 @@
 	#drivers/magnetometer
 	#drivers/telemetry

-	#drivers/imu/adis16448
+	#drivers/barometer/bmp280
 	drivers/barometer/ms5611
 	#drivers/blinkm
-	#drivers/imu/bmi160
-	#drivers/barometer/bmp280
 	#drivers/bst
 	drivers/camera_trigger
+	drivers/distance_sensor/ll40ls
+	#drivers/distance_sensor/mb12xx
+	drivers/distance_sensor/sf0x
+	drivers/distance_sensor/sf1xx
+	drivers/distance_sensor/srf02
+	drivers/distance_sensor/teraranger
+	drivers/distance_sensor/tfmini
+	#drivers/distance_sensor/ulanding
 	#drivers/frsky_telemetry
 	drivers/gps
 	#drivers/hott
+	#drivers/imu/adis16448
+	#drivers/imu/bmi160
+	drivers/imu/l3gd20
+	drivers/imu/lsm303d
+	drivers/imu/mpu6000
+	drivers/imu/mpu9250
 	#drivers/iridiumsbd
 	#drivers/irlock
-	drivers/imu/l3gd20
-	drivers/imu/lsm303d
 	drivers/magnetometer/hmc5883
 	drivers/magnetometer/lis3mdl
 	#drivers/mb12xx
 	#drivers/mkblctrl
-	drivers/imu/mpu6000
-	drivers/imu/mpu9250
 	#drivers/oreoled
 	#drivers/protocol_splitter
 	drivers/pwm_input
@@ -45,16 +53,6 @@
 	drivers/stm32/tone_alarm
 	#drivers/tap_esc
 	drivers/vmount
-
-	# distance sensors
-	drivers/distance_sensor/ll40ls
-	#drivers/distance_sensor/mb12xx
-	drivers/distance_sensor/sf0x
-	drivers/distance_sensor/sf1xx
-	drivers/distance_sensor/srf02
-	drivers/distance_sensor/teraranger
-	drivers/distance_sensor/tfmini
-	#drivers/distance_sensor/ulanding
 	modules/sensors

 	#


px4fmu-v2 disable SRF02 ultra sonic range finder

--- cmake/configs/nuttx_px4fmu-v2_default.cmake
+++ cmake/configs/nuttx_px4fmu-v2_default.cmake
@@ -27,7 +27,7 @@
 	#drivers/distance_sensor/mb12xx
 	drivers/distance_sensor/sf0x
 	drivers/distance_sensor/sf1xx
-	drivers/distance_sensor/srf02
+	#drivers/distance_sensor/srf02
 	#drivers/distance_sensor/teraranger
 	#drivers/distance_sensor/tfmini
 	#drivers/distance_sensor/ulanding


Do not enable builtin_lz4 if fail-on-missing=ON

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -261,10 +261,14 @@
 #---Check for LZ4--------------------------------------------------------------------
 if(NOT builtin_lz4)
   message(STATUS "Looking for LZ4")
-  find_package(LZ4)
-  if(NOT LZ4_FOUND)
-    message(STATUS "LZ4 not found. Switching on builtin_lz4 option")
-    set(builtin_lz4 ON CACHE BOOL "" FORCE)
+  if(fail-on-missing)
+    find_package(LZ4 REQUIRED)
+  else()
+    find_package(LZ4)
+    if(NOT LZ4_FOUND)
+      message(STATUS "LZ4 not found. Switching on builtin_lz4 option")
+      set(builtin_lz4 ON CACHE BOOL "" FORCE)
+    endif()
   endif()
 endif()


Make detection of cores work even if CMake returns invalid data.

Especifically, if NUMBER_OF_LOGICAL_CORES == 0 or NUMBER_OF_PHYSICAL_CORES == 0
it sets the invalid variable to 1.

--- cmake/modules/hunter_jobs_number.cmake
+++ cmake/modules/hunter_jobs_number.cmake
@@ -10,21 +10,36 @@

   string(COMPARE EQUAL "${HUNTER_JOBS_NUMBER}" "" use_default_jobs)
   if(use_default_jobs)
+    # NUMBER_OF_LOGICAL_CORES is actually the number of logical cores
+    # per physical core.
+    # Excerpt from the CMake 3.7.1 source code:
+    #     unsigned int GetNumberOfLogicalCPU(); // per physical cpu
+    #     from Source/kwsys/SystemInformation.hxx.in
+    # See https://gitlab.kitware.com/cmake/cmake/issues/16594
     cmake_host_system_information(
         RESULT l_cores
         QUERY NUMBER_OF_LOGICAL_CORES
     )
-	cmake_host_system_information(
+    cmake_host_system_information(
         RESULT p_cores
         QUERY NUMBER_OF_PHYSICAL_CORES
     )
-	math(EXPR jobs_number "${l_cores} * ${p_cores}")
-    string(COMPARE EQUAL "${jobs_number}" "0" is_zero)
-    if(is_zero)
-      hunter_status_debug("Number of logical cores is 0 - forcing 1")
-      set(jobs_number "1")
+    string(COMPARE EQUAL "${l_cores}" "0" l_cores_is_zero)
+    if(l_cores_is_zero)
+      hunter_status_debug("Number of logical cores per physical core is 0 - forcing 1")
+      set(l_cores "1")
     else()
-      hunter_status_debug("Number of logical cores: ${jobs_number}")
+      hunter_status_debug("Number of logical cores per physical core: ${l_cores}")
+    endif()
+    string(COMPARE EQUAL "${p_cores}" "0" p_cores_is_zero)
+    if(p_cores_is_zero)
+      hunter_status_debug("Number of physical cores is 0 - forcing 1")
+      set(p_cores "1")
+    else()
+      hunter_status_debug("Number of physical cores: ${p_cores}")
+    endif()
+    math(EXPR jobs_number "${l_cores} * ${p_cores}")
+    hunter_status_debug("Total number of cores: ${jobs_number}")
     endif()
   else()
     set(jobs_number "${HUNTER_JOBS_NUMBER}")


Link pthread on Linux

Link pthread on Linux

--- cmake/PlatformLinuxGCC.cmake
+++ cmake/PlatformLinuxGCC.cmake
@@ -42,8 +42,13 @@
 # -Wreturn-type -Werror=return-type -> missing returns in functions and methods are handled as errors which stops the compilation
 # -Wshadow -> e.g. when a parameter is named like a member, too many warnings, disabled for now

+set(LINUX_LINKER_FLAGS "-pthread")
+
 set(DEFAULT_COMPILE_FLAGS ${LINUX_COMPILE_FLAGS})

+set(DEFAULT_LINKER_FLAGS_RELEASE ${LINUX_LINKER_FLAGS})
+set(DEFAULT_LINKER_FLAGS_DEBUG ${LINUX_LINKER_FLAGS})
+set(DEFAULT_LINKER_FLAGS ${LINUX_LINKER_FLAGS})

 # Add platform specific libraries for linking
 set(EXTRA_LIBS "")