Better to generate file (not perfect again :( )

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

--- libkcal/ical_file.cmake
+++ libkcal/ical_file.cmake
@@ -24,6 +24,7 @@
    ${CMAKE_SOURCE_DIR}/libical/src/libical/sspm.h
    ${CMAKE_SOURCE_DIR}/libical/src/libical/icalmime.h
    ${CMAKE_SOURCE_DIR}/libical/src/libical/icallangbind.h
+
 )

 FILE(WRITE ${KDE_FILE_H_FILE} "#ifdef __cplusplus\n")
@@ -36,11 +37,13 @@

 foreach (_current_FILE ${COMBINEDHEADERSICAL})
 	FILE(READ ${_current_FILE} _contents)
-	STRING(REGEX REPLACE "#include.*\"ical" "" _contents "${_contents}" )
-	STRING(REGEX REPLACE "#include.*\"config" "" _contents "${_contents}" )
-	STRING(REGEX REPLACE "#include.*\"pvl.h\"" "" _contents "${_contents}" )
-	STRING(REGEX REPLACE "\$$(Id|Locker): .+\$$" "" _contents "${_contents}" )
-	FILE(APPEND ${KDE_FILE_H_FILE} "${_contents}")
+    STRING(REGEX REPLACE "#include *\"ical.*\\.h\"" "" _contents "${_contents}" )
+    STRING(REGEX REPLACE "#include *\"config.*\\.h\"" "" _contents "${_contents}" )
+    STRING(REGEX REPLACE "#include *\"pvl\\.h\"" "" _contents "${_contents}" )
+    #STRING(REGEX REPLACE " *\$$[Id|Locker]: .+\$$" "" _contents "${_contents}" )
+	#STRING(REGEX REPLACE " *\$Id *: .+\$$" ""_contents "${_contents}" )
+	#STRING(REGEX REPLACE " *\$Locker *: .+\$$" ""_contents "${_contents}" )
+    FILE(APPEND ${KDE_FILE_H_FILE} "${_contents}")
 endforeach (_current_FILE ${KDE_FILE_HEADER})

 FILE(APPEND ${KDE_FILE_H_FILE} "\n")


Fix ortools cbc:: namespace use for target dependencies

--- cmake/cpp.cmake
+++ cmake/cpp.cmake
@@ -92,7 +92,7 @@
 target_link_libraries(${PROJECT_NAME} PUBLIC
 	gflags::gflags glog::glog
 	ZLIB::ZLIB protobuf::libprotobuf
-	Cbc::CbcSolver Cbc::OsiCbc Clp::ClpSolver Clp::OsiClp
+	Cbc::CbcSolver Cbc::OsiCbc Cbc::ClpSolver Cbc::OsiClp
 	Threads::Threads)
 if(WIN32)
 	target_link_libraries(${PROJECT_NAME} PUBLIC psapi.lib ws2_32.lib)


[phi] Remove usless cmake message (#40884)

--- cmake/phi.cmake
+++ cmake/phi.cmake
@@ -204,7 +204,6 @@
                     string(REGEX REPLACE ".h\"" "" kernel_name ${kernel_name})
                     list(APPEND all_kernel_name ${kernel_name})
                 endif()
-                message(STATUS "${TARGET} DEPS ${all_kernel_name}")
             endif()
             list(APPEND kernel_deps ${all_kernel_name})
         endforeach()


Updates the compiler flags file

Updates the compiler flags file

This file gracefully deals with older compilers that do not understand
the c++03 standard (GCC 4.2 on Mac for example).

Change-Id: Ib9d694d93ab211c101eb0fcf150946964d7bacd5

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -3,13 +3,19 @@
   include(CheckCXXCompilerFlag)

   # Addtional warnings for GCC
-  set(CMAKE_CXX_FLAGS_WARN "-Wnon-virtual-dtor -Wno-long-long -std=c++03 -pedantic -Wcast-align -Wchar-subscripts -Wall -Wextra -Wpointer-arith -Wformat-security -Woverloaded-virtual -Wshadow -Wunused-parameter -fno-check-new -fno-common")
+  set(CMAKE_CXX_FLAGS_WARN "-Wnon-virtual-dtor -Wno-long-long -Wcast-align -Wchar-subscripts -Wall -Wpointer-arith -Wformat-security -Woverloaded-virtual -fno-check-new -fno-common")

   # This flag is useful as not returning from a non-void function is an error
   # with MSVC, but it is not supported on all GCC compiler versions
-  check_cxx_compiler_flag(-Werror=return-type HAVE_GCC_ERROR_RETURN_TYPE)
+  check_cxx_compiler_flag("-Werror=return-type" HAVE_GCC_ERROR_RETURN_TYPE)
   if(HAVE_GCC_ERROR_RETURN_TYPE)
     set(CMAKE_CXX_FLAGS_ERROR "-Werror=return-type")
+  endif()
+  check_cxx_compiler_flag("-std=c++03" HAVE_GCC_STD_CPP_03)
+  if(HAVE_GCC_STD_CPP_03)
+    set(CMAKE_CXX_FLAGS_STD_CPP "-std=c++03 -pedantic -Wshadow -Wextra")
+  else()
+    set(CMAKE_CXX_FLAGS_STD_CPP "-ansi")
   endif()

   # If we are compiling on Linux then set some extra linker flags too
@@ -22,6 +28,7 @@
       "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_EXE_LINKER_FLAGS}")
   endif()

+  set(CMAKE_CXX_FLAGS_WARN "${CMAKE_CXX_FLAGS_WARN} ${CMAKE_CXX_FLAGS_STD_CPP}")
   # Set up the debug CXX_FLAGS for extra warnings
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
     "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${CMAKE_CXX_FLAGS_WARN}")


Check for actual qhull header just in case the platform has the qhull library
installed but not the headers for that library.

svn path=/trunk/; revision=6887

--- cmake/modules/csiro.cmake
+++ cmake/modules/csiro.cmake
@@ -75,10 +75,17 @@
     set(CMAKE_REQUIRED_LIBRARIES ${QHULL_LIB})
     check_function_exists(qh_new_qhull QH_NEW_VARIABLE)
     set(CMAKE_REQUIRED_LIBRARIES)
-    if(NOT QH_NEW_VARIABLE)
+    if(QH_NEW_VARIABLE)
+      include(CheckIncludeFile)
+      check_include_file("qhull/qhull_a.h" QHULL_INCLUDE)
+      if(NOT QHULL_INCLUDE)
+        message(STATUS "WARNING: Setting HAVE_QHULL to OFF.")
+        set(HAVE_QHULL OFF CACHE BOOL "Enable use of the Qhull library" FORCE)
+      endif(NOT QHULL_INCLUDE)
+    else(QH_NEW_VARIABLE)
       message(STATUS "WARNING: Setting HAVE_QHULL to OFF.")
       set(HAVE_QHULL OFF CACHE BOOL "Enable use of the Qhull library" FORCE)
-    endif(NOT QH_NEW_VARIABLE)
+    endif(QH_NEW_VARIABLE)
   else(QHULL_LIB)
     message(STATUS
     "WARNING: qhull library not found.  Setting HAVE_QHULL to OFF."


fix qi_create_test_lib for static libraries

Change-Id: Ie95f8534d0412382ab4fe3e29568a26a74a46dd4

--- cmake/qibuild/tests.cmake
+++ cmake/qibuild/tests.cmake
@@ -81,6 +81,7 @@
   install(TARGETS ${target_name}
     RUNTIME COMPONENT test DESTINATION ${_runtime_output}
     LIBRARY COMPONENT test DESTINATION ${_runtime_output}
+    ARCHIVE COMPONENT test DESTINATION ${_runtime_output}
   )

 endfunction()


remove unused options

remove unused options

--- config/user_options.cmake
+++ config/user_options.cmake
@@ -41,13 +41,6 @@

 ##############################################################################

-# The inlude directory of Random123
-# Under this directory `Random123/threefry.h` etc shall be found
-SET (Random123_INC_PATH "C:/Program Files/Random123/include"
-    CACHE PATH "Random123 include path")
-
-##############################################################################
-
 # Paths to Intel TBB
 SET (TBB_ROOT "C:/Program Files/Intel/TBB/4.2")
 SET (TBB_INC_PATH "${TBB_ROOT}/include" CACHE PATH "TBB include")
@@ -66,26 +59,3 @@
     CACHE PATH "OpenCL include path")
 SET (OpenCL_LIB_PATH "C:/Program Files (x86)/Intel/OpenCL SDK/3.2/lib/x64"
     CACHE PATH "OpenCL lib path")
-
-##############################################################################
-
-# Disable checking features
-SET (AESNI_FOUND   FALSE CACHE BOOL "NO AES-NI")
-SET (GCD_FOUND     FALSE CACHE BOOL "NO GCD")
-SET (INT128_FOUND  FALSE CACHE BOOL "NO int128")
-SET (MKL_FOUND     FALSE CACHE BOOL "NO MKL")
-SET (RDRAND_FOUND  FALSE CACHE BOOL "NO RDRAND")
-SET (TESTU01_FOUND FALSE CACHE BOOL "NO TestU01")
-
-SET (VSMC_ENABLE_CXX11 ON CACHE BOOL "Try C++11")
-
-IF (MSVC_VERSION LESS 1700)
-    SET (VSMC_RANDOM_STD_FOUND FALSE CACHE BOOL "NO C++11 <random>")
-    SET (CXX11LIB_THREAD_FOUND FALSE CACHE BOOL "NO C++11 <thread>")
-ENDIF (MSVC_VERSION LESS 1700)
-
-IF (MSVC_VERSION LESS 1800)
-    SET (CXX11LIB_TUPLE_FOUND      FALSE CACHE BOOL "NO C++11 <tuple>")
-    SET (VSMC_CXX11_MATH_STD_FOUND FALSE CACHE BOOL "NO C++11 <cmath>")
-    SET (VSMC_CXX11_MATH_C99_FOUND FALSE CACHE BOOL "NO C99 <math.h>")
-ENDIF (MSVC_VERSION LESS 1800)


CI: need PATH on windows

CI: need PATH on windows

--- CI/prepare_superbuild.cmake
+++ CI/prepare_superbuild.cmake
@@ -69,6 +69,13 @@
 # to run the CTEST_COMMAND. And we need it to not produce an error
 ##set (CTEST_COMMAND "echo \"Exit\"") # HACK FIX ME
 set (CMAKE_COMMAND "cmake")
+
+if(WIN32)
+  file(TO_NATIVE_PATH "${CTEST_INSTALL_DIRECTORY}" XDK_INSTALL_DIR_NATIVE)
+  set(ENV{PATH} "${XDK_INSTALL_DIR_NATIVE}\\bin;$ENV{PATH}" )
+  set(ENV{PATH} "$ENV{PATH};${XDK_INSTALL_DIR_NATIVE}\\lib" )
+  # set(ENV{CMAKE_PREFIX_PATH} "${XDK_INSTALL_DIR}" )
+endif()

 ########################################################################
 ########################################################################


module: fix export macros with kits

module: fix export macros with kits

Apparently the previous attempt was insufficient for Windows.

Change-Id: I714394656b280323f3115e0d56eda162e4f98389

--- CMake/vtkModuleMacros.cmake
+++ CMake/vtkModuleMacros.cmake
@@ -610,7 +610,6 @@
     set(target_suffix Objects)
     set(force_object ${target_suffix} OBJECT)
     set(export_symbol_object ${target_suffix} BASE_NAME ${vtk-module})
-    add_definitions(-D${vtk-module}_EXPORTS)
     # OBJECT libraries don't like this variable being set; clear it.
     unset(${vtk-module}_LIB_DEPENDS CACHE)
   endif()
@@ -624,8 +623,14 @@
       PROPERTIES
         INTERFACE_LINK_LIBRARIES "${_vtk_build_as_kit}")
     if(BUILD_SHARED_LIBS)
+      # Define a kit-wide export symbol for the objects in this module.
+      set_property(TARGET ${vtk-module}Objects APPEND
+        PROPERTY
+          COMPILE_DEFINITIONS ${${vtk-module}_KIT}_EXPORTS)
       set_target_properties(${vtk-module}Objects
         PROPERTIES
+          # Tell generate_export_header what kit-wide export symbol we use.
+          DEFINE_SYMBOL ${${vtk-module}_KIT}_EXPORTS
           POSITION_INDEPENDENT_CODE TRUE)
     endif()
   endif()


remove NO_DEFAULT_PATH in FindMDBQ.cmake. Closes #1

--- CMakeModules/FindMDBQ.cmake
+++ CMakeModules/FindMDBQ.cmake
@@ -5,8 +5,8 @@
 #  MDBQ_INCLUDE_DIRS   - MDBQ include directories
 #  MDBQ_LIBRARIES      - MDBQ libraries

-FIND_PATH(MDBQ_INCLUDE_DIR mdbq/client.hpp NO_DEFAULT_PATH PATHS ${MDBQ_ROOT}/src /usr/local/include /usr/include)
-FIND_LIBRARY(MDBQ_LIBRARY mdbq NO_DEFAULT_PATH PATHS ${MDBQ_ROOT}/build/src/mdbq /usr/local/lib /usr/lib)
+FIND_PATH(MDBQ_INCLUDE_DIR mdbq/client.hpp PATHS ${MDBQ_ROOT}/src /usr/local/include /usr/include)
+FIND_LIBRARY(MDBQ_LIBRARY mdbq PATHS ${MDBQ_ROOT}/build/src/mdbq /usr/local/lib /usr/lib)

 FIND_PATH(BSON_INCLUDE_DIR mongo/bson/bson.h)


From Miguel Escriva,"OSG 2.8.0-rc4 don't found zlib in Windows.

Here you will find a patch. "

