ARROW-1113: [C++] Upgrade to gflags 2.2.0, use tarball instead of git tag

This fixes the weirdness I was seeing with make and ninja where the EP was re-running (but doing nothing)

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes #776 from wesm/gflags-ep-make-oddness and squashes the following commits:

82b163b2 [Wes McKinney] Upgrade to gflags 2.2.0, use tarball to avoid odd no-op work on subsequent builds with make or ninja

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -20,7 +20,7 @@
 # Thirdparty toolchain

 set(THIRDPARTY_DIR "${CMAKE_SOURCE_DIR}/thirdparty")
-set(GFLAGS_VERSION "2.1.2")
+set(GFLAGS_VERSION "2.2.0")
 set(GTEST_VERSION "1.8.0")
 set(GBENCHMARK_VERSION "1.1.0")
 set(FLATBUFFERS_VERSION "1.7.1")
@@ -223,6 +223,7 @@
   if("${GFLAGS_HOME}" STREQUAL "")
     set(GFLAGS_CMAKE_CXX_FLAGS ${EP_CXX_FLAGS})

+    set(GFLAGS_URL "https://github.com/gflags/gflags/archive/v${GFLAGS_VERSION}.tar.gz")
     set(GFLAGS_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/gflags_ep-prefix/src/gflags_ep")
     set(GFLAGS_HOME "${GFLAGS_PREFIX}")
     set(GFLAGS_INCLUDE_DIR "${GFLAGS_PREFIX}/include")
@@ -244,15 +245,13 @@
     if (CMAKE_VERSION VERSION_GREATER "3.2")
       # BUILD_BYPRODUCTS is a 3.2+ feature
       ExternalProject_Add(gflags_ep
-        GIT_REPOSITORY https://github.com/gflags/gflags.git
-        GIT_TAG cce68f0c9c5d054017425e6e6fd54f696d36e8ee
+        URL ${GFLAGS_URL}
         BUILD_IN_SOURCE 1
         BUILD_BYPRODUCTS "${GFLAGS_STATIC_LIB}"
         CMAKE_ARGS ${GFLAGS_CMAKE_ARGS})
     else()
       ExternalProject_Add(gflags_ep
-        GIT_REPOSITORY https://github.com/gflags/gflags.git
-        GIT_TAG cce68f0c9c5d054017425e6e6fd54f696d36e8ee
+        URL ${GFLAGS_URL}
         BUILD_IN_SOURCE 1
         CMAKE_ARGS ${GFLAGS_CMAKE_ARGS})
     endif()


ExternalData: Add support for custom algorithm-to-URL mapping

Allow URL templates to contain a %(algo:<key>) placeholder that is
replaced by mapping the canonical hash algorithm name through a map
defined by the <key>.

Extend the Module.ExternalData test to cover the behavior.
Extend the RunCMake.ExternalData test to cover error cases.

Change-Id: Iabbcb81de0253b4482bce65a0e32cc5c1e8a4816

--- CMake/ExternalData.cmake
+++ CMake/ExternalData.cmake
@@ -210,6 +210,25 @@
           "Bad ExternalDataCustomScript key '${key}' in URL template:\n"
           " ${url_template}\n"
           "The key must be a valid C identifier.")
+      endif()
+    endif()
+
+    # Store custom algorithm name to URL component maps.
+    if("${url_template}" MATCHES "%\\(algo:([^)]*)\\)")
+      set(key "${CMAKE_MATCH_1}")
+      if(key MATCHES "^[A-Za-z_][A-Za-z0-9_]*$")
+        string(REPLACE "|" ";" _algos "${_ExternalData_REGEX_ALGO}")
+        foreach(algo ${_algos})
+          if(DEFINED ExternalData_URL_ALGO_${algo}_${key})
+            string(CONCAT _ExternalData_CONFIG_CODE "${_ExternalData_CONFIG_CODE}\n"
+              "set(ExternalData_URL_ALGO_${algo}_${key} \"${ExternalData_URL_ALGO_${algo}_${key}}\")")
+          endif()
+        endforeach()
+      else()
+        message(FATAL_ERROR
+          "Bad %(algo:${key}) in URL template:\n"
+          " ${url_template}\n"
+          "The transform name must be a valid C identifier.")
       endif()
     endif()
   endforeach()
@@ -770,6 +789,16 @@
   foreach(url_template IN LISTS ExternalData_URL_TEMPLATES)
     string(REPLACE "%(hash)" "${hash}" url_tmp "${url_template}")
     string(REPLACE "%(algo)" "${algo}" url "${url_tmp}")
+    if(url MATCHES "^(.*)%\\(algo:([A-Za-z_][A-Za-z0-9_]*)\\)(.*)$")
+      set(lhs "${CMAKE_MATCH_1}")
+      set(key "${CMAKE_MATCH_2}")
+      set(rhs "${CMAKE_MATCH_3}")
+      if(DEFINED ExternalData_URL_ALGO_${algo}_${key})
+        set(url "${lhs}${ExternalData_URL_ALGO_${algo}_${key}}${rhs}")
+      else()
+        set(url "${lhs}${algo}${rhs}")
+      endif()
+    endif()
     message(STATUS "Fetching \"${url}\"")
     if(url MATCHES "^ExternalDataCustomScript://([A-Za-z_][A-Za-z0-9_]*)/(.*)$")
       _ExternalData_custom_fetch("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}" "${tmp}" err errMsg)


BUG: Mantis-856: Fix LibKML import script and enhance documentation

--- CMake/ImportLibKML.cmake
+++ CMake/ImportLibKML.cmake
@@ -5,15 +5,22 @@
   option(OTB_USE_EXTERNAL_LIBKML "Use external LibKML library." ON)
 else()
   option(OTB_USE_EXTERNAL_LIBKML "Use external LibKML library." OFF)
+endif()
+mark_as_advanced(OTB_USE_EXTERNAL_LIBKML)
+
+if(OTB_USE_EXTERNAL_LIBKML)
+  if(NOT LIBKML_FOUND)
+    message(FATAL_ERROR "Can't build OTB without LibKML. Instal it "
+                        "on your system, or disable the option "
+                        "OTB_USE_EXTERNAL_LIBKML to use internal one")
+  endif()
+else()
   set(LIBKML_LIBRARIES otbkml)
-  message(STATUS "Using LibKML internal version")
+  message(STATUS "  Using LibKML internal version")
+  # Known issue in OTB which does not compile with external ITK and internal libkml
+  if (OTB_USE_EXTERNAL_ITK)
+    message(WARNING "There is a known issue which does not allow to use internal libKML with external ITK in OTB."
+                    "You might consider using an external LibKML. "
+                    "See http://bugs.orfeo-toolbox.org/view.php?id=896 for details")
+  endif()
 endif()
-
-# Known issue in OTB which does not compile with external ITK and internal libkml
-if (OTB_USE_EXTERNAL_ITK AND NOT OTB_USE_EXTERNAL_LIBKML)
-  message(WARNING "There is a known issue which does not allow to use internal libKML with external ITK in OTB."
-                  "You might consider using an external LibKML. "
-                  "See http://bugs.orfeo-toolbox.org/view.php?id=896 for details")
-endif()
-
-mark_as_advanced(OTB_USE_EXTERNAL_LIBKML)


Explicitly enable ITK review

Explicitly enable ITK review

This keeps the ITK <4.5 behaviour which turned it on by default

--- CMakeExternals/ITK.cmake
+++ CMakeExternals/ITK.cmake
@@ -31,7 +31,6 @@

     list(APPEND additional_cmake_args
          -DITK_WRAPPING:BOOL=ON
-         #-DITK_USE_REVIEW:BOOL=ON
          -DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE}
          -DPYTHON_INCLUDE_DIR:PATH=${PYTHON_INCLUDE_DIR}
          -DPYTHON_INCLUDE_DIR2:PATH=${PYTHON_INCLUDE_DIR2}
@@ -64,6 +63,12 @@
         )
   endif()

+  # Keep the behaviour of ITK 4.3 which by default turned on ITK Review
+  # see MITK bug #17338
+  list(APPEND additional_cmake_args
+    -DModule_ITKReview:BOOL=ON
+  )
+
   set(ITK_PATCH_COMMAND ${CMAKE_COMMAND} -DTEMPLATE_FILE:FILEPATH=${MITK_SOURCE_DIR}/CMakeExternals/EmptyFileForPatching.dummy -P ${MITK_SOURCE_DIR}/CMakeExternals/PatchITK-4.5.1.cmake)

   ExternalProject_Add(${proj}


improve R detection for OSX

improve R detection for OSX

--- CMakeModules/FindR.cmake
+++ CMakeModules/FindR.cmake
@@ -14,12 +14,17 @@
 include(FindPackageHandleStandardArgs)

 if(NOT R_EXECUTABLE)
+  set(TEMP_CMAKE_FIND_APPBUNDLE ${CMAKE_FIND_APPBUNDLE})
+  set(CMAKE_FIND_APPBUNDLE "NEVER")
   find_program(R_EXECUTABLE NAMES R)
+  set(CMAKE_FIND_APPBUNDLE ${TEMP_CMAKE_FIND_APPBUNDLE})
 endif(NOT R_EXECUTABLE)

 if(R_EXECUTABLE)
+  message(STATUS "Found R executable: ${R_EXECUTABLE}")
   execute_process(COMMAND ${R_EXECUTABLE} RHOME OUTPUT_VARIABLE RHOME)
   string(STRIP ${RHOME} RHOME)
+  message(STATUS "Found R home: ${RHOME}")
   set(R_INCLUDE_DIR "${RHOME}/include")
   set(R_LIBRARY_DIR "${RHOME}/lib")
   set(CMAKE_REQUIRED_INCLUDES ${R_INCLUDE_DIR})
@@ -28,11 +33,13 @@
 check_include_file(R.h HAVE_R_H)

 if(NOT WIN32)
-find_library(R_LIBRARY NAMES R libR PATHS ${R_LIBRARY_DIR})
+find_library(R_LIBRARY NAMES R libR PATHS ${R_LIBRARY_DIR} NO_DEFAULT_PATH)
 if(R_LIBRARY)
+  message(STATUS "Checking R library: ${R_LIBRARY}")
   check_library_exists(${R_LIBRARY} Rprintf "" HAVE_R_LIBRARY)
 endif(R_LIBRARY)
 if(HAVE_R_LIBRARY)
+  message(STATUS "Found R library: ${R_LIBRARY}")
   set(R_LIBRARIES ${R_LIBRARY})
 endif(HAVE_R_LIBRARY)
 find_package_handle_standard_args(R DEFAULT_MSG R_EXECUTABLE HAVE_R_LIBRARY HAVE_R_H)


Also look for liblz4.

Also look for liblz4.

--- cmake/Find0event.cmake
+++ cmake/Find0event.cmake
@@ -1,4 +1,4 @@
-# Try to find 0event headers and library.
+# Tries to find 0event headers and library.
 #
 # Use this module as follows:
 #
@@ -18,19 +18,24 @@
 #  0event_INCLUDE_DIR        The location of 0event headers

 find_path(0event_INCLUDE_DIR
-    NAMES ze.h
-    HINTS ${0event_ROOT_DIR}/include)
+  NAMES ze.h
+  HINTS ${0event_ROOT_DIR}/include)

 find_library(0event_LIBRARIES
-    NAMES ze
-    HINTS ${0event_ROOT_DIR}/lib)
+  NAMES
+    lz4
+    lz4hc
+    ze
+  HINTS
+    ${0event_ROOT_DIR}/lib)

 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(0event DEFAULT_MSG
-    0event_LIBRARIES
-    0event_INCLUDE_DIR)
+find_package_handle_standard_args(
+  0event DEFAULT_MSG
+  0event_LIBRARIES
+  0event_INCLUDE_DIR)

 mark_as_advanced(
-    0event_ROOT_DIR
-    0event_LIBRARIES
-    0event_INCLUDE_DIR)
+  0event_ROOT_DIR
+  0event_LIBRARIES
+  0event_INCLUDE_DIR)


Add check to skip looking for probe-event lib

The probe-event module is header only and does not provide
a library to install, now the find script skips looking for it.

--- cmake/FindLibcaf.cmake
+++ cmake/FindLibcaf.cmake
@@ -77,11 +77,14 @@
                  ../../actor-framework/build/lib
                  ../../../actor-framework/build/lib)
   mark_as_advanced(LIBCAF_LIBRARY_${UPPERCOMP})
-  if ("${LIBCAF_LIBRARY_${UPPERCOMP}}" STREQUAL "LIBCAF_LIBRARY-NOTFOUND")
-    # exit on first error
-    break ()
-  else ()
-    set(LIBCAF_LIBRARIES ${LIBCAF_LIBRARIES} ${LIBCAF_LIBRARY_${UPPERCOMP}})
+  # skip probe_event as it is header only
+  if (NOT ${comp} STREQUAL "probe_event")
+    if ("${LIBCAF_LIBRARY_${UPPERCOMP}}" STREQUAL "LIBCAF_LIBRARY-NOTFOUND")
+      # exit on first error
+      break ()
+    else ()
+      set(LIBCAF_LIBRARIES ${LIBCAF_LIBRARIES} ${LIBCAF_LIBRARY_${UPPERCOMP}})
+    endif ()
   endif ()
 endforeach ()

@@ -93,4 +96,4 @@
                                   LIBCAF_INCLUDE_DIRS)
 mark_as_advanced(LIBCAF_ROOT_DIR
                  LIBCAF_LIBRARIES
-                 LIBCAF_INCLUDE_DIRS)+                 LIBCAF_INCLUDE_DIRS)


Fix: M_PI access with cmath on windows

Fix: M_PI access with cmath on windows

Former-commit-id: 2be30f167bd7e59e2c04f417a6cf6912618dd3e8

--- cmake/buildFlags.cmake
+++ cmake/buildFlags.cmake
@@ -46,7 +46,7 @@
 # windows specific
 if(WIN32)
     list(APPEND compilerDefines "UNICODE")
-
+	 list(APPEND compilerDefines "_USE_MATH_DEFINES") # just to access M_PI with cmath
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
 endif()


Fix forwarded by Jamie from Matt Clarkson

--- cmake/nvcc-check.cmake
+++ cmake/nvcc-check.cmake
@@ -15,6 +15,7 @@
 # This function searches for gcc version x.y (arguments 2 and 3 of the macro)
 # Return the result in argument 1, empty if not found
 FUNCTION(FIND_GCC GCC_PATH GCC_MAJOR GCC_MINOR)
+
   # Search for gcc-x.y
   FIND_PROGRAM(EXACT_GCC "gcc-${GCC_MAJOR}.${GCC_MINOR}")
   IF(EXACT_GCC)
@@ -30,10 +31,11 @@
     STRING(REGEX REPLACE "[0-9]+.[0-9]+.([0-9]+)" "\\1" GCCVER_PATCH "${GCCVER}")

     # Check that adequate
