Override cmake's tendency to cache wrong values

--- cmake/Packages/CFITSIO.cmake
+++ cmake/Packages/CFITSIO.cmake
@@ -28,7 +28,7 @@
     FIND_PATH (CFITSIO_INCLUDE_DIR cfitsio/fitsio.h
       PATHS $ENV{CFITSIOROOT}/include
       )
-    SET(CFITSIO_INCLUDE_DIR "${CFITSIO_INCLUDE_DIR}/cfitsio")
+    SET(CFITSIO_INCLUDE_DIR "${CFITSIO_INCLUDE_DIR}/cfitsio" CACHE PATH "Path to cfitsio headers" FORCE)
   endif()

   SET (CFITSIO_VERSION 0)


Fix OpenSSL static dependencies.

Fix OpenSSL static dependencies.

Fixes #458.

--- cmake/find/FindOpenSSL.cmake
+++ cmake/find/FindOpenSSL.cmake
@@ -254,7 +254,7 @@
   set(OPENSSL_SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY})
   set(OPENSSL_CRYPTO_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})

-  set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
+  set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} ${CMAKE_DL_LIBS})

 endif()


build: remove `IS_STDLIB_CORE` from `_add_swift_host_library_single`

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -690,7 +690,6 @@
 #     [FILE_DEPENDS target1 ...]
 #     [DONT_EMBED_BITCODE]
 #     [IS_STDLIB]
-#     [IS_STDLIB_CORE]
 #     INSTALL_IN_COMPONENT comp
 #     source1 [source2 source3 ...])
 #
@@ -747,9 +746,6 @@
 #
 # IS_STDLIB
 #   Install library dylib and swift module files to lib/swift.
-#
-# IS_STDLIB_CORE
-#   Compile as the standard library core.
 #
 # INSTALL_IN_COMPONENT comp
 #   The Swift installation component that this library belongs to.
@@ -760,7 +756,6 @@
   set(SWIFTLIB_SINGLE_options
         DONT_EMBED_BITCODE
         IS_STDLIB
-        IS_STDLIB_CORE
         NOSWIFTRT
         OBJECT_LIBRARY
         SHARED
@@ -871,11 +866,7 @@
   endif()

   # Remove the "swift" prefix from the name to determine the module name.
-  if(SWIFTLIB_IS_STDLIB_CORE)
-    set(module_name "Swift")
-  else()
-    string(REPLACE swift "" module_name "${name}")
-  endif()
+  string(REPLACE swift "" module_name "${name}")

   if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "WINDOWS")
     if(NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
@@ -914,7 +905,6 @@
       MODULE_NAME ${module_name}
       COMPILE_FLAGS ${SWIFTLIB_SINGLE_SWIFT_COMPILE_FLAGS}
       ${SWIFTLIB_SINGLE_IS_STDLIB_keyword}
-      ${SWIFTLIB_SINGLE_IS_STDLIB_CORE_keyword}
       ${embed_bitcode_arg}
       INSTALL_IN_COMPONENT "${SWIFTLIB_SINGLE_INSTALL_IN_COMPONENT}")
   add_swift_source_group("${SWIFTLIB_SINGLE_EXTERNAL_SOURCES}")
@@ -1056,11 +1046,6 @@
     set_target_properties("${target}" PROPERTIES
       LIBRARY_OUTPUT_DIRECTORY ${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR}
       ARCHIVE_OUTPUT_DIRECTORY ${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR})
-    if(SWIFTLIB_SINGLE_SDK STREQUAL WINDOWS AND SWIFTLIB_SINGLE_IS_STDLIB_CORE
-        AND libkind STREQUAL SHARED)
-      add_custom_command(TARGET ${target} POST_BUILD
-        COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${target}> ${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR})
-    endif()

     foreach(config ${CMAKE_CONFIGURATION_TYPES})
       string(TOUPPER ${config} config_upper)


[cxx-interop][libswift][build] Enable C++ interop when building libSwift

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -722,10 +722,15 @@
 # This is a temporary workaround until it's possible to compile libswift with
 # cmake's builtin swift support.
 function(add_libswift name)
+  set(libswift_compile_options
+      "-target" "x86_64-apple-macosx10.15" # TODO: this is a hack until I figure out where the target is being set.
+      "-Xfrontend" "-validate-tbd-against-ir=none"
+      "-Xfrontend" "-enable-cxx-interop")
+
   if(CMAKE_BUILD_TYPE STREQUAL Debug)
-    set(libswift_compile_options "-g")
+    list(APPEND libswift_compile_options "-g")
   else()
-    set(libswift_compile_options "-O" "-cross-module-optimization")
+    list(APPEND libswift_compile_options "-O" "-cross-module-optimization")
   endif()

   set(build_dir ${CMAKE_CURRENT_BINARY_DIR})


[CMake] Make sure ICU libdir is correctly added to library_search_directories

The CMake variables ${sdk} and ${arch} are only set if
_add_variant_link_flags is invoked from add_swift_target_library calling
_add_swift_library_single. If you get to _add_swift_library_single from
add_swift_host_library, those variables will not be set and subsequent
linking will not find ICU libraries. This was an issue when building
swift host libraries on Android.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -467,12 +467,14 @@
   endif()

   if(NOT "${SWIFT_${LFLAGS_SDK}_${LFLAGS_ARCH}_ICU_UC}" STREQUAL "")
-    get_filename_component(SWIFT_${sdk}_${arch}_ICU_UC_LIBDIR "${SWIFT_${sdk}_${arch}_ICU_UC}" DIRECTORY)
-    list(APPEND library_search_directories "${SWIFT_${sdk}_${arch}_ICU_UC_LIBDIR}")
+    get_filename_component(SWIFT_${LFLAGS_SDK}_${LFLAGS_ARCH}_ICU_UC_LIBDIR
+      "${SWIFT_${LFLAGS_SDK}_${LFLAGS_ARCH}_ICU_UC}" DIRECTORY)
+    list(APPEND library_search_directories "${SWIFT_${LFLAGS_SDK}_${LFLAGS_ARCH}_ICU_UC_LIBDIR}")
   endif()
   if(NOT "${SWIFT_${LFLAGS_SDK}_${LFLAGS_ARCH}_ICU_I18N}" STREQUAL "")
-    get_filename_component(SWIFT_${sdk}_${arch}_ICU_I18N_LIBDIR "${SWIFT_${sdk}_${arch}_ICU_I18N}" DIRECTORY)
-    list(APPEND library_search_directories "${SWIFT_${sdk}_${arch}_ICU_I18N_LIBDIR}")
+    get_filename_component(SWIFT_${LFLAGS_SDK}_${LFLAGS_ARCH}_ICU_I18N_LIBDIR
+      "${SWIFT_${LFLAGS_SDK}_${LFLAGS_ARCH}_ICU_I18N}" DIRECTORY)
+    list(APPEND library_search_directories "${SWIFT_${LFLAGS_SDK}_${LFLAGS_ARCH}_ICU_I18N_LIBDIR}")
   endif()

   if(NOT SWIFT_COMPILER_IS_MSVC_LIKE)


Fixed missing path for GLEW libraries on windows

--- cmake/modules/FindGLEW.cmake
+++ cmake/modules/FindGLEW.cmake
@@ -8,6 +8,7 @@
 find_library(GLEW_LIBRARIES
 	NAMES glew32 libglew32
 	PATHS $ENV{GLEW_HOME}/built/lib
+	$ENV{GLEW_HOME}/lib/Release/Win32
 	"/usr/lib"
 	"/usr/local/lib")
 endif()


support win32

support win32

svn path=/trunk/KDE/kdepim/; revision=686938

--- cmake/modules/FindKode.cmake
+++ cmake/modules/FindKode.cmake
@@ -14,7 +14,11 @@

 # check if we are currently building kdepim
 if ( EXISTS ${CMAKE_SOURCE_DIR}/libkdepim/kdepim_export.h )
-	set( KODE_XML_COMPILER_EXECUTABLE ${CMAKE_BINARY_DIR}/kode/kxml_compiler/kxml_compiler.shell )
+	if (WIN32)
+		set( KODE_XML_COMPILER_EXECUTABLE ${CMAKE_BINARY_DIR}/bin/kxml_compiler.exe.bat )
+	else(WIN32)
+		set( KODE_XML_COMPILER_EXECUTABLE ${CMAKE_BINARY_DIR}/kode/kxml_compiler/kxml_compiler.shell )
+	endif(WIN32)
 	set( _KODE_XML_COMPILER_DEP kxml_compiler )
 else ( EXISTS ${CMAKE_SOURCE_DIR}/libkdepim/kdepim_export.h )
 	find_program( KODE_XML_COMPILER_EXECUTABLE NAME kxml_compiler PATHS


Drop debugging message and sort out some double-quote problems.

svn path=/trunk/; revision=6735

--- cmake/modules/instdirs.cmake
+++ cmake/modules/instdirs.cmake
@@ -55,13 +55,12 @@

 # Absolute path of top-level build directory.
 set(BUILD_DIR ${CMAKE_BINARY_DIR})
-message("BUILD_DIR = ${BUILD_DIR})

 # The following *_CMD variables are needed in
 # examples/*/Makefile.examples.cmake

 set(LIB_DIR_CMD "-L${LIB_DIR}")
-set(INCLUDE_DIR_CMD "-I${INCLUDE_DIR})
+set(INCLUDE_DIR_CMD "-I${INCLUDE_DIR}")


ENH: make Shark optional for the dimensionalityReductionLearning module

--- Modules/Learning/DimensionalityReductionLearning/otb-module.cmake
+++ Modules/Learning/DimensionalityReductionLearning/otb-module.cmake
@@ -23,11 +23,13 @@
   DEPENDS
     OTBCommon
     OTBITK
-    OTBShark
     OTBBoost
     OTBSOM
     OTBLearningBase

+  OPTIONAL_DEPENDS
+    OTBShark
+
   TEST_DEPENDS
     OTBTestKernel


CPack do not strip build create a debug package instead

--- cmake/modules/CPackConfig.cmake
+++ cmake/modules/CPackConfig.cmake
@@ -10,9 +10,9 @@
   endif()

   set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
-  set(CPACK_STRIP_FILES 1)
-  if(${CMAKE_VERSION} VERSION_GREATER "3.5")
-    set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
+  set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
+  if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
+      set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON)
   endif()
 endif()


build: add plugin dependencies only when present

This fixes build for VPP_EXTERNAL_PROJECT plugin with missing
PLUGIN_API_FILES.

Type: fix
Signed-off-by: Ruslan Babayev <e9bfb2c543dd33934bcff71879b108246996b567@babayev.com>
Change-Id: I687bedcd828d834b0a7de1363f0b2d063f75ee17

--- src/cmake/plugin.cmake
+++ src/cmake/plugin.cmake
@@ -56,7 +56,9 @@
   if(NOT VPP_EXTERNAL_PROJECT)
     list(APPEND deps vpp_version_h api_headers)
   endif()
-  add_dependencies(${plugin_name} ${deps})
+  if(deps)
+    add_dependencies(${plugin_name} ${deps})
+  endif()
   set_target_properties(${plugin_name} PROPERTIES
     PREFIX ""
     LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/vpp_plugins)


CodeGenerator: Put settings in 'config' dir instead of 'modules_config'

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -905,10 +905,10 @@
       DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/kurento/modules/${CONFIG_FILES_DIR}
     )

-    file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/modules_config/${CONFIG_FILES_DIR})
+    file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/config/${CONFIG_FILES_DIR})
     foreach (CONFIG_FILE ${CONFIG_FILES})
       execute_process (
-          COMMAND ln -fs ${CONFIG_FILE} ${CMAKE_BINARY_DIR}/modules_config/${CONFIG_FILES_DIR})
+          COMMAND ln -fs ${CONFIG_FILE} ${CMAKE_BINARY_DIR}/config/${CONFIG_FILES_DIR})
     endforeach()
   else()
     message (STATUS "No config files found")


Add linuxtrack default install path to FindOptiTrack.cmake

--- CMake/FindOptiTrack.cmake
+++ CMake/FindOptiTrack.cmake
@@ -13,7 +13,7 @@
 # Attempt to define OPTITRACK_INCLUDE_DIR if undefined
 find_path(OPTITRACK_INCLUDE_DIR
 	NAMES cameralibrary.h linuxtrack.h
-	PATHS "$ENV{NP_CAMERASDK}" "/opt/linuxtrack"
+	PATHS "$ENV{NP_CAMERASDK}" "/opt/linuxtrack" "/usr/local"
 	PATH_SUFFIXES "include"
 	NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH
 )


Check both local and externally set dir vars before comparing them.

--- CMakeExternals/MITK.cmake
+++ CMakeExternals/MITK.cmake
@@ -219,19 +219,19 @@

   find_package(MITK REQUIRED)

-  if(ITK_DIR)
+  if(my_itk_dir AND ITK_DIR)
     if(NOT my_itk_dir STREQUAL ${ITK_DIR})
       message(FATAL_ERROR "ITK packages do not match:\n   ${MY_PROJECT_NAME}: ${my_itk_dir}\n  MITK: ${ITK_DIR}")
     endif()
   endif()

-  if(VTK_DIR)
+  if(my_vtk_dir AND VTK_DIR)
     if(NOT my_vtk_dir STREQUAL ${VTK_DIR})
       message(FATAL_ERROR "VTK packages do not match:\n   ${MY_PROJECT_NAME}: ${my_vtk_dir}\n  MITK: ${VTK_DIR}")
     endif()
   endif()

-  if(MITK_QMAKE_EXECUTABLE)
+  if(my_qmake_executable AND MITK_QMAKE_EXECUTABLE)
     if(NOT my_qmake_executable STREQUAL ${MITK_QMAKE_EXECUTABLE})
       message(FATAL_ERROR "Qt qmake does not match:\n   ${MY_PROJECT_NAME}: ${my_qmake_executable}\n  MITK: ${MITK_QMAKE_EXECUTABLE}")
     endif()


AndroidビルドにUSE_OPENGLES2フラグを付加

--- Android.cmake
+++ Android.cmake
@@ -11,6 +11,8 @@
 set(CMAKE_LD "${CMAKE_TOOLBASE}ld")
 set(CMAKE_AR "${CMAKE_TOOLBASE}ar")
 set(CMAKE_RANLIB "${CMAKE_TOOLBASE}ranlib")
