Attempt to fix windows build failure

Attempt to fix windows build failure

--- cmake/OpenCVCompilerOptions.cmake
+++ cmake/OpenCVCompilerOptions.cmake
@@ -30,7 +30,9 @@

   # Remove unreferenced functions: function level linking
   set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} /Gy")
-  set(OPENCV_EXTRA_C_FLAGS_DEBUG "${OPENCV_EXTRA_C_FLAGS_DEBUG} /bigobj")
+  if(NOT MSVC_VERSION LESS 1400)
+    set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} /bigobj")
+  endif()
   if(BUILD_WITH_DEBUG_INFO)
     set(OPENCV_EXTRA_C_FLAGS_RELEASE "${OPENCV_EXTRA_C_FLAGS_RELEASE} /Zi")
   endif()


[CMake] Include LLVMFuzzer in Fuchsia toolchain

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

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@310901 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/caches/Fuchsia-stage2.cmake
+++ cmake/caches/Fuchsia-stage2.cmake
@@ -81,6 +81,7 @@
   lld
   lldb
   liblldb
+  LLVMFuzzer
   LTO
   clang-format
   clang-headers


Remove unnecessary line as no headers exist now (#8446)

--- cmake/onnxruntime_providers.cmake
+++ cmake/onnxruntime_providers.cmake
@@ -361,7 +361,6 @@
   target_link_libraries(onnxruntime_providers_cuda PRIVATE cublas cudnn curand cufft ${ONNXRUNTIME_PROVIDERS_SHARED})
   target_include_directories(onnxruntime_providers_cuda PRIVATE ${ONNXRUNTIME_ROOT} ${CMAKE_CURRENT_BINARY_DIR} ${onnxruntime_CUDNN_HOME}/include ${eigen_INCLUDE_DIRS} ${TVM_INCLUDES} PUBLIC ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
   # ${CMAKE_CURRENT_BINARY_DIR} is so that #include "onnxruntime_config.h" inside tensor_shape.h is found
-  install(DIRECTORY ${PROJECT_SOURCE_DIR}/../include/onnxruntime/core/providers/cuda  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/onnxruntime/core/providers)
   set_target_properties(onnxruntime_providers_cuda PROPERTIES LINKER_LANGUAGE CUDA)
   set_target_properties(onnxruntime_providers_cuda PROPERTIES FOLDER "ONNXRuntime")


fix cmake add_library() warning on non-WIN32

--- cmakemodules/DeclareMRPTLib.cmake
+++ cmakemodules/DeclareMRPTLib.cmake
@@ -190,12 +190,10 @@
 	if (NOT ${headers_only})
 		# A libray target:
 		add_library(${name}
+			${all_${name}_srcs}
 			${MRPT_VERSION_RC_FILE}  # Only !="" in Win32: the .rc file with version info
 			)

-		# Add sources as and headers as PRIVATE sources:
-		target_sources(${name} PRIVATE ${all_${name}_srcs})
-
 		# private include dirs for this lib:
 		target_include_directories(${name} PRIVATE
 				$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/libs/${name}/src/> # To include ${name}-precomp.h


SuperBuild: OTB: donot force no-as-needed to all binaries

--- SuperBuild/CMake/External_otb.cmake
+++ SuperBuild/CMake/External_otb.cmake
@@ -140,14 +140,14 @@
   VERBATIM
   )

-set(OTB_CMAKE_CACHE_ARGS ${SB_CMAKE_CACHE_ARGS})
-if(LINUX)
-  string(REGEX REPLACE
-    "-Wl,--no-undefined"
-    "-Wl,--no-undefined -Wl,-no-as-needed"
-    OTB_CMAKE_CACHE_ARGS
-    "${OTB_CMAKE_CACHE_ARGS}")
-endif()
+# set(OTB_CMAKE_CACHE_ARGS ${SB_CMAKE_CACHE_ARGS})
+# if(LINUX)
+#   string(REGEX REPLACE
+#     "-Wl,--no-undefined"
+#     "-Wl,--no-undefined -Wl,-no-as-needed"
+#     OTB_CMAKE_CACHE_ARGS
+#     "${OTB_CMAKE_CACHE_ARGS}")
+# endif()

 ExternalProject_Add(OTB
   DEPENDS ${OTB_DEPENDENCIES}
@@ -158,7 +158,7 @@
   INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
   CMAKE_CACHE_ARGS
-  ${OTB_CMAKE_CACHE_ARGS}
+  ${SB_CMAKE_CACHE_ARGS}
   ${OTB_SB_COMPILATION_FLAGS}
   -DBUILD_TESTING:BOOL=${BUILD_TESTING}
   -DBUILD_EXAMPLES:BOOL=${BUILD_EXAMPLES}
@@ -183,8 +183,6 @@
   -DOTB_USE_QWT:BOOL=${OTB_USE_QWT}
   -DOTB_WRAP_PYTHON:BOOL=${OTB_WRAP_PYTHON}
   -DOTB_WRAP_JAVA:BOOL=${OTB_WRAP_JAVA}
-  -DGENERATE_PACKAGE:BOOL=OFF
-  -DGENERATE_XDK:BOOL=OFF
   ${OTB_ADDITIONAL_CACHE}
   CMAKE_ARGS ${OTB_SB_CONFIG}
   CMAKE_COMMAND ${SB_CMAKE_COMMAND}


Commented out hard coded saturn references.

git-svn-id: b7791fb0f5d07d96612766859ad70a13be88ea96@1681 305cdda6-5ce1-45b3-a98d-dfc68c8b3305

--- library/NektarCommon.cmake
+++ library/NektarCommon.cmake
@@ -148,7 +148,7 @@

     IF( ${CMAKE_COMPILER_IS_GNUCXX} )
         IF(NEKTAR_ENABLE_PROFILE)
-            SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -finstrument-functions")
+            #SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -finstrument-functions")
         ENDIF(NEKTAR_ENABLE_PROFILE)
     ENDIF( ${CMAKE_COMPILER_IS_GNUCXX} )

@@ -214,7 +214,7 @@

     IF( ${CMAKE_COMPILER_IS_GNUCXX} )
         IF(NEKTAR_ENABLE_PROFILE)
-            TARGET_LINK_LIBRARIES(${name} Saturn)
+            #TARGET_LINK_LIBRARIES(${name} Saturn)
         ENDIF(NEKTAR_ENABLE_PROFILE)
     ENDIF( ${CMAKE_COMPILER_IS_GNUCXX} )


CMake: Small cleanup: Use OPTION(...) instead of SET(BOOL ...)

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

--- deal.II/cmake/setup_cached_variables.cmake
+++ deal.II/cmake/setup_cached_variables.cmake
@@ -238,19 +238,15 @@
 ENDFOREACH()

-#
+#
 # Define the variable that defines whether we should use 32- or 64-bit
 # global DoF indices.
 #
-SET(DEAL_II_WITH_64BIT_INDICES "${DEAL_II_WITH_64BIT_INDICES}" CACHE BOOL
-    "If set to ON, then use 64-bit data types to represent global degree of freedom indices. The default is to OFF. You only want to set this to ON if you will solve problems with more than 2^31 (approximately 2 billion) unknowns. If set to ON, you also need to ensure that both Trilinos and/or PETSc support 64-bit indices."
-   )
-
+OPTION(DEAL_II_WITH_64BIT_INDICES
+  "If set to ON, then use 64-bit data types to represent global degree of freedom indices. The default is to OFF. You only want to set this to ON if you will solve problems with more than 2^31 (approximately 2 billion) unknowns. If set to ON, you also need to ensure that both Trilinos and/or PETSc support 64-bit indices."
+  OFF
+  )
 MARK_AS_ADVANCED(DEAL_II_WITH_64BIT_INDICES)
-
-SET_IF_EMPTY(DEAL_II_WITH_64BIT_INDICES "OFF")
-
-

 #


Add threading library when linking mkl

Add threading library when linking mkl

--- lib/smurff-cpp/cmake/scripts/DependenciesConfig.cmake
+++ lib/smurff-cpp/cmake/scripts/DependenciesConfig.cmake
@@ -38,6 +38,9 @@
       message(STATUS "OpenMP found")
       set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${OpenMP_CXX_FLAGS}")
       set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${OpenMP_C_FLAGS}")
+      message(STATUS "OpenMP_CXX_LIB_NAMES ${OpenMP_CXX_LIB_NAMES}")
+      message(STATUS "OpenMP_CXX_LIBRARY ${OpenMP_CXX_LIBRARY}")
+      message(STATUS "OpenMP_CXX_LIBRARIES ${OpenMP_CXX_LIBRARIES}")
   else()
       message(STATUS "OpenMP not found")
   endif()
@@ -71,12 +74,18 @@
   set(BLA_VENDOR "Intel")
   find_package( LAPACK REQUIRED )

-
   # since we mix OpenMP and mkl we need to link this
   if(${OPENMP_FOUND})
-      find_library(INTEL_OPENMP_LIBRARY iomp5 HINTS ENV LD_LIBRARY_PATH)
-      # find_library(INTEL_OPENMP_LIBRARY NAMES iomp5)
-      set(LAPACK_LIBRARIES ${LAPACK_LIBRARIES} ${INTEL_OPENMP_LIBRARY})
+      list(FIND OpenMP_CXX_LIB_NAMES "gomp" GNU_OPENMP)
+      list(FIND OpenMP_CXX_LIB_NAMES "iomp5" INTEL_OPENMP)
+      if(NOT GNU_OPENMP EQUAL -1)
+          find_library(INTEL_THREAD_LIBRARY "mkl_gnu_thread"  HINTS ENV LD_LIBRARY_PATH)
+      elseif(NOT INTEL_OPENMP EQUAL -1)
+          find_library(INTEL_THREAD_LIBRARY "mkl_intel_thread"  HINTS ENV LD_LIBRARY_PATH)
+      else()
+          message(ERROR "Unknown threading library ${OpenMP_CXX_LIB_NAMES}")
+      endif()
+      set(LAPACK_LIBRARIES ${LAPACK_LIBRARIES} ${INTEL_THREAD_LIBRARY})
   endif()

   message(STATUS MKL: ${LAPACK_LIBRARIES} )


BUG: mantis 1151-allow multiple options with GDAL_SB_EXTRA_OPTIONS

--- SuperBuild/CMake/External_gdal.cmake
+++ SuperBuild/CMake/External_gdal.cmake
@@ -42,6 +42,9 @@
   if(UNIX)
     set(GDAL_SB_EXTRA_OPTIONS "" CACHE STRING "Extra options to be passed to GDAL configure script")
     mark_as_advanced(GDAL_SB_EXTRA_OPTIONS)
+
+    #Convert GDAL_SB_EXTRA_OPTIONS to a list to allow to add multiple instructions to the CONFIGURE_COMMAND
+    separate_arguments(GDAL_SB_EXTRA_OPTIONS)

     ExternalProject_Add(${proj}
       PREFIX ${proj}


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Fixing compiler warning by removing files from include_directories

--- cpp-driver/cmake/modules/Gtest.cmake
+++ cpp-driver/cmake/modules/Gtest.cmake
@@ -206,14 +206,12 @@
                  ${GOOGLE_TEST_SOURCE_FILES})
   if(CMAKE_VERSION VERSION_LESS "2.8.11")
     include_directories(${extra_includes}
-                        ${COMMON_INTEGRATION_TEST_INCLUDE_FILES}
                         ${UNIT_TESTS_SOURCE_DIR}
                         ${INTEGRATION_TESTS_SOURCE_DIR}
                         ${CCM_BRIDGE_SOURCE_DIR})
   else()
     target_include_directories(${UNIT_TESTS_NAME}
                                PUBLIC ${extra_includes}
-                                      ${COMMON_INTEGRATION_TEST_INCLUDE_FILES}
                                       ${UNIT_TESTS_SOURCE_DIR}
                                       ${INTEGRATION_TESTS_SOURCE_DIR}
                                       ${CCM_BRIDGE_SOURCE_DIR})


Cmake: Fix a quoting error; silence a warning with cmake-2.8.12

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

--- deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake
+++ deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake
@@ -154,8 +154,8 @@
   # switch between them:
   IF(${DEAL_II_BUILD_TYPE} MATCHES "DebugRelease")
     SET(_switch_targets
-"#      ${_make_command} debug          - to switch the build type to \"Debug\"
-#      ${_make_command} release        - to switch the build type to \"Release\"\n"
+"#      ${_make_command} debug          - to switch the build type to 'Debug'
+#      ${_make_command} release        - to switch the build type to 'Release'\n"
       )
   ENDIF()


benchmarks: fix the cmake code to detect if SWIFT_EXEC supports the -align-module-to-page-size option.

This check should only be done for pre-built compilers.

--- benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
+++ benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
@@ -41,16 +41,20 @@
   endif()

   set(PAGE_ALIGNMENT_OPTION "-Xllvm" "-align-module-to-page-size")
-  execute_process(
-      COMMAND "touch" "empty.swift"
-      RESULT_VARIABLE result
-      ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
-  execute_process(
-      COMMAND "${SWIFT_EXEC}" ${PAGE_ALIGNMENT_OPTION} "empty.swift"
-      RESULT_VARIABLE result
-      ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
-  if(NOT "${result}" MATCHES "0")
-    set(PAGE_ALIGNMENT_OPTION "")
+  if(EXISTS "${SWIFT_EXEC}")
+    # If we are using a pre-built compiler, check if it supports the
+    # -align-module-to-page-size option.
+    execute_process(
+        COMMAND "touch" "empty.swift"
+        RESULT_VARIABLE result
+        ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+    execute_process(
+        COMMAND "${SWIFT_EXEC}" ${PAGE_ALIGNMENT_OPTION} "empty.swift"
+        RESULT_VARIABLE result
+        ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+    if(NOT "${result}" MATCHES "0")
+      set(PAGE_ALIGNMENT_OPTION "")
+    endif()
   endif()

   # We always infer the SWIFT_LIBRARY_PATH from SWIFT_EXEC unless


fix recursive dependency search

fix recursive dependency search

Change-Id: I3403f53ab63d786eb70c6ccc621aca286b58e05e

--- VAD_HendriksWrappers.cmake
+++ VAD_HendriksWrappers.cmake
@@ -103,20 +103,28 @@
   list(REMOVE_ITEM _VAD_AUTODEP_PROJECT_LIST ${CMAKE_PROJECT_NAME})
   if (NOT _VAD_AUTODEP_PROJECT_LIST)
     #recursively iterate all dependencies
-
-    foreach(PKG ${_VAD_AUTODEP_MISSING_PKGS})
-      # FIXME this is a direct copy, create a shared function/macro
-      find_file(VAD_${PKG}_FILE VAD_${PKG}.cmake ${CMAKE_MODULE_PATH})
-      if(VAD_${PKG}_FILE)
-        message(STATUS "VAD file 'VAD_${PKG}.cmake' was found at '${VAD_${PKG}_FILE}'. The VAD file will now be parsed.")
-        vad_reset_hooks()
-        include(${VAD_${PKG}_FILE})
-        vad_deps(${PKG})
-        vad_reset_hooks()
-      else()
-        message("Ohohhh no file  ${VAD_${PKG}_FILE} found!")
-      endif()
-    endforeach()
+
+    set(_unhandeld_missing true)
+    while(_unhandeld_missing)
+      set(_unhandeld_missing false)
+      foreach(PKG ${_VAD_AUTODEP_MISSING_PKGS})
+        if (NOT _handled_missing_${PKG})
+          set(_handled_missing_${PKG} true)
+          set(_unhandeld_missing true)
+          # FIXME this is a direct copy, create a shared function/macro
+          find_file(VAD_${PKG}_FILE VAD_${PKG}.cmake ${CMAKE_MODULE_PATH})
+          if(VAD_${PKG}_FILE)
+            message(STATUS "Dep search: VAD file 'VAD_${PKG}.cmake' was found at '${VAD_${PKG}_FILE}'. The VAD file will now be parsed.")
+            vad_reset_hooks()
+            include(${VAD_${PKG}_FILE})
+            vad_deps(${PKG})
+            vad_reset_hooks()
+          else()
+            message("Ohohhh no file  ${VAD_${PKG}_FILE} found!")
+          endif()
+        endif()
+      endforeach()
+    endwhile()

     if (_VAD_AUTODEP_MISSING_PKGS)
       message("missings PKGs: ")


remove 'option' declaration in Sanitizer.cmake

--- Sanitizer.cmake
+++ Sanitizer.cmake
@@ -13,7 +13,6 @@
 # Note: This modifies CMAKE_CXX_FLAGS and CMAKE_EXE_LINKER_FLAGS
 # Usage: add this when doing cmake configuration: -DSANITIZER=address

-option(SANITIZER "Sanitizer: one of address/thread/undefined, depending on compiler" OFF)
 if(NOT SANITIZER)
   return()
 endif()


Compatibility with older CMake versions.

--- libunwind.cmake
+++ libunwind.cmake
@@ -4,7 +4,7 @@
             git clone -b v1.4.0 --depth 1 https://github.com/libunwind/libunwind.git libunwind
         WORKING_DIRECTORY
             "${CMAKE_BINARY_DIR}"
-        RESULTS_VARIABLE
+        RESULT_VARIABLE
             RET_CODE
     )
     if(NOT "${RET_CODE}" STREQUAL "0")
@@ -16,7 +16,7 @@
             ./autogen.sh
         WORKING_DIRECTORY
             "${CMAKE_BINARY_DIR}/libunwind"
-        RESULTS_VARIABLE
+        RESULT_VARIABLE
             RET_CODE
     )
     if(NOT "${RET_CODE}" STREQUAL "0")
@@ -28,7 +28,7 @@
             ./configure CFLAGS=-fPIC CXXFLAGS=-fPIC
         WORKING_DIRECTORY
             "${CMAKE_BINARY_DIR}/libunwind"
-        RESULTS_VARIABLE
+        RESULT_VARIABLE
             RET_CODE
     )
     if(NOT "${RET_CODE}" STREQUAL "0")
@@ -40,7 +40,7 @@
             make install prefix="${CMAKE_BINARY_DIR}/libunwind/usr/local"
         WORKING_DIRECTORY
             "${CMAKE_BINARY_DIR}/libunwind"
-        RESULTS_VARIABLE
+        RESULT_VARIABLE
             RET_CODE
     )
     if(NOT "${RET_CODE}" STREQUAL "0")


Remove #pragma once from mutiple inclusion header

--- Utilities.cmake
+++ Utilities.cmake
@@ -309,7 +309,6 @@
 file(WRITE "${output_file}"
 "/* This file was automatically generated by size_classes.sh. */\n"
 "/******************************************************************************/\n"
-"#pragma once\n\n"
 "#ifdef JEMALLOC_H_TYPES\n\n"
 "/*\n"
 " * This header requires LG_SIZEOF_PTR, LG_TINY_MIN, LG_QUANTUM, and LG_PAGE to\n"


move binary dir calculation to a later stage

--- src/cake.cmake
+++ src/cake.cmake
@@ -313,28 +313,6 @@
 	set(binary_dir_from_args 1)
 endif()

-if(NOT CAKE_BINARY_DIR)
-	get_filename_component(CAKE_BINARY_DIR "${cake_source_dir}" NAME)
-endif()
-
-if(NOT IS_ABSOLUTE "${CAKE_BINARY_DIR}")
-	if(NOT CAKE_BINARY_DIR_PREFIX)
-		if(NOT CAKE_TMP_DIR)
-			cake_message(FATAL_ERROR "Temporary dir not found for generating binary dir. Specify CAKE_BINARY_DIR_PREFIX or absolute path for CAKE_BINARY_DIR.")
-		endif()
-		set(CAKE_BINARY_DIR_PREFIX ${CAKE_TMP_DIR})
-	endif()
-	set(CAKE_BINARY_DIR ${CAKE_BINARY_DIR_PREFIX}/${CAKE_BINARY_DIR})
-endif()
-
-# try to load cmake_generator_from_cmakecache from the binary dir
-if(IS_DIRECTORY ${CAKE_BINARY_DIR})
-	file(STRINGS ${CAKE_BINARY_DIR}/CMakeCache.txt v
-		REGEX "CMAKE_GENERATOR")
-	string(REGEX MATCH "^[\t ]*CMAKE_GENERATOR:INTERNAL=(.*)$" v ${v})
-	set(cmake_generator_from_cmakecache ${CMAKE_MATCH_1})
-endif()
-
 # combine the options from the .cakecfg files with the ones
 # specified on the command line
 list(APPEND CAKE_OPTIONS ${cake_options})
@@ -440,6 +418,29 @@
 	endif()
 endif()

+# settle on CAKE_BINARY_DIR
+if(NOT CAKE_BINARY_DIR)
+	get_filename_component(CAKE_BINARY_DIR "${cake_source_dir}" NAME)
+endif()
+
+if(NOT IS_ABSOLUTE "${CAKE_BINARY_DIR}")
+	if(NOT CAKE_BINARY_DIR_PREFIX)
+		if(NOT CAKE_TMP_DIR)
+			cake_message(FATAL_ERROR "Temporary dir not found for generating binary dir. Specify CAKE_BINARY_DIR_PREFIX or absolute path for CAKE_BINARY_DIR.")
+		endif()
+		set(CAKE_BINARY_DIR_PREFIX ${CAKE_TMP_DIR})
+	endif()
+	set(CAKE_BINARY_DIR ${CAKE_BINARY_DIR_PREFIX}/${CAKE_BINARY_DIR})
+endif()
+
+# try to load cmake_generator_from_cmakecache from the binary dir
+if(NOT opt_rm_bin AND IS_DIRECTORY ${CAKE_BINARY_DIR})
+	file(STRINGS ${CAKE_BINARY_DIR}/CMakeCache.txt v
+		REGEX "CMAKE_GENERATOR")
+	string(REGEX MATCH "^[\t ]*CMAKE_GENERATOR:INTERNAL=(.*)$" v ${v})
+	set(cmake_generator_from_cmakecache ${CMAKE_MATCH_1})
+endif()
+
 if(cmake_generator_from_cmakecache)
 	set(cmake_generator ${cmake_generator_from_cmakecache})
 else()


cmake: printing a message while adding a plugin/application

Former-commit-id: c98e968a65a51df6ad98ec9efd718ba7ae289c12

--- SofaFramework/SofaMacros.cmake
+++ SofaFramework/SofaMacros.cmake
@@ -177,6 +177,7 @@

         option(${option} "Build the ${name} ${type}." ${active})
         if(${option})
+            message("Adding ${type} ${name}")
             add_subdirectory(${directory} ${name})
             set_target_properties(${name} PROPERTIES FOLDER ${type}s) # IDE folder
             set_target_properties(${name} PROPERTIES DEBUG_POSTFIX "_d")


htmlext: bump rapidjson version to v1.1.0 (ExternalProject_Add)

--- cmake/HextExternalProjectRapidJson.cmake
+++ cmake/HextExternalProjectRapidJson.cmake
@@ -3,8 +3,8 @@
 INCLUDE(ExternalProject)
 ExternalProject_Add(
     rapidjson
-    URL https://github.com/miloyip/rapidjson/archive/v1.0.2.tar.gz
-    URL_HASH SHA512=f5481d78773aca34d214b60e0da113779eba4af35b7c8fb4eddea5b3bda4e68cbe3fd06f698ee90f9e50c3fe985d327053f678c9fcc84339860c267b59313162
+    URL https://github.com/miloyip/rapidjson/archive/v1.1.0.tar.gz
+    URL_HASH SHA512=2e82a4bddcd6c4669541f5945c2d240fb1b4fdd6e239200246d3dd50ce98733f0a4f6d3daa56f865d8c88779c036099c52a9ae85d47ad263686b68a88d832dff
     TIMEOUT 10

     CONFIGURE_COMMAND ""


ENH: switch back to svn, accept broken certificate, bump version

--- SuperBuild/ExternalElastix.cmake
+++ SuperBuild/ExternalElastix.cmake
@@ -19,12 +19,15 @@

 set( proj Elastix )

-set( ELASTIX_GIT_REPOSITORY http://github.com/kaspermarstal/elastix )
-set( ELASTIX_GIT_TAG 25c9dec600979a997faa373d7cd5259f65fac220 )
+set( ELASTIX_REPOSITORY https://svn.bigr.nl/elastix/trunkpublic/ )
+set( ELASTIX_REVISION 5392 )

 ExternalProject_Add( ${proj}
-  GIT_REPOSITORY ${ELASTIX_GIT_REPOSITORY}
-  GIT_TAG ${ELASTIX_GIT_TAG}
+  SVN_REPOSITORY ${ELASTIX_REPOSITORY}
+  SVN_REVISION -r ${ELASTIX_REVISION}
+  SVN_USERNAME elastixguest
+  SVN_PASSWORD elastixguest
+  SVN_TRUST_CERT 1
   UPDATE_COMMAND ""
   SOURCE_DIR ${proj}
   BINARY_DIR ${proj}-build


ENH: bumped elastix latest official that includes transformix deformation field library interface

--- SuperBuild/ExternalElastix.cmake
+++ SuperBuild/ExternalElastix.cmake
@@ -19,8 +19,8 @@

 set( proj Elastix )

-set( ELASTIX_GIT_REPOSITORY https://github.com/FBerendsen/elastix )
-set( ELASTIX_GIT_TAG SELX-80-Transformix-Deformation-Field-Object )
+set( ELASTIX_GIT_REPOSITORY https://github.com/SuperElastix/elastix )
+set( ELASTIX_GIT_TAG 2ac905afdb1a5a841c05ed6abf92a1bf232d1e89 )

 UPDATE_SELX_SUPERBUILD_COMMAND(${proj})


Changed method of cleaning up output files to work with Windows.

--- Tests/VisualTests/PostTest.cmake
+++ Tests/VisualTests/PostTest.cmake
@@ -7,10 +7,17 @@
 #-------------------------------------------------------------------

 if (UNIX)
-  set(USER_HOME_DIRECTORY $ENV{HOME})
+  # escape spaces
+  string(REPLACE " " "\ " USER_HOME_DIRECTORY "$ENV{HOMEDRIVE}$ENV{HOMEPATH}")
 elseif (WIN32)
   string(REPLACE "\\" "/" USER_HOME_DIRECTORY "$ENV{HOMEDRIVE}$ENV{HOMEPATH}")
 # other platforms?
 endif ()

-exec_program("cmake -E remove ${USER_HOME_DIRECTORY}/TestResults_*RenderingSubsystem.txt")
+# Use platform-specific utils, since 'cmake -E remove' didn't seem to handle wildcards in Windows
+if (UNIX)
+  exec_program("rm ${USER_HOME_DIRECTORY}/TestResults_*RenderingSubsystem.txt")
+elseif (WIN32)
+  exec_program("cmd /c del \"${USER_HOME_DIRECTORY}\TestResults_*RenderingSubsystem.txt\"")
+# other platforms?
+endif ()


DEV-42322 webkit plugin fails to start on linux in mercurial repo

--- indra/cmake/WebKitLibPlugin.cmake
+++ indra/cmake/WebKitLibPlugin.cmake
@@ -51,6 +51,7 @@
         QtGui
         QtCore

+        jpeg
         fontconfig
         X11
         Xrender


added Gadgetron to dependency if it is built

--- SuperBuild/External_SIRF.cmake
+++ SuperBuild/External_SIRF.cmake
@@ -24,6 +24,10 @@

 # Set dependency list
 set(${proj}_DEPENDENCIES "Boost;HDF5;ISMRMRD;FFTW3;SWIG")
+
+if (${BUILD_GADGETRON})
+    set(${proj}_DEPENDENCIES "${${prof}_DEPENEDCIES};Gadgetron")
+endif()
 if (${BUILD_NIFTYREG})
   set(${proj}_DEPENDENCIES "${${proj}_DEPENDENCIES};NIFTYREG")
 endif()


Calling SLURM_SBATCH_COMMAND on SLURM files

--- cmake/Modules/GenerateExamples.cmake
+++ cmake/Modules/GenerateExamples.cmake
@@ -119,7 +119,7 @@
         set(_test_name ${_TYPE}_${_SIZE}_${MACHINE})
         add_test(NAME ${_test_name}
             WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/examples
-            COMMAND ${CMAKE_BINARY_DIR}/examples/${_SIZE}_${_TYPE}_${MACHINE}.slurm)
+            COMMAND ${SLURM_SBATCH_COMMAND} ${CMAKE_BINARY_DIR}/examples/${_SIZE}_${_TYPE}_${MACHINE}.slurm)
         get_parameter(_NODES "${CMAKE_BINARY_DIR}/examples/templates/params/${_TYPE}.${_SIZE}" NODES)
         string(REGEX MATCHALL "([0-9]+)" _NODES "${_NODES}")
         set(_FREQ "${FREQ_${_SIZE}}")


RootBuildOptions.cmake: enable more options with -Dall=ON

Fixes: ROOT-9086

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -215,27 +215,59 @@

 #--- The 'all' option swithes ON major options---------------------------------------------------
 if(all)
+ set(alien_defvalue ON)
  set(arrow_defvalue ON)
+ set(asimage_defvalue ON)
+ set(astiff_defvalue ON)
+ set(cefweb_defvalue ON)
+ set(clad_defvalue ON)
+ set(cuda_defvalue ON)
+ set(davix_defvalue ON)
  set(dcache_defvalue ON)
+ set(fftw3_defvalue ON)
  set(fitsio_defvalue ON)
  set(fortran_defvalue ON)
  set(gdml_defvalue ON)
+ set(gfal_defvalue ON)
  set(http_defvalue ON)
+ set(imt_defvalue ON)
  set(krb5_defvalue ON)
  set(ldap_defvalue ON)
+ set(mathmore_defvalue ON)
  set(memstat_defvalue ON)
  set(minuit2_defvalue ON)
  set(monalisa_defvalue ON)
+ set(mysql_defvalue ON)
  set(odbc_defvalue ON)
+ set(opengl_defvalue ON)
+ set(oracle_defvalue ON)
+ set(pgsql_defvalue ON)
+ set(pythia6_defvalue ON)
+ set(pythia8_defvalue ON)
+ set(python_defvalue ON)
+ set(qt5web_defvalue ON)
  set(r_defvalue ON)
  set(roofit_defvalue ON)
+ set(webui_defvalue ON)
  set(root7_defvalue ON)
  set(shadowpw_defvalue ON)
+ set(sqlite_defvalue ON)
+ set(ssl_defvalue ON)
+ set(tmva_defvalue ON)
+ set(tmva-cpu_defvalue ON)
+ set(tmva-gpu_defvalue ON)
+ set(tmva-pymva_defvalue ON)
+ set(tmva-rmva_defvalue ON)
  set(unuran_defvalue ON)
  set(vc_defvalue ON)
  set(vmc_defvalue ON)
  set(vdt_defvalue ON)
  set(veccore_defvalue ON)
+ set(vecgeom_defvalue ON)
+ set(x11_defvalue ON)
+ set(xft_defvalue ON)
+ set(xml_defvalue ON)
+ set(xrootd_defvalue ON)
 endif()

 #--- The 'builtin_all' option swithes ON old the built in options-------------------------------


harfbuzz: Build with ICU support

harfbuzz: Build with ICU support

--- cmake/projects/harfbuzz/hunter.cmake
+++ cmake/projects/harfbuzz/hunter.cmake
@@ -24,6 +24,7 @@
     harfbuzz
     CMAKE_ARGS
         HB_HAVE_FREETYPE=ON
+        HB_HAVE_ICU=ON
 )

 hunter_pick_scheme(DEFAULT url_sha1_cmake)


Updating the variable name to be undercase.

--- cmake/usFunctionEmbedResources.cmake
+++ cmake/usFunctionEmbedResources.cmake
@@ -161,12 +161,12 @@
        # when it should really be:
        #  >> clang ... -c ... -o stub.o
        # (pardon the elipsis for abbreviation)
-
-       separate_arguments(US_RESOURCE_CXX_FLAGS UNIX_COMMAND ${CMAKE_CXX_FLAGS})
+
+       separate_arguments(_us_resource_cxx_flags UNIX_COMMAND ${CMAKE_CXX_FLAGS})
       # section name is "us_resources" because max length for section names in Mach-O format is 16 characters.
       add_custom_command(
         OUTPUT ${_source_output}
-        COMMAND ${CMAKE_CXX_COMPILER} ${US_RESOURCE_CXX_FLAGS} -c ${US_CMAKE_RESOURCE_DEPENDENCIES_CPP} -o stub.o
+        COMMAND ${CMAKE_CXX_COMPILER} ${_us_resource_cxx_flags} -c ${US_CMAKE_RESOURCE_DEPENDENCIES_CPP} -o stub.o
         COMMAND ${CMAKE_LINKER} -r -sectcreate __TEXT us_resources ${_zip_archive_name} stub.o -o ${_source_output}
         DEPENDS ${_zip_archive}
         WORKING_DIRECTORY ${_zip_archive_path}


Change wrong name in marco.cmake

Change wrong name in marco.cmake

--- modules/macro.cmake
+++ modules/macro.cmake
@@ -20,5 +20,5 @@
             endif()
             FIND_DIRS_RECURSIVE("${VARIABLE}" "${REGEX}" "${PATH}/${child}")
         endif()
-    endforeach()
-endmacro(FIND_SVN)+    endforeach()
+endmacro(FIND_DIRS_RECURSIVE)


ENH: Updated USER and PASSWORD settings for ftp connection for new public settings.

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -1,8 +1,8 @@
 # Dart server to submit results (used by client)
 SET (DROP_SITE "public.kitware.com")
 SET (DROP_LOCATION "/incoming")
-SET (DROP_SITE_USER "anonymous")
-SET (DROP_SITE_PASSWORD "insight-tester@somewhere.com")
+SET (DROP_SITE_USER "ftpuser")
+SET (DROP_SITE_PASSWORD "public")
 SET (TRIGGER_SITE
        "http://${DROP_SITE}/cgi-bin/Submit-Insight-TestingResults.pl")


changed path for library

changed path for library

--- FindQuaZip.cmake
+++ FindQuaZip.cmake
@@ -1,6 +1,6 @@
 find_package(Qt4)
 find_path(QuaZip_INCLUDE_DIR quazip.h ${CMAKE_INSTALL_PREFIX}/include/quazip ${CMAKE_INSTALL_PREFIX}/include /usr/include/quazip /usr/local/include/quazip ${QT_INCLUDE_DIR}/quazip ${QT_INCLUDE_DIR} ${QuaZIP_SOURCE_DIR}/include/quazip ${QuaZIP_SOURCE_DIR}/quazip ${QuaZIP_SOURCE_DIR}/include)
-find_library(QuaZip_LIBRARY NAMES quazip PATHS ${CMAKE_INSTALL_PREFIX}/lib64 ${CMAKE_INSTALL_PREFIX}/lib ${CMAKE_INSTALL_PREFIX}/Library/Frameworks ${QuaZIP_DIR}/lib64 ${QuaZIP_DIR}/lib ${QuaZIP_DIR}/quazip ${QuaZIP_DIR})
+find_library(QuaZip_LIBRARY NAMES quazip PATHS ${CMAKE_INSTALL_PREFIX}/lib64 ${CMAKE_INSTALL_PREFIX}/lib ${CMAKE_INSTALL_PREFIX}/Library/Frameworks ${QuaZIP_DIR}/lib64 ${QuaZIP_DIR}/lib ${QuaZIP_DIR}/quazip/Debug ${QuaZIP_DIR}/quazip/Relase ${QuaZIP_DIR})
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(quazip DEFAULT_MSG QuaZip_LIBRARY QuaZip_INCLUDE_DIR)
 set(QuaZip_LIBRARIES ${QuaZip_LIBRARY})


Problem: Findlibzmq.cmake out of date

Problem: Findlibzmq.cmake out of date

Findlibzmq.cmake should be regenerated to fix CMake build error on Win32 (#1972).

--- Findlibzmq.cmake
+++ Findlibzmq.cmake
@@ -23,11 +23,68 @@
     HINTS ${PC_LIBZMQ_INCLUDE_HINTS}
 )

-find_library (
-    LIBZMQ_LIBRARIES
-    NAMES zmq
-    HINTS ${PC_LIBZMQ_LIBRARY_HINTS}
-)
+if (MSVC)
+    # libzmq dll/lib built with MSVC is named using the Boost convention.
+    # https://github.com/zeromq/czmq/issues/577
+    # https://github.com/zeromq/czmq/issues/1972
+    if (MSVC_IDE)
+        set(MSVC_TOOLSET "-${CMAKE_VS_PLATFORM_TOOLSET}")
+    else ()
+        set(MSVC_TOOLSET "")
+    endif ()
+
+    # Retrieve ZeroMQ version number from zmq.h
+    file(STRINGS "${LIBZMQ_INCLUDE_DIRS}/zmq.h" zmq_version_defines
+        REGEX "#define ZMQ_VERSION_(MAJOR|MINOR|PATCH)")
+    foreach(ver ${zmq_version_defines})
+        if(ver MATCHES "#define ZMQ_VERSION_(MAJOR|MINOR|PATCH) +([^ ]+)$")
+            set(ZMQ_VERSION_${CMAKE_MATCH_1} "${CMAKE_MATCH_2}" CACHE INTERNAL "")
+        endif()
+    endforeach()
+
+    set(_zmq_version ${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH})
+
+    set(_zmq_debug_names
+        "libzmq${MSVC_TOOLSET}-mt-gd-${_zmq_version}" # Debug, BUILD_SHARED
+        "libzmq${MSVC_TOOLSET}-mt-sgd-${_zmq_version}" # Debug, BUILD_STATIC
+        "libzmq-mt-gd-${_zmq_version}" # Debug, BUILD_SHARED
+        "libzmq-mt-sgd-${_zmq_version}" # Debug, BUILD_STATIC
+    )
+
+    set(_zmq_release_names
+        "libzmq${MSVC_TOOLSET}-mt-${_zmq_version}" # Release|RelWithDebInfo|MinSizeRel, BUILD_SHARED
+        "libzmq${MSVC_TOOLSET}-mt-s-${_zmq_version}" # Release|RelWithDebInfo|MinSizeRel, BUILD_STATIC
+        "libzmq-mt-${_zmq_version}" # Release|RelWithDebInfo|MinSizeRel, BUILD_SHARED
+        "libzmq-mt-s-${_zmq_version}" # Release|RelWithDebInfo|MinSizeRel, BUILD_STATIC
+    )
+
+    find_library (ZeroMQ_LIBRARY_DEBUG
+        NAMES ${_zmq_debug_names}
+    )
+
+    find_library (ZeroMQ_LIBRARY_RELEASE
+        NAMES ${_zmq_release_names}
+    )
+
+    if (ZeroMQ_LIBRARY_RELEASE AND ZeroMQ_LIBRARY_DEBUG)
+        set(LIBZMQ_LIBRARIES
+            debug ${ZeroMQ_LIBRARY_DEBUG}
+            optimized ${ZeroMQ_LIBRARY_RELEASE}
+        )
+    elseif (ZeroMQ_LIBRARY_RELEASE)
+        set(LIBZMQ_LIBRARIES ${ZeroMQ_LIBRARY_RELEASE})
+    elseif (ZeroMQ_LIBRARY_DEBUG)
+        set(LIBZMQ_LIBRARIES ${ZeroMQ_LIBRARY_DEBUG})
+    endif ()
+endif ()
+
+if (NOT LIBZMQ_LIBRARIES)
+    find_library (
+        LIBZMQ_LIBRARIES
+        NAMES libzmq zmq
+        HINTS ${PC_LIBZMQ_LIBRARY_HINTS}
+    )
+endif ()

 include(FindPackageHandleStandardArgs)


Disable roofit on Windows

Disable roofit on Windows

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -194,6 +194,7 @@
   set(imt_defvalue OFF)
   set(builtin_tbb_defvalue OFF)
   set(tmva_defvalue OFF)
+  set(roofit_defvalue OFF)
   set(roottest_defvalue OFF)
   set(testing_defvalue OFF)
 elseif(APPLE)


install.cmake: Ensure subdirectories have correct permissions

Subdirectories had only user permissions, which was an issue when
installing as root as some file would be unreadable when executing as user.

Change-Id: I3c6ec256435765849cc531c0d87fb79c701226c4

--- cmake/qibuild/internal/install.cmake
+++ cmake/qibuild/internal/install.cmake
@@ -64,6 +64,10 @@
   endif()
   install(DIRECTORY ${_dirs_to_install}
     USE_SOURCE_PERMISSIONS
+    DIRECTORY_PERMISSIONS
+      OWNER_READ OWNER_WRITE OWNER_EXECUTE
+      GROUP_READ GROUP_WRITE GROUP_EXECUTE
+      WORLD_READ             WORLD_EXECUTE
     COMPONENT "${ARG_COMPONENT}"
     DESTINATION "${_dest}"
         PATTERN "*.pyc" EXCLUDE


Fixing failure building RN codegen CLI on Windows (#34791)

Summary:
Ensuring the file paths uses forward slashes as separator to avoid the characters from being interpreted as ASCII escape characters.

## Changelog

Fixing build failure building RN codegen CLI on Windows. Ensuring the file paths uses forward slashes as separator to avoid the characters from being interpreted as ASCII escape characters.

[Android] [Fixed] - Fixing failure building RN codegen CLI on Windows

Pull Request resolved: https://github.com/facebook/react-native/pull/34791

Test Plan: Ensured RN main branch builds on Windows with new architecture turned on.

Reviewed By: cipolleschi

Differential Revision: D39889468

Pulled By: cipolleschi

fbshipit-source-id: 7d79eac9f433908cc86dd7ca2eec841739ef6365

--- ReactAndroid/cmake-utils/ReactNative-application.cmake
+++ ReactAndroid/cmake-utils/ReactNative-application.cmake
@@ -28,9 +28,14 @@

 include(${REACT_ANDROID_DIR}/cmake-utils/Android-prebuilt.cmake)

+set(BUILD_DIR ${PROJECT_BUILD_DIR})
+if(CMAKE_HOST_WIN32)
+        string(REPLACE "\\" "/" BUILD_DIR ${BUILD_DIR})
+endif()
+
 file(GLOB input_SRC CONFIGURE_DEPENDS
         *.cpp
-        ${PROJECT_BUILD_DIR}/generated/rncli/src/main/jni/*.cpp)
+        ${BUILD_DIR}/generated/rncli/src/main/jni/*.cpp)

 add_library(${CMAKE_PROJECT_NAME} SHARED ${input_SRC})


Fix CMake build with LTO enabled

Fix CMake build with LTO enabled

--- cmake/Toolchain-arm-none-eabi.cmake
+++ cmake/Toolchain-arm-none-eabi.cmake
@@ -14,6 +14,8 @@
 set(TARGET_TRIPLE "arm-none-eabi-")
 set(CMAKE_C_COMPILER ${TARGET_TRIPLE}gcc)
 set(CMAKE_CXX_COMPILER ${TARGET_TRIPLE}g++)
+SET(CMAKE_AR ${TARGET_TRIPLE}gcc-ar CACHE STRING "Name of archiving tool for static libraries.")
+SET(CMAKE_RANLIB ${TARGET_TRIPLE}gcc-ranlib CACHE STRING "Name of randomizing tool for static libraries.")
 set(CMAKE_SIZE ${TARGET_TRIPLE}size)

 set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)


oe-sdk_cross.cmake: Added support for OpenJDK Java bindings

Signed-off-by: Andrei Vasiliu <6cdfc3f07526ca8509c79e95022719f3e4f2f781@intel.com>
Signed-off-by: Brendan Le Foll <3e0e8c4069934e8b47d99704927a85c66c0ceb33@intel.com>

--- cmake/Toolchains/oe-sdk_cross.cmake
+++ cmake/Toolchains/oe-sdk_cross.cmake
@@ -17,3 +17,9 @@
 set( ORC_INCLUDE_DIRS $ENV{OECORE_TARGET_SYSROOT}/usr/include/orc-0.4 )
 set( ORC_LIBRARY_DIRS $ENV{OECORE_TARGET_SYSROOT}/usr/lib )

+# for java
+set( JAVA_AWT_INCLUDE_PATH $ENV{JAVA_HOME}/include CACHE PATH "" FORCE)
+set( JAVA_AWT_LIBRARY $ENV{JAVA_HOME}/jre/lib/amd64/libjawt.so CACHE FILEPATH "" FORCE)
+set( JAVA_INCLUDE_PATH $ENV{JAVA_HOME}/include CACHE PATH "" FORCE)
+set( JAVA_INCLUDE_PATH2 $ENV{JAVA_HOME}/include/linux CACHE PATH "" FORCE)
+set( JAVA_JVM_LIBRARY $ENV{JAVA_HOME}/jre/lib/amd64/libjvm.so CACHE FILEPATH "" FORCE)


Moving gbenchmark to latest stable release (v1.3.0) (#32)

--- cmake/modules/GoogleBenchmark.cmake
+++ cmake/modules/GoogleBenchmark.cmake
@@ -6,7 +6,7 @@
 ExternalProject_Add(
   googlebenchmark
   GIT_REPOSITORY https://github.com/google/benchmark.git
-  GIT_TAG master
+  GIT_TAG v1.3.0
   UPDATE_COMMAND ""
   # TIMEOUT 10
   # # Force separate output paths for debug and release builds to allow easy
@@ -40,4 +40,4 @@
 # Register googlebenchmark
 add_library(gbenchmark IMPORTED STATIC GLOBAL)
 set_property(TARGET gbenchmark PROPERTY IMPORTED_LOCATION ${_GBENCH_LIBRARY_PATH}/src/libbenchmark.a)
-add_dependencies(gbenchmark googlebenchmark)+add_dependencies(gbenchmark googlebenchmark)


OpenSSL 1.0.2n

OpenSSL 1.0.2n

--- cmake/projects/OpenSSL/hunter.cmake
+++ cmake/projects/OpenSSL/hunter.cmake
@@ -74,6 +74,17 @@
     "https://github.com/openssl/openssl/archive/OpenSSL_1_1_0g.tar.gz"
     SHA1
     07a8861dfb51d3ba983668f0f8daeac49bf3dbc3
+)
+
+hunter_add_version(
+    PACKAGE_NAME
+    OpenSSL
+    VERSION
+    "1.0.2n"
+    URL
+    "https://github.com/openssl/openssl/archive/OpenSSL_1_0_2n.tar.gz"
+    SHA1
+    6d507bb849c8156f14c2b6f3e269a5e782ff6b82
 )

 hunter_add_version(


OpenSSL: ++PACKAGE_INTERNAL_DEPS_ID

OpenSSL: ++PACKAGE_INTERNAL_DEPS_ID

--- cmake/projects/OpenSSL/hunter.cmake
+++ cmake/projects/OpenSSL/hunter.cmake
@@ -388,4 +388,4 @@
 endif()

 hunter_cacheable(OpenSSL)
-hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID "22")
+hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID "23")


correct url and sha1

correct url and sha1

--- cmake/projects/doctest/hunter.cmake
+++ cmake/projects/doctest/hunter.cmake
@@ -16,9 +16,9 @@
     VERSION
     "1.1.4"
     URL
-    "https://github.com/piribes/doctest/archive/master.tar.gz"
+    "https://github.com/piribes/doctest/archive/hunter.tar.gz"
     SHA1
-    e1184689bed941752f905f6dae9e5b42631ed9a6
+    1b678730f0f36d31e33626d1c7f3130bd709be06
 )

 hunter_cmake_args(doctest CMAKE_ARGS


cmake: qi_use_lib: display an error instead of segfaulting (in infinite recursion)

Change-Id: I5e243399c96e7674694fcb4a4c2876fda7aa2345
Reviewed-on: http://gerrit.aldebaran.lan:8080/1734
Reviewed-by: llec <42f1a1c02cacc0f5b0188f0127ea77bedfdcf21a@aldebaran-robotics.com>
Tested-by: llec <42f1a1c02cacc0f5b0188f0127ea77bedfdcf21a@aldebaran-robotics.com>

--- cmake/qibuild/internal/uselib.cmake
+++ cmake/qibuild/internal/uselib.cmake
@@ -41,6 +41,9 @@
   string(TOUPPER ${name} _U_NAME)

   foreach(_pkg ${ARGN})
+    if (${name} STREQUAL ${_pkg})
+      qi_error("Package ${name} depends on ${_pkg} this is a recursive dependencies, please fix ${name}.")
+    endif()
     string(TOUPPER ${_pkg} _U_PKG)
     # First, we search for *-config.cmake files
     # generated by qiBuild, then we look


Made run script run from the root allosystem dir which simplifies using relative paths in files

--- cmake_modules/CMakeRunTargets.cmake
+++ cmake_modules/CMakeRunTargets.cmake
@@ -163,7 +163,7 @@
 add_custom_target("${APP_NAME}_run"
   COMMAND "${APP_NAME}"
   DEPENDS "${APP_NAME}"
-  WORKING_DIRECTORY "${EXECUTABLE_OUTPUT_PATH}"
+  WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
   SOURCES ${ALLOSYSTEM_APP_SRC}
   COMMENT "Running: ${APP_NAME}")
   option(RUN_IN_DEBUGGER 0) # For next run
@@ -171,7 +171,7 @@
 add_custom_target("${APP_NAME}_run"
   COMMAND "${ALLOSYSTEM_DEBUGGER}" "-ex" "run" "${EXECUTABLE_OUTPUT_PATH}/${APP_NAME}"
   DEPENDS "${APP_NAME}"
-  WORKING_DIRECTORY "${EXECUTABLE_OUTPUT_PATH}"
+  WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
   SOURCES ${ALLOSYSTEM_APP_SRC}
   COMMENT "Running: ${APP_NAME}")


change location of test configuration

change location of test configuration

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -98,5 +98,5 @@
 # add tests
 enable_testing()
 add_test(NAME SIRF_TESTS
-	 COMMAND ${CMAKE_CTEST_COMMAND} test WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/SIRF)
+	 COMMAND ${CMAKE_CTEST_COMMAND} test WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/SIRF-prefix/src/SIRF-build/)


Add missing header pnglibconf.h

Add missing header pnglibconf.h

Signed-off-by: Yong Tang <765086fe2e0c1f980161f127fec596800f327f62@outlook.com>

--- tensorflow/contrib/cmake/external/png.cmake
+++ tensorflow/contrib/cmake/external/png.cmake
@@ -41,6 +41,7 @@
 set(png_HEADERS
     "${png_INSTALL}/include/libpng16/png.h"
     "${png_INSTALL}/include/libpng16/pngconf.h"
+    "${png_INSTALL}/include/libpng16/pnglibconf.h"
 )

 ExternalProject_Add(png


appveyor dev+ - back to wrong FindFileno.cmake [ci skip]

--- 3rdparty/github/cmake-utils/cmake/FindFileno.cmake
+++ 3rdparty/github/cmake-utils/cmake/FindFileno.cmake
@@ -23,16 +23,12 @@
         MESSAGE(STATUS "Looking for ${KEYWORD}")
         TRY_COMPILE (C_HAS_${KEYWORD} ${CMAKE_CURRENT_BINARY_DIR}
           ${source_dir}/fileno.c
-          COMPILE_DEFINITIONS -DC_FILENO=${KEYWORD} -DHAVE_STDIO_H=${_HAVE_STDIO_H}
-          OUTPUT_VARIABLE C_HAS_${KEYWORD}_OUTPUT)
+          COMPILE_DEFINITIONS "-DC_FILENO=${KEYWORD} -DHAVE_STDIO_H=${_HAVE_STDIO_H}")
         IF (C_HAS_${KEYWORD})
           MESSAGE(STATUS "Looking for ${KEYWORD} - found")
           SET (_C_FILENO ${KEYWORD})
           SET (_C_FILENO_FOUND TRUE)
           BREAK ()
-        ELSE ()
-          MESSAGE(WARNING "Looking for ${KEYWORD} - failure")
-          MESSAGE(WARNING ${C_HAS_${KEYWORD}_OUTPUT})
         ENDIF ()
       ENDFOREACH ()
     ENDIF ()


Updated to TBB version with corrected debug library names

--- cmake/BuildExternalTBB.cmake
+++ cmake/BuildExternalTBB.cmake
@@ -10,7 +10,7 @@
 ExternalProject_Add(TBB
 	PREFIX ${VENDOR_PREFIX}
 	GIT_REPOSITORY https://github.com/anhstudios/tbb.git
-	GIT_TAG 5909edfd
+	GIT_TAG 6656acc
 	BUILD_IN_SOURCE 1
 	UPDATE_COMMAND ""
 	CONFIGURE_COMMAND ""


Update variant to v1.4.0 single file

Update variant to v1.4.0 single file

--- cmake/external/variant.cmake
+++ cmake/external/variant.cmake
@@ -1,4 +1,4 @@
-SET(VARIANT_RELEASE_VERSION v1.3.0)
+SET(VARIANT_RELEASE_VERSION v1.4.0)
 SET(VARIANT_SOURCE_DIR ${THIRD_PARTY_DIR}/variant)
 SET(VARIANT_INCLUDE_DIR ${THIRD_PARTY_INCLUDE_DIR}/variant)
 include(ExternalProject)
@@ -7,10 +7,10 @@
 		PREFIX ${CMAKE_BINARY_DIR}/variant
 		SOURCE_DIR ${VARIANT_SOURCE_DIR}
 		GIT_REPOSITORY https://github.com/mpark/variant.git
-		GIT_TAG caaff9a8cb00b7897ee581e2916e78a6bb916b20
+		GIT_TAG e4e5d8d5b24f8206a1e78b5a8da7c428be77962c
 		CONFIGURE_COMMAND ""
 		BUILD_COMMAND ""
-		INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${VARIANT_SOURCE_DIR}/include/mpark ${VARIANT_INCLUDE_DIR}
+		INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_if_different ${VARIANT_SOURCE_DIR}/${VARIANT_RELEASE_VERSION}/variant.hpp ${VARIANT_INCLUDE_DIR}/variant.hpp
 )

 add_dependencies(libshogun variant)


CMake: use `_WINDLL` rather than `_USRDLL`

`_USRDLL` is used to indicate that you are building a MFC DLL while
`_WINDLL` is specified for **ALL** DLL builds.  Use the correct macro.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1774,7 +1774,7 @@
       # building both simultaneously.  Effectively, only shared builds are
       # supported on windows currently.
       if(SWIFTLIB_SHARED)
-        list(APPEND swiftlib_swift_compile_flags_all -D_USRDLL)
+        list(APPEND swiftlib_swift_compile_flags_all -D_WINDLL)
         if(SWIFTLIB_IS_STDLIB_CORE)
           list(APPEND swiftlib_swift_compile_flags_all -DswiftCore_EXPORTS)
         endif()


Fix udev cmake module

Fix udev cmake module

Add /lib/ as possible prefix for shared library.

--- cmake/modules/FindUDev.cmake
+++ cmake/modules/FindUDev.cmake
@@ -21,6 +21,7 @@
     UDEV_LIBRARIES
     NAMES udev libudev
     PATHS
+        /lib/${LIB_SUFFIX}
         /usr/lib${LIB_SUFFIX}
         /usr/local/lib${LIB_SUFFIX}
         ${UDEV_PATH_LIB}


Build system: change pkg-config *.pc file default install location

My previous choice of ${CMAKE_INSTALL_DATADIR}/pkgconfig for the
default value of CMAKE_INSTALL_PKG_CONFIG_DIR is an architecture-
independent location, but as pointed out by Orion the contents of
these *.pc files very much depend on architecture. Therefore, I have
changed the default install location to
+${CMAKE_INSTALL_LIBDIR}/pkgconfig which has the added advantage that
most disto packagers will only need to override CMAKE_INSTALL_LIBDIR
alone to get the correct CMAKE_INSTALL_PKG_CONFIG_DIR result without
having to override CMAKE_INSTALL_PKG_CONFIG_DIR as well.

--- cmake/modules/instdirs.cmake
+++ cmake/modules/instdirs.cmake
@@ -73,7 +73,7 @@

 set(
 CMAKE_INSTALL_PKG_CONFIG_DIR
-${CMAKE_INSTALL_DATADIR}/pkgconfig
+${CMAKE_INSTALL_LIBDIR}/pkgconfig
 CACHE PATH "install location for pkg-config *.pc files"
 )


CMake: Bugfix: Force cached CMAKE_BUILD_TYPE in testsuite

--- tests/setup_testsubproject.cmake
+++ tests/setup_testsubproject.cmake
@@ -1,6 +1,6 @@
 FIND_PACKAGE(deal.II 8.0 REQUIRED HINTS ${DEAL_II_DIR})

-SET(CMAKE_BUILD_TYPE DebugRelease)
+SET(CMAKE_BUILD_TYPE DebugRelease CACHE STRING "" FORCE)
 DEAL_II_INITIALIZE_CACHED_VARIABLES()

 #


Appease TC cmake OCD about substring args

--- indra/cmake/ConfigurePkgConfig.cmake
+++ indra/cmake/ConfigurePkgConfig.cmake
@@ -62,7 +62,7 @@
   SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:/usr/share/pkgconfig:/usr/local/share/pkgconfig")

   # Remove first unwanted ':'
-  string(SUBSTRING ${VALID_PKG_LIBDIRS} 1 -1 VALID_PKG_LIBDIRS)
+  string(SUBSTRING ${VALID_PKG_LIBDIRS} 1 0 VALID_PKG_LIBDIRS)

   # Set PKG_CONFIG_LIBDIR environment.
   SET(ENV{PKG_CONFIG_LIBDIR} ${VALID_PKG_LIBDIRS})


cmake/log4cpp: enable crosscompile

cmake/log4cpp: enable crosscompile

--- cmake/Modules/Buildlog4cpp.cmake
+++ cmake/Modules/Buildlog4cpp.cmake
@@ -2,6 +2,10 @@
   message(FATAL_ERROR "windows build is currently only supported with mingw")
 else()
   if(MINGW)
+    if(DEFINED CMAKE_TOOLCHAIN_FILE)
+      set(CROSSCOMPILE_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE})
+    endif()
+
     set(LOG4CPP_INSTALL_DIR ${CMAKE_EXTERNAL_BINARY_DIR}/log4cpp)
     ExternalProject_Add(
       log4cpp
@@ -9,18 +13,9 @@
       URL_MD5 ${LOG4CPP_MD5}
       UPDATE_COMMAND ""
       PATCH_COMMAND ${PATCH_EXECUTABLE} -p1 -i ${CMAKE_PATCH_DIR}/log4cpp-mingw.patch
-      CONFIGURE_COMMAND ./configure
-        --disable-dot
-        --disable-doxygen
-        --disable-html-docs
-        --without-idsa
-        --disable-latex-docs
-        --enable-shared
-        --disable-static
-        --prefix=${LOG4CPP_INSTALL_DIR}
-      BUILD_IN_SOURCE 1
+      CMAKE_ARGS ${CROSSCOMPILE_OPTIONS} -DCMAKE_INSTALL_PREFIX=${LOG4CPP_INSTALL_DIR} -DCMAKE_CXX_FLAGS=${ADD_CXX_FLAGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
     )
-    set(LOG4CPP_LIBRARIES "${LOG4CPP_INSTALL_DIR}/lib/liblog4cpp.a")
+    set(LOG4CPP_LIBRARIES "${LOG4CPP_INSTALL_DIR}/lib/liblog4cpp.dll.a")
     set(LOG4CPP_INCLUDE_DIR "${LOG4CPP_INSTALL_DIR}/include")
   else()
     message(FATAL_ERROR "building log4cpp isn't supported on plattform except mingw")


Prefer explicitly-specified SuiteSparse over system install

--- cmake/Packages/SuiteSparse.cmake
+++ cmake/Packages/SuiteSparse.cmake
@@ -60,7 +60,8 @@
   FOREACH (_lib ${SUITESPARSE_REQUIRED_LIBS})
     FIND_LIBRARY (my_${_lib}
       NAMES ${_lib}
-      PATHS $ENV{SUITESPARSEROOT}/lib)
+      PATHS $ENV{SUITESPARSEROOT}/lib
+      NO_DEFAULT_PATH)
     FIND_LIBRARY (my_${_lib}
       NAMES ${_lib})
     LIST (APPEND SUITESPARSE_LIBRARIES ${my_${_lib}})


CELIX-446: Fixes a wrong cmake function call in the Celix Runtimes cmake

--- cmake/cmake_celix/Runtimes.cmake
+++ cmake/cmake_celix/Runtimes.cmake
@@ -118,7 +118,7 @@
     celix_runtime_release_files(${RUNTIME_TARGET_NAME} ${RUNTIME_RELEASE_FILES})

     if (RUNTIME_WAIT_FOR)
-        celix_runtime_deployment_wait_for(${RUNTIME_TARGET_NAME} ${RUNTIME_WAIT_FOR})
+        celix_runtime_container_wait_for(${RUNTIME_TARGET_NAME} ${RUNTIME_WAIT_FOR})
     endif ()

 endfunction()
@@ -250,4 +250,4 @@
         list(APPEND RELEASE_FILES "source ${RELEASE_FILE}")
     endforeach()
     set_target_properties(${RUNTIME_NAME} PROPERTIES "RELEASE_FILES" "${RELEASE_FILES}")
-endfunction()+endfunction()


Only call find_package for TinyXML2 if thirdparty options are off [6889] (#867)

* Only call find_package for TinyXML2 if thirdparty options are off

* correct style

--- cmake/modules/FindTinyXML2.cmake
+++ cmake/modules/FindTinyXML2.cmake
@@ -4,7 +4,10 @@

 option(TINYXML2_FROM_SOURCE "Integrate TinyXML2 source code inside Fast RTPS" OFF)

-find_package(TinyXML2 CONFIG QUIET)
+if(NOT (TINYXML2_FROM_SOURCE OR THIRDPARTY))
+    find_package(TinyXML2 CONFIG QUIET)
+endif()
+
 if(TinyXML2_FOUND AND NOT THIRDPARTY)
     message(STATUS "Found TinyXML2: ${TinyXML2_DIR}")
     if(NOT TINYXML2_LIBRARY)
@@ -27,7 +30,6 @@
         find_path(TINYXML2_INCLUDE_DIR NAMES tinyxml2.h)
     endif()

-
     if(TINYXML2_FROM_SOURCE)
         find_path(TINYXML2_SOURCE_DIR NAMES tinyxml2.cpp NO_CMAKE_FIND_ROOT_PATH)
     else()
@@ -38,11 +40,9 @@

     if(TINYXML2_FROM_SOURCE)
         find_package_handle_standard_args(tinyxml2 DEFAULT_MSG TINYXML2_SOURCE_DIR TINYXML2_INCLUDE_DIR)
-
         mark_as_advanced(TINYXML2_INCLUDE_DIR TINYXML2_SOURCE_DIR)
     else()
         find_package_handle_standard_args(tinyxml2 DEFAULT_MSG TINYXML2_LIBRARY TINYXML2_INCLUDE_DIR)
-
         mark_as_advanced(TINYXML2_INCLUDE_DIR TINYXML2_LIBRARY)
     endif()
 endif()


Fixes Cmake error "Unrecognized architecture on host system: armv7-a"

--- cmake/modules/SwiftSupport.cmake
+++ cmake/modules/SwiftSupport.cmake
@@ -260,6 +260,8 @@
     set("${result_var_name}" "armv6" PARENT_SCOPE)
   elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "armv7l")
     set("${result_var_name}" "armv7" PARENT_SCOPE)
+  elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "armv7-a")
+    set("${result_var_name}" "armv7" PARENT_SCOPE)
   elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64")
     set("${result_var_name}" "x86_64" PARENT_SCOPE)
   elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "IA64")


Fixed small issue in FindKerberos.cmake which produced a warning

--- cmake_modules/FindKerberos.cmake
+++ cmake_modules/FindKerberos.cmake
@@ -38,7 +38,7 @@
 endif (KERBEROS_LIBRARY)

 # Copy the results to the output variables.
-if(SASL_LIBRARY)
+if(KERBEROS_LIBRARY)
   set(KERBEROS_FOUND 1)
 else(KERBEROS_LIBRARY)
   set(KERBEROS_FOUND 0)


[CI] revert: VV option is really too verbose for travis!

--- CI/cmake/Docker.cmake
+++ CI/cmake/Docker.cmake
@@ -97,7 +97,7 @@
   # the options needed by ctest to prepare the pipeline (cmake, make ...)
   # like SITE, config file ...
   # If CI_OPTIONS is empty, default.cmake will be used.
-  set(CTEST_OPTIONS ${CI_OPTIONS};-DWITH_DOCKER=0;-VV)
+  set(CTEST_OPTIONS ${CI_OPTIONS};-DWITH_DOCKER=0;-V)

   foreach(_f ${CTEST_OPTIONS})


Fix enabling sanitizers.

Fix enabling sanitizers.

`MAKEFLAGS` was used by core's `build.sh`, and now that we're not using
it we need to pass `EXTRA_CFLAGS` and `EXTRA_LDFLAGS` directly to make.

--- CMake/RealmCore.cmake
+++ CMake/RealmCore.cmake
@@ -22,10 +22,8 @@
     set(MAKE_EQUAL_MAKE "MAKE=$(MAKE)")
 endif()

-if(SANITIZE_ADDRESS)
-  set(EXPORT_MAKEFLAGS export MAKEFLAGS='EXTRA_CFLAGS=-fsanitize=address EXTRA_LDFLAGS=-fsanitize=address')
-else()
-  set(EXPORT_MAKEFLAGS true)
+if(SANITIZER_FLAGS)
+  set(MAKE_FLAGS "EXTRA_CFLAGS=${SANITIZER_FLAGS}" "EXTRA_LDFLAGS=${SANITIZER_FLAGS}")
 endif()

 if (${CMAKE_VERSION} VERSION_GREATER "3.4.0")
@@ -117,7 +115,7 @@
         PREFIX ${core_prefix_directory}
         BUILD_IN_SOURCE 1
         CONFIGURE_COMMAND ""
-        BUILD_COMMAND ${EXPORT_MAKEFLAGS} && make -C src/realm librealm.a librealm-dbg.a
+        BUILD_COMMAND make -C src/realm librealm.a librealm-dbg.a ${MAKE_FLAGS}
         INSTALL_COMMAND ""
         ${USES_TERMINAL_BUILD}
         )
@@ -135,7 +133,7 @@
         BUILD_IN_SOURCE 1
         BUILD_ALWAYS 1
         CONFIGURE_COMMAND ""
-        BUILD_COMMAND ${EXPORT_MAKEFLAGS} && make -C src/realm librealm.a librealm-dbg.a
+        BUILD_COMMAND make -C src/realm librealm.a librealm-dbg.a ${MAKE_FLAGS}
         INSTALL_COMMAND ""
         ${USES_TERMINAL_BUILD}
         )


One more debian specific install item not to do on windows

--- cmake/ArangoDBMacros.cmake
+++ cmake/ArangoDBMacros.cmake
@@ -369,15 +369,16 @@
     "${CMAKE_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY)
 set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_BINARY_DIR}/CMakeCPackOptions.cmake")

-# components
-install(
-  FILES ${PROJECT_SOURCE_DIR}/Installation/debian/arangodb.init
-  PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
-  DESTINATION etc/init.d
-  RENAME arangodb
-  COMPONENT debian-extras
-)
-
+if (NOT(MSVC))
+  # components
+  install(
+    FILES ${PROJECT_SOURCE_DIR}/Installation/debian/arangodb.init
+    PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+    DESTINATION etc/init.d
+    RENAME arangodb
+    COMPONENT debian-extras
+  )
+endif()

 # Custom targets ----------------------------------------------------------------


disable RTCc

disable RTCc

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -75,9 +75,9 @@
         # /wd4201     # -> disable warning: nonstandard extension used: nameless struct/union (caused by GLM)
         # /wd4127     # -> disable warning: conditional expression is constant (caused by Qt)

-        $<$<CONFIG:Debug>:
-        /RTCc         # -> value is assigned to a smaller data type and results in a data loss
-        >
+        #$<$<CONFIG:Debug>:
+        #/RTCc         # -> value is assigned to a smaller data type and results in a data loss
+        #>

         $<$<CONFIG:Release>:
         /Gw           # -> whole program global optimization


Changed way gtest shared library names are specified

--- cmake/External_gtest.cmake
+++ cmake/External_gtest.cmake
@@ -26,12 +26,12 @@
 # Set gtest properties
 ExternalProject_Get_Property(gtest source_dir binary_dir)
 set_target_properties(libgtest PROPERTIES
-    "IMPORTED_LOCATION" "${binary_dir}/libgtest.so"
+    "IMPORTED_LOCATION" "${binary_dir}/${CMAKE_SHARED_LIBRARY_PREFIX}gtest${CMAKE_SHARED_LIBRARY_SUFFIX}"
     "IMPORTED_LINK_INTERFACE_LIBRARIES" "${CMAKE_THREAD_LIBS_INIT}"
 #    "INTERFACE_INCLUDE_DIRECTORIES" "${source_dir}/include"
 )
 set_target_properties(libgtest_main PROPERTIES
-    "IMPORTED_LOCATION" "${binary_dir}/libgtest_main.so"
+    "IMPORTED_LOCATION" "${binary_dir}/${CMAKE_SHARED_LIBRARY_PREFIX}gtest_main${CMAKE_SHARED_LIBRARY_SUFFIX}"
     "IMPORTED_LINK_INTERFACE_LIBRARIES" "${CMAKE_THREAD_LIBS_INIT}"
 #    "INTERFACE_INCLUDE_DIRECTORIES" "${source_dir}/include"
 )


Move some qscintilla2 brew stuff into variables

--- cmake/FindQScintilla.cmake
+++ cmake/FindQScintilla.cmake
@@ -47,6 +47,8 @@
         # or not it actually is.  I'd rather play it safe and not assume the
         # command succeeded, though.
         set(QSCINTILLA_BREW_ROOT "${BREW_PREFIX_OUTPUT}")
+        set(QSCINTILLA_BREW_INCLUDE_DIR "${QSCINTILLA_BREW_ROOT}/include")
+        set(QSCINTILLA_BREW_LIBRARY "${QSCINTILLA_BREW_ROOT}/lib")
         message(STATUS "qscintilla2's brew root is ${QSCINTILLA_BREW_ROOT}")
       endif()

@@ -60,13 +62,13 @@

 find_path(QSCINTILLA_INCLUDE_DIR
   NAMES Qsci qsciglobal.h
-  PATHS "${Qt5Core_INCLUDE_DIRS}" "${PC_QSCINTILLA_INCLUDE_DIRS}" "${QSCINTILLA_BREW_ROOT}/include" /usr/include/x86_64-linux-gnu/qt5
+  PATHS "${Qt5Core_INCLUDE_DIRS}" "${PC_QSCINTILLA_INCLUDE_DIRS}" "${QSCINTILLA_BREW_INCLUDE_DIR}" /usr/include/x86_64-linux-gnu/qt5
   PATH_SUFFIXES Qsci
 )

 find_library(QSCINTILLA_LIBRARY
   NAMES qt5scintilla2 libqt5scintilla2 "${PC_QSCINTILLA_LIBRARIES}"
-  PATHS "${Qt5Core_LIBRARIES}" "${PC_QSCINTILLA_LIBRARY_DIRS}" "${QSCINTILLA_BREW_ROOT}/lib"
+  PATHS "${Qt5Core_LIBRARIES}" "${PC_QSCINTILLA_LIBRARY_DIRS}" "${QSCINTILLA_BREW_LIBRARY}"
 )

 set(QSCINTILLA_PROCESS_LIBRARIES QSCINTILLA_LIBRARY QSCINTILLA_LIBRARIES)


Add revert command for eigen patch to make incremental build happy. (#2774)

--- cmake/external_eigen.cmake
+++ cmake/external_eigen.cmake
@@ -24,13 +24,17 @@
 # Download Eigen
 #------------------------------------------------------------------------------

+# Revert prior changes to make incremental build work.
+set(EIGEN_PATCH_REVERT_COMMAND cd ${EXTERNAL_PROJECTS_ROOT}/eigen/src/ext_eigen && git reset HEAD --hard)
+
 ExternalProject_Add(
     ext_eigen
     PREFIX eigen
     GIT_REPOSITORY ${EIGEN_GIT_URL}
     GIT_TAG ${EIGEN_GIT_TAG}
     UPDATE_COMMAND ""
-    PATCH_COMMAND git apply --ignore-space-change --ignore-whitespace ${CMAKE_SOURCE_DIR}/cmake/eigen.patch
+    PATCH_COMMAND ${EIGEN_PATCH_REVERT_COMMAND}
+    COMMAND git apply --ignore-space-change --ignore-whitespace ${CMAKE_SOURCE_DIR}/cmake/eigen.patch
     CONFIGURE_COMMAND ""
     BUILD_COMMAND ""
     INSTALL_COMMAND ""


deps: update driver version

deps: update driver version

Co-authored-by: Leonardo Grasso <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@leonardograsso.com>
Signed-off-by: Leonardo Di Donato <2012e0ca99d70aa6c893822ff73002216e5dba72@gmail.com>

--- cmake/modules/sysdig.cmake
+++ cmake/modules/sysdig.cmake
@@ -30,7 +30,7 @@
 # -DSYSDIG_VERSION=dev ..`
 if(NOT SYSDIG_VERSION)
   set(SYSDIG_VERSION "build/stripped") # todo(leogr): set the correct version and checksum before merging
-  set(SYSDIG_CHECKSUM "SHA256=9c7755ae7aaa221a3d17c1d98911c4c2cbdbd21317559d744e53bf63a2677a4b")
+  set(SYSDIG_CHECKSUM "SHA256=bd0eb18d80c3ac14e9fb1b7b72c8ad1605a3c6dbcff15a1f6d1824557f2b6e49")
 endif()
 set(PROBE_VERSION "${SYSDIG_VERSION}")


qibuild/python.cmake: make sure to use python from the host (#33333)

python executable from the toolchain does not have access to libraries
installed in the host for instance

Change-Id: I20ce9d69bd824f147751c5a09b4ee6054520c616
Reviewed-on: http://gerrit.aldebaran.lan/67076
Reviewed-by: vbarbaresi <371b46c96c99af52f4f920034e4fcb63ece5bdb5@aldebaran-robotics.com>
Tested-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>

--- cmake/qibuild/python.cmake
+++ cmake/qibuild/python.cmake
@@ -17,7 +17,7 @@
 set(_QI_PYTHON_CMAKE TRUE)

-find_program(PYTHON2_EXECUTABLE NAMES python2 python)
+find_program(PYTHON2_EXECUTABLE NAMES python2 python NO_CMAKE_PATH)

 function(_set_qibuild_python_path)
   if(WIN32)


cmake: uselib: cosmetic changes

cmake: uselib: cosmetic changes

--- cmake/qibuild/uselib.cmake
+++ cmake/qibuild/uselib.cmake
@@ -15,6 +15,13 @@
 set(_QI_USELIB_CMAKE_ TRUE)

+# Set CMAKE_FIND_LIBRARY_SUFFIXES so that
+# only static libs are searched when ${pkg}_STATIC
+# is set.
+# The _backup argument will be set to the previous
+# value of CMAKE_FIND_LIBRARY_SUFFIXES.
+# Don't forget to call _qi_disable_check_for_static(_backup)
+# afterwards !
 function(_qi_check_for_static pkg _backup)
   set(${_backup} ${CMAKE_FIND_LIBRARY_SUFFIXES} PARENT_SCOPE)
   if(${pkg}_STATIC)
@@ -24,7 +31,7 @@
   endif()
 endfunction()

-function(_qi_disable_check_for_static pkg _backup)
+function(_qi_disable_check_for_static _backup)
   set(CMAKE_FIND_LIBRARY_SUFFIXES "${_backup}" PARENT_SCOPE)
 endfunction()

@@ -60,7 +67,7 @@
         find_package(${_pkg} QUIET REQUIRED)
       endif()

-      _qi_disable_check_for_static("${_pkg}" "${_backup_static}")
+      _qi_disable_check_for_static("${_backup_static}")

       qi_set_global("${_U_PKG}_SEARCHED" TRUE)
     endif()


cmake: use file expressions to find smfc

--- cmake/smfc_generator.cmake
+++ cmake/smfc_generator.cmake
@@ -7,7 +7,11 @@
   # Do not put outside of function. We need them discovered later
   # per invocation
   find_program (FLATBUFFERS_COMPILER flatc)
-  find_program (SMF_COMPILER smfc)
+  set(SMF_COMPILER $<TARGET_FILE:smfc>)
+  # find_program (SMF_COMPILER smfc)
+  # if(SMF_COMPILER-NOTFOUND)
+  #   set(SMF_COMPILER $<TARGET_FILE:smfc>)
+  # endif()

   # We need one per generator so we can pass it to the flatc compiler
   #


Remove the CMake check for Boost I missed out on.

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -32,13 +32,6 @@
 check_type_size("double" SIZEOF_DOUBLE)
 if(NOT ${SIZEOF_DOUBLE} EQUAL 8)
   message(FATAL_ERROR "TagLib requires that double is 64-bit wide.")
-endif()
-
-# Enable check_cxx_source_compiles() to work with Boost "header-only" libraries.
-
-find_package(Boost)
-if(Boost_FOUND)
-  set(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${Boost_INCLUDE_DIRS}")
 endif()

 # Determine which kind of atomic operations your compiler supports.


BUG: CMAKE_BUILD_TYPE does not exist on Windows

--- Common.cmake
+++ Common.cmake
@@ -25,7 +25,9 @@

 set(ITK_VERSION_MAJOR 4 CACHE STRING "Choose the expected ITK4 major version to build SPHARM-PDM.")
 # Set the possible values of ITK major version for cmake-gui
-set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
+if( NOT WIN32 )
+  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
+endif()
 if(NOT ${ITK_VERSION_MAJOR} STREQUAL "4")
   message(FATAL_ERROR "ITK_VERSION_MAJOR should be 4")
 endif()


COMP: Fix build against recent Slicer removing specific version requirements

--- Common.cmake
+++ Common.cmake
@@ -65,7 +65,7 @@
 set(${LOCAL_PROJECT_NAME}_CLI_EXECUTABLE_LINK_FLAGS "")

 if(${LOCAL_PROJECT_NAME}_BUILD_SLICER_EXTENSION)
-  find_package(Slicer 4.9 REQUIRED)
+  find_package(Slicer REQUIRED)
   include(${Slicer_USE_FILE})
   mark_as_superbuild(Slicer_DIR)


updates to FindTBB.cmake

updates to FindTBB.cmake

--- common/cmake/FindTBB.cmake
+++ common/cmake/FindTBB.cmake
@@ -32,9 +32,14 @@
   SET(TBB_ROOT /opt/intel/composerxe/tbb/ CACHE STRING "Root of TBB installation")

   FIND_PATH(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include)
-  FIND_LIBRARY(TBB_LIBRARY tbb PATHS ${TBB_ROOT}/lib ${TBB_ROOT}/lib/intel64/gcc4.4)
-  FIND_LIBRARY(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${TBB_ROOT}/lib ${TBB_ROOT}/lib/intel64/gcc4.4)
-
+  IF (APPLE)
+    FIND_LIBRARY(TBB_LIBRARY tbb PATHS ${TBB_ROOT}/lib)
+    FIND_LIBRARY(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${TBB_ROOT}/lib)
+  ELSE()
+    FIND_LIBRARY(TBB_LIBRARY tbb PATHS ${TBB_ROOT}/lib/intel64/gcc4.4)
+    FIND_LIBRARY(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${TBB_ROOT}/lib/intel64/gcc4.4)
+  ENDIF()
+
   FIND_PATH(TBB_INCLUDE_DIR_MIC tbb/task_scheduler_init.h NO_DEFAULT_PATH PATHS ${TBB_ROOT}/include)
   FIND_LIBRARY(TBB_LIBRARY_MIC tbb NO_DEFAULT_PATH PATHS ${TBB_ROOT}/lib/mic)
   FIND_LIBRARY(TBB_LIBRARY_MALLOC_MIC tbbmalloc NO_DEFAULT_PATH PATHS ${TBB_ROOT}/lib/mic)


Remove old cc_rules cruft. (#6388)

Remove old cc_rules cruft. (#6388)

This is left-over from the migration completed in #5323 (as part of
b/152883646).

Briefly, we used have much more complex self-contained rules that tried
to manage sources, dependencies, and everything in a single rule like
firebase_ios_cc_library. The migration added functions like
firebase_ios_add_library that more closely matched builtin CMake
primitives. I should have sent this PR as the final one in that
sequence.

--- cmake/cc_rules.cmake
+++ cmake/cc_rules.cmake
@@ -151,156 +151,6 @@
   endif()
 endfunction()

-
-# firebase_ios_cc_library(
-#   target
-#   SOURCES sources...
-#   DEPENDS libraries...
-#   [EXCLUDE_FROM_ALL]
-# )
-#
-# Defines a new library target with the given target name, sources, and
-# dependencies.
-function(firebase_ios_cc_library name)
-  set(flag DISABLE_STRICT_WARNINGS EXCLUDE_FROM_ALL HEADER_ONLY)
-  set(multi DEPENDS SOURCES)
-  cmake_parse_arguments(ccl "${flag}" "" "${multi}" ${ARGN})
-
-  if(ccl_HEADER_ONLY)
-    firebase_ios_generate_dummy_source(${name} ccl_SOURCES)
-  endif()
-
-  firebase_ios_maybe_remove_objc_sources(sources ${ccl_SOURCES})
-  add_library(${name} ${sources})
-
-  set(warnings_flag "")
-  if(ccl_DISABLE_STRICT_WARNINGS)
-    set(warnings_flag DISABLE_STRICT_WARNINGS)
-  endif()
-  firebase_ios_add_compile_options(${name} ${warnings_flag} ${sources})
-
-  target_compile_options(${name} PRIVATE ${FIREBASE_IOS_CXX_FLAGS})
-  target_link_libraries(${name} PUBLIC ${ccl_DEPENDS})
-
-  if(ccl_EXCLUDE_FROM_ALL)
-    set_property(
-      TARGET ${name}
-      PROPERTY EXCLUDE_FROM_ALL ON
-    )
-  endif()
-endfunction()
-
-# firebase_ios_cc_select(
-#   interface_library
-#   CONDITION1 implementation_library1
-#   [CONDITION2 implementation_library2 ...]
-#   [DEFAULT implementation_library_default]
-# )
-#
-# Creates an INTERFACE library named `interface_library`.
-#
-# For each pair of condition and implementation_library, evaluates the condition
-# and if true makes that library an INTERFACE link library of
-# `interface_library`.
-#
-# If supplied, uses the `DEFAULT` implementation if no other condition matches.
-#
-# If no condition matches, fails the configuration cycle with an error message
-# indicating that no suitable implementation was found.
-function(firebase_ios_cc_select library_name)
-  add_library(${library_name} INTERFACE)
-
-  list(LENGTH ARGN length)
-  if(length GREATER 0)
-    math(EXPR length "${length} - 1")
-    foreach(key RANGE 0 ${length} 2)
-      math(EXPR value "${key} + 1")
-      list(GET ARGN ${key} condition)
-      list(GET ARGN ${value} impl_library)
-
-      if((${condition} STREQUAL "DEFAULT") OR (${${condition}}))
-        message("Using ${library_name} = ${impl_library}")
-        target_link_libraries(
-          ${library_name} INTERFACE ${impl_library}
-        )
-        return()
-      endif()
-    endforeach()
-  endif()
-
-  message(FATAL_ERROR "Could not find implementation for ${library_name}")
-endfunction()
-
-# firebase_ios_cc_binary(
-#   target
-#   SOURCES sources...
-#   DEPENDS libraries...
-#   [EXCLUDE_FROM_ALL]
-# )
-#
-# Defines a new executable target with the given target name, sources, and
-# dependencies.
-function(firebase_ios_cc_binary name)
-  set(flag DISABLE_STRICT_WARNINGS EXCLUDE_FROM_ALL)
-  set(multi DEPENDS SOURCES)
-  cmake_parse_arguments(ccb "${flag}" "" "${multi}" ${ARGN})
-
-  firebase_ios_maybe_remove_objc_sources(sources ${ccb_SOURCES})
-  add_executable(${name} ${sources})
-
-  set(warnings_flag "")
-  if(ccb_DISABLE_STRICT_WARNINGS)
-    set(warnings_flag DISABLE_STRICT_WARNINGS)
-  endif()
-  firebase_ios_add_compile_options(${name} ${warnings_flag} ${sources})
-
-  target_compile_options(${name} PRIVATE ${FIREBASE_CXX_FLAGS})
-  target_include_directories(${name} PRIVATE ${FIREBASE_SOURCE_DIR})
-  target_link_libraries(${name} PRIVATE ${ccb_DEPENDS})
-
-  if(ccb_EXCLUDE_FROM_ALL)
-    set_property(
-      TARGET ${name}
-      PROPERTY EXCLUDE_FROM_ALL ON
-    )
-  endif()
-endfunction()
-
-# firebase_ios_cc_test(
-#   target
-#   SOURCES sources...
-#   DEPENDS libraries...
-# )
-#
-# Defines a new test executable target with the given target name, sources, and
-# dependencies.  Implicitly adds DEPENDS on GTest::GTest and GTest::Main.
-function(firebase_ios_cc_test name)
-  if(NOT FIREBASE_IOS_BUILD_TESTS)
-    return()
-  endif()
-
-  set(flag DISABLE_STRICT_WARNINGS)
-  set(multi DEPENDS SOURCES)
-  cmake_parse_arguments(cct "${flag}" "" "${multi}" ${ARGN})
-
-  list(APPEND cct_DEPENDS GTest::GTest GTest::Main)
-
-  firebase_ios_maybe_remove_objc_sources(sources ${cct_SOURCES})
-  add_executable(${name} ${sources})
-
-  set(warnings_flag "")
-  if(cct_DISABLE_STRICT_WARNINGS)
-    set(warnings_flag DISABLE_STRICT_WARNINGS)
-  endif()
-  firebase_ios_add_compile_options(${name} ${warnings_flag} ${sources})
-
-  add_test(${name} ${name})
-
-  target_compile_options(${name} PRIVATE ${FIREBASE_CXX_FLAGS})
-  target_include_directories(${name} PRIVATE ${FIREBASE_SOURCE_DIR})
-  target_link_libraries(${name} PRIVATE ${cct_DEPENDS})
-endfunction()
-
 # firebase_ios_add_fuzz_test(
 #   target
 #   DICTIONARY dict_file
@@ -346,77 +196,6 @@
           ${ccf_CORPUS} ${target}_seed_corpus
     )
   endif()
-endfunction()
-
-# maybe_remove_objc_sources(output_var sources...)
-#
-# Removes Objective-C/C++ sources from the given sources if not on an Apple
-# platform. Stores the resulting list in the variable named by `output_var`.
-function(firebase_ios_maybe_remove_objc_sources output_var)
-  unset(sources)
-  foreach(source ${ARGN})
-    get_filename_component(ext ${source} EXT)
-    if(NOT APPLE AND ((ext STREQUAL ".m") OR (ext STREQUAL ".mm")))
-      continue()
-    endif()
-    list(APPEND sources ${source})
-  endforeach()
-  set(${output_var} ${sources} PARENT_SCOPE)
-endfunction()
-
-# firebase_ios_add_compile_options(target [DISABLE_STRICT_WARNINGS] sources...)
-#
-# Adds FIREBASE_IOS_CXX_FLAGS or FIREBASE_IOS_CXX_FLAGS_STRICT to the compile
-# options of the given target depending on whether or not
-# DISABLE_STRICT_WARNINGS was passed.
-#
-# If any of the sources have filenames that indicate they are Objective-C adds
-# Either FIREBASE_IOS_OBJC_FLAGS or FIREBASE_IOS_OBJC_FLAGS_STRICT depending on
-# whether or not DISABLE_STRICT_WARNINGS was passed.
-function(firebase_ios_add_compile_options target)
-  set(flag DISABLE_STRICT_WARNINGS)
-  cmake_parse_arguments(aco "${flag}" "" "" ${ARGN})
-
-  # Only set Objective-C flags if there's at least once source file to which
-  # that applies.
-  set(has_objc OFF)
-
-  # Default to applying the strict warnings to all targets, but targets can
-  # opt out.
-  set(suffix _STRICT)
-  if(aco_DISABLE_STRICT_WARNINGS)
-    set(suffix "")
-  endif()
-
-  foreach(source ${ARGN})
-    get_filename_component(ext ${source} EXT)
-    if((ext STREQUAL ".m") OR (ext STREQUAL ".mm"))
-      set(has_objc ON)
-    endif()
-  endforeach()
-
-  target_compile_options(
-    ${target}
-    PRIVATE
-    ${FIREBASE_IOS_CXX_FLAGS${suffix}}
-  )
-
-  if(has_objc)
-    target_compile_options(
-      ${target}
-      PRIVATE
-      ${FIREBASE_IOS_OBJC_FLAGS${suffix}}
-    )
-  endif()
-
-  target_include_directories(
-    ${target}
-    PRIVATE
-    # Put the binary dir first so that the generated config.h trumps any one
-    # generated statically by a Cocoapods-based build in the same source tree.
-    ${FIREBASE_BINARY_DIR}
-    ${FIREBASE_SOURCE_DIR}
-  )
 endfunction()

 # firebase_ios_add_alias(alias_target actual_target)
@@ -428,60 +207,6 @@
 function(firebase_ios_add_alias ALIAS_TARGET ACTUAL_TARGET)
   if(NOT TARGET ${ALIAS_TARGET})
     add_library(${ALIAS_TARGET} ALIAS ${ACTUAL_TARGET})
-  endif()
-endfunction()
-
-function(firebase_ios_objc_test target)
-  if(NOT APPLE OR NOT FIREBASE_IOS_BUILD_TESTS)
-    return()
-  endif()
-
-  set(flag DISABLE_STRICT_WARNINGS EXCLUDE_FROM_ALL)
-  set(single HOST VERSION WORKING_DIRECTORY)
-  set(multi DEPENDS DEFINES HEADERS INCLUDES SOURCES)
-  cmake_parse_arguments(ot "${flag}" "${single}" "${multi}" ${ARGN})
-
-  xctest_add_bundle(
-    ${target}
-    ${ot_HOST}
-    ${ot_SOURCES}
-  )
-
-  set(warnings_flag "")
-  if(ot_DISABLE_STRICT_WARNINGS)
-    set(warnings_flag DISABLE_STRICT_WARNINGS)
-  endif()
-  firebase_ios_add_compile_options(${target} ${warnings_flag} ${ot_SOURCES})
-
-  target_compile_options(${target} PRIVATE ${FIREBASE_CXX_FLAGS})
-  target_link_libraries(${target} PRIVATE ${ot_DEPENDS})
-
-  xctest_add_test(
-    ${target}
-    ${target}
-  )
-
-  if(ot_WORKING_DIRECTORY)
-    set_property(
-      TEST ${target} PROPERTY
-      WORKING_DIRECTORY ${ot_WORKING_DIRECTORY}
-    )
-  endif()
-
-  if(WITH_ASAN)
-    set_property(
-      TEST ${target} APPEND PROPERTY
-      ENVIRONMENT
-      DYLD_INSERT_LIBRARIES=${CLANG_ASAN_DYLIB}
-    )
-  endif()
-
-  if(WITH_TSAN)
-    set_property(
-      TEST ${target} APPEND PROPERTY
-      ENVIRONMENT
-      DYLD_INSERT_LIBRARIES=${CLANG_TSAN_DYLIB}
-    )
   endif()
 endfunction()


run_test: show diff if test output does not match the expected output

--- cmake/run_test.cmake
+++ cmake/run_test.cmake
@@ -62,6 +62,16 @@
     )

   if( test_not_successful )
+    find_program(DIFF "diff")
+    if(DIFF)
+      execute_process(
+        COMMAND "${DIFF}" "-d" "-u" "${output_blessed}" "${RANDOM_FILE}"
+        RESULT_VARIABLE test_not_successful
+        OUTPUT_VARIABLE stdout
+        ERROR_VARIABLE stderr
+        )
+      message("${stdout}\n${stderr}")
+    endif()
     message(SEND_ERROR "FAIL: Test output does not match the expected output; output stored in ${RANDOM_FILE}" )
   else()
     file(REMOVE "${RANDOM_FILE}")


Update octomap version used

Update octomap version used

Since the latest octomap for ubuntu:16.04 is found in ros kinetic

--- lib/FindOctomap.cmake
+++ lib/FindOctomap.cmake
@@ -1,5 +1,5 @@
 set(OCTOMAP_LIBPATH
-	/opt/ros/indigo/lib
+	/opt/ros/kinetic/lib
 	/usr/lib
 	/usr/local/lib)

@@ -17,7 +17,7 @@
 INCLUDE (CheckIncludeFiles)

 find_path(OCTOMAP_INCLUDE_DIR octomap/octomap.h
-	PATH /usr/include /opt/ros/indigo/include
+	PATH /usr/include /opt/ros/kinetic/include
 	/usr/local/include
 )


Conditionally set OPENSSL_NO_ASM for Visual Studio

This configuration variable was originally set due to a bug in CMake.

We now build BoringSSL with assembly optimizations on Visual Studio
provided that the version of CMake we're using is "new enough" (3.13+)
and the NASM assembler is installed.

--- cmake/ssl.cmake
+++ cmake/ssl.cmake
@@ -20,15 +20,26 @@
   if(NOT BORINGSSL_ROOT_DIR)
     set(BORINGSSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/boringssl)
   endif()
+
   if(EXISTS "${BORINGSSL_ROOT_DIR}/CMakeLists.txt")
-    if (MSVC AND NOT CMAKE_GENERATOR STREQUAL "Ninja")
-      # Visual Studio build with assembly optimizations is broken,
-      # but it works with Ninja generator.
-      # This will get eventually fixed in cmake, but until then
-      # we need to disable assembly optimizations.
-      # See https://github.com/grpc/grpc/issues/16376
-      set(OPENSSL_NO_ASM ON)
+    if(CMAKE_GENERATOR MATCHES "Visual Studio")
+      if(CMAKE_VERSION VERSION_LESS 3.13)
+        # Visual Studio build with assembly optimizations is broken for older
+        # version of CMake (< 3.13).
+        message(WARNING "Disabling SSL assembly support because CMake version ${CMAKE_VERSION} is too old (less than 3.13)")
+        set(OPENSSL_NO_ASM ON)
+      else()
+        # If we're using a new enough version of CMake, make sure that the
+        # NASM assembler can be found.
+        include(CheckLanguage)
+        check_language(ASM_NASM)
+        if(NOT CMAKE_ASM_NASM_COMPILER)
+          message(WARNING "Disabling SSL assembly support because NASM could not be found")
+          set(OPENSSL_NO_ASM ON)
+        endif()
+      endif()
     endif()
+
     add_subdirectory(${BORINGSSL_ROOT_DIR} third_party/boringssl)
     if(TARGET ssl)
       set(_gRPC_SSL_LIBRARIES ssl)


Fix syntax error (missing space in SET command),  that effectively prevents mysqld from being build with SSL.

--- cmake/ssl.cmake
+++ cmake/ssl.cmake
@@ -25,7 +25,7 @@
   SET(SSL_LIBRARIES  yassl taocrypt)
   SET(SSL_INCLUDE_DIRS ${INC_DIRS})
   SET(SSL_INTERNAL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)
-  SET(SSL_DEFINES"-DHAVE_YASSL -DYASSL_PURE_C -DYASSL_PREFIX -DHAVE_OPENSSL -DYASSL_THREAD_SAFE")
+  SET(SSL_DEFINES "-DHAVE_YASSL -DYASSL_PURE_C -DYASSL_PREFIX -DHAVE_OPENSSL -DYASSL_THREAD_SAFE")
   CHANGE_SSL_SETTINGS("bundled")
   #Remove -fno-implicit-templates
   #(yassl sources cannot  be compiled with  it)


Returns in macros are bad

Returns in macros are bad

--- Common.cmake
+++ Common.cmake
@@ -185,33 +185,31 @@

   # ignore IMPORTED add_library from finders (e.g. Qt)
   cmake_parse_arguments(_arg "IMPORTED" "" "" ${ARGN})
-  if(_arg_IMPORTED)
-    return()
-  endif()
-
-  # add defines TARGET_DSO_NAME and TARGET_SHARED for dlopen() usage
-  get_target_property(THIS_DEFINITIONS ${_target} COMPILE_DEFINITIONS)
-  if(NOT THIS_DEFINITIONS)
-    set(THIS_DEFINITIONS) # clear THIS_DEFINITIONS-NOTFOUND
-  endif()
-  string(TOUPPER ${_target} _TARGET)
-
-  if(MSVC OR XCODE_VERSION)
-    set(_libraryname ${CMAKE_SHARED_LIBRARY_PREFIX}${_target}${CMAKE_SHARED_LIBRARY_SUFFIX})
-  else()
-    if(APPLE)
-      set(_libraryname ${CMAKE_SHARED_LIBRARY_PREFIX}${_target}.${VERSION_ABI}${CMAKE_SHARED_LIBRARY_SUFFIX})
+  if(NOT _arg_IMPORTED)
+    # add defines TARGET_DSO_NAME and TARGET_SHARED for dlopen() usage
+    get_target_property(THIS_DEFINITIONS ${_target} COMPILE_DEFINITIONS)
+    if(NOT THIS_DEFINITIONS)
+      set(THIS_DEFINITIONS) # clear THIS_DEFINITIONS-NOTFOUND
+    endif()
+    string(TOUPPER ${_target} _TARGET)
+
+    if(MSVC OR XCODE_VERSION)
+      set(_libraryname ${CMAKE_SHARED_LIBRARY_PREFIX}${_target}${CMAKE_SHARED_LIBRARY_SUFFIX})
     else()
-      set(_libraryname ${CMAKE_SHARED_LIBRARY_PREFIX}${_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${VERSION_ABI})
-    endif()
-  endif()
-
-  list(APPEND THIS_DEFINITIONS
-    ${_TARGET}_SHARED ${_TARGET}_DSO_NAME=\"${_libraryname}\")
-
-  set_target_properties(${_target} PROPERTIES
-    COMPILE_DEFINITIONS "${THIS_DEFINITIONS}")
-
-  set_property(GLOBAL APPEND PROPERTY ALL_DEP_TARGETS ${_target})
-  set_property(GLOBAL APPEND PROPERTY ALL_LIB_TARGETS ${_target})
+      if(APPLE)
+        set(_libraryname ${CMAKE_SHARED_LIBRARY_PREFIX}${_target}.${VERSION_ABI}${CMAKE_SHARED_LIBRARY_SUFFIX})
+      else()
+        set(_libraryname ${CMAKE_SHARED_LIBRARY_PREFIX}${_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${VERSION_ABI})
+      endif()
+    endif()
+
+    list(APPEND THIS_DEFINITIONS
+      ${_TARGET}_SHARED ${_TARGET}_DSO_NAME=\"${_libraryname}\")
+
+    set_target_properties(${_target} PROPERTIES
+      COMPILE_DEFINITIONS "${THIS_DEFINITIONS}")
+
+    set_property(GLOBAL APPEND PROPERTY ALL_DEP_TARGETS ${_target})
+    set_property(GLOBAL APPEND PROPERTY ALL_LIB_TARGETS ${_target})
+  endif()
 endmacro()


C++ 向け最新の std を自動判定する cmake コードを追加

C++ 向け最新の std を自動判定する cmake コードを追加


Strip rpath from libgeoip too.

Strip rpath from libgeoip too.

--- build/cmake/libgeoip.cmake
+++ build/cmake/libgeoip.cmake
@@ -9,6 +9,7 @@
   URL_HASH MD5=${LIBGEOIP_HASH}
   CONFIGURE_COMMAND ${LIBGEOIP_CONFIGURE_CMD}
   INSTALL_COMMAND make install DESTDIR=${STAGE_DIR}
+    COMMAND chrpath -d ${STAGE_EMBEDDED_DIR}/lib/libGeoIP.so
     COMMAND find ${STAGE_EMBEDDED_DIR}/bin/ -name geoiplookup* -exec chrpath -d {} $<SEMICOLON>
 )


PKG: remove freetype and fontconfig from package

--- SuperBuild/Packaging/PackageGlobals.cmake
+++ SuperBuild/Packaging/PackageGlobals.cmake
@@ -68,7 +68,9 @@
   libICE.so*
   libXrandr.so*
   libpython*
-  libexpat.so.0
+  libexpat.so.*
+  libfontconfig.so*
+  libfreetype.so*
   )

 # libgcc_s.*dylib and other *.framework are dragged by QT
@@ -129,11 +131,8 @@
   libffi.so.6
   )
 set(GTK_LIB_LIST_2
-  libfreetype.so.6
   libz.so.1
   libpng12.so.0
-  libexpat.so.1
-  libfontconfig.so.1
   )

 set(ALLOWED_SYSTEM_DLLS ${GTK_LIB_LIST_1} ${GTK_LIB_LIST_2})


CMake: get rid of some debugging clutter

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -268,8 +268,8 @@
   execute_process(COMMAND "${COMPILER}" ${ARGN} "${RANDOM_FILENAME}" RESULT_VARIABLE ${RES_VAR} OUTPUT_VARIABLE OV ERROR_VARIABLE EV)
   if(${${RES_VAR}})
     message(STATUS " ########## The command: ")
-    message(STATUS "${COMPILER} ${ARGN} ${RANDOM_FILENAME}")
-    message(STATUS " ########## ARGN size: ${LSIZE}")
+    string(REPLACE ";" " " ARGN_STR "${ARGN}")
+    message(STATUS "${COMPILER} ${ARGN_STR} ${RANDOM_FILENAME}")
     message(STATUS " ########## Exited with nonzero status: ${${RES_VAR}}")
     if(OV)
       message(STATUS "STDOUT: ${OV}")


Avoid looking for glog in conda on static builds

Former-commit-id: 23992f31b36a2b6c57fad641b7fffe0d4edfbb0f

--- cmake-modules/Fetch_glog.cmake
+++ cmake-modules/Fetch_glog.cmake
@@ -19,13 +19,12 @@

-# Glog should only look in conda on shared builds!
+# Glog should only look in conda on shared builds! Conda does not give us the static version
 set(GLOG_HINTS $ENV{EBROOTGLOG} ${CMAKE_INSTALL_PREFIX} )
 if(BUILD_SHARED_LIBS)
     list(APPEND GLOG_HINTS ${CONDA_HINTS})
 endif()
-
-find_package(glog 0.4 HINTS ${GLOG_HINTS} PATH_SUFFIXES glog glog/lib NO_CMAKE_PACKAGE_REGISTRY)
+find_package(glog 0.4 HINTS ${GLOG_HINTS} PATH_SUFFIXES glog glog/lib NO_DEFAULT_PATH)

 if(NOT TARGET glog::glog)


use /INCREMENTAL:NO on Windows for release mode (it clashes with /LTCG)

--- cmake-toolchains/windows.cmake
+++ cmake-toolchains/windows.cmake
@@ -77,7 +77,7 @@
 # librarian flags
 # 4221: warning on empty object files
 set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4221")
-set(CMAKE_EXE_LINKER_FLAGS_RELEASE "")
+set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/INCREMENTAL:NO")

 # add LTCG options
 if (FIPS_MSVC_LTCG)


cmake/FindWaffle: Rename exported vars to follow CMake standards

The file /usr/share/cmake/Modules/readme.txt discusses standards for
FindXXX.cmake files.

This patch renames
    WAFFLE_INCLUDE_DIR  -> WAFFLE_INCLUDE_DIRS
    WAFFLE_LIBRARY      -> WAFFLE_LIBRARIES

Not only does this change make FindWaffle standard conformat, it also
conveniently transforms it to have the same behavior as calling the
PkgConfig module with pkg_check_modules(WAFFLE waffle-1).

Signed-off-by: Chad Versace <a557f7f75bf28dc19ac99107f5cc7cd6b3fbdb1a@linux.intel.com>

--- cmake/Modules/FindWaffle.cmake
+++ cmake/Modules/FindWaffle.cmake
@@ -1,7 +1,7 @@
 # - Locate the Waffle library and headers.
 # This module defines the following variables:
-#     WAFFLE_INCLUDE_DIR     Full path to directory of the main Waffle header, waffle.h.
-#     WAFFLE_LIBRARY         Full path to the Waffle library.
+#     WAFFLE_INCLUDE_DIRS    Full path to directory of the main Waffle header, waffle.h.
+#     WAFFLE_LIBRARIES       Full path to the Waffle library.
 #     WAFFLE_FOUND           True if Waffle was found.
 #     WAFFLE_VERSION_STRING  Waffle's version in form "Major.Minor.Patch".

@@ -45,7 +45,10 @@

 set(WAFFLE_INCLUDE_DIR "${WAFFLE_PREFIX_INCLUDE_DIR}/waffle-${WAFFLE_FIND_VERSION_MAJOR}")

-find_library(WAFFLE_LIBRARY
+set(WAFFLE_INCLUDE_DIRS "${WAFFLE_INCLUDE_DIR}"
+    CACHE FILEPATH "Full path to Waffle library")
+
+find_library(WAFFLE_LIBRARIES
     NAMES "waffle-${WAFFLE_FIND_VERSION_MAJOR}"
 )

@@ -61,12 +64,21 @@
 # set 'WAFFLE_FOUND' to TRUE if all listed variables are TRUE
 include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
 find_package_handle_standard_args(Waffle
-    REQUIRED_VARS WAFFLE_LIBRARY WAFFLE_INCLUDE_DIR
+    REQUIRED_VARS WAFFLE_LIBRARIES WAFFLE_INCLUDE_DIRS
     VERSION_VAR WAFFLE_VERSION_STRING
     )

-mark_as_advanced(WAFFLE_LIBRARY WAFFLE_INCLUDE_DIR)
+mark_as_advanced(WAFFLE_LIBRARIES WAFFLE_INCLUDE_DIRS)

 # Don't expose these variables.
+#
+# Some were set in the cache and some were not. To be safe, remove the
+# variables from the cache *and* local scope.
+#
 unset(WAFFLE_FIND_VERSION_MAJOR CACHE)
+unset(WAFFLE_INCLUDE_DIR CACHE)
 unset(WAFFLE_PREFIX_INCLUDE_DIR CACHE)
+
+unset(WAFFLE_FIND_VERSION_MAJOR)
+unset(WAFFLE_INCLUDE_DIR)
+unset(WAFFLE_PREFIX_INCLUDE_DIR)


fix amdFft and amdBlas path

fix amdFft and amdBlas path

--- cmake/OpenCVDetectOpenCL.cmake
+++ cmake/OpenCVDetectOpenCL.cmake
@@ -43,7 +43,7 @@
   set(OPENCL_LIBRARIES    ${OPENCL_LIBRARY})

   if (X86_64)
-    set(CLAMD_POSSIBLE_LIB_SUFFIXES lib32/import)
+    set(CLAMD_POSSIBLE_LIB_SUFFIXES lib64/import)
   elseif (X86)
     set(CLAMD_POSSIBLE_LIB_SUFFIXES lib32/import)
   endif()


Resurrect LLDB Standalone build on NetBSD

Include CheckIncludeFile for check_include_file() in CMake.

Detect <sys/event.h> in CMake.
This header is available on NetBSD.

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@300853 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -433,7 +433,9 @@

 find_package(Backtrace)

+include(CheckIncludeFile)
 check_include_file(termios.h HAVE_TERMIOS_H)
+check_include_file(sys/event.h HAVE_SYS_EVENT_H)

 # These checks exist in LLVM's configuration, so I want to match the LLVM names
 # so that the check isn't duplicated, but we translate them into the LLDB names


HSA: workaround a small bug in current HSAIL LLVM

(it forgets to report libLLVMHSAILUtil.so in llvm-config --libs

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -108,6 +108,11 @@
 run_llvm_config(LLVM_LIBS --libs)
 # Convert LLVM_LIBS from string -> list format to make handling them easier
 separate_arguments(LLVM_LIBS)
+# workaround for a bug in current HSAIL LLVM
+# it forgets to report one HSAIL library in llvm-config
+if(ENABLE_HSA)
+  list(APPEND LLVM_LIBS "-lLLVMHSAILUtil")
+endif()
 run_llvm_config(LLVM_SRC_ROOT --src-root)
 run_llvm_config(LLVM_OBJ_ROOT --obj-root)
 string(REPLACE "${LLVM_PREFIX}" "${LLVM_PREFIX_CMAKE}" LLVM_OBJ_ROOT "${LLVM_OBJ_ROOT}")


cleanup

cleanup

--- cmake/MCKL.cmake
+++ cmake/MCKL.cmake
@@ -473,7 +473,7 @@
                 ${basename}_${testname}_${rng}-check)
         ENDFOREACH(RNG ${MCKL_RNG_RDRAND})
     ENDIF(RDRAND_FOUND)
-ENDFUNCTION(MCKL_ADD_TEST_RNG basename testname)
+ENDFUNCTION(MCKL_ADD_TEST_RNG)

 FUNCTION(MCKL_ADD_TEST_DISTRIBUTION basename testname)
     ADD_CUSTOM_TARGET(${basename}_${testname})
@@ -503,4 +503,4 @@
                 ${basename}_${testname}_${dist}_novml-check)
         ENDIF(MKL_FOUND)
     ENDFOREACH(Distribution ${MCKL_DISTRIBUTION})
-ENDFUNCTION(MCKL_ADD_TEST_DISTRIBUTION basename testname)
+ENDFUNCTION(MCKL_ADD_TEST_DISTRIBUTION)


Add EMAG8180 to arm64 DYNAMIC_ARCH list for cmake

--- cmake/arch.cmake
+++ cmake/arch.cmake
@@ -45,7 +45,7 @@

 if (DYNAMIC_ARCH)
   if (ARM64)
-    set(DYNAMIC_CORE ARMV8 CORTEXA53 CORTEXA57 CORTEXA72 CORTEXA73 FALKOR THUNDERX THUNDERX2T99 TSV110)
+    set(DYNAMIC_CORE ARMV8 CORTEXA53 CORTEXA57 CORTEXA72 CORTEXA73 FALKOR THUNDERX THUNDERX2T99 TSV110 EMAG8180)
   endif ()

   if (POWER)


cmake: Propagate use of host protoc when building glop

--- cmake/glop.cmake
+++ cmake/glop.cmake
@@ -30,12 +30,12 @@
   #message(STATUS "protoc src: ${PROTO_SRC}")
   add_custom_command(
     OUTPUT ${PROTO_SRC} ${PROTO_HDR}
-    COMMAND protobuf::protoc
+    COMMAND ${PROTOC_PRG}
     "--proto_path=${PROJECT_SOURCE_DIR}"
     ${PROTO_DIRS}
     "--cpp_out=${PROJECT_BINARY_DIR}"
     ${PROTO_FILE}
-    DEPENDS ${PROTO_FILE} protobuf::protoc
+    DEPENDS ${PROTO_FILE} ${PROTOC_PRG}
     COMMENT "Generate C++ protocol buffer for ${PROTO_FILE}"
     VERBATIM)
   list(APPEND PROTO_HDRS ${PROTO_HDR})


fix ctest_ext_configure step:

fix ctest_ext_configure step:

* eliminate errors from ctest_empty_binary_directory
  if build directory doesn't contain CMakeCache.txt

* explicitly rewrite CMake Cache if CTEST_UPDATE_CMAKE_CACHE is true

--- ctest_ext.cmake
+++ ctest_ext.cmake
@@ -44,7 +44,7 @@
     return()
 endif()
 set(CTEST_EXT_INCLUDED TRUE)
-set(CTEST_EXT_VERSION  0.6.0)
+set(CTEST_EXT_VERSION  0.6.1)

 #
 # Auxiliary modules
@@ -351,17 +351,24 @@
     if(CTEST_STAGE MATCHES "Configure")
         ctext_ext_log_stage("Configure")

+        if(CTEST_EMPTY_BINARY_DIRECTORY)
+            ctest_ext_info("Clean binary directory : ${CTEST_BINARY_DIRECTORY}")
+
+            if(EXISTS "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt")
+                ctest_empty_binary_directory("${CTEST_BINARY_DIRECTORY}")
+            else()
+                file(REMOVE_RECURSE "${CTEST_BINARY_DIRECTORY}")
+            endif()
+        endif()
+
         if(NOT EXISTS "${CTEST_BINARY_DIRECTORY}")
             ctest_ext_info("Create binary directory : ${CTEST_BINARY_DIRECTORY}")
             file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
-        elseif(CTEST_EMPTY_BINARY_DIRECTORY)
-            ctest_ext_info("Clean binary directory : ${CTEST_BINARY_DIRECTORY}")
-            ctest_empty_binary_directory("${CTEST_BINARY_DIRECTORY}")
-        endif()
-
-        if(CTEST_UPDATE_CMAKE_CACHE AND EXISTS "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt")
-            ctest_ext_info("Remove old CMake cache : ${CTEST_BINARY_DIRECTORY}/CMakeCache.txt")
-            file(REMOVE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt")
+        endif()
+
+        if(CTEST_UPDATE_CMAKE_CACHE)
+            ctest_ext_info("Rewrite CMake cache : ${CTEST_INITIAL_CACHE}")
+            file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" ${CTEST_INITIAL_CACHE})
         endif()

         ctest_configure(OPTIONS "${CTEST_CMAKE_EXTRA_OPTIONS}")


Look for any working ISPC version

Look for any working ISPC version

--- cmake/ispc.cmake
+++ cmake/ispc.cmake
@@ -14,11 +14,13 @@
 ## limitations under the License.                                           ##
 ## ======================================================================== ##

+# ISPC versions to look for, in decending order (newest first)
 IF(WIN32)
-  SET(ISPC_VERSION_REQUIRED "1.8.2")
-ELSE()
-  SET(ISPC_VERSION_REQUIRED "1.8.1")
+  SET(ISPC_VERSION_WORKING "1.9.0" "1.8.2")
+ELSE()
+  SET(ISPC_VERSION_WORKING "1.9.0" "1.8.2" "1.8.1")
 ENDIF()
+LIST(GET ISPC_VERSION_WORKING -1 ISPC_VERSION_REQUIRED)
 SET(ISPC_VERSION_RECOMMENDED_KNC "1.8.1")

 IF (NOT ISPC_EXECUTABLE)
@@ -30,14 +32,16 @@
   ELSE()
     SET(ISPC_DIR_SUFFIX "linux")
   ENDIF()
-  SET(ISPC_DIR_HINT ${PROJECT_SOURCE_DIR}/../ispc-v${ISPC_VERSION_REQUIRED}-${ISPC_DIR_SUFFIX})
+  FOREACH(ver ${ISPC_VERSION_WORKING})
+    LIST(APPEND ISPC_DIR_HINT ${PROJECT_SOURCE_DIR}/../ispc-v${ver}-${ISPC_DIR_SUFFIX})
+  ENDFOREACH()

   FIND_PROGRAM(ISPC_EXECUTABLE ispc PATHS ${ISPC_DIR_HINT} DOC "Path to the ISPC executable.")
   IF (NOT ISPC_EXECUTABLE)
     MESSAGE("********************************************")
     MESSAGE("Could not find ISPC (looked in PATH and ${ISPC_DIR_HINT})")
     MESSAGE("")
-    MESSAGE("This version of OSPRay expects you to have a binary install of ISPC version ${ISPC_VERSION_REQUIRED}, and expects it to be found in 'PATH' or in the sibling directory to where the OSPRay source are located. Please go to https://ispc.github.io/downloads.html, select the binary release for your particular platform, and unpack it to ${PROJECT_SOURCE_DIR}/../")
+    MESSAGE("This version of OSPRay expects you to have a binary install of ISPC minimum version ${ISPC_VERSION_REQUIRED}, and expects it to be found in 'PATH' or in the sibling directory to where the OSPRay source are located. Please go to https://ispc.github.io/downloads.html, select the binary release for your particular platform, and unpack it to ${PROJECT_SOURCE_DIR}/../")
     MESSAGE("")
     MESSAGE("If you insist on using your own custom install of ISPC, please make sure that the 'ISPC_EXECUTABLE' variable is properly set in CMake.")
     MESSAGE("********************************************")


Add more cmake flags to gtest

Add more cmake flags to gtest

--- cmake/External_gtest.cmake
+++ cmake/External_gtest.cmake
@@ -29,7 +29,7 @@
     LOG_DOWNLOAD ON
     LOG_CONFIGURE ON
     LOG_BUILD ON
-    CMAKE_ARGS -DBUILD_SHARED_LIBS:BOOL=ON
+    CMAKE_ARGS -DBUILD_SHARED_LIBS:BOOL=ON -Dgtest_force_shared_crt=ON
     # Disable all other steps
     INSTALL_COMMAND ""
     ${GTEST_SOURCE_DOWNLOAD}


Removed system openal paths Added new paths for openal-soft

--- cmake/FindOpenALSoft.cmake
+++ cmake/FindOpenALSoft.cmake
@@ -8,14 +8,12 @@
 find_path(OPENALSOFT_INCLUDE_DIR
   NAMES al.h
   PATHS
-    ~/Library/Frameworks
-    /Library/Frameworks
     /sw # Fink
     /opt/local # DarwinPorts
     /opt/csw # Blastwave
     /opt
     # Travis CI - MAC OSX
-    /usr/local/opt/openal-soft/
+    /usr/local/opt/openal-soft/include/
     # Linux Include PATH
     /usr/include/AL/
     # Windows SDK Include PATH
@@ -27,6 +25,7 @@
   PATH_SUFFIXES lib64 lib libs64 libs
   PATHS
     ${OPENALSOFT_INCLUDE_DIR}/../lib
+    /usr/local/opt/openal-soft/lib
     lib
     /usr/lib
 )


Fix FindOpenBabel2.cmake on Windows

Fix FindOpenBabel2.cmake on Windows

To find the library, 'bin' has to be added using PATH_SUFFIXES
to FIND_LIBRARY to extend the searched paths.

--- cmake/FindOpenBabel2.cmake
+++ cmake/FindOpenBabel2.cmake
@@ -19,6 +19,7 @@

 FIND_LIBRARY(OPENBABEL2_LIBRARY NAMES openbabel openbabel-2
 	PATHS ${OPENBABEL2_LIBRARY_DIRS}
+	PATH_SUFFIXES bin
 )

 SET(OPENBABEL2_INCLUDE_DIRS ${OPENBABEL2_INCLUDE_DIR})


finally I fixed MSVC build flags

finally I fixed MSVC build flags

--- cmake/Modules/cflags.cmake
+++ cmake/Modules/cflags.cmake
@@ -44,18 +44,17 @@
 		set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SGHERM_C_STANDARD} -Wall -Wextra")
 	elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
 		set(HAVE_COMPILER_MSVC "1")
-		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /G5 /Gr /D _CRT_SECURE_NO_WARNINGS")
+		set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /G5 /Gr /D _CRT_SECURE_NO_WARNINGS")
 		# /G5 - Enable Pentium optimisations
 		# /Gr - __fastcall as deafult
 		# /D _CRT_NO_SECURE_WARNINGS - disable whining about fopen and friends
-		set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd /W4
-		/Ot /Oa /Gy")
+		set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd /W4 /Ot /Oa /Gy")
 		# /MTd - statically link to runtime library
 		# /W4 - enable all warnings
 		# /Ot, /Oa - still enable some performance improvements
 		# /Gy - function-level linking (slightly faster)
-		set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zp4
-		/MT /W3 /Zi /Ox /Ot /Oa /Og /Ob2 /GF")
+		set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Zp4 /MT
+		/W3 /Zi /Ox /Ot /Oa /Og /Ob2 /GF")
 		# /Zp4 - 4-byte struct alignment (~150k cycle/sec speed up on
 		# P5 microarchitecture)
 		# /MT - statically link to runtime library (larger file size,


removed: unnecessary file

removed: unnecessary file

--- cmake/SetupPackaging.cmake
+++ cmake/SetupPackaging.cmake
@@ -1,59 +0,0 @@
-# -*- Mode:cmake -*-
-
-####################################################################################################
-#                                                                                #
-# Copyright (C) 2016 University of Hull                                                            #
-#                                                                                #
-####################################################################################################
-
-INCLUDE(InstallRequiredSystemLibraries)
-
-STRING(TOLOWER ${CMAKE_PROJECT_NAME} PACKAGE_PREFIX)
-
-SET(CPACK_PACKAGE_NAME                "${PACKAGE_PREFIX}")
-SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PACKAGE_PREFIX} infrastructure")
-SET(CPACK_PACKAGE_VENDOR              "dcs.hull.ac.uk")
-#SET(CPACK_PACKAGE_DESCRIPTION_FILE    "${CMAKE_CURRENT_SOURCE_DIR}/README.rst")
-SET(CPACK_RESOURCE_FILE_LICENSE       "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
-SET(CPACK_PACKAGE_VERSION_MAJOR       "0")
-SET(CPACK_PACKAGE_VERSION_MINOR       "1")
-SET(CPACK_PACKAGE_VERSION_PATCH       "0")
-SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY  0)
-
-SET(CPACK_COMPONENTS_ALL app doc hdr lib)
-
-SET(CPACK_COMPONENT_APP_DISPLAY_NAME "Applications")
-SET(CPACK_COMPONENT_DOC_DISPLAY_NAME "Documentation")
-SET(CPACK_COMPONENT_HDR_DISPLAY_NAME "C++ Header")
-SET(CPACK_COMPONENT_LIB_DISPLAY_NAME "Libraries")
-SET(CPACK_COMPONENT_APP_DEPENDS       lib)
-SET(CPACK_COMPONENT_HDR_DEPENDS       lib)
-SET(CPACK_COMPONENT_APP_GROUP "app")
-SET(CPACK_COMPONENT_DOC_GROUP "doc")
-SET(CPACK_COMPONENT_HDR_GROUP "devel")
-SET(CPACK_COMPONENT_LIB_GROUP "lib")
-
-SET(CPACK_SOURCE_IGNORE_FILES "/.git/" ".gitignore" ".#" "/#" ".*~" "/build.*/")
-
-# see [http://www.cmake.org/Wiki/CMake:CPackPackageGenerators]
-IF(WIN32 OR WIN64)
-  MESSAGE(STATUS "Creating NSIS package-installer configuration")
-
-  SET(CPACK_GENERATOR "NSIS")
-ELSEIF(UNIX)
-  MESSAGE(STATUS "Creating RPM package-installer configuration")
-
-  SET(CPACK_GENERATOR                "RPM")
-  SET(CPACK_SOURCE_GENERATOR         "RPM")
-  SET(CPACK_RPM_COMPRESSION_TYPE     bzip2)
-  # SET(CPACK_RPM_PACKAGE_ARCHITECTURE ${ARCH})
-  SET(CPACK_RPM_COMPONENT_INSTALL    ON)
-  SET(CPACK_RPM_PACKAGE_RELEASE      1)
-  SET(CPACK_RPM_PACKAGE_LICENSE      "LGPLv2")
-  SET(CPACK_RPM_PACKAGE_GROUP        "Development/Libraries")
-  SET(CPACK_RPM_PACKAGE_DEBUG        OFF)
-ELSE()
-  MESSAGE(SEND_ERROR "Unsupported platform for creating package installer")
-ENDIF()
-
-INCLUDE(CPack)


declare windows unicode macro globally

declare windows unicode macro globally

This is to avoid issues caused by files see these macros differently

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

 function(treecore_set_compiler_definitions target_name)
     if(MSVC)
-            target_compile_definitions(${target_name} PRIVATE _CRT_SECURE_NO_WARNINGS)
+            target_compile_definitions(${target_name} PRIVATE _CRT_SECURE_NO_WARNINGS _UNICODE UNICODE)
     endif()

     target_compile_definitions(${target_name} PRIVATE


warn and ignore DEPENDS passed to catkin_project() which have not been find_package()-ed before

--- cmake/catkin_project.cmake
+++ cmake/catkin_project.cmake
@@ -41,7 +41,7 @@
 #   The template can distinguish between build- and installspace
 #   using the boolean variables ``BUILDSPACE`` and ``INSTALLSPACE``
 #   and should be verified to work in both cases.
-# :type DEPENDS: list of strings
+# :type CFG_EXTRAS: string
 #
 # :outvar CATKIN_PROJECT_BIN_DESTINATION:
 #   See :cmake:data:`CATKIN_PROJECT_BIN_DESTINATION`.
@@ -101,6 +101,13 @@
   if(PROJECT_DEFAULT_ARGS)
     message(FATAL_ERROR "catkin_project() called with unused arguments: ${PROJECT_DEFAULT_ARGS}")
   endif()
+  # filter out DEPENDS which have not been find_package()-ed before
+  foreach(depend ${PROJECT_DEPENDS})
+    if(NOT ${depend}_FOUND)
+      message(WARNING "catkin_project(${PROJECT_NAME}) depends on '${depend}' which has not been find_package()-ed before")
+      list(REMOVE_ITEM PROJECT_DEPENDS ${depend})
+    endif()
+  endforeach()

   # stack version provided by stack.cmake/xml
   set(PROJECT_VERSION ${${CATKIN_CURRENT_STACK}_VERSION})


Bug #12607800 ADD HOOK TO INSTALL TESTS FROM IMPORTED FEATURE TREES Sets INSTALL_PLUGINTESTDIR if any plugin/*/tests exist

--- cmake/install_layout.cmake
+++ cmake/install_layout.cmake
@@ -99,6 +99,13 @@
 ENDIF()

 #
+# plugin_tests's value should not be used by imported plugins,
+# just use if(INSTALL_PLUGINTESTDIR).
+# The plugin must set its own install path for tests
+#
+FILE(GLOB plugin_tests plugin/*/tests)
+
+#
 # STANDALONE layout
 #
 SET(INSTALL_BINDIR_STANDALONE           "bin")
@@ -122,6 +129,7 @@
 SET(INSTALL_SUPPORTFILESDIR_STANDALONE  "support-files")
 #
 SET(INSTALL_MYSQLDATADIR_STANDALONE     "data")
+SET(INSTALL_PLUGINTESTDIR_STANDALONE    ${plugin_tests})

 #
 # RPM layout
@@ -152,6 +160,7 @@
 SET(INSTALL_SUPPORTFILESDIR_RPM         "share/mysql")
 #
 SET(INSTALL_MYSQLDATADIR_RPM            "/var/lib/mysql")
+SET(INSTALL_PLUGINTESTDIR_RPM           ${plugin_tests})

 #
 # DEB layout
@@ -177,6 +186,7 @@
 SET(INSTALL_SUPPORTFILESDIR_DEB         "support-files")
 #
 SET(INSTALL_MYSQLDATADIR_DEB            "data")
+SET(INSTALL_PLUGINTESTDIR_DEB           ${plugin_tests})

 #
 # SVR4 layout
@@ -202,6 +212,7 @@
 SET(INSTALL_SUPPORTFILESDIR_SVR4        "support-files")
 #
 SET(INSTALL_MYSQLDATADIR_SVR4           "/var/lib/mysql")
+SET(INSTALL_PLUGINTESTDIR_SVR4          ${plugin_tests})

 # Clear cached variables if install layout was changed
@@ -216,7 +227,7 @@
 # will be defined  as ${INSTALL_BINDIR_STANDALONE} by default if STANDALONE
 # layout is chosen)
 FOREACH(var BIN SBIN LIB MYSQLSHARE SHARE PLUGIN INCLUDE SCRIPT DOC MAN
-  INFO MYSQLTEST SQLBENCH DOCREADME SUPPORTFILES MYSQLDATA)
+  INFO MYSQLTEST SQLBENCH DOCREADME SUPPORTFILES MYSQLDATA PLUGINTEST)
   SET(INSTALL_${var}DIR  ${INSTALL_${var}DIR_${INSTALL_LAYOUT}}
   CACHE STRING "${var} installation directory" ${FORCE})
   MARK_AS_ADVANCED(INSTALL_${var}DIR)