-    IF(GCCVER_MAJOR MATCHES GCC_MAJOR AND GCCVER_MINOR MATCHES GCC_MINOR)
+    IF("${GCCVER_MAJOR}" MATCHES "${GCC_MAJOR}" AND "${GCCVER_MINOR}" MATCHES "${GCC_MINOR}")
         SET(GCC_PATH ${DEFAULT_GCC} PARENT_SCOPE)
     ENDIF(GCCVER_MAJOR MATCHES GCC_MAJOR AND GCCVER_MINOR MATCHES GCC_MINOR)
   ENDIF(EXACT_GCC)
+
 ENDFUNCTION(FIND_GCC)

 # Main code dealing with each version of cuda


removed cmake version restriction

removed cmake version restriction

--- cmake/unit-tests.cmake
+++ cmake/unit-tests.cmake
@@ -2,7 +2,10 @@
 find_package(CryptoPP REQUIRED)
 find_package(EthCrypto REQUIRED)
 find_package(JsonCPP REQUIRED)
-find_package(GMP)
+
+if(ENABLE_GMP)
+    find_package(GMP)
+endif()

 file(GLOB TEST_SOURCES
     "test/*.cpp"


zephyr: Import the compiler specific link flags

I noticed earlier that the --coverage flag was missing from the link
command, and added it to ldd/linker_flags.cmake, but I realize this is
a better fix, as it will pick up all compiler specific link flags in
zephyr.

BUG=b:183007888
TEST=cmds in code_coverage.md
BRANCH=none

Change-Id: I957100dbe0e5c75e2e8124ce121f295778bd8f68
Signed-off-by: Jeremy Bettis <4df7b5147fee087dca33c181f288ee7dbf56e022@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2787353
Commit-Queue: Jeremy Bettis <4df7b5147fee087dca33c181f288ee7dbf56e022@chromium.org>
Tested-by: Jeremy Bettis <4df7b5147fee087dca33c181f288ee7dbf56e022@chromium.org>
Reviewed-by: Paul Fagerburg <d8c44b60afb21c60f56d931aa690ca1cf34910c8@chromium.org>
Reviewed-by: Simon Glass <c00b0378376498bd9cd974c388df8854c0131d27@chromium.org>

--- zephyr/cmake/linker/lld/linker_flags.cmake
+++ zephyr/cmake/linker/lld/linker_flags.cmake
@@ -4,5 +4,6 @@

 # Include definitions for bfd as a base.
 include("${ZEPHYR_BASE}/cmake/linker/ld/linker_flags.cmake")
-
-set_property(TARGET linker PROPERTY coverage --coverage)
+# ld/linker_flags.cmake includes ${LINKER}/${COMPILER}/linker_flags.cmake but
+# that doesn't exist for ldd, so import the path that actually exists.
+include("${ZEPHYR_BASE}/cmake/linker/ld/${COMPILER}/linker_flags.cmake" OPTIONAL)


Eliminate vcredist dependency

Eliminate vcredist dependency

--- cli/setup.cmake
+++ cli/setup.cmake
@@ -11,6 +11,12 @@
     add_compile_options($<$<CONFIG:Release>:-DNDEBUG>)
     add_compile_options($<$<CONFIG:RelWithDebInfo>:-DNDEBUG>)
     add_compile_options($<$<CONFIG:Debug>:/Od>)
+    add_compile_options(/guard:cf)
+    add_compile_options(/d2Zi+) # make optimized builds debugging easier
+    add_compile_options(/Oi) # enable intrinsics
+    add_compile_options(/Oy-) # disable suppressing of the creation of frame pointers on the call stack for quicker function calls
+    add_compile_options(/GF) # enable read-only string pooling
+    add_compile_options(/FC) # use full pathnames in diagnostics
     add_compile_options(/DEBUG)
     add_compile_options(/GS)
     add_compile_options(/W1)
@@ -30,11 +36,15 @@
     set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
     set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
     set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
+    set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib")
+    set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib")

     # RelWithDebInfo specific flags
     set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /DEBUG /OPT:REF /OPT:ICF")
     set(CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO} /DEBUG /OPT:REF /OPT:ICF")
     set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /DEBUG /OPT:REF /OPT:ICF")
+    set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib")
+    set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib")
 else()
     add_compile_options(-Wno-unused-local-typedef)
 endif()


config-gpgme++.h.cmake: work around the CMake bug that makes check_cxx_source_compiles try to link instead of just compile, leading to a failed HAVE_GPG_ERR_SET_ERRNO check, while HAVE_GPGME_GPG_ERROR_WRAPPERS, which is stronger, succeeds.

Fixed by #ifndef'ing the replacement code also on HAVE_GPGME_GPG_ERROR_WRAPPERS.
Thanks to Andy for noticing.

svn path=/trunk/KDE/kdepimlibs/; revision=1167280

--- config-gpgme++.h.cmake
+++ config-gpgme++.h.cmake
@@ -102,13 +102,15 @@
 /* Define to 1 if your gpg-error has gpg_err_set_errno */
 #cmakedefine HAVE_GPG_ERR_SET_ERRNO 1

-#ifndef HAVE_GPG_ERR_SET_ERRNO
-# include <errno.h>
-static inline void gpg_err_set_errno( int x ) { errno = x; }
-#endif
-
 /* Define to 1 if your gpgme has gpgme_err_set_errno(int) and friends */
 #cmakedefine HAVE_GPGME_GPG_ERROR_WRAPPERS 1
+
+#ifndef HAVE_GPGME_GPG_ERROR_WRAPPERS
+# ifndef HAVE_GPG_ERR_SET_ERRNO
+#  include <errno.h>
+static inline void gpg_err_set_errno( int x ) { errno = x; }
+# endif
+#endif

 #define GPGMEPP_ERR_SOURCE_DEFAULT 22
 #define   GPGME_ERR_SOURCE_DEFAULT ((gpgme_err_source_t)22)


add all 26 cert test cases to the openfast reg test

--- reg_tests/CTestList.cmake
+++ reg_tests/CTestList.cmake
@@ -62,5 +62,34 @@
 #===============================================================================
 # Regression tests
 #===============================================================================
+
+# openfast regression tests
 of_regression(Test01)
+of_regression(Test02)
+of_regression(Test03)
+of_regression(Test04)
+of_regression(Test05)
+of_regression(Test06)
+of_regression(Test07)
+of_regression(Test08)
+of_regression(Test09)
+of_regression(Test10)
+of_regression(Test11)
+of_regression(Test12)
+of_regression(Test13)
+of_regression(Test14)
+of_regression(Test15)
+of_regression(Test16)
+of_regression(Test17)
+of_regression(Test18)
+of_regression(Test19)
+of_regression(Test20)
+of_regression(Test21)
+of_regression(Test22)
+of_regression(Test23)
+of_regression(Test24)
+of_regression(Test25)
+of_regression(Test26)
+
+# beam dyn regression tests
 bd_regression(bd_isotropic_rollup)


Enable more strict standards conformance in MSVC for rvalue casting and string literal type conversion to non-const types. Also enables generation of intrinsics for more functions.

Patch by Alexander Riccio

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -363,6 +363,17 @@

   append("/Zc:inline" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)

+  # Disable string literal const->non-const type conversion
+  # "When specified, the compiler requires strict const-qualification
+  # conformance for pointers initialized by using string literals."
+  append("/Zc:strictStrings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+
+  # Generate Intrinsic Functions
+  append("/Oi" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+
+  # Enforce type conversion rules
+  append("/Zc:rvalueCast" CMAKE_CXX_FLAGS)
+
   # Disable sized deallocation if the flag is supported. MSVC fails to compile
   # the operator new overload in User otherwise.
   check_c_compiler_flag("/WX /Zc:sizedDealloc-" SUPPORTS_SIZED_DEALLOC)


Fixed include directory error in FindLive555.cmake

--- cmake/TbagFindPackage/FindLive555.cmake
+++ cmake/TbagFindPackage/FindLive555.cmake
@@ -1,7 +1,10 @@
 ## Find the Live555 (OpenRTSP) library.
 #
 # The following variables are optionally searched for defaults
-#  Live555_ROOT
+#  BasicUsageEnvironment_ROOT
+#  UsageEnvironment_ROOT
+#  Groupsock_ROOT
+#  LiveMedia_ROOT
 #
 # The following are set after configuration is done:
 #  Live555_FOUND
@@ -12,15 +15,38 @@
     return ()
 endif ()

-set (__headers BasicUsageEnvironment/BasicUsageEnvironment.hh
-               UsageEnvironment/UsageEnvironment.hh
-               groupsock/Groupsock.hh
-               liveMedia/liveMedia.hh)
-set (__libs    BasicUsageEnvironment
-               UsageEnvironment
-               groupsock
-               liveMedia)
+include (TbagSimpleFindLibrary)
+tbag_simple_find_library (BasicUsageEnvironment BasicUsageEnvironment/BasicUsageEnvironment.hh BasicUsageEnvironment)
+tbag_simple_find_library (UsageEnvironment UsageEnvironment/UsageEnvironment.hh UsageEnvironment)
+tbag_simple_find_library (Groupsock groupsock/Groupsock.hh Groupsock)
+tbag_simple_find_library (LiveMedia liveMedia/liveMedia.hh liveMedia)

-include (TbagSimpleFindLibrary)
-tbag_simple_find_library_with_module_prefix ("${__headers}" "${__libs}")
+if (BasicUsageEnvironment_FOUND OR UsageEnvironment_FOUND OR Groupsock_FOUND OR LiveMedia_FOUND)
+    set (Live555_FOUND ON)
+else ()
+    set (Live555_FOUND OFF)
+endif ()

+set (Live555_INCLUDE_DIRS)
+set (Live555_LIBRARIES)
+if (BasicUsageEnvironment_FOUND)
+    list (APPEND Live555_INCLUDE_DIRS ${BasicUsageEnvironment_INCLUDE_DIRS}/BasicUsageEnvironment)
+    list (APPEND Live555_LIBRARIES ${BasicUsageEnvironment_LIBRARIES})
+endif ()
+if (UsageEnvironment_FOUND)
+    list (APPEND Live555_INCLUDE_DIRS ${UsageEnvironment_INCLUDE_DIRS}/UsageEnvironment)
+    list (APPEND Live555_LIBRARIES ${UsageEnvironment_LIBRARIES})
+endif ()
+if (Groupsock_FOUND)
+    list (APPEND Live555_INCLUDE_DIRS ${Groupsock_INCLUDE_DIRS}/groupsock)
+    list (APPEND Live555_LIBRARIES ${Groupsock_LIBRARIES})
+endif ()
+if (LiveMedia_FOUND)
+    list (APPEND Live555_INCLUDE_DIRS ${LiveMedia_INCLUDE_DIRS}/liveMedia)
+    list (APPEND Live555_LIBRARIES ${LiveMedia_LIBRARIES})
+endif ()
+
+mark_as_advanced (Live555_FOUND
+                  Live555_LIBRARIES
+                  Live555_INCLUDE_DIRS)
+


Updates CMake bundle packaging for better support for cross compilation.

--- cmake/cmake_celix/BundlePackaging.cmake
+++ cmake/cmake_celix/BundlePackaging.cmake
@@ -15,12 +15,12 @@
 # specific language governing permissions and limitations
 # under the License.

-find_program(JAR_COMMAND jar)
+find_program(JAR_COMMAND jar NO_CMAKE_FIND_ROOT_PATH)

 if(JAR_COMMAND)
     message(STATUS "Using jar to create bundles")
 else()
-    find_program(ZIP_COMMAND zip)
+    find_program(ZIP_COMMAND zip NO_CMAKE_FIND_ROOT_PATH)
     if(ZIP_COMMAND)
         message(STATUS "Using zip to create bundles")
     else()


Don't build px4_simple_app anymore

Don't build px4_simple_app anymore

--- cmake/configs/posix_bebop_default.cmake
+++ cmake/configs/posix_bebop_default.cmake
@@ -13,7 +13,7 @@

 set(config_module_list

-  examples/px4_simple_app
+  # examples/px4_simple_app

 	#
 	# Board support modules


fixed CIL versions

fixed CIL versions

--- version_config.cmake
+++ version_config.cmake
@@ -162,7 +162,37 @@

   set(DEFAULT_ACE_URL https://github.com/paskino/libace-conda)
   set(DEFAULT_ACE_TAG origin/master)
-
+  # CCPi CIL
+  #set(CIL_VERSION "19.06")
+  set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git)
+  set(DEFAULT_CCPi-Framework_TAG origin/master)
+  set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git)
+  set(DEFAULT_CCPi-RGL_TAG origin/master)
+  set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git)
+  set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master)
+
+else()
+  # set(DEFAULT_SIRF_TAG v2.0.0)
+  set (DEFAULT_SIRF_TAG origin/add_to_sirf_classes)
+  ## STIR
+  set(DEFAULT_STIR_URL https://github.com/UCL/STIR )
+  set(DEFAULT_STIR_TAG 3a277f7a819f35a553a8d6097402ea25cf55a240)
+
+  ## siemens_to_ismrmrd
+  set(DEFAULT_siemens_to_ismrmrd_URL https://github.com/ismrmrd/siemens_to_ismrmrd)
+  set(DEFAULT_siemens_to_ismrmrd_TAG ba4773f9cf4bba5f3ccd19930e3548d8273fee01)
+
+  ## pet-rd-tools
+  set(DEFAULT_pet_rd_tools_URL https://github.com/UCL/pet-rd-tools )
+  set(DEFAULT_pet_rd_tools_TAG b88281f79e8c4a3781ebda7663f1ce7f5cab6e68)
+
+  ## glog
+  set(DEFAULT_glog_URL https://github.com/google/glog )
+  set(DEFAULT_glog_TAG v035)
+
+  set(DEFAULT_ACE_URL https://github.com/paskino/libace-conda)
+  set(DEFAULT_ACE_TAG origin/master)
+
   # CCPi CIL
   set(CIL_VERSION "v19.07")
   set(RGL_VERSION "19.06")
@@ -172,36 +202,6 @@
   set(DEFAULT_CCPi-RGL_TAG "${RGL_VERSION}")
   set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git)
   set(DEFAULT_CCPi-FrameworkPlugins_TAG "${CIL_VERSION}")
-else()
-  # set(DEFAULT_SIRF_TAG v2.0.0)
-  set (DEFAULT_SIRF_TAG origin/add_to_sirf_classes)
-  ## STIR
-  set(DEFAULT_STIR_URL https://github.com/UCL/STIR )
-  set(DEFAULT_STIR_TAG 3a277f7a819f35a553a8d6097402ea25cf55a240)
-
-  ## siemens_to_ismrmrd
-  set(DEFAULT_siemens_to_ismrmrd_URL https://github.com/ismrmrd/siemens_to_ismrmrd)
-  set(DEFAULT_siemens_to_ismrmrd_TAG ba4773f9cf4bba5f3ccd19930e3548d8273fee01)
-
-  ## pet-rd-tools
-  set(DEFAULT_pet_rd_tools_URL https://github.com/UCL/pet-rd-tools )
-  set(DEFAULT_pet_rd_tools_TAG b88281f79e8c4a3781ebda7663f1ce7f5cab6e68)
-
-  ## glog
-  set(DEFAULT_glog_URL https://github.com/google/glog )
-  set(DEFAULT_glog_TAG v035)
-
-  set(DEFAULT_ACE_URL https://github.com/paskino/libace-conda)
-  set(DEFAULT_ACE_TAG origin/master)
-
-  # CCPi CIL
-  set(CIL_VERSION "19.06")
-  set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git)
-  set(DEFAULT_CCPi-Framework_TAG origin/master)
-  set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git)
-  set(DEFAULT_CCPi-RGL_TAG "${CIL_VERSION}")
-  set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git)
-  set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master)

 endif()


passthrough PLATFORM variable to sub builds

For tvos and other apple platforms, "PLATFORM" cmake variable
is set. We want to pass this through to sub-builds to build external
depenedencies.


Fix CMP0023 policy

Fix CMP0023 policy

--- cmake/internal_utils.cmake
+++ cmake/internal_utils.cmake
@@ -146,7 +146,7 @@
       COMPILE_DEFINITIONS "GTEST_CREATE_SHARED_LIBRARY=1")
   endif()
   if (CMAKE_USE_PTHREADS_INIT)
-    target_link_libraries(${name} ${CMAKE_THREAD_LIBS_INIT})
+    target_link_libraries(${name} PUBLIC ${CMAKE_THREAD_LIBS_INIT})
   endif()
 endfunction()


qibuild/target.cmake : remove hacks

qibuild/target.cmake : remove hacks

TODO: think carefully now that WIN32 no longer implies visual studio :)

--- cmake/qibuild/target.cmake
+++ cmake/qibuild/target.cmake
@@ -87,17 +87,8 @@
   #TODO:qi
   if(WIN32)
     set_target_properties("${name}" PROPERTIES DEBUG_POSTFIX "_d")
-    _qi_win32_copy_target("${_name}" "${QI_SDK_DIR}/${QI_SDK_BIN}/${ARG_SUBFOLDER}")
-    # Be nice with VS user: generate a vcproj so that:
-    # -> target path is the path where the executable is copyied
-    # (not the place where it is compiled)
-    # -> PATH and PYTHONPATH are always set to nice values
-    _qi_configure_user_vcproj(${_name} "${QI_SDK_DIR}/${QI_SDK_BIN}/${ARG_SUBFOLDER}")
   endif()
   set_target_properties("${name}" PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${QI_SDK_DIR}/${QI_SDK_BIN}/${ARG_SUBFOLDER}")
-  # if (NOT ARG_NO_STAGE)
-  #   qi_stage_lib("${name}")
-  # endif()
 endfunction()

@@ -187,18 +178,9 @@
     set_target_properties("${name}" PROPERTIES PUBLIC_HEADER "${_PUBLIC_HEADER}")
   endif()

-  #set(_binlib ${QI_SDK_LIB})
-  #under win32 bin/lib goes into /Release and /Debug => change that
   if (WIN32)
     #always postfix debug lib/bin with _d
     set_target_properties("${name}" PROPERTIES DEBUG_POSTFIX "_d")
-
-    #by default put libraries next to binaries under windows
-    get_target_property(_type ${name} "TYPE")
-    # if (_type STREQUAL "SHARED_LIBRARY")
-    #   set(_binlib "${_SDK_BIN}")
-    # endif ()
-    _qi_win32_copy_target("${name}" "${SDK_DIR}/${_binlib}/${ARG_SUBFOLDER}")
   endif()

   set_target_properties("${name}"


MDEV-4190 : Fix system checks for OpenBSD

--- configure.cmake
+++ configure.cmake
@@ -160,6 +160,7 @@
     SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} wrap)
     CHECK_C_SOURCE_COMPILES(
     "
+    #include <sys/types.h>
     #include <tcpd.h>
     int allow_severity = 0;
     int deny_severity  = 0;
@@ -231,13 +232,13 @@
 CHECK_INCLUDE_FILES (sys/file.h HAVE_SYS_FILE_H)
 CHECK_INCLUDE_FILES (sys/fpu.h HAVE_SYS_FPU_H)
 CHECK_INCLUDE_FILES (sys/ioctl.h HAVE_SYS_IOCTL_H)
-CHECK_INCLUDE_FILES (sys/ipc.h HAVE_SYS_IPC_H)
-CHECK_INCLUDE_FILES (sys/malloc.h HAVE_SYS_MALLOC_H)
+CHECK_INCLUDE_FILES ("sys/types.h;sys/ipc.h" HAVE_SYS_IPC_H)
+CHECK_INCLUDE_FILES ("sys/types.h;sys/malloc.h" HAVE_SYS_MALLOC_H)
 CHECK_INCLUDE_FILES (sys/mman.h HAVE_SYS_MMAN_H)
 CHECK_INCLUDE_FILES (sys/prctl.h HAVE_SYS_PRCTL_H)
 CHECK_INCLUDE_FILES (sys/resource.h HAVE_SYS_RESOURCE_H)
 CHECK_INCLUDE_FILES (sys/select.h HAVE_SYS_SELECT_H)
-CHECK_INCLUDE_FILES (sys/shm.h HAVE_SYS_SHM_H)
+CHECK_INCLUDE_FILES ("sys/types.h;sys/shm.h" HAVE_SYS_SHM_H)
 CHECK_INCLUDE_FILES (sys/socket.h HAVE_SYS_SOCKET_H)
 CHECK_INCLUDE_FILES (sys/stat.h HAVE_SYS_STAT_H)
 CHECK_INCLUDE_FILES (sys/stream.h HAVE_SYS_STREAM_H)


The library paths list contains only directories not full paths.

	* build-aux/cmake/modules/DynLibDep.cmake: Do that.

Signed-off-by: Nicolas Despres <abdeb541ca46f1651c9cc594d44e707056e73d5d@gostai.com>

--- build-aux/cmake/modules/DynLibDep.cmake
+++ build-aux/cmake/modules/DynLibDep.cmake
@@ -69,7 +69,8 @@
 	  dldep_info("cannot find '${lib_name}'")
 	  list(APPEND _lib_paths "")
 	else(${lib_path} STREQUAL "not found")
-	  list(APPEND _lib_paths ${lib_path})
+	  get_filename_component(lib_path_tmp ${lib_path} PATH)
+	  list(APPEND _lib_paths ${lib_path_tmp})
 	endif(${lib_path} STREQUAL "not found")

       else(line MATCHES ${regex})
@@ -102,7 +103,7 @@
 	string_list_match("${exclusions}" ${lib_name} index)

 	if(index EQUAL -1)
-	  list(APPEND _result ${lib_path})
+	  list(APPEND _result ${lib_path}/${lib_name})
 	else(index EQUAL -1)
 	  dldep_info("exclude '${lib_name}'")
 	endif(index EQUAL -1)


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 "c62955ce3e726f06e81eb5b0b868c3cb0866a5bf")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "ca9bdcd587a988d0c0dbfcd4a8a93e186afafa39")

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


[cmake] copy builtin vdt and tbb includes into ginclude/ directory

This directory should be used for generated or builtin modules.
If ${CMAKE_BINARY_DIR}/include is used, compiler get access to
all ROOT includes. Moreover, with cxxmodules=ON compiler get confused,
while same include appears twice in include paths

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1179,7 +1179,12 @@
     )
     install(DIRECTORY ${CMAKE_BINARY_DIR}/lib/ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries FILES_MATCHING PATTERN "libtbb*")
   endif()
-  set(TBB_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/include)
+  ExternalProject_Add_Step(
+     TBB tbb2externals
+     COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/include/tbb ${CMAKE_BINARY_DIR}/ginclude/tbb
+     DEPENDEES install
+  )
+  set(TBB_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ginclude)
   set(TBB_CXXFLAGS "-DTBB_SUPPRESS_DEPRECATED_MESSAGES=1")
   set(TBB_TARGET TBB)
 endif()
@@ -1394,8 +1399,13 @@
       LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
       BUILD_BYPRODUCTS ${VDT_LIBRARIES}
     )
-    set(VDT_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include)
-    set(VDT_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/include)
+    ExternalProject_Add_Step(
+       VDT copy2externals
+       COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/include/vdt ${CMAKE_BINARY_DIR}/ginclude/vdt
+       DEPENDEES install
+    )
+    set(VDT_INCLUDE_DIR ${CMAKE_BINARY_DIR}/ginclude)
+    set(VDT_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ginclude)
     install(FILES ${CMAKE_BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}vdt${CMAKE_SHARED_LIBRARY_SUFFIX}
             DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
     install(DIRECTORY ${CMAKE_BINARY_DIR}/include/vdt


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

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -128,13 +128,17 @@
 #---Check for PCRE-------------------------------------------------------------------
 if(NOT builtin_pcre)
   message(STATUS "Looking for PCRE")
-  find_package(PCRE)
-  if(PCRE_FOUND)
-  else()
-    message(STATUS "PCRE not found. Switching on builtin_pcre option")
-    set(builtin_pcre ON CACHE BOOL "" FORCE)
-  endif()
-endif()
+  if(fail-on-missing)
+    find_package(PCRE REQUIRED)
+  else()
+    find_package(PCRE)
+    if(NOT PCRE_FOUND)
+      message(STATUS "PCRE not found. Switching on builtin_pcre option")
+      set(builtin_pcre ON CACHE BOOL "" FORCE)
+    endif()
+  endif()
+endif()
+
 if(builtin_pcre)
   set(pcre_version 8.37)
   message(STATUS "Building pcre version ${pcre_version} included in ROOT itself")


SearchInstalledSoftware.cmake: bundle together all checks for TMVA

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -440,16 +440,6 @@
   message(STATUS "Looking for python")
   find_package(PythonInterp ${python_version} REQUIRED)
   find_package(PythonLibs ${python_version} REQUIRED)
-  if (tmva AND tmva-pymva)
-    message(STATUS "Looking for numpy (python package)")
-    find_package(NumPy)
-    if(fail-on-missing AND NOT NUMPY_FOUND)
-      message(FATAL_ERROR "TMVA: numpy python package not found and tmva-pymva component required (python executable: ${PYTHON_EXECUTABLE})")
-    elseif(NOT NUMPY_FOUND)
-      message(STATUS "TMVA: numpy not found for python ${PYTHON_EXECUTABLE}. Switching off tmva-pymva option")
-      set(tmva-pymva OFF CACHE BOOL "Disabled because numpy not found (${tmva-pymva_description})" FORCE)
-    endif()
-  endif()

   if(NOT "${PYTHONLIBS_VERSION_STRING}" MATCHES "${PYTHON_VERSION_STRING}")
     message(FATAL_ERROR "Version mismatch between Python interpreter (${PYTHON_VERSION_STRING})"
@@ -1348,9 +1338,10 @@
   endif()
 endif()

-#---Check for CUDA and BLAS ---------------------------------------------------------
-if(tmva AND cuda AND tmva-gpu)
-  message(STATUS "Looking for CUDA for optional parts of TMVA")
+#---Check for CUDA-----------------------------------------------------------------------
+
+if(cuda OR tmva-gpu)
+  message(STATUS "Looking for CUDA")

   if(CMAKE_CXX_STANDARD EQUAL 11)
     find_package(CUDA 7.5)
@@ -1360,35 +1351,50 @@
   else()
     message(FATAL_ERROR "CUDA not supported with C++${CMAKE_CXX_STANDARD}")
   endif()
-
-  if(NOT CUDA_FOUND)
-    if(fail-on-missing)
-      message(FATAL_ERROR "CUDA not found. Ensure that the installation of CUDA is in the CMAKE_PREFIX_PATH")
-    else()
-      message(STATUS "CUDA not found. Ensure that the installation of CUDA is in the CMAKE_PREFIX_PATH")
-      message(STATUS "                For the time being switching OFF 'cuda' option")
-      set(cuda OFF CACHE BOOL "Disabled because cuda not found (${cuda_description})" FORCE)
-      set(tmva-gpu OFF CACHE BOOL "Disabled because cuda not found" FORCE)
-    endif()
-  endif()
-endif()
-
-if(tmva AND tmva-cpu AND imt )
-  message(STATUS "Looking for BLAS for optional parts of TMVA")
-  find_package(BLAS)
-endif()
-
-if(NOT BLAS_FOUND)
-  if (tmva AND tmva-cpu AND mathmore AND imt)
-    message(STATUS "Using GSL CBLAS for optional parts of TMVA")
-  else()
-    set(tmva-cpu OFF CACHE BOOL "Disabled because blas not found and mathmore, imt, or tmva disabled (${tmva-cpu_description})" FORCE)
-  endif()
-endif()
-if(NOT CUDA_FOUND)
-  set(tmva-gpu OFF CACHE BOOL "Disabled because cuda not found (${tmva-gpu_description})" FORCE)
-endif()
-
+endif()
+
+#---TMVA and its dependencies------------------------------------------------------------
+if(tmva)
+  if(tmva-cpu AND imt)
+    message(STATUS "Looking for BLAS for optional parts of TMVA")
+    find_package(BLAS)
+
+    if(NOT BLAS_FOUND)
+      if (GSL_FOUND)
+        message(STATUS "Using GSL CBLAS for optional parts of TMVA")
+      else()
+        set(tmva-cpu OFF CACHE BOOL "Disabled because BLAS was not found (${tmva-cpu_description})" FORCE)
+      endif()
+    endif()
+  else()
+    set(tmva-cpu OFF CACHE BOOL "Disabled because 'imt' is disabled (${tmva-cpu_description})" FORCE)
+  endif()
+
+  if(tmva-gpu AND NOT CUDA_FOUND)
+    set(tmva-gpu OFF CACHE BOOL "Disabled because cuda not found" FORCE)
+  endif()
+
+  if(python AND tmva-pymva)
+    message(STATUS "Looking for Numpy")
+    find_package(NumPy)
+    if(fail-on-missing AND NOT NUMPY_FOUND)
+      message(FATAL_ERROR "TMVA: numpy python package not found and tmva-pymva component required"
+                          " (python executable: ${PYTHON_EXECUTABLE})")
+    elseif(NOT NUMPY_FOUND)
+      message(STATUS "TMVA: Numpy not found for python ${PYTHON_EXECUTABLE}. Switching off tmva-pymva option")
+      set(tmva-pymva OFF CACHE BOOL "Disabled because Numpy was not found (${tmva-pymva_description})" FORCE)
+    endif()
+  endif()
+
+  if(tmva-rmva AND NOT R_FOUND)
+    set(tmva-rmva  OFF CACHE BOOL "Disabled because R was not found (${tmva-rmva_description})"  FORCE)
+  endif()
+else()
+  set(tmva-cpu   OFF CACHE BOOL "Disabled because 'tmva' is disabled (${tmva-cpu_description})"   FORCE)
+  set(tmva-gpu   OFF CACHE BOOL "Disabled because 'tmva' is disabled (${tmva-gpu_description})"   FORCE)
+  set(tmva-pymva OFF CACHE BOOL "Disabled because 'tmva' is disabled (${tmva-pymva_description})" FORCE)
+  set(tmva-rmva  OFF CACHE BOOL "Disabled because 'tmva' is disabled (${tmva-rmva_description})"  FORCE)
+endif()

 #---Download googletest--------------------------------------------------------------
 if (testing)


Disable all warnings on msvc for now

Disable all warnings on msvc for now

--- cmake/EnableCompilerWarnings.cmake
+++ cmake/EnableCompilerWarnings.cmake
@@ -3,19 +3,21 @@
 ## Strict warning level
 if (MSVC)
     # Use the highest warning level for visual studio.
-    set(CMAKE_CXX_WARNING_LEVEL 4)
-    if (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
-        string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-    else ()
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
-    endif ()
-
-    set(CMAKE_C_WARNING_LEVEL 4)
-    if (CMAKE_C_FLAGS MATCHES "/W[0-4]")
-        string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
-    else ()
-        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
-    endif ()
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /w")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /w")
+    # set(CMAKE_CXX_WARNING_LEVEL 4)
+    # if (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
+    #     string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+    # else ()
+    #     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
+    # endif ()
+
+    # set(CMAKE_C_WARNING_LEVEL 4)
+    # if (CMAKE_C_FLAGS MATCHES "/W[0-4]")
+    #     string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+    # else ()
+    #     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
+    # endif ()

 else()
     set(CMAKE_COMPILER_WARNINGS)


remove MKL test code in cmake build system

--- config/cmake/modules/FindMKL_CPARDISO.cmake
+++ config/cmake/modules/FindMKL_CPARDISO.cmake
@@ -29,78 +29,4 @@
   "Paths to headers required by MKL CPardiso." "Libraries required by MKL CPARDISO."
   ADD_COMPONENT MKL_LP64 "include" "" ${MKL_LIBRARY_DIR} mkl_intel_lp64
   ADD_COMPONENT MKL_SEQUENTIAL "include" "" ${MKL_LIBRARY_DIR} mkl_sequential
-  ADD_COMPONENT MKL_MPI_WRAPPER "include" "" ${MKL_LIBRARY_DIR} ${MKL_MPI_WRAPPER_LIB}
-  CHECK_BUILD MKL_CPARDISO_VERSION_OK TRUE
-  "
-#include <mpi.h>
-#include <mkl.h>
-#include <mkl_cluster_sparse_solver.h>
-int main (void)
-{
-    MKL_INT n = 5;
-    MKL_INT ia[6]  = { 1, 4, 6, 9, 12, 14};
-    MKL_INT ja[13] = {  1, 2, 4,        /* index of non-zeros in 1 row*/
-                        1, 2,           /* index of non-zeros in 2 row*/
-                        3, 4, 5,        /* index of non-zeros in 3 row*/
-                        1, 3, 4,        /* index of non-zeros in 4 row*/
-                        2, 5            /* index of non-zeros in 5 row*/
-    };
-    double a[13] = {
-                         1.0, -1.0, /*0*/ -3.0, /*0*/
-                        -2.0,  5.0, /*0*/ /*0*/ /*0*/
-                        /*0*/  4.0,  6.0,  4.0, /*0*/
-                        -4.0, /*0*/  2.0,  7.0, /*0*/
-                        /*0*/  8.0, /*0*/ /*0*/ -5.0
-                    };
-
-    MKL_INT mtype = 11; /* set matrix type to \"real unsymmetric matrix\" */
-    MKL_INT nrhs  = 1;  /* Number of right hand sides. */
-    double b[5], x[5], bs[5], res, res0; /* RHS and solution vectors. */
-
-    /* Internal solver memory pointer pt
-     *       32-bit:      int pt[64] or void *pt[64];
-     *       64-bit: long int pt[64] or void *pt[64]; */
-    void *pt[64] = { 0 };
-
-    /* Cluster Sparse Solver control parameters. */
-    MKL_INT iparm[64] = { 0 };
-    MKL_INT maxfct, mnum, phase, msglvl, error;
-
-    /* Auxiliary variables. */
-    double  ddum; /* Double dummy   */
-    MKL_INT idum; /* Integer dummy. */
-    MKL_INT i, j;
-    int     mpi_stat = 0;
-    int     argc = 0;
-    int     comm, rank;
-    char*   uplo;
-    char**  argv;
-
-    mpi_stat = MPI_Init( &argc, &argv );
-    mpi_stat = MPI_Comm_rank( MPI_COMM_WORLD, &rank );
-    comm =  MPI_Comm_c2f( MPI_COMM_WORLD );
-
-    iparm[ 0] =  1; /* Solver default parameters overriden with provided by iparm */
-    iparm[ 1] =  2; /* Use METIS for fill-in reordering */
-    iparm[ 5] =  0; /* Write solution into x */
-    iparm[ 7] =  2; /* Max number of iterative refinement steps */
-    iparm[ 9] = 13; /* Perturb the pivot elements with 1E-13 */
-    iparm[10] =  1; /* Use nonsymmetric permutation and scaling MPS */
-    iparm[12] =  1; /* Switch on Maximum Weighted Matching algorithm (default for non-symmetric) */
-    iparm[17] = -1; /* Output: Number of nonzeros in the factor LU */
-    iparm[18] = -1; /* Output: Mflops for LU factorization */
-    iparm[26] =  1; /* Check input data for correctness */
-    iparm[39] =  0; /* Input: matrix/rhs/solution stored on master */
-    maxfct = 1; /* Maximum number of numerical factorizations. */
-    mnum   = 1; /* Which factorization to use. */
-    msglvl = 1; /* Print statistical information in file */
-    error  = 0; /* Initialize error flag */
-
-    phase = 11;
-    cluster_sparse_solver ( pt, &maxfct, &mnum, &mtype, &phase,
-                &n, a, ia, ja, &idum, &nrhs, iparm, &msglvl, &ddum, &ddum, &comm, &error );
-
-    mpi_stat = MPI_Finalize();
-    return error;
-}
-")
+  ADD_COMPONENT MKL_MPI_WRAPPER "include" "" ${MKL_LIBRARY_DIR} ${MKL_MPI_WRAPPER_LIB})


optimize tensorflow bazel build parameters

--- cmake/ExternalTensorflow.cmake
+++ cmake/ExternalTensorflow.cmake
@@ -50,7 +50,7 @@
         # Build using bazel
         BUILD_COMMAND
             echo "Building tensorflow with bazel and CUDA GPU support" &&
-            cd ${FAST_EXTERNAL_BUILD_DIR}/tensorflow/src/tensorflow/ && bazel build -c opt --config=mkl --config=cuda --copt=-march=native //tensorflow:libtensorflow_framework.so
+            cd ${FAST_EXTERNAL_BUILD_DIR}/tensorflow/src/tensorflow/ && bazel build -c opt --config=cuda --copt=-mfpmath=both --copt=-march=native //tensorflow:libtensorflow_framework.so
         INSTALL_COMMAND
             echo "Installing tensorflow binary" &&
             cp -f ${FAST_EXTERNAL_BUILD_DIR}/tensorflow/src/tensorflow/bazel-bin/tensorflow/libtensorflow_framework.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/ &&


Workaround CMake bug by using an object library for dictionaries

In some older (but supported) versions of CMake, when target_sources()
is used to add generated files to an existing target, CMake does not
recognize them as generated and fails to configure because it cannot
find the source file, or because it thinks the target has no sources
if it's only made out of dictionary sources. In order to work around
this problem, we create an object library in the same scope of the
generated file, and use its object as a source in the main library.
This way CMake understands that the source is generated.

More information: https://cmake.org/Bug/view.php?id=14633

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -504,16 +504,33 @@
                              ${runtime_cxxmodule_dependencies}
                      COMMAND_EXPAND_LISTS)

+  # If we are adding to an existing target and it's not the dictionary itself,
+  # we make an object library and add its output object file as source to the target.
+  # This works around bug https://cmake.org/Bug/view.php?id=14633 in CMake by keeping
+  # the generated source at the same scope level as its owning target, something that
+  # would not happen if we used target_sources() directly with the dictionary source.
   if(ARG_NOTARGET)
-    if(TARGET ${ARG_MODULE})
-      target_sources(${ARG_MODULE} PRIVATE ${dictionary}.cxx)
-      if(PROJECT_NAME STREQUAL "ROOT")
-        set_property(GLOBAL APPEND PROPERTY ROOT_PCH_DEPENDENCIES ${ARG_MODULE})
-      endif()
-    else()
+    if(NOT TARGET "${ARG_MODULE}")
       message(FATAL_ERROR
         " When used with NOTARGET, the MODULE option must be passed with the name of an existing target.\n"
         " The dictionary source is then attached to this target instead of a custom dictionary target.")
+    endif()
+
+    add_library(${dictionary} OBJECT ${dictionary}.cxx)
+    set_target_properties(${dictionary} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
+    target_sources(${ARG_MODULE} PRIVATE $<TARGET_OBJECTS:${dictionary}>)
+
+    target_compile_options(${dictionary} PRIVATE
+      $<TARGET_PROPERTY:${ARG_MODULE},COMPILE_OPTIONS>)
+
+    target_compile_definitions(${dictionary} PRIVATE
+      ${definitions} $<TARGET_PROPERTY:${ARG_MODULE},COMPILE_DEFINITIONS>)
+
+    target_include_directories(${dictionary} PRIVATE
+      ${includedirs} $<TARGET_PROPERTY:${ARG_MODULE},INCLUDE_DIRECTORIES>)
+
+    if(PROJECT_NAME STREQUAL "ROOT")
+      set_property(GLOBAL APPEND PROPERTY ROOT_PCH_DEPENDENCIES ${dictionary})
     endif()
   else()
     add_custom_target(${dictionary} DEPENDS ${dictionary}.cxx ${pcm_name} ${rootmap_name} ${cpp_module_file})
@@ -547,7 +564,7 @@
     endif()
   endif()

-  if(ARG_BUILTINS AND NOT ARG_NOTARGET)
+  if(ARG_BUILTINS)
     foreach(arg1 ${ARG_BUILTINS})
       if(TARGET ${${arg1}_TARGET})
         add_dependencies(${dictionary} ${${arg1}_TARGET})


Rename pc_transform_link_flags macro to pkg-config_link_flags.
Put in placeholder (not implemented or used yet) for cmake_link_flags macro.

svn path=/trunk/; revision=8174

--- cmake/modules/pkg-config.cmake
+++ cmake/modules/pkg-config.cmake
@@ -20,9 +20,11 @@
 # Module for determining pkg-config configuration variables related to the
 # install-tree build of the examples.
 # Also create useful macros called pkg_check_pkgconfig to emulate the
-# pkgconfig macro using the pkg_check_modules macro and
-# pc_transform_link_flags to process link flags into standard form for
-# the configured *.pc files.
+# pkgconfig macro using the pkg_check_modules macro,
+# cmake_to_pkg_config_link_flags to process CMake link flags into
+# pkg-config standard form for the configured output *.pc files, and
+# pkg_config_to_cmake_link_flags to process input link flags delivered
+# by pkg-config into CMake standard form.

 # The following variables are set:
 # PKG_CONFIG_EXECUTABLE	  - name of pkg-config executable, but can also be
@@ -91,9 +93,9 @@
   #message("${_cflags} = ${${_cflags}}")
 endmacro(pkg_check_pkgconfig)

-macro(pc_transform_link_flags _link_flags_out _link_flags_in)
-  # Transform link flags into a form that is suitable to be used in
-  # pkg-config (*.pc) files.
+macro(pkg_config_link_flags _link_flags_out _link_flags_in)
+  # Transform link flags into a form that is suitable to be used for
+  # output pkg-config (*.pc) files.
   # N.B. ${_link_flags_in} must be a string and not a list.

   #message("(original link flags) = ${_link_flags_in}")
@@ -138,4 +140,53 @@
     #message("(frameworks) ${_link_flags_out} = ${${_link_flags_out}}")
   endif(APPLE)

-endmacro(pc_transform_link_flags)
+endmacro(pkg_config_link_flags)
+
+macro(cmake_link_flags _link_flags_out _link_flags_in)
+  # Transform link flags delivered by pkg-config into the best form
+  # for CMake.
+  # N.B. ${_link_flags_in} must be a string and not a list.
+
+  #message("(original link flags) = ${_link_flags_in}")
+  # Convert link flags to a blank-delimited string.
+  string(REGEX REPLACE ";" " " ${_link_flags_out} "${_link_flags_in}")
+  #message("(blanks) ${_link_flags_out} = ${${_link_flags_out}}")
+
+  # Replace actual library names with the -LPATHNAME and -lLIBRARYNAME form
+  # since it appears pkg-config handles that latter form much better (with
+  # regard to keeping the correct order and eliminating duplicates).
+
+  # These REGEX REPLACE's won't actually replace anything on bare windows since
+  # library names are not of this form on that platform.  Something to be
+  # considered later if we decide to use pkg-config on bare windows.
+
+  # This logic will need to be expanded for Unix platforms other than
+  # Mac OS X and Linux.
+  if(APPLE)
+    set(suffix_list ".so" ".a" ".dylib")
+  else(APPLE)
+    set(suffix_list ".so" ".a")
+  endif(APPLE)
+
+  foreach(suffix ${suffix_list})
+    string(
+    REGEX REPLACE "(/[^ ]*)/lib([^ ]*)\\${suffix}" "-L\\1 -l\\2"
+    ${_link_flags_out}
+    "${${_link_flags_out}}"
+    )
+    #message("(${suffix}) ${_link_flags_out} = ${${_link_flags_out}}")
+  endforeach(suffix ${suffix_list})
+
+  if(APPLE)
+    # For Mac OS X transform frameworks information into correct form.
+    string(
+    REGEX REPLACE
+    "/System/Library/Frameworks/([^ ]*)\\.framework"
+    "-framework \\1"
+    ${_link_flags_out}
+    ${${_link_flags_out}}
+    )
+    #message("(frameworks) ${_link_flags_out} = ${${_link_flags_out}}")
+  endif(APPLE)
+
+endmacro(cmake_link_flags)


Add version support in FindZeroMQ.cmake to be compatible with file naming scheme in libzmq windows installer.

--- cmake_modules/FindZeroMQ.cmake
+++ cmake_modules/FindZeroMQ.cmake
@@ -4,8 +4,27 @@
 #  ZeroMQ_FOUND - system has libzmq
 #  ZeroMQ_INCLUDE_DIRS - the libzmq include directories
 #  ZeroMQ_LIBRARIES - link these to use libzmq
+#  ZeroMQ_VERSION - Version of ZeroMQ found

 include(LibFindMacros)
+
+macro(ZMQ_VERSION_LOOKUP ZMQ_HEADER_PATH ZMQ_VERSION_MAJOR ZMQ_VERSION_MINOR ZMQ_VERSION_PATCH ZMQ_VERSION)
+    # Version lookup using C header file
+    if(EXISTS "${ZMQ_HEADER_PATH}/zmq.h")
+      file(READ "${ZMQ_HEADER_PATH}/zmq.h" ZMQ_H_CONTENTS)
+      string(REGEX MATCH "#define ZMQ_VERSION_MAJOR ([0-9]+)" _dummy "${ZMQ_H_CONTENTS}")
+      set(${ZMQ_VERSION_MAJOR} "${CMAKE_MATCH_1}")
+      string(REGEX MATCH "#define ZMQ_VERSION_MINOR ([0-9]+)" _dummy "${ZMQ_H_CONTENTS}")
+      set(${ZMQ_VERSION_MINOR} "${CMAKE_MATCH_1}")
+      string(REGEX MATCH "#define ZMQ_VERSION_PATCH ([0-9]+)" _dummy "${ZMQ_H_CONTENTS}")
+      set(${ZMQ_VERSION_PATCH} "${CMAKE_MATCH_1}")
+      set(${ZMQ_VERSION} "${${ZMQ_VERSION_MAJOR}}.${${ZMQ_VERSION_MINOR}}.${${ZMQ_VERSION_PATCH}}")
+    endif()
+endmacro(ZMQ_VERSION_LOOKUP)
+
+if (NOT ZEROMQ_ROOT)
+  set (ZEROMQ_ROOT $ENV{ZEROMQ_ROOT})
+endif()

 IF (UNIX)
 	# Use pkg-config to get hints about paths
@@ -22,16 +41,53 @@
 	  NAMES zmq
 	  PATHS ${ZEROMQ_ROOT}/lib ${ZeroMQ_PKGCONF_LIBRARY_DIRS}
 	)
+
+    ZMQ_VERSION_LOOKUP(${ZeroMQ_INCLUDE_DIR} ZMQ_VERSION_MAJOR ZMQ_VERSION_MINOR ZMQ_VERSION_PATCH ZeroMQ_VERSION)
+
 ELSEIF (WIN32)
+
+    # Find C header file
 	find_path(ZeroMQ_INCLUDE_DIR
 	  NAMES zmq.hpp
 	  PATHS ${ZEROMQ_ROOT}/include ${CMAKE_INCLUDE_PATH}
 	)
-	# Finally the library itself
-	find_library(ZeroMQ_LIBRARY
-	  NAMES libzmq
-	  PATHS ${ZEROMQ_ROOT}/lib ${CMAKE_LIB_PATH}
-	)
+
+    ZMQ_VERSION_LOOKUP(${ZeroMQ_INCLUDE_DIR} ZMQ_VERSION_MAJOR ZMQ_VERSION_MINOR ZMQ_VERSION_PATCH ZeroMQ_VERSION)
+    set(ZeroMQ_LIB_VERSION "${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}")
+
+    if(MSVC_VERSION MATCHES "1700")
+      set(ZMQ_COMPILER_STRING "-v110")
+    elseif(MSVC10)
+      set(ZMQ_COMPILER_STRING "-v100")
+    elseif(MSVC90)
+      set(ZMQ_COMPILER_STRING "-v90")
+    else()
+      set(ZMQ_COMPILER_STRING "")
+    endif()
+
+    find_library(ZeroMQ_LIBRARY_RELEASE
+      NAMES libzmq libzmq${ZMQ_COMPILER_STRING}-mt-${ZeroMQ_LIB_VERSION}
+      PATHS ${ZEROMQ_ROOT}/lib ${CMAKE_LIB_PATH}
+    )
+
+    find_library(ZeroMQ_LIBRARY_DEBUG
+      NAMES libzmq${ZMQ_COMPILER_STRING}-mt-gd-${ZeroMQ_LIB_VERSION}
+      PATHS ${ZEROMQ_ROOT}/lib ${CMAKE_LIB_PATH}
+    )
+
+    if(ZeroMQ_LIBRARY_RELEASE AND ZeroMQ_LIBRARY_DEBUG)
+        set(ZeroMQ_LIBRARY
+          optimized ${ZeroMQ_LIBRARY_RELEASE}
+          debug ${ZeroMQ_LIBRARY_DEBUG}
+        )
+    else()
+        if(ZeroMQ_LIBRARY_RELEASE OR ZeroMQ_LIBRARY_DEBUG)
+            set(ZeroMQ_LIBRARY ${ZeroMQ_LIBRARY_RELEASE} ${ZeroMQ_LIBRARY_DEBUG}
+            )
+        endif()
+    endif()
+
+
 ENDIF()

 # Set the include dir variables and the libraries and let libfind_process do the rest.


SVN_SILENT made messages (.desktop file) - always resolve ours

In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -10,115 +10,5 @@
 InitialPreference=15

 Name=GStreamer
-Name[ast]=GStreamer
-Name[bg]=GStreamer
-Name[bs]=Gstreamer
-Name[ca]=GStreamer
-Name[ca@valencia]=GStreamer
-Name[cs]=GStreamer
-Name[da]=GStreamer
-Name[de]=GStreamer
-Name[el]=GStreamer
-Name[en_GB]=GStreamer
-Name[es]=GStreamer
-Name[et]=GStreamer
-Name[eu]=GStreamer
-Name[fa]=GStreamer
-Name[fi]=GStreamer
-Name[fr]=GStreamer
-Name[ga]=GStreamer
-Name[gl]=GStreamer
-Name[hsb]=GStreamer
-Name[hu]=GStreamer
-Name[id]=GStreamer
-Name[is]=GStreamer
-Name[it]=GStreamer
-Name[ja]=GStreamer
-Name[kk]=GStreamer
-Name[ko]=GStreamer
-Name[ku]=GStreamer
-Name[lt]=GStreamer
-Name[lv]=GStreamer
-Name[mai]=GStreamer
-Name[mr]=जी-स्ट्रीमर
-Name[nb]=GStreamer
-Name[nds]=GStreamer
-Name[nl]=GStreamer
-Name[nn]=GStreamer
-Name[pa]=ਜੀਸਟੀਰਮਰ
-Name[pl]=GStreamer
-Name[pt]=GStreamer
-Name[pt_BR]=GStreamer
-Name[ro]=GStreamer
-Name[ru]=GStreamer
-Name[se]=GStreamer
-Name[sk]=GStreamer
-Name[sl]=GStreamer
-Name[sr]=Гстример
-Name[sr@ijekavian]=Гстример
-Name[sr@ijekavianlatin]=GStreamer
-Name[sr@latin]=GStreamer
-Name[sv]=Gstreamer
-Name[th]=GStreamer
-Name[tr]=GStreamer
-Name[ug]=GStreamer
-Name[uk]=GStreamer
-Name[x-test]=xxGStreamerxx
-Name[zh_CN]=GStreamer
-Name[zh_TW]=GStreamer

 Comment=Phonon GStreamer backend
-Comment[bg]=Phonon GStreamer
-Comment[bs]=Gstreamer kao pozadina Phonona
-Comment[ca]=Dorsal GStreamer del Phonon
-Comment[ca@valencia]=Dorsal GStreamer del Phonon
-Comment[cs]=Podpůrná vrstva GStreamer pro Phonon
-Comment[da]=GStreamer-backend til Phonon
-Comment[de]=Phonon-Treiber für GStreamer
-Comment[el]=Σύστημα υποστήριξης GStreamer του Phonon
-Comment[en_GB]=Phonon GStreamer backend
-Comment[es]=Motor GStreamer para Phonon
-Comment[et]=Phononi GStreameri taustaprogramm
-Comment[eu]=Phonon-en GStreamer bizkarraldekoa
-Comment[fa]=پسانه‌ی جی‌استریمر برای فنون (Phonon GStreamer backend)
-Comment[fi]=Phonon GStreamer -taustajärjestelmä
-Comment[fr]=Moteur GStreamer pour Phonon
-Comment[ga]=Inneall GStreamer le haghaidh Phonon
-Comment[gl]=Infraestrutura de GStreamer para Phonon
-Comment[hsb]=Phonon GStreamer backend
-Comment[hu]=Phonon GStreamer-modul
-Comment[id]=Backend phonon GStreamer
-Comment[is]=Phonon GStreamer bakendi
-Comment[it]=Motore Gstreamer di Phonon
-Comment[ja]=Phonon GStreamer バックエンド
-Comment[kk]=Phonon GStreamer тетігі
-Comment[ko]=Phonon GStreamer 백엔드
-Comment[ku]=Binesaza Phonon GStreamer
-Comment[lt]=Phonon GStreamer galinė sąsaja
-Comment[lv]=Phonon GStreamer aizmugure
-Comment[mr]=फोनॉन जी-स्ट्रीमर बॅकएन्ड
-Comment[nb]=Phonon-motor for GStreamer
-Comment[nds]=GStreamer-Hülpprogramm för Phonon
-Comment[nl]=GStreamer-backend (Phonon)
-Comment[nn]=Phonon-motor for GStreamer
-Comment[pa]=ਫੋਨੋਨ ਜਸਟੀਰਮਰ ਬੈਕਐਂਡ
-Comment[pl]=Obsługa GStreamera przez Phonon
-Comment[pt]=Infra-estrutura do GStreamer para o Phonon
-Comment[pt_BR]=Infraestrutura do GStreamer para o Phonon
-Comment[ro]=Suportul GStreamer pentru Phonon
-Comment[ru]=Механизм GStreamer для Phonon
-Comment[se]=Phonon GStreamer duogášmohtor
-Comment[sk]=Podsystém Phonon GStreamer
-Comment[sl]=Zaledje GStreamer za Phonon
-Comment[sr]=Гстример као позадина Фонона
-Comment[sr@ijekavian]=Гстример као позадина Фонона
-Comment[sr@ijekavianlatin]=GStreamer kao pozadina Phonona
-Comment[sr@latin]=GStreamer kao pozadina Phonona
-Comment[sv]=Phonon Gstreamer-gränssnitt
-Comment[th]=โปรแกรมเบื้องหลัง GStreamer ของ Phonon
-Comment[tr]=Phonon GStreamer arka ucu
-Comment[ug]=Phonon GStreamer نىڭ ئارقائۇچى
-Comment[uk]=Модуль використання GStreamer у Phonon
-Comment[x-test]=xxPhonon GStreamer backendxx
-Comment[zh_CN]=Phonon GStreamer 后端
-Comment[zh_TW]=Phonon GStreamer 後端介面


Be gentle to user provided BSON include path and only modify if really found by cmake script

--- build/cmake/FindBSON.cmake
+++ build/cmake/FindBSON.cmake
@@ -19,7 +19,9 @@
     include
 )

+if(${BSON_INCLUDE_DIR})
 set(BSON_INCLUDE_DIR "${BSON_INCLUDE_DIR}/libbson-1.0")
+endif()

 if(WIN32 AND NOT CYGWIN)
   if(MSVC)


build: fix x86 for CompCert

build: fix x86 for CompCert

--- build/cmake/arch-x86.cmake
+++ build/cmake/arch-x86.cmake
@@ -6,9 +6,9 @@
   -DARCH_X86
 )

