fixed rpi build to include linux/src/netWorkerData

--- toolchains/raspberrypi.cmake
+++ toolchains/raspberrypi.cmake
@@ -22,8 +22,12 @@
 # add sources and include headers
 find_sources_and_include_directories(
 	${PROJECT_SOURCE_DIR}/rpi/src/*.h
-	${PROJECT_SOURCE_DIR}/rpi/src/*.cpp
-	${PROJECT_SOURCE_DIR}/linux/src/netWorkerData.*)
+	${PROJECT_SOURCE_DIR}/rpi/src/*.cpp)
+
+# add sources and include headers
+find_sources_and_include_directories(
+    ${PROJECT_SOURCE_DIR}/linux/src/netWorkerData.*
+    ${PROJECT_SOURCE_DIR}/linux/src/netWorkerData.*)

 # include headers for rpi-installed libraries
 include_directories(/opt/vc/include/)


fix version number of the libhunspell dylib in another place

--- indra/cmake/Copy3rdPartyLibs.cmake
+++ indra/cmake/Copy3rdPartyLibs.cmake
@@ -217,7 +217,7 @@
     libllqtwebkit.dylib
     libminizip.a
         libndofdev.dylib
-        libhunspell-1.3.dylib
+        libhunspell-1.3.0.dylib
         libexception_handler.dylib
     libcollada14dom.dylib
        )


Reduce CAmkES per-component heap allocation.

Set the per-component static heap size to 8KB. The heap is only used by
CAmkES RPC for marhsaling dynamic array & string parameters. We mostly
use the former and no more than 4KB at a time so 8KB should be fine until
we can redirect C use to the Rust heap allocator (or replace the C code).

BUG=224069025

Change-Id: I600854c5cb41ed268087f4b2294b70c3384973c2
GitOrigin-RevId: 177a353e6873f2c048cf4b446114534d9dcffc94

--- easy-settings.cmake
+++ easy-settings.cmake
@@ -7,6 +7,7 @@
 set(KernelSel4Arch "riscv32" CACHE STRING "Specifies 32-bit branch of the seL4 spike platform")
 set(KernelIsMCS ON CACHE BOOL "Enable seL4 MCS support")
 set(KernelPrinting ON CACHE BOOL "Enable seL4 console output support")
+set(CAmkESDefaultHeapSize "8192" CACHE STRING "CAmkES per-component heap size (bytes)")

 set(LibUtilsDefaultZfLogLevel 5 CACHE STRING "seL4 internal logging level (0-5).")
 set(SIMULATION ON CACHE BOOL "Whether to build simulate script")


Correctly determine cuda version (#4453)

--- cmake/Utils.cmake
+++ cmake/Utils.cmake
@@ -68,11 +68,14 @@
 # Generate nvcc compiler flags given a list of architectures
 # Also generates PTX for the most recent architecture for forwards compatibility
 function(format_gencode_flags flags out)
+  if(CMAKE_CUDA_COMPILER_VERSION MATCHES "^([0-9]+\\.[0-9]+)")
+    set(CUDA_VERSION "${CMAKE_MATCH_1}")
+  endif()
   # Set up architecture flags
   if(NOT flags)
-    if((CUDA_VERSION_MAJOR EQUAL 10) OR (CUDA_VERSION_MAJOR GREATER 10))
+    if(CUDA_VERSION VERSION_GREATER_EQUAL "10.0")
       set(flags "35;50;52;60;61;70;75")
-    elseif(CUDA_VERSION_MAJOR EQUAL 9)
+    elseif(CUDA_VERSION VERSION_GREATER_EQUAL "9.0")
       set(flags "35;50;52;60;61;70")
     else()
       set(flags "35;50;52;60;61")


Add the possibility to define a custom build-string suffix

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -426,6 +426,10 @@
   else()
     set(TMP_BUILD_STRING ${TMP_BUILD_STRING}-64bit)
   endif()
+
+  if(EIGEN_BUILD_STRING_SUFFIX)
+    set(TMP_BUILD_STRING ${TMP_BUILD_STRING}-${EIGEN_BUILD_STRING_SUFFIX})
+  endif()

   string(TOLOWER ${TMP_BUILD_STRING} BUILDNAME)
 endmacro(ei_set_build_string)


ios build: fixed toolchain for cmake 2.8.10

--- cmake/iOSToolchain.cmake
+++ cmake/iOSToolchain.cmake
@@ -35,6 +35,9 @@
 set (UNIX True)
 set (APPLE True)
 set (IOS True)
+
+# Required as of cmake 2.8.10
+set (CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "Force unset of the deployment target for iOS" FORCE)

 # Determine the cmake host system version so we know where to find the iOS SDKs
 find_program (CMAKE_UNAME uname /bin /usr/bin /usr/local/bin)
@@ -131,7 +134,7 @@
 		list (REVERSE _CMAKE_IOS_SDKS)
 		list (GET _CMAKE_IOS_SDKS 0 CMAKE_IOS_SDK_ROOT)
 	else (_CMAKE_IOS_SDKS)
-		message (FATAL_ERROR "No iOS SDK's found in default seach path ${CMAKE_IOS_DEVELOPER_ROOT}. Manually set CMAKE_IOS_SDK_ROOT or install the iOS SDK.")
+		message (FATAL_ERROR "No iOS SDK's found in default search path ${CMAKE_IOS_DEVELOPER_ROOT}. Manually set CMAKE_IOS_SDK_ROOT or install the iOS SDK.")
 	endif (_CMAKE_IOS_SDKS)
 	message (STATUS "Toolchain using default iOS SDK: ${CMAKE_IOS_SDK_ROOT}")
 endif (NOT DEFINED CMAKE_IOS_SDK_ROOT)


Installation of SeqAn headers.

Installation of SeqAn headers.

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@10368 e6417c60-b987-48fd-844e-b20f0fcc1017

--- seqan/util/cmake/FindSeqAn.cmake
+++ seqan/util/cmake/FindSeqAn.cmake
@@ -241,6 +241,20 @@
         source_group (${MODULE} FILES ${HEADER})
         # message("source_group(${MODULE} FILES ${HEADER})")
     endforeach (HEADER ${HEADERS})
+
+    # -----------------------------------------------------------------------
+    # Installation
+    # -----------------------------------------------------------------------
+    foreach (HEADER ${HEADERS} ${SUPER_HEADERS} ${FORWARDS})
+        string(REPLACE ${CMAKE_CURRENT_BINARY_DIR}/${REL_PATH}/seqan "" NEW_PATH ${HEADER})
+        string(REPLACE ${BASE_ABS} "" NEW_PATH ${NEW_PATH})
+        string(REPLACE "//" "/" NEW_PATH ${NEW_PATH})
+        install(FILES ${HEADER}
+                RENAME seqan${NEW_PATH}
+                DESTINATION include
+                COMPONENT headers)
+        #message("install(FILES ${HEADER} RENAME seqan${NEW_PATH} DESTINATION include COMPONENT dev)")
+    endforeach()
 endfunction (seqan_setup_includes)

 # ---------------------------------------------------------------------------
@@ -723,4 +737,4 @@
             endif (${ARGC} GREATER 0)
         endforeach (ENTRY ${ENTRIES})
     endif (CUDA_FOUND)
-endmacro (seqan_add_all_cuda_executables)+endmacro (seqan_add_all_cuda_executables)


The "-march=native" flag is a problem on some platforms where this is not supported.

--- tools/cmake/FindOptions.cmake
+++ tools/cmake/FindOptions.cmake
@@ -12,9 +12,10 @@
   endif()
 endif()

-if(NOT MSVC)
-set(OPT_FLAGS "-march=native")
-endif()
+## -march=native is not supported on some platforms
+#if(NOT MSVC)
+#set(OPT_FLAGS "-march=native")
+#endif()

 if(DISABLE_X64)
   # we can manually disable any optimization for x64


For downstream - show try_compile output in case of compilation error. [ci skip]

--- CMake/Modules/FindUrho3D.cmake
+++ CMake/Modules/FindUrho3D.cmake
@@ -240,7 +240,7 @@
     endif ()
     message (FATAL_ERROR
         "Could NOT find compatible Urho3D library in Urho3D SDK installation or build tree. "
-        "Use URHO3D_HOME environment variable or build option to specify the location of the non-default SDK installation or build tree. ${NOT_FOUND_MESSAGE}")
+        "Use URHO3D_HOME environment variable or build option to specify the location of the non-default SDK installation or build tree. ${NOT_FOUND_MESSAGE} ${TRY_COMPILE_OUT}")
 endif ()

 mark_as_advanced (URHO3D_BASE_INCLUDE_DIR URHO3D_LIBRARIES URHO3D_LIBRARIES_DBG URHO3D_DLL_REL URHO3D_DLL_DBG URHO3D_HOME)


cmake: Fix "Loading Zephyr module(s)" message

Modules' names would get concatenated together into single
string, making the message hard to read.

Signed-off-by: Dominik Ermel <1a1d45a9cc0c98a37f8d0a0d2dbe3cacc0b2344f@nordicsemi.no>

--- share/zephyr-package/cmake/ZephyrConfig.cmake
+++ share/zephyr-package/cmake/ZephyrConfig.cmake
@@ -65,7 +65,8 @@
       zephyr_package_message(NOTICE "Loading Zephyr default modules (${location}).")
       include(zephyr_default NO_POLICY_SCOPE)
     else()
-      zephyr_package_message(NOTICE "Loading Zephyr module(s) (${location}): ${Zephyr_FIND_COMPONENTS}")
+      string(JOIN " " msg_components ${Zephyr_FIND_COMPONENTS})
+      zephyr_package_message(NOTICE "Loading Zephyr module(s) (${location}): ${msg_components}")
       foreach(component ${Zephyr_FIND_COMPONENTS})
         if(${component} MATCHES "^\([^:]*\):\(.*\)$")
           string(REPLACE "," ";" SUB_COMPONENTS ${CMAKE_MATCH_2})


prevent cmake failure when no Fortran compiler is present.

ADIOS2_USE_Fortran is "AUTO" by default, so even if no Fortran compiler
was found, it'd still try to check a Fortran compiler flag, which failed
without a Fortran compiler being enabled:

CMake Error at /opt/local/share/cmake-3.19/Modules/Internal/CheckCompilerFlag.cmake:52 (message):
  check_compiler_flag: Fortran: needs to be enabled before use.

--- cmake/DetectOptions.cmake
+++ cmake/DetectOptions.cmake
@@ -372,7 +372,7 @@
 #check_float_type_representation(double DOUBLE_TYPE_C)
 #check_float_type_representation("long double" LONG_DOUBLE_TYPE_C)

-if(ADIOS2_USE_Fortran)
+if(ADIOS2_HAVE_Fortran)
   #check_float_type_representation(real REAL_TYPE_Fortran LANGUAGE Fortran)
   #check_float_type_representation("real(kind=4)" REAL4_TYPE_Fortran LANGUAGE Fortran)
   #check_float_type_representation("real(kind=8)" REAL8_TYPE_Fortran LANGUAGE Fortran)


still trying to fix non-mpi build for CI

--- cmake/DetectOptions.cmake
+++ cmake/DetectOptions.cmake
@@ -96,14 +96,6 @@
     elseif(ADIOS2_USE_DataMan)
         if(ZeroMQ_FOUND AND MPI_FOUND)
             set(ADIOS2_HAVE_DataMan TRUE)
-        else()
-            if(NOT ZeroMQ_FOUND)
-                message(FATAL_ERROR "DataMan is enabled but ZeroMQ is not found.")
-            endif()
-            if(NOT MPI_FOUND)
-                message(FATAL_ERROR "DataMan is enabled but MPI is not found.")
-            endif()
-        endif()
     endif()
 endif()

@@ -117,14 +109,6 @@
     elseif(ADIOS2_USE_WDM)
         if(ZeroMQ_FOUND AND MPI_FOUND)
             set(ADIOS2_HAVE_WDM TRUE)
-        else()
-            if(NOT ZeroMQ_FOUND)
-                message(FATAL_ERROR "WDM is enabled but ZeroMQ is not found.")
-            endif()
-            if(NOT MPI_FOUND)
-                message(FATAL_ERROR "WDM is enabled but MPI is not found.")
-            endif()
-        endif()
     endif()
 endif()


Remove warnings when compiling ggo files

--- cmake/FindGengetopt.cmake
+++ cmake/FindGengetopt.cmake
@@ -31,4 +31,7 @@
     INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
   ENDFOREACH(GGO_FILE)
   SET_SOURCE_FILES_PROPERTIES(${${GGO_SRCS}} PROPERTIES GENERATED TRUE)
+  IF(CMAKE_COMPILER_IS_GNUCXX)
+    SET_SOURCE_FILES_PROPERTIES(${${GGO_SRCS}} PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable")
+  ENDIF(CMAKE_COMPILER_IS_GNUCXX)
 ENDMACRO (WRAP_GGO)


avoid "-Wno-c++11-narrowing" for VS

avoid "-Wno-c++11-narrowing" for VS

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -5,32 +5,35 @@
   message("ANDROID =====================================================================")
   include(SetOpenCVCMakeArgs-android)
   set_opencv_cmake_args_android()
-  set(CMAKE_CXX_FLAGS_VAR -Wno-c++11-narrowing)
 elseif(is_ios)
   message("is_ios ======================================================================")
   include(SetOpenCVCMakeArgs-iOS)
   set_opencv_cmake_args_ios()
-  set(CMAKE_CXX_FLAGS_VAR -Wno-c++11-narrowing)
 elseif(APPLE)
   message("APPLE =======================================================================")
   include(SetOpenCVCMakeArgs-osx)
   set_opencv_cmake_args_osx()
-  set(CMAKE_CXX_FLAGS_VAR "-Wno-c++11-narrowing")
 elseif(${is_linux})
   message("is_linux =======================================================================")
   include(SetOpenCVCMakeArgs-nix)
   set_opencv_cmake_args_nix()
-  set(CMAKE_CXX_FLAGS_VAR -Wno-c++11-narrowing)
 elseif(${is_msvc})
   message("is_msvc=========================================================================")
   include(SetOpenCVCMakeArgs-windows)
   set_opencv_cmake_args_windows()
 endif()

+
 list(APPEND OPENCV_CMAKE_ARGS
   BUILD_opencv_world=ON
   BUILD_EIGEN=OFF
-  CMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS_VAR}
-)
+
+  )
+
+if(NOT ${is_msvc})
+  list(APPEND OPENCV_CMAKE_ARGS
+    CMAKE_CXX_FLAGS="-Wno-c++11-narrowing"
+    )
+endif()

 hunter_config(OpenCV VERSION ${HUNTER_OpenCV_VERSION} CMAKE_ARGS "${OPENCV_CMAKE_ARGS}")


feat(boost): implement CONSORT_PERMIT_SYSTEM_BOOST

--- cmake/consort/boost.cmake
+++ cmake/consort/boost.cmake
@@ -77,6 +77,11 @@
 	)
 endif()

+## CONSORT_PERMIT_SYSTEM_BOOST
+# Set to ON to allow Consort to find boost in the system include directories. By
+# default Consort does not find the system boost to allow you build against a
+# stable and consistent external version of boost.
+
 ## Externals/co_enable_boost
 #
 # ```
@@ -117,7 +122,11 @@
 	endif()

 	# Avoid finding the system version of boost
-	set(Boost_NO_SYSTEM_PATHS ON)
+	if(CONSORT_PERMIT_SYSTEM_BOOST)
+		set(Boost_NO_SYSTEM_PATHS OFF)
+	else()
+		set(Boost_NO_SYSTEM_PATHS ON)
+	endif()

 	find_package(Boost ${version} REQUIRED COMPONENTS ${ARGN})


Added support for product names in package names

--- cmake/mysql_version.cmake
+++ cmake/mysql_version.cmake
@@ -121,11 +121,20 @@
       SET(SYSTEM_NAME_AND_PROCESSOR "${PLATFORM}-${MACHINE}")
     ENDIF()
   ENDIF()
-
-  SET(package_name "mysql-${VERSION}-${SYSTEM_NAME_AND_PROCESSOR}" )
-  # Sometimes package suffix is added (something like icc-glibc23)
+
+  IF(SHORT_PRODUCT_TAG)
+    SET(PRODUCT_TAG "-${SHORT_PRODUCT_TAG}")
+  ELSEIF(MYSQL_SERVER_SUFFIX)
+    SET(PRODUCT_TAG "${MYSQL_SERVER_SUFFIX}")  # Already has a leading dash
+  ELSE()
+    SET(PRODUCT_TAG)
+  ENDIF()
+
+  SET(package_name "mysql${PRODUCT_TAG}-${VERSION}-${SYSTEM_NAME_AND_PROCESSOR}")
+
+  # Sometimes package suffix is added (something like "-icc-glibc23")
   IF(PACKAGE_SUFFIX)
-    SET(package_name "${package_name}-${PACKAGE_SUFFIX}")
+    SET(package_name "${package_name}${PACKAGE_SUFFIX}")
   ENDIF()
   STRING(TOLOWER ${package_name} package_name)
   SET(CPACK_PACKAGE_FILE_NAME ${package_name})


BUG: CTEST_DASHBOARD_ROOT should point to root

Otherwise ctest complains about CTestConfig.cmake not being found

--- src/Testing/Dashboard/elxDashboardCommon.cmake
+++ src/Testing/Dashboard/elxDashboardCommon.cmake
@@ -69,7 +69,7 @@

 # Select a source directory name.
 if( NOT DEFINED CTEST_SOURCE_DIRECTORY )
-  set( CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/elastix/src" )
+  set( CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/elastix" )
 endif()

 # Select a build directory name.


Find pyrcc4 executable added

Find pyrcc4 executable added

--- adm_local/cmake_files/FindPyQt4.cmake
+++ adm_local/cmake_files/FindPyQt4.cmake
@@ -44,6 +44,7 @@
 ENDIF()

 FIND_PROGRAM(PYQT_PYUIC_PATH NAMES pyuic4 pyuic4.bat)
+FIND_PROGRAM(PYQT_PYRCC_EXECUTABLE NAMES pyrcc4 pyrcc4.exe)

 # Get root dir locally, going up two levels from the exec:
 GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${PYQT_PYUIC_PATH}" PATH)
@@ -93,5 +94,5 @@
 ENDFOREACH()

 INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(PyQt4 REQUIRED_VARS PYQT_PYUIC_PATH PYQT_SIPS_DIR PYQT_SIPFLAGS)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(PyQt4 REQUIRED_VARS PYQT_PYUIC_PATH PYQT_SIPS_DIR PYQT_SIPFLAGS )


Paraview/VTK to use System-wide protobuf

This avoid run-time error due to the conflict between the VTK-provided
protobuf 2.6.1 at runtime and system-wide 3.0+ version used by other
superbuild projects, that make their code require 3.0+ version at runtime

--- Superbuild/Projects/paraview.cmake
+++ Superbuild/Projects/paraview.cmake
@@ -1,3 +1,9 @@
+set(pv_cmake_options "")
+find_package(Protobuf)
+if (Protobuf_FOUND)
+  list(APPEND pv_cmake_options "-DVTK_USE_SYSTEM_PROTOBUF:BOOL=TRUE" )
+  message(MESSAGE "Found a system-wide Protobuf library, tell VTK to use it to avoid runtime version mismatch")
+endif()
 superbuild_add_project(paraview
   DEPENDS qt5 python pythonqt
   DEFAULT_ON
@@ -59,6 +65,7 @@
     -DPARAVIEW_QT_VERSION:STRING=${qt_version}
     -DVTK_RENDERING_BACKEND:STRING=OpenGL2
     -DVTK_LEGACY_SILENT:BOOL=TRUE
+    ${pv_cmake_options}

     -DPARAVIEW_BUILD_PLUGIN_PythonQtPlugin:BOOL=TRUE
     -DPYTHONQT_DIR:PATH=<INSTALL_DIR>


Link new test data (expectations)

Link new test data (expectations)

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

 if(BUILD_TESTING)

-  set(revision_tag 5b7f4ef2)
+  set(revision_tag cc0840db)

   ExternalProject_Add(${proj}


ENH: Update FindPythonQt to expect Python using Find_package(PythonLibs)

--- Utilities/CMake/FindPythonQt.cmake
+++ Utilities/CMake/FindPythonQt.cmake
@@ -2,6 +2,12 @@
 #
 # Sets PYTHONQT_FOUND, PYTHONQT_INCLUDE_DIR, PYTHONQT_LIBRARY, PYTHONQT_LIBRARIES
 #
+
+# Python is required
+FIND_PACKAGE(PythonLibs)
+IF(NOT PYTHONLIBS_FOUND)
+  MESSAGE(FATAL_ERROR "error: Python is required to build PythonQt")
+ENDIF()

 FIND_PATH(PYTHONQT_INSTALL_DIR include/PythonQt/PythonQt.h DOC "Directory where PythonQt was installed.")
 FIND_PATH(PYTHONQT_INCLUDE_DIR PythonQt.h "${PYTHONQT_INSTALL_DIR}/include/PythonQt" DOC "Path to the PythonQt include directory")


Define GNAT_SHARED_LINKER and GNAT_EXECUTABLE_BUILDER.

Change style of configured file location.  (This is actually the same
location as previous, but this style change brings
CMakeDetermineAdaCompiler.cmake into better agreement with the equivalent
file for other languages.)

svn path=/trunk/; revision=7408

--- cmake/modules/CMakeDetermineAdaCompiler.cmake
+++ cmake/modules/CMakeDetermineAdaCompiler.cmake
@@ -44,6 +44,8 @@
 GET_FILENAME_COMPONENT(COMPILER_LOCATION "${CMAKE_Ada_COMPILER}"
   PATH)

+SET(GNAT_SHARED_LINKER ${CMAKE_Ada_COMPILER})
+FIND_PROGRAM(GNAT_EXECUTABLE_BUILDER NAMES gnatmake PATHS ${COMPILER_LOCATION} )
 FIND_PROGRAM(CMAKE_AR NAMES ar PATHS ${COMPILER_LOCATION} )

 FIND_PROGRAM(CMAKE_RANLIB NAMES ranlib)
@@ -55,7 +57,7 @@
 # configure variables set in this file for fast reload later on
 #CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeAdaCompiler.cmake.in
 CONFIGURE_FILE(${CMAKE_MODULE_PATH}/CMakeAdaCompiler.cmake.in
-               "${CMAKE_PLATFORM_ROOT_BIN}/CMakeAdaCompiler.cmake" IMMEDIATE)
+               "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeAdaCompiler.cmake" IMMEDIATE)
 MARK_AS_ADVANCED(CMAKE_AR)

 SET(CMAKE_Ada_COMPILER_ENV_VAR "ADA")


Add missing hal_buffer module for ChibiOS.

--- cmake/ChibiOS16_HAL.cmake
+++ cmake/ChibiOS16_HAL.cmake
@@ -9,7 +9,7 @@

 SET(CHIBIOS_hal_SEARCH_PATH ${CHIBIOS_ROOT}/os/hal/include ${CHIBIOS_ROOT}/os/hal/src/ ${CHIBIOS_OSAL_PATH})
 SET(CHIBIOS_hal_SEARCH_HEADERS hal.h osal.h)
-SET(CHIBIOS_hal_SOURCES hal.c hal_queues.c osal.c)
+SET(CHIBIOS_hal_SOURCES hal.c hal_buffers.c hal_queues.c osal.c)

 FOREACH(module ${CHIBIOS_HAL_MODULES})
   SET(CHIBIOS_${module}_SEARCH_PATH ${CHIBIOS_ROOT}/os/hal/include ${CHIBIOS_ROOT}/os/hal/src)


CMake: Consolidate dependency search into one place

--- cmake/DetectOptions.cmake
+++ cmake/DetectOptions.cmake
@@ -16,30 +16,30 @@
 # BZip2
 if(ADIOS2_USE_BZip2 STREQUAL AUTO)
   find_package(BZip2)
-  if(BZIP2_FOUND)
-    set(ADIOS2_HAVE_BZip2 TRUE)
-  endif()
 elseif(ADIOS2_USE_BZip2)
+  find_package(BZip2 REQUIRED)
+endif()
+if(BZIP2_FOUND)
   set(ADIOS2_HAVE_BZip2 TRUE)
 endif()

 # ZFP
 if(ADIOS2_USE_ZFP STREQUAL AUTO)
   find_package(ZFP)
-  if(ZFP_FOUND)
-    set(ADIOS2_HAVE_ZFP TRUE)
-  endif()
 elseif(ADIOS2_USE_ZFP)
+  find_package(ZFP REQUIRED)
+endif()
+if(ZFP_FOUND)
   set(ADIOS2_HAVE_ZFP TRUE)
 endif()

 # MPI
 if(ADIOS2_USE_MPI STREQUAL AUTO)
-  find_package(MPI COMPONENTS C)
-  if(MPI_FOUND)
-    set(ADIOS2_HAVE_MPI TRUE)
-  endif()
+  find_package(MPI)
 elseif(ADIOS2_USE_MPI)
+  find_package(MPI REQUIRED)
+endif()
+if(MPI_FOUND)
   set(ADIOS2_HAVE_MPI TRUE)
 endif()

@@ -49,47 +49,42 @@
 endif()

 # DataMan
-if(ADIOS2_USE_DataMan STREQUAL AUTO)
-  if(SHARED_LIBS_SUPPORTED AND NOT MSVC)
-    set(ADIOS2_HAVE_DataMan TRUE)
-  endif()
-elseif(ADIOS2_USE_DataMan)
+if(SHARED_LIBS_SUPPORTED AND NOT MSVC)
   set(ADIOS2_HAVE_DataMan TRUE)
 endif()

 # ZeroMQ
 if(ADIOS2_USE_ZeroMQ STREQUAL AUTO)
   find_package(ZeroMQ)
-  if(ZeroMQ_FOUND)
-    set(ADIOS2_HAVE_ZeroMQ TRUE)
-  endif()
 elseif(ADIOS2_USE_ZeroMQ)
+  find_package(ZeroMQ REQUIRED)
+endif()
+if(ZeroMQ_FOUND)
   set(ADIOS2_HAVE_ZeroMQ TRUE)
 endif()

 # HDF5
 if(ADIOS2_USE_HDF5 STREQUAL AUTO)
   find_package(HDF5 COMPONENTS C)
-  if(HDF5_FOUND AND
-     ((ADIOS2_HAVE_MPI AND HDF5_IS_PARALLEL) OR
-      NOT (ADIOS2_HAVE_MPI OR HDF5_IS_PARALLEL)))
-    set(ADIOS2_HAVE_HDF5 TRUE)
-  endif()
 elseif(ADIOS2_USE_HDF5)
+  find_package(HDF5 REQUIRED COMPONENTS C)
+endif()
+if(HDF5_FOUND AND
+   ((ADIOS2_HAVE_MPI AND HDF5_IS_PARALLEL) OR
+    NOT (ADIOS2_HAVE_MPI OR HDF5_IS_PARALLEL)))
   set(ADIOS2_HAVE_HDF5 TRUE)
 endif()

 # ADIOS1
+if(NOT ADIOS2_HAVE_MPI)
+  set(adios1_find_args COMPONENTS sequential)
+endif()
 if(ADIOS2_USE_ADIOS1 STREQUAL AUTO)
-  if(NOT ADIOS2_HAVE_MPI)
-    set(adios1_args COMPONENTS sequential)
-  endif()
   find_package(ADIOS1 1.12.0 ${adios1_args})
-  unset(adios1_args)
-  if(ADIOS1_FOUND)
-    set(ADIOS2_HAVE_ADIOS1 TRUE)
-  endif()
 elseif(ADIOS2_USE_ADIOS1)
+  find_package(ADIOS1 1.12.0 REQUIRED ${adios1_args})
+endif()
+if(ADIOS1_FOUND)
   set(ADIOS2_HAVE_ADIOS1 TRUE)
 endif()

@@ -98,39 +93,35 @@
 list(INSERT CMAKE_MODULE_PATH 0
   "${ADIOS2_SOURCE_DIR}/thirdparty/pybind11/pybind11/tools"
 )
-if(ADIOS2_USE_Python STREQUAL AUTO)
+if(ADIOS2_USE_Python)
+  if(NOT (ADIOS2_USE_Python STREQUAL AUTO))
+    set(python_find_args REQUIRED)
+  endif()
   if(SHARED_LIBS_SUPPORTED AND ADIOS2_ENABLE_PIC)
     set(Python_ADDITIONAL_VERSIONS 3 2.7)
-    find_package(PythonInterp)
-    find_package(PythonLibsNew)
-    if(PYTHONLIBS_FOUND)
-      if(ADIOS2_HAVE_MPI)
-        find_package(PythonModule COMPONENTS mpi4py mpi4py/mpi4py.h)
-        if(PythonModule_mpi4py_FOUND)
-          set(ADIOS2_HAVE_Python TRUE)
-        endif()
-      else()
-        set(ADIOS2_HAVE_Python TRUE)
-      endif()
+    list(APPEND python_find_args COMPONENTS Interp Libs numpy)
+    if(ADIOS2_HAVE_MPI)
+      list(APPEND python_find_args "mpi4py\\\;mpi4py/mpi4py.h")
     endif()
+    find_package(PythonFull ${python_find_args})
   endif()
-elseif(ADIOS2_USE_Python)
-  set(ADIOS2_HAVE_Python TRUE)
+endif()
+if(PythonFull_FOUND)
+  set(ADIOS2_HAVE_Python ON)
 endif()

 #SysV IPC
-if(ADIOS2_USE_SysVShMem STREQUAL AUTO)
-  if(UNIX)
-    include(CheckSymbolExists)
-    CHECK_SYMBOL_EXISTS(shmget "sys/ipc.h;sys/shm.h" HAVE_shmget)
-    if(HAVE_shmget)
-      set(ADIOS2_HAVE_SysVShMem ON)
-    else()
-      set(ADIOS2_HAVE_SysVShMem OFF)
-    endif()
+if(UNIX)
+  include(CheckSymbolExists)
+  CHECK_SYMBOL_EXISTS(shmget "sys/ipc.h;sys/shm.h" HAVE_shmget)
+  if(HAVE_shmget)
+    set(ADIOS2_HAVE_SysVShMem ON)
   else()
     set(ADIOS2_HAVE_SysVShMem OFF)
   endif()
-elseif(ADIOS2_USE_SysVShMem)
-  set(ADIOS2_HAVE_SysVShMem TRUE)
+else()
+  set(ADIOS2_HAVE_SysVShMem OFF)
 endif()
+
+# Multithreading
+find_package(Threads REQUIRED)


let ssc use pgi compiler

let ssc use pgi compiler

--- cmake/DetectOptions.cmake
+++ cmake/DetectOptions.cmake
@@ -179,7 +179,7 @@

 # SSC
 # SSC currently breaks the PGI compiler
-if(NOT (CMAKE_CXX_COMPILER_ID STREQUAL "PGI") AND NOT MSVC)
+if(NOT MSVC)
     if(ADIOS2_HAVE_MPI)
         if(ADIOS2_USE_SSC STREQUAL AUTO)
             set(ADIOS2_HAVE_SSC TRUE)


Don't add vorbisenc twice

Don't add vorbisenc twice

--- cmake/FindOggVorbis.cmake
+++ cmake/FindOggVorbis.cmake
@@ -33,7 +33,7 @@
 if(VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
    set(OGGVORBIS_FOUND TRUE)

-   set(OGGVORBIS_LIBRARIES ${OGG_LIBRARY} ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY} ${VORBISENC_LIBRARY})
+   set(OGGVORBIS_LIBRARIES ${OGG_LIBRARY} ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY})
    set(OGGVORBIS_INCLUDE_DIRS ${OGG_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR})

    if(VORBISENC_LIBRARY)


[build] Rename clang-headers to clang-resource-headers

Summary:
The current install-clang-headers target installs clang's resource
directory headers. This is different from the install-llvm-headers
target, which installs LLVM's API headers. We want to introduce the
corresponding target to clang, and the natural name for that new target
would be install-clang-headers. Rename the existing target to
install-clang-resource-headers to free up the install-clang-headers name
for the new target, following the discussion on cfe-dev [1].

I didn't find any bots on zorg referencing install-clang-headers. I'll
send out another PSA to cfe-dev to accompany this rename.

[1] http://lists.llvm.org/pipermail/cfe-dev/2019-February/061365.html

Reviewers: beanz, phosek, tstellar, rnk, dim, serge-sans-paille

Subscribers: mgorny, javed.absar, jdoerfert, #sanitizers, openmp-commits, lldb-commits, cfe-commits, llvm-commits

Tags: #clang, #sanitizers, #lldb, #openmp, #llvm

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

git-svn-id: f99161ee8ccfe2101cbe1bdda2220bce2ed25485@355340 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/OpenMPTesting.cmake
+++ cmake/OpenMPTesting.cmake
@@ -167,7 +167,7 @@
     add_lit_testsuite(${target}
       ${comment}
       ${ARG_UNPARSED_ARGUMENTS}
-      DEPENDS clang clang-headers FileCheck ${ARG_DEPENDS}
+      DEPENDS clang clang-resource-headers FileCheck ${ARG_DEPENDS}
       ARGS ${ARG_ARGS}
     )
   endif()


Fix missing ENDIF() in ZincPackaging.cmake.  https://tracker.physiomeproject.org/show_bug.cgi?id=3726

--- cmake/ZincPackaging.cmake
+++ cmake/ZincPackaging.cmake
@@ -14,6 +14,7 @@
         SET(ZINC_ARCHITECTURE x86)
     ELSE()
         SET(ZINC_ARCHITECTURE amd64)
+    ENDIF()
 ENDIF()

 FUNCTION( GET_ZINC_SYSTEM_NAME RETURN_SYSTEM_NAME )


draco: Support multiple link flags in older CMakes

Stringify the flag list and apply the flags in CMakes before
v3.13.

--- cmake/draco_targets.cmake
+++ cmake/draco_targets.cmake
@@ -110,10 +110,11 @@

   if(exe_LINK_FLAGS OR DRACO_EXE_LINKER_FLAGS)
     if(${CMAKE_VERSION} VERSION_LESS "3.13")
-      set(link_flags ${exe_LINK_FLAGS} ${DRACO_EXE_LINKER_FLAGS})
+      list(APPEND exe_LINK_FLAGS "${DRACO_EXE_LINKER_FLAGS}")
+      # LINK_FLAGS is managed as a string.
+      draco_set_and_stringify(SOURCE "${exe_LINK_FLAGS}" DEST exe_LINK_FLAGS)
       set_target_properties(${exe_NAME}
-                            PROPERTIES LINK_FLAGS ${exe_LINK_FLAGS}
-                                       ${DRACO_EXE_LINKER_FLAGS})
+                            PROPERTIES LINK_FLAGS "${exe_LINK_FLAGS}")
     else()
       target_link_options(${exe_NAME} PRIVATE ${exe_LINK_FLAGS}
                           ${DRACO_EXE_LINKER_FLAGS})


remove copying trt to inference lib, test=develop (#22470)

--- cmake/inference_lib.cmake
+++ cmake/inference_lib.cmake
@@ -124,13 +124,6 @@
                 DSTS ${dst_dir} ${dst_dir})
     endif ()

-    if (TENSORRT_FOUND)
-        set(dst_dir "${DST}/third_party/install/tensorrt")
-        copy(${TARGET}
-                SRCS ${TENSORRT_INCLUDE_DIR}/Nv*.h ${TENSORRT_LIBRARY_DIR}/*nvinfer*
-                DSTS ${dst_dir}/include ${dst_dir}/lib)
-    endif ()
-
     if (LITE_BINARY_DIR)
         set(dst_dir "${DST}/third_party/install/lite")
         copy(${TARGET}
@@ -283,8 +276,7 @@
     endif()
     if(TENSORRT_FOUND)
         file(APPEND ${version_file}
-                "WITH_TENSORRT: ${TENSORRT_FOUND}\n"
-                "TENSORRT_ROOT: ${TENSORRT_ROOT}\n")
+                "WITH_TENSORRT: ${TENSORRT_FOUND}\n")
     endif()

 endfunction()


Show error when doc target doesn't exist (b/c Doxygen)


Enabling WITH_HTTP_PROXY per default

Enabling WITH_HTTP_PROXY per default

--- cmake/ConfigOptions.cmake
+++ cmake/ConfigOptions.cmake
@@ -68,7 +68,7 @@

 option(WITH_CHANNELS "Build virtual channel plugins" ON)

-option(WITH_HTTP_PROXY "Build HTTP proxy support" OFF)
+option(WITH_HTTP_PROXY "Build HTTP proxy support" ON)

 if(WITH_CLIENT AND WITH_CHANNELS)
 	option(WITH_CLIENT_CHANNELS "Build virtual channel plugins" ON)


Mac requires boost_thread

Mac requires boost_thread

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -15,7 +15,11 @@
 find_Package(SDL2 REQUIRED)
 find_package(OggVorbis REQUIRED)
 find_package(OpenGL REQUIRED)
-find_package(Boost COMPONENTS system filesystem REQUIRED)
+if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+	find_package(Boost COMPONENTS system filesystem thread REQUIRED)
+else()
+	find_package(Boost COMPONENTS system filesystem REQUIRED)
+endif()

 if (MSVC)
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /fp:fast")
@@ -29,9 +33,6 @@
 	set(EXTRA_LIBS pthread)
 	set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
 endif()
-
-message("filesystem: " ${Boost_FILESYSTEM_LIBRARY})
-message("system: " ${Boost_SYSTEM_LIBRARY})

 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DGSL_THROW_ON_CONTRACT_VIOLATION")
 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DGSL_UNENFORCED_ON_CONTRACT_VIOLATION")


After rL357618, quote ${CMAKE_THREAD_LIBS_INIT} so CMake does not
complain when the variable is empty.  Fixes PR 41401.

git-svn-id: f99161ee8ccfe2101cbe1bdda2220bce2ed25485@357828 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/OpenMPTesting.cmake
+++ cmake/OpenMPTesting.cmake
@@ -123,7 +123,7 @@
   # Unfortunately the top-level cmake/config-ix.cmake file mangles CMake's
   # CMAKE_THREAD_LIBS_INIT variable from the FindThreads package, so work
   # around that, until it is fixed there.
-  if(${CMAKE_THREAD_LIBS_INIT} STREQUAL "-lpthread")
+  if("${CMAKE_THREAD_LIBS_INIT}" STREQUAL "-lpthread")
     set(OPENMP_TEST_COMPILER_THREAD_FLAGS "-pthread")
   else()
     set(OPENMP_TEST_COMPILER_THREAD_FLAGS "${CMAKE_THREAD_LIBS_INIT}")


Sending CMAKE_BUILD_TYPE to parent project

--- cmake/elemental_sub.cmake
+++ cmake/elemental_sub.cmake
@@ -1,4 +1,5 @@
 set(LIBRARY_TYPE ${LIBRARY_TYPE} PARENT_SCOPE)
+string(TOUPPER ${CMAKE_BUILD_TYPE} UPPER_BUILD_TYPE)
 set(CMAKE_CXX_FLAGS_${UPPER_BUILD_TYPE} ${CMAKE_CXX_FLAGS_${UPPER_BUILD_TYPE}} PARENT_SCOPE)
 set(MPI_C_COMPILER ${MPI_C_COMPILER} PARENT_SCOPE)
 set(MPI_C_INCLUDE_PATH ${MPI_C_INCLUDE_PATH} PARENT_SCOPE)


include the new name for the cray auto detection type

embree changed the cray isa autodetection type to DEFAULT. This
change restores the old code path to what it was in that
environment.

--- cmake/ospray_macros.cmake
+++ cmake/ospray_macros.cmake
@@ -56,7 +56,8 @@
 endmacro()

 macro(ospray_determine_embree_isa_support)
-  if (EMBREE_MAX_ISA STREQUAL "NONE")
+  if (EMBREE_MAX_ISA STREQUAL "DEFAULT" OR
+      EMBREE_MAX_ISA STREQUAL "NONE")
     set(EMBREE_ISA_SUPPORTS_SSE2      ${EMBREE_ISA_SSE2})
     set(EMBREE_ISA_SUPPORTS_SSE4      ${EMBREE_ISA_SSE42})
     set(EMBREE_ISA_SUPPORTS_AVX       ${EMBREE_ISA_AVX})


qi_add_test: Accept a package name as test binary.

Change-Id: Ia352744a9557c8f37ffcf374d87e432a9c765bc4
Reviewed-on: http://gerrit.aldebaran.lan:8080/16980
Tested-by: gerrit
Reviewed-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>
Reviewed-by: mnottale <e3ccf1b6558404e921a21fa09cebb1153b50ec36@aldebaran-robotics.com>
Tested-by: mnottale <e3ccf1b6558404e921a21fa09cebb1153b50ec36@aldebaran-robotics.com>

--- cmake/qibuild/tests.cmake
+++ cmake/qibuild/tests.cmake
@@ -125,8 +125,8 @@
 #
 # This calls ``add_test()`` with the same arguments but:
 #
-#  * We look for the binary in sdk/bin, and we know
-#    there is a _d when using Visual Studio
+#  * We look for the binary in sdk/bin, as a target, or an external
+#    package, and we know there is a _d when using Visual Studio
 #  * We set a 'tests' folder property
 #  * We make sure necessary environment variables are set on mac
 #
@@ -134,7 +134,9 @@
 # :cmake:function:`qi_create_test` or :cmake:function:`qi_create_gtest` instead.
 #
 # \arg:test_name The name of the test
-# \arg:target_name The name of the binary to use
+# \arg:target_name The name of the binary to use. It can be a target name,
+#                  an absolute or relative path to an existing file,
+#                  or a package name providing a ${name}_EXECUTABLE variable.
 # \param:TIMEOUT The timeout of the test
 # \flag: NIGHTLY: only compiled (and thus run) if QI_NIGHTLY_TESTS is ON
 # \group:ARGUMENTS Arguments to be passed to the executable
@@ -147,7 +149,10 @@
   if(NOT ARG_TIMEOUT)
     set(ARG_TIMEOUT 20)
   endif()
-
+  # Validate target_name. We expect one of:
+  # - A target name expected to be an executable with standard path.
+  # - A relative or absolute path to an existing binary.
+  # - A package name providing a ${name}_EXECUTABLE variable.
   if(TARGET ${target_name})
     set(_bin_path ${QI_SDK_DIR}/${QI_SDK_BIN}/${target_name})

@@ -157,12 +162,17 @@

     add_test(${test_name} ${_bin_path} ${ARG_ARGUMENTS})
     set_target_properties(${target_name} PROPERTIES FOLDER "tests")
-  # If test is not a binary, assume it is a test script
   else()
     # Just in case user specified a relative path:
     get_filename_component(_full_path ${target_name} ABSOLUTE)
-    if (NOT EXISTS ${_full_path})
-      qi_error("${target_name} is not a target nor an existing path")
+    if(NOT EXISTS ${_full_path})
+      # Try package
+      find_package(${target_name})
+      string(TOUPPER ${target_name}_EXECUTABLE _executable)
+      if(NOT ${_executable}) # If expects a variable name not content
+        qi_error("${target_name} is not a target, an existing file or a package providing ${target_name}_EXECUTABLE")
+      endif()
+      set(_full_path ${${_executable}})
     endif()
     add_test(${test_name} ${_full_path} ${ARG_ARGUMENTS})
   endif()


Find libcxsparse and add it to link line

--- opensfm/src/cmake/FindSuiteSparse.cmake
+++ opensfm/src/cmake/FindSuiteSparse.cmake
@@ -310,6 +310,20 @@
 ENDIF (EXISTS ${CHOLMOD_INCLUDE_DIR})
 MARK_AS_ADVANCED(CHOLMOD_INCLUDE_DIR)

+# CXSPARSE.
+SET(CXSPARSE_FOUND TRUE)
+LIST(APPEND SUITESPARSE_FOUND_REQUIRED_VARS CXSPARSE_FOUND)
+FIND_LIBRARY(CXSPARSE_LIBRARY NAMES cxsparse
+  PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS})
+IF (EXISTS ${CXSPARSE_LIBRARY})
+  MESSAGE(STATUS "Found CXSPARSE library: ${CXSPARSE_LIBRARY}")
+ELSE (EXISTS ${CXSPARSE_LIBRARY})
+  SUITESPARSE_REPORT_NOT_FOUND(
+    "Did not find CXSPARSE library (required SuiteSparse component).")
+  SET(CXSPARSE_FOUND FALSE)
+ENDIF (EXISTS ${CXSPARSE_LIBRARY})
+MARK_AS_ADVANCED(CXSPARSE_LIBRARY)
+
 # SuiteSparseQR.
 SET(SUITESPARSEQR_FOUND TRUE)
 LIST(APPEND SUITESPARSE_FOUND_REQUIRED_VARS SUITESPARSEQR_FOUND)
@@ -569,6 +583,7 @@
     ${CCOLAMD_LIBRARY}
     ${CAMD_LIBRARY}
     ${COLAMD_LIBRARY}
+    ${CXSPARSE_LIBRARY}
     ${AMD_LIBRARY}
     ${LAPACK_LIBRARIES}
     ${BLAS_LIBRARIES})


excplicitly set execute permission of test scripts

--- config/VigraAddTest.cmake
+++ config/VigraAddTest.cmake
@@ -92,6 +92,7 @@
         CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config/run_test.sh.in
                        ${VIGRA_RUN_TEST}
                        @ONLY)
+        EXECUTE_PROCESS(COMMAND chmod u+x ${VIGRA_RUN_TEST} OUTPUT_QUIET ERROR_QUIET)
     ENDIF()

     # register the test execution command


Remove a GL ES 2 reference in the 1.7 branch

--HG--
branch : v1-7
extra : rebase_source : b28620a06867c356e276797f86ee3cdad11fb379

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -92,10 +92,6 @@
 find_package(OpenGLES)
 macro_log_feature(OPENGLES_FOUND "OpenGL ES" "Support for the OpenGL ES 1.x render system" "http://www.khronos.org/opengles/" FALSE "" "")

-# Find OpenGL ES 2.x
-#find_package(OpenGLES2)
-#macro_log_feature(OPENGLES2_FOUND "OpenGL ES 2" "Support for the OpenGL ES 2.x render system" "http://www.khronos.org/opengles/" FALSE "" "")
-
 # Find DirectX
 if(WIN32)
 	find_package(DirectX)


UPD: uses full stack protection by default

--- CMakeLists.default.cmake
+++ CMakeLists.default.cmake
@@ -3,15 +3,15 @@
 set(SHARED_DIR "share")

 if (CMAKE_COMPILER_IS_GNUCXX)
-	set(CMAKE_C_FLAGS "-Wall -Wshadow -Wconversion -Wno-sign-conversion -fstrict-aliasing -std=c99 ${CMAKE_USER_C_FLAGS}" CACHE STRING
+	set(CMAKE_C_FLAGS "-Wall -Wshadow -Wconversion -Wno-sign-conversion -fstrict-aliasing -fstack-protector-all -std=c99 ${CMAKE_USER_C_FLAGS}" CACHE STRING
 		"Flags used by the compiler during all build types." FORCE
 	)

-	set(CMAKE_C_FLAGS_DEBUG "-fdiagnostics-color=auto -g ${CMAKE_USER_C_FLAGS}"  CACHE STRING
+	set(CMAKE_C_FLAGS_DEBUG "-fdiagnostics-color=auto -g -fstack-protector-all ${CMAKE_USER_C_FLAGS}"  CACHE STRING
 		"Flags used by the compiler during debug build." FORCE
 	)

-	set(CMAKE_C_FLAGS_RELEASE "-O2 -fomit-frame-pointer -D_FORTIFY_SOURCE=1 ${CMAKE_USER_C_FLAGS}" CACHE STRING
+	set(CMAKE_C_FLAGS_RELEASE "-O2 -fomit-frame-pointer -D_FORTIFY_SOURCE=1 -fstack-protector-all ${CMAKE_USER_C_FLAGS}" CACHE STRING
 		"Flags used by the compiler during release build." FORCE
 	)
 endif (CMAKE_COMPILER_IS_GNUCXX)


Revert "cmake: fix avr target"

Revert "cmake: fix avr target"

This reverts commit 987f70786b31ba501ae927cb96a50ccec8e99576.

--- cmake/Arduino.cmake
+++ cmake/Arduino.cmake
@@ -619,9 +619,9 @@
     # Compile elf
     add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
             COMMAND ${AVR_C_COMPILER}
-            ARGS -o ${TARGET_PATH}.elf
+            ARGS ${COMPILE_FLAGS}
             ${ALL_SRCS}
-            ${COMPILE_FLAGS}
+            -o ${TARGET_PATH}.elf
             WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
             COMMENT "Compiling ELF"
             VERBATIM)


FindANN not needed anymore

FindANN not needed anymore

--- cmake/FIndANN.cmake
+++ cmake/FIndANN.cmake
@@ -1,86 +0,0 @@
-# - Find ANN
-# Find the ANN includes and library
-# This module defines
-#  ANN_INCLUDE_DIR, where to find 'ANN.h', etc.
-#  ANN_LIBRARIES, the libraries needed to use ANN.
-#  ANN_FOUND, If false, do not try to use ANN.
-#
-
-set(ANN_INSTALL_DIR $ENV{ANN_INSTALL_DIR} CACHE PATH "Path to ANN installed location.")
-
-# setup of hint paths
-set(lib_search_hints )
-set(inc_search_hints )
-if (ANN_INSTALL_DIR)
-    set(lib_search_hints "${ANN_INSTALL_DIR}" "${ANN_INSTALL_DIR}/lib")
-    set(inc_search_hints "${ANN_INSTALL_DIR}" "${ANN_INSTALL_DIR}/include")
-endif()
-
-if (WIN32)
-  set(dll_search_hints "${ANN_INSTALL_DIR}" "${ANN_INSTALL_DIR}/bin")
-else()
-  set(dll_search_hints "")
-endif()
-
-
-# setup of system search paths
-set(lib_search_paths /lib /usr/lib /usr/local/lib)
-set(inc_search_paths /usr/include /usr/local/include)
-
-if (WIN32)
-  set(CMAKE_FIND_LIBRARY_PREFIXES "")
-  set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
-else()
-  set(CMAKE_FIND_LIBRARY_PREFIXES "lib")
-  set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" ".so")
-endif()
-
-# perform the search
-find_library(ANN_LIBRARIES
-  ANN
-  HINTS
-    ${lib_search_hints})
-if (WIN32)
-find_library(ANN_DLL
-  ANN
-  HINTS
-    ${dll_search_hints})
-endif()
-# if (WIN32)
-#   find_library(ANN_LIBRARIES
-#     NAMES ANN.lib
-#     HINTS ${lib_search_hints})
-#   find_file(ANN_DLL
-#     NAMES ANN.dll
-#     HINTS ${dll_search_hints})
-# else()
-#   find_library(ANN_LIBRARIES
-#     NAMES libANN.so
-#     HINTS ${lib_search_hints}
-#     PATHS ${lib_search_paths})
-# endif()
-find_path(ANN_INCLUDE_DIR
-    NAMES ANN/ANN.h
-    HINTS ${inc_search_hints}
-    PATHS ${inc_search_paths}
-    )
-
-# finalizing search
-if (ANN_LIBRARIES AND ANN_INCLUDE_DIR)
-    set(ANN_FOUND TRUE)
-else ()
-    set(ANN_FOUND FALSE)
-endif ()
-
-# search result feedback
-if (ANN_FOUND)
-    if (NOT ANN_FIND_QUIETLY)
-        message(STATUS "Found ANN: ${ANN_LIBRARIES}")
-    endif ()
-else ()
-    if (ANN_FIND_REQUIRED)
-        #message( "library: ${ANN_LIBRARIES}" )
-        #message( "include: ${ANN_INCLUDE_DIR}" )
-        message(FATAL_ERROR "Could not find ANN library")
-    endif ()
-endif ()


CELIX-237: updated FindFFI added hints for unbuntu's ffi directory layout

--- cmake/FindFFI.cmake
+++ cmake/FindFFI.cmake
@@ -24,12 +24,12 @@
 #  FFI_LIBRARIES - The libraries needed to use this package

 find_path(FFI_INCLUDE_DIR ffi.h
-		PATHS $ENV{FFI_DIR} ${FFI_DIR} /usr /usr/local /opt/local
-          	PATH_SUFFIXES include include/ffi)
+		PATHS $ENV{FFI_DIR} ${FFI_DIR} /usr /usr/local /opt/local
+        PATH_SUFFIXES include include/ffi include/x86_64-linux-gnu)

 find_library(FFI_LIBRARY NAMES ffi
              	PATHS $ENV{FFI_DIR} ${FFI_DIR} /usr /usr/local /opt/local
-             	PATH_SUFFIXES lib lib64)
+             	PATH_SUFFIXES lib lib64 lib/x86_64-linux-gnu)

 include(FindPackageHandleStandardArgs)


use update submodule

use update submodule

--- cmake/Findlcc.cmake
+++ cmake/Findlcc.cmake
@@ -65,12 +65,12 @@
 		    option(GIT_SUBMODULE "Check submodules during build" ON)
 		    if(GIT_SUBMODULE)
 		        message(STATUS "Submodule update")
-#		        execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
-#		                        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-#		                        RESULT_VARIABLE GIT_SUBMOD_RESULT)
-#		        if(NOT GIT_SUBMOD_RESULT EQUAL "0")
-#		            set(failure_messge  "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
-#		        endif()
+		        execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
+		                        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+		                        RESULT_VARIABLE GIT_SUBMOD_RESULT)
+		        if(NOT GIT_SUBMOD_RESULT EQUAL "0")
+		            set(failure_messge  "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
+		        endif()
 		    endif()
 		endif()
 		if(NOT EXISTS "${PROJECT_SOURCE_DIR}/extern/license-generator/CMakeLists.txt")


As requested by Otto Käkelainen the directory for client plugins in Debian should  contain also the major version number.

--- cmake/install.cmake
+++ cmake/install.cmake
@@ -96,7 +96,7 @@
 IF(PLUGINDIR_DEB)
   SET(INSTALL_PLUGINDIR_DEB "${INSTALL_LIBDIR_DEB}/${PLUGINDIR_DEB}/plugin")
 ELSE()
-  SET(INSTALL_PLUGINDIR_DEB "${INSTALL_LIBDIR_DEB}/mariadb/plugin")
+  SET(INSTALL_PLUGINDIR_DEB "${INSTALL_LIBDIR_DEB}/mariadb${CPACK_PACKAGE_VERSION_MAJOR}/plugin")
 ENDIF()
 SET(INSTALL_INCLUDEDIR_DEB "include/mariadb")
 SET(LIBMARIADB_STATIC_DEB "mariadb")


Fix CMake warning about OpenGL

Fix CMake warning about OpenGL

--- src/cmake/external_libs.cmake
+++ src/cmake/external_libs.cmake
@@ -65,6 +65,10 @@

   ####
   # OpenGL
+
+  if(NOT DEFINED OpenGL_GL_PREFERENCE)
+    set(OpenGL_GL_PREFERENCE "LEGACY")
+  endif()

   # TODO(sergey): We currently re-use the same variable name as we use
   # in Blender. Ideally we need to make it CYCLES_GL_LIBRARIES.


Delete spdlogConfig.cmake

Delete spdlogConfig.cmake

--- cygwin/spdlogConfig.cmake
+++ cygwin/spdlogConfig.cmake
@@ -1,15 +0,0 @@
-# Copyright(c) 2019 spdlog authors
-# Distributed under the MIT License (http://opensource.org/licenses/MIT)
-
-find_package(Threads REQUIRED)
-
-set(SPDLOG_FMT_EXTERNAL OFF)
-set(config_targets_file spdlogConfigTargets.cmake)
-
-if(SPDLOG_FMT_EXTERNAL)
-    include(CMakeFindDependencyMacro)
-    find_dependency(fmt CONFIG)
-endif()
-
-
-include("${CMAKE_CURRENT_LIST_DIR}/${config_targets_file}")


Add codecov.io support. (3)

Add codecov.io support. (3)

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -294,10 +294,10 @@
         exec_program(python ${CTEST_SOURCE_DIRECTORY} ARGS ci-tools/merge_cobertura.py -p "${CTEST_BINARY_DIRECTORY}" -o "${CTEST_BINARY_DIRECTORY}\\coverage.xml")
         set(ENV{COBERTURADIR} "${CTEST_BINARY_DIRECTORY}")
     endif()
+    ctest_coverage()
     if(UNIX)
         execute_process(COMMAND curl -s https://codecov.io/bash COMMAND bash)
     endif()
-    ctest_coverage()
     ctest_submit(PARTS Start Update Configure Build Test Coverage Upload Submit)
 endif()


Add quantization ops to cmake build. Change: 136497385

--- tensorflow/contrib/cmake/tf_core_kernels.cmake
+++ tensorflow/contrib/cmake/tf_core_kernels.cmake
@@ -90,6 +90,8 @@
       "${tensorflow_source_dir}/tensorflow/core/kernels/immutable_constant_op.h"
       "${tensorflow_source_dir}/tensorflow/core/kernels/sparse_matmul_op.cc"
       "${tensorflow_source_dir}/tensorflow/core/kernels/sparse_matmul_op.h"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/quantize*.h"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/quantize*.cc"
   )
   list(REMOVE_ITEM tf_core_kernels_srcs ${tf_core_kernels_windows_exclude_srcs})
 endif(WIN32)


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -16,6 +16,7 @@
 Name[nl]=Instant Messaging
 Name[pt]=Mensagens Instantâneas
 Name[pt_BR]=Mensagens instantâneas
+Name[ro]=Mesagerie instantanee
 Name[ru]=Система обмена сообщениями
 Name[sk]=Priama komunikácia
 Name[sl]=Hipno sporočanje
@@ -47,6 +48,7 @@
 Comment[nl]=Begin een chat met een van uw IM-contactpersonen of wijzig uw IM-status
 Comment[pt]=Iniciar uma conversa com qualquer um dos seus contactos MI ou mudar o seu estado
 Comment[pt_BR]=Inicia um bate-papo com um dos seus contatos de MI ou altera o seu status
+Comment[ro]=Începeți o discuție cu oricare dintre contactele de MI sau schimbați-vă starea
 Comment[ru]=Начать общение с любым вашим контактом или изменить ваш статус в системе обмена сообщениями
 Comment[sk]=Spustiť rozhovor s nejakým z vašich IM kontaktov alebo zmeniť váš IM stav
 Comment[sl]=Začnite klepet s katerimkoli izmed vaših stikov hipnega sporočanja ali spremenite vaše stanje


template: mention that static_deployer.cmake gets rendered into OrocosComponent.cmake

When CORBA support is enabled, static_deployer.cmake is rendered at the
bottom of OrocosComponent.cmake. Thus, even though the
static_deployer.cmake file +is+ installed in the generated component,
it is not used.

This is important for buildsystem debugging (i.e. people should change
OrocosComponent.cmake instead of static_deployer.cmake)

--- lib/orogen/templates/config/static_deployer.cmake
+++ lib/orogen/templates/config/static_deployer.cmake
@@ -1,3 +1,12 @@
+#
+#
+# WARNING: BIG FAT WARNING !!!! BIG FAT WARNING !!! BIG FAT WARNING
+# WARNING: this file is NOT used by CMake. It gets included in the OrocosComponent.cmake
+# WARNING: configuration file for deployments that use Corba, but the file in itself
+# WARNING: is NOT used in the finally generated module (even though it is present there)
+#
+#
+
 <% if deployer.browse %>
 pkg_check_modules(OrocosOCL REQUIRED orocos-ocl-${OROCOS_TARGET})
 INCLUDE_DIRECTORIES(${OrocosOCL_INCLUDE_DIRS})


STYLE: Cleaned up format of message, thanks to Brad King.

--- CMake/vtkCheckSourceTree.cmake
+++ CMake/vtkCheckSourceTree.cmake
@@ -6,20 +6,13 @@
 if(NOT VTK_IGNORE_HOOKS AND NOT VTK_FROM_CTEST AND
     EXISTS "${VTK_SOURCE_DIR}/.git/config")
   if(NOT EXISTS "${VTK_SOURCE_DIR}/.git/hooks/.git/config")
-    message(FATAL_ERROR "
- Please initialize your local Git hooks, paste the following into a shell:
-
- cd ${VTK_SOURCE_DIR}/.git/hooks
+    message(FATAL_ERROR
+"Please initialize your local Git hooks, paste the following into a shell:
+ cd \"${VTK_SOURCE_DIR}/.git/hooks\"
  git init
  git pull .. remotes/origin/hooks
  cd ../..
-
- See http://www.vtk.org/Wiki/VTK/Git#Hooks for more details.
-
- If you wish to ignore this check for a build set the CMake cache variable
- VTK_IGNORE_HOOKS to ON. To ignore this check in all builds either archive
- your clone, or create the file ${VTK_SOURCE_DIR}/.git/hooks/.git/config
- in your source tree.
- ")
+See http://www.vtk.org/Wiki/VTK/Git#Hooks for more details.
+If you wish to ignore this check for a build set the CMake cache variable VTK_IGNORE_HOOKS to ON. To ignore this check in all builds either archive your clone, or create the file\n ${VTK_SOURCE_DIR}/.git/hooks/.git/config\nin your source tree.")
   endif()
 endif()


COMP: Deactivated PipeLine Test as inner class must be rebuilt for Linux

--- Modules/US/Testing/files.cmake
+++ Modules/US/Testing/files.cmake
@@ -3,7 +3,7 @@
    mitkUSImageVideoSourceTest.cpp
    mitkUSProbeTest.cpp
    mitkUSDeviceTest.cpp
-   mitkUSPipelineTest.cpp
+   #mitkUSPipelineTest.cpp //deactivated until bugfix for mitkImage cloning available

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


Fix dashboards scripts.

Fix dashboards scripts.

Github stopped the download section, so transfering to midas for now.
See https://github.com/blog/1302-goodbye-uploads.

See Issue #13720

--- CMake/TEMPLATE.BenderDashboardScript.cmake
+++ CMake/TEMPLATE.BenderDashboardScript.cmake
@@ -67,7 +67,7 @@
 #
 # Project specific properties
 #
-set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/Bender")
+set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/Bender-${CTEST_BUILD_CONFIGURATION}-${GIT_BRANCH_NAME}")
 if (NOT CTEST_BINARY_DIRECTORY)
   set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/Bender-Superbuild-${CTEST_BUILD_CONFIGURATION}-${MY_BITNESS}bits-${SCRIPT_MODE}-${MY_QT_VERSION}-${MY_CMAKE_VERSION}")
 endif()
@@ -125,7 +125,7 @@
 # Download and include dashboard driver script
 #

-set(url https://github.com/downloads/vovythevov/Bender/BenderDashboardDriverScript.cmake)
+set(url http://midas3.kitware.com/midas/download?items=28862)
 set(dest ${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}.driver)
 downloadFile(${url} ${dest})
 include(${dest})


ENH: Update "niral_utilitiesExternalProject" to display external project name

Here is an example of output:

```
[...]
-- Configuring SEM CLI module: DWI_NiftiNrrdConversion
-- Configuring SEM CLI module: polydatatransform
-- Configuring SEM CLI module: polydatamerge
-- Configuring SEM CLI module: MaurerDistanceTransform
-- Adding external project: ITKTransformTools
-- Adding external project: ReadImageHeader
-- Adding external project: ImageNoise
-- Adding external project: CombineDWIs
-- Adding external project: NormalizeDWIGradientVectors
-- Adding external project: 3D4DImageConversion
-- Adding external project: PolyDataCompression
-- Adding external project: CurveCompare
-- Configuring done
-- Generating done
[...]
```

--- CMake/niral_utilitiesExternalProject.cmake
+++ CMake/niral_utilitiesExternalProject.cmake
@@ -15,6 +15,8 @@
   if(NOT COMPILE_${proj})
      return()
   endif()
+
+  message(STATUS "Adding external project: ${projectname}")

   if(_ep_INSTALL)
     set(install_cmd INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install )


Split off 8.0.46

Split off 8.0.46

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


Investigating bug on cluster

Investigating bug on cluster

Former-commit-id: 28dc2dce959c9821606d30848d7ece295a71c881

--- cmake-modules/Fetch_OpenBLAS.cmake
+++ cmake-modules/Fetch_OpenBLAS.cmake
@@ -148,7 +148,7 @@
             BUILD_IN_SOURCE 1
             BUILD_COMMAND
                         export LD_LIBRARY_PATH=${GFORTRAN_PATH} &&
-                        export LDFLAGS=-l${GFORTRAN_LIB} &&
+                        export LDFLAGS=-L${GFORTRAN_PATH} -l${GFORTRAN_LIB} -l${QUADMATH_LIB} &&
                         $(MAKE) TARGET=SANDYBRIDGE
                         DYNAMIC_ARCH=1
                         USE_THREAD=${OpenBLAS_MULTITHREADED}
@@ -161,7 +161,7 @@
                         FFLAGS=-frecursive
                         BINARY64=64
                         GEMM_MULTITHREAD_THRESHOLD=16
-                        LDFLAGS="-l${GFORTRAN_LIB} -l${QUADMATH_LIB}"
+                        LDFLAGS=-L${GFORTRAN_PATH} -l${GFORTRAN_LIB} -l${QUADMATH_LIB}
                         FFLAGS=-O3 -Wno-maybe-uninitialized -Wno-conversion -Wno-unused-but-set-variable -Wno-unused-variable
             INSTALL_COMMAND $(MAKE) PREFIX=<INSTALL_DIR> install
             DEPENDS gfortran


added version 20151201 to ippicv project

--- cmake/projects/ippicv/hunter.cmake
+++ cmake/projects/ippicv/hunter.cmake
@@ -10,6 +10,41 @@
 include(hunter_add_version)
 include(hunter_download)
 include(hunter_pick_scheme)
+
+if(APPLE)
+  hunter_add_version(
+      PACKAGE_NAME
+      ippicv
+      VERSION
+      "20151201"
+      URL
+      "https://raw.githubusercontent.com/Itseez/opencv_3rdparty/81a676001ca8075ada498583e4166079e5744668/ippicv/ippicv_macosx_20151201.tgz"
+      SHA1
+      d3f641c05708aaa2e0e91f2a10e34c80bc217cde
+  )
+elseif(UNIX)
+  hunter_add_version(
+      PACKAGE_NAME
+      ippicv
+      VERSION
+      "20151201"
+      URL
+      "https://raw.githubusercontent.com/Itseez/opencv_3rdparty/81a676001ca8075ada498583e4166079e5744668/ippicv/ippicv_linux_20151201.tgz"
+      SHA1
+      2252c08aa3107f8e4194263e668ccff8c6e3783a
+  )
+elseif(WIN32)
+  hunter_add_version(
+      PACKAGE_NAME
+      ippicv
+      VERSION
+      "20151201"
+      URL
+      "https://raw.githubusercontent.com/Itseez/opencv_3rdparty/81a676001ca8075ada498583e4166079e5744668/ippicv/ippicv_windows_20151201.zip"
+      SHA1
+      3e596c7d798028699ae0ea870902288088a51a6d
+  )
+endif()

 if(APPLE)
   hunter_add_version(


Improved documentation of usFunctionAddResources.

--- cmake/usFunctionAddResources.cmake
+++ cmake/usFunctionAddResources.cmake
@@ -111,14 +111,14 @@
     endforeach()
   endif()

-  # This command depends on the given resource files and creates an empty
-  # cpp which must be added to the source list of the related target.
+  # This command depends on the given resource files and creates a source
+  # file which must be added to the source list of the related target.
   # This way, the following command is executed if the resources change
-  # and it just touches the empty cpp file to fore a (actually unnecessary)
+  # and it just touches the created source file to force a (actually unnecessary)
   # re-linking and hence the execution of POST_BUILD commands.
   add_custom_command(
-    OUTPUT ${US_RESOURCE_TARGET}_resources.cpp
-    COMMAND ${CMAKE_COMMAND} -E copy ${US_CMAKE_RESOURCE_DEPENDENCIES_CPP} ${US_RESOURCE_TARGET}_resources.cpp
+    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${US_RESOURCE_TARGET}_resources.cpp
+    COMMAND ${CMAKE_COMMAND} -E copy ${US_CMAKE_RESOURCE_DEPENDENCIES_CPP} ${CMAKE_CURRENT_BINARY_DIR}/${US_RESOURCE_TARGET}_resources.cpp
     DEPENDS ${_cmd_deps} ${resource_compiler}
     COMMENT "Checking resource dependencies for ${US_RESOURCE_TARGET}"
     VERBATIM


TDB-41 : PerconaFT does not pass cmake flags on to snappy cmake - Took MariaDB patch to pass CMAKE_AR, CMAKE_NM and CMAKE_RANLIB through to   from PerconaFT to snappy.

--- cmake_modules/TokuThirdParty.cmake
+++ cmake_modules/TokuThirdParty.cmake
@@ -123,6 +123,9 @@
         -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
         -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
         -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
+        -DCMAKE_AR=${CMAKE_AR}
+        -DCMAKE_NM=${CMAKE_NM}
+        -DCMAKE_RANLIB=${CMAKE_RANLIB}
         -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
         -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
         ${USE_PROJECT_CMAKE_MODULE_PATH}


ENH: Update to Swig 3.0.2

ENH: Update to Swig 3.0.2

Change-Id: Id6e29339c60650c083de32846bb277bd38ebfce7

--- SuperBuild/External_Swig.cmake
+++ SuperBuild/External_Swig.cmake
@@ -12,9 +12,9 @@

 if(NOT SWIG_DIR)

-  set(SWIG_TARGET_VERSION 2.0.12-1)
-  set(SWIG_DOWNLOAD_SOURCE_HASH "44af22bffb53d1795b0f5cb3bff5eb1a")
-  set(SWIG_DOWNLOAD_WIN_HASH "439bc49355dc76490b3fe0dffac2774d")
+  set(SWIG_TARGET_VERSION 3.0.2)
+  set(SWIG_DOWNLOAD_SOURCE_HASH "62f9b0d010cef36a13a010dc530d0d41")
+  set(SWIG_DOWNLOAD_WIN_HASH "3f18de4fc09ab9abb0d3be37c11fbc8f")

   if(WIN32)


[CMake] Unconditionally add .h and .td files to target sources

Previously adding header and table gen files was conditional on using an IDE. Since these files have the `HEADER_FILE_ONLY` attribute applied they are ignored as sources by all non-IDE generators, so there is really no reason not to include them.

Additionally having the CMake always include these files allows the CMake-server to include them in the sources list for targets, which is valuable to anyone using CMake-server integrated tools.

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

--- cmake/modules/LLVMProcessSources.cmake
+++ cmake/modules/LLVMProcessSources.cmake
@@ -52,16 +52,15 @@
   cmake_parse_arguments(ARG "" "" "ADDITIONAL_HEADERS;ADDITIONAL_HEADER_DIRS" ${ARGN})
   set(sources ${ARG_UNPARSED_ARGUMENTS})
   llvm_check_source_file_list( ${sources} )
-  if( LLVM_ENABLE_IDE )
-    # This adds .td and .h files to the Visual Studio solution:
-    add_td_sources(sources)
-    find_all_header_files(hdrs "${ARG_ADDITIONAL_HEADER_DIRS}")
-    if (hdrs)
-      set_source_files_properties(${hdrs} PROPERTIES HEADER_FILE_ONLY ON)
-    endif()
-    set_source_files_properties(${ARG_ADDITIONAL_HEADERS} PROPERTIES HEADER_FILE_ONLY ON)
-    list(APPEND sources ${ARG_ADDITIONAL_HEADERS} ${hdrs})
+
+  # This adds .td and .h files to the Visual Studio solution:
+  add_td_sources(sources)
+  find_all_header_files(hdrs "${ARG_ADDITIONAL_HEADER_DIRS}")
+  if (hdrs)
+    set_source_files_properties(${hdrs} PROPERTIES HEADER_FILE_ONLY ON)
   endif()
+  set_source_files_properties(${ARG_ADDITIONAL_HEADERS} PROPERTIES HEADER_FILE_ONLY ON)
+  list(APPEND sources ${ARG_ADDITIONAL_HEADERS} ${hdrs})

   set( ${OUT_VAR} ${sources} PARENT_SCOPE )
 endfunction(llvm_process_sources)


Fixed the problem with FindBotan.cmake on Beaglebone

--- client/client-multi/client-cpp/Modules/FindBotan.cmake
+++ client/client-multi/client-cpp/Modules/FindBotan.cmake
@@ -38,7 +38,7 @@
 find_path(BOTAN_INCLUDE_DIR
     botan/version.h
     HINTS
-    ${CMAKE_FIND_ROOT_PATH}/include
+    ${CMAKE_FIND_ROOT_PATH}/include/${BOTAN_VERSION_CODE}
     ${BOTAN_INCLUDE_DIRS})

 # locate the library


ditto.

ditto.

--- mod_cmake/ModularDeps.cmake
+++ mod_cmake/ModularDeps.cmake
@@ -40,7 +40,7 @@
   add_subdirectory("${PROJECT_SOURCE_DIR}/deps/${DEP_NAME}")

   # Mark the dependency as satisfied.
-  set(${DEP_NAME}_DEP_SATISFIED YES CACHE INTERNAL "${DEP_NAME} dependency.")
+  set(${DEP_NAME}_DEP_SATISFIED YES CACHE BOOL "${DEP_NAME} dependency.")
   mark_as_advanced(${DEP_NAME}_DEP_SATISFIED)
 endfunction()


Add option to ignore compiler warnings

Add option to ignore compiler warnings

Some YottaDB plugins may support multiple platforms and thus may need
to ignore warnings generated by the compiler to install correctly.

--- ydbcmake/CMakeMUMPSInformation.cmake
+++ ydbcmake/CMakeMUMPSInformation.cmake
@@ -26,7 +26,17 @@
 set(CMAKE_MUMPS_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> -shared -o <TARGET> <OBJECTS>")
 set(CMAKE_MUMPS_CREATE_SHARED_MODULE "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> -o <TARGET> <OBJECTS>")
 set(CMAKE_MUMPS_CREATE_STATIC_LIBRARY "")
-set(CMAKE_MUMPS_COMPILE_OBJECT "LC_ALL=\"${LC_ALL}\" ydb_chset=\"${ydb_chset}\" ydb_icu_version=\"${icu_version}\" <CMAKE_MUMPS_COMPILER> -object=<OBJECT> <SOURCE>")
+
+# Option to suppress mumps compiler warnings
+option(MUMPS_NOWARNING "Disable warnings and ignore status code from MUMPS compiler")
+set(CMAKE_MUMPS_COMPILE_OBJECT "LC_ALL=\"${LC_ALL}\" ydb_chset=\"${ydb_chset}\" ydb_icu_version=\"${icu_version}\" <CMAKE_MUMPS_COMPILER> -object=<OBJECT>")
+
+if(MUMPS_NOWARNING)
+  set(CMAKE_MUMPS_COMPILE_OBJECT "${CMAKE_MUMPS_COMPILE_OBJECT}  -nowarning <SOURCE> || true")
+else()
+  set(CMAKE_MUMPS_COMPILE_OBJECT "${CMAKE_MUMPS_COMPILE_OBJECT}  <SOURCE>")
+endif()
+
 set(CMAKE_MUMPS_LINK_EXECUTABLE "")

 set(CMAKE_MUMPS_OUTPUT_EXTENSION .o)


update FindMKL to match the default installation behavior of MKL 11

--- bench/btl/cmake/FindMKL.cmake
+++ bench/btl/cmake/FindMKL.cmake
@@ -20,12 +20,23 @@
   PATHS
   $ENV{MKLLIB}
   /opt/intel/mkl/*/lib/em64t
+  /opt/intel/Compiler/*/*/mkl/lib/em64t
   ${LIB_INSTALL_DIR}
 )

