Make sure ESP_PLATFORM is defined when processing CMake files.

--- tools/cmake/component.cmake
+++ tools/cmake/component.cmake
@@ -213,6 +213,7 @@
     __component_write_properties(${component_properties_file})

     execute_process(COMMAND "${CMAKE_COMMAND}"
+        -D "ESP_PLATFORM=1"
         -D "BUILD_PROPERTIES_FILE=${build_properties_file}"
         -D "COMPONENT_PROPERTIES_FILE=${component_properties_file}"
         -D "COMPONENT_REQUIRES_FILE=${component_requires_file}"


retain kde4 specific flags

retain kde4 specific flags

svn path=/trunk/kdesupport/strigi/; revision=760083

--- cmake/MacroCheckGccVisibility.cmake
+++ cmake/MacroCheckGccVisibility.cmake
@@ -32,7 +32,7 @@

    if (${GccVisibility} AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR)
       set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
-      set (KDE4_C_FLAGS "-fvisibility=hidden")
+      set (KDE4_C_FLAGS "${KDE4_C_FLAGS}" "-fvisibility=hidden")

       if (GCC_IS_NEWER_THAN_4_2)
           set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden")


The latest version (5.1.1) of the gnu compiler returns just its major version ("5") when given the "-dumpversion" argument. Gnu compiler developers don't consider this to be an error. A workaround for this case has been made.

--- cmake/OpenCVDetectCXXCompiler.cmake
+++ cmake/OpenCVDetectCXXCompiler.cmake
@@ -76,17 +76,27 @@
                 OUTPUT_STRIP_TRAILING_WHITESPACE)

   # Typical output in CMAKE_OPENCV_GCC_VERSION_FULL: "c+//0 (whatever) 4.2.3 (...)"
-  # Look for the version number
+  # Look for the version number, major.minor.build
   string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" CMAKE_GCC_REGEX_VERSION "${CMAKE_OPENCV_GCC_VERSION_FULL}")
-  if(NOT CMAKE_GCC_REGEX_VERSION)
+  if(NOT CMAKE_GCC_REGEX_VERSION)#major.minor
     string(REGEX MATCH "[0-9]+\\.[0-9]+" CMAKE_GCC_REGEX_VERSION "${CMAKE_OPENCV_GCC_VERSION_FULL}")
   endif()

-  # Split the three parts:
-  string(REGEX MATCHALL "[0-9]+" CMAKE_OPENCV_GCC_VERSIONS "${CMAKE_GCC_REGEX_VERSION}")
+  if(CMAKE_GCC_REGEX_VERSION)
+    # Split the parts:
+    string(REGEX MATCHALL "[0-9]+" CMAKE_OPENCV_GCC_VERSIONS "${CMAKE_GCC_REGEX_VERSION}")

-  list(GET CMAKE_OPENCV_GCC_VERSIONS 0 CMAKE_OPENCV_GCC_VERSION_MAJOR)
-  list(GET CMAKE_OPENCV_GCC_VERSIONS 1 CMAKE_OPENCV_GCC_VERSION_MINOR)
+    list(GET CMAKE_OPENCV_GCC_VERSIONS 0 CMAKE_OPENCV_GCC_VERSION_MAJOR)
+    list(GET CMAKE_OPENCV_GCC_VERSIONS 1 CMAKE_OPENCV_GCC_VERSION_MINOR)
+  else()#compiler returned just the major version number
+    string(REGEX MATCH "[0-9]+" CMAKE_GCC_REGEX_VERSION "${CMAKE_OPENCV_GCC_VERSION_FULL}")
+    if(NOT CMAKE_GCC_REGEX_VERSION)#compiler did not return anything reasonable
+      set(CMAKE_GCC_REGEX_VERSION "0")
+      message(WARNING "GCC version not detected!")
+    endif()
+    set(CMAKE_OPENCV_GCC_VERSION_MAJOR ${CMAKE_GCC_REGEX_VERSION})
+    set(CMAKE_OPENCV_GCC_VERSION_MINOR 0)
+  endif()

   set(CMAKE_OPENCV_GCC_VERSION ${CMAKE_OPENCV_GCC_VERSION_MAJOR}${CMAKE_OPENCV_GCC_VERSION_MINOR})
   math(EXPR CMAKE_OPENCV_GCC_VERSION_NUM "${CMAKE_OPENCV_GCC_VERSION_MAJOR}*100 + ${CMAKE_OPENCV_GCC_VERSION_MINOR}")


Add include guard to Cmake toolchain file

--- cmake/Toolchain-arm-none-eabi.cmake
+++ cmake/Toolchain-arm-none-eabi.cmake
@@ -6,6 +6,11 @@
 # This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
 # distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
+
+if(CMAKE_TOOLCHAIN_ARM_NONE_EABI_CMAKE_)
+	return()
+endif()
+set(CMAKE_TOOLCHAIN_ARM_NONE_EABI_CMAKE_ 1)

 set(CMAKE_SYSTEM_NAME Generic)
 set(CMAKE_SYSTEM_VERSION 1)


Revert "[cmake] change Eigen discovery"

Revert "[cmake] change Eigen discovery"

This reverts commit 043fbca5cadb4e4ef7909df0049aef350bb61d89.

refs #5

--- cmake/modules/DuneStuffMacros.cmake
+++ cmake/modules/DuneStuffMacros.cmake
@@ -113,13 +113,15 @@
 	list(APPEND DUNE_DEFAULT_LIBS ${BLAS_LIBRARIES})
 endif(HAVE_BLAS)

-find_package(Eigen3 3.2.0)
-if(EIGEN3_FOUND)
-  include_directories(${EIGEN3_INCLUDE_DIR})
+pkg_check_modules(EIGEN eigen3)
+set(CMAKE_REQUIRED_INCLUDES ${EIGEN_INCLUDE_DIRS})
+check_include_file_cxx("Eigen/SparseLU" HAVE_EIGEN_SPARSE)
+if(EIGEN_FOUND AND HAVE_EIGEN_SPARSE)
+  include_directories(${EIGEN_INCLUDE_DIRS})
   set(HAVE_EIGEN 1)
-else(EIGEN3_FOUND)
+else(EIGEN_FOUND AND HAVE_EIGEN_SPARSE)
   set(HAVE_EIGEN 0)
-endif(EIGEN3_FOUND)
+endif(EIGEN_FOUND AND HAVE_EIGEN_SPARSE)

 pkg_check_modules(LIBAMA libama)
 if(LIBAMA_FOUND)


cmake: internal/layout: bug fix

cmake: internal/layout: bug fix

When setting QI_SDK_BIN to "", we end up having a path containing
//, which cause windows to look for a network drive (incredible, but true)

Fix this by using "." instead of ""

--- cmake/qibuild/internal/layout.cmake
+++ cmake/qibuild/internal/layout.cmake
@@ -11,8 +11,8 @@

 if(MSVC)
   message(STATUS "We love visual studio")
-  qi_set_global(QI_SDK_BIN "")
-  qi_set_global(QI_SDK_LIB "")
+  qi_set_global(QI_SDK_BIN ".")
+  qi_set_global(QI_SDK_LIB ".")
 else()
   qi_set_global(QI_SDK_BIN "bin")
   qi_set_global(QI_SDK_LIB "lib")


Enable dshot driver for fmu-v4pro

Enable dshot driver for fmu-v4pro

--- boards/px4/fmu-v4pro/default.cmake
+++ boards/px4/fmu-v4pro/default.cmake
@@ -25,7 +25,7 @@
 		camera_trigger
 		differential_pressure # all available differential pressure drivers
 		distance_sensor # all available distance sensor drivers
-		#dshot
+		dshot
 		gps
 		#heater
 		#imu # all available imu drivers


Android toolchain: protect from changes of NDK_CCACHE on subsequent cmake

--- android/android.toolchain.cmake
+++ android/android.toolchain.cmake
@@ -446,7 +446,7 @@
   string( LENGTH "${ANDROID_NDK}" __length )
   string( SUBSTRING "${CMAKE_AR}" 0 ${__length} __androidNdkPreviousPath )
   if( NOT __androidNdkPreviousPath STREQUAL ANDROID_NDK )