-if(ENABLE_X64)
+if(ENABLE_X64 AND NOT COMPCERT)
   cflags(-m64)
-else()
+elseif(NOT COMPCERT)
   cflags(-m32)
 endif()


Backup.

Backup.

--- system_definitions.cmake
+++ system_definitions.cmake
@@ -14,7 +14,7 @@
 # limitations under the License.
 #

-#cmake_policy(SET CMP0022 OLD)
+cmake_policy(SET CMP0022 NEW)

 ##
 # This file is the system level counterpart to the component_definitions file


extend ctest_ext_build

extend ctest_ext_build

add posibility to build several targets in one call

--- ctest_ext.cmake
+++ ctest_ext.cmake
@@ -28,7 +28,7 @@
     return()
 endif()
 set(CTEST_EXT_INCLUDED TRUE)
-set(CTEST_EXT_VERSION  0.1)
+set(CTEST_EXT_VERSION  0.2)

 include(CMakeParseArguments)

@@ -306,9 +306,6 @@
     ctest_note("CTEST_CMAKE_GENERATOR                 : ${CTEST_CMAKE_GENERATOR}")
     ctest_note("CTEST_CONFIGURATION_TYPE              : ${CTEST_CONFIGURATION_TYPE}")
     ctest_note("CTEST_CMAKE_OPTIONS                   : ${CTEST_CMAKE_OPTIONS}")