-if(MKL_LIBRARIES)
-set(MKL_LIBRARIES ${MKL_LIBRARIES} mkl_intel_lp64 mkl_sequential guide pthread)
-endif(MKL_LIBRARIES)
+find_library(MKL_GUIDE
+  guide
+  PATHS
+  $ENV{MKLLIB}
+  /opt/intel/mkl/*/lib/em64t
+  /opt/intel/Compiler/*/*/mkl/lib/em64t
+  /opt/intel/Compiler/*/*/lib/intel64
+  ${LIB_INSTALL_DIR}
+)
+
+if(MKL_LIBRARIES AND MKL_GUIDE)
+  set(MKL_LIBRARIES ${MKL_LIBRARIES} mkl_intel_lp64 mkl_sequential ${MKL_GUIDE} pthread)
+endif()

 else(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64")

@@ -34,12 +45,23 @@
   PATHS
   $ENV{MKLLIB}
   /opt/intel/mkl/*/lib/32
+  /opt/intel/Compiler/*/*/mkl/lib/32
   ${LIB_INSTALL_DIR}
 )

-if(MKL_LIBRARIES)
-set(MKL_LIBRARIES ${MKL_LIBRARIES} mkl_intel mkl_sequential guide pthread)
-endif(MKL_LIBRARIES)
+find_library(MKL_GUIDE
+  guide
+  PATHS
+  $ENV{MKLLIB}
+  /opt/intel/mkl/*/lib/32
+  /opt/intel/Compiler/*/*/mkl/lib/32
+  /opt/intel/Compiler/*/*/lib/intel32
+  ${LIB_INSTALL_DIR}
+)
+
+if(MKL_LIBRARIES AND MKL_GUIDE)
+  set(MKL_LIBRARIES ${MKL_LIBRARIES} mkl_intel mkl_sequential ${MKL_GUIDE} pthread)
+endif()

 endif(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64")


Fix extra semicolon in compile/link flags

--- cmake/Modules/SampPlugin.cmake
+++ cmake/Modules/SampPlugin.cmake
@@ -18,8 +18,8 @@
 	set_target_properties(${name} PROPERTIES PREFIX "")

 	if(CMAKE_COMPILER_IS_GNUCC)
-		set_property(TARGET ${name} APPEND PROPERTY COMPILE_FLAGS "-m32")
-		set_property(TARGET ${name} APPEND PROPERTY LINK_FLAGS    "-m32")
+		set_property(TARGET ${name} APPEND_STRING PROPERTY COMPILE_FLAGS " -m32")
+		set_property(TARGET ${name} APPEND_STRING PROPERTY LINK_FLAGS    " -m32")
 	endif()

 	if(UNIX AND NOT WIN32)


Disable -Wshadow for MinGW

Disable -Wshadow for MinGW

I forgot it in my previous issue, but MinGW also chokes on -Wshadow which finds shadowed names in logging.cpp. Since the shadowing is pretty harmless, I thought that the best solution would be to disable -Wshadow for MinGW (which is what the comments already imply anyway).

--- cmake/PlatformWindowsGCC.cmake
+++ cmake/PlatformWindowsGCC.cmake
@@ -53,7 +53,7 @@
       -Wconversion
     # -Werror=return-type -> missing returns in functions and methods are handled as errors which stops the compilation
       -Wcast-align  # ->
-      -Wshadow      # -> e.g. when a parameter is named like a member, too many warnings, disabled for now
+    # -Wshadow      # -> e.g. when a parameter is named like a member, too many warnings, disabled for now
 )

 set(DEFAULT_COMPILE_FLAGS


PythonApplyPatches: Ensure git found is unused to inialize repo

This commit ensures that git executable found using "find_package(Git ...)"
is used. This was an issue when git was not in the PATH.

--- cmake/PythonApplyPatches.cmake
+++ cmake/PythonApplyPatches.cmake
@@ -12,7 +12,7 @@
     # is located within an already versioned tree.
     if(NOT EXISTS "${SRC_DIR}/.git")
       execute_process(
-        COMMAND git init
+        COMMAND ${GIT_EXECUTABLE} init
         WORKING_DIRECTORY ${SRC_DIR}
         RESULT_VARIABLE result
         ERROR_VARIABLE error


[cmake] ensure previous fix only affects Debian by specifying dist-packages

--- cmake/PythonInstallSetup.cmake
+++ cmake/PythonInstallSetup.cmake
@@ -69,7 +69,7 @@
       # note: the '.replace()' is to work around the following Debian/Ubuntu bug:
       #   https://bugs.launchpad.net/ubuntu/+source/python3-defaults/+bug/1408092
       set(GET_SITE_PACKAGE
-       "from distutils.sysconfig import get_python_lib; print(get_python_lib().replace('/python3/','/python${PY_VERSION}/'))")
+       "from distutils.sysconfig import get_python_lib; print(get_python_lib().replace('/python3/dist-packages','/python${PY_VERSION}/dist-packages'))")
       execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
        "${GET_SITE_PACKAGE}" OUTPUT_VARIABLE PY_INSTALL_DIR)
     endif()