+
+add_definitions(-DUSE_OPENGLES2)

 # Android用のビルド設定
 include_directories(${ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.8/include


[Config] Added support for Python 3.10

[Config] Added support for Python 3.10

--- config/FindPython/Support.cmake
+++ config/FindPython/Support.cmake
@@ -25,7 +25,7 @@
   message (FATAL_ERROR "FindPython: INTERNAL ERROR")
 endif()
 if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 3)
-  set(_${_PYTHON_PREFIX}_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+  set(_${_PYTHON_PREFIX}_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
 elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 2)
   set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
 else()


[Config] Added support for Python 3.10

[Config] Added support for Python 3.10


Added SpectroCam to exclude list of build all (hardware dependent).

--- CMake/BuildConfigurations/All.cmake
+++ CMake/BuildConfigurations/All.cmake
@@ -19,6 +19,7 @@
   SOFA_PLUGINS
   SOFA_PLUGINS_DIR
   SUPERBUILD
+  BiophotonicsHardware_SpectroCam

   KWSTYLE
   MICROBIRD_TRACKER


Use DESTDIR on ament_python_install_package() (#323)

* Use DESTDIR on ament_python_install_package()

Signed-off-by: Michel Hidalgo <2c7f9fd20fbeb41ce8894ec4653d66fa7f3b6e1a@ekumenlabs.com>

--- ament_cmake_python/cmake/ament_python_install_package.cmake
+++ ament_cmake_python/cmake/ament_python_install_package.cmake
@@ -127,30 +127,38 @@
   endif()

   if(NOT ARG_SKIP_COMPILE)
-    set(extra_install_args "--compile")
+    set(extra_install_args --compile)
   else()
-    set(extra_install_args "--no-compile")
+    set(extra_install_args --no-compile)
   endif()

   # Install as flat Python .egg to mimic https://github.com/colcon/colcon-core
   # handling of pure Python packages.
-  file(RELATIVE_PATH install_dir "${build_dir}" "${CMAKE_INSTALL_PREFIX}")

   # NOTE(hidmic): Allow setup.py install to build, as there is no way to
   # determine the Python package's source dependencies for proper build
   # invalidation.
   install(CODE
-    "message(STATUS \"Installing: ${package_name} as flat Python egg \"
-                    \"to ${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_DIR}\")
+    "set(extra_install_args ${extra_install_args})
+     set(install_dir \"${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_DIR}\")
+     if(DEFINED ENV{DESTDIR} AND NOT \"$ENV{DESTDIR}\" STREQUAL \"\")
+       list(APPEND extra_install_args --root \$ENV{DESTDIR})
+       file(TO_CMAKE_PATH \"\$ENV{DESTDIR}/\${install_dir}\" install_dir)
+     endif()
+     message(STATUS
+       \"Installing: ${package_name} as flat Python egg under \${install_dir}\")
+     file(TO_NATIVE_PATH \"${CMAKE_INSTALL_PREFIX}\" install_prefix)
+     file(TO_NATIVE_PATH \"${CMAKE_INSTALL_PREFIX}/bin\" scripts_install_dir)
      execute_process(
-        COMMAND
-        \"${PYTHON_EXECUTABLE}\" setup.py install
+       COMMAND
+         \"${PYTHON_EXECUTABLE}\" setup.py install
            --single-version-externally-managed
-           --prefix \"${install_dir}\"
+           --install-scripts \${scripts_install_dir}
+           --prefix \${install_prefix}
            --record install.log
-           ${extra_install_args}
-        WORKING_DIRECTORY \"${build_dir}\"
-        OUTPUT_QUIET
+           \${extra_install_args}
+       WORKING_DIRECTORY \"${build_dir}\"
+       OUTPUT_QUIET
      )"
   )


Synchronize adm files

Synchronize adm files

--- adm_local_without_kernel/cmake_files/SalomeMacros.cmake
+++ adm_local_without_kernel/cmake_files/SalomeMacros.cmake
@@ -286,7 +286,7 @@
   IF(SALOME_PACKAGE_REPORT_JUSTIFY)
     SET(_length ${SALOME_PACKAGE_REPORT_JUSTIFY})
   ELSE()
-    SET(_length 10)
+    SET(_length 23)
   ENDIF()
   MESSAGE(STATUS "")
   MESSAGE(STATUS "  Optional packages - Detection report ")


Update UseBoost.cmake

Update UseBoost.cmake

--- Superbuild/UseBoost.cmake
+++ Superbuild/UseBoost.cmake
@@ -41,16 +41,21 @@
   else()
     if(${lib} MATCHES "boost_python-mt")
       if(WIN32)
-		    set(FULL_LIB_NAME_RELEASE "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}boost_python${USER_PYTHON_VERSION_MAJOR}${USER_PYTHON_VERSION_MINOR}-mt${CMAKE_STATIC_LIBRARY_SUFFIX}")
+        set(FULL_LIB_NAME_RELEASE "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}boost_python${USER_PYTHON_VERSION_MAJOR}${USER_PYTHON_VERSION_MINOR}-mt${CMAKE_STATIC_LIBRARY_SUFFIX}")
         set(FULL_LIB_NAME_DEBUG "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}boost_python${USER_PYTHON_VERSION_MAJOR}${USER_PYTHON_VERSION_MINOR}-mt${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
       else()
         set(FULL_LIB_NAME_RELEASE "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}boost_python${USER_PYTHON_VERSION_MAJOR}${USER_PYTHON_VERSION_MINOR}-mt${CMAKE_STATIC_LIBRARY_SUFFIX}")
         set(FULL_LIB_NAME_DEBUG "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}boost_python${USER_PYTHON_VERSION_MAJOR}${USER_PYTHON_VERSION_MINOR}-mt${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
       endif()
-	  else() # non-python libraries
-	    set(FULL_LIB_NAME_RELEASE "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX}")
-	    set(FULL_LIB_NAME_DEBUG "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}${lib}${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
-	  endif()
+    else() # non-python libraries
+      if(WIN32)
+        set(FULL_LIB_NAME_RELEASE "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}${lib}-x64${CMAKE_STATIC_LIBRARY_SUFFIX}")
+        set(FULL_LIB_NAME_DEBUG "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}${lib}${DEBUG_POSTFIX}$-x64${CMAKE_STATIC_LIBRARY_SUFFIX}")
+      else()
+        set(FULL_LIB_NAME_RELEASE "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX}")
+        set(FULL_LIB_NAME_DEBUG "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}${lib}${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
+      endif()
+    endif()
   endif()

   message(STATUS "Configure Boost library ${lib}")


Switch to ITK 4.5, works with MacOS Mavericks directly

--- cmake/externals/projects_modules/ITK.cmake
+++ cmake/externals/projects_modules/ITK.cmake
@@ -51,8 +51,8 @@

 if (NOT DEFINED ${ep}_SOURCE_DIR)
   set(location
-    URL "http://sourceforge.net/projects/itk/files/itk/4.4/InsightToolkit-4.4.2.tar.gz"
-    URL_MD5 "5fd91d6f72e07f51e1e9b27ff02f020a"
+    URL "http://sourceforge.net/projects/itk/files/itk/4.5/InsightToolkit-4.5.0.tar.gz"
+    URL_MD5 "54ae97f62eea1d6f9deb67232c2115a7"
     )
 endif()


Fall back to available complex precisions

Previously CMake reported an error whenever the FFTW float library
could not be found. This patch features an automatic fallback to an
available precision.
The user may still override these settings by explicitly setting the
value of BALL_COMPLEX_PRECISION.

--- cmake/BALLConfigFFTW.cmake
+++ cmake/BALLConfigFFTW.cmake
@@ -3,37 +3,56 @@

 INCLUDE_DIRECTORIES(${FFTW_INCLUDE})

+#If the libraries are set, set the default traits to the favoured
+#precision (in our case float is prefered
+IF (FFTWL_FOUND)
+	SET(BALL_HAS_FFTW_LONG_DOUBLE TRUE)
+	SET(FFTW_LIBRARIES ${FFTWL_LIB} ${FFTW_LIBRARIES})
+	SET(BALL_FFTW_DEFAULT_TRAITS LongDoubleTraits)
+ENDIF()
+
 IF (FFTWD_FOUND)
 	SET(BALL_HAS_FFTW_DOUBLE TRUE)
 	SET(FFTW_LIBRARIES ${FFTWD_LIB} ${FFTW_LIBRARIES})
+	SET(BALL_FFTW_DEFAULT_TRAITS DoubleTraits)
+	MESSAGE(STATUS "Falling back to double complex precision")
 ENDIF()

 IF (FFTWF_FOUND)
 	SET(BALL_HAS_FFTW_FLOAT TRUE)
 	SET(FFTW_LIBRARIES ${FFTWF_LIB} ${FFTW_LIBRARIES})
+	SET(BALL_FFTW_DEFAULT_TRAITS FloatTraits)
+	MESSAGE(STATUS "Falling back to long double complex precision")
 ENDIF()

-IF (FFTWL_FOUND)
-	SET(BALL_HAS_FFTW_LONG_DOUBLE TRUE)
-	SET(FFTW_LIBRARIES ${FFTWL_LIB} ${FFTW_LIBRARIES})
-ENDIF()
-
-IF (BALL_COMPLEX_PRECISION MATCHES "float")
+#The user may override these settings
+IF (BALL_COMPLEX_PRECISION STREQUAL "float")
 	IF (FFTWF_FOUND)
 		SET(BALL_FFTW_DEFAULT_TRAITS FloatTraits)
 	ELSE()
 		MESSAGE(SEND_ERROR "FFTW library needed for desired complex precision is not available! (see BALL_COMPLEX_PRECISION)")
 	ENDIF()
-ELSEIF(BALL_COMPLEX_PRECISION MATCHES "double")
+ELSEIF(BALL_COMPLEX_PRECISION STREQUAL "double")
 	IF (FFTWD_FOUND)
 		SET(BALL_FFTW_DEFAULT_TRAITS DoubleTraits)
 	ELSE()
 		MESSAGE(SEND_ERROR "FFTW library needed for desired complex precision is not available! (see BALL_COMPLEX_PRECISION)")
 	ENDIF()
-ELSE()
+ELSEIF(BALL_COMPLEX_PRECISION STREQUAL "long double")
 	IF (FFTWL_FOUND)
 		SET(BALL_FFTW_DEFAULT_TRAITS LongDoubleTraits)
 	ELSE()
 		MESSAGE(SEND_ERROR "FFTW library needed for desired complex precision is not available! (see BALL_COMPLEX_PRECISION)")
 	ENDIF()
 ENDIF()
+
+#However we still have to make some settings depending on the selected precision
+IF (BALL_FFTW_DEFAULT_TRAITS STREQUAL "FloatTraits")
+	SET(BALL_COMPLEX_PRECISION "float")
+ELSEIF (BALL_FFTW_DEFAULT_TRAITS STREQUAL "DoubleTraits")
+	SET(BALL_COMPLEX_PRECISION "double")
+ELSEIF (BALL_FFTW_DEFAULT_TRAITS STREQUAL "LongDoubleTraits")
+	SET(BALL_COMPLEX_PRECISION "long double")
+ELSE()
+	MESSAGE(SEND_ERROR "Installed FFTW library features no suitable complex precision (neither float nor double nor long double)")
+ENDIF()


debug travis 8

debug travis 8

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -167,7 +167,7 @@
         # For debugging with lldb
         $<$<CONFIG:Debug>:
             -g
-            # -v
+            -v
         >

     )


Build libuv

Build libuv

--- cmake/modules/FindUV.cmake
+++ cmake/modules/FindUV.cmake
@@ -21,7 +21,7 @@
     LIST_SEPARATOR " "
     BUILD_IN_SOURCE 1

-    CONFIGURE_COMMAND ${UV_DIR}/autogen.sh COMMAND make clean COMMAND ${UV_DIR}/configure --prefix=${UV_INSTALL_DIR} --enable-static --disable-shared CFLAGS=-fPIC CC=${CMAKE_C_COMPILER}
+    CONFIGURE_COMMAND ${UV_DIR}/autogen.sh COMMAND ${UV_DIR}/configure --prefix=${UV_INSTALL_DIR} --enable-static --disable-shared CFLAGS=-fPIC CC=${CMAKE_C_COMPILER} COMMAND make clean
     BUILD_COMMAND make --trace
     INSTALL_COMMAND make install


Obtain PYTHON_VERSION in a way that works for both python2 and
python3 and which ignores trailing information after the triplet version
number.

Do not allow the user to fiddle with PYTHON_VERSION result variable.

svn path=/trunk/; revision=11091

--- cmake/modules/python.cmake
+++ cmake/modules/python.cmake
@@ -159,17 +159,17 @@
   # Get the Python version.
   execute_process(
     COMMAND
-    ${PYTHON_EXECUTABLE} -c "import sys; print sys.version.split()[0]"
-    OUTPUT_VARIABLE PYTHON_version_output
+    ${PYTHON_EXECUTABLE} -c "import sys; print('%s.%s.%s' % sys.version_info[0:3])"
+    OUTPUT_VARIABLE PYTHON_VERSION
     OUTPUT_STRIP_TRAILING_WHITESPACE
     )
-  SET(PYTHON_VERSION ${PYTHON_version_output} CACHE STRING "Python version")
+  message(STATUS "DEBUG: PYTHON_VERSION = ${PYTHON_VERSION}")

   # Enable plsmem if the Python and Swig versions support it
   transform_version(NUMERICAL_SWIG_MINIMUM_VERSION_FOR_PLSMEM "1.3.38")
   transform_version(NUMERICAL_PYTHON_MINIMUM_VERSION_FOR_PLSMEM "2.6.0")
   transform_version(NUMERICAL_SWIG_VERSION "${SWIG_VERSION}")
-  transform_version(NUMERICAL_PYTHON_VERSION "${PYTHON_version_output}")
+  transform_version(NUMERICAL_PYTHON_VERSION "${PYTHON_VERSION}")

   SET(PYTHON_HAVE_PYBUFFER OFF)
   IF(NUMERICAL_SWIG_MINIMUM_VERSION_FOR_PLSMEM LESS NUMERICAL_SWIG_VERSION)


fix Boost modules on Windows

fix Boost modules on Windows

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -24,14 +24,15 @@
 endif(Boost_SERIALIZATION_FOUND)

 # Required boost modules
-find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time iostreams)
-
+set(BOOST_REQUIRED_MODULES system filesystem thread date_time iostreams)
 # Starting with Boost 1.50, boost_thread depends on chrono. As this is not
 # taken care of automatically on Windows, we add an explicit dependency as a
 # workaround.
 if(WIN32 AND Boost_VERSION VERSION_GREATER "104900")
-  find_package(Boost 1.40.0 REQUIRED COMPONENTS chrono)
+  set(BOOST_REQUIRED_MODULES ${BOOST_REQUIRED_MODULES} chrono)
 endif(WIN32 AND Boost_VERSION VERSION_GREATER "104900")
+
+find_package(Boost 1.40.0 REQUIRED COMPONENTS ${BOOST_REQUIRED_MODULES})

 if(Boost_FOUND)
   set(BOOST_FOUND TRUE)


roll back to build universal binary on mac

--- cmake_modules/common.cmake
+++ cmake_modules/common.cmake
@@ -1,6 +1,6 @@
 SET(CMAKE_BUILD_TYPE Release) # Release | Debug
 SET(CMAKE_VERBOSE_MAKEFILE 0)
-#SET(CMAKE_OSX_ARCHITECTURES i386 x86_64)
+SET(CMAKE_OSX_ARCHITECTURES i386 x86_64)

 FIND_PATH(OpenCV_DIR OpenCVConfig.cmake
    "/opt/opencv/share/opencv"


Fix indentation

Fix indentation

--- contrib/cmake/vcpkg_extra_triplets/x64-linux-mega.cmake
+++ contrib/cmake/vcpkg_extra_triplets/x64-linux-mega.cmake
@@ -11,7 +11,7 @@
     set(VCPKG_LIBRARY_LINKAGE dynamic)
 else()
     # build this library statically (much simpler installation, debugging, etc)
-	set(VCPKG_LIBRARY_LINKAGE static)
+    set(VCPKG_LIBRARY_LINKAGE static)
 endif()

 set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS}")


Update Version.cmake to 2.3.1

Update Version.cmake to 2.3.1

In Releases on GitHub, latest release is v2.3.1, with commit ID 6f403d7, but the version in Version.cmake was still 2.2.0.
This commit and pull request just update the _VERSION_MINOR and _VERSION_PATCH to 3 and 1, respectively.

--- Version.cmake
+++ Version.cmake
@@ -9,8 +9,8 @@
 # Version info

 set(${PROJECT_NAME}_VERSION_MAJOR 2)
-set(${PROJECT_NAME}_VERSION_MINOR 2)
-set(${PROJECT_NAME}_VERSION_PATCH 0)
+set(${PROJECT_NAME}_VERSION_MINOR 3)
+set(${PROJECT_NAME}_VERSION_PATCH 1)
 #set(${PROJECT_NAME}_VERSION_TWEAK "")


Fix FindTUIO for module

Fix FindTUIO for module

--- FindTUIO.cmake
+++ FindTUIO.cmake
@@ -15,7 +15,7 @@
 # Include dir
 find_path(TUIO_INCLUDE_DIR
   NAMES TUIO/TuioClient.h
-  PATHS ${TUIO_PKGCONF_INCLUDE_DIRS} ${TUIO_ROOT} $ENV{TUIO_ROOT}
+  PATHS ${TUIO_PKGCONF_INCLUDE_DIRS} ${TUIO_ROOT}/include $ENV{TUIO_ROOT}/include
 )

 # also add the TUIO/ directory to the include path
@@ -27,7 +27,7 @@
 # Finally the library itself
 find_library(TUIO_LIBRARY
   NAMES TUIO
-  PATHS ${TUIO_PKGCONF_LIBRARY_DIRS} ${TUIO_ROOT} $ENV{TUIO_ROOT}
+  PATHS ${TUIO_PKGCONF_LIBRARY_DIRS} ${TUIO_ROOT}/lib $ENV{TUIO_ROOT}/lib
 )

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


CPP-775 - Add clang-format targets for Windows command line

--- cpp-driver/cmake/modules/ClangFormat.cmake
+++ cpp-driver/cmake/modules/ClangFormat.cmake
@@ -28,22 +28,82 @@

   set(CLANG_FORMAT_EXCLUDE_PATTERNS ${CLANG_FORMAT_EXCLUDE_PATTERNS} "/CMakeFiles/" "cmake" "/build/" "/vendor/" "/third_party/" "cassandra.h" "dse.h")

-  foreach (SOURCE_FILE ${CLANG_FORMAT_ALL_SOURCE_FILES})
-    foreach (EXCLUDE_PATTERN ${CLANG_FORMAT_EXCLUDE_PATTERNS})
+  foreach(SOURCE_FILE ${CLANG_FORMAT_ALL_SOURCE_FILES})
+    foreach(EXCLUDE_PATTERN ${CLANG_FORMAT_EXCLUDE_PATTERNS})
       string(FIND ${SOURCE_FILE} ${EXCLUDE_PATTERN} EXCLUDE_FOUND)
-      if (NOT ${EXCLUDE_FOUND} EQUAL -1)
+      if(NOT ${EXCLUDE_FOUND} EQUAL -1)
         list(REMOVE_ITEM CLANG_FORMAT_ALL_SOURCE_FILES ${SOURCE_FILE})
-      endif ()
-    endforeach ()
-  endforeach ()
+      endif()
+    endforeach()
+  endforeach()

-  add_custom_target(format
-    COMMENT "Format source files using clang-format"
-    COMMAND ${CLANG_FORMAT_EXE} -i -fallback-style=none -style=file ${CLANG_FORMAT_ALL_SOURCE_FILES})
+  if(WIN32)
+    set(CLANG_FORMAT_FILENAME "clang-format.files")
+    set(CLANG_FORMAT_ABSOLUTE_FILENAME "${CMAKE_BINARY_DIR}/${CLANG_FORMAT_FILENAME}")
+    if (EXISTS ${CLANG_FORMAT_ABSOLUTE_FILENAME})
+      file(REMOVE ${CLANG_FORMAT_ABSOLUTE_FILENAME})
+    endif()

-  add_custom_target(format-check
-    COMMENT "Verify source files formatting using clang-format"
-    COMMAND ! ${CLANG_FORMAT_EXE} -output-replacements-xml -fallback-style=none -style=file ${CLANG_FORMAT_ALL_SOURCE_FILES} | tee replacements.xml | grep -q "replacement offset")
+    set(COUNT 1)
+    file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} CMAKE_WINDOWS_BINARY_DIR)
+    foreach(SOURCE_FILE ${CLANG_FORMAT_ALL_SOURCE_FILES})
+      file(RELATIVE_PATH RELATIVE_SOURCE_FILE ${CMAKE_BINARY_DIR} ${SOURCE_FILE})
+      file(TO_NATIVE_PATH ${RELATIVE_SOURCE_FILE} NATIVE_RELATIVE_SOURCE_FILE)
+
+      if(COUNT EQUAL 50)
+        file(APPEND ${CLANG_FORMAT_ABSOLUTE_FILENAME} " ${NATIVE_RELATIVE_SOURCE_FILE}\n")
+        set(COUNT 1)
+      else()
+        file(APPEND ${CLANG_FORMAT_ABSOLUTE_FILENAME} " ${NATIVE_RELATIVE_SOURCE_FILE}")
+        MATH(EXPR COUNT "${COUNT} + 1")
+      endif()
+    endforeach()
+
+    file(TO_NATIVE_PATH ${CLANG_FORMAT_EXE} CLANG_FORMAT_EXE)
+    file(WRITE "${CMAKE_BINARY_DIR}/clang-format-windows.bat"
+               "@REM Generated clang-format script for Windows\r\n"
+               "@ECHO OFF\r\n"
+               "SETLOCAL ENABLEDELAYEDEXPANSION\r\n"
+               "SET IS_FAILED_CHECK=0\r\n"
+               "PUSHD ${CMAKE_WINDOWS_BINARY_DIR}>NUL\r\n"
+               "FOR /F \"TOKENS=*\" %%A IN (${CLANG_FORMAT_FILENAME}) do (\r\n"
+               "  IF %1 EQU 1 (\r\n"
+               "    \"${CLANG_FORMAT_EXE}\" -i -fallback-style=none -style=file %%A\r\n"
+               "    IF NOT !ERRORLEVEL! EQU 0 (\r\n"
+               "      SET IS_FAILED_CHECK=1\r\n"
+               "    )\r\n"
+               "  )\r\n"
+               "  IF %1 EQU 2 (\r\n"
+               "    \"${CLANG_FORMAT_EXE}\" -output-replacements-xml -fallback-style=none -style=file %%A 2>&1 | FINDSTR /C:\"replacement offset\">NUL\r\n"
+               "    IF !ERRORLEVEL! EQU 0 (\r\n"
+               "      SET IS_FAILED_CHECK=1\r\n"
+               "    )\r\n"
+               "  )\r\n"
+               ")\r\n"
+               "IF NOT !IS_FAILED_CHECK! EQU 0 (\r\n"
+               "  POPD\r\n"
+               "  EXIT /B 1\r\n"
+               ")\r\n"
+               "POPD\r\n"
+               "ENDLOCAL\r\n"
+               "EXIT /B 0\r\n")
+
+    add_custom_target(format
+      COMMENT "Format source files using clang-format"
+      COMMAND "${CMAKE_WINDOWS_BINARY_DIR}\\clang-format-windows.bat" 1)
+
+    add_custom_target(format-check
+      COMMENT "Verify source files formatting using clang-format"
+      COMMAND "${CMAKE_WINDOWS_BINARY_DIR}\\clang-format-windows.bat" 2)
+  else()
+    add_custom_target(format
+      COMMENT "Format source files using clang-format"
+      COMMAND ${CLANG_FORMAT_EXE} -i -fallback-style=none -style=file ${CLANG_FORMAT_ALL_SOURCE_FILES})
+
+    add_custom_target(format-check
+      COMMENT "Verify source files formatting using clang-format"
+      COMMAND ! ${CLANG_FORMAT_EXE} -output-replacements-xml -fallback-style=none -style=file ${CLANG_FORMAT_ALL_SOURCE_FILES} | tee replacements.xml | grep -q "replacement offset")
+  endif()
 else()
   message(STATUS "Unable to find clang-format. Not creating format targets.")
 endif()


Finish make Macports portfilename configurable

--- MacPorts.cmake
+++ MacPorts.cmake
@@ -37,7 +37,7 @@
 set(CPACK_MACPORTS_DEPENDS "${CPACK_MACPORTS_TEMP}")

 # Create and install Portfile
-set(PORTFILE_DIR "ports/${CPACK_MACPORTS_CATEGORY}/${CMAKE_PROJECT_NAME}")
+set(PORTFILE_DIR "ports/${CPACK_MACPORTS_CATEGORY}/${CMAKE_MACPORTS_NAME}")
 set(PORTFILE_GH_DIR "${CMAKE_SOURCE_DIR}/../${MACPORTS_DIR}")
 set(PORTFILE "${CMAKE_BINARY_DIR}/${PORTFILE_DIR}/Portfile")
 set(PORTFILE_GH "${PORTFILE_GH_DIR}/${PORTFILE_DIR}/Portfile")


RPM: make conference server to be restart on package update

--- build/rpm/flexisip.spec.cmake
+++ build/rpm/flexisip.spec.cmake
@@ -72,7 +72,7 @@
 %define ctest_name ctest
 %endif

-%global flexisip_services %(printf 'flexisip-proxy.service'; if [ @ENABLE_PRESENCE@ -eq 1 ]; then printf ' flexisip-presence.service'; fi; if [ @ENABLE_CONFERENCE@ -eq 1 ]; then printf ' flexisip-conference.service\n'; fi)
+%global flexisip_services %(printf 'flexisip-proxy.service'; if [ @ENABLE_PRESENCE@ -eq 1 ]; then printf ' flexisip-presence.service'; fi; if [ @ENABLE_CONFERENCE@ -eq 1 ]; then printf ' flexisip-conference.service'; fi)

 %description
 Extensible SIP proxy with media capabilities. Designed for robustness and easy of use.


[windows] add missing file ext

[windows] add missing file ext

--- ament_cmake_export_libraries/ament_cmake_export_libraries-extras.cmake
+++ ament_cmake_export_libraries/ament_cmake_export_libraries-extras.cmake
@@ -8,9 +8,9 @@

     find_package(ament_cmake_core REQUIRED)
     if(WIN32)
-      set(_ext .bat)
+      set(_ext .bat.in)
     else()
-      set(_ext .sh)
+      set(_ext .sh.in)
     endif()
     ament_environment_hooks(
       "${ament_cmake_export_libraries_DIR}/environment/library_path${_ext}")


Add flag in find_package to disable braindead CMake GUI recent projects

--- cmake/externals/configuration_steps/EP_Initialisation.cmake
+++ cmake/externals/configuration_steps/EP_Initialisation.cmake
@@ -39,6 +39,7 @@
   file(APPEND ${${PROJECT_NAME}_CONFIG_FILE}
     "find_package(${ep} REQUIRED
       PATHS ${${ep}_DIR}
+      NO_CMAKE_BUILDS_PATH
       )\n"
     )
   endif()
@@ -58,6 +59,7 @@
       "find_package(MEDINRIA REQUIRED
         PATHS \"${CMAKE_BINARY_DIR}/${ep}\"
         PATH_SUFFIXES install build
+        NO_CMAKE_BUILDS_PATH
         )\n"
       )
     else()
@@ -67,6 +69,7 @@
       "find_package(${ep} REQUIRED
         PATHS \"${CMAKE_BINARY_DIR}/${ep}\"
         PATH_SUFFIXES install build
+        NO_CMAKE_BUILDS_PATH
         )\n"
       )
     endif()


Disable -Werror on this branch

Disable -Werror on this branch

--- SetFlags.cmake
+++ SetFlags.cmake
@@ -182,7 +182,7 @@
 		string(REPLACE "-w" "" CMAKE_C_FLAGS_RELEASE   "${CMAKE_C_FLAGS_RELEASE}")
 		string(REPLACE "-w" "" CMAKE_CXX_FLAGS_DEBUG   "${CMAKE_CXX_FLAGS_DEBUG}")
 		string(REPLACE "-w" "" CMAKE_C_FLAGS_DEBUG     "${CMAKE_C_FLAGS_DEBUG}")
-		add_flags_cxx("-Wall -Wextra -Werror -Wno-error=unused-parameter")
+		add_flags_cxx("-Wall -Wextra")

 		# we support non-IEEE 754 fpus so can make no guarentees about error
 		add_flags_cxx("-ffast-math")


ENH: include curl cmake vars only if curl is activated

--- SuperBuild/CMake/External_otb.cmake
+++ SuperBuild/CMake/External_otb.cmake
@@ -108,8 +108,10 @@
 ADD_SUPERBUILD_CMAKE_VAR(LIBSVM_INCLUDE_DIR)
 ADD_SUPERBUILD_CMAKE_VAR(LIBSVM_LIBRARY)

+if(OTB_USE_CURL)
 ADD_SUPERBUILD_CMAKE_VAR(CURL_INCLUDE_DIR)
 ADD_SUPERBUILD_CMAKE_VAR(CURL_LIBRARY)
+endif()

 if(MSVC)
   ADD_SUPERBUILD_CMAKE_VAR(JPEG_LIBRARY)


make: add back _eblif targets

make: add back _eblif targets

Signed-off-by: Elms <93f558a3452e88ebb2324de5c5f48ac5d4ec1d53@freshred.net>

--- make/devices.cmake
+++ make/devices.cmake
@@ -707,7 +707,6 @@
   # Targets generated:
   #
   # * <name>_eblif - Generated eblif file.
-  # * <name>_synth - Alias of <name>_eblif.
   # * <name>_route - Generate place and routing synthesized design.
   # * <name>_bit - Generate output bitstream.
   #
@@ -847,6 +846,8 @@
       COMMAND ${CMAKE_COMMAND} -E copy ${SOURCE_FILES} ${OUT_EBLIF}
       )
   endif()
+
+  add_custom_target(${NAME}_eblif ALL DEPENDS ${OUT_EBLIF})

   # Generate routing and generate HLC.
   set(OUT_ROUTE ${OUT_LOCAL}/${TOP}.route)


cmake: fix dependencies in benchmarks

cmake: fix dependencies in benchmarks

with libswift the compiler invocation also depends on the core libraries, because the compiler executable needs them.

rdar://85911944

--- benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
+++ benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
@@ -708,7 +708,10 @@
   cmake_parse_arguments(SWIFT_BENCHMARK_COMPILE "" "PLATFORM" "" ${ARGN})

   if(NOT SWIFT_BENCHMARK_BUILT_STANDALONE)
-    set(stdlib_dependencies "swift-frontend")
+    set(stdlib_dependencies "swift-frontend" "swiftCore-${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}")
+    if(${SWIFT_HOST_VARIANT_SDK} IN_LIST SWIFT_DARWIN_PLATFORMS)
+      list(APPEND stdlib_dependencies "swiftDarwin-${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}")
+    endif()
     foreach(stdlib_dependency ${UNIVERSAL_LIBRARY_NAMES_${SWIFT_BENCHMARK_COMPILE_PLATFORM}})
       string(FIND "${stdlib_dependency}" "Unittest" find_output)
       if("${find_output}" STREQUAL "-1")


Removed useless cmake script whenever Libtorrent cannot be found

--- bindings/torrent/cmake/FindLibtorrentRasterbar.cmake
+++ bindings/torrent/cmake/FindLibtorrentRasterbar.cmake
@@ -44,109 +44,4 @@
 	else()
 		set(LibtorrentRasterbar_OPENSSL_ENABLED FALSE)
 	endif()
-else()
-	find_package(Threads QUIET REQUIRED)
-	find_package(PkgConfig QUIET)
-
-	if(PKG_CONFIG_FOUND)
-		pkg_check_modules(PC_LIBTORRENT_RASTERBAR QUIET libtorrent-rasterbar)
-	endif()
-
-	if(LibtorrentRasterbar_USE_STATIC_LIBS)
-		set(LibtorrentRasterbar_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
-		set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
-	endif()
-
-	if(PC_LIBTORRENT_RASTERBAR_FOUND)
-		set(LibtorrentRasterbar_DEFINITIONS ${PC_LIBTORRENT_RASTERBAR_CFLAGS_OTHER})
-	else()
-		if(LibtorrentRasterbar_CUSTOM_DEFINITIONS)
-			set(LibtorrentRasterbar_DEFINITIONS ${LibtorrentRasterbar_CUSTOM_DEFINITIONS})
-		else()
-			# Without pkg-config, we can't possibly figure out the correct build flags.
-			# libtorrent is very picky about those. Let's take a set of defaults and
-			# hope that they apply. If not, you the user are on your own.
-			set(LibtorrentRasterbar_DEFINITIONS
-				-DTORRENT_USE_OPENSSL
-				-DTORRENT_DISABLE_GEO_IP
-				-DBOOST_ASIO_ENABLE_CANCELIO
-				-D_FILE_OFFSET_BITS=64)
-		endif()
-
-		if(NOT LibtorrentRasterbar_USE_STATIC_LIBS)
-			list(APPEND LibtorrentRasterbar_DEFINITIONS
-				-DTORRENT_LINKING_SHARED
-				-DBOOST_SYSTEM_DYN_LINK)
-		endif()
-	endif()
-
-	if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
-		message(STATUS "libtorrent definitions: ${LibtorrentRasterbar_DEFINITIONS}")
-	endif()
-
-	find_path(LibtorrentRasterbar_INCLUDE_DIR libtorrent
-			HINTS ${PC_LIBTORRENT_RASTERBAR_INCLUDEDIR} ${PC_LIBTORRENT_RASTERBAR_INCLUDE_DIRS}
-			PATH_SUFFIXES libtorrent-rasterbar)
-
-	find_library(LibtorrentRasterbar_LIBRARY NAMES torrent-rasterbar
-				HINTS ${PC_LIBTORRENT_RASTERBAR_LIBDIR} ${PC_LIBTORRENT_RASTERBAR_LIBRARY_DIRS})
-
-	if(LibtorrentRasterbar_USE_STATIC_LIBS)
-		set(CMAKE_FIND_LIBRARY_SUFFIXES ${LibtorrentRasterbar_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
-	endif()
-
-	set(LibtorrentRasterbar_LIBRARIES ${LibtorrentRasterbar_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
-	set(LibtorrentRasterbar_INCLUDE_DIRS ${LibtorrentRasterbar_INCLUDE_DIR})
-
-	if(NOT Boost_SYSTEM_FOUND)
-		find_package(Boost QUIET REQUIRED COMPONENTS system)
-		set(LibtorrentRasterbar_LIBRARIES
-			${LibtorrentRasterbar_LIBRARIES} ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
-		set(LibtorrentRasterbar_INCLUDE_DIRS
-			${LibtorrentRasterbar_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
-	endif()
-
-	list(FIND LibtorrentRasterbar_DEFINITIONS -DTORRENT_USE_OPENSSL LibtorrentRasterbar_ENCRYPTION_INDEX)
-	if(LibtorrentRasterbar_ENCRYPTION_INDEX GREATER -1)
-		find_package(OpenSSL QUIET REQUIRED)
-		set(LibtorrentRasterbar_LIBRARIES ${LibtorrentRasterbar_LIBRARIES} ${OPENSSL_LIBRARIES})
-		set(LibtorrentRasterbar_INCLUDE_DIRS ${LibtorrentRasterbar_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR})
-		set(LibtorrentRasterbar_OPENSSL_ENABLED ON)
-	endif()
-
-	include(FindPackageHandleStandardArgs)
-	# handle the QUIETLY and REQUIRED arguments and set LibtorrentRasterbar_FOUND to TRUE
-	# if all listed variables are TRUE
-	find_package_handle_standard_args(LibtorrentRasterbar DEFAULT_MSG
-									LibtorrentRasterbar_LIBRARY
-									LibtorrentRasterbar_INCLUDE_DIR
-									Boost_SYSTEM_FOUND
-	)
-
-	mark_as_advanced(LibtorrentRasterbar_INCLUDE_DIR LibtorrentRasterbar_LIBRARY
-		LibtorrentRasterbar_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES
-		LibtorrentRasterbar_ENCRYPTION_INDEX)
-
-	if (LibtorrentRasterbar_FOUND AND NOT TARGET LibtorrentRasterbar::torrent-rasterbar)
-		add_library(LibtorrentRasterbar::torrent-rasterbar SHARED IMPORTED)
-
-		# LibtorrentRasterbar_DEFINITIONS var contains a mix of -D, -f, and possible -std options
-		# let's split them into definitions and options (that are not definitions)
-		set(LibtorrentRasterbar_defines "${LibtorrentRasterbar_DEFINITIONS}")
-		set(LibtorrentRasterbar_options "${LibtorrentRasterbar_DEFINITIONS}")
-		list(FILTER LibtorrentRasterbar_defines INCLUDE REGEX "(^|;)-D.+")
-		list(FILTER LibtorrentRasterbar_options EXCLUDE REGEX "(^|;)-D.+")
-		# remove '-D' from LibtorrentRasterbar_defines
-		string(REGEX REPLACE "(^|;)(-D)" "\\1" LibtorrentRasterbar_defines "${LibtorrentRasterbar_defines}")
-
-		set_target_properties(LibtorrentRasterbar::torrent-rasterbar PROPERTIES
-			IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
-			IMPORTED_LOCATION "${LibtorrentRasterbar_LIBRARY}"
-			INTERFACE_INCLUDE_DIRECTORIES "${LibtorrentRasterbar_INCLUDE_DIRS}"
-			INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${LibtorrentRasterbar_INCLUDE_DIRS}"
-			INTERFACE_LINK_LIBRARIES "${LibtorrentRasterbar_LIBRARIES}"
-			INTERFACE_COMPILE_DEFINITIONS "${LibtorrentRasterbar_defines}"
-			INTERFACE_COMPILE_OPTIONS "${LibtorrentRasterbar_options}"
-		)
-	endif()
 endif()


Use HomeBrew Python if even if framework selected.

--- build/FindPythonLibrary.cmake
+++ build/FindPythonLibrary.cmake
@@ -116,7 +116,7 @@
           set(PYTHON_DEBUG_LIBRARY "")
         endif("${PYTHON_INCLUDE_PATH}" MATCHES "Python\\.framework")
         if(NOT PYTHON_LIBRARY)
-          set (PYTHON_LIBRARY "-framework Python" CACHE FILEPATH "Python Framework" FORCE)
+          set (PYTHON_LIBRARY "-F/usr/local/Frameworks -framework Python" CACHE FILEPATH "Python Framework" FORCE)
         endif(NOT PYTHON_LIBRARY)
         set(PYTHONLIBRARY_FOUND TRUE)
       endif(Python_FRAMEWORKS)


RPM package: prevent header files and other from being mark as executable by rpmbuild script

--- build/rpm/flexisip.spec.cmake
+++ build/rpm/flexisip.spec.cmake
@@ -167,7 +167,7 @@
 # Mark all libraries as executable because CMake doesn't on
 # Debian to be complient with Debian policy. But rpmbuild
 # won't strip libraries that aren't marked as executable.
-chmod +x `find %{buildroot} *.so.*`
+find %{buildroot} -type f -name '*.so.*' -exec chmod -v +x {} \;

 #
 # Shouldn't be the role of cmake to install all the following stuff ?
@@ -218,7 +218,7 @@
 %{_bindir}/*
 %{_libdir}/*.so
 %{_datarootdir}/*
-%dir %{_includedir}/flexisip
+#%dir %{_includedir}/flexisip
 %{_includedir}/flexisip/*.h
 %{_includedir}/flexisip/*.hh
 %{_includedir}/flexisip/auth/*.hh


Require HEXAGON_ARM_SYSROOT for arm-linux-gnueabihf

The Toolchain-arm-linux-gnueabihf.cmake is currently used for
the SnapdragonFlight Apps processor.

The sysroot is required for cross building for Ubuntu 14.04 armhf.

Signed-off-by: Mark Charlebois <f1891e7fc976ae1bd489627e2954fb730751d728@gmail.com>

--- cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake
+++ cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake
@@ -75,11 +75,7 @@
 	endif()
 endforeach()

-<<<<<<< ce0aecb062077c0c99423a12eea9ccb36adbd065
 set(C_FLAGS "--sysroot=${HEXAGON_ARM_SYSROOT}")
-=======
-set(C_FLAGS "--sysroot=${HEXAGON_SDK_ROOT}/sysroot")
->>>>>>> Rebase changes on upstream master
 set(LINKER_FLAGS "-Wl,-gc-sections")
 set(CMAKE_EXE_LINKER_FLAGS ${LINKER_FLAGS})
 set(CMAKE_C_FLAGS ${C_FLAGS})


Fix CC_VERSION detection for clang-7.

Fix CC_VERSION detection for clang-7.

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -67,6 +67,9 @@
                     set(CC_NAME "clang")
                     exec_program($ENV{CC} ARGS --version OUTPUT_VARIABLE CC_VERSION_VERBOSE)
                     string(REGEX REPLACE ".*clang version ([0-9]+\\.[0-9]+).*" "\\1" CC_VERSION ${CC_VERSION_VERBOSE})
+                    if(CC_VERSION VERSION_GREATER 7.0 OR CC_VERSION VERSION_EQUAL 7.0)
+                        string(SUBSTRING "${CC_VERSION}" 0 1 CC_VERSION)
+                    endif()
                 endif()
                 exec_program($ENV{CC} ARGS -dumpmachine OUTPUT_VARIABLE CC_ARCH)
                 set(CC_PLATFORM "${CC_ARCH}")


Point FindPythonLibrary in the right direction on Windows

--- cmake/FindPythonLibrary.cmake
+++ cmake/FindPythonLibrary.cmake
@@ -68,7 +68,7 @@
       if(WIN32)
           STRING(REPLACE "\\" "/" PYTHON_SITE_PACKAGES_DIR ${PYTHON_SITE_PACKAGES_DIR})
       endif(WIN32)
-      FIND_LIBRARY(PYTHON_LIBRARY NAMES ${PYTHON_LIBRARY_NAMES})
+      FIND_LIBRARY(PYTHON_LIBRARY NAMES ${PYTHON_LIBRARY_NAMES} HINTS ${PYTHON_INCLUDE_PATH}/../libs)
       set(PYTHON_INCLUDE_PATH ${PYTHON_INCLUDE_PATH} CACHE FILEPATH "Directory holding the python.h include file" FORCE)
       set(PYTHONLIBRARY_FOUND TRUE)
     endif(python_config)


Add LLVM_BIN_DIR to help find llvm-cov and llvm-profdata in non-standard locations.

--- cmake/environmentchecks.cmake
+++ cmake/environmentchecks.cmake
@@ -23,8 +23,8 @@
 find_program(FIND_EXE NAMES ${PREFERRED_FIND_NAMES} find)
 find_program(GCOV_EXE NAMES ${PREFERRED_GCOV_NAMES} gcov)
 find_program(GIT_EXE NAMES ${PRFERRED_GIT_NAMES} git)
-find_program(LLVM_PROFDATA_EXE NAMES ${PREFERRED_LLVM_PROFDATA_NAMES} llvm-profdata HINTS /Library/Developer/CommandLineTools/usr/bin/)
-find_program(LLVM_COV_EXE NAMES ${PREFERRED_LLVM_COV_NAMES} llvm-cov HINTS /Library/Developer/CommandLineTools/usr/bin/)
+find_program(LLVM_COV_EXE NAMES ${PREFERRED_LLVM_COV_NAMES} llvm-cov HINTS ${LLVM_BIN_DIR} /Library/Developer/CommandLineTools/usr/bin/)
+find_program(LLVM_PROFDATA_EXE NAMES ${PREFERRED_LLVM_PROFDATA_NAMES} llvm-profdata HINTS ${LLVM_BIN_DIR} /Library/Developer/CommandLineTools/usr/bin/)
 find_program(VALGRIND_EXE NAMES ${PREFERRED_VALGRIND_NAMES} valgrind)

 find_package(Doxygen)
@@ -101,8 +101,8 @@
   GCOV_EXE
   GIT_EXE
   LLVM_COV_EXE
+  LLVM_COVERAGE_COMPILER_FLAGS_OK
   LLVM_PROFDATA_EXE
-  LLVM_COVERAGE_COMPILER_FLAGS_OK
   SWIG_EXECUTABLE
   VALGRIND_EXE
 )


CMake: only run the ClangFormat test if we have version 11+ of ClangFormat.

--- cmake/environmentchecks.cmake
+++ cmake/environmentchecks.cmake
@@ -121,7 +121,17 @@
 endif()

 if(CLANG_FORMAT_EXE AND GIT_EXE)
-  set(CLANG_FORMAT_TESTING_AVAILABLE TRUE CACHE INTERNAL "Executables required to run the ClangFormat test are available.")
+  set(CLANG_FORMAT_VERSION_NEEDED 11)
+  execute_process(COMMAND ${CLANG_FORMAT_EXE} -version
+                  OUTPUT_VARIABLE CLANG_FORMAT_VERSION
+                  ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+  string(REGEX REPLACE "clang-format version ([.0-9]+).*" "\\1" CLANG_FORMAT_VERSION "${CLANG_FORMAT_VERSION}")
+
+  if(CLANG_FORMAT_VERSION VERSION_LESS CLANG_FORMAT_VERSION_NEEDED)
+    message(STATUS "ClangFormat ${CLANG_FORMAT_VERSION} was found, but version ${CLANG_FORMAT_VERSION_NEEDED}+ is needed to run the ClangFormat test")
+  else()
+    set(CLANG_FORMAT_TESTING_AVAILABLE TRUE CACHE INTERNAL "Executables required to run the ClangFormat test are available.")
+  endif()
 endif()

 if(CLANG_TIDY_EXE)


Revert "Test generation of binary release with CPack"

This reverts commit af4c79b9cf3b45daa20ea2f5c6ee3bec228cff8d.
We already have this covered in ROOT-release-* (to which I just added a -master version).
And this takes aaaages on the 32bit node, timing out.

--- cmake/modules/RootCPack.cmake
+++ cmake/modules/RootCPack.cmake
@@ -155,4 +155,4 @@
     DESCRIPTION "These are needed to do any test and tutorial"
      INSTALL_TYPES full developer)

-add_test(NAME package COMMAND ${CMAKE_CPACK_COMMAND})
+


Help Cmake find OpenNI2 include path

Help Cmake find OpenNI2 include path

When compiling with OpenNI2 flag active, CMake will not be able to find OpenNI.h due to the environment path not set in OpenCVFindOpenNI2.cmake. This PR rectifies this issue.

--- cmake/OpenCVFindOpenNI2.cmake
+++ cmake/OpenCVFindOpenNI2.cmake
@@ -14,7 +14,7 @@

 if(WIN32)
     if(NOT (MSVC64 OR MINGW64))
-        find_file(OPENNI2_INCLUDES "OpenNI.h" PATHS "$ENV{OPEN_NI_INSTALL_PATH}Include" DOC "OpenNI2 c++ interface header")
+        find_file(OPENNI2_INCLUDES "OpenNI.h" PATHS $ENV{OPENNI2_INCLUDE} "$ENV{OPEN_NI_INSTALL_PATH}Include" DOC "OpenNI2 c++ interface header")
         find_library(OPENNI2_LIBRARY "OpenNI2" PATHS $ENV{OPENNI2_LIB} DOC "OpenNI2 library")
     else()
         find_file(OPENNI2_INCLUDES "OpenNI.h" PATHS $ENV{OPENNI2_INCLUDE64} "$ENV{OPEN_NI_INSTALL_PATH64}Include" DOC "OpenNI2 c++ interface header")


focing -m32

focing -m32

--- cmake/Toolchain-gcc-m32.cmake
+++ cmake/Toolchain-gcc-m32.cmake
@@ -2,10 +2,8 @@
 set(CMAKE_SYSTEM_NAME Linux)

 # which compilers to use for C and C++
-set(CMAKE_C_COMPILER gcc)
-set(CMAKE_C_FLAGS -m32)
-set(CMAKE_CXX_COMPILER g++)
-set(CMAKE_CXX_FLAGS -m32)
+set(CMAKE_C_COMPILER gcc -m32)
+set(CMAKE_CXX_COMPILER g++ -m32)

 # here is the target environment located
 set(CMAKE_FIND_ROOT_PATH   /usr/lib32 )


change: replacing CMAKE_CXX_FLAGS variable with proper cmake mechanism for selecting buildtype

--- cmake/clang/build-types.cmake
+++ cmake/clang/build-types.cmake
@@ -5,17 +5,14 @@
 set(CLANG_BUILD_TYPES_INCLUDED true)
 #######################

-set(BUILD_TYPE "Debug" CACHE STRING "Build type, choose from Debug. Release and MinRelease")
+if(NOT CMAKE_BUILD_TYPE)
+    set(CMAKE_BUILD_TYPE Debug)
+endif(NOT CMAKE_BUILD_TYPE)

-if(BUILD_TYPE STREQUAL "Debug")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb -g -gdwarf-2")
-elseif(BUILD_TYPE STREQUAL "Release")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
-elseif(BUILD_TYPE STREQUAL "MinRelease")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os -fdata-sections -ffunction-sections")
-    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
-else()
-    message(FATAL_ERROR "Wrong BUILD_TYPE. Should be Debug, Release or MinRelease.")
-endif()
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror")
+set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb -g")
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG")
+set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -DNDEBUG")
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -ggdb -g")

-message(STATUS "Build type is ${BUILD_TYPE}")
+message(STATUS "Build type is set to: ${CMAKE_BUILD_TYPE}")


Tentative fix submoduleOpenMesh.cmake for windows - 2

--- cmake/submoduleOpenMesh.cmake
+++ cmake/submoduleOpenMesh.cmake
@@ -10,25 +10,8 @@
     set( OPENMESH_DLL "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/libOpenMeshCore.dll")
     set( OPENMESH_LIBRARIES "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/lib/libOpenMeshCore.dll.a")
 elseif( MSVC )
-    # in order to prevent DLL hell, each of the DLLs have to be suffixed with the major version and msvc prefix
-    if( MSVC70 OR MSVC71 )
-        set(MSVC_PREFIX "vc70")
-    elseif( MSVC80 )
-        set(MSVC_PREFIX "vc80")
-    elseif( MSVC90 )
-        set(MSVC_PREFIX "vc90")
-    elseif( MSVC10 )
-        set(MSVC_PREFIX "vc100")
-    elseif( MSVC11 )
-        set(MSVC_PREFIX "vc110")
-    elseif( MSVC12 )
-        set(MSVC_PREFIX "vc120")
-    else()
-        set(MSVC_PREFIX "vc140")
-    endif()
-    set(OPENMESH_DLL "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/lib/libOpenMeshCore.dll")
-    set(OPENMESH_LIBRARIES optimized "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/lib/openmesh-${MSVC_PREFIX}-mt.lib")
-
+    set(OPENMESH_DLL "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/lib/OpenMeshCore.dll")
+    set(OPENMESH_LIBRARIES "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/lib/OpenMeshCore.lib")
 endif()

@@ -46,7 +29,7 @@

         # set the installatin to installed/openmesh
         INSTALL_DIR "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}"
-        BUILD_BYPRODUCTS "${OPENMESH_LIBRARIES} ${OPENMESH_DLL}"
+        BUILD_BYPRODUCTS "${OPENMESH_LIBRARIES}"
         CMAKE_GENERATOR ${CMAKE_GENERATOR}
         CMAKE_GENERATOR_TOOLSET ${CMAKE_GENERATOR_TOOLSET}
         CMAKE_ARGS


CMake: Clean remnant of experiment with ARM toolchain

The removed code was testing that compiler flags could be added
to the assembler using generator expression. It was not to be
committed.

--- tools/cmake/toolchains/ARM.cmake
+++ tools/cmake/toolchains/ARM.cmake
@@ -8,16 +8,9 @@
 set(ARM_ELF2BIN "fromelf")
 set_property(GLOBAL PROPERTY ELF2BIN ${ARM_ELF2BIN})

-option(MBEDIDE "Use Arm compiler from Mbed Studio" OFF)
-if(MBEDIDE)
-    set_property(GLOBAL PROPERTY MBED_STUDIO_ARM_COMPILER "--ide=mbed")
-endif()
-
 # Sets toolchain options
 function(mbed_set_toolchain_options target)
-    get_property(mbed_studio_arm_compiler GLOBAL PROPERTY MBED_STUDIO_ARM_COMPILER)
     list(APPEND common_options
-        "${mbed_studio_arm_compiler}"
         "-c"
         "--target=arm-arm-none-eabi"
         "-mthumb"
@@ -44,11 +37,9 @@
     target_compile_options(${target}
         INTERFACE
             $<$<COMPILE_LANGUAGE:ASM>:--target=arm-arm-none-eabi -masm=auto>
-            $<$<COMPILE_LANGUAGE:ASM>:${MBED_STUDIO_ARM_COMPILER}>
     )

     list(APPEND link_options
-        "${MBED_STUDIO_ARM_COMPILER}"
         "--map"
     )


Fix for erroring out if Boost.Compute not found for OpenCL

--- common/FindBoostCompute.cmake
+++ common/FindBoostCompute.cmake
@@ -1,5 +1,6 @@
 # Downloads and builds the Boost Compute library from github.com
 # Defines the following variables
+# * BoostCompute_FOUND           Flag for Boost Compute
 # * BoostCompute_INCLUDE_DIR     Location of the Boost Compute headers

 # Look a directory above for the Boost Compute folder
@@ -8,7 +9,8 @@
     PATH_SUFFIXES   compute BoostCompute
     DOC             "Location of the Boost Compute source directory"
     PATHS           ${CMAKE_SOURCE_DIR}/..
-                    ${CMAKE_SOURCE_DIR}/../..)
+                    ${CMAKE_SOURCE_DIR}/../..
+                    /usr/local)

 FIND_PATH( BoostCompute_INCLUDE_DIR
     NAMES   boost/compute.hpp
@@ -21,8 +23,11 @@
     SET( BoostCompute_FOUND OFF CACHE BOOL "BoostCompute Found" )
 ENDIF()

+IF(NOT BoostCompute_FOUND)
+    MESSAGE(FATAL_ERROR, "Boost.Compute not found! Clone Boost.Compute from https://github.com/kylelutz/compute.git")
+ENDIF(NOT BoostCompute_FOUND)

 MARK_AS_ADVANCED(
     BoostCompute_FOUND
     BoostCompute_INCLUDE_DIR
-	)
+    )


#244 skip jemalloc build if it is not in the third party directory

--- cmake_modules/TokuThirdParty.cmake
+++ cmake_modules/TokuThirdParty.cmake
@@ -3,35 +3,34 @@
 if (NOT DEFINED LIBJEMALLOC)
     ## add jemalloc with an external project
     set(JEMALLOC_SOURCE_DIR "${TokuDB_SOURCE_DIR}/third_party/jemalloc" CACHE FILEPATH "Where to find jemalloc sources.")
-    if (NOT EXISTS "${JEMALLOC_SOURCE_DIR}/configure")
-        message(FATAL_ERROR "Can't find jemalloc sources.  Please check them out to ${JEMALLOC_SOURCE_DIR} or modify JEMALLOC_SOURCE_DIR.")
-    endif ()
-    set(jemalloc_configure_opts "CC=${CMAKE_C_COMPILER}" "--with-jemalloc-prefix=" "--with-private-namespace=tokudb_jemalloc_internal_" "--enable-cc-silence")
-    option(JEMALLOC_DEBUG "Build jemalloc with --enable-debug." OFF)
-    if (JEMALLOC_DEBUG)
-        list(APPEND jemalloc_configure_opts --enable-debug)
-    endif ()
-    ExternalProject_Add(build_jemalloc
-        PREFIX jemalloc
-        SOURCE_DIR "${JEMALLOC_SOURCE_DIR}"
-        CONFIGURE_COMMAND
-            "${JEMALLOC_SOURCE_DIR}/configure" ${jemalloc_configure_opts}
-            "--prefix=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc"
-    )
+    if (EXISTS "${JEMALLOC_SOURCE_DIR}/configure")
+        set(jemalloc_configure_opts "CC=${CMAKE_C_COMPILER}" "--with-jemalloc-prefix=" "--with-private-namespace=tokudb_jemalloc_internal_" "--enable-cc-silence")
+        option(JEMALLOC_DEBUG "Build jemalloc with --enable-debug." OFF)
+        if (JEMALLOC_DEBUG)
+            list(APPEND jemalloc_configure_opts --enable-debug)
+        endif ()
+        ExternalProject_Add(build_jemalloc
+            PREFIX jemalloc
+            SOURCE_DIR "${JEMALLOC_SOURCE_DIR}"
+            CONFIGURE_COMMAND
+                "${JEMALLOC_SOURCE_DIR}/configure" ${jemalloc_configure_opts}
+                "--prefix=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc"
+        )

-    add_library(jemalloc STATIC IMPORTED GLOBAL)
-    set_target_properties(jemalloc PROPERTIES IMPORTED_LOCATION
-        "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib/libjemalloc_pic.a")
-    add_dependencies(jemalloc build_jemalloc)
-    add_library(jemalloc_nopic STATIC IMPORTED GLOBAL)
-    set_target_properties(jemalloc_nopic PROPERTIES IMPORTED_LOCATION
-        "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib/libjemalloc.a")
-    add_dependencies(jemalloc_nopic build_jemalloc)
+        add_library(jemalloc STATIC IMPORTED GLOBAL)
+        set_target_properties(jemalloc PROPERTIES IMPORTED_LOCATION
+            "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib/libjemalloc_pic.a")
+        add_dependencies(jemalloc build_jemalloc)
+        add_library(jemalloc_nopic STATIC IMPORTED GLOBAL)
+        set_target_properties(jemalloc_nopic PROPERTIES IMPORTED_LOCATION
+            "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib/libjemalloc.a")
+        add_dependencies(jemalloc_nopic build_jemalloc)

-    # detect when we are being built as a subproject
-    if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
-        install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib" DESTINATION .
-          COMPONENT tokukv_libs_extra)
+        # detect when we are being built as a subproject
+        if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
+            install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib" DESTINATION .
+                COMPONENT tokukv_libs_extra)
+        endif ()
     endif ()
 endif ()


ARC: MWDT: generate access to builtin funcs only if ARCMWDT_LIBC is used

The MWDT compiler can replace some code with call to builtin
functions. We can't rely on these functions presence if we
don't use MWDT libc.

Signed-off-by: Eugeniy Paltsev <ec089b543c2604b626d7ce60c03e4d074ed102c7@synopsys.com>
Signed-off-by: Evgeniy Paltsev <7de4ab8b01334d64e4e84734c688a8a936513edc@gmail.com>

--- cmake/compiler/arcmwdt/target.cmake
+++ cmake/compiler/arcmwdt/target.cmake
@@ -39,3 +39,11 @@
 # common compile options, no copyright msg, little-endian, no small data,
 # no MWDT stack checking
 list(APPEND TOOLCHAIN_C_FLAGS -Hnocopyr -HL -Hnosdata -Hoff=Stackcheck_alloca)
+
+# The MWDT compiler can replace some code with call to builtin functions.
+# We can't rely on these functions presence if we don't use MWDT libc.
+# NOTE: the option name '-fno-builtin' is misleading a bit - we still can
+# manually call __builtin_** functions even if we specify it.
+if(NOT CONFIG_ARCMWDT_LIBC)
+  list(APPEND TOOLCHAIN_C_FLAGS -fno-builtin)
+endif()


Remove DEPENDENT from hunter_download [skip ci]

--- cmake/modules/hunter_download.cmake
+++ cmake/modules/hunter_download.cmake
@@ -14,10 +14,9 @@
       PACKAGE_NAME # Foo
       PACKAGE_COMPONENT
   )
-  set(h_multiple_values DEPENDS) # Boo

   cmake_parse_arguments(
-      HUNTER "" "${h_one_value}" "${h_multiple_values}" ${ARGV}
+      HUNTER "" "${h_one_value}" "" ${ARGV}
   )

   if(h_UNPARSED_ARGUMENTS)
@@ -71,24 +70,12 @@
   # create temp toolchain file to set environment variables
   # and include real toolchain
   set(toolchain_wrapper "${h_work_dir}/toolchain.cmake")
-  file(WRITE "${toolchain_wrapper}" "###\n") # file must not be empty
-
-  list(APPEND h_DEPENDS Hunter) # pass HUNTER_ROOT to all packages
-  foreach(x ${h_DEPENDS})
-    string(TOUPPER "${x}" x_name)
-    set(x_name "${x_name}_ROOT")
-    if(NOT ${x_name})
-      hunter_fatal_error(
-          "Can't forward empty variable ${x_name} (need include?)"
-      )
-    endif()
-
-    # forward depends '<NAME>_ROOT' cmake variables
-    file(APPEND "${toolchain_wrapper}" "set(${x_name} \"${${x_name}}\")\n")
-
-    # forward depends '<NAME>_ROOT' environment variables
-    file(APPEND "${toolchain_wrapper}" "set(ENV{${x_name}} \"${${x_name}}\")\n")
-  endforeach()
+
+  # pass HUNTER_ROOT to all packages
+  file(APPEND "${toolchain_wrapper}" "set(HUNTER_ROOT \"${HUNTER_ROOT}\")\n")
+  file(
+      APPEND "${toolchain_wrapper}" "set(ENV{HUNTER_ROOT} \"${HUNTER_ROOT}\")\n"
+  )

   # support for toolchain file forwarding
   if(CMAKE_TOOLCHAIN_FILE)


Find our dependencies in config file

Find our dependencies in config file

--- cmake/osvrRenderManagerConfig.cmake
+++ cmake/osvrRenderManagerConfig.cmake
@@ -6,7 +6,32 @@
 #find_dependency(GLEW)

 # The actual exported targets
+set(OSVRRM_PREV_CMAKE_MODULES ${CMAKE_MODULE_PATH})
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}" ${CMAKE_MODULE_PATH})
+include(osvrStashMapConfig)
+include(CMakeFindDependencyMacro)
+set(OSVRRM_NEED_SDL2 @OSVRRM_NEED_SDL2@)
+if(OSVRRM_NEED_SDL2)
+	find_dependency(SDL2)
+endif()
+set(OSVRRM_NEED_GLEW @OSVRRM_NEED_GLEW@)
+if(OSVRRM_NEED_GLEW)
+	find_dependency(GLEW)
+endif()
+
+# Set up config mapping
+osvr_stash_common_map_config()
+
+find_dependency(osvr)
+
+# restore module path
+set(CMAKE_MODULE_PATH ${OSVRRM_PREV_CMAKE_MODULES})
+
+# The actual exported targets - config mapping still applied.
 include("${CMAKE_CURRENT_LIST_DIR}/osvrRenderManagerTargets.cmake")
+
+# Undo our changes for later consumers
+osvr_unstash_common_map_config()

 # Fix up imported targets to add deps: these files will only exist in install trees.
 include("${CMAKE_CURRENT_LIST_DIR}/osvrRenderManagerConfigInstalledBoost.cmake" OPTIONAL)


Fixed building examples when some of the libraries are not available.

--- cmake_modules/CMakeRunTargets.cmake
+++ cmake_modules/CMakeRunTargets.cmake
@@ -44,8 +44,10 @@
 message("Using allocore headers from: ${ALLOCORE_DEP_INCLUDE_DIRS}")

 if(BUILDING_Gamma)
-  get_target_property(GAMMA_LIBRARY Gamma LOCATION)
-  add_dependencies(${APP_NAME} Gamma)
+    get_target_property(GAMMA_LIBRARY Gamma LOCATION)
+    add_dependencies(${APP_NAME} Gamma)
+    target_link_libraries(${APP_NAME} ${GAMMA_LIBRARY})
+    include_directories(${GAMMA_INCLUDE_DIR})
 else()
   if(NOT GAMMA_FOUND)
     set(GAMMA_LIBRARY "")
@@ -55,8 +57,10 @@
 endif(BUILDING_Gamma)

 if(BUILDING_GLV)
-  get_target_property(GLV_LIBRARY GLV LOCATION)
-  add_dependencies(${APP_NAME} GLV)
+    get_target_property(GLV_LIBRARY GLV LOCATION)
+    add_dependencies(${APP_NAME} GLV)
+    target_link_libraries(${APP_NAME} ${GLV_LIBRARY})
+    include_directories(${GLV_INCLUDE_DIR})
 else()
   if(NOT GLV_FOUND)
     set(GLV_LIBRARY "")
@@ -66,10 +70,12 @@
 endif(BUILDING_GLV)

 if(TARGET alloutil${DEBUG_SUFFIX})
-  get_target_property(ALLOUTIL_LIBRARY alloutil${DEBUG_SUFFIX} LOCATION)
-#  get_target_property(ALLOUTIL_DEP_INCLUDE_DIR alloutil${DEBUG_SUFFIX} ALLOUTIL_DEP_INCLUDE_DIR)
-#  get_target_property(ALLOUTIL_LINK_LIBRARIES alloutil${DEBUG_SUFFIX} ALLOUTIL_LINK_LIBRARIES)
-  add_dependencies(${APP_NAME} alloutil${DEBUG_SUFFIX})
+    get_target_property(ALLOUTIL_LIBRARY alloutil${DEBUG_SUFFIX} LOCATION)
+    get_target_property(ALLOUTIL_DEP_INCLUDE_DIR alloutil${DEBUG_SUFFIX} ALLOUTIL_DEP_INCLUDE_DIR)
+    get_target_property(ALLOUTIL_LINK_LIBRARIES alloutil${DEBUG_SUFFIX} ALLOUTIL_LINK_LIBRARIES)
+    add_dependencies(${APP_NAME} alloutil${DEBUG_SUFFIX})
+    target_link_libraries(${APP_NAME} ${ALLOUTIL_LIBRARY} ${ALLOUTIL_LINK_LIBRARIES})
+    include_directories(${ALLOUTIL_DEP_INCLUDE_DIR})
 else()
   if(NOT ALLOUTIL_FOUND)
     set(ALLOUTIL_LIBRARY "")
@@ -79,10 +85,12 @@
 endif(TARGET alloutil${DEBUG_SUFFIX})

 if(TARGET alloGLV${DEBUG_SUFFIX})
-  get_target_property(ALLOGLV_LIBRARY alloGLV${DEBUG_SUFFIX} LOCATION)
-  get_target_property(ALLOGLV_INCLUDE_DIR alloGLV${DEBUG_SUFFIX} ALLOGLV_INCLUDE_DIR)
-  get_target_property(ALLOGLV_LINK_LIBRARIES "alloGLV${DEBUG_SUFFIX}" ALLOGLV_LINK_LIBRARIES)
-  add_dependencies(${APP_NAME} alloGLV${DEBUG_SUFFIX})
+    get_target_property(ALLOGLV_LIBRARY alloGLV${DEBUG_SUFFIX} LOCATION)
+    get_target_property(ALLOGLV_INCLUDE_DIR alloGLV${DEBUG_SUFFIX} ALLOGLV_INCLUDE_DIR)
+    get_target_property(ALLOGLV_LINK_LIBRARIES "alloGLV${DEBUG_SUFFIX}" ALLOGLV_LINK_LIBRARIES)
+    add_dependencies(${APP_NAME} alloGLV${DEBUG_SUFFIX})
+    target_link_libraries(${APP_NAME} ${ALLOGLV_LIBRARY} ${ALLOGLV_LINK_LIBRARIES})
+    include_directories(${ALLOGLV_INCLUDE_DIR})
 else()
   if(NOT ALLOGLV_FOUND)
     set(ALLOGLV_LIBRARY "")
@@ -96,19 +104,11 @@

 #file(GLOB ALLOPROJECT_APP_SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${BUILD_APP_DIR}/*.*)

-include_directories(${ALLOCORE_DEP_INCLUDE_DIRS}
-  ${ALLOUTIL_DEP_INCLUDE_DIR}
-  ${ALLOGLV_INCLUDE_DIR}
-  ${GLV_INCLUDE_DIR}
-  ${ALLOVSR_INCLUDE_DIR}
-  ${GAMMA_INCLUDE_DIR} )
+include_directories(${ALLOCORE_DEP_INCLUDE_DIRS})
 #    message("Gamma : ${GAMMA_INCLUDE_DIRs}")
 target_link_libraries(${APP_NAME}
   ${ALLOCORE_LIBRARY}
-  ${ALLOUTIL_LIBRARY}
-  ${ALLOGLV_LIBRARY}
-  ${GAMMA_LIBRARY} ${GLV_LIBRARIES}
-  ${ALLOCORE_LINK_LIBRARIES} ${ALLOUTIL_LINK_LIBRARIES} ${ALLOGLV_LINK_LIBRARIES})
+  ${ALLOCORE_LINK_LIBRARIES})
 #list(REMOVE_ITEM PROJECT_RES_FILES ${ALLOPROJECT_APP_SRC})
 if(NOT RUN_IN_DEBUGGER)
 add_custom_target("${APP_NAME}_run"


occ fix

occ fix

--- cmake_modules/FindOpenCasCade.cmake
+++ cmake_modules/FindOpenCasCade.cmake
@@ -89,6 +89,7 @@

 if(OCC_FOUND)
   set(OCC_LIBRARIES
+    -L${OCC_LIBRARY_DIR}
     FWOSPlugin
     TKFillet
     TKMesh


more sdl windows hints

more sdl windows hints

--- cmake-modules/FindSDL2.cmake
+++ cmake-modules/FindSDL2.cmake
@@ -65,6 +65,10 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)

+IF(WIN32)
+SET(SDL2_HINT_ROOT "" CACHE PATH "sdl2 root")
+ENDIF()
+
 SET(SDL2_SEARCH_PATHS
 	~/Library/Frameworks
 	/Library/Frameworks
@@ -75,6 +79,7 @@
 	/opt/csw # Blastwave
 	/opt
 	${SDL2_HINT_ROOT}
+	${SDL2_HINT_ROOT}/build
 	${SDL2_HINT_BUILD}
 )


CPACK_SET_DESTDIR still needed for TGZ

CPACK_SET_DESTDIR still needed for TGZ

--- cmake/ElektraPackaging.cmake
+++ cmake/ElektraPackaging.cmake
@@ -24,6 +24,14 @@
 set (CPACK_PACKAGE_EXECUTABLES kdb)
 set (CPACK_SOURCE_GENERATOR "TBZ2")
 set (CPACK_GENERATOR "TBZ2")
+
+# needed because otherwise files would be written to
+# system during creating the package
+SET (CPACK_SET_DESTDIR "ON")
+#package is not relocatable:
+unset(CPACK_RPM_PACKAGE_RELOCATABLE)
+unset(CPACK_RPM_PACKAGE_RELOCATABLE CACHE)
+

 if ("${CMAKE_BUILD_TYPE}" MATCHES "Release")
 	set (CPACK_STRIP_FILES TRUE)


removed FindCGAL.cmake

removed FindCGAL.cmake

Signed-off-by: Etienne Schmitt <25d5031dc1a1d443222aec9a4e916501ae23c255@inria.fr>

--- cmake/Modules/FindCGAL.cmake
+++ cmake/Modules/FindCGAL.cmake
@@ -1,89 +0,0 @@
-#
-# The following module is based on FindVTK.cmake
-#
-
-# - Find a CGAL installation or binary tree.
-# The following variables are set if CGAL is found.  If CGAL is not
-# found, CGAL_FOUND is set to false.
-#
-#  CGAL_FOUND         - Set to true when CGAL is found.
-#  CGAL_USE_FILE      - CMake file to use CGAL.
-#
-
-# Construct consitent error messages for use below.
-set(CGAL_DIR_DESCRIPTION "directory containing CGALConfig.cmake. This is either the binary directory where CGAL was configured or PREFIX/lib/CGAL for an installation.")
-set(CGAL_DIR_MESSAGE     "CGAL not found.  Set the CGAL_DIR cmake variable or environment variable to the ${CGAL_DIR_DESCRIPTION}")
-
-if ( NOT CGAL_DIR )
-
-  # Get the system search path as a list.
-  if(UNIX)
-    string(REGEX MATCHALL "[^:]+" CGAL_DIR_SEARCH1 "$ENV{PATH}")
-  else()
-    string(REGEX REPLACE "\\\\" "/" CGAL_DIR_SEARCH1 "$ENV{PATH}")
-  endif()
-
-  string(REGEX REPLACE "/;" ";" CGAL_DIR_SEARCH2 "${CGAL_DIR_SEARCH1}")
-
-  # Construct a set of paths relative to the system search path.
-  set(CGAL_DIR_SEARCH "")
-
-  foreach(dir ${CGAL_DIR_SEARCH2})
-
-    set(CGAL_DIR_SEARCH ${CGAL_DIR_SEARCH} ${dir}/../lib/CGAL )
-
-  endforeach()
-
-
-  #
-  # Look for an installation or build tree.
-  #
-  find_path(CGAL_DIR CGALConfig.cmake
-
-    # Look for an environment variable CGAL_DIR.
-    $ENV{CGAL_DIR}
-
-    # Look in places relative to the system executable search path.
-    ${CGAL_DIR_SEARCH}
-
-    # Look in standard UNIX install locations.
-    /usr/local/lib/CGAL
-    /usr/lib/CGAL
-
-    # Read from the CMakeSetup registry entries.  It is likely that
-    # CGAL will have been recently built.
-    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1]
-    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2]
-    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3]
-    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4]
-    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5]
-    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6]
-    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7]
-    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8]
-    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9]
-    [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10]
-
-    # Help the user find it if we cannot.
-    DOC "The ${CGAL_DIR_DESCRIPTION}"
-  )
-
-endif()
-
-if ( CGAL_DIR )
-
-  if ( EXISTS "${CGAL_DIR}/CGALConfig.cmake" )
-    include( "${CGAL_DIR}/CGALConfig.cmake" )
-    set( CGAL_FOUND TRUE )
-  endif()
-
-endif()
-
-if( NOT CGAL_FOUND)
-  if(CGAL_FIND_REQUIRED)
-    MESSAGE(FATAL_ERROR ${CGAL_DIR_MESSAGE})
-  else()
-    if(NOT CGAL_FIND_QUIETLY)
-      MESSAGE(STATUS ${CGAL_DIR_MESSAGE})
-    endif()
-  endif()
-endif()


Fix #72

Fix #72

--- cmake/dev/java_support.cmake
+++ cmake/dev/java_support.cmake
@@ -26,22 +26,32 @@
         message(FATAL_ERROR "gradle is needed to build the java application. Please install it correctly")
     endif()

-    get_filename_component(Java_JAVA_EXECUTABLE_DIR ${Java_JAVA_EXECUTABLE} DIRECTORY)
-    file(TO_NATIVE_PATH "${Java_JAVA_EXECUTABLE_DIR}" Java_JAVA_EXECUTABLE_DIR_NATIVE)

-    if(WIN32)
-        set(delimiter_ ";")
+    if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_LESS 3.1.3)
+        add_custom_target(java ALL
+            COMMAND "${GRADLE_EXE}" -Pcustomversion=${PROJECT_VERSION} build
+            WORKING_DIRECTORY ${directory}
+            COMMENT "Generating Java application" VERBATIM)
     else()
-        set(delimiter_ ":")
+        get_filename_component(Java_JAVA_EXECUTABLE_DIR ${Java_JAVA_EXECUTABLE} DIRECTORY)
+        file(TO_NATIVE_PATH "${Java_JAVA_EXECUTABLE_DIR}" Java_JAVA_EXECUTABLE_DIR_NATIVE)
+
+        if(WIN32)
+            set(delimiter_ ";")
+        else()
+            set(delimiter_ ":")
+        endif()
+
+        add_custom_target(java ALL
+            COMMAND ${CMAKE_COMMAND} -E env
+            --unset=JAVA_HOME
+            "PATH=${Java_JAVA_EXECUTABLE_DIR_NATIVE}${delimiter_}$<JOIN:$ENV{PATH},${delimiter_}>"
+            "${GRADLE_EXE}" -Pcustomversion=${PROJECT_VERSION} build
+            WORKING_DIRECTORY ${directory}
+            COMMENT "Generating Java application" VERBATIM)
     endif()

-    add_custom_target(java ALL
-        COMMAND ${CMAKE_COMMAND} -E env
-        --unset=JAVA_HOME
-        "PATH=${Java_JAVA_EXECUTABLE_DIR_NATIVE}${delimiter_}$<JOIN:$ENV{PATH},${delimiter_}>"
-        "${GRADLE_EXE}" -Pcustomversion=${PROJECT_VERSION} build
-        WORKING_DIRECTORY ${directory}
-        COMMENT "Generating Java application" VERBATIM)
+

     set(THIRDPARTY_FOUND false)
     foreach(arg ${ARGN})


Remove unnecessary extra line.

Remove unnecessary extra line.

--- cmake/libcellml-config.cmake
+++ cmake/libcellml-config.cmake
@@ -1,2 +1 @@
 include("${CMAKE_CURRENT_LIST_DIR}/libcellml-targets.cmake")
-


[CMake] set target architecture for Darwin idiomatically (#41059)

Previously we were setting `-arch` explicitly and unsetting
`CMAKE_OSX_ARCHITECTURES`; however this approach does not work when
building on Apple Silicon, since in there CMake 3.19+ enforces a default
value
(https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5291/diffs),
and this would result in the inability to compile code for x86_64.

This is a similar approach used for stdlib targets in #38415

Addresses rdar://88100025

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -162,9 +162,9 @@
     # side effects are introduced should a new search path be added.
     target_compile_options(${name} PRIVATE
       $<$<COMPILE_LANGUAGE:C,CXX,OBJC,OBJCXX>:
-      -arch ${SWIFT_HOST_VARIANT_ARCH}
       "-F${SWIFT_SDK_${SWIFT_HOST_VARIANT_ARCH}_PATH}/../../../Developer/Library/Frameworks"
     >)
+    set_property(TARGET ${name} PROPERTY OSX_ARCHITECTURES "${SWIFT_HOST_VARIANT_ARCH}")
   endif()

   _compute_lto_flag("${SWIFT_TOOLS_ENABLE_LTO}" _lto_flag_out)


[CMake] Fix up an issue encountered in Linux PR testing

This should fix out-of-tree LLDB builds.

This patch overrides the output directories setup by llvm_add_library.
This is required because swift deviates from the LLVM convention of using the LLVM_*_INTDIR variables.

This was causing failures on LLDB's PR testing because LLDB has a terrible mechanism for picking the swift libraries. It finds all the .a files by searching a directory.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1215,6 +1215,13 @@
 function(add_swift_library name)

   llvm_add_library(${name} ${ARGN})
+
+  # Override the output directories setup by llvm_add_library. This is required
+  # because swift deviates from the LLVM convention of using the LLVM_*_INTDIR
+  # variables.
+  set_output_directory(${name}
+      BINARY_DIR ${SWIFT_RUNTIME_OUTPUT_INTDIR}
+      LIBRARY_DIR ${SWIFT_LIBRARY_OUTPUT_INTDIR})

   swift_install_in_component(dev
       TARGETS ${name}


[cmake] Remove debug statement that snuck in.

I believe this came in during changes to cmark. I talked with DFarler and he
said it was debug code. Lets remove it.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -843,9 +843,6 @@
     LINK_FLAGS " ${link_flags} -L${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR} -L${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/../lib/swift/${SWIFTLIB_SINGLE_SUBDIR} -L${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/../lib/swift/${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_LIB_SUBDIR}")
   target_link_libraries("${target}" PRIVATE
       ${SWIFTLIB_SINGLE_PRIVATE_LINK_LIBRARIES})
-  if(${SWIFTLIB_SINGLE_INTERFACE_LINK_LIBRARIES})
-    message(FATAL_ERROR "${SWIFTLIB_SINGLE_INTERFACE_LINK_LIBRARIES}")
-  endif()
   target_link_libraries("${target}" INTERFACE
       ${SWIFTLIB_SINGLE_INTERFACE_LINK_LIBRARIES})
   set_property(TARGET "${target}" PROPERTY


build: remove `FRAMEWORK_WEAK_DEPENDS` from `_add_swift_host_library_single`

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -678,7 +678,6 @@
 #     [STATIC]
 #     [SDK sdk]
 #     [ARCHITECTURE architecture]
-#     [FRAMEWORK_DEPENDS_WEAK dep1 ...]
 #     [LLVM_LINK_COMPONENTS comp1 ...]
 #     [SWIFT_COMPILE_FLAGS flag1...]
 #     [LINK_FLAGS flag1...]
@@ -703,9 +702,6 @@
 #
 # ARCHITECTURE
 #   Architecture to build for.
-#
-# FRAMEWORK_DEPENDS_WEAK
-#   System frameworks this library depends on that should be weakly-linked.
 #
 # LLVM_LINK_COMPONENTS
 #   LLVM components this library depends on.
@@ -739,7 +735,6 @@
         SDK)
   set(SWIFTLIB_SINGLE_multiple_parameter_options
         FILE_DEPENDS
-        FRAMEWORK_DEPENDS_WEAK
         GYB_SOURCES
         INCORPORATE_OBJECT_LIBRARIES
         INCORPORATE_OBJECT_LIBRARIES_SHARED_ONLY
@@ -989,11 +984,6 @@
         "${swift_object_dependency_target}"
         "${swift_module_dependency_target}"
         ${LLVM_COMMON_DEPENDS})
-
-  # Link against system frameworks.
-  foreach(FRAMEWORK ${SWIFTLIB_SINGLE_FRAMEWORK_DEPENDS_WEAK})
-    target_link_libraries(${target} PUBLIC "-weak_framework ${FRAMEWORK}")
-  endforeach()

   # Call llvm_config() only for libraries that are part of the compiler.
   swift_common_llvm_config("${target}" ${SWIFTLIB_SINGLE_LLVM_LINK_COMPONENTS})


fix typo in htslib find code

fix typo in htslib find code

--- build-common/cmake/FindHTSlib.cmake
+++ build-common/cmake/FindHTSlib.cmake
@@ -7,10 +7,11 @@

 set(HTSLIB_SEARCH_DIRS
     ${HTSLIB_SEARCH_DIRS}
-    $ENV{HTLSIB_ROOT}
+    $ENV{HTSLIB_ROOT}
     /gsc/pkg/bio/htslib
     /usr
 )
+message(STATUS "Searching for HTSLIB in ${HTSLIB_SEARCH_DIRS}")

 set(_htslib_ver_path "htslib-${htslib_FIND_VERSION}")
 include(LibFindMacros)


SVN_SILENT made messages (.desktop file)

--- plugins/morse/ktpaccountskcm_plugin_morse.desktop.cmake
+++ plugins/morse/ktpaccountskcm_plugin_morse.desktop.cmake
@@ -10,6 +10,7 @@
 Comment[et]=Morse ühendusehaldurit kasutavate kontode kohandatud konto seadistamise kasutajaliides
 Comment[fi]=Morse-yhteyshallintaa käyttävien tilien mukautettu hallintakäyttöliittymä.
 Comment[fr]=Interface utilisateur personnalisée pour la configuration de comptes en utilisant le gestionnaire de connexions « Morse ».
+Comment[hu]=Egyedi beállítófelület a Morse kapcsolatkezelőt használó azonosítókhoz.
 Comment[it]=Interfaccia utente personalizzata di configurazione account per account che usano il gestore di connessioni Morse.
 Comment[nb]=Brukerflate for å sette opp egendefinerte kontoer ved bruk av Morse tilkoblingsbehandler.
 Comment[nl]=Gebruikersinterface voor aangepaste accountconfiguratie voor accounts die de Morse verbindingenbeheerder gebruiken.


Trailing slash for CPack installation of Qt5 plugins on Win32

--- cmake/BALLPackageConfig.cmake
+++ cmake/BALLPackageConfig.cmake
@@ -15,7 +15,7 @@
 	GET_TARGET_PROPERTY(Qt5Core_LOCATION Qt5::Core LOCATION)
 	GET_FILENAME_COMPONENT(Qt5_DLL_PATH ${Qt5Core_LOCATION} PATH)
 	INSTALL(DIRECTORY ${Qt5_DLL_PATH}/ DESTINATION ${BALL_RUNTIME_INSTALL_DIRECTORY} USE_SOURCE_PERMISSIONS COMPONENT "Runtime" FILES_MATCHING PATTERN "*.dll")
-	INSTALL(DIRECTORY ${Qt5_DLL_PATH}/../plugins DESTINATION ${BALL_RUNTIME_INSTALL_DIRECTORY} USE_SOURCE_PERMISSIONS COMPONENT "Runtime")
+	INSTALL(DIRECTORY ${Qt5_DLL_PATH}/../plugins/ DESTINATION ${BALL_RUNTIME_INSTALL_DIRECTORY} USE_SOURCE_PERMISSIONS COMPONENT "Runtime")

 	SET(BALL_WIN_ARCHITECTURE "win32")
 	IF (CMAKE_SIZEOF_VOID_P EQUAL 8)


Define CPP macros containing arrow version information.

--- cmake/Modules/FindArrow.cmake
+++ cmake/Modules/FindArrow.cmake
@@ -69,6 +69,20 @@
     set(ARROW_FOUND TRUE)
     add_library(arrow STATIC IMPORTED)
     set_target_properties(arrow PROPERTIES IMPORTED_LOCATION "${ARROW_STATIC_LIB}")
+
+    # Using pkgconfig to determine and set CPP the macros ARROW_METADATA_V?
+    set( ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${ARROW_ROOT}/lib/pkgconfig" )
+    find_package(PkgConfig)
+    pkg_search_module(_ARROW REQUIRED arrow) # using only version information
+    ADD_DEFINITIONS(-DARROW_VERSION="${_ARROW_VERSION}")
+    if ("${_ARROW_VERSION}" MATCHES "^(0.8.0|0.9.0|0.10.0)$")
+      ADD_DEFINITIONS(-DARROW_METADATA_V4)
+    elseif ("${_ARROW_VERSION}" MATCHES "^(0.7.0|0.7.1)$")
+      ADD_DEFINITIONS(-DARROW_METADATA_V3)
+    else()
+      message(WARNING "Unrecognized arrow version: ${_ARROW_VERSION}, assuming the most recent.")
+      ADD_DEFINITIONS(-DARROW_METADATA_V4)
+    endif()
 endif ()

 mark_as_advanced(


Minors

Minors

--- cmake/Modules/UploadPPA.cmake
+++ cmake/Modules/UploadPPA.cmake
@@ -283,6 +283,7 @@
   "/build.*/"
   "/Testing/"
   "/test/"
+  "/tmp/"
   "/packaging/"
   "/debian/"
   "/\\\\.git.*"


fixed installing debug libraries for visual studio builds (cmake)

--- cmake/UbiTrackComponent.cmake
+++ cmake/UbiTrackComponent.cmake
@@ -203,9 +203,6 @@
 		set_target_properties(${fname} PROPERTIES
 		  OUTPUT_NAME "${fname}"
 		  DEBUG_POSTFIX "${UBITRACK_DEBUG_POSTFIX}"
-		  ARCHIVE_OUTPUT_DIRECTORY ${UBITRACK_COMPONENT_INSTALL_PATH}
-		  LIBRARY_OUTPUT_DIRECTORY ${UBITRACK_COMPONENT_INSTALL_PATH}
-		  RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
 		  INSTALL_NAME_DIR lib
 		)

@@ -246,9 +243,15 @@
 	    set_target_properties(${fname} PROPERTIES COMPILE_DEFINITIONS "${UBITRACK_COMPONENT_${fname}_COMPILE_DEFINITIONS}")

 		install(TARGETS ${fname}
-		  RUNTIME DESTINATION ${UBITRACK_COMPONENT_BIN_INSTALL_PATH} COMPONENT main
-		  LIBRARY DESTINATION ${UBITRACK_COMPONENT_INSTALL_PATH} COMPONENT main
-		  ARCHIVE DESTINATION ${UBITRACK_COMPONENT_INSTALL_PATH} COMPONENT main
+		  RUNTIME DESTINATION ${UBITRACK_COMPONENT_BIN_INSTALL_PATH}_d COMPONENT main CONFIGURATIONS Debug
+		  LIBRARY DESTINATION ${UBITRACK_COMPONENT_INSTALL_PATH}_d COMPONENT main CONFIGURATIONS Debug
+		  ARCHIVE DESTINATION ${UBITRACK_COMPONENT_INSTALL_PATH}_d COMPONENT main CONFIGURATIONS Debug
+		  )
+
+		install(TARGETS ${fname}
+		  RUNTIME DESTINATION ${UBITRACK_COMPONENT_BIN_INSTALL_PATH} COMPONENT main CONFIGURATIONS Release
+		  LIBRARY DESTINATION ${UBITRACK_COMPONENT_INSTALL_PATH} COMPONENT main CONFIGURATIONS Release
+		  ARCHIVE DESTINATION ${UBITRACK_COMPONENT_INSTALL_PATH} COMPONENT main CONFIGURATIONS Release
 		  )

 	 endforeach()
@@ -286,9 +289,6 @@
 	set_target_properties(${the_component} PROPERTIES
 	  OUTPUT_NAME "${the_component}"
 	  DEBUG_POSTFIX "${UBITRACK_DEBUG_POSTFIX}"
-	  ARCHIVE_OUTPUT_DIRECTORY ${UBITRACK_COMPONENT_INSTALL_PATH}
-	  LIBRARY_OUTPUT_DIRECTORY ${UBITRACK_COMPONENT_INSTALL_PATH}
-	  RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
 	  INSTALL_NAME_DIR lib
 	)

@@ -329,9 +329,15 @@
 	endif()

 	install(TARGETS ${the_component}
-	  RUNTIME DESTINATION ${UBITRACK_COMPONENT_BIN_INSTALL_PATH} COMPONENT main
-	  LIBRARY DESTINATION ${UBITRACK_COMPONENT_INSTALL_PATH} COMPONENT main
-	  ARCHIVE DESTINATION ${UBITRACK_COMPONENT_INSTALL_PATH} COMPONENT main
+	  RUNTIME DESTINATION ${UBITRACK_COMPONENT_BIN_INSTALL_PATH}_d COMPONENT main CONFIGURATIONS Debug
+	  LIBRARY DESTINATION ${UBITRACK_COMPONENT_INSTALL_PATH}_d COMPONENT main CONFIGURATIONS Debug
+	  ARCHIVE DESTINATION ${UBITRACK_COMPONENT_INSTALL_PATH}_d COMPONENT main CONFIGURATIONS Debug
+	  )
+
+	install(TARGETS ${the_component}
+	  RUNTIME DESTINATION ${UBITRACK_COMPONENT_BIN_INSTALL_PATH} COMPONENT main CONFIGURATIONS Release
+	  LIBRARY DESTINATION ${UBITRACK_COMPONENT_INSTALL_PATH} COMPONENT main CONFIGURATIONS Release
+	  ARCHIVE DESTINATION ${UBITRACK_COMPONENT_INSTALL_PATH} COMPONENT main CONFIGURATIONS Release
 	  )

 	IF(GENERATE_METADATA)


doc(co_safe_glob): fix typo

doc(co_safe_glob): fix typo

--- cmake/consort/safe_glob.cmake
+++ cmake/consort/safe_glob.cmake
@@ -3,7 +3,7 @@
 # co_safe_glob( output_var glob glob ...)
 # ```
 #
-# Expand file globs into output_var, generating an error if any glob files to
+# Expand file globs into output_var, generating an error if any glob fails to
 # expand to any files. Analogous to `file(GLOB ${var} ${ARGN})` but with a
 # sanity check to ensure each glob matches at least one file.
 #


Adding support for easybuild

Adding support for easybuild

Former-commit-id: c2bf2d1ad0273941a08f35d25bbee2f053b97618

--- cmake-modules/FindPackageHDF5.cmake
+++ cmake-modules/FindPackageHDF5.cmake
@@ -76,14 +76,12 @@
     endif()
     if(HDF5_IS_PARALLEL)
         if(HDF5_USE_STATIC_LIBRARIES)
-        message(WARNING "The HDF5 library is parallel and you are linking with -static.\n  OpenMPI will not like it.")
-        target_link_libraries(hdf5 INTERFACE -lmpi -lopen-rte -lopen-pal -libverbs -lrt)
-        else()
-            find_package(MPI REQUIRED)
-            target_link_libraries(hdf5 INTERFACE MPI::MPI_C )
-            get_target_property(MPI_LIB MPI::MPI_C INTERFACE_LINK_LIBRARIES)
-            message("Found MPI Library: ${MPI_LIB}")
+        message(WARNING "The HDF5 library is parallel and you are linking with -static. OpenMPI will not like it.")
         endif()
+        find_package(MPI)
+        target_link_libraries(hdf5 INTERFACE MPI::MPI_C )
+        get_target_property(MPI_LIB MPI::MPI_C INTERFACE_LINK_LIBRARIES)
+        message("Found MPI Library: ${MPI_LIB}")
 #        find_package(MPI REQUIRED)
 #        target_link_libraries(hdf5 INTERFACE MPI::MPI_C )
 #        get_target_property(MPI_LIB MPI::MPI_C INTERFACE_LINK_LIBRARIES)


Print more options during configure

Print more options during configure

Former-commit-id: eb4520942c50f69e8c06c12211bf93e9c1d2afab

--- cmake-modules/PrintOptionInfo.cmake
+++ cmake-modules/PrintOptionInfo.cmake
@@ -2,6 +2,7 @@
     # Print CMake options
     message(STATUS  "|----------------\n"
             "-- | CMAKE_INSTALL_PREFIX   : ${CMAKE_INSTALL_PREFIX}\n"
+            "-- | CMAKE_VERBOSE_MAKEFILE : ${CMAKE_VERBOSE_MAKEFILE}\n"
             "-- | BUILD_SHARED_LIBS      : ${BUILD_SHARED_LIBS}\n"
             "-- | DMRG_ENABLE_OPENMP     : ${DMRG_ENABLE_OPENMP}\n"
             "-- | DMRG_ENABLE_MKL        : ${DMRG_ENABLE_MKL}\n"
@@ -14,6 +15,7 @@
             "-- | DMRG_BUILD_EXAMPLES    : ${DMRG_BUILD_EXAMPLES}\n"
             "-- | DMRG_DOWNLOAD_METHOD   : ${DMRG_DOWNLOAD_METHOD}\n"
             "-- | DMRG_PRINT_INFO        : ${DMRG_PRINT_INFO}\n"
+            "-- | DMRG_PRINT_CHECKS      : ${DMRG_PRINT_CHECKS}\n"
             "-- | DMRG_DEPS_IN_SUBDIR    : ${DMRG_DEPS_IN_SUBDIR}\n"
             "-- | DMRG_PREFER_CONDA_LIBS : ${DMRG_PREFER_CONDA_LIBS}\n")
 endif ()


Detect ISA depending on CMAKE_SYSTEM_PROCESSOR

Signed-off-by: Matthias Kretz <372ea4eca737a13cd010ee806d4ce7b98ee71550@kde.org>

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -202,6 +202,15 @@
 endmacro()

 macro(OptimizeForArchitecture)
+   if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(x86|AMD64)")
+      OptimizeForArchitectureX86()
+   else()
+      message(STATUS "No support for auto-detection of the target instruction set/extension")
+      set(TARGET_ARCHITECTURE "unused" CACHE STRING "CPU architecture to optimize for. (unused)")
+   endif()
+endmacro()
+
+macro(OptimizeForArchitectureX86)
    set(TARGET_ARCHITECTURE "auto" CACHE STRING "CPU architecture to optimize for. \
 Using an incorrect setting here can result in crashes of the resulting binary because of invalid instructions used. \
 Setting the value to \"auto\" will try to optimize for the architecture where cmake is called. \
@@ -566,4 +575,4 @@
          endforeach(_flag)
       endif()
    endif()
-endmacro(OptimizeForArchitecture)
+endmacro()


Fix cross-toolchain-linux32.cmake

Fix cross-toolchain-linux32.cmake

--- cmake/cross-toolchain-linux32.cmake
+++ cmake/cross-toolchain-linux32.cmake
@@ -4,5 +4,5 @@

 # Only look for libraries in lib32
 set( CMAKE_SYSTEM_LIBRARY_PATH /lib32 /usr/lib32 /usr/local/lib32 )
-set( FIND_LIBRARY_USE_LIB64_PATHS OFF )
+set_property( GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS OFF )
 set( CMAKE_IGNORE_PATH /lib /usr/lib /usr/local/lib )


change dependency to simply "libboost-python"

--- src/deb/package_details.cmake
+++ src/deb/package_details.cmake
@@ -20,7 +20,8 @@
 # natty/maverick has 1.42.0
 # lucid has 1.40.0
 set(DEBSRC_PACKAGE_DEPENDS python git cmake
-                "libboost-python1.49.0 | libboost-python1.48.0 | libboost-python1.46.1 | libboost-python1.42.0 | libboost-python1.40.0"
+                # "libboost-python1.49.0 | libboost-python1.48.0 | libboost-python1.46.1 | libboost-python1.42.0 | libboost-python1.40.0"
+                "libboost-python"
                 "libqd0 | libqd2c2a" CACHE STRING "name")

 # however CPack wants dependencies as a single comma separated string!


[cmake] adds DUNE_TEST_TIMEOUT (default 180s) to make check

--- cmake/modules/DuneUtils.cmake
+++ cmake/modules/DuneUtils.cmake
@@ -109,8 +109,10 @@
 	ENDIF( IS_DIRECTORY ${ALUGRID_BASE_PATH} )
 ENDMACRO( SET_CONFIGHEADER_VARS )

+set( DUNE_TEST_TIMEOUT 180 CACHE STRING "per-test timeout in seconds")
+
 macro(BEGIN_TESTCASES)
-	include_sys_dir(${DUNE_STUFF_TEST_DIR}/gtest )
+	include_directories(SYSTEM ${DUNE_STUFF_TEST_DIR}/gtest )
 	add_library(gtest_dune_stuff STATIC ${DUNE_STUFF_TEST_DIR}/gtest/gtest-all.cc)
   target_link_libraries(gtest_dune_stuff pthread)

@@ -135,7 +137,7 @@
     endif()
     endforeach( test ${testnames} )
 	add_custom_target(test_binaries DEPENDS ${testnames})
-	add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}
+	add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --timeout ${DUNE_TEST_TIMEOUT}
                   DEPENDS test_binaries)
 endmacro(END_TESTCASES)


Fix PATCH_EXECUTABLE link

Fix PATCH_EXECUTABLE link

This now wrongly links to the resulting executable from the build. It should really be properly installed and then linking to the installed version, but this makefile has no install target. I can't find out yet how to install it properly and then get the resulting file path.

--- cmake/modules/FindPatch.cmake
+++ cmake/modules/FindPatch.cmake
@@ -15,7 +15,7 @@
 			INSTALL_COMMAND ""
 			BUILD_IN_SOURCE 1
 		)
-		set(PATCH_EXECUTABLE patch)
+		set(PATCH_EXECUTABLE ${CMAKE_CURRENT_BINARY_DIR}/Patch-prefix/src/Patch/patch-2.5/patch)
 		set(PATCH_FOUND TRUE)
 	endif()
 else() #Just find it on the system.


[cmake] protect against hang condition during docstrings generation

--- cmake/swig_python_tools.cmake
+++ cmake/swig_python_tools.cmake
@@ -37,7 +37,12 @@
 	list(APPEND DOCSTRINGS_FILES ${outfile_name})
       endforeach()
     endforeach()
-
+
+    # If this variable is empty, cat will hang, so error out instead.
+    if (NOT DOCSTRINGS_FILES)
+      message(FATAL_ERROR "DOCSTRINGS_FILES=${DOCSTRINGS_FILES}")
+    endif()
+
     add_custom_command(OUTPUT ${SICONOS_SWIG_ROOT_DIR}/${COMP}-docstrings.i
       DEPENDS ${DOCSTRINGS_FILES}
       COMMAND cat


ENH: Added an option to turn on extra warnings.

Added the option to turn on stricter compiler flags (GCC only right
now), default to off. The flags are quite safe in VTK, but can cause
hundreds of warnings in some other projects code bases.

--- CMake/vtkCompilerExtras.cmake
+++ CMake/vtkCompilerExtras.cmake
@@ -45,10 +45,14 @@
     set(VTK_ABI_CXX_FLAGS "")
   endif()

-  # Set up the release with debug info and debug CXX_FLAGS for extra warnings
-  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
-    "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${CMAKE_CXX_FLAGS_WARN}")
-  set(CMAKE_CXX_FLAGS_DEBUG
-    "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_WARN} ${CMAKE_CXX_FLAGS_ERROR}")
+  # Set up the debug CXX_FLAGS for extra warnings
+  option(VTK_EXTRA_COMPILER_WARNINGS
+    "Add compiler flags to do stricter checking when building debug." OFF)
+  if(VTK_EXTRA_COMPILER_WARNINGS)
+    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
+      "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${CMAKE_CXX_FLAGS_WARN}")
+    set(CMAKE_CXX_FLAGS_DEBUG
+      "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_WARN} ${CMAKE_CXX_FLAGS_ERROR}")
+  endif()
 endif()


Update test data.

Update test data.

# Conflicts:
#	CMakeExternals/MITKData.cmake

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -12,7 +12,7 @@
 set(MITK-Data_DEPENDS ${proj})

 if(BUILD_TESTING)
-  set(revision_tag b8db25fb) # first 8 characters of hash-tag
+  set(revision_tag 8b1f9bd8) # first 8 characters of hash-tag
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


deleted target_libraries.cmake

deleted target_libraries.cmake

--- Modules/Bundles/org.mitk.gui.qt.dicom/target_libraries.cmake
+++ Modules/Bundles/org.mitk.gui.qt.dicom/target_libraries.cmake
@@ -1,9 +0,0 @@
-# See CMake/ctkFunctionGetTargetLibraries.cmake
-#
-# This file should list the libraries required to build the current CTK plugin.
-# For specifying required plugins, see the manifest_headers.cmake file.
-#
-
-SET(target_libraries
-  CTKPluginFramework
-)


fix checks for win32 (msvc, and mingw I guess)
- check if assuan has assuan_fd_t
- check for assuan_inquire_ext()

svn path=/branches/work/kdab-post-4.0/kdepim/; revision=748433

--- kleopatra/ConfigureChecks.cmake
+++ kleopatra/ConfigureChecks.cmake
@@ -41,7 +41,17 @@

 if ( USABLE_ASSUAN_FOUND )

+  set(CMAKE_REQUIRED_LIBRARIES_tmp ${CMAKE_REQUIRED_LIBRARIES}) #push
+  set(CMAKE_REQUIRED_INCLUDES_tmp ${CMAKE_REQUIRED_INCLUDES}) #push
+
   # check if assuan has assuan_fd_t
+  set(CMAKE_REQUIRED_LIBRARIES ${_gpg_error_library})
+  set(CMAKE_REQUIRED_INCLUDES ${ASSUAN_INCLUDES})
+  if(MINGW)
+    set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${KDEWIN32_INCLUDE_DIR}/mingw)
+  elseif(MSVC)
+    set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${KDEWIN32_INCLUDE_DIR}/msvc)
+  endif(MINGW)
   check_cxx_source_compiles("
         #include <assuan.h>
         int main() {
@@ -98,12 +108,15 @@
     set( USABLE_ASSUAN_FOUND false )
   endif ( WIN32 AND NOT HAVE_ASSUAN_SOCK_GET_NONCE )

+  set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_tmp}) #pop
+  set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_tmp}) #pop
+
 endif ( USABLE_ASSUAN_FOUND )

 if ( USABLE_ASSUAN_FOUND )
-  message( STATUS "Usable assuan found" )
+  message( STATUS "Usable assuan found for Kleopatra" )
 else ( USABLE_ASSUAN_FOUND )
-  message( STATUS "NO usable assuan found" )
+  message( STATUS "NO usable assuan found for Kleopatra" )
 endif ( USABLE_ASSUAN_FOUND )

 macro_bool_to_01( USABLE_ASSUAN_FOUND  HAVE_USABLE_ASSUAN )


pythonqt-embed-ipython-kernel: Install using pip

--- CMake/Externals/External_pythonqt-embed-ipython-kernel.cmake
+++ CMake/Externals/External_pythonqt-embed-ipython-kernel.cmake
@@ -24,7 +24,7 @@
     BUILD_IN_SOURCE 1
     CONFIGURE_COMMAND ""
     BUILD_COMMAND ""
-    INSTALL_COMMAND ${PYTHON_EXECUTABLE} setup.py develop
+    INSTALL_COMMAND ${PIP_EXECUTABLE} install -e .
     DEPENDS
       ${${proj}_DEPENDENCIES}
     )


search for micnativeloadex in the PATH

search for micnativeloadex in the PATH

--- cmake/FindMIC.cmake
+++ cmake/FindMIC.cmake
@@ -113,7 +113,7 @@
    )
 find_program(MIC_AR x86_64-k1om-linux-ar PATHS "${MIC_TARGET_TOOLS_DIR}/bin")
 find_program(MIC_RANLIB x86_64-k1om-linux-ranlib PATHS "${MIC_TARGET_TOOLS_DIR}/bin")
-find_program(MIC_NATIVELOAD micnativeloadex PATHS "/opt/intel/mic/bin")
+find_program(MIC_NATIVELOAD micnativeloadex PATHS ENV PATH)
 mark_as_advanced(MIC_AR MIC_RANLIB MIC_NATIVELOAD)

 if(MIC_SDK_DIR AND MIC_AR AND MIC_RANLIB)


Make generic.cmake no longer depend on util.cmake

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -29,6 +29,11 @@
 # https://cmake.org/cmake/help/v3.0/module/CMakeParseArguments.html
 #

+# Because gflags depends on pthread, I copied the following snippet
+# from https://stackoverflow.com/a/29871891/724872.
+set(THREADS_PREFER_PTHREAD_FLAG ON)
+find_package(Threads REQUIRED)
+
 # cc_library parses tensor.cc and figures out that target also depend on tensor.h.
 # cc_library(tensor
 #   SRCS
@@ -45,7 +50,9 @@
   else()
     add_library(${TARGET_NAME} STATIC ${cc_library_SRCS})
   endif()
-  add_dependencies(${TARGET_NAME} ${cc_library_DEPS} ${external_project_dependencies})
+  if (cc_library_DEPS)
+    add_dependencies(${TARGET_NAME} ${cc_library_DEPS})
+  endif()
 endfunction(cc_library)

 # cc_binary parses tensor.cc and figures out that target also depend on tensor.h.
@@ -58,7 +65,6 @@
   set(multiValueArgs SRCS DEPS)
   cmake_parse_arguments(cc_binary "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
   add_executable(${TARGET_NAME} ${cc_binary_SRCS})
-  link_paddle_exe(${TARGET_NAME})
   if(cc_binary_DEPS)
     target_link_libraries(${TARGET_NAME} ${cc_binary_DEPS})
     add_dependencies(${TARGET_NAME} ${cc_binary_DEPS})
@@ -78,11 +84,16 @@
   set(multiValueArgs SRCS DEPS)
   cmake_parse_arguments(cc_test "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
   add_executable(${TARGET_NAME} ${cc_test_SRCS})
-  link_paddle_test(${TARGET_NAME})
   if(cc_test_DEPS)
     target_link_libraries(${TARGET_NAME} ${cc_test_DEPS})
     add_dependencies(${TARGET_NAME} ${cc_test_DEPS})
   endif()
+  target_link_libraries(${TARGET_NAME}
+    ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES}
+    ${GLOG_LIBRARIES}
+    ${GFLAGS_LIBRARIES}
+    Threads::Threads)
+  add_dependencies(${TARGET_NAME} gtest glog gflags)
   add_test(${TARGET_NAME} ${TARGET_NAME})
 endfunction(cc_test)

@@ -104,7 +115,9 @@
   else()
     cuda_add_library(${TARGET_NAME} STATIC ${nv_library_SRCS})
   endif()
-  add_dependencies(${TARGET_NAME} ${nv_library_DEPS} ${external_project_dependencies})
+  if (nv_library_DEPS)
+    add_dependencies(${TARGET_NAME} ${nv_library_DEPS})
+  endif()
 endfunction(nv_library)

 function(nv_binary TARGET_NAME)
@@ -113,7 +126,6 @@
   set(multiValueArgs SRCS DEPS)
   cmake_parse_arguments(nv_binary "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
   cuda_add_executable(${TARGET_NAME} ${nv_binary_SRCS})
-  link_paddle_exe(${TARGET_NAME})
   if(nv_binary_DEPS)
     target_link_libraries(${TARGET_NAME} ${nv_binary_DEPS})
     add_dependencies(${TARGET_NAME} ${nv_binary_DEPS})
@@ -133,11 +145,16 @@
   set(multiValueArgs SRCS DEPS)
   cmake_parse_arguments(nv_test "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
   cuda_add_executable(${TARGET_NAME} ${nv_test_SRCS})
-  link_paddle_test(${TARGET_NAME})
   if(nv_test_DEPS)
     target_link_libraries(${TARGET_NAME} ${nv_test_DEPS})
     add_dependencies(${TARGET_NAME} ${nv_test_DEPS})
   endif()
+  target_link_libraries(${TARGET_NAME}
+    ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES}
+    ${GLOG_LIBRARIES}
+    ${GFLAGS_LIBRARIES}
+    Threads::Threads)
+  add_dependencies(${TARGET_NAME} gtest glog gflags)
   add_test(${TARGET_NAME} ${TARGET_NAME})
 endfunction(nv_test)


(2d/3d) fixed options

(2d/3d) fixed options

--- cmake/options.cmake
+++ cmake/options.cmake
@@ -25,7 +25,6 @@
   set(clawpatch ON)
   set(clawpack4.6 ON)
   set(clawpack5 ON)
-  set(clawpack3_46 ON)
 endif(clawpack)

 if(clawpack3)


change version.cmake to check all tags

change version.cmake to check all tags

Fix issue #2666

Currently, in master where latest tag is v0.12.0,
the build still says is it v0.11.0.

  [ben@centos bcc]$ cd build/
  [ben@centos build]$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr
  -- Latest recognized Git tag is v0.11.0

The reason is the git_describe by default only checks
annotated tag while tag v0.12.0 is tagged through
github release process which just tags whatever the
top of the master.

Making git_describe to check all tags fixed the issue.

Signed-off-by: Yonghong Song <e76892bbe783db2f627de1232e139db4de43da60@fb.com>

--- cmake/version.cmake
+++ cmake/version.cmake
@@ -4,7 +4,7 @@
   get_git_head_revision(GIT_REFSPEC GIT_SHA1)
   string(SUBSTRING "${GIT_SHA1}" 0 8 GIT_SHA1_SHORT)
   git_describe(GIT_DESCRIPTION)
-  git_describe(GIT_TAG_LAST "--abbrev=0")
+  git_describe(GIT_TAG_LAST "--abbrev=0" "--tags")
   git_get_exact_tag(GIT_TAG_EXACT)
   string(SUBSTRING "${GIT_TAG_LAST}-${GIT_SHA1_SHORT}" 1 -1 REVISION)
   if(GIT_TAG_EXACT)


Support building with NDK r12b: use at least android-9 NDK level

r12 NDK seems to not bundke android-8 any more

--- tools/build/cmake/toolchains/android.toolchain.cmake
+++ tools/build/cmake/toolchains/android.toolchain.cmake
@@ -239,7 +239,7 @@
 set( ANDROID_SUPPORTED_ABIS_mips64 "mips64" )

 # API level defaults
-set( ANDROID_DEFAULT_NDK_API_LEVEL 8 )
+set( ANDROID_DEFAULT_NDK_API_LEVEL 9 )
 set( ANDROID_DEFAULT_NDK_API_LEVEL_arm64 21 )
 set( ANDROID_DEFAULT_NDK_API_LEVEL_x86 9 )
 set( ANDROID_DEFAULT_NDK_API_LEVEL_x86_64 21 )


COMP Merge branch 'bug-18603-comp-fix'

COMP Merge branch 'bug-18603-comp-fix'

--- Modules/Core/test/files.cmake
+++ Modules/Core/test/files.cmake
@@ -178,12 +178,13 @@
     mitkImageToItkTest.cpp
     mitkImageSliceSelectorTest.cpp
     mitkSurfaceDepthPeelingTest.cpp
-    if(NOT WIN32)
-    # Currently not working on windows because of a rendering timing issue
-    # see bug 18083 for details
-    mitkSurfaceDepthSortingTest.cpp
-    endif()
 )
+
+# Currently not working on windows because of a rendering timing issue
+# see bug 18083 for details
+if(NOT WIN32)
+ set(MODULE_CUSTOM_TESTS ${MODULE_CUSTOM_TESTS} mitkSurfaceDepthSortingTest.cpp)
+endif()

 set(RESOURCE_FILES
   Interactions/AddAndRemovePoints.xml


cmake: add subdirectory if exists utility

--- tools/cmake/utilities.cmake
+++ tools/cmake/utilities.cmake
@@ -302,4 +302,17 @@

     set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
         APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${output}")
+endfunction()
+
+# add_subdirectory_if_exists
+#
+# Like add_subdirectory, but only proceeds if the given source directory exists.
+function(add_subdirectory_if_exists source_dir)
+    get_filename_component(abs_dir "${source_dir}"
+        ABSOLUTE BASE_DIR "${CMAKE_CURRENT_LIST_DIR}")
+    if(EXISTS "${abs_dir}")
+        add_subdirectory("${source_dir}" ${ARGN})
+    else()
+        message(STATUS "Subdirectory '${abs_dir}' does not exist, skipped.")
+    endif()
 endfunction()