-    ctest_note("")
-
-    ctest_note("CTEST_BUILD_TARGET                    : ${CTEST_BUILD_TARGET}")
     ctest_note("CTEST_BUILD_FLAGS                     : ${CTEST_BUILD_FLAGS}")
     ctest_note("")

@@ -514,12 +511,50 @@
 #

 function(ctest_ext_build)
+    set(options "")
+    set(oneValueArgs "TARGET")
+    set(multiValueArgs "TARGETS")
+    cmake_parse_arguments(BUILD "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+
     if(CTEST_STAGE MATCHES "Build")
         ctest_info("==========================================================================")
         ctest_info("Build")
         ctest_info("==========================================================================")

-        ctest_build()
+        if(BUILD_TARGET)
+            ctest_info("Build target : ${BUILD_TARGET}")
+            ctest_build(TARGET "${BUILD_TARGET}")
+        elseif(BUILD_TARGETS)
+            ctest_info("Build targets : ${BUILD_TARGETS}")
+
+            # ctest_build doesn't support multiple target, emulate them with CMake script
+            set(BUILD_SCRIPT "${CTEST_BINARY_DIRECTORY}/ctest_ext_build.cmake")
+            file(REMOVE "${BUILD_SCRIPT}")
+
+            foreach(target ${BUILD_TARGETS})
+                file(APPEND "${BUILD_SCRIPT}" "message(STATUS \"Build target : ${target}\") \n")
+
+                set(BUILD_COMMAND "execute_process(COMMAND \"${CMAKE_COMMAND}\"")
+                set(BUILD_COMMAND "${BUILD_COMMAND} --build \"${CTEST_BINARY_DIRECTORY}\"")
+                if(NOT target MATCHES "^(all|ALL)$")
+                    set(BUILD_COMMAND "${BUILD_COMMAND} --target \"${target}\"")
+                endif()
+                set(BUILD_COMMAND "${BUILD_COMMAND} --config \"${CTEST_CONFIGURATION_TYPE}\"")
+                if(CTEST_BUILD_FLAGS)
+                    set(BUILD_COMMAND "${BUILD_COMMAND} -- ${CTEST_BUILD_FLAGS}")
+                endif()
+
+                set(BUILD_COMMAND "${BUILD_COMMAND} WORKING_DIRECTORY \"${CTEST_BINARY_DIRECTORY}\")")
+
+                file(APPEND "${BUILD_SCRIPT}" "${BUILD_COMMAND} \n")
+            endforeach()
+
+            set(CTEST_BUILD_COMMAND "${CMAKE_COMMAND} -P ${BUILD_SCRIPT}")
+            ctest_build()
+        else()
+            ctest_info("Build target : ALL")
+            ctest_build()
+        endif()
     endif()
 endfunction()


ARROW-17034: [C++] Enable compiler caching for ThirdpartyToolchain.cmake (#13562)

@kou as requested in #13556 :)

Authored-by: Jacob Wujciak-Jens <f862f167b85d41b225785c70d70808bc7337c1fe@wujciak.de>
Signed-off-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -757,6 +757,13 @@
     -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=${CMAKE_EXPORT_NO_PACKAGE_REGISTRY}
     -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=${CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY}
     -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE_MAKEFILE})