@@ -82,7 +82,7 @@
       #   https://bugs.launchpad.net/ubuntu/+source/python3-defaults/+bug/1408092
     list(APPEND python_install_options --prefix=${CMAKE_INSTALL_PREFIX})
       set(GET_SITE_PACKAGE
-       "from distutils.sysconfig import get_python_lib; print(get_python_lib(prefix='${CMAKE_INSTALL_PREFIX}').replace('/python3/','/python${PY_VERSION}/'))")
+       "from distutils.sysconfig import get_python_lib; print(get_python_lib(prefix='${CMAKE_INSTALL_PREFIX}').replace('/python3/dist-packages','/python${PY_VERSION}/dist-packages'))")
       execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
        "${GET_SITE_PACKAGE}" OUTPUT_VARIABLE PY_INSTALL_DIR)
   else()


Added support for VS 2017

Added support for VS 2017

--- cmake/configure/compiler.cmake
+++ cmake/configure/compiler.cmake
@@ -48,6 +48,18 @@
 			ELSE()
 				SET(msvc_LIB "lib32-msvc-14.0")
 			ENDIF()
+    ELSEIF(
+        ("${CMAKE_GENERATOR}" STREQUAL "Visual Studio 15")              OR
+        ("${CMAKE_GENERATOR}" STREQUAL "Visual Studio 15 Win64")        OR
+        ("${CMAKE_GENERATOR}" STREQUAL "Visual Studio 15 2017")         OR
+        ("${CMAKE_GENERATOR}" STREQUAL "Visual Studio 15 Win64 2015")   OR
+        ("${CMAKE_GENERATOR}" STREQUAL "Visual Studio 15 2017 Win64") )
+            SET(msvc_ABBREVIATION "msvc2017")
+			IF ( IS_64_BIT )
+				SET(msvc_LIB "lib64-msvc-15.0")
+			ELSE()
+				SET(msvc_LIB "lib32-msvc-15.0")
+			ENDIF()
     ENDIF()
     string(TOUPPER ${msvc_ABBREVIATION} MSVC_ABBREVIATION_CAPS)
 endif()