--- CMakeModules/FindZLIB.cmake
+++ CMakeModules/FindZLIB.cmake
@@ -29,7 +29,7 @@
 )

 FIND_LIBRARY(ZLIB_LIBRARY
-    NAMES z libz
+    NAMES z libz zlib
     PATHS
     $ENV{ZLIB_DIR}/lib
     $ENV{ZLIB_DIR}


Set boost default version and variant to 1.53.0 proxy

--- configure.cmake
+++ configure.cmake
@@ -1,7 +1,8 @@
-# Copyright (c) 2011, Christian Rorvik
+# Copyright (c) 2011-2013, Christian Rorvik
 # Distributed under the Simplified BSD License (See accompanying file LICENSE.txt)

-vpm_set_default_version(boost proxy)
+vpm_set_default_variant(boost proxy)
+vpm_set_default_version(boost 1.53.0)
 vpm_depend(boost)

 vpm_include_directories(${CMAKE_CURRENT_LIST_DIR}/include)


update

update

--- modules/HdrHistogram.cmake
+++ modules/HdrHistogram.cmake
@@ -11,8 +11,6 @@
     # C4200: nonstandard extension used : zero-sized array in struct/union
     # C4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data
     set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${COMMON_COMPILE_FLAGS} /wd4146 /wd4200 /wd4244")
-  else()
-    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${COMMON_COMPILE_FLAGS}")
   endif()
   add_library(HdrHistogram ${SOURCE_FILES})
   target_link_libraries(HdrHistogram zlib)


Added mitkPointLocator

Added mitkPointLocator

--- Core/Algorithms/files.cmake
+++ Core/Algorithms/files.cmake
@@ -34,6 +34,7 @@
   mitkPlaneCutFilter.cpp
   mitkPlaneFit.cpp
   mitkPlanesPerpendicularToLinesFilter.cpp
+  mitkPointLocator.cpp
   mitkPointSetSource.cpp
   mitkPolygonToRingFilter.cpp
   mitkProbeFilter.cpp


Add boost minimum version requirement

Add boost minimum version requirement

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -39,11 +39,12 @@
 set(Boost_USE_STATIC_RUNTIME    OFF)
 set(BOOST_ROOT                  "${BOOST_SEARCH_PATH}")
 #set(Boost_DEBUG                 ON)
+set(Boost_MINIMUM_VERSION       "1.43.0")

 set(Boost_ADDITIONAL_VERSIONS "1.46.2" "1.46.1" "1.46" "1.46.0" "1.45" "1.45.0" "1.44" "1.44.0" "1.43" "1.43.0" )

 set(LUXRAYS_BOOST_COMPONENTS thread filesystem system)
-find_package(Boost COMPONENTS ${LUXRAYS_BOOST_COMPONENTS})
+find_package(Boost ${Boost_MINIMUM_VERSION} COMPONENTS ${LUXRAYS_BOOST_COMPONENTS})
 if (NOT Boost_FOUND)
         # Try again with the other type of libs
         if(Boost_USE_STATIC_LIBS)
@@ -51,7 +52,7 @@
         else()
                 set(Boost_USE_STATIC_LIBS OFF)
         endif()
-        find_package(Boost COMPONENTS ${LUXRAYS_BOOST_COMPONENTS})
+        find_package(Boost ${Boost_MINIMUM_VERSION} COMPONENTS ${LUXRAYS_BOOST_COMPONENTS})
 endif()
 find_package(Boost)


Added Python_ADDITIONAL_VERSIONS to cmake so python 2 is default.

Summary:
When installing on systems such as Arch Linux where the default python version is 3 the build will fail. To fix this instead of changing the python link in the shell it is more efficient to set the default python version allowed by cmake.
Closes https://github.com/caffe2/caffe2/pull/361

Differential Revision: D4932214

Pulled By: Yangqing

fbshipit-source-id: 06997d2df68b8e4037d72fd49813f6f74ca7591b

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -182,6 +182,7 @@

 # ---[ Python + Numpy
 if (BUILD_PYTHON)
+  set(Python_ADDITIONAL_VERSIONS 2.8 2.7 2.6)
   find_package(PythonInterp 2.7)
   find_package(PythonLibs 2.7)
   find_package(NumPy REQUIRED)


another bug

another bug

--- cmake/UseQGLViewer.cmake
+++ cmake/UseQGLViewer.cmake
@@ -13,5 +13,4 @@
 FIND_PATH(QGLVIEWER_INC "/QGLViewer/qglviewer.h" HINTS "${QGLVIEWER_ROOT}")
 FIND_LIBRARY(QGLVIEWER_LIBRARY QGLViewerd2 HINTS "${QGLVIEWER_ROOT}/QGLViewer/")

-INCLUDE_DIRECTORIES(${GLEW_INC})
-
+INCLUDE_DIRECTORIES(${QGLVIEWER_INC})


[cmake] fix/update target name to follow other target's convention.

--- cmake/coverageFunc.cmake
+++ cmake/coverageFunc.cmake
@@ -132,11 +132,11 @@
             COMMAND ${LCOV_BIN} --gcov-tool ${GCOV_BIN_FOR_LCOV} --list ${CMAKE_BINARY_DIR}/total.info)
         add_custom_target(coverage_lcov
             COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target all --parallel
-            COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target lcov-init --parallel
-            COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target lcov-zerocounter --parallel
+            COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target lcov_init --parallel
+            COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target lcov_zerocounter --parallel
             COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target check --parallel
-            COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target lcov-capture --parallel)
-        add_custom_target(lcov-remove
+            COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target lcov_capture --parallel)
+        add_custom_target(lcov_remove
             COMMAND ${LCOV_BIN} --gcov-tool ${GCOV_BIN_FOR_LCOV} --remove coverage.info  ${LCOV_REMOVES} --output-file  ${CMAKE_BINARY_DIR}/coverage.info)

         find_program(GENHTML_BIN genhtml)


Get rid of -DHAVE_PTHREAD=ON warning for CMake-2.6.x.

svn path=/trunk/; revision=8531

--- cmake/modules/xwin.cmake
+++ cmake/modules/xwin.cmake
@@ -36,6 +36,7 @@
       find_package(Threads)
       if(CMAKE_USE_PTHREADS_INIT)
         set(xwin_LINK_FLAGS ${xwin_LINK_FLAGS} ${CMAKE_THREAD_LIBS_INIT})
+	cmake_link_flags(xwin_LINK_FLAGS "${xwin_LINK_FLAGS}")
 	if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
 	  set(PLPLOT_MUTEX_RECURSIVE "PTHREAD_MUTEX_RECURSIVE_NP")
 	else(CMAKE_SYSTEM_NAME STREQUAL "Linux")


Added new deps paths

Added new deps paths

--- cmake/CMakeModules/OssimCommonVariables.cmake
+++ cmake/CMakeModules/OssimCommonVariables.cmake
@@ -263,7 +263,7 @@
    ENDIF()
    IF(OSSIM_DEPENDENCIES)
       SET(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH};${OSSIM_DEPENDENCIES}/lib;${OSSIM_DEPENDENCIES}/lib64")
-      SET(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH};${OSSIM_DEPENDENCIES}/include;${OSSIM_DEPENDENCIES}/kakadu/include")
+      SET(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH};${OSSIM_DEPENDENCIES}/include;${OSSIM_DEPENDENCIES}/kakadu/include;${OSSIM_DEPENDENCIES}")
    ENDIF()
 #   SET(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH};/usr/lib;/usr/local/lib;/usr/lib64;/usr/lib/x86_64-linux-gnu")
    SET(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH};${OSSIM_DEV_HOME}/ossim/include;/usr/include;/usr/local/include")


added rosconsole and roscpp_serialization

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

--- cmake/pcl_find_ros.cmake
+++ cmake/pcl_find_ros.cmake
@@ -3,7 +3,7 @@

 macro(link_ros_libs _target)
     if(USE_ROS)
-        target_link_libraries(${_target} sensor_msgs)
+        target_link_libraries(${_target} sensor_msgs roscpp_serialization rosconsole)
     endif(USE_ROS)
 endmacro(link_ros_libs)


Refactored the variables for c++11

Refactored the variables for c++11

--- cmake/CMakeModules/OssimCommonVariables.cmake
+++ cmake/CMakeModules/OssimCommonVariables.cmake
@@ -69,6 +69,18 @@

    MARK_AS_ADVANCED(OSSIM_COMMON_COMPILER_FLAGS)
 ENDMACRO(OSSIM_ADD_COMMON_LIBRARY_FLAGS)
+
+MACRO(USE_CXX11)
+  if (CMAKE_VERSION VERSION_LESS "3.1")
+    if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+      set (CMAKE_CXX_FLAGS "--std=gnu++11 ${CMAKE_CXX_FLAGS}")
+    elseif (APPLE)
+      set (CMAKE_CXX_FLAGS "--std=gnu++11 ${CMAKE_CXX_FLAGS}")
+    endif()
+  else ()
+    set (CMAKE_CXX_STANDARD 11)
+  endif ()
+ENDMACRO(USE_CXX11)

 MACRO(OSSIM_ADD_COMMON_SETTINGS)
    ###################################################################################
@@ -81,6 +93,9 @@
    # FORCE is used because the options are not reflected in the UI otherwise.
    # Seems like a good place to add version specific compiler flags too.
    ###################################################################################
+
+   USE_CXX11()
+
    IF(APPLE)
       # use, i.e. don't skip the full RPATH for the build tree
         SET(CMAKE_SKIP_BUILD_RPATH  FALSE)
@@ -88,7 +103,6 @@
         # when building, don't use the install RPATH already
         # (but later on when installing)
         SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
-        SET( CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} --std=c++11" )

         SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}")


Removed tabs and included catch to exclude in coverage

--- CMakeScripts/Coverage.cmake
+++ CMakeScripts/Coverage.cmake
@@ -4,9 +4,10 @@
 endif()
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
 add_custom_target(coverage
-		COMMAND ${CMAKE_MAKE_PROGRAM} -j8
-		COMMAND ctest
-		COMMAND lcov --capture --directory ${CMAKE_BINARY_DIR} --output-file coverage.info
-		COMMAND lcov -r coverage.info '/usr/include/*' -o coverage.info
-		COMMAND genhtml coverage.info --output-directory coverageOutput
-		COMMAND xdg-open coverageOutput/index.html)
+        COMMAND ${CMAKE_MAKE_PROGRAM} -j8
+        COMMAND ctest
+        COMMAND lcov --capture --directory ${CMAKE_BINARY_DIR} --output-file coverage.info
+        COMMAND lcov -r coverage.info '/usr/include/*' -o coverage.info
+        COMMAND lcov -r coverage.info 'build/catch/*' -o coverage.info
+        COMMAND genhtml coverage.info --output-directory coverageOutput
+        COMMAND xdg-open coverageOutput/index.html)


reduce pragma test to the necessary

reduce pragma test to the necessary