+
+# Enable s/ccache if set by parent.
+if(CMAKE_C_COMPILER_LAUNCHER AND CMAKE_CXX_COMPILER_LAUNCHER)
+  list(APPEND EP_COMMON_CMAKE_ARGS
+       -DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}
+       -DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER})
+endif()

 if(NOT ARROW_VERBOSE_THIRDPARTY_BUILD)
   set(EP_LOG_OPTIONS


cmake: Enable creation of the compile command database by default.

(cherry picked from commit 437a39c7988ae157e2171f57d8c0cfdcc99584f6)

--- cmake/Modules/DefineCMakeDefaults.cmake
+++ cmake/Modules/DefineCMakeDefaults.cmake
@@ -25,3 +25,6 @@
       "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
   )
 endif (NOT CMAKE_BUILD_TYPE)
+
+# Create the compile command database for clang by default
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON)


forgot to add CURRENT_WORKSPACE definition to the windows branch.

--- cmake/catkin_generate_environment.cmake
+++ cmake/catkin_generate_environment.cmake
@@ -25,6 +25,7 @@
     configure_file(${catkin_EXTRAS_DIR}/templates/env.bat.in
       ${catkin_BUILD_PREFIX}/env.bat)
     # generate setup
+    set(CURRENT_WORKSPACE ${catkin_BUILD_PREFIX};${CMAKE_SOURCE_DIR})
     em_expand(${catkin_EXTRAS_DIR}/templates/setup.context.py.in
       ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/setup.buildspace.context.py
       ${catkin_EXTRAS_DIR}/em/setup.bat.em


update to flatbuffer master

update to flatbuffer master

--- cmake/external/FindFlatBuffersLib.cmake
+++ cmake/external/FindFlatBuffersLib.cmake
@@ -3,7 +3,7 @@

 # Try to find the library, if it is installed!
 # otherwise download it
-set(URL "https://github.com/gabyx/flatbuffers.git")
+set(URL "https://github.com/google/flatbuffers.git")
 set(INSTALL_DIR "${ExecutionGraph_EXTERNAL_INSTALL_DIR}/flatbuffers")

 message(STATUS "flatbuffers library finding ...")
@@ -19,7 +19,7 @@

         ExternalProject_Add(flatbuffers
                             GIT_REPOSITORY      "${URL}"
-                            GIT_TAG             "feature/keep-include-path-js-2"
+                            GIT_TAG             "master"
                             GIT_SHALLOW         ON
                             PREFIX              "${ExecutionGraph_EXTERNAL_BUILD_DIR}/flatbuffers"
                             TIMEOUT 10


disable W4201 caused by GLM

disable W4201 caused by GLM

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -73,7 +73,7 @@

         /wd4251       # -> disable warning: 'identifier': class 'type' needs to have dll-interface to be used by clients of class 'type2'
         /wd4592       # -> disable warning: 'identifier': symbol will be dynamically initialized (implementation limitation)
-        # /wd4201     # -> disable warning: nonstandard extension used: nameless struct/union (caused by GLM)
+        /wd4201       # -> disable warning: nonstandard extension used: nameless struct/union (caused by GLM)
         # /wd4127     # -> disable warning: conditional expression is constant (caused by Qt)

         $<$<CONFIG:Debug>:


CMake: clang lto: enable other vtable-related opts.

Tests pass, perf change within noise, mostly.

--- cmake/compiler-flags.cmake
+++ cmake/compiler-flags.cmake
@@ -70,7 +70,7 @@
 if(RAWSPEED_ENABLE_LTO)
   if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
     include(llvm-toolchain)
-    set(lto_compile "-flto=thin")
+    set(lto_compile "-flto=thin -fforce-emit-vtables -fwhole-program-vtables -fstrict-vtable-pointers")
     set(lto_link "-flto=thin -fuse-ld=\"${LLVMLLD_EXECUTABLE}\" ${LLVMLLD_INCREMENTAL_LDFLAGS}")
   elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
     include(gcc-toolchain)


Add full path to gtest for build via ninja (#3882)

--- cmake/external_gtest.cmake
+++ cmake/external_gtest.cmake
@@ -60,6 +60,8 @@
         ${GTEST_CMAKE_ARGS}
     BINARY_DIR "${EXTERNAL_PROJECTS_ROOT}/gtest/build"
     EXCLUDE_FROM_ALL TRUE
+    BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/ngraph/gtest/build/googlemock/gtest/libgtest.a
+    BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/ngraph/gtest/build/googlemock/libgmock.a
     )

 #------------------------------------------------------------------------------


pass critical cmake variables to child process cmake

For downloading external third party libraries, our cmake system
runs a child process cmake command to configure/build external libraries.
For Android/Windows combination, a specific cmake configuration is used
using a toolchain from the android ndk and it's own distinct make program.
We want to ensure that these values are passed to the child cmake too.

--- cmake/external_rules.cmake
+++ cmake/external_rules.cmake
@@ -63,7 +63,9 @@

   execute_process(
     COMMAND
-      ${ENV_COMMAND} cmake
+      ${ENV_COMMAND} ${CMAKE_COMMAND}
+      -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
+      -DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
       -DCMAKE_INSTALL_PREFIX=${FIREBASE_INSTALL_DIR}
       -DFIREBASE_DOWNLOAD_DIR=${FIREBASE_DOWNLOAD_DIR}
       -DFIREBASE_EXTERNAL_PLATFORM=${external_platform}
@@ -88,7 +90,7 @@
   endif()

   execute_process(
-    COMMAND ${ENV_COMMAND} cmake --build . -- ${cmake_build_args}
+    COMMAND ${ENV_COMMAND} ${CMAKE_COMMAND} --build . -- ${cmake_build_args}
     OUTPUT_FILE ${PROJECT_BINARY_DIR}/external/output_cmake_build.txt
     WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/external
   )


Make build system fall back to matwrapped  Octave bindings if swig is
not available.

svn path=/trunk/; revision=11488

--- cmake/modules/octave.cmake
+++ cmake/modules/octave.cmake
@@ -264,4 +264,10 @@
     set(DEFINE_PL_DOUBLE "#define PL_DOUBLE")
   endif(PL_DOUBLE)
   option(ENABLE_swig_octave "Enable Octave bindings generated by SWIG" ON)
-endif(ENABLE_octave)
+  if(NOT SWIG_FOUND AND ENABLE_swig_octave)
+    message(STATUS "WARNING: "
+      "SWIG not found. Falling back to deprecated matwrapped octave bindings.")
+    set(ENABLE_swig_octave OFF CACHE BOOL "Enable Octave bindings generated by SWIG" FORCE)
+  endif(NOT SWIG_FOUND AND ENABLE_swig_octave)
+
+endif(ENABLE_octave)


removed serialization until we have it in the binaries too - will add separately to each module that needs it for now

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@3442 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -12,7 +12,7 @@
 endif(${CMAKE_VERSION} VERSION_LESS 2.8.5)

 #find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time iostreams serialization mpi)
-find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time iostreams serialization)
+find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time iostreams)

 if(Boost_FOUND)
   set(BOOST_FOUND TRUE)


Changed boost version from 1.42 back to 1.40

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@711 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -4,7 +4,7 @@
     set(Boost_USE_STATIC_LIBS ON)
 endif(NOT PCL_SHARED_LIBS)

-find_package(Boost 1.42.0 COMPONENTS system filesystem thread date_time)
+find_package(Boost 1.40.0 COMPONENTS system filesystem thread date_time)

 include_directories(${Boost_INCLUDE_DIRS})
 link_directories(${Boost_LIBRARY_DIRS})


uselib: a bad example is worst than no example!

--- cmake/qibuild/uselib.cmake
+++ cmake/qibuild/uselib.cmake
@@ -7,7 +7,6 @@
 # qi_use_lib handles dependencies between projects.
 # It will call find_package for you, then do all the include_directories
 # and target_link_libraries that are needed.
-# \example:uselib
 #

 if (_QI_USELIB_CMAKE_)


cmake: Fix glop build

cmake: Fix glop build


Change invalid ThyraTpetraWrappers with ThyraTpetraAdapters

I am not sure how this was able to configure in other contexts.

--- packages/PointCloud/cmake/Dependencies.cmake
+++ packages/PointCloud/cmake/Dependencies.cmake
@@ -6,7 +6,7 @@
   AztecOO
   Belos
   ThyraCore
-  ThyraTpetraWrappers
+  ThyraTpetraAdapters
   Stratimikos
  )