true fix for gtest error

true fix for gtest error

--- cmake/modules/BuildGTest.cmake
+++ cmake/modules/BuildGTest.cmake
@@ -22,11 +22,20 @@
         ${GTEST_INSTALL_DIR}/lib/gtestd.lib
         ${GTEST_INSTALL_DIR}/lib/gmockd.lib

+        ${GTEST_INSTALL_DIR}/lib/gtest.lib
+        ${GTEST_INSTALL_DIR}/lib/gmock.lib
+
         ${GTEST_INSTALL_DIR}/bin/gtestd.dll
         ${GTEST_INSTALL_DIR}/bin/gmockd.dll
+
+        ${GTEST_INSTALL_DIR}/bin/gtest.dll
+        ${GTEST_INSTALL_DIR}/bin/gmock.dll
       )
     else()
       set(_byproducts
+        ${GTEST_INSTALL_DIR}/lib/gtestd.lib
+        ${GTEST_INSTALL_DIR}/lib/gmockd.lib
+
         ${GTEST_INSTALL_DIR}/lib/gtest.lib
         ${GTEST_INSTALL_DIR}/lib/gmock.lib
       )


cmake: Make LIBVLC_*_PATH environment variables take priority over system directories.

By making these HINTS, cmake will search in these paths (which is likely
what a user wants) at the beginning of the search.