--- cmake/checks/check_01_compiler_features.cmake
+++ cmake/checks/check_01_compiler_features.cmake
@@ -328,16 +328,6 @@
   _Pragma(\"GCC diagnostic push\")
   _Pragma(\"GCC diagnostic ignored \\\\\\\"-Wextra\\\\\\\"\")
   _Pragma(\"GCC diagnostic ignored \\\\\\\"-Wpragmas\\\\\\\"\")
-  _Pragma(\"GCC diagnostic ignored \\\\\\\"-Wextra\\\\\\\"\")
-  _Pragma(\"GCC diagnostic ignored \\\\\\\"-Woverloaded-virtual\\\\\\\"\")
-  _Pragma(\"GCC diagnostic ignored \\\\\\\"-Wunused-function\\\\\\\"\")
-  _Pragma(\"GCC diagnostic ignored \\\\\\\"-Wunused-parameter\\\\\\\"\")
-  _Pragma(\"GCC diagnostic ignored \\\\\\\"-Wunused-variable\\\\\\\"\")
-  _Pragma(\"GCC diagnostic ignored \\\\\\\"-Wunused-but-set-parameter\\\\\\\"\")
-  _Pragma(\"GCC diagnostic ignored \\\\\\\"-Wnested-anon-types\\\\\\\"\")
-  _Pragma(\"GCC diagnostic ignored \\\\\\\"-Wunused-private-field\\\\\\\"\")
-  _Pragma(\"GCC diagnostic ignored \\\\\\\"-Wdeprecated-declarations\\\\\\\"\")
-  _Pragma(\"GCC diagnostic warning \\\\\\\"-Wpragmas\\\\\\\"\")
   int main() { return 0; }
   _Pragma(\"GCC diagnostic pop\")
   "


record MSVC_VERSION in XP_INFOFILE

record MSVC_VERSION in XP_INFOFILE

https://github.com/smanders/externpro/issues/326

--- modules/macpro.cmake
+++ modules/macpro.cmake
@@ -278,6 +278,9 @@
       if(NOT lsbDesc STREQUAL "")
         file(APPEND ${XP_INFOFILE} "lsb_release ${lsbDesc}\n")
       endif()
+      if(DEFINED MSVC_VERSION)
+        file(APPEND ${XP_INFOFILE} "MSVC_VERSION ${MSVC_VERSION}\n")
+      endif()
     endif()
   endif()
   if(GIT_REV)


enable HDF5 in Custom-vs.cmake

enable HDF5 in Custom-vs.cmake

--- msvc/Custom-vs.cmake
+++ msvc/Custom-vs.cmake
@@ -17,7 +17,7 @@
 set(BUILD_FAUST_OPCODES OFF)
 set(BUILD_FLUID_OPCODES ON)
 set(BUILD_FRAMEBUFFER_OPCODES ON)
-set(BUILD_HDF5_OPCODES OFF)
+set(BUILD_HDF5_OPCODES ON)
 set(BUILD_IMAGE_OPCODES ON)
 set(BUILD_INSTALLER ON)
 set(BUILD_JACK_OPCODES OFF)


Update superbuild source download to use sha512

--- SuperBuild/SuperBuild.cmake
+++ SuperBuild/SuperBuild.cmake
@@ -71,14 +71,16 @@
 #
 function(sitkSourceDownload outVar filename)

+  set(algo "SHA512")
+  set(algo_extension ".sha512")
   set(link_file "${CMAKE_CURRENT_SOURCE_DIR}/ExternalSource/${filename}")
-  if( NOT EXISTS "${link_file}.md5")
-    message(FATALERROR "The source download file: \"${link_file}.md5\" does not exists.")
+  if( NOT EXISTS "${link_file}${algo_extension}")
+    message(FATALERROR "The source download file: \"${link_file}${algo_extension}\" does not exists.")
   endif()

-  file(READ "${link_file}.md5" _HASH)
+  file(READ "${link_file}${algo_extension}" _HASH)
   string(STRIP "${_HASH}" _HASH)
-  set(${outVar}_HASH "MD5=${_HASH}" PARENT_SCOPE)
+  set(${outVar}_HASH "${algo}=${_HASH}" PARENT_SCOPE)

   ExternalData_Expand_arguments(
     SuperBuildSimpleITKSourceReal


Bugfix

Bugfix

git-svn-id: fbbf69ba8011aca0e74e1c67904b11cccbdbe66b@26979 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/configure/configure_metis.cmake
+++ deal.II/cmake/configure/configure_metis.cmake
@@ -21,7 +21,7 @@
   FIND_PACKAGE(METIS)

   IF(METIS_FOUND)
-    IF(AND METIS_MAJOR GREATER 4)
+    IF(METIS_MAJOR GREATER 4)
       SET(${var} TRUE)
     ELSE()
       MESSAGE(WARNING "\n"


CI: Remove -Wstrict-overflow (#3516)

CI: Remove -Wstrict-overflow (#3516)

--- cmake/ci.cmake
+++ cmake/ci.cmake
@@ -343,8 +343,6 @@
     -Wstrict-aliasing
     -Wstrict-aliasing=3
     -Wstrict-null-sentinel
-    -Wstrict-overflow
-    -Wstrict-overflow=5
     -Wstring-compare
     -Wstringop-overflow=4
     -Wstringop-overread


Added proper cmake scripts to download and build the v8 engine.

--- cmake/v8.cmake
+++ cmake/v8.cmake
@@ -1,42 +1,64 @@
-# Copyright 2015 AeonGames, Rodrigo Hernandez
-# Licensed under the terms of the Apache 2.0 License.
-
-find_package(GIT)
-find_package(Subversion)
-find_package(PythonInterp)
-set(ENV{http_proxy} "${HTTP_PROXY}")
-if(GIT_FOUND)
-	if(NOT IS_DIRECTORY "${CMAKE_SOURCE_DIR}/v8")
-		message(STATUS "Git executable is at ${GIT_EXECUTABLE}")
-		message(STATUS "Cloning v8 git repository, this may take some time depending on your network connection")
-		EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} clone https://chromium.googlesource.com/v8/v8.git v8 WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" RESULT_VARIABLE git_clone_v8_result OUTPUT_VARIABLE git_clone_v8_output ERROR_VARIABLE git_clone_v8_output)
-		if(NOT git_clone_v8_result EQUAL 0)
-			MESSAGE(FATAL_ERROR "Cloning v8 git repository failed, perhaps you need to set your proxy with git config --global http.proxy <proxy address:port>\n${git_clone_v8_result}: ${git_clone_v8_output}")
-		endif(NOT git_clone_v8_result EQUAL 0)
-		#EXECUTE_PROCESS(COMMAND ${CMAKE_MAKE_PROGRAM} dependencies WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/v8")
-	endif(NOT IS_DIRECTORY "${CMAKE_SOURCE_DIR}/v8")
-endif(GIT_FOUND)
-
-if(MSVC)
-	if(NOT EXISTS "${CMAKE_SOURCE_DIR}/depot_tools.zip")
-		message(STATUS "Please wait while downloading depot_tools...")
-		file(DOWNLOAD "https://src.chromium.org/svn/trunk/tools/depot_tools.zip" "${CMAKE_SOURCE_DIR}/depot_tools.zip" STATUS dl_status LOG dl_log SHOW_PROGRESS)
-		if(NOT dl_status MATCHES "0;\"No error\"")
-			file(REMOVE "${CMAKE_SOURCE_DIR}/depot_tools.zip")
-			message(FATAL_ERROR "Download failed, did you set a proxy? STATUS: ${dl_status}")
-		endif(NOT astyle_dl_status MATCHES "0;\"No error\"")
-		message(STATUS "Done downloading Astyle binary")
-	endif(NOT EXISTS "${CMAKE_SOURCE_DIR}/depot_tools.zip")
-	# Extract depot_tools.
-	if(NOT EXISTS "${CMAKE_SOURCE_DIR}/depot_tools/gclient")
-		message(STATUS "Extracting depot_tools...")
-		execute_process(COMMAND cmake -E tar xzvf depot_tools.zip WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ERROR_VARIABLE extract_result)
-	endif()
-	string(REGEX REPLACE "/" "\\\\" WIN_DEPOT_TOOLS_PATH "${CMAKE_SOURCE_DIR}/depot_tools")
-	if(NOT "$ENV{PATH}" MATCHES "depot_tools")
-		set(ENV{PATH} "$ENV{PATH};${WIN_DEPOT_TOOLS_PATH}")
-	endif()
-	message(STATUS "Running gclient...")
-	execute_process(COMMAND gclient.bat WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/depot_tools" OUTPUT_VARIABLE result ERROR_VARIABLE error)
-	message(STATUS "Done.\nresult:\n${result}\n")
-endif(MSVC)
+# Copyright 2015 AeonGames, Rodrigo Hernandez
+# Licensed under the terms of the Apache 2.0 License.
+
+find_package(GIT REQUIRED)
+function(gitclone repo path)
+	if(NOT IS_DIRECTORY "${CMAKE_SOURCE_DIR}/${path}")
+		message(STATUS "Cloning ${repo}, please wait")
+		execute_process(COMMAND ${GIT_EXECUTABLE} clone ${repo} ${path} WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" RESULT_VARIABLE git_result OUTPUT_VARIABLE git_output ERROR_VARIABLE git_output)
+		if(NOT git_result EQUAL 0)
+			MESSAGE(FATAL_ERROR "Cloning ${repo} failed.\nResult: ${git_result}\nOutput: ${git_output}")
+		endif(NOT git_result EQUAL 0)
+	endif(NOT IS_DIRECTORY "${CMAKE_SOURCE_DIR}/${path}")
+endfunction(gitclone repo path)
+
+if(GIT_FOUND)
+	gitclone(https://chromium.googlesource.com/v8/v8 v8)
+	gitclone(https://chromium.googlesource.com/external/gyp v8/build/gyp)
+	gitclone(https://chromium.googlesource.com/chromium/deps/icu v8/third_party/icu)
+	gitclone(https://chromium.googlesource.com/external/gtest v8/testing/gtest)
+	gitclone(https://chromium.googlesource.com/external/gmock v8/testing/gmock)
+	# The following two are likely only required on Windows.
+	gitclone(https://chromium.googlesource.com/chromium/deps/cygwin v8/third_party/cygwin)
+	gitclone(https://chromium.googlesource.com/chromium/deps/python_26 v8/third_party/python_26)
+endif(GIT_FOUND)
+
+set(ENV{PYTHONPATH} "${CMAKE_SOURCE_DIR}/v8/build/gyp")
+if(MSVC)
+	if(NOT EXISTS "${CMAKE_SOURCE_DIR}/v8/build/all.sln")
+		message(STATUS "Running GYP to generate v8 projects.")
+		execute_process(COMMAND third_party/python_26/python build/gyp_v8 -Dtarget_arch=x64 WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/v8" RESULT_VARIABLE gyp_result OUTPUT_VARIABLE gyp_output ERROR_VARIABLE gyp_output)
+		if(NOT gyp_result EQUAL 0)
+			message(FATAL_ERROR "Running GYP failed.\nResult: ${gyp_result}\nOutput: ${gyp_output}")
+		endif(NOT gyp_result EQUAL 0)
+	endif(NOT EXISTS "${CMAKE_SOURCE_DIR}/v8/build/all.sln")
+	include_external_msproject(All "${CMAKE_SOURCE_DIR}/v8/build/All.vcxproj")
+	include_external_msproject(hello-world "${CMAKE_SOURCE_DIR}/v8/samples/hello-world.vcxproj")
+	include_external_msproject(process "${CMAKE_SOURCE_DIR}/v8/samples/process.vcxproj")
+	include_external_msproject(shell "${CMAKE_SOURCE_DIR}/v8/samples/shell.vcxproj")
+	include_external_msproject(d8 "${CMAKE_SOURCE_DIR}/v8/src/d8.vcxproj")
+	include_external_msproject(d8_js2c "${CMAKE_SOURCE_DIR}/v8/src/d8_js2c.vcxproj")
+	include_external_msproject(cctest "${CMAKE_SOURCE_DIR}/v8/test/cctest/cctest.vcxproj")
+	include_external_msproject(resources "${CMAKE_SOURCE_DIR}/v8/test/cctest/resources.vcxproj")
+	include_external_msproject(unittests "${CMAKE_SOURCE_DIR}/v8/test/unittests/unittests.vcxproj")
+	include_external_msproject(gmock_v8 "${CMAKE_SOURCE_DIR}/v8/testing/gmock.vcxproj")
+	include_external_msproject(gtest_v8 "${CMAKE_SOURCE_DIR}/v8/testing/gtest.vcxproj")
+	include_external_msproject(gtest_prod "${CMAKE_SOURCE_DIR}/v8/testing/gtest_prod.vcxproj")
+	include_external_msproject(icudata "${CMAKE_SOURCE_DIR}/v8/third_party/icu/icudata.vcxproj")
+	include_external_msproject(icui18n "${CMAKE_SOURCE_DIR}/v8/third_party/icu/icui18n.vcxproj")
+	include_external_msproject(icuuc "${CMAKE_SOURCE_DIR}/v8/third_party/icu/icuuc.vcxproj")
+	include_external_msproject(js2c "${CMAKE_SOURCE_DIR}/v8/tools/gyp/js2c.vcxproj")
+	include_external_msproject(mksnapshot "${CMAKE_SOURCE_DIR}/v8/tools/gyp/mksnapshot.vcxproj")
+	include_external_msproject(natives_blob "${CMAKE_SOURCE_DIR}/v8/tools/gyp/natives_blob.vcxproj")
+	include_external_msproject(v8 "${CMAKE_SOURCE_DIR}/tools/gyp/v8.vcxproj")
+	include_external_msproject(v8_base_0 "${CMAKE_SOURCE_DIR}/v8/tools/gyp/v8_base_0.vcxproj")
+	include_external_msproject(v8_base_1 "${CMAKE_SOURCE_DIR}/v8/tools/gyp/v8_base_1.vcxproj")
+	include_external_msproject(v8_base_2 "${CMAKE_SOURCE_DIR}/v8/tools/gyp/v8_base_2.vcxproj")
+	include_external_msproject(v8_base_3 "${CMAKE_SOURCE_DIR}/v8/tools/gyp/v8_base_3.vcxproj")
+	include_external_msproject(v8_external_snapshot "${CMAKE_SOURCE_DIR}/v8/tools/gyp/v8_external_snapshot.vcxproj")
+	include_external_msproject(v8_libbase "${CMAKE_SOURCE_DIR}/v8/tools/gyp/v8_libbase.vcxproj")
+	include_external_msproject(v8_libplatform "${CMAKE_SOURCE_DIR}/v8/tools/gyp/v8_libplatform.vcxproj")
+	include_external_msproject(v8_maybe_snapshot "${CMAKE_SOURCE_DIR}/v8/tools/gyp/v8_maybe_snapshot.vcxproj")
+	include_external_msproject(v8_nosnapshot "${CMAKE_SOURCE_DIR}/v8/tools/gyp/v8_nosnapshot.vcxproj")
+	include_external_msproject(parser-shell "${CMAKE_SOURCE_DIR}/v8/tools/parser-shell.vcxproj")
+endif(MSVC)


Add debian revision.

Add debian revision.

--- cmake/CPackDebianConfig.cmake
+++ cmake/CPackDebianConfig.cmake
@@ -7,15 +7,13 @@
 SET(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
 SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENCE.TXT")
 SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CPACK_RESOURCE_FILE_README}")
-SET(CPACK_PACKAGE_VERSION_MAJOR ${OSRM_VERSION_MAJOR})
-SET(CPACK_PACKAGE_VERSION_MINOR ${OSRM_VERSION_MINOR})
-SET(CPACK_PACKAGE_VERSION_PATCH ${OSRM_VERSION_PATCH})
-
-SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+SET(CPACK_PACKAGE_UPSTREAM_VERSION "${OSRM_VERSION_MAJOR}.${OSRM_VERSION_MINOR}.${OSRM_VERSION_PATCH}")
+SET(CPACK_PACKAGE_DEBIAN_REVISION "1")
+SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_UPSTREAM_VERSION-${CPACK_PACKAGE_DEBIAN_REVISION}")

 string(TOLOWER "${CMAKE_PROJECT_NAME}" LOWER_PROJECT_NAME)
 SET(CPACK_PACKAGE_FILE_NAME "${LOWER_PROJECT_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
-SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${LOWER_PROJECT_NAME}_${CPACK_PACKAGE_VERSION}_orig")
+SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${LOWER_PROJECT_NAME}_${CPACK_PACKAGE_UPSTREAM_VERSION}_orig")
 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Open Source Routing Machine (OSRM).")
 SET(CPACK_PACKAGE_DESCRIPTION "Open Source Routing Machine (OSRM) is a routing engine.")

@@ -27,7 +25,7 @@
 SET(CPACK_GENERATOR "DEB")

 SET(CPACK_DEBIAN_PACKAGE_NAME        "${CPACK_PACKAGE_NAME}${VERSION_SUFFIX}")
-SET(CPACK_DEBIAN_PACKAGE_VERSION     "${CPACK_PACKAGE_VERSION}${CPACK_PACKAGE_REVISION}")
+SET(CPACK_DEBIAN_PACKAGE_VERSION     "${CPACK_PACKAGE_VERSION}")
 SET(CPACK_DEBIAN_PACKAGE_MAINTAINER  "Dennis Luxen <info@project-osrm.org>")
 SET(CPACK_DEBIAN_PACKAGE_PRIORITY    "optional")
 SET(CPACK_DEBIAN_PACKAGE_SECTION     "devel")


Disable external strings on ppa build.

Disable external strings on ppa build.

--- cmake/Modules/UploadPPA.cmake
+++ cmake/Modules/UploadPPA.cmake
@@ -103,7 +103,7 @@
          "\tdh  $@ --buildsystem=cmake\n"
          "\noverride_dh_auto_configure:\n"
          "\tDESTDIR=\"$(CURDIR)\" dh_auto_configure"
-         " -- -DCMAKE_BUILD_TYPE=Release -DAFF3CT_COMPILE_SHARED_LIB=ON "
+         " -- -DCMAKE_BUILD_TYPE=Release -DAFF3CT_COMPILE_SHARED_LIB=ON -DAFF3CT_EXT_STRINGS=OFF"
          "-DAFF3CT_OVERRIDE_VERSION=${GIT_VERSION} -DCMAKE_CXX_FLAGS='${CMAKE_CXX_FLAGS}'"
          "\n\noverride_dh_auto_install:\n"
          "\tdh_auto_install --destdir=\"$(CURDIR)\" --buildsystem=cmake"


Explain current use and implementation of binarytochararray.cmake.

--- cmake/binarytochararray.cmake
+++ cmake/binarytochararray.cmake
@@ -14,9 +14,15 @@

 # This script requires CMake version 3.18 to run hence why it is not directly part of the build configuration.
 # usage:
-#  cmake -P binary_to_char_array.cmake <full-path-to-xhtml-math11-f.dtd>
+#  cmake -P binarytochararray.cmake <full-path-to-xhtml-math11-f.dtd>
 #
 # Err, not quite working like that just yet.
+#
+# Currently we have to compress the DTD and then we generate the header and implementation file
+# in the source tree.  We also pass the compressed data and original size of the DTD to this script.
+# It would be prefereble for this not to happen.  Generating the DTD in the build tree is the preferred option
+# but this can't happen until the minimum CMake version can be set to 3.18.
+

 function(STRING_HEX_KEY_TO_C_BYTE_ARRAY STRING_HEX _DATA _LEN)
   # Separate into individual bytes.


From Hady Zalek: fix dictionary dependencies (which were piling up for each directory)

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@33029 27541ba8-7e3a-0410-8455-c3a389f83636

--- cint/reflex/cmake/modules/ReflexMacros.cmake
+++ cint/reflex/cmake/modules/ReflexMacros.cmake
@@ -115,6 +115,8 @@

 MACRO (REFLEX_GENERATE_DICTIONARIES outfiles)

+   SET(${outfiles} "")
+
    # extract the includes and defintions for reuse by genreflex
    _REFLEX_GET_GENREFLEX_INCLUDES(genreflex_includes)
    _REFLEX_GET_GENREFLEX_DEFINITIONS(genreflex_definitions)


cmake: remove unused code

cmake: remove unused code

--- config.h.cmake
+++ config.h.cmake
@@ -83,7 +83,6 @@
 #cmakedefine GRN_WITH_BENCHMARK
 #cmakedefine GRN_WITH_CUTTER
 #cmakedefine GRN_WITH_KYTEA
-#cmakedefine GRN_WITH_LIBMEMCACHED
 #cmakedefine GRN_WITH_LZ4
 #cmakedefine GRN_WITH_MECAB
 #cmakedefine GRN_WITH_MESSAGE_PACK


Revert "[cmake] define magic for umfpack broke dune-fem -> removed"

This reverts commit 847555675db1dba6cd6c5d5d9afccf2211f4d124.

There should be a fix in our dune-fem.

--- config.h.cmake
+++ config.h.cmake
@@ -41,6 +41,10 @@
 # define ENABLE_SUPERLU 0
 #endif

+#ifndef ENABLE_UMFPACK
+# define ENABLE_UMFPACK 0
+#endif
+
 #ifndef ENABLE_BOOST
 # define ENABLE_BOOST 0
 #endif


CMake: Fix clcache producing no cache hits in debug builds.

--- cmake/Modules/CCache.cmake
+++ cmake/Modules/CCache.cmake
@@ -19,6 +19,8 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 # THE SOFTWARE.
 #
+
+include(ucm)

 find_program(CCACHE ccache)
 if (CCACHE_FOUND AND ENV{CCACHE_DIR})
@@ -47,3 +49,7 @@
         set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})
     endif ()
 endif ()
+
+if (MSVC AND NOT ENV{CLCACHE_DIR} STREQUAL "")
+    ucm_replace_flag("/Z[iI]" "" REGEX CONFIG Debug RelWithDebInfo)
+endif ()


yet another workaround for #300 for static libraries

--- cmake/catkin_package.cmake
+++ cmake/catkin_package.cmake
@@ -231,7 +231,10 @@
   set(PKG_CONFIG_LIBRARIES_WITH_PREFIX "")
   foreach(library ${PKG_CONFIG_LIBRARIES})
     if(IS_ABSOLUTE ${library})
-      set(library "-l:${library}")
+      get_filename_component(suffix ${library} EXT)
+      if(NOT "${suffix}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}")
+        set(library "-l:${library}")
+      endif()
     else()
       set(library "-l${library}")
     endif()


CMake: define _USE_MATH_DEFINES on windows, so including cmath also defiines M_PI etc

--- cmake/compileoptions.cmake
+++ cmake/compileoptions.cmake
@@ -151,6 +151,7 @@
             WIN32_LEAN_AND_MEAN
             UNICODE
             _UNICODE
+            _USE_MATH_DEFINES
         )
     else()
         target_compile_definitions(${target} PRIVATE HAVE_CONFIG_H)


fix mklml install path

fix mklml install path

--- cmake/external/mklml.cmake
+++ cmake/external/mklml.cmake
@@ -46,7 +46,7 @@
 FILE(WRITE ${MKLML_DOWNLOAD_DIR}/CMakeLists.txt
   "PROJECT(MKLML)\n"
   "cmake_minimum_required(VERSION 3.0)\n"
-  "install(DIRECTORY ${MKLML_VER}\n"
+  "install(DIRECTORY ${MKLML_VER}/include ${MKLML_VER}/lib \n"
   "        DESTINATION ${MKLML_DST_DIR})\n")

 ExternalProject_Add(


Fix syntax.

Fix syntax.

--- cmake/install_layout.cmake
+++ cmake/install_layout.cmake
@@ -56,6 +56,7 @@
     # XXX not keen on this, how many more will we need? prefer to just bail...
     IF(NOT INSTALL_LAYOUT MATCHES "SVR4")
       SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}")
+    ENDIF()
   ENDIF()
 ENDIF()


update fortran module

update fortran module

--- cmake/downloaded/autocmake_fc_optional.cmake
+++ cmake/downloaded/autocmake_fc_optional.cmake
@@ -12,7 +12,7 @@
 #
 # Variables defined::
 #
-#   CMAKE_Fortran_MODULE_DIRECTORY (${PROJECT_BINARY_DIR}/include/fortran)
+#   CMAKE_Fortran_MODULE_DIRECTORY
 #
 # Variables modified::
 #
@@ -40,7 +40,8 @@
 if(ENABLE_FC_SUPPORT)
     enable_language(Fortran)

-    set(CMAKE_Fortran_MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/include/fortran)
+    set(CMAKE_Fortran_MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/modules)
+    include_directories(${PROJECT_BINARY_DIR}/modules)

     if(NOT DEFINED CMAKE_Fortran_COMPILER_ID)
         message(FATAL_ERROR "CMAKE_Fortran_COMPILER_ID variable is not defined!")


fixes from PR

fixes from PR

--- cmake/modules/DawnAddCustomDummyTarget.cmake
+++ cmake/modules/DawnAddCustomDummyTarget.cmake
@@ -30,15 +30,14 @@
 function(dawn_add_custom_dummy_target)
   # Parse arguments
   set(options)
-  set(one_value_args GTCLANG NAME)
-  set(multi_value_args DIRECTORIES GRIDTOOLS_FLAGS)
+  set(one_value_args NAME)
+  set(multi_value_args DIRECTORIES)
   cmake_parse_arguments(ARG "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN})

   set(all_files "")
   foreach(dir ${ARG_DIRECTORIES})

-    file(GLOB test_sources "${dir}/*.cpp" )
-    file(GLOB test_headers "${dir}/*.hpp" )
+    file(GLOB test_sources "${dir}/*.cpp" "${dir}/*.hpp" "${dir}/*.h")

     list(APPEND all_files ${test_sources} ${test_headers})
   endforeach(dir)


Fixed typo in emscripten toolchain file.

The exe-linker-flag to use the minimal-shell-file wasn't actually used.

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -130,7 +130,7 @@
 elseif(FIPS_EMSCRIPTEN_USE_WASM_ASMJS)
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s WASM=1 -s 'BINARYEN_METHOD=\"native-wasm,asmjs\"'")
 endif()
-set(EMSCRIPTEN_EXE_LINKER_FLAGS "${EMSC_EXE_LINKER_FLAGS} --shell-file ${FIPS_EMSCRIPTEN_SHELL_HTML}")
+set(EMSC_EXE_LINKER_FLAGS "${EMSC_EXE_LINKER_FLAGS} --shell-file ${FIPS_EMSCRIPTEN_SHELL_HTML}")

 set(CMAKE_SYSTEM_NAME Linux)
 set(CMAKE_SYSTEM_VERSION 1)


Do not hide the compilation tests log in CMakeFiles/

--- cmake/modules/MacroCXXCompilationTest.cmake
+++ cmake/modules/MacroCXXCompilationTest.cmake
@@ -91,7 +91,7 @@
     if((${_name}_COMPILES AND NOT ${_name}_SHOULD_FAIL) OR (NOT ${_name}_COMPILES AND ${_name}_SHOULD_FAIL))
       list(APPEND CXX_COMPILATION_TESTS_SUCCEEDED ${_name})
       message("PASS   : ${_name}")
-      file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CompilationTest.log
+      file(APPEND ${CMAKE_BINARY_DIR}/CompilationTests.log
         "C++ compilation test ${_name} succeded with the following output:\n"
         "${OUTPUT}\n"
         "Should fail: ${${_name}_SHOULD_FAIL}\n"
@@ -100,7 +100,7 @@
       message("FAIL   : ${_name}")
       list(APPEND CXX_COMPILATION_TESTS_FAILED ${_name})
       set(CXX_COMPILATION_TESTS_HAVE_FAILURE 1)
-      file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CompilationTest.log
+      file(APPEND ${CMAKE_BINARY_DIR}/CompilationTests.log
         "C++ compilation test ${_name} failed with the following output:\n"
         "${OUTPUT}\n"
         "Should fail: ${${_name}_SHOULD_FAIL}\n"


From Pere: CMake: pass MD5 check for lzma download.

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@48212 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -71,6 +71,7 @@
     ExternalProject_Add(
 	  LZMA
 	  URL ${CMAKE_SOURCE_DIR}/core/lzma/src/xz-${lzma_version}-win32.tar.gz
+	  URL_MD5  65693dc257802b6778c28ed53ecca678
 	  PREFIX LZMA
 	  INSTALL_DIR ${CMAKE_BINARY_DIR}
       CONFIGURE_COMMAND "" BUILD_COMMAND ""
@@ -83,6 +84,7 @@
     ExternalProject_Add(
       LZMA
       URL ${CMAKE_SOURCE_DIR}/core/lzma/src/xz-${lzma_version}.tar.gz
+      URL_MD5 858405e79590e9b05634c399497f4ba7
       INSTALL_DIR ${CMAKE_BINARY_DIR}
       CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix <INSTALL_DIR> --with-pic --disable-shared
       BUILD_IN_SOURCE 1)


Use 'CMAKE_{C,CXX}_COMPILER_{TARGET,EXTERNAL_TOOLCHAIN}' in compiler flags

--- cmake/modules/hunter_dump_cmake_flags.cmake
+++ cmake/modules/hunter_dump_cmake_flags.cmake
@@ -1,10 +1,14 @@
-# Copyright (c) 2016, Ruslan Baratov
+# Copyright (c) 2016-2017, Ruslan Baratov
 # All rights reserved.

 include(CMakeParseArguments) # cmake_parse_arguments

 include(hunter_internal_error)

+# Packages to test this function:
+# * Boost
+# * OpenSSL
+# * odb-boost
 function(hunter_dump_cmake_flags)
   cmake_parse_arguments(x "SKIP_INCLUDES" "CPPFLAGS" "" "${ARGV}")
   # -> x_SKIP_INCLUDES
@@ -49,6 +53,42 @@
     endforeach()
   endif()

+  string(COMPARE NOTEQUAL "${CMAKE_CXX_COMPILER_TARGET}" "" has_value)
+  string(COMPARE NOTEQUAL "${CMAKE_CXX_COMPILE_OPTIONS_TARGET}" "" has_option)
+  if(has_value AND has_option)
+    set(
+        CMAKE_CXX_FLAGS
+        "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_TARGET}${CMAKE_CXX_COMPILER_TARGET}"
+    )
+  endif()
+
+  string(COMPARE NOTEQUAL "${CMAKE_C_COMPILER_TARGET}" "" has_value)
+  string(COMPARE NOTEQUAL "${CMAKE_C_COMPILE_OPTIONS_TARGET}" "" has_option)
+  if(has_value AND has_option)
+    set(
+        CMAKE_C_FLAGS
+        "${CMAKE_C_FLAGS} ${CMAKE_C_COMPILE_OPTIONS_TARGET}${CMAKE_C_COMPILER_TARGET}"
+    )
+  endif()
+
+  string(COMPARE NOTEQUAL "${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}" "" has_value)
+  string(COMPARE NOTEQUAL "${CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}" "" has_option)
+  if(has_value AND has_option)
+    set(
+        CMAKE_CXX_FLAGS
+        "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}"
+    )
+  endif()
+
+  string(COMPARE NOTEQUAL "${CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN}" "" has_value)
+  string(COMPARE NOTEQUAL "${CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}" "" has_option)
+  if(has_value AND has_option)
+    set(
+        CMAKE_C_FLAGS
+        "${CMAKE_C_FLAGS} ${CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN}"
+    )
+  endif()
+
   string(COMPARE EQUAL "${x_CPPFLAGS}" "" is_empty)
   if(NOT is_empty)
     set("${x_CPPFLAGS}" "${${x_CPPFLAGS}} ${cppflags}" PARENT_SCOPE)


use system boost by default because of #63

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -97,7 +97,7 @@
 # Note that we need the main program for the configuration files and the tests)
 find_package(Matlab COMPONENTS MAIN_PROGRAM)

-option(USE_SYSTEM_Boost "Build using an external version of Boost" OFF)
+option(USE_SYSTEM_Boost "Build using an external version of Boost" ON)
 option(USE_SYSTEM_STIR "Build using an external version of STIR" OFF)
 option(USE_SYSTEM_HDF5 "Build using an external version of HDF5" OFF)
 option(USE_SYSTEM_ISMRMRD "Build using an external version of ISMRMRD" OFF)


extension building test

extension building test

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -6,8 +6,10 @@

 if (DEFINED ${LOCAL_PROJECT_NAME}_BUILD_SLICER_EXTENSION)
 message(STATUS "-----------------------------BUILD_SLICER_EXTENSION defined------------------------------")
+set(extension_args "${Slicer_DIR} ${Slicer_EXTENSION_DESCRIPTION_DIR} ${CMAKE_BUILD_TYPE}")
 else()
 message(STATUS "-----------------------------BUILD_SLICER_EXTENSION not defined------------------------------")
+set(extension_args "")
 endif()
 #-----------------------------------------------------------------------------
 enable_testing()
@@ -116,6 +118,7 @@
   BINARY_DIR ${PRIMARY_PROJECT_NAME}-build
   CMAKE_GENERATOR ${gen}
   CMAKE_ARGS
+    ${extension_args}
     ${${CMAKE_PROJECT_NAME}_SUPERBUILD_EP_ARGS}
     -D${PRIMARY_PROJECT_NAME}_SUPERBUILD:BOOL=OFF    #NOTE: VERY IMPORTANT reprocess top level CMakeList.txt
     -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/${PRIMARY_PROJECT_NAME}-install


ENH: Add custom target names "CTK" to superbuild.

That target allows to build CTK project itself directly from the superbuild
directory. For example, on linux, it could be done using "make CTK"

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -313,7 +313,7 @@
 #-----------------------------------------------------------------------------
 # CTK
 #
-set(proj CTK-build)
+SET(proj CTK-build)
 ExternalProject_Add(${proj}
   DOWNLOAD_COMMAND ""
   CMAKE_GENERATOR ${gen}
@@ -324,3 +324,12 @@
   DEPENDS
     "CTK-Configure"
   )
+
+#-----------------------------------------------------------------------------
+# Custom target allowing to drive the build of CTK project itself
+#
+ADD_CUSTOM_TARGET(CTK
+  COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/CTK-build
+  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CTK-build
+  )
+


Removed Git requirement.

Removed Git requirement.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -116,12 +116,6 @@
   if(EXTERNAL_MITK_DATA_DIR)
     set(MITK_DATA_DIR ${EXTERNAL_MITK_DATA_DIR})
   endif()
-endif()
-
-# Look for git early on, if needed
-if((BUILD_TESTING AND NOT EXTERNAL_MITK_DATA_DIR) OR
-   (MITK_USE_CTK AND NOT EXTERNAL_CTK_DIR))
-  find_package(Git REQUIRED)
 endif()

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


Proper CPack top level tag

Proper CPack top level tag

--- ZulipCPack.cmake
+++ ZulipCPack.cmake
@@ -34,7 +34,7 @@
 # CPACK_RESOURCE_FILE_WELCOME     Welcome file for the project, used by PackageMaker generator.   /home/andy/vtk/CMake/Templates/CPack.GenericWelcome.txt
 SET( CPACK_PACKAGE_VERSION  ${ZULIP_VERSION} )

-SET( CPACK_TOPLEVEL_TAG "narf" ) # Directory for the installed files.  - needed to provide anything to avoid an error# CPACK_INSTALL_COMMANDS  Extra commands to install components.
+SET( CPACK_TOPLEVEL_TAG "Zulip" ) # Directory for the installed files.  - needed to provide anything to avoid an error# CPACK_INSTALL_COMMANDS  Extra commands to install components.
 # CPACK_INSTALL_DIRECTORIES   Extra directories to install.
 # CPACK_MONOLITHIC_INSTALL    When set disables the component-based installer.
 # CPACK_PACKAGING_INSTALL_PREFIX  Sets the default root that the generated package installs into, '/usr' is the default for the debian and redhat generators  /usr/local


Enhanced template ctest script.

Enhanced template ctest script.

More docu, better error handling, path environment.

--- CMake/MITKDashboardScript.TEMPLATE.cmake
+++ CMake/MITKDashboardScript.TEMPLATE.cmake
@@ -12,13 +12,23 @@
 #
 # Dashboard properties
 #
+
 set(MY_COMPILER "g++4.4.5")
+# For Windows, e.g.
+#set(MY_COMPILER "VC9.0")

 set(CTEST_CMAKE_COMMAND "/usr/bin/cmake")
 set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
 set(CTEST_DASHBOARD_ROOT "/opt/dartclients")
+# For Windows, e.g.
+#set(CTEST_CMAKE_COMMAND "cmake")
+#set(CTEST_CMAKE_GENERATOR "Visual Studio 9 2008 Win64")
+#set(CTEST_DASHBOARD_ROOT "C:/dartclients")

-set(QT_QMAKE_EXECUTABLE "/usr/bin/qmake")
+# The directory containing the Qt binaries
+set(QT_BINARY_DIR "/usr/bin/")
+# For Windows, e.g.
+#set(QT_BINARY_DIR "V:/windows/x64/QT-4.7.0_VC9.0_Bin/bin")

 #
 # Dashboard options
@@ -30,7 +40,11 @@
 #set(DOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY ) # for example: $ENV{HOME}/Projects/Doxygen
 set(CTEST_BUILD_CONFIGURATION "Release")
 set(CTEST_TEST_TIMEOUT 500)
-set(CTEST_BUILD_FLAGS "-j4") # Use multiple CPU cores to build
+if(UNIX OR MINGW)
+  set(CTEST_BUILD_FLAGS "-j4") # Use multiple CPU cores to build
+else()
+  set(CTEST_BUILD_FLAGS "")
+endif()

 # experimental:
 #     - run_ctest() macro will be called *ONE* time
@@ -51,7 +65,7 @@
 set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/MITK-Superbuild-${CTEST_BUILD_CONFIGURATION}-${SCRIPT_MODE}")

 set(ADDITIONNAL_CMAKECACHE_OPTION "
-#MITK_USE_Boost:BOOL=ON
+MITK_USE_Boost:BOOL=ON
 ")

 # List of test that should be explicitly disabled on this machine
@@ -67,8 +81,10 @@
 #
 # Git repository - Overwrite the default value provided by the driver script
 #
-# set(GIT_REPOSITORY "/home/username/MITK")
-# set(GIT_BRANCH "bug-xxx-description")
+# The git repository containing MITK code
+#set(GIT_REPOSITORY "/home/username/MITK")
+# The branch of the MITK git repository to check out
+#set(GIT_BRANCH "bug-xxx-label")

 ##########################################
 # WARNING: DO NOT EDIT BEYOND THIS POINT #
@@ -82,16 +98,37 @@
 set(MY_OPERATING_SYSTEM "${CMAKE_HOST_SYSTEM}") # Windows 7, Linux-2.6.32, Darwin...
 site_name(CTEST_SITE)

-execute_process(COMMAND qmake --version
-                OUTPUT_VARIABLE MY_QT_VERSION)
+if(QT_BINARY_DIR)
+  set(QT_QMAKE_EXECUTABLE "${QT_BINARY_DIR}/qmake")
+else()
+  set(QT_QMAKE_EXECUTABLE "qmake")
+endif()
+
+execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} --version
+                OUTPUT_VARIABLE MY_QT_VERSION
+				RESULT_VARIABLE qmake_error)
+if(qmake_error)
+  message(FATAL_ERROR "Error when executing ${QT_QMAKE_EXECUTABLE} --version\n${qmake_error}")
+endif()
+
 string(REGEX REPLACE ".*Qt version ([0-9.]+) .*" "\\1" MY_QT_VERSION ${MY_QT_VERSION})

 #
 # Project specific properties
 #
-set(CTEST_PROJECT_NAME "MITK")
 set(CTEST_BUILD_NAME "${MY_OPERATING_SYSTEM}-${MY_COMPILER}-Qt-${MY_QT_VERSION}-${CTEST_BUILD_CONFIGURATION}")
 set(PROJECT_BUILD_DIR "MITK-build")
+
+set(CTEST_PATH "$ENV{PATH}")
+if(WIN32)
+  set(VTK_BINARY_DIR "${CTEST_BINARY_DIRECTORY}/VTK-build/bin/${CTEST_BUILD_CONFIGURATION}")
+  set(ITK_BINARY_DIR "${CTEST_BINARY_DIRECTORY}/ITK-build/bin/${CTEST_BUILD_CONFIGURATION}")
+  set(GDCM_BINARY_DIR "${CTEST_BINARY_DIRECTORY}/GDCM-build/bin/${CTEST_BUILD_CONFIGURATION}")
+  set(BLUEBERRY_OSGI_DIR "${CTEST_BINARY_DIRECTORY}/MITK-build/bin/BlueBerry/org.blueberry.osgi/bin/${CTEST_BUILD_CONFIGURATION}")
+  set(CTEST_PATH "${CTEST_PATH};${QT_BINARY_DIR};${VTK_BINARY_DIR};${ITK_BINARY_DIR};${GDCM_BINARY_DIR};${BLUEBERRY_OSGI_DIR}")
+endif()
+set(ENV{PATH} "${CTEST_PATH}")
+
 set(SUPERBUILD_TARGETS "")

 #


add use hboost

add use hboost

--- cmake/FindHoudiniUsd.cmake
+++ cmake/FindHoudiniUsd.cmake
@@ -27,19 +27,20 @@
 # Find hboost
 target_compile_definitions(UsdInterface
     INTERFACE
-    BOOST_NS=hboost
+    USE_HBOOST
+    BOOST_NS=hboost
 )

 find_library(_houdini_hboost_python
-    NAMES
+    NAMES
     hboost_python27-mt-x64
     hboost_python-mt-x64
     PATHS
     ${HOUDINI_ROOT}/dsolib
-    ${HOUDINI_ROOT}/custom/houdini/dsolib/
+    ${HOUDINI_ROOT}/custom/houdini/dsolib/
     REQUIRED
     )
-
+
 find_library(_houdini_hboost_filesystem
     NAMES
     hboost_filesystem-mt-x64
@@ -47,7 +48,7 @@
     ${HOUDINI_ROOT}/dsolib
     ${HOUDINI_ROOT}/custom/houdini/dsolib/
     REQUIRED
-    )
+    )

 target_link_libraries(Houdini INTERFACE ${_houdini_hboost_python} ${_houdini_hboost_filesystem})


[CMake] Use lld and llvm-objcopy for first stage compiler in Fuchsia

When cross-compiling the second stage to a different target, we need to
make sure that the first-stage compiler can produce binaries for that
target. Using lld and llvm-objcopy as the default linker and objcopy
tool eliminates some of the dependencies on the host toolchain.

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

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

--- cmake/caches/Fuchsia.cmake
+++ cmake/caches/Fuchsia.cmake
@@ -22,6 +22,10 @@
   set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "")
 endif()

+if(NOT APPLE)
+  set(CLANG_DEFAULT_LINKER lld CACHE STRING "")
+  set(CLANG_DEFAULT_OBJCOPY llvm-objcopy CACHE STRING "")
+endif()
 set(CLANG_DEFAULT_CXX_STDLIB libc++ CACHE STRING "")
 set(CLANG_DEFAULT_RTLIB compiler-rt CACHE STRING "")


fix boost down link

fix boost down link

--- cmake/external/boost.cmake
+++ cmake/external/boost.cmake
@@ -17,7 +17,7 @@
 set(BOOST_PROJECT       "extern_boost")
 set(BOOST_VER           "1.41.0")
 set(BOOST_TAR           "boost_1_41_0")
-set(BOOST_URL           "https://dl.bintray.com/boostorg/release/${BOOST_VER}/source/${BOOST_TAR}.tar.gz")
+set(BOOST_URL           "http://sourceforge.net/projects/boost/files/boost/${BOOST_VER}/${BOOST_TAR}.tar.gz")
 set(BOOST_SOURCES_DIR ${THIRD_PARTY_PATH}/boost)
 set(BOOST_DOWNLOAD_DIR  "${BOOST_SOURCES_DIR}/src/${BOOST_PROJECT}")
 set(BOOST_INCLUDE_DIR "${BOOST_DOWNLOAD_DIR}/${BOOST_TAR}" CACHE PATH "boost include directory." FORCE)


Create an IMPORT target in g3loggerConfig.cmake (#299)

--- cmake/g3loggerConfig.cmake
+++ cmake/g3loggerConfig.cmake
@@ -4,23 +4,20 @@
 #
 # Find libg3logger, G3log is an asynchronous, "crash safe", logger that is easy to use with default logging sinks or you can add your own.
 #
-# Result variables
-# ^^^^^^^^^^^^^^^^
-#
-# This module will set the following variables in your project:
-#
-# ``G3LOG_INCLUDE_DIRS``
-#   where to find g3log.hpp, etc.
-#
-# ``G3LOG_LIBRARIES``
-#   the libraries to link against to use libg3logger.
-#
-#   that includes libg3logger library files.
-# ``G3LOG_FOUND``
-#
-#   If false, do not try to use G3LOG.
+# This defines the cmake import target "g3logger" you can use like this
+#```
+# target_link_libraries(YourTarget PUBLIC g3logger)
+#```
+# Variables and features
+# ----------------------
+# * ``G3LOG`` -- if this environment variable is set, it'll be used as a hint as to where the g3logger files are.
+# * ``G3LOG_INCLUDE_DIRS`` -- raw cmake variable with include path
+# * ``G3LOG_LIBRARIES`` -- raw cmake variable with library link line
+# * ``G3LOG_FOUND`` -- check if the lib was found without using the newer ``if(TARGET g3logger)...``
+
 include(FindPackageHandleStandardArgs)
 find_path(G3LOG_INCLUDE_DIR
+    NAMES
          g3log/active.hpp
          g3log/atomicbool.hpp
          g3log/crashhandler.hpp
@@ -40,14 +37,21 @@
          g3log/stacktrace_windows.hpp
          g3log/stlpatch_future.hpp
          g3log/time.hpp
+    PATHS
+        ENV G3LOG
 )
-
 find_library(G3LOG_LIBRARY
-            NAMES libg3logger g3logger)
-
-find_package_handle_standard_args(G3LOG  DEFAULT_MSG
-            G3LOG_INCLUDE_DIR G3LOG_LIBRARY)
-
+            NAMES libg3logger g3logger )
+find_package_handle_standard_args(g3logger
+            REQUIRED_VARS G3LOG_INCLUDE_DIR G3LOG_LIBRARY)
 mark_as_advanced(G3LOG_INCLUDE_DIR G3LOG_LIBRARY)
 set(G3LOG_LIBRARIES ${G3LOG_LIBRARY})
 set(G3LOG_INCLUDE_DIRS ${G3LOG_INCLUDE_DIR})
+
+add_library(g3logger SHARED IMPORTED)
+find_package(Threads REQUIRED)
+set_target_properties(g3logger PROPERTIES
+    INTERFACE_INCLUDE_DIRECTORIES "${G3LOG_INCLUDE_DIRS}"
+    IMPORTED_LOCATION "${G3LOG_LIBRARY}"
+    IMPORTED_LINK_INTERFACE_LIBRARIES Threads::Threads
+    )


Mark GTest superbuild options as advanced

Change-Id: Idd57c1bb6b48afec459b34f5172d3b22e0a8b928

--- SuperBuild/SuperBuild.cmake
+++ SuperBuild/SuperBuild.cmake
@@ -263,6 +263,7 @@
 # Google Test
 #------------------------------------------------------------------------------
 option( USE_SYSTEM_GTEST "Use a pre-compiled version of GoogleTest. " OFF )
+mark_as_advanced(USE_SYSTEM_GTEST)
 if ( BUILD_TESTING )
   if (USE_SYSTEM_GTEST)
     find_package( GTest REQUIRED )
@@ -270,6 +271,7 @@
   else()
     include(External_GTest)
     set( GTEST_ROOT ${GTEST_ROOT} CACHE PATH "The root directory of the gtest install prefix" )
+    mark_as_advanced(GTEST_ROOT)
     list(APPEND ${CMAKE_PROJECT_NAME}_DEPENDENCIES GTest)
     list(APPEND SimpleITKITK_VARS GTEST_ROOT)
   endif()


Use dedicated build directory for cmake-cxx11 tests

Use "CheckCXX11Features" subdirectory to store all cmake-cxx11
tests. This helps to tidy the binary directory level where the
CheckCXX11Features module is included.

--- CheckCXX11Support/CMake/cmake-cxx11/Modules/CheckCXX11Features.cmake
+++ CheckCXX11Support/CMake/cmake-cxx11/Modules/CheckCXX11Features.cmake
@@ -81,7 +81,7 @@

 function(cxx11_check_feature FEATURE_NAME RESULT_VAR)
     if (NOT DEFINED ${RESULT_VAR})
-        set(_bindir "${CMAKE_CURRENT_BINARY_DIR}/cxx11_${FEATURE_NAME}")
+      set(_bindir "${CMAKE_CURRENT_BINARY_DIR}/CheckCXX11Features/cxx11_${FEATURE_NAME}")

         set(_SRCFILE_BASE ${CMAKE_CURRENT_LIST_DIR}/CheckCXX11Features/cxx11-test-${FEATURE_NAME})
         set(_LOG_NAME "\"${FEATURE_NAME}\"")


*** empty log message ***

*** empty log message ***

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

--- library/FindNistSparseBlas.cmake
+++ library/FindNistSparseBlas.cmake
@@ -9,7 +9,8 @@
 FIND_LIBRARY(NIST_SPARSE_BLAS NAMES sbtk PATHS ${NIST_SPARSE_BLAS_SEARCH_PATHS})
 FIND_LIBRARY(NIST_SPARSE_BLAS_DEBUG NAMES sbtk-g PATHS ${NIST_SPARSE_BLAS_SEARCH_PATHS})

-GET_FILENAME_COMPONENT(NIST_SPARSE_BLAS_INCLUDE_DIR ${NIST_SPARSE_BLAS} PATH CACHE)
+GET_FILENAME_COMPONENT(LIB_PATH ${NIST_SPARSE_BLAS} PATH CACHE)
+SET(NIST_SPARSE_BLAS_INCLUDE_DIR ${LIB_PATH}/../include CACHE FILEPATH "Sparse matrix solve include directory.")

 IF (NIST_SPARSE_BLAS)
   SET(NIST_SPARSE_BLAS_FOUND ON)


Enable PMW3901 on MindPX/MindRacer. (#15375)

* enable pmw3901 on MindPX/MindRacer.

* remove useless line.

--- boards/airmind/mindpx-v2/default.cmake
+++ boards/airmind/mindpx-v2/default.cmake
@@ -35,8 +35,7 @@
 		#lights/rgbled_ncp5623c
 		magnetometer # all available magnetometer drivers
 		mkblctrl
-		#optical_flow # all available optical flow drivers
-		optical_flow/px4flow
+		optical_flow # all available optical flow drivers
 		#osd
 		pca9685
 		power_monitor/ina226


Add a search macro for library & path

Add a search macro for library & path

   You can search for either a library or a path.
   If it's not found, it shows on the console a
   message you can customize by adding a
   FULLNAME or/and PACKAGE section.
   It factorizes well the CMakefiles.

    * build-aux/cmake/modules/UProject.cmake: Here.

--- build-aux/cmake/modules/UProject.cmake
+++ build-aux/cmake/modules/UProject.cmake
@@ -110,6 +110,56 @@
 ENDMACRO (add_project)

 #------------------------------------------------------------------------------
+#                              Search library/path
+#------------------------------------------------------------------------------
+# Call find_library/find_path command. If the library/path still cannot be found,
+# it prints a message you can customize by adding FULLNAME and PACKAGE info.
+# You can ask for one library or one path. Not both.
+# e.g. search(LIBRARY URBI_LIBRARY urbi FULLNAME "Urbi remote" PACKAGE "SDK Remote")
+
+MACRO (search)
+
+    # Check parameters and look for the element (library/path)
+    parse_arguments (ELEMENT "LIBRARY;PATH;FULLNAME;PACKAGE" "" ${ARGN})
+    if (ELEMENT_LIBRARY AND ELEMENT_PATH)
+        message (FATAL_ERROR "Invalid call of search macro. You cannot ask for"
+                             " both library and path finding.")
+    endif (ELEMENT_LIBRARY AND ELEMENT_PATH)
+
+    if (ELEMENT_LIBRARY)
+        find_library (${ELEMENT_LIBRARY})
+        set(ELEMENT_TYPE library)
+    elseif (ELEMENT_PATH)
+        find_path (${ELEMENT_PATH})
+        set(ELEMENT_TYPE directory)
+    else (ELEMENT_PATH)
+        message (FATAL_ERROR "Invalid syntax. Specify LIBRARY or PATH section.")
+    endif (ELEMENT_LIBRARY)
+
+    # If we don't find the element
+    if (NOT ${ARGV1})
+
+        # Replace undefined parameters by generic ones
+        if (NOT ELEMENT_FULLNAME)
+            set (ELEMENT_FULLNAME ${ARGV2})
+        else (NOT ELEMENT_FULLNAME)
+            set (ELEMENT_FULLNAME ${ELEMENT_FULLNAME} " (" ${ARGV2} ")")
+        endif (NOT ELEMENT_FULLNAME)
+
+        if (NOT ELEMENT_PACKAGE)
+            set (ELEMENT_PACKAGE it)
+        endif (NOT ELEMENT_PACKAGE)
+
+       # Custom message
+       message ( STATUS ${ELEMENT_FULLNAME} " " ${ELEMENT_TYPE}
+                 " has not been found. Make sure you've installed "
+                 ${ELEMENT_PACKAGE} " on your computer or please specify the "
+                 "library path manually (-D" ${ARGV1} ").")
+    endif (NOT ${ARGV1})
+
+ENDMACRO (search)
+
+#------------------------------------------------------------------------------
 #                           Link UObject libraries
 #------------------------------------------------------------------------------
 # Link your current executable with all libraries required for a standard
@@ -124,9 +174,11 @@
       set (CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES} "" "lib")
     endif (WIN32)

-    find_library (SDK_REMOTE_LIBRARY urbi)
-    find_library (JPEG_LIBRARY jpeg)
-    find_path (SDK_REMOTE_INCLUDE_DIR urbi)
+    search (LIBRARY SDK_REMOTE_LIBRARY urbi PACKAGE "URBI SDK remote")
+    search (LIBRARY JPEG_LIBRARY jpeg)
+    search (PATH SDK_REMOTE_INCLUDE_DIR urbi
+            FULLNAME "SDK Remote INCLUDE"
+            PACKAGE  "URBI SDK Remote")

     # Keeps only required libs
     if (WIN32)
@@ -139,26 +191,6 @@
     if (WIN32)
       set (CMAKE_BUILD_TYPE "Release")
     endif (WIN32)
-
-    # Default libraries, in case they're not found
-    if (NOT SDK_REMOTE_INCLUDE_DIR)
-          message ("SDK Remote INCLUDE directory has not been found. Make sure"
-                   " you've installed URBI SDK remote on your computer or "
-                   "please specify the library path manually "
-                   "(-DSDK_REMOTE_INCLUDE_DIR).")
-    endif (NOT SDK_REMOTE_INCLUDE_DIR)
-
-    if (NOT JPEG_LIBRARY)
-          message ("The JPEG library has not been found. Make sure you've "
-                   "installed URBI SDK remote on your computer or please "
-                   "specify the library path manually (-DJPEG_LIBRARY).")
-    endif (NOT JPEG_LIBRARY)
-
-    if (NOT SDK_REMOTE_LIBRARY)
-          message ("The URBI library has not been found. Make sure you've "
-                   "installed URBI SDK remote on your computer or please "
-                   "specify the library path manually (-DSDK_REMOTE_LIBRARY).")
-    endif (NOT SDK_REMOTE_LIBRARY)

     # Link
     include_directories (${SDK_REMOTE_INCLUDE_DIR})


New version: 0.4.12

New version: 0.4.12

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


Updating Examples Superbuild to find 0.7 SimpleITK

Change-Id: I8b963a8e8bfad8c1542fed45adb36dc915856665

--- SuperBuild/External_SimpleITKExamples.cmake
+++ SuperBuild/External_SimpleITKExamples.cmake
@@ -18,7 +18,7 @@
     --no-warn-unused-cli
     -C "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt"
     ${ep_common_args}
-    -DSimpleITK_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/SimpleITK-0.6/
+    -DSimpleITK_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/SimpleITK-0.7/
     -DCMAKE_SKIP_RPATH:BOOL=ON
     -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
   BUILD_COMMAND ${BUILD_COMMAND_STRING}


More cmake unhappiness

More cmake unhappiness

--- cmake/initialize_project_version.cmake
+++ cmake/initialize_project_version.cmake
@@ -26,6 +26,11 @@
         list(APPEND PROJECT_LIBS "${library_var}")
     endforeach()

+    cmake_policy(SET CMP0028 NEW)
+    cmake_policy(SET CMP0048 NEW)
+    cmake_policy(SET CMP0054 NEW)
+    cmake_policy(SET CMP0056 NEW)
+
     project(${name} VERSION "${PROJECT_VERSION}" LANGUAGES CXX)

 endmacro()


fixed problem concatenating xml

fixed problem concatenating xml

--- cmake/oskar_settings_xml_utility.cmake
+++ cmake/oskar_settings_xml_utility.cmake
@@ -15,7 +15,7 @@

         # Obtain a list and number of files to import.
         unset(import_files_)
-        string(REGEX MATCHALL "([-/A-Za-z0-9_]+.xml)" import_files_ "${xml_}")
+        string(REGEX MATCHALL "([-/A-Za-z0-9_\\.]+\\.xml)" import_files_ "${xml_}")
         list(LENGTH import_files_ n)

         if (${n} EQUAL 0)


[Build] Fixed a tricky bug hindering source tar-ball to be generated by CMake/CPack when the Unix username is the same as the out-of-the-source generation directory.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -157,8 +157,6 @@
 #####################################
 #
 macro (packaging_init _project_name)
-  include (InstallRequiredSystemLibraries)
-
   set (CPACK_PACKAGE_NAME "${_project_name}")
   set (CPACK_PACKAGE_DESCRIPTION "${PACKAGE_BRIEF}")
 endmacro (packaging_init)
@@ -216,16 +214,16 @@
     "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}"
     CACHE INTERNAL "tarball basename")
   set (AUTOTOOLS_IGNRD "/tmp/;/tmp2/;/autom4te\\\\.cache/;autogen\\\\.sh$")
-  set (PACK_IGNRD "${CPACK_PACKAGE_NAME}\\\\.spec;/build/;\\\\.gz$;\\\\.bz2$")
+  set (PACK_IGNRD "${CMAKE_CURRENT_BINARY_DIR};${CPACK_PACKAGE_NAME}\\\\.spec;\\\\.gz$;\\\\.bz2$")
   set (EDIT_IGNRD "\\\\.swp$;\\\\.#;/#;~$")
   set (SCM_IGNRD
     "/CVS/;/\\\\.svn/;/\\\\.bzr/;/\\\\.hg/;/\\\\.git/;\\\\.gitignore$")
   set (CPACK_SOURCE_IGNORE_FILES
-    "${AUTOTOOLS_IGNRD};${SCM_IGNRD};${EDIT_IGNRD};${PACK_IGNRD}"
-    CACHE STRING "CPACK will ignore these files")
+    "${AUTOTOOLS_IGNRD};${SCM_IGNRD};${EDIT_IGNRD};${PACK_IGNRD}")
   #set (CPACK_SOURCE_IGNORE_DIRECTORY ${CPACK_SOURCE_IGNORE_FILES} .git)

   # Initialise the source package generator with the variables above
+  include (InstallRequiredSystemLibraries)
   include (CPack)

   # Add a 'dist' target, similar to what is given by GNU Autotools
@@ -233,7 +231,7 @@

   ##
   # Reset the generator types for the binary packages. Indeed, the variable
-  # has been reset by "include (Cpack)".
+  # has been reset by "include (CPack)".
   set (CPACK_GENERATOR "${_package_type_list}")

 endmacro (packaging_set_other_options)
@@ -1572,6 +1570,7 @@
   message (STATUS "CPACK_DEBIAN_PACKAGE_DEPENDS ... : ${CPACK_DEBIAN_PACKAGE_DEPENDS}")
   message (STATUS "CPACK_SOURCE_GENERATOR ......... : ${CPACK_SOURCE_GENERATOR}")
   message (STATUS "CPACK_SOURCE_PACKAGE_FILE_NAME . : ${CPACK_SOURCE_PACKAGE_FILE_NAME}")
+  message (STATUS "CPACK_SOURCE_IGNORE_FILES ...... : ${CPACK_SOURCE_IGNORE_FILES}")
   #
   message (STATUS)
   message (STATUS "---------------------------------")


old versions of visual studio should no longer complain about unrecognized warning numbers

--- scripts/cmake/common.cmake
+++ scripts/cmake/common.cmake
@@ -157,12 +157,16 @@
         /wd4571 # SEH related
         /wd4710 # function not inlined
         /wd4711 # function 'x' selected for automatic inline expansion
-    #    /wd4820 # padding in structs
-    #    /wd4625 # copy constructor was implicitly defined as deleted
-    #    /wd4626 # assignment operator was implicitly defined as deleted
-    #    /wd5027 # move assignment operator was implicitly defined as deleted
-    #    /wd5026 # move constructor was implicitly defined as deleted
-    #    /wd4623 # default constructor was implicitly defined as deleted
+
+        /wd4616 # invalid compiler warnings - https://msdn.microsoft.com/en-us/library/t7ab6xtd.aspx
+        /wd4619 # invalid compiler warnings - https://msdn.microsoft.com/en-us/library/tacee08d.aspx
+
+        #/wd4820 # padding in structs
+        #/wd4625 # copy constructor was implicitly defined as deleted
+        #/wd4626 # assignment operator was implicitly defined as deleted
+        #/wd5027 # move assignment operator was implicitly defined as deleted
+        #/wd5026 # move constructor was implicitly defined as deleted
+        #/wd4623 # default constructor was implicitly defined as deleted
     )
 endif()


flags/lto: support Android Clang/GCC

flags/lto: support Android Clang/GCC

--- flags/lto.cmake
+++ flags/lto.cmake
@@ -8,8 +8,53 @@
 endif()

 include(polly_add_cache_flag)
+include(polly_fatal_error)

-polly_add_cache_flag(CMAKE_CXX_FLAGS "-flto")
-polly_add_cache_flag(CMAKE_C_FLAGS "-flto")
+string(COMPARE EQUAL "${ANDROID_NDK_VERSION}" "" _not_android)
+
+# TODO: test other platfroms, CMAKE_CXX_FLAGS_INIT should work for all
+if(_not_android)
+  polly_add_cache_flag(CMAKE_CXX_FLAGS "-flto")
+  polly_add_cache_flag(CMAKE_C_FLAGS "-flto")
+else()
+  polly_add_cache_flag(CMAKE_CXX_FLAGS_INIT "-flto")
+  polly_add_cache_flag(CMAKE_C_FLAGS_INIT "-flto")
+
+  string(COMPARE EQUAL "${CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION}" "clang" _is_clang)
+
+  if(_is_clang)
+    # Fix for error "format not recognized"
+    # (tested with 'android-ndk-r14-api-21-arm64-v8a-clang-hid-sections-lto')
+    polly_add_cache_flag(CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=gold")
+    polly_add_cache_flag(CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=gold")
+  else()
+    # GCC, fix for "BFD: ... : plugin needed to handle lto object"
+    if(CMAKE_HOST_WIN32)
+      set(_host_tag "windows")
+    elseif(CMAKE_HOST_APPLE)
+      set(_host_tag "darwin")
+    else()
+      set(_host_tag "linux")
+    endif()
+
+    set(
+        CMAKE_AR
+        "${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.9/prebuilt/${_host_tag}-x86_64/bin/arm-linux-androideabi-gcc-ar"
+        CACHE
+        PATH
+        ""
+        FORCE
+    )
+
+    set(
+        CMAKE_RANLIB
+        "${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.9/prebuilt/${_host_tag}-x86_64/bin/arm-linux-androideabi-gcc-ranlib"
+        CACHE
+        PATH
+        ""
+        FORCE
+    )
+  endif()
+endif()

 list(APPEND HUNTER_TOOLCHAIN_UNDETECTABLE_ID "lto")


Split off 7.6.32

Split off 7.6.32

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

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


- Fix to mandatory libs in FindCoffee.cmake

--- cmake/Find/FindCoffee.cmake
+++ cmake/Find/FindCoffee.cmake
@@ -70,6 +70,66 @@
 endif()

+find_library ( COFFEE_SDL2_LIBRARY_TMP
+    CoffeeSDL2
+
+    PATHS
+    ${COFFEE_SEARCH_PATHS}
+
+    PATH_SUFFIXES
+    ${COFFEE_LIBRARY_SUFFIXES}
+    )
+
+if(COFFEE_SDL2_LIBRARY_TMP)
+    set ( COFFEE_SDL2_LIBRARY "${COFFEE_SDL2_LIBRARY_TMP}" CACHE STRING "" )
+endif()
+
+
+find_library ( COFFEE_BLAM_LIBRARY_TMP
+    CoffeeBlam
+
+    PATHS
+    ${COFFEE_SEARCH_PATHS}
+
+    PATH_SUFFIXES
+    ${COFFEE_LIBRARY_SUFFIXES}
+    )
+
+if(COFFEE_BLAM_LIBRARY_TMP)
+    set ( COFFEE_BLAM_LIBRARY "${COFFEE_BLAM_LIBRARY_TMP}" CACHE STRING "" )
+endif()
+
+
+find_library ( COFFEE_GRAPHICS_LIBRARY_TMP
+    CoffeeGraphicsAPI
+
+    PATHS
+    ${COFFEE_SEARCH_PATHS}
+
+    PATH_SUFFIXES
+    ${COFFEE_LIBRARY_SUFFIXES}
+    )
+
+if(COFFEE_GRAPHICS_LIBRARY_TMP)
+    set ( COFFEE_GRAPHICS_LIBRARY "${COFFEE_GRAPHICS_LIBRARY_TMP}" CACHE STRING "" )
+endif()
+
+
+find_library ( COFFEE_IMAGE_LIBRARY_TMP
+    CoffeeImage
+
+    PATHS
+    ${COFFEE_SEARCH_PATHS}
+
+    PATH_SUFFIXES
+    ${COFFEE_LIBRARY_SUFFIXES}
+    )
+
+if(COFFEE_IMAGE_LIBRARY_TMP)
+    set ( COFFEE_IMAGE_LIBRARY "${COFFEE_IMAGE_LIBRARY_TMP}" CACHE STRING "" )
+endif()
+
+
 find_library ( COFFEE_ASIO_LIBRARY_TMP
     CoffeeASIO

@@ -97,66 +157,6 @@

 if(COFFEE_OPENAL_LIBRARY_TMP)
     set ( COFFEE_OPENAL_LIBRARY "${COFFEE_OPENAL_LIBRARY_TMP}" CACHE STRING "" )
-endif()
-
-
-find_library ( COFFEE_SDL2_LIBRARY_TMP
-    CoffeeSDL2
-
-    PATHS
-    ${COFFEE_SEARCH_PATHS}
-
-    PATH_SUFFIXES
-    ${COFFEE_LIBRARY_SUFFIXES}
-    )
-
-if(COFFEE_SDL2_LIBRARY_TMP)
-    set ( COFFEE_SDL2_LIBRARY "${COFFEE_SDL2_LIBRARY_TMP}" CACHE STRING "" )
-endif()
-
-
-find_library ( COFFEE_BLAM_LIBRARY_TMP
-    CoffeeBlam
-
-    PATHS
-    ${COFFEE_SEARCH_PATHS}
-
-    PATH_SUFFIXES
-    ${COFFEE_LIBRARY_SUFFIXES}
-    )
-
-if(COFFEE_BLAM_LIBRARY_TMP)
-    set ( COFFEE_BLAM_LIBRARY "${COFFEE_BLAM_LIBRARY_TMP}" CACHE STRING "" )
-endif()
-
-
-find_library ( COFFEE_GRAPHICS_LIBRARY_TMP
-    CoffeeGraphicsAPI
-
-    PATHS
-    ${COFFEE_SEARCH_PATHS}
-
-    PATH_SUFFIXES
-    ${COFFEE_LIBRARY_SUFFIXES}
-    )
-
-if(COFFEE_GRAPHICS_LIBRARY_TMP)
-    set ( COFFEE_GRAPHICS_LIBRARY "${COFFEE_GRAPHICS_LIBRARY_TMP}" CACHE STRING "" )
-endif()
-
-
-find_library ( COFFEE_IMAGE_LIBRARY_TMP
-    CoffeeImage
-
-    PATHS
-    ${COFFEE_SEARCH_PATHS}
-
-    PATH_SUFFIXES
-    ${COFFEE_LIBRARY_SUFFIXES}
-    )
-
-if(COFFEE_IMAGE_LIBRARY_TMP)
-    set ( COFFEE_IMAGE_LIBRARY "${COFFEE_IMAGE_LIBRARY_TMP}" CACHE STRING "" )
 endif()

@@ -274,8 +274,6 @@
     COFFEE_INCLUDE_DIR
     COFFEE_CORE_LIBRARY
     COFFEE_GLEAM_LIBRARY
-    COFFEE_ASIO_LIBRARY
-    COFFEE_OPENAL_LIBRARY
     COFFEE_SDL2_LIBRARY
     COFFEE_BLAM_LIBRARY
     COFFEE_GRAPHICS_LIBRARY


cmake restore -Wbad-function-cast

cmake restore -Wbad-function-cast

--- cmake/common/px4_base.cmake
+++ cmake/common/px4_base.cmake
@@ -543,6 +543,7 @@
 	endif()

 	set(c_warnings
+		-Wbad-function-cast
 		-Wstrict-prototypes
 		-Wmissing-prototypes
 		-Wnested-externs


[CMake] Adding ALWAYS_GENERATE option to symlink utility functions.

This implements the behavior required for clang symlinks which should be always generated.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1024,17 +1024,25 @@
 endfunction()

 function(llvm_install_symlink name dest)
+  cmake_parse_arguments(ARG "ALWAYS_GENERATE" "" "" ${ARGN})
   foreach(path ${CMAKE_MODULE_PATH})
     if(EXISTS ${path}/LLVMInstallSymlink.cmake)
       set(INSTALL_SYMLINK ${path}/LLVMInstallSymlink.cmake)
       break()
     endif()
   endforeach()
+
+  if(ARG_ALWAYS_GENERATE)
+    set(component ${dest})
+  else()
+    set(component ${name})
+  endif()
+
   install(SCRIPT ${INSTALL_SYMLINK}
           CODE "install_symlink(${name} ${dest})"
-          COMPONENT ${name})
-
-  if (NOT CMAKE_CONFIGURATION_TYPES)
+          COMPONENT ${component})
+
+  if (NOT CMAKE_CONFIGURATION_TYPES AND NOT ARG_ALWAYS_GENERATE)
     add_custom_target(install-${name}
                       DEPENDS ${name} ${dest} install-${dest}
                       COMMAND "${CMAKE_COMMAND}"
@@ -1044,6 +1052,7 @@
 endfunction()

 function(add_llvm_tool_symlink name dest)
+  cmake_parse_arguments(ARG "ALWAYS_GENERATE" "" "" ${ARGN})
   if(UNIX)
     set(LLVM_LINK_OR_COPY create_symlink)
     set(dest_binary "${dest}${CMAKE_EXECUTABLE_SUFFIX}")
@@ -1054,29 +1063,33 @@

   set(output_path "${LLVM_RUNTIME_OUTPUT_INTDIR}/${name}${CMAKE_EXECUTABLE_SUFFIX}")

-  add_custom_command(OUTPUT ${output_path}
+  if(ARG_ALWAYS_GENERATE)
+    set_property(DIRECTORY APPEND PROPERTY
+      ADDITIONAL_MAKE_CLEAN_FILES ${dest_binary})
+    add_custom_command(TARGET ${dest} POST_BUILD
+      COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} "${dest_binary}" "${output_path}")
+  else()
+    add_custom_command(OUTPUT ${output_path}
                      COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} "${dest_binary}" "${output_path}"
                      DEPENDS ${dest})
-
-  add_custom_target(${name} ALL DEPENDS ${output_path})
-  set_target_properties(${name} PROPERTIES FOLDER Tools)
-  set_property(DIRECTORY APPEND PROPERTY
-    ADDITIONAL_MAKE_CLEAN_FILES ${dest_binary})
-
-  # Make sure the parent tool is a toolchain tool, otherwise exclude this tool
-  list(FIND LLVM_TOOLCHAIN_TOOLS ${dest} LLVM_IS_${dest}_TOOLCHAIN_TOOL)
-  if (NOT LLVM_IS_${dest}_TOOLCHAIN_TOOL GREATER -1)
-    set(LLVM_IS_${name}_TOOLCHAIN_TOOL ${LLVM_IS_${dest}_TOOLCHAIN_TOOL})
-  else()
-    list(FIND LLVM_TOOLCHAIN_TOOLS ${name} LLVM_IS_${name}_TOOLCHAIN_TOOL)
-  endif()
-
-  # LLVM_IS_${name}_TOOLCHAIN_TOOL will only be greater than -1 if both this
-  # tool and its parent tool are in LLVM_TOOLCHAIN_TOOLS
-  if (LLVM_IS_${name}_TOOLCHAIN_TOOL GREATER -1 OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
-    if( LLVM_BUILD_TOOLS )
-      llvm_install_symlink(${name} ${dest})
-    endif()
-  endif()
-endfunction()
-
+    add_custom_target(${name} ALL DEPENDS ${output_path})
+    set_target_properties(${name} PROPERTIES FOLDER Tools)
+
+    # Make sure the parent tool is a toolchain tool, otherwise exclude this tool
+    list(FIND LLVM_TOOLCHAIN_TOOLS ${dest} LLVM_IS_${dest}_TOOLCHAIN_TOOL)
+    if (NOT LLVM_IS_${dest}_TOOLCHAIN_TOOL GREATER -1)
+      set(LLVM_IS_${name}_TOOLCHAIN_TOOL ${LLVM_IS_${dest}_TOOLCHAIN_TOOL})
+    else()
+      list(FIND LLVM_TOOLCHAIN_TOOLS ${name} LLVM_IS_${name}_TOOLCHAIN_TOOL)
+    endif()
+
+    # LLVM_IS_${name}_TOOLCHAIN_TOOL will only be greater than -1 if both this
+    # tool and its parent tool are in LLVM_TOOLCHAIN_TOOLS
+    if (LLVM_IS_${name}_TOOLCHAIN_TOOL GREATER -1 OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+      if( LLVM_BUILD_TOOLS )
+        llvm_install_symlink(${name} ${dest})
+      endif()
+    endif()
+  endif()
+endfunction()
+


Disable --icf=safe to avoid a bug.

Disable --icf=safe to avoid a bug.

Thanks to Sameer Sahasrabuddhe for the report!

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -161,7 +161,9 @@
   if(LLVM_LINKER_IS_GOLD)
     # With gold gc-sections is always safe.
     set_property(TARGET ${target_name} APPEND_STRING PROPERTY
-                 LINK_FLAGS " -Wl,--gc-sections -Wl,--icf=safe")
+                 LINK_FLAGS " -Wl,--gc-sections")
+    # Note that there is a bug with -Wl,--icf=safe so it is not safe
+    # to enable. See https://sourceware.org/bugzilla/show_bug.cgi?id=17704.
   endif()

   if(NOT LLVM_NO_DEAD_STRIP)


[cmake] Update SOVERSION for the new versioning scheme

Update SOVERSION to use just the major version number rather than
major+minor, to match the new versioning scheme where only major is used
to indicate API/ABI version.

Since two-digit SOVERSIONs were introduced post 3.9 branching, this
change does not risk any SOVERSION collisions. In the past,
two-component X.Y SOVERSIONs were shortly used but those will not
interfere with the new ones since the new versions start at 4.

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

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -462,11 +462,9 @@
     if(UNIX AND NOT APPLE AND NOT ARG_SONAME)
       set_target_properties(${name}
         PROPERTIES
-		# Concatenate the version numbers since ldconfig expects exactly
-		# one component indicating the ABI version, while LLVM uses
-		# major+minor for that.
-        SOVERSION ${LLVM_VERSION_MAJOR}${LLVM_VERSION_MINOR}
-        VERSION ${LLVM_VERSION_MAJOR}${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX})
+        # Since 4.0.0, the ABI version is indicated by the major version
+        SOVERSION ${LLVM_VERSION_MAJOR}
+        VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX})
     endif()
   endif()


fixed test

fixed test

--- tests/string/string_indent_lines_test.cmake
+++ tests/string/string_indent_lines_test.cmake
@@ -3,20 +3,20 @@

-  string_indent("aasdasdja  kshdlkasjdl kajsddalska  sdkajsd
-asdasdkasdkajsdlkajsd
-asdlasdk
-asdasd
-alskdjalksjdlkasjdlkajsdlkajsdlkajslkdjalksjdlkajsdlkajsdlkajsdlkjasldk" "    " 20)
+#   string_indent("aasdasdja  kshdlkasjdl kajsddalska  sdkajsd
+# asdasdkasdkajsdlkajsd
+# asdlasdk
+# asdasd
+# alskdjalksjdlkasjdlkajsdlkajsdlkajslkdjalksjdlkajsdlkajsdlkajsdlkjasldk" "    " 20)

-  assert("${__ans}" STREQUAL "     aasdasdja  kshdlkasjdl
-     kajsddalska  sdkajsd
+#   assert("${__ans}" STREQUAL "     aasdasdja  kshdlkasjdl
+#      kajsddalska  sdkajsd

-     asdasdkasdkajsdlkajsd
+#      asdasdkasdkajsdlkajsd

-     asdlasdk
-     asdasd
-     alskdjalksjdlkasjdlkajsdlkajsdlkajslkdjalksjdlkajsdlkajsdlkajsdlkjasldk")
+#      asdlasdk
+#      asdasd
+#      alskdjalksjdlkasjdlkajsdlkajsdlkajslkdjalksjdlkajsdlkajsdlkajsdlkjasldk")


Added PUBLIC option to ament_target_dependencies (#161)

* Added PUBLIC option to ament_target_dependencies

Signed-off-by: ivanpauno <f493a283e6aff807b3cc3b53203cbbb64f272da1@ekumenlabs.com>

* Corrected with PR comments.

Signed-off-by: ivanpauno <f493a283e6aff807b3cc3b53203cbbb64f272da1@ekumenlabs.com>

* simplify patch

Signed-off-by: ivanpauno <f493a283e6aff807b3cc3b53203cbbb64f272da1@ekumenlabs.com>

--- ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake
+++ ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake
@@ -23,7 +23,9 @@
 #
 # :param target: the target name
 # :type target: string
-# :param ARGN: a list of package names
+# :param ARGN: a list of package names, which could start with PUBLIC keyword.
+#   If it starts with PUBLIC, this keyword is used in the target_link_libraries call.
+#   If not, the non-keyword target_link_libraries call is used.
 # :type ARGN: list of strings
 #
 # @public
@@ -33,11 +35,19 @@
     message(FATAL_ERROR "ament_target_dependencies() the first argument must be a valid target name")
   endif()
   if(${ARGC} GREATER 0)
+    cmake_parse_arguments(ARG "PUBLIC" "" "" ${ARGN})
+    set(TARGET_LINK_LIBRARIES_VISIBILITY)
+    if(ARG_PUBLIC)
+      if(NOT "${ARGV1}" STREQUAL "PUBLIC")
+        message(FATAL_ERROR "ament_target_dependencies() PUBLIC keyword is only allowed before the package names")
+      endif()
+      set(TARGET_LINK_LIBRARIES_VISIBILITY PUBLIC)
+    endif()
     set(definitions "")
     set(include_dirs "")
     set(libraries "")
     set(link_flags "")
-    foreach(package_name ${ARGN})
+    foreach(package_name ${ARG_UNPARSED_ARGUMENTS})
       if(NOT ${${package_name}_FOUND})
         message(FATAL_ERROR "ament_target_dependencies() the passed package name '${package_name}' was not found before")
       endif()
@@ -53,7 +63,7 @@
       PUBLIC ${ordered_include_dirs})
     ament_libraries_deduplicate(unique_libraries ${libraries})
     target_link_libraries(${target}
-      ${unique_libraries})
+      ${TARGET_LINK_LIBRARIES_VISIBILITY} ${unique_libraries})
     foreach(link_flag IN LISTS link_flags)
       set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS " ${link_flag} ")
     endforeach()


Set directory hints for FindBoost module in case of superbuilded boost with binary libraries.

--- CMake/PackageDepends/MITK_Boost_Config.cmake
+++ CMake/PackageDepends/MITK_Boost_Config.cmake
@@ -9,6 +9,10 @@
   set(Boost_USE_STATIC_RUNTIME 0)

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


Adding gflags for glog and ceres

Adding gflags for glog and ceres

Former-commit-id: 56bcf76f821a50687f98ccd9efa0b32c1166afdf

--- cmake-modules/Fetch_Gflags.cmake
+++ cmake-modules/Fetch_Gflags.cmake
@@ -2,9 +2,8 @@
 find_package(gflags PATHS ${INSTALL_DIRECTORY}/gflags $ENV{EBROOTGFLAGS} $ENV{GFLAGS_DIR} $ENV{gflags_DIR} NO_DEFAULT_PATH)
 include(cmake-modules/PrintTargetProperties.cmake)
 print_target_properties(gflags)
-print_target_properties(gflags::gflags)

-if(TARGET gflags::gflags)
+if(TARGET gflags)
     # For some reason gflags imports libunwind.so even though we asked for static libraries.
     # In addition, libgflags.a hides in the property "LOCATION" instead of its rightful
     # place "INTERFACE_LINK_LIBRARIES".
@@ -15,7 +14,7 @@
     get_filename_component(gflags_dir ${GFLAGS_LIBRARIES} DIRECTORY)
     get_filename_component(gflags_we  ${GFLAGS_LIBRARIES} NAME_WE)
     set(GFLAGS_LIBRARIES "${gflags_dir}/${gflags_we}${CUSTOM_SUFFIX}")
-
+    add_library(gflags::gflags ALIAS gflags)
     set_target_properties(gflags::gflags PROPERTIES INTERFACE_LINK_LIBRARIES "${GFLAGS_LIBRARIES}")
     set_target_properties(gflags::gflags PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${GFLAGS_INCLUDE_DIR}")
     message(STATUS "Searching for gflags - Success: LIB: ${GFLAGS_LIBRARIES}")


fixing cmake libdir for spdlog

fixing cmake libdir for spdlog

Former-commit-id: 9de2d072730eee46080ec5eecfd8275f5f34e904

--- cmake-modules/Fetch_spdlog.cmake
+++ cmake-modules/Fetch_spdlog.cmake
@@ -1,5 +1,5 @@
 include(GNUInstallDirs)
-find_package(spdlog 1.3 NO_DEFAULT_PATH PATHS ${H5PP_INSTALL_DIR_THIRD_PARTY}/spdlog/${CMAKE_INSTALL_LIBDIR}/spdlog/cmake ${spdlog_DIR} )
+find_package(spdlog 1.3 NO_DEFAULT_PATH PATHS ${INSTALL_DIRECTORY}/spdlog/${CMAKE_INSTALL_LIBDIR}/spdlog/cmake ${spdlog_DIR} )
 if(spdlog_FOUND)
     get_target_property(spdlog_lib     spdlog::spdlog   INTERFACE_LINK_LIBRARIES)
     message(STATUS "SPDLOG FOUND IN SYSTEM: ${spdlog_lib}")
@@ -23,10 +23,11 @@
     ExternalProject_Get_Property(external_SPDLOG INSTALL_DIR)
     add_library(spdlog INTERFACE)
     add_library(spdlog::spdlog ALIAS spdlog)
-    set(spdlog_DIR ${INSTALL_DIR}/spdlog/${CMAKE_INSTALL_LIBDIR}/spdlog/cmake)
+    set(spdlog_DIR ${INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/spdlog/cmake)
+
     add_dependencies(spdlog external_SPDLOG)
     target_include_directories(spdlog INTERFACE ${INSTALL_DIR}/${CMAKE_INSTALL_INCLUDEDIR})
-    target_link_libraries(spdlog INTERFACE ${INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/spdlog/libspdlog${CUSTOM_SUFFIX})
+    target_link_libraries(spdlog INTERFACE ${INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/spdlog/libspdlog${CMAKE_STATIC_LIBRARY_SUFFIX})
     target_link_libraries (spdlog INTERFACE ${PTHREAD_LIBRARY})
 else()
     message("WARNING: Dependency spdlog not found and DOWNLOAD_SPDLOG is OFF. Build will fail.")


Disable building Blosc benchmarks. #895

Disable building Blosc benchmarks. #895

--- cmake/Modules/FindBlosc_EP.cmake
+++ cmake/Modules/FindBlosc_EP.cmake
@@ -83,6 +83,7 @@
         -DCMAKE_INSTALL_PREFIX=${TILEDB_EP_INSTALL_PREFIX}
         -DCMAKE_CXX_FLAGS=-fPIC
         -DCMAKE_C_FLAGS=-fPIC
+        -DBUILD_BENCHMARKS=OFF
       UPDATE_COMMAND ""
       LOG_DOWNLOAD TRUE
       LOG_CONFIGURE TRUE
@@ -122,4 +123,4 @@
 # If we built a static EP, install it if required.
 if (BLOSC_STATIC_EP_FOUND AND TILEDB_INSTALL_STATIC_DEPS)
   install_target_libs(Blosc::Blosc)
-endif()+endif()


Add support for tags which are not SemVer compliant

Since the version info is fetched over git tags, the tag names
had to be SemVer compliant strings before this commit.
This fact did break the version fetching process when
tags were set for anything else. This commit fixes this
issue. All kind of tags are allowed now, as long as they
are not in the form of: v0abc.4def.2ghi

--- cmake/MunkeiVersionFromGit.cmake
+++ cmake/MunkeiVersionFromGit.cmake
@@ -2,6 +2,7 @@
 #
 # Copyright (c) 2016-2017 Theo Willows
 #           (c) 2019 A. Kunz - NTB Interstaatliche Hochschule für Technik Buchs Switzerland
+#           (c) 2020 A. Kunz - OST Ostschweizer Fachhochschule, Switzerland
 #
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
@@ -59,7 +60,7 @@

   # Git describe
   execute_process(
-    COMMAND           "${GIT_EXECUTABLE}" describe --tags
+    COMMAND           "${GIT_EXECUTABLE}" describe --match 'v[0-9]*.[0-9]*.[0-9]*' --tags
     WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
     RESULT_VARIABLE   git_result
     OUTPUT_VARIABLE   git_describe
@@ -75,7 +76,7 @@

   # Get Git tag
   execute_process(
-    COMMAND           "${GIT_EXECUTABLE}" describe --tags --abbrev=0
+    COMMAND           "${GIT_EXECUTABLE}" describe --match 'v[0-9]*.[0-9]*.[0-9]*' --tags --abbrev=0
     WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
     RESULT_VARIABLE   git_result
     OUTPUT_VARIABLE   git_tag


* update json2map finding for cmake

* update json2map finding for cmake

--- cmake/modules/FindJSON2MAP.cmake
+++ cmake/modules/FindJSON2MAP.cmake
@@ -3,7 +3,7 @@
         /usr/include
         )

-SET(JSON2MAP_NAMES ${JSON2MAP_NAMES} JSON2MAP)
+SET(JSON2MAP_NAMES ${JSON2MAP_NAMES} json2map)
 FIND_LIBRARY(JSON2MAP_LIBRARY
         NAMES ${JSON2MAP_NAMES}
         PATHS /usr/lib /usr/local/lib


Do not require it, otherwise opt depends will fail

svn path=/trunk/kdesupport/polkit-qt/; revision=957662

--- cmake/modules/FindPolkitQt.cmake
+++ cmake/modules/FindPolkitQt.cmake
@@ -27,7 +27,7 @@
   set(POLKITQT_MIN_VERSION "0.9.0")
 endif (NOT POLKITQT_MIN_VERSION)

-pkg_search_module( POLKITQT REQUIRED polkit-qt )
+pkg_search_module( POLKITQT polkit-qt )

 if (POLKITQT_FOUND)
     if (POLKITQT_VERSION VERSION_LESS POLKITQT_MIN_VERSION)


Add a couple of compiler flags to silent some warnings

--- cmake/modules/SetUpWindows.cmake
+++ cmake/modules/SetUpWindows.cmake
@@ -63,7 +63,7 @@
   endif()

   if(CMAKE_PROJECT_NAME STREQUAL ROOT)
-    set(CMAKE_CXX_FLAGS "-nologo -I${CMAKE_SOURCE_DIR}/build/win -FIw32pragma.h -FIsehmap.h ${BLDCXXFLAGS} -EHsc- -W3 -wd4244 -D_WIN32 -D_XKEYCHECK_H -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -DNOMINMAX")
+    set(CMAKE_CXX_FLAGS "-nologo -I${CMAKE_SOURCE_DIR}/build/win -FIw32pragma.h -FIsehmap.h ${BLDCXXFLAGS} -EHsc- -W3 -wd4244 -wd4049 -D_WIN32 -D_XKEYCHECK_H -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -DNOMINMAX -D_CRT_SECURE_NO_WARNINGS")
     set(CMAKE_C_FLAGS   "-nologo -I${CMAKE_SOURCE_DIR}/build/win -FIw32pragma.h -FIsehmap.h ${BLDCFLAGS} -EHsc- -W3 -D_WIN32 -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -DNOMINMAX")
     install(FILES ${CMAKE_SOURCE_DIR}/build/win/w32pragma.h  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT headers)
     install(FILES ${CMAKE_SOURCE_DIR}/build/win/sehmap.h  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT headers)


Fix CURL Android (add HAVE_POLL_FINE_EXITCODE__TRYRUN_OUTPUT)

--- cmake/projects/CURL/hunter.cmake
+++ cmake/projects/CURL/hunter.cmake
@@ -96,6 +96,7 @@
       HAVE_GLIBC_STRERROR_R=1
       HAVE_GLIBC_STRERROR_R__TRYRUN_OUTPUT=""
       HAVE_POLL_FINE_EXITCODE=0
+      HAVE_POLL_FINE_EXITCODE__TRYRUN_OUTPUT=""
       HAVE_POSIX_STRERROR_R=0
       HAVE_POSIX_STRERROR_R__TRYRUN_OUTPUT=""
   )


remove jemalloc support

remove jemalloc support

--- cmake/FindHoudiniUsd.cmake
+++ cmake/FindHoudiniUsd.cmake
@@ -31,7 +31,7 @@
     BOOST_NS=hboost
 )

-set(_houdini_libs OpenImageIO_sidefx;hboost_filesystem-mt-x64;hboost_iostreams-mt-x64;hboost_system-mt-x64;hboost_regex-mt-x64;jemalloc)
+set(_houdini_libs OpenImageIO_sidefx;hboost_filesystem-mt-x64;hboost_iostreams-mt-x64;hboost_system-mt-x64;hboost_regex-mt-x64)
 foreach(_houdini_lib ${_houdini_libs})
     find_library(${_houdini_lib}_path
             NAMES


boards: decawave_dwm1001_dev: add jlink runner support

Add jlink runner support.

Signed-off-by: Johann Fischer <b39b26e1812eb092eb217277792f3735321fa456@phytec.de>

--- boards/arm/decawave_dwm1001_dev/board.cmake
+++ boards/arm/decawave_dwm1001_dev/board.cmake
@@ -1,5 +1,7 @@
 # SPDX-License-Identifier: Apache-2.0

+board_runner_args(jlink "--device=nrf52" "--speed=4000")
 board_runner_args(pyocd "--target=nrf52")
+include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
 include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
 include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)


[FIX] added clang detection under Mac OS X

--- util/cmake/FindCXX11.cmake
+++ util/cmake/FindCXX11.cmake
@@ -17,9 +17,9 @@

   # Tested on Mac OS X 10.8.2 with XCode 4.6 Command Line Tools
   # Clang requires this to find the correct c++11 headers
-  if (CMAKE_HOST_APPLE)
-    set (CXX11_CXX_FLAGS "${CXX11_CXX_FLAGS} -stdlib=libc++")
-  endif (CMAKE_HOST_APPLE)
+  if (CMAKE_HOST_APPLE AND (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
+     set (CXX11_CXX_FLAGS "${CXX11_CXX_FLAGS} -stdlib=libc++")
+  endif (CMAKE_HOST_APPLE AND (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))

 else (CXX11_FOUND)


fixed typo

fixed typo

--- cmake/EthDependencies.cmake
+++ cmake/EthDependencies.cmake
@@ -109,7 +109,7 @@

 find_package (OpenCL)
 if (OpenCL_FOUND)
-	message(" - opencl header: ${OpenCL_INCLUDE_DIRES}")
+	message(" - opencl header: ${OpenCL_INCLUDE_DIRS}")
 	message(" - opencl lib   : ${OpenCL_LIBRARIES}")
 endif()


OpenSSL: use 1.0.2* for Visual Studio and Android

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -80,7 +80,13 @@
 hunter_config(OpenCL-cpp VERSION 2.0.10-p0)
 hunter_config(OpenCV VERSION 3.2.0-p0)
 hunter_config(OpenCV-Extra VERSION 3.0.0)
-hunter_config(OpenSSL VERSION 1.1.0e)
+if(MSVC OR ANDROID)
+  # FIXME: https://travis-ci.org/ingenue/hunter/jobs/215460184
+  # FIXME: https://ci.appveyor.com/project/ingenue/hunter/build/1.0.1470
+  hunter_config(OpenSSL VERSION 1.0.2k)
+else()
+  hunter_config(OpenSSL VERSION 1.1.0e)
+endif()
 hunter_config(PNG VERSION 1.6.26-p1)
 hunter_config(PocoCpp VERSION 1.7.6-p0)
 hunter_config(PostgreSQL VERSION 9.5.0)


Use llvm-lit if LLVM source tree is unavailable.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -632,11 +632,12 @@
   if (NOT CMAKE_CFG_INTDIR STREQUAL ".")
     list(APPEND LIT_ARGS --param build_mode=${CMAKE_CFG_INTDIR})
   endif ()
-  set(LIT_COMMAND
-    ${PYTHON_EXECUTABLE}
-    ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py
-    ${LIT_ARGS}
-    )
+  if (LLVM_MAIN_SRC_DIR)
+    set (LIT_COMMAND ${PYTHON_EXECUTABLE} ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
+  else()
+    find_program(LIT_COMMAND llvm-lit)
+  endif ()
+  list(APPEND LIT_COMMAND ${LIT_ARGS})
   foreach(param ${ARG_PARAMS})
     list(APPEND LIT_COMMAND --param ${param})
   endforeach()


Improve onsgmls output.

Improve onsgmls output.

svn path=/trunk/; revision=10366

--- cmake/modules/docbook.cmake
+++ cmake/modules/docbook.cmake
@@ -52,6 +52,12 @@
 set(XML_DECL /usr/share/xml/declaration/xml.dcl)
 set(DOCBOOK_DTD_PUBID "-//OASIS//DTD DocBook XML V4.2//EN")
 find_program(ONSGMLS onsgmls)
+
+if(ONSGMLS )
+  message(STATUS "validate target will be available to check for syntax errors in the PLplot DocBook documentation using ${ONSGMLS}.")
+else(ONSGMLS )
+  message(STATUS "WARNING: validate target will not be available to check for syntax errors in the PLplot DocBook documentation because onsgmls was not found.")
+endif(ONSGMLS )

 # Check for required programs and perl libraries.
 if(BUILD_DOC)


ENH: Use SHA for LabelErodeDilate module.

Change-Id: Ifbe76e97a012e8367acd07ccd0f7bbdcf5706515

--- Modules/Remote/LabelErodeDilate.remote.cmake
+++ Modules/Remote/LabelErodeDilate.remote.cmake
@@ -6,6 +6,6 @@
   structuring elements are supported.
   http://www.insight-journal.org/browse/publication/228
   http://hdl.handle.net/10380/3399"
-  GIT_REPOSITORY /home/richardb/Projects/ITK/LabelErodeDilate/
-  GIT_TAG RemoteModule
+  GIT_REPOSITORY https://github.com/richardbeare/LabelErodeDilate.git
+  GIT_TAG 81cb83606784fff872a34a7b614a092d4fc11f92
   )


FW: fix for Right cam on the new OAK-D-Pro-PoE and OAK-D-PoE S2, fix RGB-depth alignment when RGB streams at 12MP 4:3 full FoV (downscaled)

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "35d45ad291a6f988becc9663b6e8b2d58d4de24c")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "47275bd444a4214b11a16e7a2e268ca3dc5ce68f")

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


Update FW

Update FW

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "c331d88b13bf939fcf125cabbd20a2425cd08fe6")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "85106575e6166655330f8e974fefbe2c865e6075")

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


Getting rid of the unused variable warnings from the test.

In a "very strict" build mode those would cause the test to always
fail, but not because of any issues with using atomic operations.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1724,8 +1724,10 @@
 int main() {
    std::atomic<int> a1;
    int a1val = a1.load();
+   (void)a1val;
    std::atomic<uint64_t> a2;
    uint64_t a2val = a2.load(std::memory_order_relaxed);
+   (void)a2val;
    return 0;
 }
 " ROOT_HAVE_CXX_ATOMICS_WITHOUT_LIB)


Remove checks for Vc compatibility

Remove checks for Vc compatibility

Fixes: ROOT-9845

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1277,38 +1277,6 @@
   endif()
 endif()

-#---Check for Vc compatibility-----------------------------------------------------------
-if(vc OR builtin_vc)
-  if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
-    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.3.0)
-      message(STATUS "Vc requires GCC version >= 5.3.0; switching OFF 'vc' option")
-      set(vc OFF CACHE BOOL "Disabled because Vc requires GCC version >= 5.3.0 (${vc_description})" FORCE)
-      set(builtin_vc OFF CACHE BOOL "Disabled because Vc requires GCC version >= 5.3.0 (${builtin_vc_description})" FORCE)
-    endif()
-    if(cxx17 OR CMAKE_CXX_STANDARD EQUAL 17)
-      message(STATUS "Vc uses std::for_each_n(), which is not available in GCC; switching OFF 'vc' option")
-      set(vc OFF CACHE BOOL "Disabled because std::for_each_n() is not available in GCC (${vc_description})" FORCE)
-      set(builtin_vc OFF CACHE BOOL "Disabled because std::for_each_n() is not available in GCC (${builtin_vc_description})" FORCE)
-    endif()
-  elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-    if ( APPLE AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5)
-      message(STATUS "Vc requires Apple Clang version >= 5.0; switching OFF 'vc' option")
-      set(vc OFF CACHE BOOL "Disabled because Apple Clang version >= 5.0 required (${vc_description})" FORCE)
-      set(builtin_vc OFF CACHE BOOL "Disabled because Apple Clang version >= 5.0 required (${builtin_vc_description})" FORCE)
-    elseif (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.1)
-      message(STATUS "Vc requires Clang version >= 3.1; switching OFF 'vc' option")
-      set(vc OFF CACHE BOOL "Disabled because Clang version >= 3.1 required (${vc_description})" FORCE)
-      set(builtin_vc OFF CACHE BOOL "Disabled because Clang version >= 3.1 required (${builtin_vc_description})" FORCE)
-    endif()
-  elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
-    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0)  # equivalent to MSVC 2010
-      message(STATUS "Vc requires MSVC version >= 2011; switching OFF 'vc' option")
-      set(vc OFF CACHE BOOL "Disabled because MSVC version >= 2011 required (${vc_description})" FORCE)
-      set(builtin_vc OFF CACHE BOOL "Disabled because MSVC version >= 2011 required (${builtin_vc_description})" FORCE)
-    endif()
-  endif()
-endif()
-
 #---Check for Vc---------------------------------------------------------------------
 if(builtin_vc)
   unset(Vc_FOUND)