Set correct boost paths in MITK_Boost_Config.cmake

When this file is processed, CMAKE_BINARY_DIR is MITK-build.

--- CMake/PackageDepends/MITK_Boost_Config.cmake
+++ CMake/PackageDepends/MITK_Boost_Config.cmake
@@ -10,8 +10,8 @@

   if(MITK_USE_Boost_LIBRARIES)
     if(NOT MITK_USE_SYSTEM_Boost)
-      set(BOOST_INCLUDEDIR ${CMAKE_BINARY_DIR}/Boost-install/include/boost-1_54)
-      set(BOOST_LIBRARYDIR ${CMAKE_BINARY_DIR}/Boost-install/lib)
+      set(BOOST_INCLUDEDIR ${CMAKE_BINARY_DIR}/../Boost-install/include/boost-1_54)
+      set(BOOST_LIBRARYDIR ${CMAKE_BINARY_DIR}/../Boost-install/lib)
     endif()
     find_package(Boost 1.54.0 REQUIRED COMPONENTS ${MITK_USE_Boost_LIBRARIES})
   else()


In template dashboard script, remove extra "-" added in build name

--- CMake/VisomicsDashboardScript.TEMPLATE.cmake
+++ CMake/VisomicsDashboardScript.TEMPLATE.cmake
@@ -167,7 +167,7 @@
 # Project specific properties
 #
 set(CTEST_PROJECT_NAME "Visomics")
-set(CTEST_BUILD_NAME "${MY_OPERATING_SYSTEM}-${MY_COMPILER}-Qt${MY_QT_VERSION}-R${MY_R_VERSION}-${BUILD_OPTIONS_STRING}-${CTEST_BUILD_CONFIGURATION}")
+set(CTEST_BUILD_NAME "${MY_OPERATING_SYSTEM}-${MY_COMPILER}-Qt${MY_QT_VERSION}-R${MY_R_VERSION}${BUILD_OPTIONS_STRING}-${CTEST_BUILD_CONFIGURATION}")

 #
 # Display build info


Remove obsolete command

Remove obsolete command

git-svn-id: a0a066a1d7ce87c7a04dae20f169ad0cd8bda35d@1140 04231f92-3938-0410-9931-e931ac552b4f

--- CMakeModules/GenerateVersionInfoHeader.cmake
+++ CMakeModules/GenerateVersionInfoHeader.cmake
@@ -9,7 +9,6 @@
 # Remember this for the make install target
 SET(VIRVO_VERSIONINFO_ABS_H
   ${VIRVO_VERSIONINFO_DIR}/${VIRVO_VERSIONINFO_H}
-  CACHE INTERNAL ""
 )

 IF(WIN32)


Update the ParaView SHA

Update the ParaView SHA

--- versions.cmake
+++ versions.cmake
@@ -92,7 +92,7 @@
   set(_paraview_revision "master")
 else()
   # Test the revision with OpenGL2 rendering before updating, update often!
-  set(_paraview_revision "f33574399b79f32bd733a9d9cba8e4e86f872cbf")
+  set(_paraview_revision "93b0c76e4b4b427f0db2b0eba416b20e334b9e66")
 endif()
 add_revision(paraview
   GIT_REPOSITORY "https://gitlab.kitware.com/paraview/paraview.git"


add bot_core and robotlocomotion lcmtypes to the superbuild

--- distro/superbuild/cmake/externals.cmake
+++ distro/superbuild/cmake/externals.cmake
@@ -94,6 +94,31 @@
     )

   set(lcm_depends lcm)
+
+
+  ExternalProject_Add(bot_core_lcmtypes
+    GIT_REPOSITORY https://github.com/openhumanoids/bot_core_lcmtypes
+    GIT_TAG 9967654
+    CMAKE_CACHE_ARGS
+      ${default_cmake_args}
+      ${python_args}
+
+    DEPENDS
+      ${lcm_depends}
+    )
+
+  ExternalProject_Add(robotlocomotion-lcmtypes
+    GIT_REPOSITORY https://github.com/robotlocomotion/lcmtypes
+    GIT_TAG b9ce3fa
+    CMAKE_CACHE_ARGS
+      ${default_cmake_args}
+      ${python_args}
+
+    DEPENDS
+      ${lcm_depends} bot_core_lcmtypes
+    )
+
+    list(APPEND lcm_depends bot_core_lcmtypes robotlocomotion-lcmtypes)

 endif()


Get Blosc from patched mirror

Get Blosc from patched mirror