--- cmake/modules/FindLIBVLC.cmake
+++ cmake/modules/FindLIBVLC.cmake
@@ -18,32 +18,35 @@
 #Put here path to custom location
 #example: /home/user/vlc/include etc..
 FIND_PATH(LIBVLC_INCLUDE_DIR vlc/vlc.h
-  "$ENV{LIBVLC_INCLUDE_PATH}"
-  "$ENV{LIB_DIR}/include"
-  "$ENV{LIB_DIR}/include/vlc"
-  "/usr/include"
-  "/usr/include/vlc"
-  "/usr/local/include"
-  "/usr/local/include/vlc"
-  #mingw
-  c:/msys/local/include
+  HINTS "$ENV{LIBVLC_INCLUDE_PATH}"
+  PATHS
+    "$ENV{LIB_DIR}/include"
+    "$ENV{LIB_DIR}/include/vlc"
+    "/usr/include"
+    "/usr/include/vlc"
+    "/usr/local/include"
+    "/usr/local/include/vlc"
+    #mingw
+    c:/msys/local/include
   )
 FIND_PATH(LIBVLC_INCLUDE_DIR PATHS "${CMAKE_INCLUDE_PATH}/vlc" NAMES vlc.h)

 #Put here path to custom location
 #example: /home/user/vlc/lib etc..