-   message( FATAL_ERROR "It is not possible to change the path to the NDK on subsequent CMake run. You must remove all files from your build folder first.
+   message( FATAL_ERROR "It is not possible to change the path to the NDK on subsequent CMake run. You must remove all generated files from your build folder first.
    " )
   endif()
   unset( __androidNdkPreviousPath )
@@ -916,29 +916,31 @@
 endif()
 unset( _ndk_ccache )

-# specify the cross compiler
-if( NDK_CCACHE )
- set( CMAKE_C_COMPILER   "${NDK_CCACHE}" CACHE PATH "ccache as C compiler" )
- set( CMAKE_CXX_COMPILER "${NDK_CCACHE}" CACHE PATH "ccache as C++ compiler" )
- set( CMAKE_C_COMPILER_ARG1 "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}"   CACHE PATH "gcc")
- set( CMAKE_CXX_COMPILER_ARG1 "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-g++${TOOL_OS_SUFFIX}" CACHE PATH "g++")
-else()
- set( CMAKE_C_COMPILER   "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}"    CACHE PATH "gcc" )
- set( CMAKE_CXX_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-g++${TOOL_OS_SUFFIX}"    CACHE PATH "g++" )
-endif()
-set( CMAKE_ASM_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}"     CACHE PATH "assembler" )
+# setup the cross-compiler
+if( NOT CMAKE_C_COMPILER )
+ if( NDK_CCACHE )
+  set( CMAKE_C_COMPILER   "${NDK_CCACHE}" CACHE PATH "ccache as C compiler" )
+  set( CMAKE_CXX_COMPILER "${NDK_CCACHE}" CACHE PATH "ccache as C++ compiler" )
+  set( CMAKE_C_COMPILER_ARG1 "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}"   CACHE PATH "gcc")
+  set( CMAKE_CXX_COMPILER_ARG1 "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-g++${TOOL_OS_SUFFIX}" CACHE PATH "g++")
+ else()
+  set( CMAKE_C_COMPILER   "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}"    CACHE PATH "gcc" )
+  set( CMAKE_CXX_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-g++${TOOL_OS_SUFFIX}"    CACHE PATH "g++" )
+ endif()
+ set( CMAKE_ASM_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}"     CACHE PATH "assembler" )
+ set( CMAKE_STRIP        "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-strip${TOOL_OS_SUFFIX}"   CACHE PATH "strip" )
+ set( CMAKE_AR           "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ar${TOOL_OS_SUFFIX}"      CACHE PATH "archive" )
+ set( CMAKE_LINKER       "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ld${TOOL_OS_SUFFIX}"      CACHE PATH "linker" )
+ set( CMAKE_NM           "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-nm${TOOL_OS_SUFFIX}"      CACHE PATH "nm" )
+ set( CMAKE_OBJCOPY      "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-objcopy${TOOL_OS_SUFFIX}" CACHE PATH "objcopy" )
+ set( CMAKE_OBJDUMP      "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-objdump${TOOL_OS_SUFFIX}" CACHE PATH "objdump" )
+ set( CMAKE_RANLIB       "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ranlib${TOOL_OS_SUFFIX}"  CACHE PATH "ranlib" )
+endif()
+
+set( _CMAKE_TOOLCHAIN_PREFIX "${ANDROID_TOOLCHAIN_MACHINE_NAME}-" )
 if( CMAKE_VERSION VERSION_LESS 2.8.5 )
  set( CMAKE_ASM_COMPILER_ARG1 "-c" )
 endif()
-# there may be a way to make cmake deduce these TODO deduce the rest of the tools
-set( CMAKE_STRIP        "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-strip${TOOL_OS_SUFFIX}"   CACHE PATH "strip" )
-set( CMAKE_AR           "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ar${TOOL_OS_SUFFIX}"      CACHE PATH "archive" )
-set( CMAKE_LINKER       "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ld${TOOL_OS_SUFFIX}"      CACHE PATH "linker" )
-set( CMAKE_NM           "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-nm${TOOL_OS_SUFFIX}"      CACHE PATH "nm" )
-set( CMAKE_OBJCOPY      "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-objcopy${TOOL_OS_SUFFIX}" CACHE PATH "objcopy" )
-set( CMAKE_OBJDUMP      "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-objdump${TOOL_OS_SUFFIX}" CACHE PATH "objdump" )
-set( CMAKE_RANLIB       "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ranlib${TOOL_OS_SUFFIX}"  CACHE PATH "ranlib" )
-set( _CMAKE_TOOLCHAIN_PREFIX "${ANDROID_TOOLCHAIN_MACHINE_NAME}-" )
 if( APPLE )
  find_program( CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool )
  if( NOT CMAKE_INSTALL_NAME_TOOL )


for fresh compiles: disable compiler checks

--- amiga.cmake
+++ amiga.cmake
@@ -7,6 +7,10 @@
 SET(CMAKE_ASM-VASM_COMPILER "${AMIGA_TOOLCHAIN_PATH}/bin/vasmm68k_mot")
 SET(CMAKE_CXX_COMPILER "${AMIGA_TOOLCHAIN_PATH}/bin/m68k-amigaos-g++")

+# newest toolchain works for le3d but the cmake compiler check
+# doesn't work due to linker errors :S
+set(CMAKE_C_COMPILER_WORKS 1)
+set(CMAKE_CXX_COMPILER_WORKS 1)
 SET(CMAKE_C_FLAGS "-noixemul -m68040" CACHE STRING "" FORCE)
 SET(CMAKE_CXX_FLAGS "-noixemul -m68040" CACHE STRING "" FORCE)


deps: Fix libpng and zlib on Windows

deps: Fix libpng and zlib on Windows

--- deps/deps-windows.cmake
+++ deps/deps-windows.cmake
@@ -121,7 +121,8 @@
     URL_HASH SHA256=4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066
     CMAKE_GENERATOR "${DEP_MSVC_GEN}"
     CMAKE_ARGS
-        "-DINSTALL_BIN_DIR=${CMAKE_CURRENT_BINARY_DIR}\\fallout"   # I found no better way of preventing zlib creating & installing DLLs :-/
+        -DSKIP_INSTALL_FILES=ON                                    # Prevent installation of man pages et al.
+        "-DINSTALL_BIN_DIR=${CMAKE_CURRENT_BINARY_DIR}\\fallout"   # I found no better way of preventing zlib from creating & installing DLLs :-/
         -DCMAKE_POSITION_INDEPENDENT_CODE=ON
         "-DCMAKE_INSTALL_PREFIX:PATH=${DESTDIR}\\usr\\local"
     BUILD_COMMAND msbuild /P:Configuration=Release INSTALL.vcxproj
@@ -136,6 +137,19 @@
         WORKING_DIRECTORY "${BINARY_DIR}"
     )
 endif ()
+# The following steps are unfortunately needed to remove the _static suffix on libraries
+ExternalProject_Add_Step(dep_zlib fix_static
+    DEPENDEES install
+    COMMAND "${CMAKE_COMMAND}" -E rename zlibstatic.lib zlib.lib
+    WORKING_DIRECTORY "${DESTDIR}\\usr\\local\\lib\\"
+)
+if (${DEP_DEBUG})
+    ExternalProject_Add_Step(dep_zlib fix_static_debug
+        DEPENDEES install
+        COMMAND "${CMAKE_COMMAND}" -E rename zlibstaticd.lib zlibd.lib
+        WORKING_DIRECTORY "${DESTDIR}\\usr\\local\\lib\\"
+    )
+endif ()

 ExternalProject_Add(dep_libpng
@@ -147,6 +161,7 @@
     CMAKE_ARGS
         -DPNG_SHARED=OFF
         -DPNG_TESTS=OFF
+        -DSKIP_INSTALL_FILES=ON                                   # Prevent installation of man pages et al.
         -DCMAKE_POSITION_INDEPENDENT_CODE=ON
         "-DCMAKE_INSTALL_PREFIX:PATH=${DESTDIR}\\usr\\local"
     BUILD_COMMAND msbuild /P:Configuration=Release INSTALL.vcxproj
@@ -159,6 +174,20 @@
         DEPENDERS install
         COMMAND msbuild /P:Configuration=Debug INSTALL.vcxproj
         WORKING_DIRECTORY "${BINARY_DIR}"
+    )
+endif ()
+# The following steps are unfortunately needed to remove the _static suffix on libraries
+# (And also overwrite the dynamic .lib)
+ExternalProject_Add_Step(dep_libpng fix_static
+    DEPENDEES install
+    COMMAND "${CMAKE_COMMAND}" -E rename libpng16_static.lib libpng16.lib
+    WORKING_DIRECTORY "${DESTDIR}\\usr\\local\\lib\\"
+)
+if (${DEP_DEBUG})
+    ExternalProject_Add_Step(dep_libpng fix_static_debug
+        DEPENDEES install
+        COMMAND "${CMAKE_COMMAND}" -E rename libpng16_staticd.lib libpng16d.lib
+        WORKING_DIRECTORY "${DESTDIR}\\usr\\local\\lib\\"
     )
 endif ()


Fix a broken link.

Fix a broken link.

--- doc/www-data.in/download.cmake
+++ doc/www-data.in/download.cmake
@@ -131,7 +131,7 @@

 - Perl driver, [DR:Tarantool](http://search.cpan.org/~unera/DR-Tarantool-0.37/lib/DR/Tarantool.pm)
 - Java driver, [Maven repository](http://dgreenru.github.com/tarantool-java)
-- Ruby driver, [http://github.com/mailru/tarantool-ruby](https://github.com/tarantool/tarantool-ruby)
+- Ruby driver, [http://github.com/mailru/tarantool-ruby](https://github.com/mailru/tarantool-ruby)
 - Python driver, [http://pypi.python.org/pypi/tarantool](http://pypi.python.org/pypi/tarantool)
 - PHP driver, [https://github.com/tarantool/tarantool-php](https://github.com/tarantool/tarantool-php)
 - node.js driver,


Add a comment about running item_tasks test serially

--- plugins/item_tasks/plugin.cmake
+++ plugins/item_tasks/plugin.cmake
@@ -13,6 +13,7 @@
     tasks "${PROJECT_SOURCE_DIR}/plugins/${PLUGIN}/plugin_tests/tasks.js" PLUGIN ${PLUGIN}
     SETUP_MODULES "${CMAKE_CURRENT_LIST_DIR}/plugin_tests/mock_worker.py")

+# run this test serially to avoid event stream timeouts on CI
 if (BUILD_JAVASCRIPT_TESTS)
     set_property(TEST web_client_item_tasks.tasks PROPERTY RUN_SERIAL ON)
 endif()


adjust verbosity

adjust verbosity

--- share/hugh/cmake/CMakeAddons_SetupVariables.cmake
+++ share/hugh/cmake/CMakeAddons_SetupVariables.cmake
@@ -43,14 +43,19 @@
     endif()
   endif()

-  add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
+  if(VERBOSE)
+    add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
+  endif()
 elseif(CMAKE_HOST_UNIX)
   set(Boost_DEBUG           FALSE)
   set(Boost_USE_MULTITHREAD ON)

   find_package(Boost ${BOOST_MINIMUM_VERSION})

-  add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
+  if(VERBOSE)
+    add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
+  endif()
+
   add_definitions(-DBOOST_ALL_DYN_LINK)
 endif()


NSIS adds/deletes PKMNSIM_IMAGES_DIR environment variable

--- cmake/Modules/PKMNsimPackage.cmake
+++ cmake/Modules/PKMNsimPackage.cmake
@@ -44,10 +44,12 @@

 SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
     WriteRegStr HKLM ${HLKM_ENV} \\\"PKMNSIM_DATABASE_DIR\\\" \\\"$INSTDIR\\\\share\\\\pkmnsim\\\"
+    WriteRegStr HKLM ${HLKM_ENV} \\\"PKMNSIM_IMAGES_DIR\\\" \\\"$INSTDIR\\\\share\\\\pkmnsim\\\\images\\\"
 ")

 SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
     DeleteRegValue HKLM ${HLKM_ENV} \\\"PKMNSIM_DATABASE_DIR\\\"
+    DeleteRegValue HKLM ${HLKM_ENV} \\\"PKMNSIM_IMAGES_DIR\\\"
 ")

 INCLUDE(CPack)


CMake support

CMake support

--- cmake/dev/eprosima_libraries.cmake
+++ cmake/dev/eprosima_libraries.cmake
@@ -1,83 +1,88 @@
 macro(find_eprosima_package package)
     if(EPROSIMA_BUILD)
-        # Verify thirdparty
-        message(STATUS "Checking ${package} thirdparty...")
-        execute_process(COMMAND git submodule update --recursive --init thirdparty/${package}
-            WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
-            RESULT_VARIABLE EXECUTE_RESULT
-            )
+        set(${package}ExternalDir ${PROJECT_BINARY_DIR}/external/${package})
+        file(MAKE_DIRECTORY ${${package}ExternalDir})
+        file(WRITE ${${package}ExternalDir}/CMakeLists.txt
+            "cmake_minimum_required(VERSION 2.8.7)\n"
+            "include(ExternalProject)\n"
+            "ExternalProject_Add(${package}\n"
+             "CONFIGURE_COMMAND ${CMAKE_COMMAND}\n"
+             "${PROJECT_SOURCE_DIR}/thirdparty/${package}\n"
+             "-G \"${CMAKE_GENERATOR}\"\n"
+             "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}\n"
+             "-DCMAKE_INSTALL_PREFIX=${${package}ExternalDir}/install\n"
+             "UPDATE_COMMAND git submodule update --recursive --init ${PROJECT_SOURCE_DIR}/thirdparty/${package}\n"
+             "SOURCE_DIR ${PROJECT_SOURCE_DIR}/thirdparty/${package}\n"
+             "BINARY_DIR ${${package}ExternalDir}/build\n"
+             ")\n")

-        if(NOT EXECUTE_RESULT EQUAL 0)
-            message(FATAL_ERROR "Failed updating Git submodule ${package}")
-        endif()
+         execute_process(COMMAND ${CMAKE_COMMAND}
+             -G ${CMAKE_GENERATOR}
+             -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+             WORKING_DIRECTORY ${${package}ExternalDir}
+             RESULT_VARIABLE EXECUTE_RESULT
+             )

-        include(ExternalProject)
+         if(NOT EXECUTE_RESULT EQUAL 0)
+             message(FATAL_ERROR "Cannot configure Git submodule ${package}")
+         endif()

-        ExternalProject_Add(${package}
-            CONFIGURE_COMMAND ${CMAKE_COMMAND}
-            ${PROJECT_SOURCE_DIR}/thirdparty/${package}
-            -G ${CMAKE_GENERATOR}
-            -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-            -DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR}/external-install
-            SOURCE_DIR ${PROJECT_SOURCE_DIR}/thirdparty/${package}
-            BINARY_DIR ${PROJECT_BINARY_DIR}/external-build/${package}
-            )
-    else()
+         execute_process(COMMAND ${CMAKE_COMMAND} --build .
+             WORKING_DIRECTORY ${${package}ExternalDir}
+             RESULT_VARIABLE EXECUTE_RESULT
+             )

-        find_package(${package})
+         if(NOT EXECUTE_RESULT EQUAL 0)
+             message(FATAL_ERROR "Cannot build Git submodule ${package}")
+         endif()
+
+         set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${${package}ExternalDir}/install)

     endif()
+
+    find_package(${package})
+
 endmacro()

 macro(install_eprosima_fastcdr)
     if(MSVC OR MSVC_IDE)
         # Install includes
-        if(EPROSIMA_BUILD)
-            install(DIRECTORY ${PROJECT_BINARY_DIR}/external-install/include/fastcdr
-                DESTINATION ${INCLUDE_INSTALL_DIR}
-                COMPONENT headers
-                )
-        else()
-            install(DIRECTORY ${fastcdr_INCLUDE_DIR}/fastcdr
-                DESTINATION ${INCLUDE_INSTALL_DIR}
-                COMPONENT headers
-                )
-        endif()
+        install(DIRECTORY ${fastcdr_INCLUDE_DIR}/fastcdr
+            DESTINATION ${INCLUDE_INSTALL_DIR}
+            COMPONENT headers
+            )

         if(EPROSIMA_INSTALLER)
-            install(DIRECTORY ${PROJECT_BINARY_DIR}/../i86Win32VS2010/external-install/lib/i86Win32VS2010
+            install(DIRECTORY ${PROJECT_BINARY_DIR}/../i86Win32VS2010/external/fastcdr/install/lib/i86Win32VS2010
                 DESTINATION ${LIB_INSTALL_DIR}
                 COMPONENT libraries_i86Win32VS2010
                 )
-            install(DIRECTORY ${PROJECT_BINARY_DIR}/../x64Win64VS2010/external-install/lib/x64Win64VS2010
+            install(DIRECTORY ${PROJECT_BINARY_DIR}/../x64Win64VS2010/external/fastcdr/install/lib/x64Win64VS2010
                 DESTINATION ${LIB_INSTALL_DIR}
                 COMPONENT libraries_x64Win64VS2010
                 )
-            install(DIRECTORY ${PROJECT_BINARY_DIR}/../i86Win32VS2013/external-install/lib/i86Win32VS2013
+            install(DIRECTORY ${PROJECT_BINARY_DIR}/../i86Win32VS2013/external/fastcdr/install/lib/i86Win32VS2013
                 DESTINATION ${LIB_INSTALL_DIR}
                 COMPONENT libraries_i86Win32VS2013
                 )
-            install(DIRECTORY ${PROJECT_BINARY_DIR}/../x64Win64VS2013/external-install/lib/x64Win64VS2013
+            install(DIRECTORY ${PROJECT_BINARY_DIR}/../x64Win64VS2013/external/fastcdr/install/lib/x64Win64VS2013
                 DESTINATION ${LIB_INSTALL_DIR}
                 COMPONENT libraries_x64Win64VS2013
                 )
         else()
-            if(EPROSIMA_BUILD)
-                install(DIRECTORY ${PROJECT_BINARY_DIR}/external-install/lib/${MSVC_ARCH}
-                    DESTINATION ${LIB_INSTALL_DIR}
-                    COMPONENT libraries_${MSVC_ARCH}
-                    )
-            else()
-                install(DIRECTORY ${fastcdr_LIB_DIR}/${MSVC_ARCH}
-                    DESTINATION ${LIB_INSTALL_DIR}
-                    COMPONENT libraries_${MSVC_ARCH}
-                    )
-            endif()
+            #install(DIRECTORY ${PROJECT_BINARY_DIR}/external-install/lib/${MSVC_ARCH}
+            #    DESTINATION ${LIB_INSTALL_DIR}
+            #    COMPONENT libraries_${MSVC_ARCH}
+            #    )
+            install(DIRECTORY ${fastcdr_LIB_DIR}/${MSVC_ARCH}
+                DESTINATION ${LIB_INSTALL_DIR}
+                COMPONENT libraries_${MSVC_ARCH}
+                )
         endif()

         # Install license
         if(EPROSIMA_BUILD)
-            install(FILES ${PROJECT_BINARY_DIR}/external-install/FASTCDR_LIBRARY_LICENSE.txt
+            install(FILES ${PROJECT_BINARY_DIR}/external/fastcdr/install/FASTCDR_LIBRARY_LICENSE.txt
                 DESTINATION .
                 )
         else()


build: create _objs target for each library

Type: improvement
Change-Id: I260580cf2d32ff949f44d80c764937ee6102486c
Signed-off-by: Damjan Marion <9141bba8b2efed526e55cf796d48631af330ad98@cisco.com>

--- src/cmake/library.cmake
+++ src/cmake/library.cmake
@@ -19,7 +19,13 @@
     ${ARGN}
   )

-  add_library(${lib} SHARED ${ARG_SOURCES})
+  set (lo ${lib}_objs)
+  add_library(${lo} OBJECT ${ARG_SOURCES})
+  set_target_properties(${lo} PROPERTIES POSITION_INDEPENDENT_CODE ON)
+
+  add_library(${lib} SHARED)
+  target_sources(${lib} PRIVATE $<TARGET_OBJECTS:${lo}>)
+
   if(VPP_LIB_VERSION)
     set_target_properties(${lib} PROPERTIES SOVERSION ${VPP_LIB_VERSION})
   endif()
@@ -39,6 +45,7 @@
   )

   if (ARG_LTO AND VPP_USE_LTO)
+     set_property(TARGET ${lo} PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
      set_property(TARGET ${lib} PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
      target_compile_options (${lib} PRIVATE "-ffunction-sections")
      target_compile_options (${lib} PRIVATE "-fdata-sections")
@@ -66,11 +73,11 @@
   endif()

   if(NOT VPP_EXTERNAL_PROJECT)
-    add_dependencies(${lib} api_headers)
+    add_dependencies(${lo} api_headers)
   endif()

   if(ARG_DEPENDS)
-    add_dependencies(${lib} ${ARG_DEPENDS})
+    add_dependencies(${lo} ${ARG_DEPENDS})
   endif()

   # install headers


default off

default off

--- Plugins/PluginList.cmake
+++ Plugins/PluginList.cmake
@@ -30,7 +30,7 @@
   org.mitk.gui.qt.igttracking:OFF
   org.mitk.gui.qt.imagecropper:OFF
   org.mitk.gui.qt.imagenavigator:ON
-  org.mitk.gui.qt.candystore:ON
+  org.mitk.gui.qt.candystore:OFF
   org.mitk.gui.qt.materialeditor:OFF
   org.mitk.gui.qt.measurementtoolbox:OFF
   org.mitk.gui.qt.moviemaker:OFF


Solved bug: compiler hardcoded

Solved bug: compiler hardcoded

--- hfetch/cmake/FindTBB.cmake
+++ hfetch/cmake/FindTBB.cmake
@@ -164,9 +164,9 @@
     #       <arch>/gcc4.1. For now, assume that the compiler is more recent than
     #       gcc 4.4.x or later.
     if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
-      set(TBB_LIB_PATH_SUFFIX "lib/intel64/gcc4.4")
+      set(TBB_LIB_PATH_SUFFIX "lib/intel64/")
     elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
-      set(TBB_LIB_PATH_SUFFIX "lib/ia32/gcc4.4")
+      set(TBB_LIB_PATH_SUFFIX "lib/ia32/")
     endif()
   endif()


ffmpeg/4.x: update FFmpeg plugin

ffmpeg/4.x: update FFmpeg plugin

--- 3rdparty/ffmpeg/ffmpeg.cmake
+++ 3rdparty/ffmpeg/ffmpeg.cmake
@@ -1,8 +1,8 @@
-# Binaries branch name: ffmpeg/master_20191119
-# Binaries were created for OpenCV: 318cba4ce37319ba0b0870aab384d5dc066bb124
-ocv_update(FFMPEG_BINARIES_COMMIT "a66a24e9f410ae05da4baeeb8b451912664ce49c")
-ocv_update(FFMPEG_FILE_HASH_BIN32 "5de6044cad9398549e57bc46fc13908d")
-ocv_update(FFMPEG_FILE_HASH_BIN64 "55c0bc8ad27db00116fabf06508de196")
+# Binaries branch name: ffmpeg/master_20200311
+# Binaries were created for OpenCV: 850414a501d5e6dba111c92d73fdd05794c7061d
+ocv_update(FFMPEG_BINARIES_COMMIT "3d2e97081683265950316c65a52c2e8858ffba1b")
+ocv_update(FFMPEG_FILE_HASH_BIN32 "3b094c37d270a30f0b20a0bc8d3ecafb")
+ocv_update(FFMPEG_FILE_HASH_BIN64 "388ee23a7ca44eef2344e265fafd5940")
 ocv_update(FFMPEG_FILE_HASH_CMAKE "ad57c038ba34b868277ccbe6dd0f9602")

 function(download_win_ffmpeg script_var)


BUG: CMake build errors

BUG: CMake build errors

Removed quotes from URL and URL_HASH commands that were causing build errors.

--- CMake/itkExternal_FFTW.cmake
+++ CMake/itkExternal_FFTW.cmake
@@ -95,7 +95,7 @@
       itk_download_attempt_check(FFTW)
       ExternalProject_add(fftwf
         PREFIX fftwf
-        URL "${_fftw_url}"
+        URL ${_fftw_url}
         URL_HASH SHA512=${_fftw_url_hash}
         DOWNLOAD_NAME "fftw-${_fftw_target_version}.tar.gz"
         CONFIGURE_COMMAND
@@ -123,7 +123,7 @@
       itk_download_attempt_check(FFTW)
       ExternalProject_add(fftwd
         PREFIX fftwd
-        URL "${_fftw_url}"
+        URL ${_fftw_url}
         URL_HASH SHA512=${_fftw_url_hash}
         DOWNLOAD_NAME "fftw-${_fftw_target_version}.tar.gz"
         CONFIGURE_COMMAND


Copy translation files to installer

Copy translation files to installer

--- CMake/mitkInstallRules.cmake
+++ CMake/mitkInstallRules.cmake
@@ -82,6 +82,9 @@
     install(DIRECTORY "${_qmake_path}/../resources/"
             DESTINATION "bin/resources/"
             CONFIGURATIONS Release)
+    install(DIRECTORY "${_qmake_path}/../translations/qtwebengine_locales/"
+            DESTINATION "bin/translations/qtwebengine_locales/"
+            CONFIGURATIONS Release)
     install(FILES "${_qmake_path}/../plugins/platforms/qwindowsd.dll"
             DESTINATION "bin/plugins/platforms"
             CONFIGURATIONS Debug)
@@ -96,6 +99,9 @@
             CONFIGURATIONS Debug)
     install(DIRECTORY "${_qmake_path}/../resources/"
             DESTINATION "bin/resources/"
+            CONFIGURATIONS Debug)
+    install(DIRECTORY "${_qmake_path}/../translations/qtwebengine_locales/"
+            DESTINATION "bin/translations/qtwebengine_locales/"
             CONFIGURATIONS Debug)
   endif()

@@ -154,6 +160,8 @@
         MITK_INSTALL_HELPER_APP( EXECUTABLES "${_qmake_path}/../libexec/QtWebEngineProcess")
         install(DIRECTORY "${_qmake_path}/../resources/"
             DESTINATION "bin/resources/")
+        install(DIRECTORY "${_qmake_path}/../translations/qtwebengine_locales/"
+            DESTINATION "bin/translations/qtwebengine_locales/")
     endif()
   endif()


Override item resolution for org_blueberry_osgi on MacOS.

This fixes the case for building packages with multiple executables.

--- CMake/mitkMacroInstall.cmake
+++ CMake/mitkMacroInstall.cmake
@@ -79,16 +79,14 @@
       endif()
     endmacro(gp_resolved_file_type_override)

-    if(NOT APPLE)
-      if(UNIX OR MINGW)
-        macro(gp_resolve_item_override context item exepath dirs resolved_item_var resolved_var)
-          if(\${item} MATCHES \"blueberry_osgi\")
-            get_filename_component(_item_name \${item} NAME)
-            set(\${resolved_item_var} \"\${exepath}/plugins/\${_item_name}\")
-            set(\${resolved_var} 1)
-          endif()
-        endmacro()
-      endif()
+    if(UNIX OR MINGW)
+      macro(gp_resolve_item_override context item exepath dirs resolved_item_var resolved_var)
+        if(\${item} MATCHES \"blueberry_osgi\")
+          get_filename_component(_item_name \${item} NAME)
+          set(\${resolved_item_var} \"\${exepath}/plugins/\${_item_name}\")
+          set(\${resolved_var} 1)
+        endif()
+      endmacro()
     endif()

     if(\"${_install_GLOB_PLUGINS}\" STREQUAL \"TRUE\")


- fix wrong name for static lib on unix based os with multi generator compilers
- fix permissions for static lib (they have the same as all other libs now)

git-svn-id: e0b5bbb11d0e9fdbbfcabba14dc32ad5d6b235bd@1139 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/ACGCommon.cmake
+++ cmake/ACGCommon.cmake
@@ -628,6 +628,8 @@

     # set common target properties defined in common.cmake
     acg_set_target_props (${_target}Static)
+
+    set_target_properties(${_target}Static PROPERTIES OUTPUT_NAME ${_target})

     if (NOT APPLE)
       set_target_properties (${_target}Static PROPERTIES
@@ -678,18 +680,11 @@
   endif(WIN32 OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE))

   if (_and_static)
-    if( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
-      set ( postfix ${CMAKE_DEBUG_POSTFIX} )
-    else ()
-      set ( postfix "" )
-    endif ()
-
-    set( fullname ${_target}${postfix} )
     add_custom_command (TARGET ${_target}Static POST_BUILD
                         COMMAND ${CMAKE_COMMAND} -E
                         copy_if_different
                           $<TARGET_FILE:${_target}Static>
-                          ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/lib${fullname}.a)
+                          ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/$<TARGET_FILE_NAME:${_target}Static>)

   endif ()

@@ -703,10 +698,8 @@
                  LIBRARY DESTINATION ${ACG_PROJECT_LIBDIR}
                  ARCHIVE DESTINATION ${ACG_PROJECT_LIBDIR})
         if (_and_static)
-          install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${_target}Static${postfix}.a
-                   DESTINATION ${ACG_PROJECT_LIBDIR}
-                   RENAME lib${fullname}.a
-                   PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+          install (TARGETS ${_target}Static
+                   DESTINATION ${ACG_PROJECT_LIBDIR})
         endif ()
       elseif (${_type} STREQUAL MODULE)
         install (TARGETS ${_target} DESTINATION ${ACG_PROJECT_PLUGINDIR})


[cppcheck] don't force all configs

[cppcheck] don't force all configs

--- cmake/DuneUtils.cmake
+++ cmake/DuneUtils.cmake
@@ -62,7 +62,7 @@
 			FILE( APPEND  ${CPPINLINST}  "${SOURCEFILE}\n" )
 		ENDFOREACH( SOURCEFILE )
 		TO_LIST_SPACES( PLAIN_INCLUDE_DIRS CPPCHECK_FLAGS_SPLIT )
-		ADD_CUSTOM_TARGET(  cppcheck cppcheck --xml --enable=all -f --quiet --file-list=${CPPINLINST}
+		ADD_CUSTOM_TARGET(  cppcheck cppcheck --xml --enable=all --report-progress --file-list=${CPPINLINST}
 				${CPPCHECK_FLAGS_SPLIT}  2>cppcheck.xml )
 	ELSE( EXISTS ${CPPCHECK_BINARY} )
 		MESSAGE( STATUS "Not adding cppcheck target because cppcheck executable not found" )


Applying small ACME patch

Applying small ACME patch

Removing unavailable includes

--- cmake/acme/acme.cmake
+++ cmake/acme/acme.cmake
@@ -49,8 +49,8 @@

 INCLUDE(${ACME_PATH}/internal/config.cmake)
 INCLUDE(${ACME_PATH}/internal/functions.cmake)
-INCLUDE(${ACME_PATH}/test/test.cmake)
-INCLUDE(${ACME_PATH}/test/testcases.cmake)
+#INCLUDE(${ACME_PATH}/test/test.cmake)
+#INCLUDE(${ACME_PATH}/test/testcases.cmake)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 08)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

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


Activate "warnings treated as errors" for gcc.

--- cmake/EthCompilerSettings.cmake
+++ cmake/EthCompilerSettings.cmake
@@ -3,7 +3,7 @@
 # C++11 check and activation
 if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")

-	set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra -DSHAREDLIB -fPIC")
+	set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra -Werror -DSHAREDLIB -fPIC")
 	set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g -DETH_DEBUG")
 	set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG -DETH_RELEASE")
 	set(CMAKE_CXX_FLAGS_RELEASE        "-O3 -DNDEBUG -DETH_RELEASE")


typechecker-regex-prototype: fix debian packagedb suffix

--- cmake/Modules/FindHaskell.cmake
+++ cmake/Modules/FindHaskell.cmake
@@ -52,6 +52,7 @@

 	# correct the mapping..
 	string (REPLACE "apple-darwin" "osx" GHC_TARGET_PLATFORM2 ${GHC_TARGET_PLATFORM})
+	string (REPLACE "unknown-linux" "linux" GHC_TARGET_PLATFORM2 ${GHC_TARGET_PLATFORM2})

 	# normalize the result variables, 0 means success which corresponds to 1 in cmake booleans
 	if (GHC_HSPEC_FOUND EQUAL 0)


Little change

Little change

--- cmake/dev/boost_libraries.cmake
+++ cmake/dev/boost_libraries.cmake
@@ -11,7 +11,10 @@
     set(Boost_USE_MULTITHREADED ON)
     set(Boost_USE_STATIC_RUNTIME OFF)
     if(WIN32 AND EPROSIMA_BOOST)
-        set(BOOST_LIBRARYDIR $ENV{BOOST_LIBRARYDIR}/${MSVC_ARCH})
+        set(BOOST_LIBRARYDIR_ $ENV{BOOST_LIBRARYDIR})
+        if(BOOST_LIBRARYDIR_)
+            file(TO_CMAKE_PATH "${BOOST_LIBRARYDIR_}/${MSVC_ARCH}" BOOST_LIBRARYDIR)
+        endif()
     endif()
     find_package(Boost REQUIRED COMPONENTS ${ARGN})
     if(NOT Boost_FOUND)


Add distortosMax() CMake function

Add distortosMax() CMake function

--- cmake/distortos-utilities.cmake
+++ cmake/distortos-utilities.cmake
@@ -99,6 +99,25 @@
 function(distortosMap target mapFilename)
 	target_link_libraries(${target} PRIVATE
 			-Xlinker -Map="${CMAKE_CURRENT_BINARY_DIR}/${mapFilename}")
+endfunction()
+
+#
+# Returns max value from the list of integers (passed after named arguments, at least one must be present) in variable
+# `output`.
+#
+
+function(distortosMax output)
+	if(ARGC LESS 2)
+		message(FATAL_ERROR "List of integers not provided")
+	endif()
+	unset(max)
+	foreach(item ${ARGN})
+		distortosCheckInteger("item" ${item} -2147483648 2147483647)
+		if(NOT DEFINED max OR max LESS item)
+			set(max ${item})
+		endif()
+	endforeach()
+	set("${output}" "${max}" PARENT_SCOPE)
 endfunction()

 #


Tweak commentary + message output for HAVE_TCL_GT_84.

svn path=/trunk/; revision=8127

--- cmake/modules/tcl-related.cmake
+++ cmake/modules/tcl-related.cmake
@@ -59,7 +59,12 @@
   find_package(TCL)
   # Supplement those results with iTcl and iTk include paths and libraries.
   if(TCL_FOUND)
+    # FIXME.  Replace this user option (which they can set incorrectly) by
+    # the automatic determination of HAVE_TCL_GT_84.  What is needed is
+    # a CMake cross-platform test for Tcl version plus the appropriate
+    # CMake logic to determine HAVE_TCL_GT_84 from that version number.
     option(HAVE_TCL_GT_84 "if Tcl version is greater than 8.4" OFF)
+    message(STATUS "HAVE_TCL_GT_84 = ${HAVE_TCL_GT_84}")
     message(STATUS
     "Looking for include paths and libraries for Tcl/Tk - found"
     )


Small XQDoc fix for the cases where the build folder is not under the folder where the Zorba was checked out.

--- cmake_modules/ZorbaModule.cmake
+++ cmake_modules/ZorbaModule.cmake
@@ -660,7 +660,7 @@
   )

   SET(ZORBA_XHTML_REQUISITES_PATH
-      ${Zorba_DIR}/../doc/zorba/xqdoc
+      ${CMAKE_SOURCE_DIR}/doc/zorba/xqdoc
       CACHE PATH
       "Dir where to the XHTML requisites are stored.")
   ADD_CUSTOM_TARGET(xqdoc


SDL is no good

SDL is no good

--- lib/TH/cmake/FindMKL.cmake
+++ lib/TH/cmake/FindMKL.cmake
@@ -136,12 +136,6 @@
   ENDIF(_libraries_work)
 ENDMACRO(CHECK_ALL_LIBRARIES)

-# SDL
-IF (NOT MKL_LIBRARIES)
-  CHECK_ALL_LIBRARIES(MKL_LIBRARIES cblas_sgemm
-    "mkl_rt;iomp5" "")
-ENDIF (NOT MKL_LIBRARIES)
-
 # Check for version 10/11
 IF (NOT MKL_LIBRARIES)
   SET(MKL_VERSION 1011)


[cmake] add build option to configure outgoing beacon payload (#7782)

--- etc/cmake/options.cmake
+++ etc/cmake/options.cmake
@@ -360,6 +360,11 @@
     target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE=1")
 endif()

+option(OT_TX_BEACON_PAYLOAD "enable Thread beacon payload in outgoing beacons")
+if (OT_TX_BEACON_PAYLOAD)
+    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_MAC_OUTGOING_BEACON_PAYLOAD_ENABLE=1")
+endif()
+
 option(OT_UDP_FORWARD "enable UDP forward support")
 if(OT_UDP_FORWARD)
     target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=1")


Fixup qt

Fixup qt

PythonQt actually needs Qt tools

--- Superbuild/Projects/qt.cmake
+++ Superbuild/Projects/qt.cmake
@@ -12,8 +12,9 @@
                     ${SuperBuild_PROJECTS_DIR}/patches/qt.src.3rdparty.webkit.Source.WebKit.pri
                     <SOURCE_DIR>/src/3rdparty/webkit/Source/WebKit.pri)
 elseif (APPLE)
-  if (NOT DEFINED CMAKE_OSX_SYSROOT OR NOT DEFINED CMAKE_OSX_ARCHITECTURES)
-    message(FATAL "CMAKE_OSX_SYSROOT or CMAKE_OSX_ARCHITECTURES are not configured")
+  if ((NOT DEFINED CMAKE_OSX_SYSROOT OR CMAKE_OSX_SYSROOT STREQUAL "")
+      OR (NOT DEFINED CMAKE_OSX_ARCHITECTURES OR CMAKE_OSX_ARCHITECTURES STREQUAL ""))
+    message(FATAL_ERROR "CMAKE_OSX_SYSROOT or CMAKE_OSX_ARCHITECTURES are not configured")
   endif()
   list (APPEND qt_options
               #-sdk ${CMAKE_OSX_SYSROOT} #corewlan is failing on 10.9 with 10.11 sdk
@@ -47,7 +48,7 @@
                       -nomake demos
                       -nomake examples
                       -nomake tests
-                      -nomake tools
+                      #-nomake tools
                       -nomake docs
                       -no-multimedia
                       -no-openssl


bugfix for CI, replace git apply with patch command

--- Superbuild/Projects/qt.cmake
+++ Superbuild/Projects/qt.cmake
@@ -29,7 +29,7 @@
   set (patch_command
        PATCH_COMMAND /usr/bin/find . -name "*.pro" -exec sed -i -e "s:/Developer/SDKs/:.*:g" {} +)
   add_external_project_step(qt-patch-osx
-    COMMAND git apply --whitespace=fix ${SuperBuild_PROJECTS_DIR}/patches/qt.elcapitan-macossdk.patch
+    COMMAND patch -p1 < ${SuperBuild_PROJECTS_DIR}/patches/qt.elcapitan-macossdk.patch
     WORKING_DIRECTORY <SOURCE_DIR>
     DEPENDEES patch
     DEPENDERS configure)


STYLE: Remove unused variable from "Common.cmake"

--- Common.cmake
+++ Common.cmake
@@ -22,8 +22,6 @@
   option(BUILD_TESTING "tests" ON)
   set(ShapePopulationViewer_BUILD_TESTING ${BUILD_TESTING})
 endif()
-
-set(PRIMARY_PROJECT_NAME ${LOCAL_PROJECT_NAME})

 #-----------------------------------------------------------------------------
 # Sanity checks


Fix OpenMP linking with xlC

Fix OpenMP linking with xlC

--- Common.cmake
+++ Common.cmake
@@ -79,7 +79,7 @@
 elseif(CMAKE_COMPILER_IS_XLCXX)
   set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -qnosmp")
   set(CMAKE_CC_FLAGS_DEBUG "${CMAKE_CC_FLAGS_DEBUG} -qnosmp")
-  set(CMAKE_LD_FLAGS_DEBUG "${CMAKE_CC_FLAGS_DEBUG} -qnosmp")
+  set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -qsmp")
 endif()

 if(MSVC)


fix indentation

fix indentation

--- python_cmake_module/cmake/Modules/FindPythonExtra.cmake
+++ python_cmake_module/cmake/Modules/FindPythonExtra.cmake
@@ -186,7 +186,7 @@
       "${_output}"
       CACHE INTERNAL
       "The MULTIARCH suffix for Python native extensions. See PEP-3149: https://www.python.org/dev/peps/pep-3149/.")
-endif()
+  endif()

   if("${PYTHON_SOABI} " STREQUAL " " OR "${PYTHON_SOABI} " STREQUAL "None ")
     set(PythonExtra_EXTENSION_SUFFIX


fptu: subtree-pull erthink upstream (fix for modern gtest).

Merge commit 'a4428d17ca8991d3ecd0b8e2ae409db793eaf578' into stable/0.x

--- src/erthink/cmake/testing.cmake
+++ src/erthink/cmake/testing.cmake
@@ -17,6 +17,15 @@
 include(CTest)
 if(BUILD_TESTING)
   cmake_policy(PUSH)
+  if(NOT DEFINED BUILD_GTEST)
+    set(BUILD_GTEST ON CACHE BOOL "Builds the googletest subproject")
+  endif()
+  if(NOT DEFINED BUILD_GMOCK)
+    set(BUILD_GMOCK OFF CACHE BOOL "Builds the googlemock subproject")
+  endif()
+  if(NOT DEFINED INSTALL_GTEST)
+    set(INSTALL_GTEST OFF CACHE BOOL "Enable installation of googletest")
+  endif()

   cmake_policy(SET CMP0042 NEW)
   cmake_policy(SET CMP0054 NEW)
@@ -69,12 +78,17 @@
         if(result)
           message(FATAL_ERROR "Build step for GoogleTest failed: ${result}")
         else()
-          set(gtest_root "${CMAKE_BINARY_DIR}/googletest-src/googletest")
+          set(gtest_root "${CMAKE_BINARY_DIR}/googletest-src")
         endif()
       endif()
     endif()

     if(gtest_root)
+      get_filename_component(gtest_root "${gtest_root}" REALPATH)
+      if(EXISTS "${gtest_root}/../googlemock/CMakeLists.txt"
+          AND EXISTS "${gtest_root}/../CMakeLists.txt")
+        get_filename_component(gtest_root "${gtest_root}/.." ABSOLUTE)
+      endif()
       unset(GTEST_INCLUDE_DIR CACHE)
       unset(GTEST_LIBRARY CACHE)
       unset(GTEST_LIBRARY_DEBUG CACHE)


Create fake_output_library() cmake function.

--- external/External.cmake
+++ external/External.cmake
@@ -18,6 +18,17 @@

     # update result.
     set (${__result} ${${__result}} PARENT_SCOPE)
+endfunction ()
+
+#/// A fake function to inject dependencies into the output file of ExternalProject.
+#///
+#/// @param __name [in] Print name.
+#/// @param __deps [in] Dependencies.
+#/// @param __libs [in] Libraries.
+function (fake_output_library __name __deps __libs)
+    add_custom_command (OUTPUT  ${__libs}
+                        COMMAND ${CMAKE_COMMAND} -E echo "Fake output: ${__name}"
+                        DEPENDS ${__deps})
 endfunction ()

 string (TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
@@ -55,7 +66,6 @@

 if (uv_EXT_EXISTS)
     message (STATUS "Skip external/uv (Exists: ${uv_EXT_STATIC_LIB})")
-    add_custom_target (uv DEPENDS ${uv_EXT_LIBRARIES})
 else ()
     message (STATUS "Add external/uv")
     ExternalProject_Add (uv_ext
@@ -78,8 +88,9 @@
             LOG_BUILD     0
             LOG_TEST      1
             LOG_INSTALL   1)
-    add_custom_target (uv DEPENDS uv_ext)
+    fake_output_library (uv_ext_output uv_ext "${uv_EXT_LIBRARIES}")
 endif ()
+add_custom_target (uv DEPENDS ${uv_EXT_LIBRARIES})

 ##########
 ## ZLIB ##
@@ -103,7 +114,6 @@

 if (zlib_EXT_EXISTS)
     message (STATUS "Skip external/zlib (Exists: ${zlib_EXT_STATIC_LIB})")
-    add_custom_target (zlib DEPENDS ${zlib_EXT_LIBRARIES})
 else ()
     message (STATUS "Add external/zlib")
     ExternalProject_Add (zlib_ext
@@ -126,8 +136,9 @@
             LOG_BUILD     0
             LOG_TEST      1
             LOG_INSTALL   1)
-    add_custom_target (zlib DEPENDS zlib_ext)
+    fake_output_library (zlib_ext_output zlib_ext "${zlib_EXT_LIBRARIES}")
 endif ()
+add_custom_target (zlib DEPENDS ${zlib_EXT_LIBRARIES})

 ##############
 ## LIBRESSL ##
@@ -147,7 +158,6 @@
     message (STATUS "Skip external/ressl_crypto (Exists: ${ressl_crypto_EXT_STATIC_LIB})")
     message (STATUS "Skip external/ressl_ssl (Exists: ${ressl_ssl_EXT_STATIC_LIB})")
     message (STATUS "Skip external/ressl_tls (Exists: ${ressl_tls_EXT_STATIC_LIB})")
-    add_custom_target (ressl DEPENDS ${ressl_EXT_LIBRARIES})
 else ()
     message (STATUS "Add external/ressl")
     ExternalProject_Add (ressl_ext
@@ -170,6 +180,7 @@
             LOG_BUILD     0
             LOG_TEST      1
             LOG_INSTALL   1)
-    add_custom_target (ressl DEPENDS ressl_ext)
+    fake_output_library (ressl_ext_output ressl_ext "${ressl_EXT_LIBRARIES}")
 endif ()
+add_custom_target (ressl DEPENDS ${ressl_EXT_LIBRARIES})


Fix missing -lpthread

Fix missing -lpthread

--- src/cmake/modules/FindOpenEXR.cmake
+++ src/cmake/modules/FindOpenEXR.cmake
@@ -87,6 +87,11 @@
               PATHS ${GENERIC_LIBRARY_PATHS} NO_DEFAULT_PATH)
 find_library (OPENEXR_HALF_LIBRARY ${OPENEXR_CUSTOM_LIB_PREFIX}Half)

+# Link with pthreads if required
+find_package (Threads)
+if (CMAKE_USE_PTHREADS_INIT)
+    set (ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT})
+endif ()

 # Set the FOUND, INCLUDE_DIR, and LIBRARIES variables.
 if (ILMBASE_INCLUDE_PATH AND OPENEXR_INCLUDE_PATH AND
@@ -96,7 +101,7 @@
     set (ILMBASE_FOUND TRUE)
     set (ILMBASE_INCLUDE_DIR ${ILMBASE_INCLUDE_PATH} CACHE STRING "The include paths needed to use IlmBase")
     set (OPENEXR_INCLUDE_DIR ${OPENEXR_INCLUDE_PATH} CACHE STRING "The include paths needed to use OpenEXR")
-    set (ILMBASE_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} CACHE STRING "The libraries needed to use IlmBase")
+    set (ILMBASE_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ILMBASE_PTHREADS} CACHE STRING "The libraries needed to use IlmBase")
     set (OPENEXR_LIBRARIES ${OPENEXR_ILMIMF_LIBRARY} ${ILMBASE_LIBRARIES} ${ZLIB_LIBRARY} CACHE STRING "The libraries needed to use OpenEXR")
 endif ()


New version: 0.4.1

New version: 0.4.1

--- hawkey/VERSION.cmake
+++ hawkey/VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "4")
-SET(HAWKEY_PATCH "0")
+SET(HAWKEY_PATCH "1")


coverage: lcov needs absolute paths (some versions)

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

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -1985,7 +1985,8 @@
         COMMAND ${XP_PATH_LCOV} --capture --initial --directory ${CMAKE_BINARY_DIR} --output-file ${PROJECT_NAME}-base.info
         COMMAND make test
         COMMAND ${XP_PATH_LCOV} --directory ${CMAKE_BINARY_DIR} --capture --output-file ${PROJECT_NAME}-test.info
-        COMMAND ${XP_PATH_LCOV} -a ${PROJECT_NAME}-base.info -a ${PROJECT_NAME}-test.info -o ${PROJECT_NAME}.info
+        COMMAND ${XP_PATH_LCOV} -a ${CMAKE_BINARY_DIR}/${PROJECT_NAME}-base.info
+          -a ${CMAKE_BINARY_DIR}/${PROJECT_NAME}-test.info -o ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.info
         COMMAND ${XP_PATH_LCOV} --remove ${PROJECT_NAME}.info ${XP_COVERAGE_RM} --output-file ${PROJECT_NAME}-cleaned.info
         COMMAND ${XP_PATH_GENHTML} -o report ${PROJECT_NAME}-cleaned.info
         COMMAND ${CMAKE_COMMAND} -E remove ${PROJECT_NAME}*.info


STYLE: Remove unused include directory

STYLE: Remove unused include directory

The GraphTheory directory does not exist.

--- ANTS.cmake
+++ ANTS.cmake
@@ -108,7 +108,7 @@
   ${CMAKE_CURRENT_SOURCE_DIR}/Utilities
   ${CMAKE_CURRENT_SOURCE_DIR}/ImageRegistration
   ${CMAKE_CURRENT_SOURCE_DIR}/ImageSegmentation
-  ${CMAKE_CURRENT_SOURCE_DIR}/GraphTheory
+#  ${CMAKE_CURRENT_SOURCE_DIR}/GraphTheory
   ${CMAKE_CURRENT_SOURCE_DIR}/Tensor
   ${CMAKE_CURRENT_SOURCE_DIR}/Temporary
   ${CMAKE_CURRENT_SOURCE_DIR}/Examples


Remove empty ENGINE_PARAMS arguments

Remove empty ENGINE_PARAMS arguments

--- testing/adios2/engine/staging-common/TestSupp.cmake
+++ testing/adios2/engine/staging-common/TestSupp.cmake
@@ -48,26 +48,26 @@

 function(remove_engine_params_placeholder dst_str src_str )
-      message (STATUS "before replace, src_string is ${src_str}")
     string(REGEX REPLACE "([^ 		  ]*),ENGINE_PARAMS" "\\1" src_str "${src_str}")
-      message (STATUS "after replace, src_string is ${src_str}")
+    if ("{src_string}" MATCHES "ENGINE_PARAMS")
+       # empty engine params remains
+       string(REGEX REPLACE "-warg *--engine_params *-warg *ENGINE_PARAMS" "" src_str "${src_str}")
+       string(REGEX REPLACE "-arg *ENGINE_PARAMS" "" src_str "${src_str}")
+    endif()
+
   set(${dst_str} ${src_str} PARENT_SCOPE)
 endfunction()

 function(add_engine_param dst_string src_string engine_param)
   set (tmp_string "")
-  message(STATUS "before add engine Src string is ${src_string}")
   if("${src_string}" MATCHES ",ENGINE_PARAMS")
       string(REGEX REPLACE ",ENGINE_PARAMS" ",${engine_param},ENGINE_PARAMS" tmp_string ${src_string})
-      message(status "ding first")
   elseif("${src_string}" MATCHES "ENGINE_PARAMS")
       string(REGEX REPLACE "ENGINE_PARAMS" "${engine_param},ENGINE_PARAMS" tmp_string ${src_string})
-      message(status "ding second")
   else ()
        message(WARNING "ENGINE_PARAMS not found in string ${src_string}")
   endif ()

-  message(STATUS "after add engine Src string is ${src_string}")
   set(${dst_string} "${tmp_string}" PARENT_SCOPE)
 endfunction()

@@ -79,11 +79,8 @@
        message(SEND_ERROR "Staging-Common MutateTestSet ${basename} has no defined ${basename}_CMD")
     endif()
     add_engine_param(tmp_cmd "${${basename}_CMD}" ${param})
-    message(STATUS "New command is ${tmp_cmd}\n")
     set(${modname}_CMD ${tmp_cmd} PARENT_SCOPE)
-    message( STATUS "Establishing command ${modname}_CMD")
     if (NOT "${${basename}_TIMEOUT}" STREQUAL "")
-        message (STATUS "ACTUAL TIMEOUT SET for ${basename}_TIMEOUT, ${${basename}_TIMEOUT}")
         set(${modname}_TIMEOUT ${${basename}_TIMEOUT} PARENT_SCOPE)
     endif()
     if (NOT "${${basename}_PROPERTIES}" STREQUAL "")


continuing work on DEV-41722 normalizing shared lib staging.  fixed copy/paste error in the last commit(f5da14574943).

--- indra/cmake/Copy3rdPartyLibs.cmake
+++ indra/cmake/Copy3rdPartyLibs.cmake
@@ -188,6 +188,7 @@
             set(release_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELEASE}/libllkdu.so")
             set(relwithdebinfo_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}/libllkdu.so")
         endif (EXISTS "${release_src_dir}/libllkdu.so")
+    endif(NOT EXISTS ${internal_llkdu_path})
 else(WINDOWS)
     message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...")
     set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux")


CDRIVER-4468 revert additional ccache checks (#1100)

* Revert "Do not elide find_package() if MONGO_USE_CCACHE is set (#1031)"

This reverts commit 237bcf8cc2236b4ea1f0b23c0ee7c8c94bf75d6b.

* Revert "Disable ccache by default for versions older than 3.4.3 (#1029)"

This reverts commit f55cc6ab918a5b0b7647af56315c02a95079ab9f.

--- build/cmake/CCache.cmake
+++ build/cmake/CCache.cmake
@@ -8,42 +8,15 @@
     ON or OFF.
 ]]

+# Find and enable ccache for compiling
 find_program (CCACHE_EXECUTABLE ccache)
-
-# Enable ccache for compiling if not already configured.
-if (CCACHE_EXECUTABLE AND NOT DEFINED MONGO_USE_CCACHE)
+if (CCACHE_EXECUTABLE)
     message (STATUS "Found ccache: ${CCACHE_EXECUTABLE}")
-
-    execute_process (
-        COMMAND ${CCACHE_EXECUTABLE} --version | perl -ne "print $1 if /^ccache version (.+)$/"
-        OUTPUT_VARIABLE CCACHE_VERSION
-        OUTPUT_STRIP_TRAILING_WHITESPACE
-    )
-
-    # Assume `ccache --version` mentions a simple version string, e.g. "1.2.3".
-    # Permit patch number to be omitted, e.g. "1.2".
-    set (SIMPLE_SEMVER_REGEX "([0-9]+)\.([0-9]+)(\.([0-9]+))?")
-    string (REGEX MATCH "${SIMPLE_SEMVER_REGEX}" CCACHE_VERSION ${CCACHE_VERSION})
-
-    if (CCACHE_VERSION)
-        message (STATUS "Detected ccache version: ${CCACHE_VERSION}")
-    else ()
-        message (WARNING "Could not obtain ccache version from `ccache --version`. Defaulting to 0.1.0.")
-        set (CCACHE_VERSION 0.1.0)
-    endif ()
-
-    # Avoid spurious "ccache.conf: No such file or directory" errors due to ccache being invoked in parallel, which was patched in ccache version 3.4.3.
-    if (CCACHE_VERSION VERSION_LESS "3.4.3")
-        message (STATUS "Detected ccache version ${CCACHE_VERSION} is less than 3.4.3, which may lead to spurious failures when run in parallel. See https://github.com/ccache/ccache/issues/260 for more information.")
-        message (STATUS "Compiling with CCache disabled. Enable by setting MONGO_USE_CCACHE to ON")
-        option (MONGO_USE_CCACHE "Use CCache when compiling" OFF)
-    else ()
-        message (STATUS "Compiling with CCache enabled. Disable by setting MONGO_USE_CCACHE to OFF")
-        option (MONGO_USE_CCACHE "Use CCache when compiling" ON)
-    endif ()
-endif (CCACHE_EXECUTABLE AND NOT DEFINED MONGO_USE_CCACHE)
+    option (MONGO_USE_CCACHE "Use CCache when compiling" ON)
+endif ()

 if (MONGO_USE_CCACHE)
+    message (STATUS "Compiling with CCache enabled. Disable by setting MONGO_USE_CCACHE to OFF")
     set (CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}")
     set (CMAKE_C_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}")
 endif ()


fix linux.cmake

fix linux.cmake

--- mk/linux.cmake
+++ mk/linux.cmake
@@ -5,7 +5,7 @@

     LINK_DIRECTORIES(/usr/local/lib
         /usr/lib
-        ${PROJECT_SOURCE_DIR}/lib)
+        ${CMAKE_INSTALL_PREFIX}/lib)

     INCLUDE_DIRECTORIES(/usr/local/include
         ${PROJECT_SOURCE_DIR}/src/include)


Manually disable VTK leak check

Manually disable VTK leak check

--- CMake/BuildConfigurations/DiffusionRelease.cmake
+++ CMake/BuildConfigurations/DiffusionRelease.cmake
@@ -38,4 +38,5 @@
 # Enable console window
 set(MITK_SHOW_CONSOLE_WINDOW ON CACHE BOOL "Use this to enable or disable the console window when starting MITK GUI Applications" FORCE)

+set(MITK_VTK_DEBUG_LEAKS OFF CACHE BOOL "" FORCE)
 set(CMAKE_BUILD_TYPE Release CACHE STRING "" FORCE)


bugfix: toolchain: C_FLAGS were not used in final build commands


cmake 3.10 compatibility: pass absolute path to file(GENERATE) function (#195)

* cmake 3.10 compatibility: pass absolute path to file(GENERATE) function

* passing the right path to add_test is useful too

--- rcl/test/cmake/rcl_add_custom_launch_test.cmake
+++ rcl/test/cmake/rcl_add_custom_launch_test.cmake
@@ -29,9 +29,9 @@
     @ONLY
   )
   file(GENERATE
-    OUTPUT "test/${test_name}${target_suffix}_$<CONFIG>.py"
+    OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/test/${test_name}${target_suffix}_$<CONFIG>.py"
     INPUT "${CMAKE_CURRENT_BINARY_DIR}/${test_name}${target_suffix}.py.configure"
   )
-  ament_add_pytest_test(${test_name}${target_suffix} "${CMAKE_CURRENT_BINARY_DIR}/${test_name}${target_suffix}_$<CONFIG>.py" ${ARGN})
+  ament_add_pytest_test(${test_name}${target_suffix} "${CMAKE_CURRENT_BINARY_DIR}/test/${test_name}${target_suffix}_$<CONFIG>.py" ${ARGN})
   set_tests_properties(${test_name}${target_suffix} PROPERTIES DEPENDS "${executable1}${target_suffix} ${executable2}${target_suffix}")
 endmacro()


cake: fix automatic binary dir generation

--- cake-src/cake.cmake
+++ cake-src/cake.cmake
@@ -486,12 +486,32 @@
 	get_filename_component(src_dir_name "${cake_source_dir}" NAME)

 	file(TO_CMAKE_PATH "${proj_to_src_path}" proj_to_src_path) # make sure \ -> /
-	if(proj_to_src_path MATCHES "^\\.\\.")
+
+	# the default:
+	# CAKE_BINARY_DIR = CAKE_BINARY_DIR_PREFIX/<cid-made-from-source-dir-relative-to-CAKE_PROJECT_DIR>
+	# first handle the cases where this is not a good idea:
+	if(proj_to_src_path STREQUAL "")
+		# Example:
+		#   CAKE_PROJECT_DIR = /a/b/myproj
+		#   cake_source_dir = /a/b/myproj
+		#   -> CAKE_BINARY_DIR = CAKE_BINARY_DIR_PREFIX/_myproj_
+		set(CAKE_BINARY_DIR "${CAKE_BINARY_DIR_PREFIX}/_${src_dir_name}_")
+	elseif(proj_to_src_path MATCHES "^[.][.]") # = src dir is not inside CAKE_PROJECT_DIR
+		# Example:
+		#   CAKE_PROJECT_DIR = /a/b/myproj
+		#   cake_source_dir = /a/b/c
+		#   -> CAKE_BINARY_DIR = CAKE_BINARY_DIR_PREFIX/_a_b_c
 		string(MAKE_C_IDENTIFIER "${cake_source_dir}" cake_source_dir_cid)
 		set(CAKE_BINARY_DIR "${CAKE_BINARY_DIR_PREFIX}/${cake_source_dir_cid}")
-	elseif(proj_to_src_path STREQUAL "")
-		set(CAKE_BINARY_DIR "${CAKE_BINARY_DIR_PREFIX}/_${src_dir_name}_")
-	elseif(proj_to_src_path STREQUAL src_dir_name)
+	else()
+		# Example #1:
+		#   CAKE_PROJECT_DIR = /a/b/myproj
+		#   cake_source_dir = /a/b/myproj/myproj
+		#   -> CAKE_BINARY_DIR = CAKE_BINARY_DIR_PREFIX/myproj
+		# Example #1:
+		#   CAKE_PROJECT_DIR = /a/b/myproj
+		#   cake_source_dir = /a/b/myproj/c/d
+		#   -> CAKE_BINARY_DIR = CAKE_BINARY_DIR_PREFIX/c_d
 		string(REPLACE "/" "_" proj_to_src_path_cid "${proj_to_src_path}")
 		set(CAKE_BINARY_DIR "${CAKE_BINARY_DIR_PREFIX}/${proj_to_src_path_cid}")
 	endif()


Add a timeout for tests in cmake.(#12655)

Add a timeout for tests in cmake.

--- tensorflow/contrib/cmake/tf_tests.cmake
+++ tensorflow/contrib/cmake/tf_tests.cmake
@@ -82,6 +82,7 @@
   set_tests_properties(${_AT_TARGET}
     PROPERTIES ENVIRONMENT "TEST_TMPDIR=${tempdir};TEST_SRCDIR=${testdir}"
   )
+  set_tests_properties(${_AT_TARGET} PROPERTIES TIMEOUT "600")

   foreach(datafile ${_AT_DATA})
     file(RELATIVE_PATH datafile_rel ${tensorflow_source_dir} ${datafile})
@@ -117,6 +118,7 @@
     if (_AT_DEPENDS)
       add_dependencies(${_AT_TARGET} ${_AT_DEPENDS})
     endif()
+    set_tests_properties(${sourcefile} PROPERTIES TIMEOUT "600")
   endforeach()
 endfunction(AddPythonTests)


Be smarter about whether Boost is required or not

--HG--
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/trunk%40638

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -96,7 +96,12 @@
 	find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
 endif()
 # Optional Boost libs (Boost_${COMPONENT}_FOUND
-macro_log_feature(Boost_FOUND "boost" "Boost (general)" "http://boost.org" FALSE "" "")
+if(OGRE_BUILD_COMPONENT_PROPERTY)
+	set(OGRE_BOOST_REQUIRED TRUE)
+else ()
+	set(OGRE_BOOST_REQUIRED FALSE)
+endif()
+macro_log_feature(Boost_FOUND "boost" "Boost (general)" "http://boost.org" ${OGRE_BOOST_REQUIRED} "" "")
 macro_log_feature(Boost_THREAD_FOUND "boost-thread" "Used for threading support" "http://boost.org" FALSE "" "")


Updated CTK

Updated CTK

# Conflicts:
#	CMakeExternals/CTK.cmake

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

   if(NOT DEFINED CTK_DIR)

-    set(revision_tag 4d12a3b8)
+    set(revision_tag 1e3470e7)
     #IF(${proj}_REVISION_TAG)
     #  SET(revision_tag ${${proj}_REVISION_TAG})
     #ENDIF()
@@ -80,9 +80,9 @@
     ExternalProject_Add(${proj}
       LIST_SEPARATOR ${sep}
       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
-      URL_MD5 135910e407bd1f5de29d2a0a9efe5f80
       #GIT_REPOSITORY https://github.com/commontk/CTK.git
       #GIT_TAG origin/master
+      URL_MD5 4cd017f7b4ac5ee9b396f4e7d0ed5024
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}
@@ -105,7 +105,7 @@
         -DCTK_PLUGIN_org.commontk.configadmin:BOOL=ON
         -DCTK_USE_GIT_PROTOCOL:BOOL=OFF
         -DDCMTK_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_DCMTK_085525e6.tar.gz
-        -DqRestAPI_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/qRestAPI_5f3a03b1.tar.gz
+        -DqRestAPI_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/qRestAPI_4293694a.tar.gz
         # See bug 19073
         -DPythonQt_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/PythonQt_36ab9c7c.tar.gz
       CMAKE_CACHE_ARGS


UPD: cleanup duplicated compiler flags

UPD: cleanup duplicated compiler flags

--- CMakeLists.default.cmake
+++ CMakeLists.default.cmake
@@ -23,19 +23,19 @@
 			add_definitions(-DMPT_DEBUG=2)
 	endif (BUILD_WITH_EXTRA_DEBUG)

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

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

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

-	set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O2 -D_FORTIFY_SOURCE=1 -fstrict-aliasing ${CMAKE_USER_C_FLAGS}" CACHE STRING
+	set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O2 -D_FORTIFY_SOURCE=1 ${CMAKE_USER_C_FLAGS}" CACHE STRING
 		"Flags used by the compiler during release build with debug information." FORCE
 	)
 endif (CMAKE_COMPILER_IS_GNUCXX)


fpta-cmake: fix indentation (minor).

fpta-cmake: fix indentation (minor).

--- cmake.fpta/testing.cmake
+++ cmake.fpta/testing.cmake
@@ -1,19 +1,19 @@
-## Copyright 2010-2017 libfpta authors: please see AUTHORS file.
-##
-## This file is part of libfpta, aka "Fast Positive Tables".
-##
-## libfpta is free software: you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation, either version 3 of the License, or
-## (at your option) any later version.
-##
-## libfpta is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with libfpta.  If not, see <http://www.gnu.org/licenses/>.
+##  Copyright 2010-2017 libfpta authors: please see AUTHORS file.
+##
+##  This file is part of libfpta, aka "Fast Positive Tables".
+##
+##  libfpta is free software: you can redistribute it and/or modify
+##  it under the terms of the GNU General Public License as published by
+##  the Free Software Foundation, either version 3 of the License, or
+##  (at your option) any later version.
+##
+##  libfpta is distributed in the hope that it will be useful,
+##  but WITHOUT ANY WARRANTY; without even the implied warranty of
+##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+##  GNU General Public License for more details.
+##
+##  You should have received a copy of the GNU General Public License
+##  along with libfpta.  If not, see <http://www.gnu.org/licenses/>.
 ##

 # Expected GTest was already found and/or pointed via ${gtest_root},


Update CodeCoverage.cmake

Update CodeCoverage.cmake

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -43,8 +43,8 @@
         COMMAND ${_testrunner} ${ARGV3}

         # Capture coverage data.
-        COMMAND ${LCOV_PATH} --compat-libtool --directory . --capture --output-file ${_outputname}.info
-        COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' 'tools/*' '3rdParty/*' --output-file ${_outputname}.info.cleaned
+        COMMAND ${LCOV_PATH} --gcov-tool ${GCOV_PATH} --compat-libtool --directory . --capture --output-file ${_outputname}.info
+        COMMAND ${LCOV_PATH} --gcov-tool ${GCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' 'tools/*' '3rdParty/*' --output-file ${_outputname}.info.cleaned

         # Generating the report.
         COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned


fix indentation

fix indentation

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -141,11 +141,11 @@
 		COMMAND ${_testrunner} ${ARGV3}

 		# Capturing lcov counters and generating report
-                COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info.tmp
-                COMMAND ${LCOV_PATH} --extract ${_outputname}.info.tmp 'elm/*' --output-file ${_outputname}.info.tmp
-                COMMAND ${LCOV_PATH} --remove ${_outputname}.info.tmp 'tests/*' 'test/*' '/usr/*' '/opt/*' 'opencv/modules/*' --output-file ${_outputname}.info
-                COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info
-                COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info.tmp
+		COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info.tmp
+		COMMAND ${LCOV_PATH} --extract ${_outputname}.info.tmp 'elm/*' --output-file ${_outputname}.info.tmp
+		COMMAND ${LCOV_PATH} --remove ${_outputname}.info.tmp 'tests/*' 'test/*' '/usr/*' '/opt/*' 'opencv/modules/*' --output-file ${_outputname}.info
+		COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info
+		COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info.tmp

 		WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
 		COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."


Fix compiler info cmake

Fix compiler info cmake

--- cmake/CompilerInfo.cmake
+++ cmake/CompilerInfo.cmake
@@ -19,6 +19,7 @@
 # Sets COMPILER_VERSION to the version
 execute_process(COMMAND "${CMAKE_CXX_COMPILER}" -v
                 ERROR_VARIABLE COMPILER_VERSION_FULL)
+message(INFO " ${COMPILER_VERSION_FULL}")

 # clang on Linux and Mac OS X before 10.9
 if("${COMPILER_VERSION_FULL}" MATCHES ".*clang version.*")
@@ -31,10 +32,10 @@
   string(REGEX REPLACE ".*based on LLVM ([0-9]+\\.[0.9]+).*" "\\1"
     COMPILER_VERSION "${COMPILER_VERSION_FULL}")

-# clang on Mac OS X, XCode 7. No version replacement is done
-# because Apple no longer advertises the upstream LLVM version.
-elseif("${COMPILER_VERSION_FULL}" MATCHES "clang-70[0-9]\\..*")
+# clang on Mac OS X, XCode 7.
+elseif("${COMPILER_VERSION_FULL}" MATCHES ".*clang-7")
   set(COMPILER_FAMILY "clang")
+  set(COMPILER_VERSION "3.7.0svn")

 # gcc
 elseif("${COMPILER_VERSION_FULL}" MATCHES ".*gcc version.*")
@@ -42,5 +43,6 @@
   string(REGEX REPLACE ".*gcc version ([0-9\\.]+).*" "\\1"
     COMPILER_VERSION "${COMPILER_VERSION_FULL}")
 else()
-  message(FATAL_ERROR "Unknown compiler. Version info:\n${COMPILER_VERSION_FULL}")
+  message(STATUS "Unknown compiler. Version info:\n${COMPILER_VERSION_FULL}")
 endif()
+message("Selected compiler ${COMPILER_FAMILY} ${COMPILER_VERSION}")


added comment

added comment

--- cmake/FindCasaCore.cmake
+++ cmake/FindCasaCore.cmake
@@ -32,7 +32,7 @@
 #
 #==============================================================================

-
+# NOTE: This order is important for static version of the library... don't mess with it!
 set(casacore_modules
     casa_images
     casa_mirlib


remove header from FindTcmalloc

remove header from FindTcmalloc

--- cmake/FindTcmalloc.cmake
+++ cmake/FindTcmalloc.cmake
@@ -1,16 +1,8 @@
 # - Find Tcmalloc
 # Find the native Tcmalloc includes and library
 #
-#  Tcmalloc_INCLUDE_DIR - where to find Tcmalloc.h, etc.
 #  Tcmalloc_LIBRARIES   - List of libraries when using Tcmalloc.
 #  Tcmalloc_FOUND       - True if Tcmalloc found.
-
-find_path(Tcmalloc_INCLUDE_DIR google/tcmalloc.h NO_DEFAULT_PATH PATHS
-  ${HT_DEPENDENCY_INCLUDE_DIR}
-  /usr/include
-  /opt/local/include
-  /usr/local/include
-)

 if (USE_TCMALLOC)
   set(Tcmalloc_NAMES tcmalloc)
@@ -23,7 +15,7 @@
   PATHS ${HT_DEPENDENCY_LIB_DIR} /lib /usr/lib /usr/local/lib /opt/local/lib
 )

-if (Tcmalloc_INCLUDE_DIR AND Tcmalloc_LIBRARY)
+if (Tcmalloc_LIBRARY)
   set(Tcmalloc_FOUND TRUE)
   set( Tcmalloc_LIBRARIES ${Tcmalloc_LIBRARY} )
 else ()
@@ -43,5 +35,4 @@

 mark_as_advanced(
   Tcmalloc_LIBRARY
-  Tcmalloc_INCLUDE_DIR
   )


fix for corrent modules dependencies

fix for corrent modules dependencies

--- cmake/OpenCVModule.cmake
+++ cmake/OpenCVModule.cmake
@@ -49,6 +49,8 @@
   if(HAVE_${mod})
     unset(HAVE_${mod} CACHE)
   endif()
+  unset(OPENCV_MODULE_${mod}_DEPS CACHE)
+  unset(OPENCV_MODULE_${mod}_DEPS_EXT CACHE)
   unset(OPENCV_MODULE_${mod}_REQ_DEPS CACHE)
   unset(OPENCV_MODULE_${mod}_OPT_DEPS CACHE)
   unset(OPENCV_MODULE_${mod}_PRIVATE_REQ_DEPS CACHE)


qibuild/find: cleanup, cleanup

qibuild/find: cleanup, cleanup

Using FindPackageHandleStandardArgs was the key here.
(also, reading source code helped a lot ...)

--- cmake/qibuild/find.cmake
+++ cmake/qibuild/find.cmake
@@ -20,6 +20,29 @@

 include(CMakeParseArguments)
+include(FindPackageHandleStandardArgs)
+
+# Helper function to call FPHSA
+# \flag: HEADER : just a header was searched,
+#                      only ${prefix}_INCLUDE_DIRS will be set.
+# \flag: EXECUTABLE : just an executable was searched,
+#                      only ${prefix}_EXECUTABLE will be set.
+function(_qi_call_fphsa prefix)
+  set(${prefix}_FIND_REQUIRED TRUE)
+  set(${prefix}_FIND_QUIETLY TRUE)
+  cmake_parse_arguments(ARG "HEADER;EXECUTABLE" "" "" ${ARGN})
+
+  set(_to_check)
+  if(ARG_HEADER)
+    set(_to_check ${prefix}_INCLUDE_DIR)
+  elseif(ARG_EXECUTABLE)
+    set(_to_check ${prefix}_EXECUTABLE)
+  else()
+    set(_to_check ${prefix}_LIBRARIES ${prefix}_INCLUDE_DIR)
+  endif()
+  find_package_handle_standard_args(${prefix} DEFAULT_MSG ${_to_check})
+endfunction()
+

 ####################################################################
 #
@@ -129,27 +152,8 @@
   qi_verbose("  libraries  : ${${prefix}_LIBRARIES}" )
   qi_verbose("  definitions: ${${prefix}_DEFINITIONS}" )

-  mark_as_advanced(${prefix}_DIR)
-  #mark as already searched
-  set(${prefix}_SEARCHED TRUE CACHE INTERNAL "" FORCE)
-
-  if(${prefix}_INCLUDE_DIR AND ${prefix}_LIBRARIES)
-    set(${prefix}_FOUND TRUE CACHE INTERNAL "" FORCE)
-  endif()
-
-  if(NOT ${prefix}_FOUND AND ${prefix}_FIND_REQUIRED)
-    if(NOT ${prefix}_INCLUDE_DIR )
-      message( STATUS "Required include not found : ${prefix}_INCLUDE_DIR")
-      message( FATAL_ERROR "Could not find ${prefix} include!")
-    endif()
-    if(NOT ${prefix}_LIBRARIES )
-      message( STATUS "Required libraries not found : ${prefix}_LIBRARIES")
-      message( FATAL_ERROR "Could not find ${prefix} libraries!")
-    endif()
-  endif()
+  _qi_call_fphsa(${prefix})
 endfunction()
-
-

@@ -164,18 +168,7 @@
   qi_verbose("  executable  : ${${prefix}_EXECUTABLE}" )
   qi_verbose("  executable_d: ${${prefix}_EXECUTABLE_DEBUG}" )

-  mark_as_advanced(${prefix}_DIR)
-  #mark as already searched
-  set(${prefix}_SEARCHED TRUE CACHE INTERNAL "" FORCE)
-
-  if(${prefix}_EXECUTABLE)
-    set(${prefix}_FOUND TRUE CACHE INTERNAL "" FORCE)
-  endif()
-
-  if(NOT ${prefix}_FOUND AND ${prefix}_FIND_REQUIRED)
-    qi_info( STATUS "Required executable not found : ${prefix}_EXECUTABLE")
-    qi_info( FATAL_ERROR "Could not find ${prefix} executable!")
-  endif()
+  _qi_call_fphsa(${prefix} EXECUTABLE)
 endfunction()

 ####################################################################
@@ -184,22 +177,6 @@
 #
 ####################################################################
 function(export_header prefix)
-  # Finally, display informations if not in quiet mode
-  qi_verbose("header ${prefix}:" )
-  qi_verbose("  includes   : ${${prefix}_INCLUDE_DIR}" )
-  qi_verbose("  definitions: ${${prefix}_DEFINITIONS}" )
-
-  mark_as_advanced(${prefix}_DIR)
-  #mark as already searched
-  set(${prefix}_SEARCHED TRUE CACHE INTERNAL "" FORCE)
-
-  if(${prefix}_INCLUDE_DIR)
-    set(${prefix}_FOUND TRUE CACHE INTERNAL "" FORCE)
-  endif()
-
-  if(NOT ${prefix}_FOUND AND ${prefix}_FIND_REQUIRED)
-    qi_info( STATUS "Required include not found : ${prefix}_INCLUDE_DIR")
-    qi_info( FATAL_ERROR "Could not find ${prefix} include!")
-  endif()
+  _qi_call_fphsa(${prefix} HEADER)
 endfunction()


add eyetracker report type

add eyetracker report type

--- src/osvr/GenerateForReportTypes.cmake
+++ src/osvr/GenerateForReportTypes.cmake
@@ -4,7 +4,8 @@
     Pose
     Button
     Analog
-    Imaging)
+    Imaging
+    EyeTracker)

 # Generate a file using a template with the placeholder @BODY@, as well as a
 # repeated template with the placeholder @TYPE@ - repeated once for each report type.


Added TNUN_compiler_dbg_only_runtime_sanity_checks - compiler 'sanitizer' options that are compatible only with non optimized builds.

--- toolchains/msvc.toolchain.cmake
+++ toolchains/msvc.toolchain.cmake
@@ -14,24 +14,25 @@
 # supports this and it plays better in certain CMake related special/edge-cases
 # (e.g. generator expressions).
 #                                             (01.06.2016.) (Domagoj Saric)
-set( TNUN_compiler_debug_symbols          -Zi                                                 )
-set( TNUN_compiler_debug_flags            -DDEBUG -Od -MDd                                    )
-set( TNUN_compiler_release_flags          -Ox -Ob2 -Oy -GF -Gw -Gm- -GS- -Gy -MD              )
-set( TNUN_linker_debug_symbols            -DEBUG                                              )
-set( TNUN_compiler_LTO                    -GL                                                 )
-set( TNUN_linker_LTO                      -LTCG                                               )
-set( TNUN_compiler_fastmath               -fp:except- -fp:fast -Qfast_transcendentals         )
-set( TNUN_compiler_rtti_on                -GR                                                 )
-set( TNUN_compiler_rtti_off               -GR-                                                )
-set( TNUN_compiler_exceptions_on          -EHsc                                               )
-set( TNUN_compiler_exceptions_off         -wd4577                                             )
-set( TNUN_compiler_report_optimization    -Qpar-report:1 -Qvec-report:2                       ) # https://msdn.microsoft.com/en-us/library/jj658585.aspx Vectorizer and Parallelizer Messages
-set( TNUN_compiler_optimize_for_speed     -Ox -Ot -Qpar                                       )
-set( TNUN_compiler_optimize_for_size      -Ox -Os                                             )
-set( TNUN_compiler_runtime_sanity_checks  -GS -sdl -guard:cf -fp:strict -RTC1                 )
-set( TNUN_warnings_as_errors              -WX                                                 )
-set( TNUN_default_warnings                -W4                                                 )
-set( TNUN_compiler_runtime_integer_checks -RTCc -D_ALLOW_RTCc_IN_STL                          ) # A separate option as it can break valid code or code that relies behaviour that these checks catch https://www.reddit.com/r/cpp/comments/46mhne/rtcc_rejects_conformant_code_with_visual_c_2015
+set( TNUN_compiler_debug_symbols                  -Zi                                         )
+set( TNUN_compiler_debug_flags                    -DDEBUG -Od -MDd                            )
+set( TNUN_compiler_release_flags                  -Ox -Ob2 -Oy -GF -Gw -Gm- -GS- -Gy -MD      )
+set( TNUN_linker_debug_symbols                    -DEBUG                                      )
+set( TNUN_compiler_LTO                            -GL                                         )
+set( TNUN_linker_LTO                              -LTCG                                       )
+set( TNUN_compiler_fastmath                       -fp:except- -fp:fast -Qfast_transcendentals )
+set( TNUN_compiler_rtti_on                        -GR                                         )
+set( TNUN_compiler_rtti_off                       -GR-                                        )
+set( TNUN_compiler_exceptions_on                  -EHsc                                       )
+set( TNUN_compiler_exceptions_off                 -wd4577                                     )
+set( TNUN_compiler_report_optimization            -Qpar-report:1 -Qvec-report:2               ) # https://msdn.microsoft.com/en-us/library/jj658585.aspx Vectorizer and Parallelizer Messages
+set( TNUN_compiler_optimize_for_speed             -Ox -Ot -Qpar                               )
+set( TNUN_compiler_optimize_for_size              -Ox -Os                                     )
+set( TNUN_compiler_runtime_sanity_checks          -GS -sdl -guard:cf                          ) #...mrmlj...-fp:strict would disable fast-math so for now it is moved to the dbg_only version
+set( TNUN_compiler_dbg_only_runtime_sanity_checks -RTC1 -fp:strict                            )
+set( TNUN_warnings_as_errors                      -WX                                         )
+set( TNUN_default_warnings                        -W4                                         )
+set( TNUN_compiler_runtime_integer_checks         -RTCc -D_ALLOW_RTCc_IN_STL                  ) # A separate option as it can break valid code or code that relies on behaviour that these checks catch https://www.reddit.com/r/cpp/comments/46mhne/rtcc_rejects_conformant_code_with_visual_c_2015

 # w4373: '...': virtual function overrides '...', previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers


Terminate macro block.

Terminate macro block.

--- CPM.cmake
+++ CPM.cmake
@@ -835,7 +835,7 @@
     ${_CPM_GIT_REPOSITORY}
     ${_CPM_USE_EXISTING_VER})

-endfunction()
+endmacro()

 # I fully implemented the external project approach, see commit SHA:
 # 107d0952bd3a64c371d1d3224271bdcca915b2fa . I also tagged it as


lets see what findklu is actually looking for ...

--- sundials/config/FindKLU.cmake
+++ sundials/config/FindKLU.cmake
@@ -38,6 +38,7 @@
 else ()
     # find library with user provided directory path
     set(KLU_LIBRARY_NAME klu)
+    message(STATUS ${KLU_LIBRARY_DIR})
     find_library(KLU_LIBRARY ${KLU_LIBRARY_NAME} ${KLU_LIBRARY_DIR} NO_DEFAULT_PATH)
 endif ()
 mark_as_advanced(KLU_LIBRARY)


Fix for DA's

Fix for DA's

--- cmake/CMakeDA.cmake
+++ cmake/CMakeDA.cmake
@@ -443,9 +443,12 @@

 add_custom_target(${DAEXE}
 COMMAND echo "***** Making executable ${DAEXE} *****"
+COMMAND g++ ${LDFLAGS} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${DALIB}.a ${EXTRAROOTLIB} ${ROOTSYS}/lib/libRoot.a ${ROOTSYS}/lib/libfreetype.a ${ROOTSYS}/lib/libpcre.a ${SYSLIBS} ${DAQDALIB} ${AMOREDALIBS} ${MONITORLIBS} -o ${DAEXE}
 WORKING_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
 )
-target_link_libraries(${DAEXE} "-L" "lib${DALIB}.a" ${DAOBJ} ${EXTRAROOTLIB} "${ROOTALIBDIR}/libRoot.a" "${ROOTALIBDIR}/libfreetype.a" "${ROOTALIBDIR}/libpcre.a" ${SYSLIBS} ${DAQDALIB} ${MONITORLIBS} ${AMOREDALIBS})
+
+
+#target_link_libraries(${DAEXE} "-L" "lib${DALIB}.a" ${DAOBJ} ${EXTRAROOTLIB} "${ROOTALIBDIR}/libRoot.a" "${ROOTALIBDIR}/libfreetype.a" "${ROOTALIBDIR}/libpcre.a" ${SYSLIBS} ${DAQDALIB} ${MONITORLIBS} ${AMOREDALIBS})

 add_dependencies(${DAEXE} ${DASRC} DAOBJ_${DAEXE}_ ${BINPATH} ${LIBPATH} ${DALIB}.a ${DAQDALIB} ${ROOTLIB})


[cmake] fix a cmake warning due to inconsistend names

--- cmake/FindNIX.cmake
+++ cmake/FindNIX.cmake
@@ -1,8 +1,8 @@
 # - Try to find NIX
 # Once done this will define
-#  NIX_FOUND - System has Nix
-#  NIX_INCLUDE_DIRS - The Nix include directories
-#  NIX_LIBRARIES - The libraries needed to use Nix
+#  NIX_FOUND - System has NIX
+#  NIX_INCLUDE_DIRS - The NIX include directories
+#  NIX_LIBRARIES - The libraries needed to use NIX

 # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
 if(NIX_USE_STATIC_LIBS)
@@ -34,7 +34,7 @@
 include(FindPackageHandleStandardArgs)
 # handle the QUIETLY and REQUIRED arguments and set NIX_FOUND to TRUE
 # if all listed variables are TRUE
-find_package_handle_standard_args(Nix DEFAULT_MSG
+find_package_handle_standard_args(NIX DEFAULT_MSG
   NIX_LIBRARY NIX_INCLUDE_DIR)

 mark_as_advanced(NIX_INCLUDE_DIR NIX_LIBRARIES)


Fix for CONC-271: RPM layout now works for other 64-bit architectures than x86_64. Thx to Michal Schorn for contributing this patch.

--- cmake/install.cmake
+++ cmake/install.cmake
@@ -76,11 +76,11 @@
 # RPM layout
 #
 SET(INSTALL_BINDIR_RPM "bin")
-IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
+IF((CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le" OR CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "s390x") AND CMAKE_SIZEOF_VOID_P EQUAL 8)
   SET(INSTALL_LIBDIR_RPM "lib64/mariadb")
   SET(INSTALL_PLUGINDIR_RPM "lib64/mariadb/plugin")
 ELSE()
-  SET(INSTALL_LIBDIR_RPM "lib")
+  SET(INSTALL_LIBDIR_RPM "lib/mariadb")
   SET(INSTALL_PLUGINDIR_RPM "lib/mariadb/plugin")
 ENDIF()
 SET(INSTALL_INCLUDEDIR_RPM "include")


Fix tests to work with Coverage 4.0

Fix tests to work with Coverage 4.0

Per the change:
https://github.com/nedbat/coveragepy/commit/a2a2c1f3f41b0fc4afef0fe221499aedca343de8
Coverage can't append to data files in parallel mode.

This change removes the "--append" flag when running Coverage.

--- tests/PythonTests.cmake
+++ tests/PythonTests.cmake
@@ -44,7 +44,7 @@
     add_test(
       NAME ${name}
       WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
-      COMMAND "${PYTHON_COVERAGE_EXECUTABLE}" run -p --append "--rcfile=${py_coverage_rc}"
+      COMMAND "${PYTHON_COVERAGE_EXECUTABLE}" run --parallel-mode "--rcfile=${py_coverage_rc}"
               "--source=girder_worker" -m unittest -v ${module}
     )
   else()
@@ -77,7 +77,7 @@
     add_test(
       NAME ${name}
       WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
-      COMMAND "${PYTHON_COVERAGE_EXECUTABLE}" run -p --append "--rcfile=${py_coverage_rc}"
+      COMMAND "${PYTHON_COVERAGE_EXECUTABLE}" run --parallel-mode "--rcfile=${py_coverage_rc}"
               "--source=girder_worker" "${py_testdir}/docstring_test.py" -v ${module}
     )
   else()


Deprecated CMAKE_IOS_DEVELOPER_ROOT in favor of CMAKE_DEVELOPER_ROOT

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -64,13 +64,11 @@
 #    WATCHOSCOMBINED = Build for armv7k arm64_32 x86_64 watchOS. Combined into FAT STATIC lib (supported on 3.14+ of CMake with "-G Xcode" argument ONLY)
 #    SIMULATOR_WATCHOS = Build for x86_64 for watchOS Simulator.
 #
-# IOS_PLATFORM: (Deprecated) Alias to PLATFORM
-#
 # CMAKE_OSX_SYSROOT: Path to the iOS SDK to use.  By default this is
 #    automatically determined from IOS_PLATFORM and xcodebuild, but
 #    can also be manually specified (although this should not be required).
 #
-# CMAKE_IOS_DEVELOPER_ROOT: Path to the Developer directory for the iOS platform
+# CMAKE_DEVELOPER_ROOT: Path to the Developer directory for the iOS platform
 #    being compiled for.  By default this is automatically determined from
 #    CMAKE_OSX_SYSROOT, but can also be manually specified (although this should
 #    not be required).
@@ -111,6 +109,15 @@
 #   A macro used to find executable programs on the host system, not within the
 #   iOS environment.  Thanks to the android-cmake project for providing the
 #   command.
+#
+# ******************************** DEPRECATIONS *******************************
+#
+# IOS_DEPLOYMENT_TARGET: (Deprecated) Alias to DEPLOYMENT_TARGET
+# CMAKE_IOS_DEVELOPER_ROOT: (Deprecated) Alias to CMAKE_DEVELOPER_ROOT
+# IOS_PLATFORM: (Deprecated) Alias to PLATFORM
+#
+# *****************************************************************************
+#

 # Fix for PThread library not in path
 set(CMAKE_THREAD_LIBS_INIT "-lpthread")
@@ -135,10 +142,24 @@
 string(REGEX REPLACE "Xcode ([0-9\\.]+)" "\\1" XCODE_VERSION "${XCODE_VERSION}")
 message(STATUS "Building with Xcode version: ${XCODE_VERSION}")

+######## ALIASES (DEPRECATION WARNINGS)
+
 if(DEFINED IOS_PLATFORM)
   set(PLATFORM ${IOS_PLATFORM})
   message(DEPRECATION "IOS_PLATFORM argument is DEPRECATED. Consider using the new PLATFORM argument instead.")
 endif()
+
+if(DEFINED IOS_DEPLOYMENT_TARGET)
+  set(DEPLOYMENT_TARGET ${IOS_DEPLOYMENT_TARGET})
+  message(DEPRECATION "CMAKE_IOS_DEVELOPER_ROOT argument is DEPRECATED. Consider using the new CMAKE_DEVELOPER_ROOT argument instead.")
+endif()
+
+if(DEFINED CMAKE_IOS_DEVELOPER_ROOT)
+  set(CMAKE_DEVELOPER_ROOT ${CMAKE_IOS_DEVELOPER_ROOT})
+  message(DEPRECATION "CMAKE_IOS_DEVELOPER_ROOT argument is DEPRECATED. Consider using the new CMAKE_DEVELOPER_ROOT argument instead.")
+endif()
+
+######## END ALIASES

 # Default to building for iPhoneOS if not specified otherwise, and we cannot
 # determine the platform from the CMAKE_OSX_ARCHITECTURES variable. The use
@@ -297,20 +318,16 @@
   endif()
 endif()

-if(DEFINED IOS_DEPLOYMENT_TARGET)
-  set(DEPLOYMENT_TARGET ${IOS_DEPLOYMENT_TARGET})
-endif()
-
 # Specify minimum version of deployment target.
 if(NOT DEFINED DEPLOYMENT_TARGET)
   if (PLATFORM_INT STREQUAL "WATCHOS" OR PLATFORM_INT STREQUAL "SIMULATOR_WATCHOS")
     # Unless specified, SDK version 2.0 is used by default as minimum target version (watchOS).
     set(DEPLOYMENT_TARGET "2.0"
-            CACHE STRING "Minimum iOS version to build for." )
+            CACHE STRING "Minimum SDK version to build for." )
   else()
     # Unless specified, SDK version 9.0 is used by default as minimum target version (iOS, tvOS).
     set(DEPLOYMENT_TARGET "9.0"
-            CACHE STRING "Minimum iOS version to build for." )
+            CACHE STRING "Minimum SDK version to build for." )
   endif()
   message(STATUS "Using the default min-version since DEPLOYMENT_TARGET not provided!")
 endif()
@@ -343,17 +360,18 @@
   OUTPUT_VARIABLE SDK_VERSION
   ERROR_QUIET
   OUTPUT_STRIP_TRAILING_WHITESPACE)
+
 # Find the Developer root for the specific iOS platform being compiled for
 # from CMAKE_OSX_SYSROOT.  Should be ../../ from SDK specified in
 # CMAKE_OSX_SYSROOT. There does not appear to be a direct way to obtain
 # this information from xcrun or xcodebuild.
-if (NOT CMAKE_IOS_DEVELOPER_ROOT AND NOT USED_CMAKE_GENERATOR MATCHES "Xcode")
+if (NOT DEFINED CMAKE_DEVELOPER_ROOT AND NOT USED_CMAKE_GENERATOR MATCHES "Xcode")
   get_filename_component(IOS_PLATFORM_SDK_DIR ${CMAKE_OSX_SYSROOT} PATH)
-  get_filename_component(CMAKE_IOS_DEVELOPER_ROOT ${IOS_PLATFORM_SDK_DIR} PATH)
-
-  if (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT)
-    message(FATAL_ERROR "Invalid CMAKE_IOS_DEVELOPER_ROOT: "
-      "${CMAKE_IOS_DEVELOPER_ROOT} does not exist.")
+  get_filename_component(CMAKE_DEVELOPER_ROOT ${IOS_PLATFORM_SDK_DIR} PATH)
+
+  if (NOT DEFINED CMAKE_DEVELOPER_ROOT)
+    message(FATAL_ERROR "Invalid CMAKE_DEVELOPER_ROOT: "
+      "${CMAKE_DEVELOPER_ROOT} does not exist.")
   endif()
 endif()
 # Find the C & C++ compilers for the specified SDK.
@@ -373,17 +391,17 @@
 endif()
 # Find (Apple's) libtool.
 execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find libtool
-  OUTPUT_VARIABLE IOS_LIBTOOL
+  OUTPUT_VARIABLE BUILD_LIBTOOL
   ERROR_QUIET
   OUTPUT_STRIP_TRAILING_WHITESPACE)
-message(STATUS "Using libtool: ${IOS_LIBTOOL}")
+message(STATUS "Using libtool: ${BUILD_LIBTOOL}")
 # Configure libtool to be used instead of ar + ranlib to build static libraries.
 # This is required on Xcode 7+, but should also work on previous versions of
 # Xcode.
 set(CMAKE_C_CREATE_STATIC_LIBRARY
-  "${IOS_LIBTOOL} -static -o <TARGET> <LINK_FLAGS> <OBJECTS> ")
+  "${BUILD_LIBTOOL} -static -o <TARGET> <LINK_FLAGS> <OBJECTS> ")
 set(CMAKE_CXX_CREATE_STATIC_LIBRARY
-  "${IOS_LIBTOOL} -static -o <TARGET> <LINK_FLAGS> <OBJECTS> ")
+  "${BUILD_LIBTOOL} -static -o <TARGET> <LINK_FLAGS> <OBJECTS> ")
 # Get the version of Darwin (OS X) of the host.
 execute_process(COMMAND uname -r
   OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION
@@ -564,7 +582,7 @@
 endif (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)

 # Set the find root to the iOS developer roots and to user defined paths.
-set(CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_OSX_SYSROOT}
+set(CMAKE_FIND_ROOT_PATH ${CMAKE_DEVELOPER_ROOT} ${CMAKE_OSX_SYSROOT}
   ${CMAKE_PREFIX_PATH} CACHE STRING "iOS find search path root" FORCE)
 # Default to searching for frameworks first.
 set(CMAKE_FIND_FRAMEWORK FIRST)


build: fallback to dwarf-4 format because of lesser binary size (dwarf-5 is by default in GCC 11)

--- tools/cmake/build.cmake
+++ tools/cmake/build.cmake
@@ -103,6 +103,9 @@
                                     "-Wextra"
                                     "-Wno-unused-parameter"
                                     "-Wno-sign-compare"
+                                    # Default is dwarf-5 since GCC 11, fallback to dwarf-4 because of binary size
+                                    # TODO: IDF-5160
+                                    "-gdwarf-4"
                                     # always generate debug symbols (even in release mode, these don't
                                     # go into the final binary so have no impact on size
                                     "-ggdb")


clean file

clean file

--- cmake/Modules/FindGlog.cmake
+++ cmake/Modules/FindGlog.cmake
@@ -1,48 +0,0 @@
-# - Try to find Glog
-#
-# The following variables are optionally searched for defaults
-#  GLOG_ROOT_DIR:            Base directory where all GLOG components are found
-#
-# The following are set after configuration is done:
-#  GLOG_FOUND
-#  GLOG_INCLUDE_DIRS
-#  GLOG_LIBRARIES
-#  GLOG_LIBRARYRARY_DIRS
-
-include(FindPackageHandleStandardArgs)
-
-set(GLOG_ROOT_DIR "" CACHE PATH "Folder contains Google glog")
-
-if(WIN32)
-    find_path(GLOG_INCLUDE_DIR glog/logging.h
-        PATHS ${GLOG_ROOT_DIR}/src/windows)
-else()
-    find_path(GLOG_INCLUDE_DIR glog/logging.h
-        PATHS ${GLOG_ROOT_DIR})
-endif()
-
-if(MSVC)
-    find_library(GLOG_LIBRARY_RELEASE libglog_static
-        PATHS ${GLOG_ROOT_DIR}
-        PATH_SUFFIXES Release)
-
-    find_library(GLOG_LIBRARY_DEBUG libglog_static
-        PATHS ${GLOG_ROOT_DIR}
-        PATH_SUFFIXES Debug)
-
-    set(GLOG_LIBRARY optimized ${GLOG_LIBRARY_RELEASE} debug ${GLOG_LIBRARY_DEBUG})
-else()
-    find_library(GLOG_LIBRARY glog
-        PATHS ${GLOG_ROOT_DIR}
-        PATH_SUFFIXES lib lib64)
-endif()
-
-find_package_handle_standard_args(Glog DEFAULT_MSG GLOG_INCLUDE_DIR GLOG_LIBRARY)
-
-if(GLOG_FOUND)
-  set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIR})
-  set(GLOG_LIBRARIES ${GLOG_LIBRARY})
-  message(STATUS "Found glog    (include: ${GLOG_INCLUDE_DIR}, library: ${GLOG_LIBRARY})")
-  mark_as_advanced(GLOG_ROOT_DIR GLOG_LIBRARY_RELEASE GLOG_LIBRARY_DEBUG
-                                 GLOG_LIBRARY GLOG_INCLUDE_DIR)
-endif()


Fixed issue #51. SERIAL options was being overwritten.

--- cmake/Platform/Arduino.cmake
+++ cmake/Platform/Arduino.cmake
@@ -285,7 +285,7 @@
         set(INPUT_SERIAL ${ARDUINO_DEFAULT_SERIAL})
     endif()
     if(NOT INPUT_PROGRAMMER)
-        set(INPUT_SERIAL ${ARDUINO_DEFAULT_PROGRAMMER})
+        set(INPUT_PROGRAMMER ${ARDUINO_DEFAULT_PROGRAMMER})
     endif()
     required_variables(VARS INPUT_BOARD MSG "must define for target ${INPUT_NAME}")

@@ -320,6 +320,7 @@
         setup_arduino_upload(${INPUT_BOARD} ${INPUT_NAME} ${INPUT_PORT} "${INPUT_PROGRAMMER}" "${INPUT_AFLAGS}")
     endif()

+    message("INPUT_SERIAL for ${INPUT_NAME}: ${INPUT_SERIAL}")
     if(INPUT_SERIAL)
         setup_serial_target(${INPUT_NAME} "${INPUT_SERIAL}")
     endif()


cmake: Fix visibility detection

cmake: Fix visibility detection

--- cmake/VisibilityDetect.cmake
+++ cmake/VisibilityDetect.cmake
@@ -7,7 +7,7 @@
                                             !defined(_AIX) && !defined(__CYGWIN__) && !defined(__MSYS__)
                                         return 0;
                                         #else
-                                        #  error \"No visibility\"
+                                        stop_compile_here
                                         #endif
                                  }"
                                  PLIBSYS_HAS_GCC_VISIBILITY
@@ -25,7 +25,7 @@
                                             (defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5110))
                                         return 0;
                                         #else
-                                        #  error \"No visibility\"
+                                        stop_compile_here
                                         #endif
                                  }"
                                  PLIBSYS_HAS_SUN_VISIBILITY
@@ -42,7 +42,7 @@
                                         #if (defined(__xlC__) && (__xlC__ >= 0x0D01))
                                         return 0;
                                         #else
-                                        #  error \"No visibility\"
+                                        stop_compile_here
                                         #endif
                                  }"
                                  PLIBSYS_HAS_XLC_VISIBILITY
@@ -60,7 +60,7 @@
                                             (defined(__HP_aCC) && (__HP_aCC >= 0x061500))
                                         return 0;
                                         #else
-                                        #  error \"No visibility\"
+                                        stop_compile_here
                                         #endif
                                  }"
                                  PLIBSYS_HAS_HP_VISIBILITY
@@ -77,7 +77,7 @@
                                         #if defined(__has_attribute) && __has_attribute(visibility)
                                         return 0;
                                         #else
-                                        #  error \"No visibility\"
+                                        stop_compile_here
                                         #endif
                                  }"
                                  PLIBSYS_HAS_CLANG_VISIBILITY


build: use a regular expression in `_add_swift_host_library_single`

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -722,7 +722,7 @@
   # Include LLVM Bitcode slices for iOS, Watch OS, and Apple TV OS device libraries.
   set(embed_bitcode_arg)
   if(SWIFT_EMBED_BITCODE_SECTION)
-    if("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "IOS" OR "${SWIFT_HOST_VARIANT_SDK}" STREQUAL "TVOS" OR "${SWIFT_HOST_VARIANT_SDK}" STREQUAL "WATCHOS")
+    if(SWIFT_HOST_VARIANT_SDK MATCHES "(I|TV|WATCH)OS")
       list(APPEND SWIFTLIB_SINGLE_C_COMPILE_FLAGS "-fembed-bitcode")
       set(embed_bitcode_arg EMBED_BITCODE)
     endif()


FindSWIG.cmake-6 from
http://public.kitware.com/Bug/bug.php?op=show&bugid=4145. The previous
version used here (FindSWIG.cmake-5) had an error message that used a
non-existent variable, SWIG_version_error.  That bug is now fixed in
FindSWIG.cmake-6 by using the correct SWIG_version_output variable instead.

svn path=/trunk/; revision=7688

--- cmake/modules/FindSWIG.cmake
+++ cmake/modules/FindSWIG.cmake
@@ -35,7 +35,7 @@
 	ERROR_VARIABLE SWIG_version_output
 	RESULT_VARIABLE SWIG_version_result)
       IF(SWIG_version_result)
-        MESSAGE(SEND_ERROR "Command \"${SWIG_EXECUTABLE} -version\" failed with output:\n${SWIG_version_error}")
+        MESSAGE(SEND_ERROR "Command \"${SWIG_EXECUTABLE} -version\" failed with output:\n${SWIG_version_output}")
       ELSE(SWIG_version_result)
         STRING(REGEX REPLACE ".*SWIG Version[^0-9.]*\([0-9.]+\).*" "\\1"
 	  SWIG_version_output "${SWIG_version_output}")


cmake: add support for c++14

cmake: add support for c++14

--- cmake/toolbox/compiler.cmake
+++ cmake/toolbox/compiler.cmake
@@ -10,7 +10,9 @@
 # COMPILER DEPENDANT C++0x/C++11 FLAGS
 execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
 if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
-	if (GCC_VERSION VERSION_GREATER 4.6)
+	if (GCC_VERSION VERSION_GREATER 4.7)
+		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
+	elseif (GCC_VERSION VERSION_GREATER 4.6)
 		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 	else()
 		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")


Fix CPack

Fix CPack

--- source/Packaging.cmake
+++ source/Packaging.cmake
@@ -98,12 +98,15 @@
 ####
 SET(ENV_ONLY_PACKAGE_SF1 $ENV{ONLY_PACKAGE_SF1})
 IF(NOT ENV_ONLY_PACKAGE_SF1)
-#  INSTALL_RELATED_LIBRARIES(${Boost_LIBRARIES})
+  INSTALL_RELATED_LIBRARIES(${Boost_LIBRARIES})
   INSTALL_RELATED_LIBRARIES(${izenelib_LIBRARIES})
   INSTALL_RELATED_LIBRARIES(${ilplib_LIBRARIES})
   INSTALL_RELATED_LIBRARIES(${imllib_LIBRARIES})
   INSTALL_RELATED_LIBRARIES(${idmlib_LIBRARIES})
-  INSTALL_RELATED_LIBRARIES(${Curl_LIBRARIES})
+  INSTALL_RELATED_LIBRARIES(${LibCURL_LIBRARIES})
+  INSTALL_RELATED_LIBRARIES(${ImageMagick_LIBRARIES})
+  INSTALL_RELATED_LIBRARIES(${sqlite3_LIBRARIES})
+  INSTALL_RELATED_LIBRARIES(${Thrift_LIBS})

   IF( USE_IZENECMA )
     INSTALL_RELATED_LIBRARIES(${izenecma_LIBRARIES})
@@ -121,21 +124,6 @@
   INSTALL_RELATED_LIBRARIES(${TokyoCabinet_LIBRARIES})
   INSTALL_RELATED_LIBRARIES(${Glog_LIBRARIES})
   INSTALL_RELATED_LIBRARIES(${MYSQL_LIBRARIES})
-  INSTALL_RELATED_LIBRARIES("/usr/lib/libboost_date_time.so.1.47.0")
-  INSTALL_RELATED_LIBRARIES("/usr/lib/libboost_filesystem.so.1.47.0")
-  INSTALL_RELATED_LIBRARIES("/usr/lib/libboost_iostreams.so.1.47.0")
-  INSTALL_RELATED_LIBRARIES("/usr/lib/libboost_program_options.so.1.47.0")
-  INSTALL_RELATED_LIBRARIES("/usr/lib/libboost_regex.so.1.47.0")
-  INSTALL_RELATED_LIBRARIES("/usr/lib/libboost_serialization.so.1.47.0")
-  INSTALL_RELATED_LIBRARIES("/usr/lib/libboost_system.so.1.47.0")
-  INSTALL_RELATED_LIBRARIES("/usr/lib/libboost_thread.so.1.47.0")
-  INSTALL_RELATED_LIBRARIES("/usr/lib/libboost_unit_test_framework.so.1.47.0")
-  INSTALL_RELATED_LIBRARIES("/usr/local/lib/libthrift.so")
-  INSTALL_RELATED_LIBRARIES("/usr/lib/libmysqlclient_r.so.16")
-  INSTALL_RELATED_LIBRARIES("/usr/lib/libmysqlclient.so.16")
-  INSTALL_RELATED_LIBRARIES("/usr/lib/libicuuc.so")
-  INSTALL_RELATED_LIBRARIES("/usr/lib/libicui18n.so")
-  INSTALL_RELATED_LIBRARIES("/usr/lib/libicudata.so")

   IF( USE_WISEKMA )
     INSTALL( DIRECTORY ${wisekma_KNOWLEDGE}


Check for existence of start<_APP_NAME>.bat.in

--- BlueBerry/CMake/FunctionCreateBlueBerryApplication.cmake
+++ BlueBerry/CMake/FunctionCreateBlueBerryApplication.cmake
@@ -165,11 +165,14 @@

 # Create batch files for Windows platforms
 if(WIN32)
-  foreach(BUILD_TYPE debug release)
-    mitkFunctionCreateWindowsBatchScript(start${_APP_NAME}.bat.in
-      ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/start${_APP_NAME}_${BUILD_TYPE}.bat
-      ${BUILD_TYPE})
-  endforeach()
+  set(template_name "start${_APP_NAME}.bat.in")
+  if(EXISTS ${template_name})
+    foreach(BUILD_TYPE debug release)
+      mitkFunctionCreateWindowsBatchScript(${template_name}
+        ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/start${_APP_NAME}_${BUILD_TYPE}.bat
+        ${BUILD_TYPE})
+    endforeach()
+  endif()
 endif(WIN32)

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


git-svn-id: svn+ssh://svn.pointclouds.org/pcl/trunk@5771 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- surface/src/on_nurbs/on_nurbs.cmake
+++ surface/src/on_nurbs/on_nurbs.cmake
@@ -31,7 +31,7 @@
 	src/on_nurbs/sequential_fitter.cpp
 	src/on_nurbs/sparse_mat.cpp)

-if(false)
+if(true)
   set(ON_NURBS_SOURCES ${ON_NURBS_SOURCES} src/on_nurbs/nurbs_solve_eigen.cpp)
 else()
 	set(ON_NURBS_SOURCES ${ON_NURBS_SOURCES} src/on_nurbs/nurbs_solve_umfpack.cpp)


Add proper include search path to iOS SimpleApp

Former-commit-id: ba19e474ece746c3ee82e8697198b8e48ec6daa4

--- test/platforms/HalideAppTests.cmake
+++ test/platforms/HalideAppTests.cmake
@@ -239,6 +239,7 @@
   target_include_directories(${args_TARGET} PUBLIC
     ${HALIDE_INCLUDE_PATH}
     ${out_dir}
+    "${CMAKE_CURRENT_SOURCE_DIR}/.."
     )

 endfunction(halide_add_ios_app)