--- deps/Blosc/Blosc.cmake
+++ deps/Blosc/Blosc.cmake
@@ -7,14 +7,13 @@
 endif()

 prusaslicer_add_cmake_project(Blosc
-    # GIT_REPOSITORY https://github.com/Blosc/c-blosc.git
-    # GIT_TAG e63775855294b50820ef44d1b157f4de1cc38d3e #v1.17.0
-    URL https://github.com/Blosc/c-blosc/archive/refs/tags/v1.17.0.zip
-    URL_HASH SHA256=7463a1df566704f212263312717ab2c36b45d45cba6cd0dccebf91b2cc4b4da9
+    #URL https://github.com/Blosc/c-blosc/archive/refs/tags/v1.17.0.zip
+    #URL_HASH SHA256=7463a1df566704f212263312717ab2c36b45d45cba6cd0dccebf91b2cc4b4da9
+    URL https://github.com/tamasmeszaros/c-blosc/archive/refs/heads/v1.17.0_tm.zip
+    URL_HASH SHA256=b69a0f8a66e420b3b57e159cc56e3ced803d5de8dbe35dcebb4c54671fdc2e7a
     DEPENDS ${ZLIB_PKG}
-    PATCH_COMMAND       #${GIT_EXECUTABLE} reset --hard && ${GIT_EXECUTABLE} clean -df &&
-                        #${GIT_EXECUTABLE} apply --whitespace=nowarn ${CMAKE_CURRENT_LIST_DIR}/blosc-mods.patch
-                        ${GIT_EXECUTABLE} apply --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/blosc-mods.patch
+    # Patching upstream does not work this way with git version 2.28 installed on mac worker
+    # PATCH_COMMAND  ${GIT_EXECUTABLE} apply --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/blosc-mods.patch
     CMAKE_ARGS
         -DCMAKE_POSITION_INDEPENDENT_CODE=ON
         -DBUILD_SHARED=${_build_shared}


Update compiler.cmake

Update compiler.cmake


update for osx build

update for osx build

--- external/InitializeExternalComponents.cmake
+++ external/InitializeExternalComponents.cmake
@@ -86,6 +86,43 @@
         include_directories(${unistd_h_SOURCE_DIR})
     endif()
 else()
+    if(APPLE)
+        find_program(MAC_HBREW_BIN brew)
+
+        if (MAC_HBREW_BIN)
+            execute_process(COMMAND ${MAC_HBREW_BIN} "--prefix" OUTPUT_VARIABLE BREW_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
+            list(INSERT CMAKE_PREFIX_PATH 0 ${BREW_PREFIX})
+        endif ()
+
+        execute_process(
+            COMMAND ${MAC_HBREW_BIN} --prefix bison
+            RESULT_VARIABLE BREW_BISON
+            OUTPUT_VARIABLE BREW_BISON_PREFIX
+            OUTPUT_STRIP_TRAILING_WHITESPACE
+        )
+        if(BREW_BISON EQUAL 0 AND EXISTS "${BREW_BISON_PREFIX}")
+            message(STATUS "Found Bison keg installed by Homebrew at ${BREW_BISON_PREFIX}")
+            set(BISON_EXECUTABLE "${BREW_BISON_PREFIX}/bin/bison")
+            list(INSERT CMAKE_PREFIX_PATH 0 "${BREW_BISON_PREFIX}")
+        else()
+            message(FATAL_ERROR "Cannot find bison from homebrew.")
+        endif()
+
+        execute_process(
+            COMMAND ${MAC_HBREW_BIN} --prefix flex
+            RESULT_VARIABLE BREW_FLEX
+            OUTPUT_VARIABLE BREW_FLEX_PREFIX
+            OUTPUT_STRIP_TRAILING_WHITESPACE
+        )
+        if(BREW_FLEX EQUAL 0 AND EXISTS "${BREW_FLEX_PREFIX}")
+            message(STATUS "Found Flex keg installed by Homebrew at ${BREW_FLEX_PREFIX}")
+            set(FLEX_EXECUTABLE "${BREW_FLEX_PREFIX}/bin/flex")
+            list(INSERT CMAKE_PREFIX_PATH 0 "${BREW_FLEX_PREFIX}")
+        else()
+            message(FATAL_ERROR "Cannot find flex from homebrew.")
+        endif()
+    endif()
+
     find_package(BISON REQUIRED)
     find_package(FLEX REQUIRED)
 endif()


restored all elements to compilation

restored all elements to compilation

--- src/cmake/sources.cmake
+++ src/cmake/sources.cmake
@@ -9,16 +9,16 @@
     But
     But/detail
     But/Container
-#    But/Format
-#    But/Format/detail
-#    But/Log
+    But/Format
+    But/Format/detail
+    But/Log
     But/Log/Backend
     But/Log/Backend/detail
-#    But/Log/Destination
-#    But/Log/Destination/Common
-#    But/Log/Destination/detail
-#    But/Log/Field
-#    But/Log/Localization
+    But/Log/Destination
+    But/Log/Destination/Common
+    But/Log/Destination/detail
+    But/Log/Field
+    But/Log/Localization
     But/Mpl
     But/Mpl/detail
     But/System


ADD possiblite to define externaly CTEST_SITE using
ctest  -S openVibeTests.cmake,Model
-DCTEST_SITE="your site name"

git-svn-id: 8b72b58fb31a931b6e9a2bd3bb08bc6614045fb1@3539 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- test/openVibeTests.cmake
+++ test/openVibeTests.cmake
@@ -13,8 +13,9 @@
 ## --------------------------
 find_program(HOSTNAME_CMD NAMES hostname)
 exec_program(${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)
-
-set(CTEST_SITE                          "${HOSTNAME}")
+IF(NOT DEFINED CTEST_SITE)
+	SET(CTEST_SITE                          "${HOSTNAME}")
+ENDIF(NOT DEFINED CTEST_SITE)

 ## -- Set site / build name
 ## --------------------------


Add CTEST_GIT_URL variable to allow change of git URL (if gforge.inria.Fr has downtime)

--- test/openVibeTests.cmake
+++ test/openVibeTests.cmake
@@ -16,6 +16,12 @@
 IF(NOT DEFINED CTEST_SITE)
 	SET(CTEST_SITE                          "${HOSTNAME}")
 ENDIF(NOT DEFINED CTEST_SITE)
+
+# SET GIT parameters
+
+IF(NOT DEFINED CTEST_GIT_URL)
+	SET(CTEST_GIT_URL                          "git://scm.gforge.inria.fr/openvibe/openvibe.git")
+ENDIF(NOT DEFINED CTEST_BRANCH)

 IF(NOT DEFINED CTEST_BRANCH)
 	SET(CTEST_BRANCH                          "master")
@@ -87,7 +93,7 @@

 ## -- Checkout command
 if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
-	set(CTEST_CHECKOUT_COMMAND     "${CTEST_GIT_COMMAND} clone -b ${CTEST_BRANCH} git://scm.gforge.inria.fr/openvibe/openvibe.git ${CTEST_SOURCE_DIRECTORY}")
+	set(CTEST_CHECKOUT_COMMAND     "${CTEST_GIT_COMMAND} clone -b ${CTEST_BRANCH} ${CTEST_GIT_URL} ${CTEST_SOURCE_DIRECTORY}")
 endif(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")

 ## -- Update Command


xc7: cmake: add calculate_average_switch func to warning ignore list

This is to avoid VPR printing out tons of warnings related to
Inconsistent buffering of rr nodes

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

--- xc/common/cmake/arch_define.cmake
+++ xc/common/cmake/arch_define.cmake
@@ -74,7 +74,7 @@
       --bb_factor 10 \
       --initial_pres_fac 4.0 \
       --check_rr_graph off \
-      --suppress_warnings \${OUT_NOISY_WARNINGS},sum_pin_class:check_unbuffered_edges:load_rr_indexed_data_T_values:check_rr_node:trans_per_R:check_route:set_rr_graph_tool_comment"
+      --suppress_warnings \${OUT_NOISY_WARNINGS},sum_pin_class:check_unbuffered_edges:load_rr_indexed_data_T_values:check_rr_node:trans_per_R:check_route:set_rr_graph_tool_comment:calculate_average_switch"
       )

   set(YOSYS_CELLS_SIM ${YOSYS_DATADIR}/xilinx/cells_sim.v)


Change filename in CMakeLists.txt file to match previous commits changes.

--- tests/parser/tests.cmake
+++ tests/parser/tests.cmake
@@ -11,7 +11,7 @@
 # Using absolute path relative to this file
 set(${CURRENT_TEST}_SRCS
   ${CMAKE_CURRENT_LIST_DIR}/parser.cpp
-  ${CMAKE_CURRENT_LIST_DIR}/file-parser.cpp
+  ${CMAKE_CURRENT_LIST_DIR}/file_parser.cpp
 )
 #set(${CURRENT_TEST}_HDRS
 #  ${CMAKE_CURRENT_LIST_DIR}/<test_header_files.h>


cmake: fix find process for InferenceEngine extra libraries


Split off 8.0.42

Split off 8.0.42

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

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


Split off 8.0.18

Split off 8.0.18

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

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


Split off 7.12.24

Split off 7.12.24

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

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


Split off 7.12.94

Split off 7.12.94

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

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


Split off 7.8.30

Split off 7.8.30

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

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


Make clangcheck target Superproject capable

--- clangcheckTargets.cmake
+++ clangcheckTargets.cmake
@@ -16,8 +16,10 @@
 endif()

 if(NOT CLANGCHECK)
-  add_custom_target(clangcheck COMMENT "clang-check executable not found")
-  set_target_properties(clangcheck PROPERTIES EXCLUDE_FROM_ALL TRUE)
+  if(NOT TARGET clangcheck)
+    add_custom_target(clangcheck COMMENT "clang-check executable not found")
+    set_target_properties(clangcheck PROPERTIES EXCLUDE_FROM_ALL TRUE)
+  endif()
 endif()

 if(NOT TARGET clangcheck)


updates

updates

--- cmake/CheckGitDep.cmake
+++ cmake/CheckGitDep.cmake
@@ -5,7 +5,7 @@
 ##
 # LIST MODULES HERE
 ##
-set( GIT_MODULES cmdargs )
+set( GIT_MODULES cmdargs shm )
 ##
 # NOW CHECK THEM OUT
 ##


make that stuff actually useful

make that stuff actually useful

--- cmake/FindGObject.cmake
+++ cmake/FindGObject.cmake
@@ -29,7 +29,7 @@
    PATHS
    ${PKG_GOBJECT2_INCLUDE_DIRS}
    /usr/include/glib-2.0/
-   #PATH_SUFFIXES gst
+   PATH_SUFFIXES glib-2.0
    )

 FIND_LIBRARY(_GObjectLibs NAMES gobject-2.0
@@ -49,7 +49,11 @@
    ${PKG_GOBJECT2_LIBRARY_DIRS}
    )

-SET( GOBJECT_LIBRARIES ${PKG_GOBJECT2_LIBRARIES} )
+IF (WIN32)
+SET (GOBJECT_LIBRARIES ${_GObjectLibs} ${_GModuleLibs} ${_GThreadLibs} ${_GLibs})
+ELSE (WIN32)
+SET (GOBJECT_LIBRARIES ${PKG_GOBJECT2_LIBRARIES})
+ENDIF (WIN32)

 IF (GOBJECT_INCLUDE_DIR AND GOBJECT_LIBRARIES)
    SET(GOBJECT_FOUND TRUE)


bug fix

bug fix

--- cmake/FindJSONCPP.cmake
+++ cmake/FindJSONCPP.cmake
@@ -48,47 +48,51 @@
                              DOC "Path to jsoncpp library"
                              PATHS ${JSONCPP_LIB_DEFAULT_PATH})

-if (DEFINED ${JSONCPP_INCLUDE_DIR} AND DEFINED ${JSONCPP_LIBRARY})
+if (DEFINED JSONCPP_INCLUDE_DIR AND DEFINED JSONCPP_LIBRARY)
   message("JSONCPP found")
   set (JSONCPP_FOUND TRUE)
 else()
-  message("JSONCPP not found -- will be downloaded and compiled during build")
+  message("JSONCPP not found")
+  option (JSONCPP_DOWNLOAD "Automatic download and build jsoncpp as part of build process" OFF)
 endif ()

 if (JSONCPP_FOUND)
   set(JSONCPP_LIBRARIES ${JSONCPP_LIBRARY})
   set(JSONCPP_INCLUDE_DIR ${JSONCPP_INCLUDE_DIR})# PARENT_SCOPE)
 else ()
-  # if not found, try downloading and building JSON automatically
-  include (ExternalProject)
-  set (JSONCPP_SVN_REPOSITORY svn://svn.code.sf.net/p/jsoncpp/code/trunk/jsoncpp)
-  set (JSONCPP_SVN_REVISION 276)
-  ExternalProject_Add (jsoncppExternal
-                       PREFIX casrosJSON
-                       SVN_REPOSITORY ${JSONCPP_SVN_REPOSITORY}
-                       SVN_REVISION   -r ${JSONCPP_SVN_REVISION}
-                       CMAKE_CACHE_ARGS -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
-                                        -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-                                        -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-                                        -DOPTION_BUILD_EXAMPLES:BOOL=OFF
-                                        -DJSONCPP_WITH_TESTS:BOOL=OFF
-                                        -DJSONCPP_LIB_BUILD_SHARED:BOOL=ON
-                                        -DJSONCPP_WITH_POST_BUILD_UNITTEST:BOOL=OFF
-                                        -DCMAKE_INSTALL_PREFIX:FILEPATH=${SF_BUILD_ROOT}/external/json
-                       INSTALL_DIR ${SF_BUILD_ROOT}/external/json
-                       )
-
-  # Set all JSON variables based on install directory
-  set (JSONCPP_INCLUDE_DIR "${SF_BUILD_ROOT}/external/json/include")
-  set (JSONCPP_INCLUDE_DIR ${JSONCPP_INCLUDE_DIR} PARENT_SCOPE)
+  if (JSONCPP_DOWNLOAD)
+    message("JSONCPP will be downloaded and compiled during build")
+    # if not found, try downloading and building JSON automatically
+    include (ExternalProject)
+    set (JSONCPP_SVN_REPOSITORY svn://svn.code.sf.net/p/jsoncpp/code/trunk/jsoncpp)
+    set (JSONCPP_SVN_REVISION 276)
+    ExternalProject_Add (jsoncppExternal
+                        PREFIX casrosJSON
+                        SVN_REPOSITORY ${JSONCPP_SVN_REPOSITORY}
+                        SVN_REVISION   -r ${JSONCPP_SVN_REVISION}
+                        CMAKE_CACHE_ARGS -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
+                                          -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+                                          -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
+                                          -DOPTION_BUILD_EXAMPLES:BOOL=OFF
+                                          -DJSONCPP_WITH_TESTS:BOOL=OFF
+                                          -DJSONCPP_LIB_BUILD_SHARED:BOOL=ON
+                                          -DJSONCPP_WITH_POST_BUILD_UNITTEST:BOOL=OFF
+                                          -DCMAKE_INSTALL_PREFIX:FILEPATH=${SF_BUILD_ROOT}/external/json
+                        INSTALL_DIR ${SF_BUILD_ROOT}/external/json
+                        )
+
+    # Set all JSON variables based on install directory
+    set (JSONCPP_INCLUDE_DIR "${SF_BUILD_ROOT}/external/json/include")
+    set (JSONCPP_INCLUDE_DIR ${JSONCPP_INCLUDE_DIR} PARENT_SCOPE)

-  set (JSONCPP_LIBRARY_DIRS "${SF_BUILD_ROOT}/external/json/lib")
-  set (JSONCPP_LIBRARY_DIRS ${JSONCPP_LIBRARY_DIRS} PARENT_SCOPE)
-  set (JSONCPP_LIBRARIES jsoncpp)
-  set (JSONCPP_LIBRARIES ${JSONCPP_LIBRARIES} PARENT_SCOPE)
+    set (JSONCPP_LIBRARY_DIRS "${SF_BUILD_ROOT}/external/json/lib")
+    set (JSONCPP_LIBRARY_DIRS ${JSONCPP_LIBRARY_DIRS} PARENT_SCOPE)
+    set (JSONCPP_LIBRARIES jsoncpp)
+    set (JSONCPP_LIBRARIES ${JSONCPP_LIBRARIES} PARENT_SCOPE)

-  set (JSONCPP_FOUND ON)
-  set (JSONCPP_FOUND ON PARENT_SCOPE)
+    set (JSONCPP_FOUND ON)
+    set (JSONCPP_FOUND ON PARENT_SCOPE)
+  endif(JSONCPP_DOWNLOAD)

   message(STATUS "JSONCPP include dir: ${JSONCPP_INCLUDE_DIR}")
   message(STATUS "JSONCPP libs:${JSONCPP_LIBRARIES}")


Fix CMake JsonCpp issue

Fix CMake JsonCpp issue

--- cmake/FindJsonCpp.cmake
+++ cmake/FindJsonCpp.cmake
@@ -99,7 +99,7 @@
 	# part of the string to indicate if we found jsoncpp_lib_static
 	if(TARGET jsoncpp_lib_static)
 		list(APPEND __jsoncpp_info_string "[T]")
-		_jsoncpp_apply_map_config(jsoncpp_lib)
+		_jsoncpp_apply_map_config(jsoncpp_lib_static)
 	else()
 		list(APPEND __jsoncpp_info_string "[]")
 	endif()


Only install python libs if being built

Only install python libs if being built

--- cmake/InstallFAST.cmake
+++ cmake/InstallFAST.cmake
@@ -55,6 +55,7 @@
 )

 # Install Python wrapper
+if(FAST_MODULE_Python)
 install(TARGETS _fast
         DESTINATION python
 )
@@ -62,3 +63,4 @@
     ${PROJECT_BINARY_DIR}/lib/fast.py
     DESTINATION python
 )
+endif()


cleanups in ispc.cmake

cleanups in ispc.cmake

--- common/cmake/ispc.cmake
+++ common/cmake/ispc.cmake
@@ -43,7 +43,7 @@

   SET(ISPC_VERSION ${ISPC_VERSION} CACHE STRING "ISPC Version")
   MARK_AS_ADVANCED(ISPC_VERSION)
-#  MARK_AS_ADVANCED(ISPC_EXECUTABLE)
+  MARK_AS_ADVANCED(ISPC_EXECUTABLE)
 ENDIF()

 GET_FILENAME_COMPONENT(ISPC_DIR ${ISPC_EXECUTABLE} PATH)
@@ -135,7 +135,6 @@
       -O3
       --target=${ISPC_TARGET_ARGS}
       --woff
-#      --wno-perf
       --opt=fast-math
       ${ISPC_ADDITIONAL_ARGS}
       -h ${outdirh}/${fname}_ispc.h
@@ -171,8 +170,6 @@
       SET_SOURCE_FILES_PROPERTIES( ${src} PROPERTIES COMPILE_FLAGS -std=gnu++98 )
     ENDFOREACH()
   ENDIF()
-
-#  SET_TARGET_PROPERTIES(${name} PROPERTIES LINKER_LANGUAGE C)
 ENDMACRO()

 MACRO (add_ispc_library name type)
@@ -194,7 +191,6 @@
       SET_SOURCE_FILES_PROPERTIES( ${src} PROPERTIES COMPILE_FLAGS -std=gnu++98 )
     ENDFOREACH()
   ENDIF()
-#  SET_TARGET_PROPERTIES(${name} PROPERTIES LINKER_LANGUAGE C)
 ENDMACRO()

 ELSE (ENABLE_ISPC_SUPPORT)


Add rosbuild_untar_file(), #2457.  This required changing rosbuild_download_test_data() to use add_custom_command() for the download. I changed rosbuild_download_data() in the same way.

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -847,15 +847,43 @@

   # Create a legal target name, in case the target name has slashes in it
   string(REPLACE "/" "_" _testname download_data_${_filename})
-  add_custom_target(${_testname}
+  add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/${_filename}
                      COMMAND $ENV{ROS_ROOT}/core/rosbuild/bin/download_checkmd5.py ${_url} ${PROJECT_SOURCE_DIR}/${_filename} ${ARGN}
                      VERBATIM)
+  add_custom_target(${_testname} DEPENDS ${PROJECT_SOURCE_DIR}/${_filename})
   # Redeclaration of target is to workaround bug in 2.4.6
   if(CMAKE_MINOR_VERSION LESS 6)
     add_custom_target(tests)
   endif(CMAKE_MINOR_VERSION LESS 6)
   add_dependencies(tests ${_testname})
 endmacro(rosbuild_download_test_data)
+
+# There's an optional 3rd arg, which is a target that should be made to
+# depend on the result of untarring the file (can be ALL).
+macro(rosbuild_untar_file _filename _unpacked_name)
+  get_filename_component(unpack_dir ${_filename} PATH)
+  add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/${_unpacked_name}
+                     COMMAND rm -rf ${PROJECT_SOURCE_DIR}/${_unpacked_name}
+                     COMMAND tar xvCf ${unpack_dir} ${PROJECT_SOURCE_DIR}/${_filename}
+                     COMMAND touch -c ${PROJECT_SOURCE_DIR}/${_unpacked_name}
+                     DEPENDS ${PROJECT_SOURCE_DIR}/${_filename}
+                     WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+                     VERBATIM)
+  string(REPLACE "/" "_" _target_name untar_file_${_filename}_${_unpacked_name})
+
+  if("${ARGN}" STREQUAL "ALL")
+    add_custom_target(${_target_name} ALL DEPENDS ${PROJECT_SOURCE_DIR}/${_unpacked_name})
+  else("${ARGN}" STREQUAL "ALL")
+    add_custom_target(${_target_name} DEPENDS ${PROJECT_SOURCE_DIR}/${_unpacked_name})
+    if(NOT "${ARGN}" STREQUAL "")
+      # Redeclaration of target is to workaround bug in 2.4.6
+      if(CMAKE_MINOR_VERSION LESS 6)
+        add_custom_target(${ARGN})
+      endif(CMAKE_MINOR_VERSION LESS 6)
+      add_dependencies(${ARGN} ${_target_name})
+    endif(NOT "${ARGN}" STREQUAL "")
+  endif("${ARGN}" STREQUAL "ALL")
+endmacro(rosbuild_untar_file)

 # Macro to download data on the all target
 # The real signature is:
@@ -866,9 +894,10 @@
   endif("${ARGN}" STREQUAL "")
   # Create a legal target name, in case the target name has slashes in it
   string(REPLACE "/" "_" _testname download_data_${_filename})
-  add_custom_target(${_testname} ALL
+  add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/${_filename}
                     COMMAND $ENV{ROS_ROOT}/core/rosbuild/bin/download_checkmd5.py ${_url} ${PROJECT_SOURCE_DIR}/${_filename} ${ARGN}
                     VERBATIM)
+  add_custom_target(${_testname} ALL DEPENDS ${PROJECT_SOURCE_DIR}/${_filename})
 endmacro(rosbuild_download_data)

 macro(rosbuild_add_openmp_flags target)


DEPENDS was missing for MSVC build

DEPENDS was missing for MSVC build

--- CMake/External_curl.cmake
+++ CMake/External_curl.cmake
@@ -32,6 +32,7 @@
         SOURCE_DIR ${CURL_SB_SRC}
         BINARY_DIR ${CURL_SB_BUILD_DIR}/winbuild
         INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
+        DEPENDS ${${proj}_DEPENDENCIES}
         PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory ${CURL_SB_SRC} ${CURL_SB_BUILD_DIR}
         CONFIGURE_COMMAND ""
         BUILD_COMMAND nmake /f ${CURL_SB_BUILD_DIR}/winbuild/Makefile.vc mode=dll WITH_ZLIB=dll WITH_DEVEL=${CMAKE_INSTALL_PREFIX}


template: setup.cmake

template: setup.cmake

--- src/msise00/setup.cmake
+++ src/msise00/setup.cmake
@@ -8,7 +8,8 @@
 # --- boilerplate follows
 message(STATUS "CMake ${CMAKE_VERSION}")
 if(CMAKE_VERSION VERSION_LESS 3.12)
-  message(FATAL_ERROR "Please update CMake >= 3.12")
+  message(FATAL_ERROR "Please update CMake >= 3.12.
+    Try 'pip install -U cmake' or https://cmake.org/download/")
 endif()

 # site is OS name
@@ -49,11 +50,21 @@
 endif()

 # CTEST_CMAKE_GENERATOR must be defined in any case here.
-if(NOT DEFINED CTEST_CMAKE_GENERATOR)
+if(NOT DEFINED CTEST_CMAKE_GENERATOR AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.17)
   find_program(_gen NAMES ninja ninja-build samu)
   if(_gen)
-    set(CTEST_CMAKE_GENERATOR "Ninja")
-  elseif(WIN32)
+    execute_process(COMMAND ${_gen} --version
+      OUTPUT_VARIABLE _ninja_version
+      OUTPUT_STRIP_TRAILING_WHITESPACE
+      RESULT_VARIABLE _gen_ok
+      TIMEOUT 10)
+    if(_gen_ok EQUAL 0 AND _ninja_version VERSION_GREATER_EQUAL 1.10)
+      set(CTEST_CMAKE_GENERATOR "Ninja")
+    endif()
+  endif(_gen)
+endif()
+if(NOT DEFINED CTEST_CMAKE_GENERATOR)
+  if(WIN32)
     set(CTEST_CMAKE_GENERATOR "MinGW Makefiles")
     set(CTEST_BUILD_FLAGS -j)  # not --parallel as this goes to generator directly
   else()


Removed any curl dependency for android build

- No core dependency on precompiled libcurl library
- No dependency on curl headers

--- toolchains/android.cmake
+++ toolchains/android.cmake
@@ -12,12 +12,6 @@
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 -pedantic -llog -lz -landroid")
 set(CXX_FLAGS_DEBUG "${CXX_FLAGS_DEBUG} -g -O0")
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fPIC")
-set(LIBCURL_PRECOMPILED_LIB ${CMAKE_SOURCE_DIR}/android/jni/precompiled/${ANDROID_ABI}/libcurl.a)
-
-# include dependency headers
-include_directories(${PROJECT_SOURCE_DIR}/android/jni/include)
-
-message(STATUS "Using curl precompiled static library : ${LIBCURL_PRECOMPILED_LIB}")

 # adding manually the two jni c++ files
 set(ADDITIONNAL_TARGET_DEPENDENT_SRC_FILES
@@ -28,7 +22,7 @@
 set(INSTALL_CORE_LIBRARY "ON")
 set(CORE_LIB_TYPE SHARED)
 set(CORE_INSTALLATION_PATH ${CMAKE_SOURCE_DIR}/android/libs/${ANDROID_ABI})
-set(CORE_LIB_DEPS GLESv2 ${LIBCURL_PRECOMPILED_LIB})
+set(CORE_LIB_DEPS GLESv2)
 set(CORE_LIB_NAME tangram) # in order to have libtangram.so

 add_subdirectory(${PROJECT_SOURCE_DIR}/core)


SVN_SILENT made messages (.desktop file)


Add null sound backend to cmake

Add null sound backend to cmake

--- framework/cmake/soundbackend.cmake
+++ framework/cmake/soundbackend.cmake
@@ -1,6 +1,7 @@
 cmake_minimum_required(VERSION 2.8)

 option (BUILD_ALLEGRO_SOUNDBACKEND "Build an allegro audio backend" ON)
+option (BUILD_NULL_SOUNDBACKEND "Build an null (non-functional) audio backend" ON)

 set (SOUNDBACKENDS "")
 set (SOUNDBACKEND_SOURCES "")
@@ -13,6 +14,11 @@
 		list(APPEND FRAMEWORK_ALLEGRO_LIBRARIES allegro_audio)
 endif()

+if(BUILD_NULL_SOUNDBACKEND)
+		list(APPEND SOUNDBACKENDS null)
+		list(APPEND SOUNDBACKEND_SOURCES "framework/sound/null_backend.cpp")
+endif()
+
 if (NOT SOUNDBACKENDS)
 		message(FATAL_ERROR "No sound backends specified")
 endif()


Set XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH to "NO" to build all listed architectures

--- cmake/core/sugar_add_ios_library.cmake
+++ cmake/core/sugar_add_ios_library.cmake
@@ -26,6 +26,13 @@

   # Add real library
   add_library(${name_base} ${libsources})
+  # Build all listed architectures
+  set_target_properties(
+      ${name_base}
+      PROPERTIES
+      XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH
+      "NO"
+  )
   set_target_properties(${name_base} PROPERTIES DEBUG_POSTFIX "")
       # simplify search and rule creation


[CMake] PyROOT development variables should only be set if PYTHONLIBS_FOUND

--- cmake/modules/SearchRootCoreDeps.cmake
+++ cmake/modules/SearchRootCoreDeps.cmake
@@ -237,13 +237,15 @@

   find_package(NumPy)

-  set(PYTHON_EXECUTABLE_Development_Main "${PYTHON_EXECUTABLE}")
-  set(PYTHON_VERSION_STRING_Development_Main "${PYTHON_VERSION_STRING}")
-  set(PYTHON_VERSION_MAJOR_Development_Main "${PYTHON_VERSION_MAJOR}")
-  set(PYTHON_VERSION_MINOR_Development_Main "${PYTHON_VERSION_MINOR}")
-  set(PYTHON_UNDER_VERSION_STRING_Development_Main "${PYTHON_VERSION_MAJOR}_${PYTHON_VERSION_MINOR}")
-  set(PYTHON_INCLUDE_DIRS_Development_Main "${PYTHON_INCLUDE_DIRS}")
-  set(PYTHON_LIBRARIES_Development_Main "${PYTHON_LIBRARIES}")
+  if (PYTHONLIBS_FOUND)
+    set(PYTHON_EXECUTABLE_Development_Main "${PYTHON_EXECUTABLE}")
+    set(PYTHON_VERSION_STRING_Development_Main "${PYTHON_VERSION_STRING}")
+    set(PYTHON_VERSION_MAJOR_Development_Main "${PYTHON_VERSION_MAJOR}")
+    set(PYTHON_VERSION_MINOR_Development_Main "${PYTHON_VERSION_MINOR}")
+    set(PYTHON_UNDER_VERSION_STRING_Development_Main "${PYTHON_VERSION_MAJOR}_${PYTHON_VERSION_MINOR}")
+    set(PYTHON_INCLUDE_DIRS_Development_Main "${PYTHON_INCLUDE_DIRS}")
+    set(PYTHON_LIBRARIES_Development_Main "${PYTHON_LIBRARIES}")
+  endif()

 endif()


Updated FW

Updated 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 "1b6c5e0452de66c05d3267d1f15aed930d21da39")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "210b42eca830242cd17744e1a2a149026206124b")

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


Update FW internal commit hash

Update FW internal commit hash

--- 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 "c036117a9881a57c344d93b4b9ca625ab5c54e3f")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "75abb68c69b4f4168646eb50e311983f57ff9281")

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


CF2 Update to EKF2

CF2 Update to EKF2

--- cmake/configs/nuttx_crazyflie_default.cmake
+++ cmake/configs/nuttx_crazyflie_default.cmake
@@ -49,11 +49,10 @@
 	#
 	# Estimation modules (EKF/ SO3 / other filters)
 	#
-	# Too high RAM usage due to static allocations
-	# modules/attitude_estimator_ekf
 	modules/attitude_estimator_q
 	modules/position_estimator_inav
 	modules/local_position_estimator
+	modules/ekf2

 	#
 	# Vehicle Control


Remove SRF02 driver to make flash space

Remove SRF02 driver to make flash space

--- cmake/configs/nuttx_px4fmu-v2_default.cmake
+++ cmake/configs/nuttx_px4fmu-v2_default.cmake
@@ -24,7 +24,7 @@
 	drivers/hmc5883
 	drivers/ms5611
 	#drivers/mb12xx
-	drivers/srf02
+	#drivers/srf02
 	drivers/sf0x
 	drivers/ll40ls
 	drivers/trone


Silence the not finding tinfo/ncurses. In some platforms it is still OK.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -616,6 +616,9 @@
 #---Check for cling and llvm ----------------------------------------------------------------
 find_library(CMAKE_TINFO_LIBS NAMES tinfo ncurses)
 mark_as_advanced(CMAKE_TINFO_LIBS)
+if(NOT CMAKE_TINFO_LIBS)
+  set(CMAKE_TINFO_LIBS "")   #  Often if not found is still OK
+endif()
 if(cling)
   if(NOT DEFINED LLVM_BUILD_TYPE)
     set(LLVM_BUILD_TYPE Release)