-FIND_LIBRARY(LIBVLC_LIBRARY NAMES vlc libvlc PATHS
-  "$ENV{LIBVLC_LIBRARY_PATH}"
-  "$ENV{LIB_DIR}/lib"
-  #mingw
-  c:/msys/local/lib
+FIND_LIBRARY(LIBVLC_LIBRARY NAMES vlc libvlc
+  HINTS "$ENV{LIBVLC_LIBRARY_PATH}"
+  PATHS
+    "$ENV{LIB_DIR}/lib"
+    #mingw
+    c:/msys/local/lib
   )
 FIND_LIBRARY(LIBVLC_LIBRARY NAMES vlc libvlc)
-FIND_LIBRARY(LIBVLCCORE_LIBRARY NAMES vlccore libvlccore PATHS
-  "$ENV{LIBVLC_LIBRARY_PATH}"
-  "$ENV{LIB_DIR}/lib"
-  #mingw
-  c:/msys/local/lib
+FIND_LIBRARY(LIBVLCCORE_LIBRARY NAMES vlccore libvlccore
+  HINTS "$ENV{LIBVLC_LIBRARY_PATH}"
+  PATHS
+    "$ENV{LIB_DIR}/lib"
+    #mingw
+    c:/msys/local/lib
   )
 FIND_LIBRARY(LIBVLCCORE_LIBRARY NAMES vlccore libvlccore)


[CMake]: REFLEX_GENERATE_DICTIONARY: if dictionary is a target use its properties

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -118,15 +118,13 @@
 #---------------------------------------------------------------------------------------------------
 #---REFLEX_GENERATE_DICTIONARY( dictionary headerfiles SELECTION selectionfile OPTIONS opt1 opt2 ...
 #                               DEPENDS dependency1 dependency2 ...
-#                               USES target1 target2 ...
 #                             )
+# if dictionary is a TARGET (e.g., created with add_library), we inherit the INCLUDE_DIRECTORES and
+# COMPILE_DEFINITIONS properties
 #
-#  USES takes a list of targets. From the targets the properties INCLUDE_DIRECTORIES and
-#  COMPILE_DEFINITIONS are used to create the appropriate -I and -D flags
-#
 #---------------------------------------------------------------------------------------------------
 function(REFLEX_GENERATE_DICTIONARY dictionary)
-  CMAKE_PARSE_ARGUMENTS(ARG "" "SELECTION" "OPTIONS;DEPENDS;USES" ${ARGN})
+  CMAKE_PARSE_ARGUMENTS(ARG "" "SELECTION" "OPTIONS;DEPENDS" ${ARGN})
   #---Get List of header files---------------
   set(headerfiles)
   foreach(fp ${ARG_UNPARSED_ARGUMENTS})
@@ -177,10 +175,10 @@
    list(APPEND definitions ${d})
   endforeach()

-  foreach(DEP ${ARG_USES})
-    LIST(APPEND include_dirs $<TARGET_PROPERTY:${DEP},INCLUDE_DIRECTORIES>)
-    LIST(APPEND definitions $<TARGET_PROPERTY:${DEP},COMPILE_DEFINITIONS>)
-  endforeach()
+  IF(TARGET ${dictionary})
+    LIST(APPEND include_dirs $<TARGET_PROPERTY:${dictionary},INCLUDE_DIRECTORIES>)
+    LIST(APPEND definitions $<TARGET_PROPERTY:${dictionary},COMPILE_DEFINITIONS>)
+  ENDIF()

   add_custom_command(
     OUTPUT ${gensrcdict} ${rootmapname}
@@ -193,7 +191,9 @@

     COMMAND_EXPAND_LISTS
     )
-
+  IF(TARGET ${dictionary})
+    target_sources(${dictionary} PRIVATE ${gensrcdict})
+  ENDIF()
   set(gensrcdict ${dictionary}.cxx PARENT_SCOPE)

   #---roottest compability---------------------------------


As for MacOS, hide inlines.

As for MacOS, hide inlines.

--- cmake/modules/SetUpLinux.cmake
+++ cmake/modules/SetUpLinux.cmake
@@ -108,7 +108,7 @@

 if(CMAKE_COMPILER_IS_GNUCXX)

-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe ${BIT_ENVIRONMENT} ${FP_MATH_FLAGS} -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -fPIC")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe ${BIT_ENVIRONMENT} ${FP_MATH_FLAGS} -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -fvisibility-inlines-hidden")
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe ${BIT_ENVIRONMENT} -Wall -W -fPIC")

   set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${BIT_ENVIRONMENT} -std=legacy")
@@ -145,7 +145,7 @@

 elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang)

-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe ${BIT_ENVIRONMENT} ${FP_MATH_FLAGS} -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -fPIC")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe ${BIT_ENVIRONMENT} ${FP_MATH_FLAGS} -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -fvisibility-inlines-hidden")
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe ${BIT_ENVIRONMENT} -Wall -W -fPIC")

   set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${BIT_ENVIRONMENT} -std=legacy")


Improve OpenCppCoverage path detection.

Improve OpenCppCoverage path detection.

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -271,7 +271,7 @@
     set(CTEST_COVERAGE_COMMAND codecov)
     set(CTEST_COVERAGE_EXTRA_FLAGS "${CTEST_COVERAGE_EXTRA_FLAGS} -txtlcov")
 elseif(CC_NAME STREQUAL "msvc")
-    find_program(CTEST_COVERAGE_COMMAND NAMES OpenCppCoverage)
+    find_program(CTEST_COVERAGE_COMMAND NAMES OpenCppCoverage PATHS "C:/Program Files/OpenCppCoverage")
     if(NOT CTEST_COVERAGE_COMMAND)
         message(FATAL_ERROR "OpenCppCoverage not found!")
     endif()


Various fixes. (2)

Various fixes. (2)

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -288,8 +288,11 @@
     if(CC_VERSION VERSION_GREATER 3.1 OR CC_VERSION VERSION_EQUAL 3.1)
         if(CC_ASAN GREATER 0)
             set(CTEST_MEMORYCHECK_TYPE "AddressSanitizer")
-            if(CC_VERSION VERSION_LESS 3.7)
+            if(CC_VERSION VERSION_LESS 3.8)
                 set(CC_ASAN_FLAGS "-fuse-ld=gold")
+            endif()
+            if(CC_VERSION VERSION_EQUAL 3.7)
+                set(CTEST_MEMORYCHECK_TYPE "")
             endif()
         endif()
     endif()


ARROW-5364: [C++] Use ASCII rather than UTF-8 in BuildUtils.cmake comment

Author: Yosuke Shiro <yosuke.shiro615@gmail.com>

Closes #4340 from shiro615/cpp-fix-comments-to-ascii and squashes the following commits:

d9b1420b <Yosuke Shiro>  Fix UTF-8 comments to ASCII in BuildUtils.cmake

--- cpp/cmake_modules/BuildUtils.cmake
+++ cpp/cmake_modules/BuildUtils.cmake
@@ -66,7 +66,7 @@
     add_library(${AUG_LIB_NAME} SHARED IMPORTED)

     if(WIN32)
-      # Mark the ”.lib” location as part of a Windows DLL
+      # Mark the ".lib" location as part of a Windows DLL
       set_target_properties(${AUG_LIB_NAME}
                             PROPERTIES IMPORTED_IMPLIB "${ARG_SHARED_LIB}")
     else()
@@ -103,7 +103,7 @@
     add_library(${AUG_LIB_NAME} SHARED IMPORTED)

     if(WIN32)
-      # Mark the ”.lib” location as part of a Windows DLL
+      # Mark the ".lib" location as part of a Windows DLL
       set_target_properties(${AUG_LIB_NAME}
                             PROPERTIES IMPORTED_IMPLIB "${ARG_SHARED_LIB}")
     else()


ARROW-15782: [C++] Fix Findre2Alt.cmake to check RE2_ROOT variable first

Closes #12513 from sfc-gh-hyu/hyu-fix-findre2

Authored-by: Haowei Yu <4da3dc98030481277d9ba96aab54bbded8826792@snowflake.com>
Signed-off-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>

--- cpp/cmake_modules/Findre2Alt.cmake
+++ cpp/cmake_modules/Findre2Alt.cmake
@@ -28,28 +28,7 @@
   return()
 endif()

-find_package(PkgConfig QUIET)
-pkg_check_modules(RE2_PC re2)
-if(RE2_PC_FOUND)
-  set(RE2_INCLUDE_DIR "${RE2_PC_INCLUDEDIR}")
-
-  list(APPEND RE2_PC_LIBRARY_DIRS "${RE2_PC_LIBDIR}")
-  find_library(RE2_LIB re2
-               PATHS ${RE2_PC_LIBRARY_DIRS}
-               PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES}
-               NO_DEFAULT_PATH)
-
-  # On Fedora, the reported prefix is wrong. As users likely run into this,
-  # workaround.
-  # https://bugzilla.redhat.com/show_bug.cgi?id=1652589
-  if(UNIX
-     AND NOT APPLE
-     AND NOT RE2_LIB)
-    if(RE2_PC_PREFIX STREQUAL "/usr/local")
-      find_library(RE2_LIB re2)
-    endif()
-  endif()
-elseif(RE2_ROOT)
+if(RE2_ROOT)
   find_library(RE2_LIB
                NAMES re2_static
                      re2
@@ -64,15 +43,38 @@
             NO_DEFAULT_PATH
             PATH_SUFFIXES ${ARROW_INCLUDE_PATH_SUFFIXES})
 else()
-  find_library(RE2_LIB
-               NAMES re2_static
-                     re2
-                     "${CMAKE_STATIC_LIBRARY_PREFIX}re2${RE2_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
-                     "${CMAKE_SHARED_LIBRARY_PREFIX}re2${CMAKE_SHARED_LIBRARY_SUFFIX}"
-               PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES})
-  find_path(RE2_INCLUDE_DIR
-            NAMES re2/re2.h
-            PATH_SUFFIXES ${ARROW_INCLUDE_PATH_SUFFIXES})
+  find_package(PkgConfig QUIET)
+  pkg_check_modules(RE2_PC re2)
+  if(RE2_PC_FOUND)
+    set(RE2_INCLUDE_DIR "${RE2_PC_INCLUDEDIR}")
+
+    list(APPEND RE2_PC_LIBRARY_DIRS "${RE2_PC_LIBDIR}")
+    find_library(RE2_LIB re2
+                 PATHS ${RE2_PC_LIBRARY_DIRS}
+                 PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES}
+                 NO_DEFAULT_PATH)
+
+    # On Fedora, the reported prefix is wrong. As users likely run into this,
+    # workaround.
+    # https://bugzilla.redhat.com/show_bug.cgi?id=1652589
+    if(UNIX
+       AND NOT APPLE
+       AND NOT RE2_LIB)
+      if(RE2_PC_PREFIX STREQUAL "/usr/local")
+        find_library(RE2_LIB re2)
+      endif()
+    endif()
+  else()
+    find_library(RE2_LIB
+                 NAMES re2_static
+                       re2
+                       "${CMAKE_STATIC_LIBRARY_PREFIX}re2${RE2_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
+                       "${CMAKE_SHARED_LIBRARY_PREFIX}re2${CMAKE_SHARED_LIBRARY_SUFFIX}"
+                 PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES})
+    find_path(RE2_INCLUDE_DIR
+              NAMES re2/re2.h
+              PATH_SUFFIXES ${ARROW_INCLUDE_PATH_SUFFIXES})
+  endif()
 endif()

 find_package_handle_standard_args(re2Alt REQUIRED_VARS RE2_LIB RE2_INCLUDE_DIR)


Fix LIBCPP cmake check

Fix LIBCPP cmake check

Summary:
The test was missing a `main` meaning that it would fail even if libc++ was in use, making all the rest fail on macos for example.
Closes https://github.com/facebook/folly/pull/831

Reviewed By: Orvid

Differential Revision: D7787115

Pulled By: yfeldblum

fbshipit-source-id: 4a10323298be3f26f783fa1257cbde2483fb75b9

--- CMake/FollyConfigChecks.cmake
+++ CMake/FollyConfigChecks.cmake
@@ -166,7 +166,7 @@
   #if !_LIBCPP_VERSION
   #error No libc++
   #endif
-  void func() {}"
+  int main() { return 0; }"
   FOLLY_USE_LIBCPP
 )


Automatically turning off PCH when using Clang on bad ccache version.

--- CMake/Modules/CheckHost.cmake
+++ CMake/Modules/CheckHost.cmake
@@ -29,6 +29,10 @@
 #
 # non-WIN32:
 #  HAS_LIB64 (multilib capable)
+#  CCACHE_VERSION (when using Clang with ccache enabled)
+#
+# Neither here or there:
+#  BASH_ON_WINDOWS
 #

 if (CMAKE_HOST_WIN32)
@@ -68,4 +72,16 @@
         endif ()
         set (BASH_ON_WINDOWS ${BASH_ON_WINDOWS} CACHE INTERNAL "Bash on Ubuntu on Windows")
     endif ()
+    # Test if PCH could be enabled in tandem with ccache when using Clang compiler toolchain
+    if ("$ENV{USE_CCACHE}" AND CMAKE_CXX_COMPILER_ID MATCHES Clang)
+        if (NOT DEFINED CCACHE_VERSION)
+            execute_process (COMMAND ccache --version COMMAND head -1 COMMAND grep -oP "(?:\\d+\\.)?(?:\\d+\\.)?\\d+" RESULT_VARIABLE CCACHE_EXIT_CODE OUTPUT_VARIABLE CCACHE_VERSION ERROR_QUIET)
+            if (CCACHE_EXIT_CODE EQUAL 0)
+               set (CCACHE_VERSION ${CCACHE_VERSION} CACHE INTERNAL "ccache version")
+           endif ()
+        endif ()
+        if (NOT CCACHE_VERSION VERSION_LESS 3.3.1)  # This is the last known bad version
+            set (URHO3D_PCH FALSE CACHE INTERNAL "" FORCE)
+        endif ()
+    endif ()
 endif ()


From Sukender, "Here is an minor update for Jasper finder. It adds debug cache value for Windows/MSVC builds, and adds search paths."

--- CMakeModules/FindJasper.cmake
+++ CMakeModules/FindJasper.cmake
@@ -11,6 +11,7 @@

 FIND_PATH(JASPER_INCLUDE_DIR jasper/jasper.h
     $ENV{JASPER_DIR}/include
+    $ENV{JASPER_DIR}/src/libjasper/include
     $ENV{JASPER_DIR}
     ~/Library/Frameworks
     /Library/Frameworks
@@ -24,9 +25,29 @@
 )

 FIND_LIBRARY(JASPER_LIBRARY
-    NAMES jasper
+    NAMES jasper libjasper
     PATHS
     $ENV{JASPER_DIR}/lib
+    $ENV{JASPER_DIR}/src/libjasper/lib
+    $ENV{JASPER_DIR}/src/msvc/Win32_Release
+    $ENV{JASPER_DIR}
+    ~/Library/Frameworks
+    /Library/Frameworks
+    /usr/local/lib
+    /usr/lib
+    /sw/lib
+    /opt/local/lib
+    /opt/csw/lib
+    /opt/lib
+    /usr/freeware/lib64
+)
+
+FIND_LIBRARY(JASPER_LIBRARY_DEBUG
+    NAMES jasper libjasper jasperd libjasperd
+    PATHS
+    $ENV{JASPER_DIR}/lib
+    $ENV{JASPER_DIR}/src/libjasper/lib
+    $ENV{JASPER_DIR}/src/msvc/Win32_Debug
     $ENV{JASPER_DIR}
     ~/Library/Frameworks
     /Library/Frameworks
@@ -44,4 +65,3 @@
     SET(JASPER_FOUND "YES")
 ENDIF(JASPER_LIBRARY AND JASPER_INCLUDE_DIR)

-


[cmake] Get the default value for LLVM_ENABLE_ASSERTIONS from LLVMConfig.cmake.

rdar://26154980

--- cmake/modules/SwiftSharedCMakeConfig.cmake
+++ cmake/modules/SwiftSharedCMakeConfig.cmake
@@ -128,11 +128,6 @@
         SOURCE_DIR llvm_config_src_dir
     )

-    # Assertions should follow llvm-config's setting by default.
-    set(LLVM_ENABLE_ASSERTIONS ${llvm_config_enable_assertions}
-        CACHE BOOL "Enable assertions")
-    mark_as_advanced(LLVM_ENABLE_ASSERTIONS)
-
     set(LLVM_TOOLS_BINARY_DIR "${llvm_config_tools_binary_dir}" CACHE PATH "Path to llvm/bin")

     set(${product}_NATIVE_LLVM_TOOLS_PATH "${LLVM_TOOLS_BINARY_DIR}")
@@ -162,10 +157,32 @@

   # Save and restore variables that LLVM configuration overrides.
   set(LLVM_TOOLS_BINARY_DIR_saved "${LLVM_TOOLS_BINARY_DIR}")
-  set(LLVM_ENABLE_ASSERTIONS_saved "${LLVM_ENABLE_ASSERTIONS}")
+
+  # If we already have a cached value for LLVM_ENABLE_ASSERTIONS, save the value.
+  if (DEFINED LLVM_ENABLE_ASSERTIONS)
+    set(LLVM_ENABLE_ASSERTIONS_saved "${LLVM_ENABLE_ASSERTIONS}")
+  endif()
+  # Then we import LLVMCONFIG_FILE. This is going to override whatever cached
+  # value we have for LLVM_ENABLE_ASSERTIONS.
   include(${LLVMCONFIG_FILE})
   set(LLVM_TOOLS_BINARY_DIR "${LLVM_TOOLS_BINARY_DIR_saved}")
-  set(LLVM_ENABLE_ASSERTIONS "${LLVM_ENABLE_ASSERTIONS_saved}")
+
+  # If we did not have a cached value for LLVM_ENABLE_ASSERTIONS, set
+  # LLVM_ENABLE_ASSERTIONS_saved to be the ENABLE_ASSERTIONS value from LLVM so
+  # we follow LLVMConfig.cmake's value by default if nothing is provided.
+  if (NOT DEFINED LLVM_ENABLE_ASSERTIONS_saved)
+    set(LLVM_ENABLE_ASSERTIONS_saved "${LLVM_ENABLE_ASSERTIONS}")
+  endif()
+
+  # Then set LLVM_ENABLE_ASSERTIONS with a default value of
+  # LLVM_ENABLE_ASSERTIONS_saved.
+  #
+  # The effect of this is that if LLVM_ENABLE_ASSERTION did not have a cached
+  # value, then LLVM_ENABLE_ASSERTIONS_saved is set to LLVM's value, so we get a
+  # default value from LLVM.
+  set(LLVM_ENABLE_ASSERTIONS "${LLVM_ENABLE_ASSERTIONS_saved}"
+    CACHE BOOL "Enable assertions")
+  mark_as_advanced(LLVM_ENABLE_ASSERTIONS)

   precondition_translate_flag(LLVM_BUILD_LIBRARY_DIR LLVM_LIBRARY_DIR)
   precondition_translate_flag(LLVM_BUILD_MAIN_INCLUDE_DIR LLVM_MAIN_INCLUDE_DIR)


Add warning about hard-coding X11 dependency for GLFW

Signed-off-by: Dan Bailey <39b6ae1dd30d9ab3cd77a2d084b277520f14c203@ilm.com>

--- cmake/OpenVDBGLFW3Setup.cmake
+++ cmake/OpenVDBGLFW3Setup.cmake
@@ -135,6 +135,10 @@
     SET
   )
   if (NOT glfw3_HAS_INTERFACE_LINK_LIBRARIES)
+    message(WARNING "GLFW does not have the INTERFACE_LINK_LIBRARIES property "
+      "set, so hard-coding to expect a dependency on X11. To use a different "
+      "library dependency, consider upgrading to GLFW 3.2+ where this "
+      "property is set by the CMake find package module for GLFW.")
     find_package(X11 REQUIRED)
     set_property(TARGET glfw
       PROPERTY INTERFACE_LINK_LIBRARIES


update include dir hint in FindDrake.cmake

--- cmake/modules/FindDrake.cmake
+++ cmake/modules/FindDrake.cmake
@@ -1,5 +1,5 @@
 if(DRAKE_DIR)
-  set(_include_dir_hint ${DRAKE_DIR})
+  set(_include_dir_hint ${DRAKE_DIR}/include)
   set(_lib_dir_hint ${DRAKE_DIR}/lib)
 endif()


Use sprokit_install for pkgconfig variables

--- cmake/support/pkgconfig.cmake
+++ cmake/support/pkgconfig.cmake
@@ -10,7 +10,7 @@
       LIB_SUFFIX
       ${ARGN})

-    install(
+    sprokit_install(
       FILES       "${pkgconfig_file}"
       DESTINATION "lib${LIB_SUFFIX}/pkgconfig"
       COMPONENT   development)


Backup.

Backup.

--- cmake_modules/LPSCommon.cmake
+++ cmake_modules/LPSCommon.cmake
@@ -803,48 +803,48 @@
 endmacro(get_date)

 function(install_prereqs)
-# Prerequisite components install
-if(LINUX64INTEL OR LINUX64GNU)
-
-    foreach(name ${VTK_LIBS})
-        file(GLOB files "${VTK_LIB_DIR}/lib${name}.*")
-        set(VTK_INSTALL_LIBS ${VTK_INSTALL_LIBS} ${files})
-    endforeach()
-
-    install(FILES ${VTK_INSTALL_LIBS} DESTINATION lib/vtk/
-    PERMISSIONS
-    OWNER_WRITE OWNER_READ OWNER_EXECUTE
-    GROUP_READ GROUP_EXECUTE
-    WORLD_READ WORLD_EXECUTE
-    )
-
-else()
-
-    foreach(name ${VTK_LIBS})
-        file(GLOB files "${VTK_LIB_DIR}/${name}.lib")
-        set(VTK_IMPORT_LIBS ${VTK_IMPORT_LIBS} ${files})
-    endforeach()
-
-    install(FILES ${VTK_INSTALL_LIBS} DESTINATION lib/vtk/
-    PERMISSIONS
-    OWNER_WRITE OWNER_READ OWNER_EXECUTE
-    GROUP_READ GROUP_EXECUTE
-    WORLD_READ WORLD_EXECUTE
-    )
-
-    foreach(name ${VTK_LIBS})
-        file(GLOB files "${VTK_BIN_DIR}/${name}.dll")
-        set(VTK_RUNTIME_LIBS ${VTK_RUNTIME_LIBS} ${files})
-    endforeach()
-
-    install(FILES ${VTK_RUNTIME_LIBS} DESTINATION lib/vtk/
-    PERMISSIONS
-    OWNER_WRITE OWNER_READ OWNER_EXECUTE
-    GROUP_READ GROUP_EXECUTE
-    WORLD_READ WORLD_EXECUTE
-    )
-
-endif()
+    # Prerequisite components install
+    if(LINUX64INTEL OR LINUX64GNU)
+
+        foreach(name ${VTK_LIBS})
+            file(GLOB files "${VTK_LIB_DIR}/lib${name}.*")
+            set(VTK_INSTALL_LIBS ${VTK_INSTALL_LIBS} ${files})
+        endforeach()
+
+        install(FILES ${VTK_INSTALL_LIBS} DESTINATION lib/vtk/
+        PERMISSIONS
+        OWNER_WRITE OWNER_READ OWNER_EXECUTE
+        GROUP_READ GROUP_EXECUTE
+        WORLD_READ WORLD_EXECUTE
+        )
+
+    else()
+
+        foreach(name ${VTK_LIBS})
+            file(GLOB files "${VTK_LIB_DIR}/${name}.lib")
+            set(VTK_IMPORT_LIBS ${VTK_IMPORT_LIBS} ${files})
+        endforeach()
+
+        install(FILES ${VTK_INSTALL_LIBS} DESTINATION lib/vtk/
+        PERMISSIONS
+        OWNER_WRITE OWNER_READ OWNER_EXECUTE
+        GROUP_READ GROUP_EXECUTE
+        WORLD_READ WORLD_EXECUTE
+        )
+
+        foreach(name ${VTK_LIBS})
+            file(GLOB files "${VTK_BIN_DIR}/${name}.dll")
+            set(VTK_RUNTIME_LIBS ${VTK_RUNTIME_LIBS} ${files})
+        endforeach()
+
+        install(FILES ${VTK_RUNTIME_LIBS} DESTINATION lib/vtk/
+        PERMISSIONS
+        OWNER_WRITE OWNER_READ OWNER_EXECUTE
+        GROUP_READ GROUP_EXECUTE
+        WORLD_READ WORLD_EXECUTE
+        )
+
+    endif()

     file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "\n")
     file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "set(USE_VTK OFF CACHE BOOL \"Set to link against VTK libs\")\n")


Removed $OPTIMIZATION from debug configurations CXXFLAGS  for Linux.

--- cmake_modules/LPSCommon.cmake
+++ cmake_modules/LPSCommon.cmake
@@ -230,8 +230,8 @@
             endif()
        endif() # ENABLE_COVERAGE
     elseif(LINUX64GNU)
-       set(LPS_CXX_FLAGS "-ansi -m64 -Wno-deprecated ${OPTIMIZATION}")
-
+      # set(LPS_CXX_FLAGS "-ansi -m64 -Wno-deprecated ${OPTIMIZATION}")
+        set(LPS_CXX_FLAGS "-ansi -m64 -Wno-deprecated")
     #$$TODO: A 32 bit option is not needed. Do away with this case.
     else() # Assume 32-bit i686 linux for the present
        set(LPS_CXX_FLAGS "-ansi -m32 -Wno-deprecated ${OPTIMIZATION}")
@@ -261,7 +261,7 @@
         set(CMAKE_EXE_LINKER_FLAGS_DEBUG-CONTRACTS "${LPS_EXE_LINKER_FLAGS} /DEBUG" CACHE
             STRING "Flags used by the linker for executables for Debug-contracts builds")

-    else()
+    else() # Linux
         if(${USE_VTK})
             set(CMAKE_CXX_FLAGS_DEBUG-CONTRACTS "${LPS_CXX_FLAGS} -g -DUSE_VTK " CACHE
                 STRING "Flags used by the C++ compiler for Debug-contracts builds" FORCE)
@@ -326,7 +326,7 @@
         set(CMAKE_SHARED_LINKER_FLAGS_RELEASE-CONTRACTS "${LPS_SHARED_LINKER_FLAGS} /NODEFAULTLIB:MSVCRTD" CACHE
             STRING "Flags used by the linker for shared libraries for Release-contracts builds" FORCE)
     else()
-        set(CMAKE_CXX_FLAGS_RELEASE-CONTRACTS "${LPS_CXX_FLAGS}" CACHE
+        set(CMAKE_CXX_FLAGS_RELEASE-CONTRACTS "${LPS_CXX_FLAGS} ${OPTIMIZATION}" CACHE
             STRING "Flags used by the C++ compiler for Release-contracts builds" FORCE)
         set(CMAKE_EXE_LINKER_FLAGS_RELEASE-CONTRACTS "${LPS_EXE_LINKER_FLAGS}"  CACHE
             STRING "Flags used by the linker for executables for Release-contracts builds" FORCE)
@@ -359,7 +359,7 @@
         STRING "Flags used by the linker for shared libraries for Release-no-contracts builds" FORCE)

     else()
-        set(CMAKE_CXX_FLAGS_RELEASE-NO-CONTRACTS "${LPS_CXX_FLAGS} -DNDEBUG" CACHE
+        set(CMAKE_CXX_FLAGS_RELEASE-NO-CONTRACTS "${LPS_CXX_FLAGS} ${OPTIMIZATION} -DNDEBUG" CACHE
             STRING "Flags used by the C++ compiler for Release-no-contracts builds" FORCE)
         set(CMAKE_EXE_LINKER_FLAGS_RELEASE-NO-CONTRACTS "${CMAKE_EXE_LINKER_FLAGS}" CACHE
             STRING "Flags used by the linker for executables for Release-no-contracts builds" FORCE)


Disabled PDB install for assimp (should fix debug install error on windows)

--- CMakeModules/ExternalAssimp.cmake
+++ CMakeModules/ExternalAssimp.cmake
@@ -24,4 +24,5 @@
             -DASSIMP_BUILD_SAMPLES=False
             -DASSIMP_BUILD_TESTS=False
             -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+			-DASSIMP_INSTALL_PDB=False
 )


BUILD Fix when using cmake + ninja.

BUILD Fix when using cmake + ninja.

- Copied the procedure being used in arrayfire/build_clBLAS.cmake

--- CMakeModules/build_freetype.cmake
+++ CMakeModules/build_freetype.cmake
@@ -1,6 +1,16 @@
 INCLUDE(ExternalProject)

 SET(prefix ${CMAKE_BINARY_DIR}/third_party/freetype)
+SET(freetype_location ${prefix}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}freetype${CMAKE_STATIC_LIBRARY_SUFFIX})
+IF(CMAKE_VERSION VERSION_LESS 3.2)
+    IF(CMAKE_GENERATOR MATCHES "Ninja")
+        MESSAGE(WARNING "Building freetype with Ninja has known issues with CMake older than 3.2")
+    endif()
+    SET(byproducts)
+ELSE()
+    SET(byproducts BYPRODUCTS ${freetype_location})
+ENDIF()
+

 IF(UNIX)
     SET(CXXFLAGS "${CMAKE_CXX_FLAGS} -w -fPIC")
@@ -20,6 +30,7 @@
     -DCMAKE_C_FLAGS:STRING=${CFLAGS}
     -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
     -DCMAKE_INSTALL_PREFIX:STRING=${prefix}
+    ${byproducts}
     )

 ADD_LIBRARY(freetype IMPORTED STATIC)


Clean the generated PCH when 'clean' built-in target is invoked.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -1250,6 +1250,7 @@
                         COMMAND ${CMAKE_COMMAND} -E touch ${HEADER_FILENAME}.${CONFIG}.pch.trigger
                         DEPENDS ${ABS_PATH_PCH}.${CONFIG}.pch.rsp ${${TARGET_NAME}_PCH_DEPS}
                         COMMENT "Precompiling header file '${HEADER_FILENAME}' for ${CONFIG} configuration")
+                    add_make_clean_files (${PCH_FILENAME}/${PCH_FILENAME}.${CONFIG})
                 endforeach ()
                 # Using precompiled header file
                 set (CMAKE_${LANG}_FLAGS "${CMAKE_${LANG}_FLAGS} -include \"${ABS_PATH_PCH}\"")


Check for GFORTRAN only if needed.

Check for GFORTRAN only if needed.

--- CMakeModules/FindCLAPACK.cmake
+++ CMakeModules/FindCLAPACK.cmake
@@ -41,16 +41,18 @@
 set(BLA_STATIC TRUE)
 set(LAPACK_STATIC TRUE)

-set(TMP ${CMAKE_FIND_LIBRARY_SUFFIXES})
-set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3)
-find_library( GFORTRAN_LIBRARY
-              NAMES gfortran
-              PATHS ENV LD_LIBRARY_PATH )
-set(CMAKE_FIND_LIBRARY_SUFFIXES ${TMP})
-
-if (GFORTRAN_LIBRARY)
-  set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf)
-endif ()
+if (LINUX AND NOT APPLE AND NOT DEFINED ENV{MKLROOT})
+  set(TMP ${CMAKE_FIND_LIBRARY_SUFFIXES})
+  set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3)
+  find_library( GFORTRAN_LIBRARY
+                NAMES gfortran
+                PATHS ENV LD_LIBRARY_PATH )
+  set(CMAKE_FIND_LIBRARY_SUFFIXES ${TMP})
+
+  if (GFORTRAN_LIBRARY)
+    set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf)
+  endif ()
+endif ()

 set(BLA_VENDOR "Apple")
 find_package(LAPACK)


Refactored COLLADA_BUILDNAME and COLLADA_BOOST_BUILDNAME to resolve case where CMAKE_VS_PLATFORM_TOOLSET is not set.

--- CMakeModules/FindCOLLADA.cmake
+++ CMakeModules/FindCOLLADA.cmake
@@ -23,37 +23,38 @@
 ENDIF()

-
-
-
 IF(APPLE)
     SET(COLLADA_BUILDNAME "mac")
-    SET(COLLADA_BOOST_BUILDNAME "mac")
+  SET(COLLADA_BOOST_BUILDNAME ${COLLADA_BUILDNAME})
 ELSEIF(MINGW)
     SET(COLLADA_BUILDNAME "mingw")
-    SET(COLLADA_BOOST_BUILDNAME "mingw")
-ELSEIF(MSVC14)
+  SET(COLLADA_BOOST_BUILDNAME ${COLLADA_BUILDNAME})
+ELSEIF(MSVC_VERSION EQUAL 1900 OR MSVC_VERSION EQUAL 1910 )
     SET(COLLADA_BUILDNAME "vc14")
+    SET(COLLADA_BOOST_BUILDNAME "vc140")
+ELSEIF(MSVC_VERSION EQUAL 1800)
+    SET(COLLADA_BUILDNAME "vc12")
+    SET(COLLADA_BOOST_BUILDNAME "vc120")
+ELSEIF(MSVC_VERSION EQUAL 1700)
+    SET(COLLADA_BUILDNAME "vc11")
+    SET(COLLADA_BOOST_BUILDNAME "vc110")
+ELSEIF(MSVC_VERSION EQUAL 1600)
+    SET(COLLADA_BUILDNAME "vc10")
+    SET(COLLADA_BOOST_BUILDNAME "vc100")
+ELSEIF(MSVC_VERSION EQUAL 1500)
+    SET(COLLADA_BUILDNAME "vc9")
+    SET(COLLADA_BOOST_BUILDNAME "vc90")
+ELSEIF(MSVC_VERSION EQUAL 1400)
+    SET(COLLADA_BUILDNAME "vc8")
+    SET(COLLADA_BOOST_BUILDNAME "vc80")
+ELSE()
+  SET(COLLADA_BUILDNAME "linux")
+  SET(COLLADA_BOOST_BUILDNAME ${COLLADA_BUILDNAME})
+ENDIF()
+
+IF(${CMAKE_VS_PLATFORM_TOOLSET})
     string(REPLACE "v" "vc" COLLADA_BOOST_BUILDNAME ${CMAKE_VS_PLATFORM_TOOLSET})
-ELSEIF(MSVC12)
-    SET(COLLADA_BUILDNAME "vc12")
-    string(REPLACE "v" "vc" COLLADA_BOOST_BUILDNAME ${CMAKE_VS_PLATFORM_TOOLSET})
-ELSEIF(MSVC11)
-    SET(COLLADA_BUILDNAME "vc11")
-    string(REPLACE "v" "vc" COLLADA_BOOST_BUILDNAME ${CMAKE_VS_PLATFORM_TOOLSET})
-ELSEIF(MSVC10)
-    SET(COLLADA_BUILDNAME "vc10")
-    string(REPLACE "v" "vc" COLLADA_BOOST_BUILDNAME ${CMAKE_VS_PLATFORM_TOOLSET})
-ELSEIF(MSVC90)
-    SET(COLLADA_BUILDNAME "vc9")
-    string(REPLACE "v" "vc" COLLADA_BOOST_BUILDNAME ${CMAKE_VS_PLATFORM_TOOLSET})
-ELSEIF(MSVC80)
-    SET(COLLADA_BUILDNAME "vc8")
-    string(REPLACE "v" "vc" COLLADA_BOOST_BUILDNAME ${CMAKE_VS_PLATFORM_TOOLSET})
-ELSE(APPLE)
-  SET(COLLADA_BUILDNAME "linux")
-  SET(COLLADA_BOOST_BUILDNAME "linux")
-ENDIF(APPLE)
+ENDIF()

 FIND_PATH(COLLADA_INCLUDE_DIR dae.h


add resources

add resources

--- Plugins/org.mitk.gui.qt.multilabelsegmentation/files.cmake
+++ Plugins/org.mitk.gui.qt.multilabelsegmentation/files.cmake
@@ -56,8 +56,25 @@
 )

 set(CACHED_RESOURCE_FILES
+  resources/BooleanDifference_48x48.png
+  resources/BooleanIntersection_48x48.png
+  resources/BooleanOperations_48x48.png
+  resources/BooleanUnion_48x48.png
+  resources/Closing_48x48.png
+  resources/CTKWidgets_48x48.png
+  resources/deformablePlane.png
+  resources/Dilate_48x48.png
+  resources/Erode_48x48.png
+  resources/FillHoles_48x48.png
+  resources/Icons.svg
+  resources/ImageMasking_48x48.png
+  resources/MorphologicalOperations_48x48.png
   resources/multilabelsegmentation.png
   resources/MultiLabelSegmentationUtilities_48x48.png
+  resources/NewLabel_48x48.png
+  resources/NewSegmentationSession_48x48.png
+  resources/Opening_48x48.png
+  resources/SurfaceToImage_48x48.png
   plugin.xml
 )


Update: try to fix where the found library is usb-2 on Mac using OS name

git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@1037 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/Modules/FindOpenNI.cmake
+++ cmake/Modules/FindOpenNI.cmake
@@ -28,7 +28,7 @@
              PATHS "$ENV{PROGRAMFILES}/OpenNI/Lib${OPENNI_SUFFIX}" "$ENV{PROGRAMW6432}/OpenNI/Lib${OPENNI_SUFFIX}")

 set(OPENNI_INCLUDE_DIRS ${OPENNI_INCLUDE_DIR})
-if(APPLE)
+if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
   set(OPENNI_LIBRARIES ${OPENNI_LIBRARY} usb-1.0)
 else()
   set(OPENNI_LIBRARIES ${OPENNI_LIBRARY})


:loud_sound: add operating system output

--- cmake/download_test_data.cmake
+++ cmake/download_test_data.cmake
@@ -12,3 +12,15 @@

 # create a header with the path to the downloaded test data
 file(WRITE ${CMAKE_BINARY_DIR}/include/test_data.hpp "#define TEST_DATA_DIRECTORY \"${CMAKE_BINARY_DIR}/json_test_data\"\n")
+
+# determine the operating system (for debug and support purposes)
+find_program(UNAME_COMMAND uname)
+find_program(VER_COMMAND ver)
+if (UNAME_COMMAND)
+    execute_process(COMMAND ${UNAME_COMMAND} -a OUTPUT_VARIABLE UNAME_COMMAND_RESULT OUTPUT_STRIP_TRAILING_WHITESPACE)
+endif()
+if (VER_COMMAND)
+    execute_process(COMMAND ${VER_COMMAND} OUTPUT_VARIABLE VER_COMMAND_RESULT OUTPUT_STRIP_TRAILING_WHITESPACE)
+endif()
+
+message(STATUS "Operating system: ${UNAME_COMMAND_RESULT} ${VER_COMMAND_RESULT} ${CMAKE_SYSTEM}")


Search for phonon4qt5 in Qt5 builds

Search for phonon4qt5 in Qt5 builds

CCBUG: 348594

--- cmake/modules/FindPhonon.cmake
+++ cmake/modules/FindPhonon.cmake
@@ -22,8 +22,13 @@
 endmacro(_phonon_find_version)

 # the dirs listed with HINTS are searched before the default sets of dirs
-find_library(PHONON_LIBRARY NAMES phonon HINTS ${KDE4_LIB_INSTALL_DIR} ${QT_LIBRARY_DIR})
-find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h HINTS ${KDE4_INCLUDE_INSTALL_DIR} ${QT_INCLUDE_DIR} ${INCLUDE_INSTALL_DIR} ${QT_LIBRARY_DIR})
+if(QT5BUILD)
+  find_library(PHONON_LIBRARY NAMES phonon4qt5)
+  find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h PATH_SUFFIXES phonon4qt5)
+else()
+  find_library(PHONON_LIBRARY NAMES phonon HINTS ${KDE4_LIB_INSTALL_DIR} ${QT_LIBRARY_DIR})
+  find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h HINTS ${KDE4_INCLUDE_INSTALL_DIR} ${QT_INCLUDE_DIR} ${INCLUDE_INSTALL_DIR} ${QT_LIBRARY_DIR})
+endif()

 if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
    set(PHONON_LIBS ${phonon_LIB_DEPENDS} ${PHONON_LIBRARY})


REFLEX_GENERATE_DICTIONARY: change macro to function, export gensrcdict to PARENT_SCOPE

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -125,7 +125,7 @@
 #  COMPILE_DEFINITIONS are used to create the appropriate -I and -D flags
 #
 #---------------------------------------------------------------------------------------------------
-macro(REFLEX_GENERATE_DICTIONARY dictionary)
+function(REFLEX_GENERATE_DICTIONARY dictionary)
   CMAKE_PARSE_ARGUMENTS(ARG "" "SELECTION" "OPTIONS;DEPENDS;USES" ${ARGN})
   #---Get List of header files---------------
   set(headerfiles)
@@ -172,7 +172,6 @@
     endif()
   endforeach()

-  set(definitions)
   get_directory_property(defs COMPILE_DEFINITIONS)
   foreach( d ${defs})
    list(APPEND definitions ${d})
@@ -195,6 +194,8 @@
     COMMAND_EXPAND_LISTS
     )

+  set(gensrcdict ${dictionary}.cxx PARENT_SCOPE)
+
   #---roottest compability---------------------------------
   if(CMAKE_ROOTTEST_DICT)
     ROOTTEST_TARGETNAME_FROM_FILE(targetname ${dictionary})
@@ -209,7 +210,7 @@
     add_custom_target(${targetname} ALL DEPENDS ${gensrcdict})
   endif()

-endmacro()
+endfunction()

 #---------------------------------------------------------------------------------------------------
 #---ROOT_GET_LIBRARY_OUTPUT_DIR( result_var )


TpQtMacros.cmake: Remove redundant call to append generated file to telepathy_qt_SRCS.

--- cmake/modules/TpQtMacros.cmake
+++ cmake/modules/TpQtMacros.cmake
@@ -225,7 +225,6 @@
     tpqt_generate_moc_i_target_deps(${CMAKE_CURRENT_BINARY_DIR}/_gen/cli-${spec}.h
                        ${CMAKE_CURRENT_BINARY_DIR}/_gen/cli-${spec}.moc.hpp
                        "generate_cli-${spec}-body")
-    list(APPEND telepathy_qt_SRCS ${CMAKE_CURRENT_BINARY_DIR}/_gen/cli-${spec}.moc.hpp)
 endfunction(tpqt_client_generator spec group pretty_include namespace)

 function(tpqt_future_client_generator spec namespace)