Update CMakeBuildFlags.cmake

Update CMakeBuildFlags.cmake

--- cmake/CMakeBuildFlags.cmake
+++ cmake/CMakeBuildFlags.cmake
@@ -23,6 +23,6 @@

 if(CMAKE_COMPILER_IS_GNUC)
 	if(CMAKE_C_COMPILER_VERSION VERSION_GREATER "5.3.0" AND NOT APPLE)
-		SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wtrampolines -Wunsafe-loop-optimizations")
+		SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wtrampolines")
 	endif()
 endif()


build: UNSET cache variables for FIND_IMAGEMAGICK_API

The way that the ImageMagick component search calls find_path
multiple times with the same variable but different names
does not expect old cache values in the variable.

--- cmake/FindImageMagick.cmake
+++ cmake/FindImageMagick.cmake
@@ -231,6 +231,8 @@
     )

     IF(component STREQUAL "Magick++")
+        # unset cached variable that assumes header parameter never changes
+        UNSET(ImageMagick_MagickWand_INCLUDE_DIR CACHE)

         # Try top folder first
         FIND_IMAGEMAGICK_API(Magick++ <NONE> Magick++.h
@@ -252,6 +254,8 @@
         ENDIF()

     ELSEIF(component STREQUAL "MagickWand")
+        # unset cached variable that assumes header parameter never changes
+        UNSET(ImageMagick_MagickWand_INCLUDE_DIR CACHE)

         # Try top folder first
         FIND_IMAGEMAGICK_API(MagickWand <NONE> MagickWand.h


Changes PV_CUDA_ARCHITECTURE initial value to Auto

--- cmake/PVConfigProject.cmake
+++ cmake/PVConfigProject.cmake
@@ -3,6 +3,11 @@
 ################################################################################

 macro(pv_config_project)
+
+  # set policy to use CUDA_ROOT and CUDNN_ROOT variables
+  if (${CMAKE_VERSION} VERSION_GREATER "3.16.0")
+    cmake_policy(SET CMP0074 NEW)
+  endif()

   # The default build type if CMAKE_BUILD_TYPE is empty
   set(PV_DEFAULT_BUILD_TYPE "Release")
@@ -150,7 +155,7 @@
   set(PV_OPENMP_FLAG "${PV_OPENMP_FLAG}" CACHE STRING "${PV_OPENMP_FLAG_HELP}")
   set(PV_USE_CUDA ON CACHE BOOL "${PV_USE_CUDA_HELP}")
   set(PV_CUDA_RELEASE ON CACHE BOOL "${PV_CUDA_RELEASE_HELP}")
-  set(PV_CUDA_ARCHITECTURE "" CACHE STRING "${PV_CUDA_ARCHITECTURE_HELP}")
+  set(PV_CUDA_ARCHITECTURE "Auto" CACHE STRING "${PV_CUDA_ARCHITECTURE_HELP}")
   set(PV_USE_LUA OFF CACHE BOOL "${PV_USE_LUA_HELP}")
   set(PV_ADDRESS_SANITIZE OFF CACHE BOOL "${PV_ADDRESS_SANITIZE_HELP}")
   set(PV_BUILD_SHARED OFF CACHE BOOL "${PV_BUILD_SHARED_HELP}")


added odb-pgsql to cmake/configs/default.cmake

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -93,6 +93,7 @@
 hunter_config(nlohmann-json VERSION 1.0.0-rc1-hunter-3)
 hunter_config(odb VERSION 2.4.0)
 hunter_config(odb-compiler VERSION 2.4.0)
+hunter_config(odb-pgsql VERSION 2.4.0)
 hunter_config(odb-sqlite VERSION 2.4.0)
 hunter_config(rabbitmq-c VERSION 0.7.0-p1)
 hunter_config(sparsehash VERSION 2.0.2)


[CMake] export_executable_symbols also needs to add -rdynamic to the linker flags on Darwin

Without -rdynamic LLVM built with LTO fails to pass "check" due to loadable modules failing.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -660,6 +660,10 @@
 function(export_executable_symbols target)
   if (NOT MSVC) # MSVC's linker doesn't support exporting all symbols.
     set_target_properties(${target} PROPERTIES ENABLE_EXPORTS 1)
+    if (APPLE)
+      set_target_properties(${target} PROPERTIES
+        LINK_FLAGS "-rdynamic")
+    endif()
   endif()
 endfunction()


By default do not build the doxygen documentation because that latency
would be annoying for developers who are just changing one file in
the source tree.

svn path=/trunk/; revision=11646

--- cmake/modules/doxygen.cmake
+++ cmake/modules/doxygen.cmake
@@ -19,8 +19,11 @@

 # Module file to decide whether to build doxygen documentation and
 # and, if so, find the necessary doxygen command.
+# N.B. turn OFF by default since the doxygen build now requires something
+# like 10 seconds, and that build latency would be annoying for developers
+# who are just making some trivial change in the source tree.

-option(BUILD_DOX_DOC "Build doxygen documentation" ON)
+option(BUILD_DOX_DOC "Build doxygen documentation" OFF)

 if(BUILD_DOX_DOC)
   find_package(Doxygen)


i#1795 CDash: change site naming convention

Changes the CDash site naming convention to a four-part sequence
Architecture.OSVersion.Compiler.Hostname.

Review-URL: https://codereview.appspot.com/272870043

--- suite/nightly.cmake
+++ suite/nightly.cmake
@@ -39,8 +39,9 @@
 # 3) To keep the sources pristine, copy this file from
 #    $nightly/src/suite/nightly.cmake to $nightly/nightly.cmake.  Pick a site
 #    name and change the site= string below in $nightly/nightly.cmake.  The
-#    convention is {Linux,Windows}.OSVersion.Machine/Location.
-#    E.g., Windows.Vista64.CSAIL
+#    convention is Architecture.OSVersion.Compiler.Hostname, where
+#    Architecture comes from {X64,X86,ARM,AArch64}.
+#    E.g.: X64.Fedora22.gcc511.Ancalagon or X86.Windows10.VS2013.Buildbot44.
 #    The site name should not contain spaces or quotes.
 # 4) Build a version of CTest that sets the Content-Type header to
 #    satisfy the security rules on our CDash server.
@@ -59,4 +60,4 @@
 # We point at src/suite/runsuite.cmake, assuming this file will be executed
 # from two dirs below.
 # Site name should not have spaces or quotes.
-ctest_run_script(${CTEST_SCRIPT_DIRECTORY}/src/suite/runsuite.cmake,nightly\;long\;site=Linux.Fedora22.Ancalagon)
+ctest_run_script(${CTEST_SCRIPT_DIRECTORY}/src/suite/runsuite.cmake,nightly\;long\;site=X64.Fedora22.gcc511.Ancalagon)


Bug 1054: Use set(EIGEN_CXX_FLAG_VERSION "/version") only for Intel compilers on Windows.
Also removed code calling `head -n1` and always use integrated REGEX functionality.

--HG--
branch : 3.2

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -324,23 +324,15 @@
     # on all other system we rely on ${CMAKE_CXX_COMPILER}
     # supporting a "--version" or "/version" flag

-    if(WIN32 AND NOT CYGWIN)
+    if(WIN32 AND ${CMAKE_CXX_COMPILER_ID} EQUAL "Intel")
       set(EIGEN_CXX_FLAG_VERSION "/version")
     else()
       set(EIGEN_CXX_FLAG_VERSION "--version")
     endif()

-    # check whether the head command exists
-    find_program(HEAD_EXE head NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_CMAKE_SYSTEM_PATH)
-    if(HEAD_EXE)
-      execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${EIGEN_CXX_FLAG_VERSION}
-                      COMMAND head -n 1
-                      OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
-    else()
-      execute_process(COMMAND ${CMAKE_CXX_COMPILER}  ${EIGEN_CXX_FLAG_VERSION}
-                      OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
-      string(REGEX REPLACE "[\n\r].*"  ""  eigen_cxx_compiler_version_string  ${eigen_cxx_compiler_version_string})
-    endif()
+    execute_process(COMMAND ${CMAKE_CXX_COMPILER}  ${EIGEN_CXX_FLAG_VERSION}
+                    OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
+    string(REGEX REPLACE "[\n\r].*"  ""  eigen_cxx_compiler_version_string  ${eigen_cxx_compiler_version_string})

     ei_get_compilerver_from_cxx_version_string("${eigen_cxx_compiler_version_string}" CNAME CVER)
     set(${VAR} "${CNAME}-${CVER}")


IVGCVSW-3656 Build the reference backend by default

 * Changed the default value of the new ARMNNREF option to ON in
   the global makefile, so to always build the reference backend
   by default, thus keeping the same behaviour as of the previous
   releases

Change-Id: Id4941522ac7987c797ac8331ea421edb2a54287f
Signed-off-by: Matteo Martincigh <c6d77cbcee86d63acbf5236b8a439153c50030ae@arm.com>

--- cmake/GlobalConfig.cmake
+++ cmake/GlobalConfig.cmake
@@ -6,7 +6,7 @@
 option(BUILD_FOR_COVERAGE "Use no optimization and output .gcno and .gcda files" OFF)
 option(ARMCOMPUTENEON "Build with ARM Compute NEON support" OFF)
 option(ARMCOMPUTECL "Build with ARM Compute OpenCL support" OFF)
-option(ARMNNREF "Build with ArmNN reference support" OFF)
+option(ARMNNREF "Build with ArmNN reference support" ON)
 option(PROFILING_BACKEND_STREAMLINE "Forward the armNN profiling events to DS-5/Streamline as annotations" OFF)
 # options used for heap profiling and leak checking
 option(HEAP_PROFILING "Build with heap profiling enabled" OFF)


improve ctest

improve ctest

--- cmake/ctest_script.cmake
+++ cmake/ctest_script.cmake
@@ -589,12 +589,17 @@
     set(CTEST_LABELS_FOR_SUBPROJECTS ${LABELS_FOR_SUBPROJECTS}) #labels/subprojects
   endif()

-  ctest_configure(OPTIONS "${CMAKE_ARGS};${SUBM_ARGS};-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS};-DBUILD_TESTING=ON;-DDART_TESTING_TIMEOUT=${CTEST_TEST_TIMEOUT}")
+  ctest_configure(OPTIONS "${CMAKE_ARGS};${SUBM_ARGS};-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS};-DBUILD_TESTING=ON;-DDART_TESTING_TIMEOUT=${CTEST_TEST_TIMEOUT}"  RETURN_VALUE confResult)
+
   #ctest_submit(PARTS Configure Update  RETRY_COUNT 3 RETRY_DELAY 3)
 if(EXISTS ${CTEST_BINARY_DIRECTORY}/gitstatus.txt)
   ctest_submit(PARTS Configure Notes RETRY_COUNT 3 RETRY_DELAY 3)
 else()
   ctest_submit(PARTS Configure RETRY_COUNT 3 RETRY_DELAY 3)
+endif()
+
+if (NOT confResult EQUAL 0)
+  message(SEND_ERROR "CMake Configuration failed.")
 endif()

   #"${CMAKE_VERSION}" VERSION_LESS "3.10"


make Linux and windows both use external/cub 1.16.0 (#44004)

* make only win32 and 11.6 use external/cub

* unify cub version in linux and windows when cuda >= 11.6

--- cmake/external/cub.cmake
+++ cmake/external/cub.cmake
@@ -24,7 +24,7 @@

 set(CUB_REPOSITORY ${GIT_URL}/NVlabs/cub.git)

-if(WIN32 AND ${CMAKE_CUDA_COMPILER_VERSION} GREATER_EQUAL 11.6)
+if(${CMAKE_CUDA_COMPILER_VERSION} GREATER_EQUAL 11.6)
   # cuda_11.6.2_511.65‘s own cub is 1.15.0, which will cause compiling error in windows.
   set(CUB_TAG 1.16.0)
   # cub 1.16.0 is not compitable with current thrust version


Update PDAL_ADD_PLUGIN target_link_libraries

Remove PCL_LIBRARIES and add PDAL_LINKAGE.

--- cmake/pdal_targets.cmake
+++ cmake/pdal_targets.cmake
@@ -93,7 +93,7 @@
 # Todo: accept deps for target_link_libraries
 macro(PDAL_ADD_PLUGIN _name _type _shortname _srcs _incs)
     add_library(${_name} SHARED ${_srcs} ${_incs})
-    target_link_libraries(${_name} ${PDAL_LIB_NAME} ${PCL_LIBRARIES})
+    target_link_libraries(${_name} ${PDAL_LINKAGE} ${PDAL_LIB_NAME})

     source_group("Header Files\\${_type}\\${_shortname}" FILES ${_incs})
     source_group("Source Files\\${_type}\\${_shortname}" FILES ${_srcs})


Remove optimization compiler flag from CMAKE_CXX_FLAGS.

--- config/IRTKInclude.cmake
+++ config/IRTKInclude.cmake
@@ -95,7 +95,7 @@
   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /TP /Ze /W0")
   ADD_DEFINITIONS(-DvtkCommon_EXPORTS)
 ELSE (WIN32)
-  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O2 -Wno-deprecated -Wno-write-strings")
+  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-deprecated -Wno-write-strings")
 ENDIF (WIN32)

 # Option to wrap python.


cmake: don't try to build for iOS on Linux

--- CrossCompile-iOS.cmake
+++ CrossCompile-iOS.cmake
@@ -1,5 +1,9 @@
 # To cross compile for iPhone:
 # build$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../contrib/cmake/CrossCompile-iOS.cmake
+
+if (NOT APPLE)
+    message(FATAL_ERROR "\nNeed to build on a Mac for iOS\n")
+endif()

 SET(CMAKE_SYSTEM_NAME Generic)
 if (NOT "$ENV{IOS_SDK_VERSION}" STREQUAL "")


fix cmake version for compiler option, add option to disable libc++ for clang

--- project/cmake/CompilerOption.cmake
+++ project/cmake/CompilerOption.cmake
@@ -7,6 +7,7 @@
 if(NOT DEFINED __COMPILER_OPTION_LOADED)
     set(__COMPILER_OPTION_LOADED 1)
     option(COMPILER_OPTION_MSVC_ZC_CPP "Add /Zc:__cplusplus for MSVC (let __cplusplus be equal to _MSVC_LANG) when it support." ON)
+    option(COMPILER_OPTION_CLANG_ENABLE_LIBCXX "Try to use libc++ when using clang." ON)
     set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "Enable IndependentCode")

     if (CMAKE_CONFIGURATION_TYPES)
@@ -102,7 +103,7 @@
         list(APPEND COMPILER_STRICT_CFLAGS -Wall -Werror)
         if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "3.4")
             set(CMAKE_C_STANDARD 11)
-            if (CMAKE_VERSION VERSION_GREATER_EQUAL "5.0")
+            if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.8.0")
                 set(CMAKE_CXX_STANDARD 17)
             else()
                 set(CMAKE_CXX_STANDARD 14)
@@ -115,7 +116,7 @@
         # 优先使用libc++和libc++abi
         find_library (COMPILER_CLANG_HAS_LIBCXX NAMES c++ libc++)
         find_library (COMPILER_CLANG_HAS_LIBCXXABI NAMES c++abi libc++abi)
-        if(COMPILER_CLANG_HAS_LIBCXX AND COMPILER_CLANG_HAS_LIBCXXABI)
+        if(COMPILER_OPTION_CLANG_ENABLE_LIBCXX AND COMPILER_CLANG_HAS_LIBCXX AND COMPILER_CLANG_HAS_LIBCXXABI)
             list(APPEND CMAKE_CXX_FLAGS -stdlib=libc++ -Wno-unused-command-line-argument)
             list(APPEND CMAKE_C_FLAGS -Wno-unused-command-line-argument)
             message(STATUS "Clang use stdlib=libc++")
@@ -140,7 +141,7 @@
         list(APPEND COMPILER_STRICT_CFLAGS -Wall -Werror)
         if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "6.0")
             set(CMAKE_C_STANDARD 11)
-            if (CMAKE_VERSION VERSION_GREATER_EQUAL "7.0")
+            if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.8.0")
                 set(CMAKE_CXX_STANDARD 17)
             else()
                 set(CMAKE_CXX_STANDARD 14)
@@ -153,7 +154,7 @@
         # 优先使用libc++和libc++abi
         find_library (COMPILER_CLANG_HAS_LIBCXX NAMES c++ libc++)
         find_library (COMPILER_CLANG_HAS_LIBCXXABI NAMES c++abi libc++abi)
-        if(COMPILER_CLANG_HAS_LIBCXX AND COMPILER_CLANG_HAS_LIBCXXABI)
+        if(COMPILER_OPTION_CLANG_ENABLE_LIBCXX AND COMPILER_CLANG_HAS_LIBCXX AND COMPILER_CLANG_HAS_LIBCXXABI)
             list(APPEND CMAKE_CXX_FLAGS -stdlib=libc++ -Wno-unused-command-line-argument)
             list(APPEND CMAKE_C_FLAGS -Wno-unused-command-line-argument)
             message(STATUS "AppleClang use stdlib=libc++")


ENH: Update custom command to display build output with Ninja generator

Change-Id: I64805290555b0ab13604fb75c22a0d6a3da4ad82

--- CMake/sitkUseSWIG.cmake
+++ CMake/sitkUseSWIG.cmake
@@ -181,6 +181,7 @@
     -o "${swig_generated_file_fullname}"
     "${swig_source_file_fullname}"
     MAIN_DEPENDENCY "${swig_source_file_fullname}"
+    USES_TERMINAL
     DEPENDS ${SWIG_MODULE_${name}_EXTRA_DEPS}
     COMMENT "Swig source to generate ${SWIG_MODULE_${name}_LANGUAGE} wrapping")
   SET_SOURCE_FILES_PROPERTIES("${swig_generated_file_fullname}" ${swig_extra_generated_files}


ENH: removing vtk's FindMPI as CMake already contains a nearly identical version.

--- CMake/FindMPI.cmake
+++ CMake/FindMPI.cmake
@@ -1,313 +0,0 @@
-# - Message Passing Interface (MPI) module.
-#
-# The Message Passing Interface (MPI) is a library used to write
-# high-performance parallel applications that use message passing, and
-# is typically deployed on a cluster. MPI is a standard interface
-# (defined by the MPI forum) for which many implementations are
-# available. All of these implementations have somewhat different
-# compilation approaches (different include paths, libraries to link
-# against, etc.), and this module tries to smooth out those differences.
-#
-# This module will set the following variables:
-#   MPI_FOUND                  TRUE if we have found MPI
-#   MPI_COMPILE_FLAGS          Compilation flags for MPI programs
-#   MPI_INCLUDE_PATH           Include path(s) for MPI header
-#   MPI_LINK_FLAGS             Linking flags for MPI programs
-#   MPI_LIBRARY                First MPI library to link against (cached)
-#   MPI_EXTRA_LIBRARY          Extra MPI libraries to link against (cached)
-#   MPI_LIBRARIES              All libraries to link MPI programs against
-#   MPIEXEC                    Executable for running MPI programs
-#   MPIEXEC_NUMPROC_FLAG       Flag to pass to MPIEXEC before giving it the
-#                              number of processors to run on
-#   MPIEXEC_PREFLAGS           Flags to pass to MPIEXEC directly before the
-#                              executable to run.
-#   MPIEXEC_POSTFLAGS          Flags to pass to MPIEXEC after all other flags.
-#
-# This module will attempt to auto-detect these settings, first by
-# looking for a MPI compiler, which many MPI implementations provide
-# as a pass-through to the native compiler to simplify the compilation
-# of MPI programs. The MPI compiler is stored in the cache variable
-# MPI_COMPILER, and will attempt to look for commonly-named drivers
-# mpic++, mpicxx, mpiCC, or mpicc. If the compiler driver is found and
-# recognized, it will be used to set all of the module variables. To
-# skip this auto-detection, set MPI_LIBRARY and MPI_INCLUDE_PATH in
-# the CMake cache.
-#
-# If no compiler driver is found or the compiler driver is not
-# recognized, this module will then search for common include paths
-# and library names to try to detect MPI.
-#
-# If CMake initially finds a different MPI than was intended, and you
-# want to use the MPI compiler auto-detection for a different MPI
-# implementation, set MPI_COMPILER to the MPI compiler driver you want
-# to use (e.g., mpicxx) and then set MPI_LIBRARY to the string
-# MPI_LIBRARY-NOTFOUND. When you re-configure, auto-detection of MPI
-# will run again with the newly-specified MPI_COMPILER.
-#
-# When using MPIEXEC to execute MPI applications, you should typically
-# use all of the MPIEXEC flags as follows:
-#   ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} PROCS ${MPIEXEC_PREFLAGS} EXECUTABLE
-#     ${MPIEXEC_POSTFLAGS} ARGS
-# where PROCS is the number of processors on which to execute the program,
-# EXECUTABLE is the MPI program, and ARGS are the arguments to pass to the
-# MPI program.
-
-# Try to find the MPI driver program
-find_program(MPI_COMPILER
-  NAMES mpic++ mpicxx mpiCC mpicc
-  DOC "MPI compiler. Used only to detect MPI compilation flags.")
-
-find_program(MPI_C_COMPILER
-  NAMES mpicc
-  DOC "MPI compiler. Used for generating mpi4pi bindings")
-
-mark_as_advanced(MPI_COMPILER)
-mark_as_advanced(MPI_C_COMPILER)
-
-find_program(MPIEXEC
-  NAMES mpiexec mpirun lamexec
-  DOC "Executable for running MPI programs.")
-
-set(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "Flag used by MPI to specify the number of processes for MPIEXEC; the next option will be the number of processes.")
-set(MPIEXEC_PREFLAGS "" CACHE STRING "These flags will be directly before the executable that is being run by MPIEXEC.")
-set(MPIEXEC_POSTFLAGS "" CACHE STRING "These flags will come after all flags given to MPIEXEC.")
-set(MPIEXEC_MAX_NUMPROCS "2" CACHE STRING "Maximum number of processors available to run MPI applications.")
-mark_as_advanced(MPIEXEC MPIEXEC_NUMPROC_FLAG MPIEXEC_PREFLAGS
-  MPIEXEC_POSTFLAGS MPIEXEC_MAX_NUMPROCS)
-
-if (MPI_INCLUDE_PATH AND MPI_LIBRARY)
-  # Do nothing: we already have MPI_INCLUDE_PATH and MPI_LIBRARY in
-  # the cache, and we don't want to override those settings.
-elseif (MPI_COMPILER)
-  # Check whether the -showme:compile option works. This indicates
-  # that we have either Open MPI or a newer version of LAM-MPI, and
-  # implies that -showme:link will also work.
-  exec_program(${MPI_COMPILER}
-    ARGS -showme:compile
-    OUTPUT_VARIABLE MPI_COMPILE_CMDLINE
-    RETURN_VALUE MPI_COMPILER_RETURN)
-
-  if (MPI_COMPILER_RETURN EQUAL 0)
-    # If we appear to have -showme:compile, then we should also have
-    # -showme:link. Try it.
-    exec_program(${MPI_COMPILER}
-      ARGS -showme:link
-      OUTPUT_VARIABLE MPI_LINK_CMDLINE
-      RETURN_VALUE MPI_COMPILER_RETURN)
-
-    # Note that we probably have -showme:incdirs and -showme:libdirs
-    # as well.
-    set(MPI_COMPILER_MAY_HAVE_INCLIBDIRS TRUE)
-  endif (MPI_COMPILER_RETURN EQUAL 0)
-
-  if (MPI_COMPILER_RETURN EQUAL 0)
-    # Do nothing: we have our command lines now
-  else (MPI_COMPILER_RETURN EQUAL 0)
-    # Older versions of LAM-MPI have "-showme". Try it.
-    exec_program(${MPI_COMPILER}
-      ARGS -showme
-      OUTPUT_VARIABLE MPI_COMPILE_CMDLINE
-      RETURN_VALUE MPI_COMPILER_RETURN)
-  endif (MPI_COMPILER_RETURN EQUAL 0)
-
-  if (MPI_COMPILER_RETURN EQUAL 0)
-    # Do nothing: we have our command lines now
-  else (MPI_COMPILER_RETURN EQUAL 0)
-    # MPICH uses "-show". Try it.
-    exec_program(${MPI_COMPILER}
-      ARGS -show
-      OUTPUT_VARIABLE MPI_COMPILE_CMDLINE
-      RETURN_VALUE MPI_COMPILER_RETURN)
-  endif (MPI_COMPILER_RETURN EQUAL 0)
-
-  if (MPI_COMPILER_RETURN EQUAL 0)
-    # We have our command lines, but we might need to copy
-    # MPI_COMPILE_CMDLINE into MPI_LINK_CMDLINE, if the underlying
-    if (NOT MPI_LINK_CMDLINE)
-      SET(MPI_LINK_CMDLINE ${MPI_COMPILE_CMDLINE})
-    endif (NOT MPI_LINK_CMDLINE)
-  else (MPI_COMPILER_RETURN EQUAL 0)
-    message(STATUS "Unable to determine MPI from MPI driver ${MPI_COMPILER}")
-  endif (MPI_COMPILER_RETURN EQUAL 0)
-endif (MPI_INCLUDE_PATH AND MPI_LIBRARY)
-
-if (MPI_INCLUDE_PATH AND MPI_LIBRARY)
-  # Do nothing: we already have MPI_INCLUDE_PATH and MPI_LIBRARY in
-  # the cache, and we don't want to override those settings.
-elseif (MPI_COMPILE_CMDLINE)
-  # Extract compile flags from the compile command line.
-  string(REGEX MATCHALL "-D([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}")
-  set(MPI_COMPILE_FLAGS_WORK)
-  foreach(FLAG ${MPI_ALL_COMPILE_FLAGS})
-    if (MPI_COMPILE_FLAGS_WORK)
-      set(MPI_COMPILE_FLAGS_WORK "${MPI_COMPILE_FLAGS_WORK} ${FLAG}")
-    else(MPI_COMPILE_FLAGS_WORK)
-      set(MPI_COMPILE_FLAGS_WORK ${FLAG})
-    endif(MPI_COMPILE_FLAGS_WORK)
-  endforeach(FLAG)
-
-  # Extract include paths from compile command line
-  string(REGEX MATCHALL "-I([^\" ]+|\"[^\"]+\")" MPI_ALL_INCLUDE_PATHS "${MPI_COMPILE_CMDLINE}")
-  set(MPI_INCLUDE_PATH_WORK)
-  foreach(IPATH ${MPI_ALL_INCLUDE_PATHS})
-    string(REGEX REPLACE "^-I" "" IPATH ${IPATH})
-    string(REGEX REPLACE "//" "/" IPATH ${IPATH})
-    list(APPEND MPI_INCLUDE_PATH_WORK ${IPATH})
-  endforeach(IPATH)
-
-  if (NOT MPI_INCLUDE_PATH_WORK)
-    if (MPI_COMPILER_MAY_HAVE_INCLIBDIRS)
-      # The compile command line didn't have any include paths on it,
-      # but we may have -showme:incdirs. Use it.
-      exec_program(${MPI_COMPILER}
-        ARGS -showme:incdirs
-        OUTPUT_VARIABLE MPI_INCLUDE_PATH_WORK
-        RETURN_VALUE MPI_COMPILER_RETURN)
-      separate_arguments(MPI_INCLUDE_PATH_WORK)
-    endif (MPI_COMPILER_MAY_HAVE_INCLIBDIRS)
-  endif (NOT MPI_INCLUDE_PATH_WORK)
-
-  if (NOT MPI_INCLUDE_PATH_WORK)
-    # If all else fails, just search for mpi.h in the normal include
-    # paths.
-    find_path(MPI_INCLUDE_PATH mpi.h)
-    set(MPI_INCLUDE_PATH_WORK ${MPI_INCLUDE_PATH})
-  endif (NOT MPI_INCLUDE_PATH_WORK)
-
-  # Extract linker paths from the link command line
-  string(REGEX MATCHALL "-L([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}")
-  set(MPI_LINK_PATH)
-  foreach(LPATH ${MPI_ALL_LINK_PATHS})
-    string(REGEX REPLACE "^-L" "" LPATH ${LPATH})
-    string(REGEX REPLACE "//" "/" LPATH ${LPATH})
-    list(APPEND MPI_LINK_PATH ${LPATH})
-  endforeach(LPATH)
-
-  if (NOT MPI_LINK_PATH)
-    if (MPI_COMPILER_MAY_HAVE_INCLIBDIRS)
-      # The compile command line didn't have any linking paths on it,
-      # but we may have -showme:libdirs. Use it.
-      exec_program(${MPI_COMPILER}
-        ARGS -showme:libdirs
-        OUTPUT_VARIABLE MPI_LINK_PATH
-        RETURN_VALUE MPI_COMPILER_RETURN)
-      separate_arguments(MPI_LINK_PATH)
-    endif (MPI_COMPILER_MAY_HAVE_INCLIBDIRS)
-  endif (NOT MPI_LINK_PATH)
-
-  # Extract linker flags from the link command line
-  string(REGEX MATCHALL "-Wl,([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}")
-  set(MPI_LINK_FLAGS_WORK)
-  foreach(FLAG ${MPI_ALL_LINK_FLAGS})
-    if (MPI_LINK_FLAGS_WORK)
-      set(MPI_LINK_FLAGS_WORK "${MPI_LINK_FLAGS_WORK} ${FLAG}")
-    else(MPI_LINK_FLAGS_WORK)
-      set(MPI_LINK_FLAGS_WORK ${FLAG})
-    endif(MPI_LINK_FLAGS_WORK)
-  endforeach(FLAG)
-
-  # Extract the set of libraries to link against from the link command
-  # line
-  string(REGEX MATCHALL "-l([^\" ]+|\"[^\"]+\")" MPI_LIBNAMES "${MPI_LINK_CMDLINE}")
-
-  # Determine full path names for all of the libraries that one needs
-  # to link against in an MPI program
-  set(MPI_LIBRARIES)
-  foreach(LIB ${MPI_LIBNAMES})
-    string(REGEX REPLACE "^-l" "" LIB ${LIB})
-    set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
-    find_library(MPI_LIB ${LIB} PATHS ${MPI_LINK_PATH})
-    if (MPI_LIB)
-      list(APPEND MPI_LIBRARIES ${MPI_LIB})
-    else (MPI_LIB)
-      message(ERROR "Unable to find MPI library ${LIB}")
-    endif (MPI_LIB)
-  endforeach(LIB)
-  set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE INTERNAL "Scratch variable for MPI detection" FORCE)
-
-  # Chop MPI_LIBRARIES into the old-style MPI_LIBRARY and
-  # MPI_EXTRA_LIBRARY.
-  list(LENGTH MPI_LIBRARIES MPI_NUMLIBS)
-  if (MPI_NUMLIBS GREATER 0)
-    list(GET MPI_LIBRARIES 0 MPI_LIBRARY_WORK)
-    set(MPI_LIBRARY ${MPI_LIBRARY_WORK} CACHE FILEPATH "MPI library to link against" FORCE)
-  else (MPI_NUMLIBS GREATER 0)
-    set(MPI_LIBRARY "MPI_LIBRARY-NOTFOUND" CACHE STRING "MPI library to link against" FORCE)
-  endif (MPI_NUMLIBS GREATER 0)
-  if (MPI_NUMLIBS GREATER 1)
-    set(MPI_EXTRA_LIBRARY_WORK ${MPI_LIBRARIES})
-    list(REMOVE_AT MPI_EXTRA_LIBRARY_WORK 0)
-    set(MPI_EXTRA_LIBRARY ${MPI_EXTRA_LIBRARY_WORK} CACHE STRING "Extra MPI libraries to link against" FORCE)
-  else (MPI_NUMLIBS GREATER 1)
-    set(MPI_EXTRA_LIBRARY "MPI_EXTRA_LIBRARY-NOTFOUND" CACHE STRING "Extra MPI libraries to link against" FORCE)
-  endif (MPI_NUMLIBS GREATER 1)
-
-  # Set up all of the appropriate cache entries
-  set(MPI_COMPILE_FLAGS ${MPI_COMPILE_FLAGS_WORK} CACHE STRING "MPI compilation flags" FORCE)
-  set(MPI_INCLUDE_PATH ${MPI_INCLUDE_PATH_WORK} CACHE STRING "MPI include path" FORCE)
-  set(MPI_LINK_FLAGS ${MPI_LINK_FLAGS_WORK} CACHE STRING "MPI linking flags" FORCE)
-else (MPI_COMPILE_CMDLINE)
-  find_path(MPI_INCLUDE_PATH mpi.h
-    /usr/local/include
-    /usr/include
-    /usr/include/mpi
-    /usr/local/mpi/include
-    "C:/Program Files/MPICH/SDK/Include"
-    "$ENV{SystemDrive}/Program Files/MPICH2/include"
-    "$ENV{SystemDrive}/Program Files/Microsoft Compute Cluster Pack/Include"
-    )
-
-  # Decide between 32-bit and 64-bit libraries for Microsoft's MPI
-  if (CMAKE_CL_64)
-    set(MS_MPI_ARCH_DIR amd64)
-  else (CMAKE_CL_64)
-    set(MS_MPI_ARCH_DIR i386)
-  endif (CMAKE_CL_64)
-
-  find_library(MPI_LIBRARY
-    NAMES mpi mpich msmpi
-    PATHS /usr/lib /usr/local/lib /usr/local/mpi/lib
-    "C:/Program Files/MPICH/SDK/Lib"
-    "$ENV{SystemDrive}/Program Files/MPICH/SDK/Lib"
-    "$ENV{SystemDrive}/Program Files/Microsoft Compute Cluster Pack/Lib/${MS_MPI_ARCH_DIR}"
-    )
-  find_library(MPI_LIBRARY
-    NAMES mpich2
-    PATHS
-    "$ENV{SystemDrive}/Program Files/MPICH2/Lib")
-
-  find_library(MPI_EXTRA_LIBRARY
-    NAMES mpi++
-    PATHS /usr/lib /usr/local/lib /usr/local/mpi/lib
-    "C:/Program Files/MPICH/SDK/Lib"
-    DOC "Extra MPI libraries to link against.")
-
-  set(MPI_COMPILE_FLAGS "" CACHE STRING "MPI compilation flags")
-  set(MPI_LINK_FLAGS "" CACHE STRING "MPI linking flags")
-endif (MPI_INCLUDE_PATH AND MPI_LIBRARY)
-
-# on BlueGene/L the MPI lib is named libmpich.rts.a, there also these additional libs are required
-if("${MPI_LIBRARY}" MATCHES "mpich.rts")
-   set(MPI_EXTRA_LIBRARY ${MPI_EXTRA_LIBRARY} msglayer.rts devices.rts rts.rts devices.rts)
-   set(MPI_LIBRARY ${MPI_LIBRARY}  msglayer.rts devices.rts rts.rts devices.rts)
-endif("${MPI_LIBRARY}" MATCHES "mpich.rts")
-
-# Set up extra variables to conform to
-if (MPI_EXTRA_LIBRARY)
-  set(MPI_LIBRARIES ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY})
-else (MPI_EXTRA_LIBRARY)
-  set(MPI_LIBRARIES ${MPI_LIBRARY})
-endif (MPI_EXTRA_LIBRARY)
-
-if (MPI_INCLUDE_PATH AND MPI_LIBRARY)
-  set(MPI_FOUND TRUE)
-else (MPI_INCLUDE_PATH AND MPI_LIBRARY)
-  set(MPI_FOUND FALSE)
-endif (MPI_INCLUDE_PATH AND MPI_LIBRARY)
-
-include(FindPackageHandleStandardArgs)
-# handle the QUIETLY and REQUIRED arguments
-find_package_handle_standard_args(MPI DEFAULT_MSG MPI_LIBRARY MPI_INCLUDE_PATH)
-
-mark_as_advanced(MPI_INCLUDE_PATH MPI_COMPILE_FLAGS MPI_LINK_FLAGS MPI_LIBRARY
-  MPI_EXTRA_LIBRARY)


[cmake] Fix getting version info from tags during the build (#6936)

Use `git describe --tags` to query for lightweight tags along with
the annotated ones.

--- CMake/Version.cmake
+++ CMake/Version.cmake
@@ -6,7 +6,7 @@
 find_program(GIT git)
 if(GIT)
   execute_process(
-      COMMAND ${GIT} describe
+      COMMAND ${GIT} describe --tags
       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
       OUTPUT_VARIABLE GIT_DESCRIBE_DIRTY
       OUTPUT_STRIP_TRAILING_WHITESPACE


bump minor version

bump minor version

--- CMake/version.cmake
+++ CMake/version.cmake
@@ -1,3 +1,3 @@
 set (VV_VERSION_MAJOR 3)
 set (VV_VERSION_MINOR 0)
-set (VV_VERSION_PATCH 1)
+set (VV_VERSION_PATCH 2)


MDEV-12231 MariaDB fails to restart after 10.0.30-1.el7 update

force SELinux policies to be built in mysql_release RPM packages

--- cmake/build_configurations/mysql_release.cmake
+++ cmake/build_configurations/mysql_release.cmake
@@ -97,6 +97,8 @@
 IF(RPM)
   SET(WITH_SSL system CACHE STRING "")
   SET(WITH_ZLIB system CACHE STRING "")
+  SET(CHECKMODULE /usr/bin/checkmodule CACHE STRING "")
+  SET(SEMODULE_PACKAGE /usr/bin/semodule_package CACHE STRING "")
 ELSEIF(DEB)
   SET(WITH_SSL system CACHE STRING "")
   SET(WITH_ZLIB system CACHE STRING "")


Spell CMAKE_COMPILER_IS_GNUCC correctly.

--- cmake/build_configurations/mysql_release.cmake
+++ cmake/build_configurations/mysql_release.cmake
@@ -130,7 +130,7 @@
 IF(UNIX)

   # Default GCC flags
-  IF(CMAKE_COMPILER_IS_GNUC)
+  IF(CMAKE_COMPILER_IS_GNUCC)
     SET(COMMON_C_FLAGS               "-g -static-libgcc -fno-omit-frame-pointer")
     SET(CMAKE_C_FLAGS_DEBUG          "-O ${COMMON_C_FLAGS}")
     SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}")


Bump GAPID version to v0.6.2

Bump GAPID version to v0.6.2

--- version.cmake
+++ version.cmake
@@ -16,7 +16,7 @@
 # Increment these numbers immediately after releasing a new version.
 set(GAPID_VERSION_MAJOR 0)
 set(GAPID_VERSION_MINOR 6)
-set(GAPID_VERSION_POINT 1)
+set(GAPID_VERSION_POINT 2)

 if (NOT DEFINED GAPID_BUILD_NUMBER)
     set(GAPID_BUILD_NUMBER 0)


[ioninja] release 3.5.0

[ioninja] release 3.5.0

[axl] release 5.5.0
[jancy] release 1.6.0

--- version.cmake
+++ version.cmake
@@ -1,6 +1,6 @@
 set (VERSION_MAJOR     5)
-set (VERSION_MINOR     3)
-set (VERSION_REVISION  9)
+set (VERSION_MINOR     5)
+set (VERSION_REVISION  0)
 set (VERSION_TAG)

 set (VERSION_FILE_SUFFIX "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")


GraphControl 3.10.4-4rc Release Candidate 4

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

--- version.cmake
+++ version.cmake
@@ -6,7 +6,7 @@
 set ( HPCC_MINOR 10 )
 set ( HPCC_POINT 4 )
 set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 3 )
+set ( HPCC_SEQUENCE 4 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )
   error ( "HPCC_POINT must be less than 66." )


Split off 7.6.14

Split off 7.6.14

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 13 )
+set ( HPCC_POINT 15 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Nagios Monitoring 7.0.0-rc5 Release Candidate 5

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

--- version.cmake
+++ version.cmake
@@ -6,5 +6,5 @@
 set ( HPCC_MINOR 0 )
 set ( HPCC_POINT 0 )
 set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 4 )
+set ( HPCC_SEQUENCE 5 )
 ###


ENH: packaging should be cross-plateform

--- FiberViewerLight.cmake
+++ FiberViewerLight.cmake
@@ -130,7 +130,6 @@
 ENDIF(BUILD_TESTING)

 if( EXTENSION_SUPERBUILD_BINARY_DIR )
-  install(PROGRAMS ${SlicerExecutionModel_DEFAULT_CLI_RUNTIME_OUTPUT_DIRECTORY}/FiberViewerLight DESTINATION ${SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION})
   install(PROGRAMS ${FiberViewerLight_SOURCE_DIR}/FiberLengthCleaning.py DESTINATION ${SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION})
   set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${CMAKE_BINARY_DIR};${EXTENSION_NAME};ALL;/")
   include(${Slicer_EXTENSION_CPACK})


Config: add double quotes protection for args with spaces

--- cmake/modules/hunter_calculate_config_sha1.cmake
+++ cmake/modules/hunter_calculate_config_sha1.cmake
@@ -92,7 +92,7 @@
       if(have_args)
         file(APPEND "${input_file}" " CMAKE_ARGS")
         foreach(y ${HUNTER_${x}_CMAKE_ARGS})
-          file(APPEND "${input_file}" " ${y}")
+          file(APPEND "${input_file}" " \"${y}\"")
         endforeach()
       endif()
       string(COMPARE NOTEQUAL "${HUNTER_${x}_CONFIGURATION_TYPES}" "" have_types)


BUG: removed mitkMeshReader due to no support of MeshReading. Loading a .mps PointSet file now leads to the creation of a mitkPointSet and thus also to propper mitkPointSetMapping. #concerning Bug:105

--- Core/IO/files.cmake
+++ Core/IO/files.cmake
@@ -11,7 +11,6 @@
   mitkItkImageFileReader.cpp
   mitkItkImageWrite.cpp
   mitkLightBoxImageReader.cpp
-  mitkMeshReader.cpp
   mitkObjFileIOFactory.cpp
   mitkObjFileReader.cpp
   mitkPACSPlugin.cpp


Put language in brackets instead of after a dot

--- IncludeWhatYouUse.cmake
+++ IncludeWhatYouUse.cmake
@@ -80,12 +80,12 @@

             set (IWYU_SOURCE_ARGS
                  "${CMAKE_CXX_FLAGS} -x c++")
-            set (LANGUAGE_STAMP_OPTION "cxx")
+            set (LANGUAGE_STAMP_OPT "cxx")

         else (NOT CXX_INDEX EQUAL -1)

             set (IWYU_SOURCE_ARGS "${CMAKE_C_FLAGS}")
-            set (LANGUAGE_STAMP_OPTION "c")
+            set (LANGUAGE_STAMP_OPT "c")

         endif (NOT CXX_INDEX EQUAL -1)

@@ -101,7 +101,7 @@
                              MULTIVAR_ARGS DEPENDS)
         psq_run_tool_on_source (${TARGET}
                                 ${SOURCE}
-                                "include-what-you-use.${LANGUAGE_STAMP_OPTION}"
+                                "include-what-you-use (${LANGUAGE_STAMP_OPT})"
                                 ${RUN_TOOL_ON_SOURCE_FORWARD}
                                 COMMAND
                                 ${CMAKE_COMMAND}


Disable a workaround for icc-13* and aggressive optimization.

The bug is not reproducable any more.

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

--- deal.II/cmake/setup_compiler_flags_intel.cmake
+++ deal.II/cmake/setup_compiler_flags_intel.cmake
@@ -127,17 +127,7 @@
   # General optimization flags:
   #

-  IF(CMAKE_CXX_COMPILER_VERSION MATCHES "^13\\.")
-    #
-    # Disable aggressive optimization for intel-13* compilers, until we
-    # resolve a lot of funny miscompilations...
-    #
-    # - Maier, 2013
-    #
-    ADD_FLAGS(DEAL_II_CXX_FLAGS_RELEASE "-O1")
-  ELSE()
-    ADD_FLAGS(DEAL_II_CXX_FLAGS_RELEASE "-O2")
-  ENDIF()
+  ADD_FLAGS(DEAL_II_CXX_FLAGS_RELEASE "-O2")

   # equivalent to -fno-strict-aliasing:
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-no-ansi-alias")


BUG: #1576: force OpenGL desktop on Windows

--- SuperBuild/CMake/External_qt5.cmake
+++ SuperBuild/CMake/External_qt5.cmake
@@ -48,6 +48,12 @@
 endif()

 file(TO_NATIVE_PATH ${QT5_SB_SRC} QT5_SB_SRC_NATIVE)
+
+if(WIN32)
+  set(QT5_SB_OPENGL_CONFIG "-opengl desktop")
+else()
+  set(QT5_SB_OPENGL_CONFIG "")
+endif()

 #Common options for all cases
 # -skip qtbase
@@ -58,6 +64,7 @@
   -I ${QT5_INCLUDE_PREFIX_NATIVE} -I ${QT5_INCLUDE_FREETYPE_NATIVE} \
   -opensource -confirm-license -release -shared \
   -nomake examples -make tools -no-openssl \
+  ${QT5_SB_OPENGL_CONFIG} \
   -skip qtgamepad  \
   -skip qt3d  \
   -skip qtactiveqt  \


source conanbuildinfo.cmake from current dir

--- cmake/ConanInline.cmake
+++ cmake/ConanInline.cmake
@@ -50,8 +50,12 @@
   cmake_parse_arguments(MARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )

+  set(conanfile_cmake_paths ${CMAKE_BINARY_DIR}/conan_paths.cmake)
+
   set(conanfile_cmake ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
-  set(conanfile_cmake_paths ${CMAKE_BINARY_DIR}/conan_paths.cmake)
+  if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/conanbuildinfo.cmake)
+	  set(conanfile_cmake ${CMAKE_CURRENT_BINARY_DIR}/conanbuildinfo.cmake)
+  endif()

   if(EXISTS "${conanfile_cmake_paths}")
     include(${conanfile_cmake_paths})


Fix search path for OpenSim files

Fix search path for OpenSim files

--- cmake/FindOpenSim.cmake
+++ cmake/FindOpenSim.cmake
@@ -154,7 +154,7 @@

 find_path(OPENSIM_INCLUDE_DIR
     NAMES "OpenSim/OpenSim.h"
-    PATHS ${OPENSIM_SEARCH_PATHS}
+    HINTS ${OPENSIM_SEARCH_PATHS}
     PATH_SUFFIXES "sdk/include" "opensim/sdk/include" "OpenSim/sdk/include"
     DOC ${OPENSIM_INCLUDE_DIR_DOC}
     )


add no_precompile option

add no_precompile option

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

--- cmake/pcl_options.cmake
+++ cmake/pcl_options.cmake
@@ -22,3 +22,7 @@
 option(PCL_ONLY_CORE_POINT_TYPES "Compile explicitly only for a small subset of point types (e.g., pcl::PointXYZ instead of PCL_XYZ_POINT_TYPES)." OFF)
 mark_as_advanced(PCL_ONLY_CORE_POINT_TYPES)

+# Precompile for a minimal set of point types instead of all.
+option(PCL_NO_PRECOMPILE "Do not precompile PCL code for any point types at all." OFF)
+mark_as_advanced(PCL_NO_PRECOMPILE)
+


gtest 1.5 fix (again)

gtest 1.5 fix (again)

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -135,8 +135,6 @@
     add_executable(${_exename} ${PCL_ADD_TEST_FILES})
     PCL_ADD_OPENMP_FLAGS(${_exename})
     target_link_libraries(${_exename} ${GTEST_BOTH_LIBRARIES} ${PCL_ADD_TEST_LINK_WITH})
-    # must link explicitly against boost only on Windows
-    target_link_libraries(${_exename} ${Boost_LIBRARIES})
     #
     # Only link if needed
     if(UNIX)
@@ -148,7 +146,9 @@
     endif()
     #
     PCL_LINK_OPENMP(${_exename})
-
+    # must link explicitly against boost only on Windows
+    target_link_libraries(${_exename} ${Boost_LIBRARIES})
+    #
     if(${CMAKE_VERSION} VERSION_LESS 2.8.4)
       add_test(${_name} ${_exename} ${PCL_ADD_TEST_ARGUMENTS})
     else(${CMAKE_VERSION} VERSION_LESS 2.8.4)


[FIX] Using CMAKE_FIND_PREFIX_PATH in CMakeLists.txt.

It turns out that one should use CMAKE_FIND_PREFIX_PATH instead of CMAKE_FIND_ROOT_PATH for find_package() to work.

--- util/cmake/SeqAnContribs.cmake
+++ util/cmake/SeqAnContribs.cmake
@@ -99,13 +99,13 @@
 		# Compose contrib path.
 		set(SEQAN_CONTRIB_PATH "${SEQAN_CONTRIB_BASE}/${SEQAN_CONTRIB_VARIANT}")

-		# Extend CMAKE_FIND_ROOT_PATH.
+		# Extend CMAKE_PREFIX_PATH.
 		if (IS_DIRECTORY ${SEQAN_CONTRIB_PATH})
-		  set (CMAKE_FIND_ROOT_PATH ${SEQAN_CONTRIB_PATH} ${CMAKE_FIND_ROOT_PATH})
+		  set (CMAKE_PREFIX_PATH ${SEQAN_CONTRIB_PATH} ${CMAKE_PREFIX_PATH})
 		endif (IS_DIRECTORY ${SEQAN_CONTRIB_PATH})
 	  endif (IS_DIRECTORY ${SEQAN_CONTRIB_BASE})

-      message(STATUS "CMAKE_FIND_ROOT_PATH is \"${CMAKE_FIND_ROOT_PATH}\".")
+      message(STATUS "CMAKE_PREFIX_PATH is \"${CMAKE_PREFIX_PATH}\".")

       # Break out if contribs could be found.
       if (DEFINED SEQAN_CONTRIB_BASE)


[FIX] Fixing bug in CTD preparation.

[FIX] Fixing bug in CTD preparation.

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

--- util/cmake/SeqAnCtdSetup.cmake
+++ util/cmake/SeqAnCtdSetup.cmake
@@ -99,6 +99,7 @@

 # Add directory for CTD files.
 add_custom_target (target_ctd_mkdir
+                   COMMAND ${CMAKE_COMMAND} -E make_directory ${WORKFLOW_PLUGIN_DIR}
                    COMMAND ${CMAKE_COMMAND} -E make_directory ${CTD_PATH})

 # For each white-listed executable in SEQAN_CTD_EXECUTABLES, get its path and


use x64 test

use x64 test

--- FindwxWidgets.cmake
+++ FindwxWidgets.cmake
@@ -524,7 +524,8 @@
     elseif(CMAKE_CL_64)
       set(WX_LIB_DIR_PREFIX vc_x64)
     else()
-      set(WX_LIB_DIR_PREFIX vc)
+      # TODO: FIXME
+      set(WX_LIB_DIR_PREFIX vc_x64)
     endif()
     if(BUILD_SHARED_LIBS)
       find_path(wxWidgets_LIB_DIR


set var

set var

--- cmake/FindOpenBLAS.cmake
+++ cmake/FindOpenBLAS.cmake
@@ -1,97 +1,30 @@
-if(WIN32)
-    if(DEFINED ENV{MINGW_HOME})
-        set(MINGW_HOME ENV{MINGW_HOME})
-        else()
-          message("NO MINGW HOME DEFINED USING C:\\MinGW")
-        set(MINGW_HOME C:/MinGW)
-    endif()
+SET(Open_BLAS_INCLUDE_SEARCH_PATHS
+        /usr/include
+        /usr/include/openblas
+        /usr/include/openblas-base
+        /usr/local/include
+        /usr/local/include/openblas
+        /usr/local/include/openblas-base
+        /opt/OpenBLAS/include
+        $ENV{OpenBLAS_HOME}
+        $ENV{OpenBLAS_HOME}/include
+        )

-    if(DEFINED ENV{MSYS_HOME})
-        set(MSYS_HOME ENV{MSYS_HOME})
-    else()
-        message("NO MSYS HOME DEFINED USING ${MINGW_HOME}/msys")
-        set(MSYS_HOME ${MINGW_HOME}/msys)
-    endif()
-
-    if(DEFINED ENV{MSYS_HOME})
-        set(MSYS_HOME ENV{MSYS_HOME})
-    else()
-        message("NO MSYS HOME DEFINED USING ${MINGW_HOME}/msys")
-        set(MSYS_HOME ${MINGW_HOME}/msys)
-    endif()
-
-
-    if(DEFINED ENV{MSYS_VERSION})
-        set(MSYS_VERSION ENV{MSYS_VERSION})
-    else()
-        message("NO MSYS VERSION DEFINED USING 1.0")
-        set(MSYS_VERSION 1.0)
-    endif()
-
-
-    if(DEFINED ENV{MSYS_ROOT})
-        set(MSYS_ROOT ENV{MSYS_ROOT})
-    else()
-        message("NO MSYS ROOT DEFINED USING ${MSYS_HOME}/${MSYS_VERSION}")
-        set(MSYS_ROOT ${MSYS_HOME}/${MSYS_VERSION})
-    endif()
-    SET(Open_BLAS_INCLUDE_SEARCH_PATHS
-            ${MSYS_ROOT}/usr/include
-            ${MSYS_ROOT}/usr/include/openblas
-            ${MSYS_ROOT}/usr/include/openblas-base
-            ${MSYS_ROOT}/usr/local/include
-            ${MSYS_ROOT}/usr/local/include/openblas
-            ${MSYS_ROOT}/usr/local/include/openblas-base
-            ${MSYS_ROOT}/opt/OpenBLAS/include
-            ${MSYS_ROOT}$ENV{OpenBLAS_HOME}
-            ${MSYS_ROOT}$ENV{OpenBLAS_HOME}/include
-            )
-
-    SET(Open_BLAS_LIB_SEARCH_PATHS
-            ${MSYS_ROOT}/lib/
-            ${MSYS_ROOT}/lib/openblas-base
-            ${MSYS_ROOT}/lib64/
-            ${MSYS_ROOT}/usr/lib
-            ${MSYS_ROOT}/usr/lib/openblas-base
-            ${MSYS_ROOT}/usr/lib64
-            ${MSYS_ROOT}/usr/local/lib
-            ${MSYS_ROOT}/usr/local/lib64
-            ${MSYS_ROOT}/opt/OpenBLAS/lib
-            ${MSYS_ROOT}/$ENV{OpenBLAS}cd
-            ${MSYS_ROOT}/$ENV{OpenBLAS}/lib
-#           ${MSYS_ROOT}/$ENV{OpenBLAS_HOME}
-            ${MSYS_ROOT}/$ENV{OpenBLAS_HOME}/lib
-            )
-    else()
-    SET(Open_BLAS_INCLUDE_SEARCH_PATHS
-            /usr/include
-            /usr/include/openblas
-            /usr/include/openblas-base
-            /usr/local/include
-            /usr/local/include/openblas
-            /usr/local/include/openblas-base
-            /opt/OpenBLAS/include
-            $ENV{OpenBLAS_HOME}
-            $ENV{OpenBLAS_HOME}/include
-            )
-
-    SET(Open_BLAS_LIB_SEARCH_PATHS
-            /lib/
-            /lib/openblas-base
-            /lib64/
-            /usr/lib
-            /usr/lib/openblas-base
-            /usr/lib64
-            /usr/local/lib
-            /usr/local/lib64
-            /opt/OpenBLAS/lib
-            $ENV{OpenBLAS}cd
-            $ENV{OpenBLAS}/lib
-            $ENV{OpenBLAS_HOME}
-            $ENV{OpenBLAS_HOME}/lib
-            )
-endif()
-message("SEARCHING INCLUDE  ${Open_BLAS_INCLUDE_SEARCH_PATHS} and LIB ${Open_BLAS_LIB_SEARCH_PATHS}a")
+SET(Open_BLAS_LIB_SEARCH_PATHS
+        /lib/
+        /lib/openblas-base
+        /lib64/
+        /usr/lib
+        /usr/lib/openblas-base
+        /usr/lib64
+        /usr/local/lib
+        /usr/local/lib64
+        /opt/OpenBLAS/lib
+        $ENV{OpenBLAS}cd
+        $ENV{OpenBLAS}/lib
+        $ENV{OpenBLAS_HOME}
+        $ENV{OpenBLAS_HOME}/lib
+        )

 FIND_PATH(OpenBLAS_INCLUDE_DIR NAMES cblas.h PATHS ${Open_BLAS_INCLUDE_SEARCH_PATHS})
 FIND_LIBRARY(OpenBLAS_LIB NAMES openblas PATHS ${Open_BLAS_LIB_SEARCH_PATHS})
@@ -125,4 +58,4 @@
         OpenBLAS_INCLUDE_DIR
         OpenBLAS_LIB
         OpenBLAS
-)
+)


try harder to look for samtools headers

try harder to look for samtools headers

now checks in $SAMTOOLS_ROOT/include/{sam,bam}

--- cmake/FindSamtools.cmake
+++ cmake/FindSamtools.cmake
@@ -22,7 +22,7 @@
 find_path(Samtools_INCLUDE_DIR
     NAMES ${SAMTOOLS_ADDITIONAL_HEADERS} bam.h
     PATHS ${SAMTOOLS_SEARCH_DIRS}
-    PATH_SUFFIXES include include/samtools ${_samtools_ver_path}
+    PATH_SUFFIXES include include/sam include/bam include/samtools${_samtools_ver_path}
     HINTS ENV SAMTOOLS_ROOT
 )


Fix reference to old eth-cscs repo in comment. (#927)

Fixes #811.

--- cmake/GitSubmodule.cmake
+++ cmake/GitSubmodule.cmake
@@ -16,7 +16,7 @@
             "    git submodule init\n"
             "    git submodule update\n"
             "Or download submodules recursively when checking out:\n"
-            "    git clone --recursive https://github.com/eth-cscs/arbor.git\n"
+            "    git clone --recursive https://github.com/arbor-sim/arbor.git\n"
         )

         # if the repository was not available, and git failed, set AVAIL to false


cmake: workaround for dependencies resolver (bypass non-module deps w/o check)

--- cmake/OpenCVModule.cmake
+++ cmake/OpenCVModule.cmake
@@ -312,11 +312,16 @@
       set(__deps ${OPENCV_MODULE_${m}_REQ_DEPS} ${OPENCV_MODULE_${m}_PRIVATE_REQ_DEPS})
       while(__deps)
         ocv_list_pop_front(__deps d)
-        if(NOT (HAVE_${d} OR TARGET ${d} OR EXISTS ${d}))
-#          message(STATUS "Module ${m} disabled because ${d} dependency can't be resolved!")
-          __ocv_module_turn_off(${m})
-          set(has_changes ON)
-          break()
+        string(TOLOWER "${d}" upper_d)
+        if(NOT (HAVE_${d} OR HAVE_${upper_d} OR TARGET ${d} OR EXISTS ${d}))
+          if(d MATCHES "^opencv_") # TODO Remove this condition in the future and use HAVE_ variables only
+            message(STATUS "Module ${m} disabled because ${d} dependency can't be resolved!")
+            __ocv_module_turn_off(${m})
+            set(has_changes ON)
+            break()
+          else()
+            message(STATUS "Assume that non-module dependency is available: ${d} (for module ${m})")
+          endif()
         endif()
       endwhile()
     endforeach()


change default to git

change default to git

--- cmake/ctest_script.cmake
+++ cmake/ctest_script.cmake
@@ -207,7 +207,7 @@
 endif()

 # Update type (git, svn, wget or url)
-set(UPDATE_TYPE wget)
+set(UPDATE_TYPE git)

 # For continuous builds, number of seconds to stay alive
 set(test_runtime 43200) #12h by default


Cmake: Added inviwo-dev as search path when using external apps/modules such that the main directory does not need to be inviwo-dev.

--- cmake/globalmacros.cmake
+++ cmake/globalmacros.cmake
@@ -295,8 +295,9 @@
         list(LENGTH IVW_EXTERNAL_MODULES modlen)
         if(NOT ${modlen} EQUAL 0)
             set(paths "const std::string externalModulePaths_[] = {:")
-            set(first "0")
-            set(count 0)
+            set(first "1")
+            list(APPEND paths "\"${IVW_ROOT_DIR}/modules\":")
+            set(count 1)
             foreach(dir ${IVW_EXTERNAL_MODULES})
                 if(IS_DIRECTORY ${dir})
                     if(NOT ${first} EQUAL "0")


CTest: test "make install/fast"

CTest: test "make install/fast"

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

--- test.cmake
+++ test.cmake
@@ -374,6 +374,7 @@
    list(APPEND configure_options "-DTEST_OPERATOR_FAILURES=TRUE")
 endif()
 list(APPEND configure_options "-DUSE_CCACHE=ON")
+list(APPEND configure_options "-DCMAKE_INSTALL_PREFIX=${CTEST_BINARY_DIRECTORY}/installed")
 if(DEFINED target_architecture)
    list(APPEND configure_options "-DTARGET_ARCHITECTURE=${target_architecture}")
 endif()
@@ -490,6 +491,15 @@
                      endif()
                   endif()
                endif()
+               if(label STREQUAL "other")
+                  set(CTEST_BUILD_TARGET "install/fast")
+                  set(CTEST_BUILD_COMMAND "${CMAKE_MAKE_PROGRAM} ${MAKE_ARGS} ${CTEST_BUILD_TARGET}")
+                  ctest_build(
+                     BUILD "${CTEST_BINARY_DIRECTORY}"
+                     APPEND
+                     RETURN_VALUE res)
+                  ctest_submit(PARTS Build)
+               endif()
             endforeach()
          endif()
       endif()


cmake: add vulkan dep to microprofile properly

--- cmake/microprofile.cmake
+++ cmake/microprofile.cmake
@@ -29,9 +29,13 @@

 set_target_properties(${MICROPROFILE_BIN} PROPERTIES FOLDER External)

+find_package(Vulkan REQUIRED)
+
+target_link_libraries(${MICROPROFILE_BIN} PRIVATE Vulkan::Vulkan)
+
 # NOTE: microprofile links its own libvulkan, because there's no easy way to provide our own symbols
 if(UNIX)
-    target_link_libraries(${MICROPROFILE_BIN} PRIVATE pthread vulkan)
+    target_link_libraries(${MICROPROFILE_BIN} PRIVATE pthread)
 elseif(WIN32)
-    target_link_libraries(${MICROPROFILE_BIN} PRIVATE ws2_32 vulkan-1)
+    target_link_libraries(${MICROPROFILE_BIN} PRIVATE ws2_32)
 endif()


vcpkg: review fix

vcpkg: review fix

--- cmake/vcpkghelpers.cmake
+++ cmake/vcpkghelpers.cmake
@@ -26,6 +26,11 @@
 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 #################################################################################
+
+# Retrive the git sha of the VCPKG installation, once for later use in ivw_vcpkg_install
+if(VCPKG_TOOLCHAIN)
+    ivw_git_get_hash(${_VCPKG_ROOT_DIR} ivw_vcpkg_sha)
+endif()

 # A helper function to get to various vcpkg paths
 # If vcpkg is not used we just return empty strings
@@ -74,10 +79,6 @@
         set(${ARG_SHARE} "${_VCPKG_ROOT_DIR}/installed/${VCPKG_TARGET_TRIPLET}" PARENT_SCOPE)
     endif()
 endfunction()
-
-if(VCPKG_TOOLCHAIN)
-    ivw_git_get_hash(${_VCPKG_ROOT_DIR} ivw_vcpkg_sha)
-endif()

 # A helper function to install vcpkg libs. Will install dll/so, lib, pdb, stc. into the
 # correspnding folders by globing the vcpkg package folders.


disabled fast transcendentals as workaround for sincosf linking error

--- common/cmake/intel.cmake
+++ common/cmake/intel.cmake
@@ -34,6 +34,7 @@
   SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /MP")          # compile source files in parallel
   SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /GR")          # enable runtime type information (on by default)
   SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /Qvec-")       # disable auto vectorizer
+  SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /Qfast-transcendentals-") # disable fast transcendentals, prevents sin(x),cos(x) -> sincos(x) optimization
   IF (EMBREE_STACK_PROTECTOR)
     SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /GS")          # protects against return address overrides
   ELSE()


Add copyrights

Add copyrights

--- cmake/modules/hunter_boost_component_b2_args.cmake
+++ cmake/modules/hunter_boost_component_b2_args.cmake
@@ -1,4 +1,5 @@
 # Copyright (c) 2015, Aaditya Kalsi
+# Copyright (c) 2016, Ruslan Baratov
 # All rights reserved.

 cmake_minimum_required(VERSION 3.0)


[CMake] Fix Qt version discovery from osgQt.

--- cmake-module/osgqt.cmake
+++ cmake-module/osgqt.cmake
@@ -14,21 +14,26 @@
     ADD_REQUIRED_DEPENDENCY(${OSGQT_DEPENDENCY})

     IF(NOT DEFINED PROJECT_USE_QT4)
-      FILE(READ "${OPENSCENEGRAPH_OSGQT_INCLUDEDIR}/osgQt/Version"
-        osgqt_version_content
-        LIMIT 500)
-      STRING(FIND ${osgqt_version_content} "#define OSGQT_QT_VERSION 4" osgqt_qt_version4_idx)
-      STRING(FIND ${osgqt_version_content} "#define OSGQT_QT_VERSION 5" osgqt_qt_version5_idx)
-      IF(osgqt_qt_version4_idx EQUAL -1 AND osgqt_qt_version5_idx EQUAL -1)
-      ELSEIF(osgqt_qt_version4_idx EQUAL -1 )
-        # QT5 only
-        SET(PROJECT_USE_QT4 FALSE CACHE BOOL "Use Qt4 instead of Qt5")
-      ELSEIF(osgqt_qt_version5_idx EQUAL -1 )
+      IF(EXISTS "${OPENSCENEGRAPH_OSGQT_INCLUDEDIR}/osgQt/Version")
+        FILE(READ "${OPENSCENEGRAPH_OSGQT_INCLUDEDIR}/osgQt/Version"
+          osgqt_version_content
+          LIMIT 500)
+        STRING(FIND ${osgqt_version_content} "#define OSGQT_QT_VERSION 4" osgqt_qt_version4_idx)
+        STRING(FIND ${osgqt_version_content} "#define OSGQT_QT_VERSION 5" osgqt_qt_version5_idx)
+        IF(osgqt_qt_version4_idx EQUAL -1 AND osgqt_qt_version5_idx EQUAL -1)
+        ELSEIF(osgqt_qt_version4_idx EQUAL -1 )
+          # QT5 only
+          SET(PROJECT_USE_QT4 FALSE CACHE BOOL "Use Qt4 instead of Qt5")
+        ELSEIF(osgqt_qt_version5_idx EQUAL -1 )
+          # QT4 only
+          SET(PROJECT_USE_QT4 TRUE CACHE BOOL "Use Qt4 instead of Qt5")
+        ELSE()
+          # Both found.
+          MESSAGE(FATAL_ERROR "Could not compute Qt version. Please set PROJECT_USE_QT4 variable manually")
+        ENDIF()
+      ELSE()
         # QT4 only
         SET(PROJECT_USE_QT4 TRUE CACHE BOOL "Use Qt4 instead of Qt5")
-      ELSE()
-        # Both found.
-        MESSAGE(FATAL_ERROR "Could not compute Qt version. Please set PROJECT_USE_QT4 variable manually")
       ENDIF()
     ENDIF(NOT DEFINED PROJECT_USE_QT4)
   ENDIF()


make AWSSDK_FOUND non cacahable

make AWSSDK_FOUND non cacahable

--- cmake/AWSSDKConfig.cmake
+++ cmake/AWSSDKConfig.cmake
@@ -128,7 +128,7 @@

 set(AWSSDK_PLATFORM_PREFIX "${TEMP_PLATFORM_PREFIX}")

-set(AWSSDK_FOUND TRUE CACHE INTERNAL "Flag to determine if AWSSDK has been found")
+set(AWSSDK_FOUND TRUE)
 set(AWSSDK_INCLUDE_DIR "${AWSSDK_ROOT_DIR}/${AWSSDK_INSTALL_INCLUDEDIR}")
 set(AWSSDK_CMAKE_DIR "${AWSSDK_ROOT_DIR}/${AWSSDK_INSTALL_LIBDIR}/cmake")
 set(AWSSDK_LIB_DIR "${AWSSDK_ROOT_DIR}/${AWSSDK_INSTALL_LIBDIR}/${AWSSDK_PLATFORM_PREFIX}")


Quiet when find Eigen3 library.

Quiet when find Eigen3 library.

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -1,4 +1,4 @@
-find_package(Eigen3)
+find_package(Eigen3 QUIET)

 if(EIGEN3_FOUND)
   message(STATUS "Found Eigen3 : " ${EIGEN3_INCLUDE_DIRS})


bugfix in cmake where hipcub was not found

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -107,6 +107,7 @@
 # rocPRIM package
 if(HIP_PLATFORM STREQUAL "hcc")
   find_package(ROCPRIM QUIET CONFIG PATHS /opt/rocm)
+  find_package(HIPCUB QUIET CONFIG PATHS /opt/rocm)
   if(NOT ROCPRIM_FOUND)
     set(ROCPRIM_ROOT ${CMAKE_CURRENT_BINARY_DIR}/rocPRIM CACHE PATH "")
     message(STATUS "Downloading rocPRIM.")


add a bunch of additional resolvers

add a bunch of additional resolvers

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -76,7 +76,6 @@
 	timeofday
 	simpleini
 	line
-	resolver_fm_uhb_xb  # handy for tests
 	validation
 	regexstore
 	)
@@ -93,6 +92,16 @@
 	set (PLUGINS_FORCE FORCE)
 endif ()

+#
+# some are handy for tests,
+# other are for standard-compliance
+#
+set (PLUGINS_LIST_RESOLVER
+	resolver_fm_b_b
+	resolver_fm_hb_b
+	resolver_fm_uhb_xb
+	resolver_fm_xb_xb
+	)

 #
 # plugins with dependencies
@@ -114,6 +123,7 @@
 		${PLUGINS_LIST_COMPILE}
 		${PLUGINS_LIST_NODEP}
 		${PLUGINS_LIST_POSIX}
+		${PLUGINS_LIST_RESOLVER}
 		${PLUGINS_LIST_DEP}
 		)
 	set (PLUGINS_FORCE FORCE)


#1902 added workaround for CMake 2.8.2 bug

--- cmake/OpenCVIOLibs.cmake
+++ cmake/OpenCVIOLibs.cmake
@@ -9,7 +9,11 @@
   unset_all(ZLIB_FOUND)
 else()
   include(FindZLIB)
-  if(ZLIB_FOUND AND NOT ZLIB_VERSION_STRING)
+  if(ZLIB_FOUND)
+    if(ZLIB_VERSION_STRING)
+      #cmake 2.8.2 bug - it fails to determine zlib version
+      unset(ZLIB_VERSION_STRING CACHE)
+    endif()
     ocv_parse_header2(ZLIB "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_VERSION "")
   endif()
   if(ZLIB_FOUND AND ANDROID)


cmake: fix export issue

cmake: fix export issue

opencv_ts is static internal library and in case of exporting
it requires all static dependencies (include HAL files)

--- cmake/OpenCVModule.cmake
+++ cmake/OpenCVModule.cmake
@@ -859,7 +859,8 @@
   endif()

   get_target_property(_target_type ${the_module} TYPE)
-  if("${_target_type}" STREQUAL "SHARED_LIBRARY" OR (NOT BUILD_SHARED_LIBS OR NOT INSTALL_CREATE_DISTRIB))
+  if(OPENCV_MODULE_${the_module}_CLASS STREQUAL "PUBLIC" AND
+      ("${_target_type}" STREQUAL "SHARED_LIBRARY" OR (NOT BUILD_SHARED_LIBS OR NOT INSTALL_CREATE_DISTRIB)))
     ocv_install_target(${the_module} EXPORT OpenCVModules OPTIONAL
       RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT libs
       LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT libs NAMELINK_SKIP


Issue with excluding no files

Issue with excluding no files

--- scripts/TargetCopyFiles.cmake
+++ scripts/TargetCopyFiles.cmake
@@ -104,7 +104,9 @@
     file(GLOB_RECURSE in_files RELATIVE "${dircopy_RELATIVE}" ${in_globs})
     if(NOT "${exclude_globs}" STREQUAL "")
         file(GLOB_RECURSE exclude_files RELATIVE "${dircopy_RELATIVE}" ${exclude_globs})
-        list(REMOVE_ITEM in_files ${exclude_files})
+        if(NOT "${excluded_files}" STREQUAL "")
+          list(REMOVE_ITEM in_files ${exclude_files})
+        endif()
     endif()

     # And do the copying


Graph Control 5.0.0-rc1 Release Candidate 1

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

--- version.cmake
+++ version.cmake
@@ -2,10 +2,10 @@
 ## Version Information
 ###
 set ( HPCC_PROJECT "community" )
-set ( HPCC_MAJOR 4 )
-set ( HPCC_MINOR 3 )
+set ( HPCC_MAJOR 5 )
+set ( HPCC_MINOR 0 )
 set ( HPCC_POINT 0 )
-set ( HPCC_MATURITY "trunk" )
+set ( HPCC_MATURITY "rc" )
 set ( HPCC_SEQUENCE 1 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )


Split off 7.10.x

Split off 7.10.x

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

--- version.cmake
+++ version.cmake
@@ -4,7 +4,7 @@
 set ( HPCC_NAME "Nagios Monitoring" )
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
-set ( HPCC_MINOR 9 )
+set ( HPCC_MINOR 11 )
 set ( HPCC_POINT 0 )
 set ( HPCC_MATURITY "trunk" )
 set ( HPCC_SEQUENCE 0 )


COMP: HeaderTest configuration CMake version check.

The CMake check to regenerate the HeaderTests used the
  "string( MD5" ...
CMake command, which is only available in CMake 2.8.7 and later.

So, we add a CMake version check.

Change-Id: I55717277a690bc95841d2c00ff86f58101850ff5

--- CMake/ITKModuleHeaderTest.cmake
+++ CMake/ITKModuleHeaderTest.cmake
@@ -47,21 +47,23 @@

     # We check to see if the headers are changed.  If so, remove the header test
     # source files so they are regenerated.
-    set( _headers_list_md5 "${${_name}_BINARY_DIR}/test/CMakeFiles/HeadersList.md5" )
-    list( SORT _h_files )
-    string( MD5 _new_md5 "${_h_files}" )
-    set( _regenerate_sources FALSE )
-    if( NOT EXISTS "${_headers_list_md5}" )
-      set( _regenerate_sources TRUE )
-    else()
-      file( READ "${_headers_list_md5}" _old_md5 )
-      if( NOT ("${_old_md5}" STREQUAL "${_new_md5}"))
+    if( ${CMAKE_VERSION} VERSION_GREATER 2.8.6 ) # for string( MD5
+      set( _headers_list_md5 "${${_name}_BINARY_DIR}/test/CMakeFiles/HeadersList.md5" )
+      list( SORT _h_files )
+      string( MD5 _new_md5 "${_h_files}" )
+      set( _regenerate_sources FALSE )
+      if( NOT EXISTS "${_headers_list_md5}" )
         set( _regenerate_sources TRUE )
+      else()
+        file( READ "${_headers_list_md5}" _old_md5 )
+        if( NOT ("${_old_md5}" STREQUAL "${_new_md5}"))
+          set( _regenerate_sources TRUE )
+        endif()
       endif()
-    endif()
-    file( WRITE "${_headers_list_md5}" "${_new_md5}" )
-    if( ${_regenerate_sources} )
-      file( REMOVE ${_outputs} )
+      file( WRITE "${_headers_list_md5}" "${_new_md5}" )
+      if( ${_regenerate_sources} )
+        file( REMOVE ${_outputs} )
+      endif()
     endif()

     set( _test_num 1 )


Apparently the tuple directory is needed to by some of the boost threading headers.  Don't exclude it when installing dependencies.

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -180,7 +180,6 @@
 		PATTERN "system" EXCLUDE
 		PATTERN "test" EXCLUDE
 		PATTERN "tr1" EXCLUDE
-		PATTERN "tuple" EXCLUDE
 		PATTERN "typeof" EXCLUDE
 		PATTERN "units" EXCLUDE
 		PATTERN "unordered" EXCLUDE


Add condition: Build MatchPoint only when needed/required.

--- CMakeExternals/MatchPoint.cmake
+++ CMakeExternals/MatchPoint.cmake
@@ -1,61 +1,62 @@
 #-----------------------------------------------------------------------------
 # MatchPoint
 #-----------------------------------------------------------------------------
+if(MITK_USE_MatchPoint)

-set(MatchPoint_SOURCE_DIR "" CACHE PATH "Location of the MatchPoint source directory")
-mark_as_advanced(MatchPoint_SOURCE_DIR)
+  set(MatchPoint_SOURCE_DIR "" CACHE PATH "Location of the MatchPoint source directory")
+  mark_as_advanced(MatchPoint_SOURCE_DIR)

-# Sanity checks
-if(DEFINED MatchPoint_DIR AND NOT EXISTS ${MatchPoint_DIR})
-  message(FATAL_ERROR "MatchPoint_DIR variable is defined but corresponds to non-existing directory")
-endif()
-
-if(NOT MatchPoint_DIR AND MatchPoint_SOURCE_DIR AND NOT EXISTS ${MatchPoint_SOURCE_DIR})
-  message(FATAL_ERROR "MatchPoint_SOURCE_DIR variable is defined but corresponds to non-existing directory")
-endif()
-
-set(proj MatchPoint)
-set(proj_DEPENDENCIES ITK)
-
-set(MatchPoint_DEPENDS ${proj})
-
-if(NOT MatchPoint_DIR)
-
-  if(MatchPoint_SOURCE_DIR)
-    set(download_step SOURCE_DIR ${MatchPoint_SOURCE_DIR})
-  else()
-    set(download_step
-        URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MatchPoint_rev1481.tar.gz
-        URL_MD5 82b9b1bb3f909f2e00397e285ce8c981
-       )
+  # Sanity checks
+  if(DEFINED MatchPoint_DIR AND NOT EXISTS ${MatchPoint_DIR})
+    message(FATAL_ERROR "MatchPoint_DIR variable is defined but corresponds to non-existing directory")
   endif()

-  ExternalProject_Add(${proj}
-     ${download_step}
-     # INSTALL_COMMAND "${CMAKE_COMMAND} -P cmake_install.cmake"
-     CMAKE_GENERATOR ${gen}
-     CMAKE_ARGS
-       ${ep_common_args}
-       ${additional_cmake_args}
-       -DBUILD_TESTING:BOOL=OFF
-       -DITK_DIR:PATH=${ITK_DIR} #/src/ITK-build
-       -DMAP_USE_SYSTEM_GDCM:BOOL=ON
-       -DMAP_DISABLE_ITK_IO_FACTORY_AUTO_REGISTER:BOOL=ON
-       -DMAP_WRAP_Plastimatch:BOOL=ON
-       -DGDCM_DIR:PATH=${GDCM_DIR}
-     CMAKE_CACHE_ARGS
-       ${ep_common_cache_args}
-     CMAKE_CACHE_DEFAULT_ARGS
-       ${ep_common_cache_default_args}
-     DEPENDS ${proj_DEPENDENCIES}
-    )
+  if(NOT MatchPoint_DIR AND MatchPoint_SOURCE_DIR AND NOT EXISTS ${MatchPoint_SOURCE_DIR})
+    message(FATAL_ERROR "MatchPoint_SOURCE_DIR variable is defined but corresponds to non-existing directory")
+  endif()

-  ExternalProject_Get_Property(${proj} binary_dir)
-  set(${proj}_DIR ${binary_dir})
-  mitkFunctionInstallExternalCMakeProject(${proj})
+  set(proj MatchPoint)
+  set(proj_DEPENDENCIES ITK)

-else()
+  set(MatchPoint_DEPENDS ${proj})

-  mitkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}")
+  if(NOT MatchPoint_DIR)

-endif()
+    if(MatchPoint_SOURCE_DIR)
+      set(download_step SOURCE_DIR ${MatchPoint_SOURCE_DIR})
+    else()
+      set(download_step
+          URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MatchPoint_rev1481.tar.gz
+          URL_MD5 82b9b1bb3f909f2e00397e285ce8c981
+         )
+    endif()
+
+    ExternalProject_Add(${proj}
+       ${download_step}
+       # INSTALL_COMMAND "${CMAKE_COMMAND} -P cmake_install.cmake"
+       CMAKE_GENERATOR ${gen}
+       CMAKE_ARGS
+         ${ep_common_args}
+         ${additional_cmake_args}
+         -DBUILD_TESTING:BOOL=OFF
+         -DITK_DIR:PATH=${ITK_DIR} #/src/ITK-build
+         -DMAP_USE_SYSTEM_GDCM:BOOL=ON
+         -DMAP_DISABLE_ITK_IO_FACTORY_AUTO_REGISTER:BOOL=ON
+         -DMAP_WRAP_Plastimatch:BOOL=ON
+         -DGDCM_DIR:PATH=${GDCM_DIR}
+       CMAKE_CACHE_ARGS
+         ${ep_common_cache_args}
+       CMAKE_CACHE_DEFAULT_ARGS
+         ${ep_common_cache_default_args}
+       DEPENDS ${proj_DEPENDENCIES}
+      )
+
+    ExternalProject_Get_Property(${proj} binary_dir)
+    set(${proj}_DIR ${binary_dir})
+    mitkFunctionInstallExternalCMakeProject(${proj})
+
+  else()
+    mitkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}")
+  endif()
+
+endif(MITK_USE_MatchPoint)


ENH: midas_add_test macro should support two files with the same content but a different name.

SVN-Revision: 3270

--- Application/CMakeScript/MIDAS.cmake
+++ Application/CMakeScript/MIDAS.cmake
@@ -98,7 +98,7 @@
       file(READ "${MIDAS_KEY_DIR}/${keyFile}" checksum)

       # Write the test script file for downloading
-      file(WRITE "${MIDAS_DATA_DIR}/MIDAS_FetchScripts/download_${checksum}.cmake"
+      file(WRITE "${MIDAS_DATA_DIR}/MIDAS_FetchScripts/fetch_${checksum}_${base_filename}.cmake"
   "message(STATUS \"Data is here: ${MIDAS_REST_URL}/midas.bitstream.by.hash?hash=${checksum}&algorithm=${hash_alg}\")
 if(NOT EXISTS \"${MIDAS_DATA_DIR}/MIDAS_Hashes/${checksum}\")
   file(DOWNLOAD ${MIDAS_REST_URL}/midas.bitstream.by.hash?hash=${checksum}&algorithm=${hash_alg} \"${MIDAS_DATA_DIR}/MIDAS_Hashes/${testName}_${checksum}\" ${MIDAS_DOWNLOAD_TIMEOUT_STR} STATUS status)
@@ -133,7 +133,7 @@
 endif(WIN32)
 ")

-      list(APPEND downloadScripts "${MIDAS_DATA_DIR}/MIDAS_FetchScripts/download_${checksum}.cmake")
+      list(APPEND downloadScripts "${MIDAS_DATA_DIR}/MIDAS_FetchScripts/fetch_${checksum}_${base_filename}.cmake")
       string(REGEX REPLACE ${toReplace} "${MIDAS_DATA_DIR}/${base_file}" newArg "${arg}")
       list(APPEND testArgs ${newArg})
     else(arg MATCHES "MIDAS{[^}]*}")


Increase timeout for ProjectTemplate package test

--- CMake/mitkTestProjectTemplate.cmake
+++ CMake/mitkTestProjectTemplate.cmake
@@ -50,14 +50,14 @@
                COMMAND ${CMAKE_COMMAND} --build ${MITK-ProjectTemplate_BINARY_DIR}/AwesomeProject-build --config Release --target package)
       set_tests_properties(mitkProjectTemplatePackageTest PROPERTIES
                            DEPENDS mitkProjectTemplateBuildTest-Release
-                           TIMEOUT 1200
+                           TIMEOUT 1800
                            LABELS "MITK;BlueBerry")
     elseif(CMAKE_BUILD_TYPE)
       add_test(mitkProjectTemplatePackageTest
                ${CMAKE_COMMAND} --build ${MITK-ProjectTemplate_BINARY_DIR}/AwesomeProject-build --config ${CMAKE_BUILD_TYPE} --target package)
       set_tests_properties(mitkProjectTemplatePackageTest PROPERTIES
                            DEPENDS mitkProjectTemplateBuildTest-${CMAKE_BUILD_TYPE}
-                           TIMEOUT 1200
+                           TIMEOUT 1800
                            LABELS "MITK;BlueBerry")
     endif()


Add additional search paths for ceres

Add additional search paths for ceres

--- CMakeModules/FindCERES_SOLVER.cmake
+++ CMakeModules/FindCERES_SOLVER.cmake
@@ -16,20 +16,20 @@
   SET(CERES_ROOT_DIR $ENV{CERES_ROOT_DIR})
 ENDIF()

-SET(_ceres_SEARCH_DIRS
+Set(CERES_SEARCH_DIRS
   ${CERES_ROOT_DIR}
-  /usr/local
-  /sw # Fink
-  /opt/local # DarwinPorts
-  /opt/csw # Blastwave
-  /opt/lib/ceres
-)
+  /usr/local/
+  /usr/
+  /usr/local/homebrew/ # Mac OS X
+  /opt/local/var/macports/software # Mac OS X.
+  /opt/local/
+  )

 FIND_PATH(CERES_INCLUDE_DIR
   NAMES
     ceres/ceres.h
   HINTS
-    ${_ceres_SEARCH_DIRS}
+    ${CERES_SEARCH_DIRS}
   PATH_SUFFIXES
     include
 )
@@ -38,7 +38,7 @@
   NAMES
     ceres
   HINTS
-    ${_ceres_SEARCH_DIRS}
+    ${CERES_SEARCH_DIRS}
   PATH_SUFFIXES
     lib64 lib
   )


Cmake funcitons to read info from libtool .la files

--- CMakeModules/FlusspferdPlugin.cmake
+++ CMakeModules/FlusspferdPlugin.cmake
@@ -96,7 +96,7 @@
 # From http://www.cmake.org/Wiki/CMakeMacroParseArguments
 MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
   SET(DEFAULT_ARGS)
-  FOREACH(arg_name ${arg_names})
+  FOREACH(arg_name ${arg_names})
     SET(${prefix}_${arg_name})
   ENDFOREACH(arg_name)
   FOREACH(option ${option_names})
@@ -105,16 +105,16 @@

   SET(current_arg_name DEFAULT_ARGS)
   SET(current_arg_list)
-  FOREACH(arg ${ARGN})
-    SET(larg_names ${arg_names})
-    LIST(FIND larg_names "${arg}" is_arg_name)
+  FOREACH(arg ${ARGN})
+    SET(larg_names ${arg_names})
+    LIST(FIND larg_names "${arg}" is_arg_name)
     IF (is_arg_name GREATER -1)
       SET(${prefix}_${current_arg_name} ${current_arg_list})
       SET(current_arg_name ${arg})
       SET(current_arg_list)
     ELSE (is_arg_name GREATER -1)
-      SET(loption_names ${option_names})
-      LIST(FIND loption_names "${arg}" is_option)
+      SET(loption_names ${option_names})
+      LIST(FIND loption_names "${arg}" is_option)
       IF (is_option GREATER -1)
 	     SET(${prefix}_${arg} TRUE)
       ELSE (is_option GREATER -1)
@@ -125,3 +125,76 @@
   SET(${prefix}_${current_arg_name} ${current_arg_list})
 ENDMACRO(PARSE_ARGUMENTS)

+# Read something out of a libtool .la file.
+#
+# read_libtool("libfoo.la", "dependency_libs", FOO)
+#
+# will set FOO_FOUND to FOO_FOUND-NOTFOUND if can't find the file or the field.
+#
+# You can call this function with LAFIle being a .a or a .dylib/.so and the
+# extension will be changed to .la before reading the file.
+#
+function(read_libtool LAFILE FIELD OUTPUT)
+
+  get_filename_component(ext "${LAFILE}" EXT)
+  #message("ext ${ext}")
+  if (ext STREQUAL ${CMAKE_SHARED_MODULE_SUFFIX} OR ext STREQUAL ".a")
+    get_filename_component(path "${LAFILE}" PATH)
+    get_filename_component(namewe "${LAFILE}" NAME_WE)
+    set(LAFILE "${path}/${namewe}.la")
+  endif()
+
+  mark_as_advanced(${OUTPUT})
+
+  if(EXISTS "${LAFILE}")
+    file(STRINGS "${LAFILE}" FIELD_VALUE REGEX "^${FIELD}='(.*)'$")
+    #message("FIELD_VALUE: ${FIELD_VALUE}")
+    if(DEFINED FIELD_VALUE)
+      STRING(REGEX REPLACE "^${FIELD}='(.*)'$" "\\1" FIELD_VALUE "${FIELD_VALUE}")
+      STRING(STRIP FIELD_VALUE "${FIELD_VALUE}")
+      #message("FIELD_VALUE: ${FIELD_VALUE}")
+      #message("OUTPUT: ${OUTPUT}")
+      #message("${OUTPUT}: ${${OUTPUT}}")
+
+      separate_compiler_args(${OUTPUT} "${FIELD_VALUE}" "PARENT_SCOPE")
+      #SET(${OUTPUT} "${${OUTPUT}}" PARENT_SCOPE)
+      #mark_as_advanced(${OUTPUT})
+      return()
+    endif()
+  endif()
+
+  set(${OUTPUT}_FOUND ${OUTPUT}_FOUND-NOTFOUND)
+  #message("OUTPUT: ${OUTPUT} ${${OUTPUT}}")
+endfunction()
+
+# Split a string like "-L/usr/local/lib -lfoo" into "${NAME}_LIBRARIES" and "${NAME}_LIBDIR
+macro(separate_compiler_args NAME INPUT _parent_scope)
+  set(_separate_compiler_args_in "${INPUT}")
+  separate_arguments(_separate_compiler_args_in)
+
+  foreach(str ${_separate_compiler_args_in})
+    #message("str: " ${str})
+    if(str MATCHES "^-L")
+      _separate_compiler_args_type("^-L" "${str}" ${NAME}_LIBDIR ${_parent_scope})
+    elseif(str MATCHES "^-l")
+      _separate_compiler_args_type("^-l" "${str}" ${NAME}_LIBRARIES ${_parent_scope})
+    elseif(str MATCHES "^-I")
+      _separate_compiler_args_type("^-I" "${str}" ${NAME}_INCLUDEDIR ${_parent_scope})
+    endif()
+  endforeach()
+
+
+  set(_separate_compiler_args_tmp "" CACHE INTERNAL "")
+endmacro()
+
+macro(_separate_compiler_args_type _regex _input _output _parent_scope)
+  string(REGEX REPLACE "${_regex}" "" _separate_compiler_args_tmp "${_input}")
+  list(APPEND "${_output}" ${_separate_compiler_args_tmp})
+
+  #message("_separate_compiler_args_type: ${_output} -> ${_separate_compiler_args_tmp}")
+
+  if(NOT ${_parent_scope} STREQUAL "")
+    #message("setting ${_output} in PARENT_SCOPE")
+    set(${_output} "${${_output}}" PARENT_SCOPE)
+  endif()
+endmacro()


Fix library dependencies

Fix library dependencies

--- qt/CommonAPIQtCodeGenConfig.cmake
+++ qt/CommonAPIQtCodeGenConfig.cmake
@@ -95,13 +95,16 @@
 	qt5_use_modules(${PLUGIN_LIBRARY_NAME} Qml)
 	qt5_use_modules(${PLUGIN_LIBRARY_NAME} Script)

+	# Make sure the linker does NOT remove the dependencies when no symbol is directly needed
+    #	set_target_properties(${PLUGIN_LIBRARY_NAME} PROPERTIES LINK_FLAGS "-Wl,--no-as-needed")
+#	TARGET_LINK_LIBRARIES( ${PLUGIN_LIBRARY_NAME})
+
 	TARGET_LINK_LIBRARIES( ${PLUGIN_LIBRARY_NAME}
+        "-Wl,--no-as-needed"
 		${COMMON_API_PROXY_LIBRARIES}
 		${COMMON_API_QT_LIBRARIES}
 	)

-	# Make sure the linker does NOT remove the dependencies when no symbol is directly needed
-	set_target_properties(${PLUGIN_LIBRARY_NAME} PROPERTIES LINK_FLAGS "-Wl,--no-as-needed")

 	install(TARGETS ${PLUGIN_LIBRARY_NAME} DESTINATION ${QT_MODULES_LOCATION}/${NAMESPACE_PATH})
 	install(FILES ${RESOURCE_FILES} DESTINATION ${QT_MODULES_LOCATION}/${NAMESPACE_PATH})


cmake: HASBFD option

cmake: HASBFD option

--- CMakeOlxCommon.cmake
+++ CMakeOlxCommon.cmake
@@ -33,6 +33,7 @@
 OPTION(PYTHON_DED_EMBEDDED "Python embedded in dedicated server"  No)
 OPTION(OPTIM_PROJECTILES "Enable optimisations for projectiles" Yes)
 OPTION(MEMSTATS "Enable memory statistics and debugging" No)
+OPTION(HASBFD "Use libbfd for extended stack traces" Yes)
 OPTION(BREAKPAD "Google Breakpad support" No)
 OPTION(LINENOISE "builtin Linenose support (readline/libedit replacement)" Yes)
 OPTION(DISABLE_JOYSTICK "Disable joystick support" No)
@@ -297,6 +298,11 @@
 IF(G15)
 	ADD_DEFINITIONS("-DWITH_G15")
 ENDIF(G15)
+
+IF(HASBFD)
+	ADD_DEFINITIONS("-DHASBFD")
+	SET(LIBS ${LIBS} bfd)
+ENDIF(HASBFD)

 IF(BOOST_LINK_STATIC)


Improved cpplint

Improved cpplint

--- cmake/ExtraUtils.cmake
+++ cmake/ExtraUtils.cmake
@@ -81,7 +81,8 @@
                 "--filter=${PR_CPPLINT_STYLE}"
                 "--counting=detailed"
                 "--extensions=cpp,h,inl"
-                "--headers=h,inl")
+                "--headers=h,inl"
+                "--quiet")
         endif()
     endif()
 endif()
@@ -99,11 +100,18 @@
         if(CPPCHECK_EXECUTABLE)
             MESSAGE(STATUS "Using cppcheck ${CPPCHECK_EXECUTABLE}")
             if(WIN32)
-                set(ARCH_ARGS "-DWIN32;-D_MSC_VER")
+                set(ARCH_ARGS "-DWIN32" "-D_MSC_VER")
             else()
-                set(ARCH_ARGS "-Dlinux;-D__GNUC__")
+                set(ARCH_ARGS "-Dlinux" "-D__GNUC__")
             endif()
-            set(CMAKE_CXX_CPPCHECK "${CPPCHECK_EXECUTABLE};${ARCH_ARGS};--suppress=preprocessorErrorDirective")
+            set(CMAKE_CXX_CPPCHECK "${CPPCHECK_EXECUTABLE}" ${ARCH_ARGS}
+                "--quiet"
+                "--enable=warning,style,performance,portability,unusedFunction"
+                "--suppress=preprocessorErrorDirective"
+                "--library=std"
+                "--library=qt"
+                #"--library=boost"
+                )
         endif()
     endif()
 endif()


Allow alternative name for libzip DLL

Allow alternative name for libzip DLL

--- cmake/FindLIBZIP.cmake
+++ cmake/FindLIBZIP.cmake
@@ -40,7 +40,7 @@
 mark_as_advanced (LIBZIP_INCLUDE_DIRS)

 if (WIN32)
-    find_file (LIBZIP_DLL "zip.dll"
+    find_file (LIBZIP_DLL NAMES "zip.dll" "libzip.dll"
         ${_LIBZIP_hints}
         PATHS ${LIBZIP_DIR} $ENV{LIBZIP_DIR}
         PATH_SUFFIXES "bin" "lib"


Fix detection of Qt5.

Fix detection of Qt5.

--- cmake/modules/qt.cmake
+++ cmake/modules/qt.cmake
@@ -127,7 +127,7 @@
       string(TOUPPER ${Qt5_library_name} macro_core_name)
       # Set required macros so headers will be found.
       set(pc_qt_COMPILE_FLAGS "${pc_qt_COMPILE_FLAGS} -DQT_${macro_core_name}_LIB")
-      find_file(${Qt5_library_name}_header_directory Qt${Qt5_library_name})
+      find_file(${Qt5_library_name}_header_directory Qt${Qt5_library_name} HINTS ${Qt5${Qt5_library_name}_INCLUDE_DIRS})
       if(${Qt5_library_name}_header_directory)
 	if(${Qt5_library_name} STREQUAL "Core")
 	  get_filename_component(parent_directory ${${Qt5_library_name}_header_directory} DIRECTORY)
@@ -136,19 +136,13 @@
 	set(pc_qt_COMPILE_FLAGS "${pc_qt_COMPILE_FLAGS} -I${${Qt5_library_name}_header_directory}")
       else(${Qt5_library_name}_header_directory)
 	message(STATUS "${Qt5_library_name}_header_directory = ${${Qt5_library_name}_header_directory}")
-	message(FATAL_ERROR "${Qt${Qt5_library_name}} header_directory not found.")
+	message(FATAL_ERROR "${Qt5_library_name} header_directory not found.")
       endif(${Qt5_library_name}_header_directory)
     endforeach(Qt5_library_name ${Qt5_library_name_list})

     set(Qt5_library_fullpath_list)
     foreach(Qt5_library_name ${Qt5_library_name_list})
-      find_library(Qt5${Qt5_library_name}_fullpath Qt5${Qt5_library_name})
-      if(Qt5${Qt5_library_name}_fullpath)
-	list(APPEND Qt5_library_fullpath_list ${Qt5${Qt5_library_name}_fullpath})
-      else(Qt5${Qt5_library_name}_fullpath)
-	message(STATUS "Qt5${Qt5_library_name}_fullpath = ${Qt5${Qt5_library_name}_fullpath}")
-	message(FATAL_ERROR "Qt5${Qt5_library_name} library not found.")
-      endif(Qt5${Qt5_library_name}_fullpath)
+      list(APPEND Qt5_library_fullpath_list ${Qt5${Qt5_library_name}_LIBRARIES})
     endforeach(Qt5_library_name ${Qt5_library_name_list})

     pkg_config_link_flags(Qt5_library_LINK_FLAGS "${Qt5_library_fullpath_list}")


generate CTest and dart config to avoid warnings (#987)

--- cmake/test/tests.cmake
+++ cmake/test/tests.cmake
@@ -49,6 +49,17 @@
   if(NOT ROSBUILD_init_called)
     message(STATUS "Call enable_testing()")
     enable_testing()
+    if(DEFINED CATKIN_ENABLE_TESTING)
+      # configure CTest not to truncate the dashboard summary
+      file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake"
+        "set(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 0)\n"
+        "set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 0)\n")
+      # create dart configuration from template
+      site_name(SITE)
+      configure_file(
+        ${CMAKE_ROOT}/Modules/DartConfiguration.tcl.in
+        ${PROJECT_BINARY_DIR}/CTestConfiguration.ini)
+    endif()
   else()
     message(STATUS "Skip enable_testing() for dry packages")
   endif()


CommonPackage: fix version with empty args

--- CommonPackage.cmake
+++ CommonPackage.cmake
@@ -1,10 +1,10 @@
 # Copyright (c) 2014 Stefan.Eilemann@epfl.ch

-# Provides common_package(Name args) which improves find_package First
-# invokes find_package with all the given arguments, and then falls
-# back to using pkg_config if available. The pkg_config path does only
-# implement the version, REQUIRED and QUIET find_package arguments
-# (e.g. no COMPONENTS)
+# Provides common_package(Name args) which improves find_package.
+# First invokes find_package with all the given arguments, and then
+# falls back to using pkg_config if available. The pkg_config path
+# does only implement the version, REQUIRED and QUIET find_package
+# arguments (e.g. no COMPONENTS)

 find_package(PkgConfig)
 set(ENV{PKG_CONFIG_PATH}
@@ -13,6 +13,7 @@
 macro(COMMON_PACKAGE Name)
   string(TOUPPER ${Name} COMMON_PACKAGE_NAME)
   set(COMMON_PACKAGE_ARGS ${ARGN}) # ARGN is not a list. make one.
+  set(COMMON_PACKAGE_VERSION)

   if(COMMON_PACKAGE_ARGS)
     list(GET COMMON_PACKAGE_ARGS 0 COMMON_PACKAGE_VERSION)
@@ -27,7 +28,7 @@
   if(COMMON_PACKAGE_QUIET_POS EQUAL -1)
     set(COMMON_PACKAGE_QUIET)
   else()
-     set(COMMON_PACKAGE_QUIET "QUIET")
+    set(COMMON_PACKAGE_QUIET "QUIET")
   endif()

   list(FIND COMMON_PACKAGE_ARGS "REQUIRED" COMMON_PACKAGE_REQUIRED_POS)


Add Qt support to CommonApplication

Add Qt support to CommonApplication

--- CommonApplication.cmake
+++ CommonApplication.cmake
@@ -8,6 +8,10 @@
 # * NAME_HEADERS for all internal header files
 # * NAME_LINK_LIBRARIES for dependencies of name
 # * ARGN for optional add_executable parameters
+# * Optional Qt support:
+# ** NAME_MOC_HEADERS list of all moc input headers
+# ** NAME_UI_FORMS list of all .ui input files
+# ** NAME_RESOURCES list of all .qrc resource files
 #
 # Builds Name application and installs it.

@@ -20,6 +24,21 @@
   set(HEADERS ${${NAME}_HEADERS})
   set(LINK_LIBRARIES ${${NAME}_LINK_LIBRARIES})

+  if(${NAME}_MOC_HEADERS)
+    qt4_wrap_cpp(MOC_SOURCES ${${NAME}_MOC_HEADERS})
+    list(APPEND HEADERS ${${NAME}_MOC_HEADERS})
+    list(APPEND SOURCES ${MOC_SOURCES})
+  endif()
+  if(${NAME}_UI_FORMS)
+    qt4_wrap_ui(UI_SOURCES ${${NAME}_FORMS})
+    list(APPEND SOURCES ${UI_SOURCES})
+    include_directories(${CMAKE_CURRENT_BINARY_DIR})
+  endif()
+  if(${NAME}_RESOURCES)
+    qt4_add_resources(QRC_SOURCES ${LIVREGUI_RESOURCES})
+    list(APPEND SOURCES ${QRC_SOURCES})
+  endif()
+
   add_executable(${Name} ${ARGN} ${HEADERS} ${SOURCES})
   target_link_libraries(${Name} ${LINK_LIBRARIES})
   install(TARGETS ${Name} DESTINATION bin COMPONENT apps)


Tag RC3 version

Tag RC3 version

--- Superbuild/Projects/veloview.bundle.common.cmake
+++ Superbuild/Projects/veloview.bundle.common.cmake
@@ -3,7 +3,7 @@
 # Sets VV_VERSION_{MAJOR,MINOR,PATCH}
 include(${VeloViewSuperBuild_SOURCE_DIR}/../CMake/version.cmake)
 set(VV_VERSION "${VV_VERSION_MAJOR}.${VV_VERSION_MINOR}")
-set(VV_VERSION_SUFFIX)
+set(VV_VERSION_SUFFIX "RC3")

 # Sets GD_YEAR, GD_MONTH, GD_DAY
 include(${VeloViewSuperBuild_SOURCE_DIR}/Projects/getdate.cmake)


improve CakeInstall.cmake

improve CakeInstall.cmake

- fix urls
- better messages and doc
- verify CAKE_ROOT env var
- CAKE_INSTALL_FULL_CLONE to optional full clone

--- CakeInstall.cmake
+++ CakeInstall.cmake
@@ -1,7 +1,7 @@
 # Cake install script
 # ===================
 #
-# Git-clones the Cake repository into ${CMAKE_CURRENT_LIST_DIR}
+# Git-clones the Cake repository into ${CMAKE_CURRENT_LIST_DIR}/cake_root
 # and sets CAKE_ROOT in cache
 #
 # Usage:
@@ -28,7 +28,7 @@
 # - Put the following script into your (top) CmakeLists.txt:
 #
 #    if(NOT EXISTS "${CAKE_ROOT}/Cake.cmake")
-#        file(DOWNLOAD https://github.com/tamaskenez/cake/blob/master/CakeInstall.cmake ${CMAKE_BINARY_DIR})
+#        file(DOWNLOAD https://raw.githubusercontent.com/tamaskenez/cake/master/CakeInstall.cmake ${CMAKE_BINARY_DIR})
 #        include(${CMAKE_BINARY_DIR}/CakeInstall.cmake)
 #    endif()
 #    include(${CAKE_ROOT}/Cake.cmake)
@@ -46,39 +46,54 @@
 #         cmake -P CakeInstall.cmake
 #     fi
 #
-# The script makes sure Cake is installed to ./cake_root and sets the CAKE_ROOT the environment variable.
-# In your CMakeLists.txt you can use it directly::
+# In your CMakeLists.txt use the CAKE_ROOT environment variable to find Cake::
 #
-#     include($ENV{CAKE_ROOT}/Cake.cmake) # automatically sets the CAKE_ROOT cache var
+#     include($ENV{CAKE_ROOT}/Cake.cmake) # also sets the CAKE_ROOT cache variable to $ENV{CAKE_ROOT} in turn
 #
 # 3. Install Cake to a user or system location:
 #
 # - cd into the directory you want to install cake to
 # - execute the shell command:
 #
-#     wget https://github.com/tamaskenez/cake/blob/master/CakeInstall.cmake && cmake -P CakeInstall.cmake
+#     curl https://raw.githubusercontent.com/tamaskenez/cake/master/CakeInstall.cmake -o CakeInstall.cmake && cmake -P CakeInstall.cmake
 #

+# set CAKE_ROOT and verify existing environment variable
+set(CAKE_ROOT ${CMAKE_CURRENT_LIST_DIR}/cake_root CACHE PATH "Cake install directory" FORCE)
+if(NOT "$ENV{CAKE_ROOT}" STREQUAL "" AND NOT "$ENV{CAKE_ROOT}" STREQUAL CAKE_ROOT)
+  message(FATAL_ERROR "[cake] The CAKE_ROOT environment variable set to $ENV{CAKE_ROOT} which is different from ${CAKE_ROOT} where CakeInstall.cmake intends to install Cake to. Remove CAKE_ROOT from the environment and re-run CakeInstall.cmake.")
+endif()
+
+# remove existing installation
+file(REMOVE_RECURSE ${CAKE_ROOT})
+
+message("Installing Cake to ${CAKE_ROOT}")
+
+if(CAKE_INSTALL_FULL_CLONE)
+  set(_cake_depth_flags "")
+  set(_cake_depth_flags_string "")
+else()
+  set(_cake_depth_flags --depth 1)
+  set(_cake_depth_flags_string "--depth 1 ")
+endif()
+
+message(STATUS "[cake] git clone ${_cake_depth_flags_string}${CAKE_GIT_URL} ${CAKE_ROOT}")
+
 find_package(Git REQUIRED)
-set(CAKE_ROOT ${CMAKE_CURRENT_LIST_DIR}/cake_root CACHE PATH "Cake install directory" FORCE)
-file(REMOVE_RECURSE ${CAKE_ROOT})
-if(DEFINED CMAKE_SCRIPT_MODE_FILE)
-  message("Set the CAKE_ROOT environment variable to ${CAKE_ROOT}")
-else()
-  message(STATUS "CAKE_ROOT set to ${CAKE_ROOT}")
-endif()
 set(CAKE_GIT_URL https://github.com/tamaskenez/cake)
-message(STATUS "git clone --depth 1 ${CAKE_GIT_URL} ${CAKE_ROOT}")
+
 execute_process(
       COMMAND ${GIT_EXECUTABLE} clone
-        --depth 1 ${CAKE_GIT_URL}
-        --branch feature/project
+        ${_cake_depth_flags}
+        ${CAKE_GIT_URL}
         ${CAKE_ROOT}
       RESULT_VARIABLE _cake_git_result_variable)
+
 if(_cake_git_result_variable)
   message(FATAL_ERROR "[cake] Failed to clone the Cake repository")
 endif()
 if(NOT EXISTS ${CAKE_ROOT}/Cake.cmake)
   message(FATAL_ERROR "[cake] Git-clone was successful but Cake.cmake is missing")
 endif()
+
 file(REMOVE ${CMAKE_CURRENT_LIST_FILE})


Fix compile error on ubuntu 14.04.

Fix compile error on ubuntu 14.04.

--- rocksdb-4.9/linux.cmake
+++ rocksdb-4.9/linux.cmake
@@ -7,12 +7,11 @@
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-builtin-memcmp")
 endif (CMAKE_COMPILER_IS_GNUCXX)

-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse -msse4.2 -Woverloaded-virtual")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -msse -msse4.2 -Woverloaded-virtual")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-field-initializers")

-set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} \
-    -fno-omit-frame-pointer -momit-leaf-frame-pointer -DNDEBUG")
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-omit-frame-pointer -momit-leaf-frame-pointer -DNDEBUG")

 add_library(rocksdb-static STATIC ${SOURCES})
 add_library(rocksdb-shared SHARED ${SOURCES})


Linking with OpenCV highgui componenet is not needed for 3.X and newer. (#1842)

--- src/cmake/modules/FindOpenCV.cmake
+++ src/cmake/modules/FindOpenCV.cmake
@@ -51,8 +51,10 @@
              )

-set (opencv_components opencv_highgui opencv_imgproc opencv_core)
+set (opencv_components opencv_imgproc opencv_core)
 if (NOT ${OpenCV_VERSION} VERSION_LESS 3.0.0)
+    set (opencv_components opencv_videoio ${opencv_components})
+else (NOT ${OpenCV_VERSION} VERSION_LESS 3.0.0)
     set (opencv_components opencv_videoio ${opencv_components})
 endif ()
 foreach (component ${opencv_components})


CR #80

CR #80

--- GitExternal.cmake
+++ GitExternal.cmake
@@ -7,8 +7,13 @@
 #      include(GitExternal)
 #      git_external_manage(${CMAKE_CURRENT_LIST_FILE})
 #      #-> CMake/common https://github.com/Eyescale/CMake.git 8324611
-#    Where the last line can appear multiple times, once for each external repo
-#    It has to start with '#->'.
+#    Where the last line can appear multiple times, once for each
+#    external repo It has to start with '#->'. This function parses
+#    the file for this pattern and then calls git_external on each
+#    found entry. The entries are encoded into a target which will
+#    recreate the file on invocation. Since only the '#-> ' lines are
+#    parsed, everything else is ignored. Since the file is under git
+#    control, there should be no risk of data loss.

 find_package(Git)
 if(NOT GIT_EXECUTABLE)
@@ -37,11 +42,11 @@
         # pull in identified external
         git_external(${DIR} ${REPO} ${TAG})

-        # update target to bump external
+        # Create update script and target to bump external spec
         if(NOT TARGET update)
           add_custom_target(update)
         endif()
-        if(NOT TARGET update_external)
+        if(NOT TARGET update_git_external)
           set(GIT_EXTERNAL_SCRIPT
             "${CMAKE_CURRENT_BINARY_DIR}/gitupdateexternal.cmake")
           file(WRITE "${GIT_EXTERNAL_SCRIPT}"
@@ -49,13 +54,13 @@
 include(GitExternal)
 git_external_manage(\\\${CMAKE_CURRENT_LIST_FILE})
 \")")
-          add_custom_target(update_external
+          add_custom_target(update_git_external
             COMMAND ${CMAKE_COMMAND} -P ${GIT_EXTERNAL_SCRIPT}
             COMMENT "Recreate ${FILE}"
             WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
         endif()

-        string(REPLACE "/" "_" GIT_EXTERNAL_NAME ${DIR})
+        string(REPLACE "/" "_" GIT_EXTERNAL_NAME ${DIR}) # unique, flat name
         set(GIT_EXTERNAL_SCRIPT
           "${CMAKE_CURRENT_BINARY_DIR}/gitupdate${GIT_EXTERNAL_NAME}.cmake")
         file(WRITE "${GIT_EXTERNAL_SCRIPT}" "
@@ -69,12 +74,12 @@
 else()
   file(APPEND ${FILE} \"#-> ${DIR} ${REPO} ${TAG}\n\")
 endif()")
-        add_custom_target(update_external_${GIT_EXTERNAL_NAME}
+        add_custom_target(update_git_external_${GIT_EXTERNAL_NAME}
           COMMAND ${CMAKE_COMMAND} -P ${GIT_EXTERNAL_SCRIPT}
           COMMENT "Update ${REPO} in ${FILE}"
-          DEPENDS update_external
+          DEPENDS update_git_external
           WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
-        add_dependencies(update update_external_${GIT_EXTERNAL_NAME})
+        add_dependencies(update update_git_external_${GIT_EXTERNAL_NAME})
       endif()
     endif()
   endforeach()


Got rid of a few extraneous newlines that XCode didn't like.

git-svn-id: 4ba210d0a933e3fb1aa9ab096f190cd38965d92a@1440 fa922fa7-2fde-0310-acd8-f43f465a7996

--- src/CMake/cuda/FindCuda.cmake
+++ src/CMake/cuda/FindCuda.cmake
@@ -302,7 +302,7 @@

-	    COMMENT "Building NVCC -cubin File: ${NVCC_generated_cubin_file}\n"
+	    COMMENT "Building NVCC -cubin File: ${NVCC_generated_cubin_file}"
       )
   ELSE (CUDA_BUILD_TYPE MATCHES "Device" AND CUDA_BUILD_CUBIN)
     # Depend on something that will exist.
@@ -323,7 +323,7 @@
       # MAIN_DEPENDENCY ${source_file}
       DEPENDS ${source_file}
       DEPENDS ${CUDA_NVCC_DEPEND}
-	  COMMENT "Building NVCC Dependency File: ${NVCC_generated_dependency_file}\n"
+	  COMMENT "Building NVCC Dependency File: ${NVCC_generated_dependency_file}"
     )

     # Build the CMake readible dependency file
@@ -352,7 +352,7 @@
            --keep
            -cuda -o ${generated_file}
            ${CUDA_NVCC_INCLUDE_ARGS}
-       COMMENT "Building NVCC ${source_file}: ${generated_file}\n"
+       COMMENT "Building NVCC ${source_file}: ${generated_file}"
       )

     SET(cuda_cu_sources ${cuda_cu_sources} ${source_file})


add arm64e for iOS

add arm64e for iOS

--- arcbuild/toolchains/ios-xcode.cmake
+++ arcbuild/toolchains/ios-xcode.cmake
@@ -5,8 +5,8 @@
 #
 # SDK_ROOT = automatic (default: xcode-select --print-path) or /path/to/Contents/Developer
 #
-# SDK_ARCH = empty (default: "armv7;armv7s;arm64") or "armv7;armv7s;arm64"|"i386;x86_64"|"i686;x86_64"
-#   set the architecture for iOS - sets armv7;armv7s;arm64 and appears to be XCode's standard.
+# SDK_ARCH = empty (default: "armv7;armv7s;arm64;arm64e") or "armv7;armv7s;arm64;arm64e"|"i386;x86_64"|"i686;x86_64"
+#   set the architecture for iOS - sets armv7;armv7s;arm64;arm64e and appears to be XCode's standard.
 #
 # SDK_API_VERSION = empty (default: oldest) or 6.1|7.1|8.1
 #
@@ -59,7 +59,7 @@

 # hard set values
 if(NOT SDK_ARCH)
-  set(SDK_ARCH "armv7;armv7s;arm64")
+  set(SDK_ARCH "armv7;armv7s;arm64;arm64e")
 else()
   string(REPLACE " " ";" SDK_ARCH "${SDK_ARCH}") # Add support of arch's seperated by space
 endif()
@@ -71,7 +71,7 @@
 set(IOS 1)

 # iOS target
-if(SDK_ARCH MATCHES "(armv7|armv7s|arm64)")
+if(SDK_ARCH MATCHES "(armv7|armv7s|arm64|arm64e)")
   set(IOS_TARGET "iPhoneOS")
   set(ARM 1)
   set(SDK_C_FLAGS "-miphoneos-version-min=7.0 -mfloat-abi=softfp -mfpu=neon -ftree-vectorize -ffast-math") # Enable NEON for ARM


try to fix add_backward macro

try to fix add_backward macro

--- BackwardConfig.cmake
+++ BackwardConfig.cmake
@@ -169,10 +169,8 @@

 macro(add_backward target)
 	target_include_directories(${target} PRIVATE ${BACKWARD_INCLUDE_DIRS})
-	set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS ${_BACKWARD_DEFINITIONS})
-	if(BACKWARD_HAS_EXTERNAL_LIBRARIES)
-		set_property(TARGET ${target} APPEND PROPERTY LINK_LIBRARIES ${_BACKWARD_LIBRARIES})
-	endif()
+	set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS ${BACKWARD_DEFINITIONS})
+	set_property(TARGET ${target} APPEND PROPERTY LINK_LIBRARIES ${BACKWARD_LIBRARIES})
 endmacro()

 set(BACKWARD_INCLUDE_DIRS ${_BACKWARD_INCLUDE_DIRS} CACHE INTERNAL "_BACKWARD_INCLUDE_DIRS")


small fix for CMake

small fix for CMake

--- CMakeOlxCommon.cmake
+++ CMakeOlxCommon.cmake
@@ -12,7 +12,7 @@
 		if(${CMAKE_MAJOR_VERSION} GREATER 2 OR ${CMAKE_MINOR_VERSION} GREATER 6 OR ${CMAKE_PATCH_VERSION} GREATER 2)
 			# We explicitly want to export variables here.
 			cmake_policy(SET CMP0011 OLD)
-		endif(POLICY CMP0011)
+		endif(${CMAKE_MAJOR_VERSION} GREATER 2 OR ${CMAKE_MINOR_VERSION} GREATER 6 OR ${CMAKE_PATCH_VERSION} GREATER 2)
 	endif(COMMAND CMAKE_POLICY)
 	include(${OLXROOTDIR}/PCHSupport_26.cmake)
 ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)


[cmake] fixes overwriting debug flags

[cmake] fixes overwriting debug flags

--- cmake/modules/DuneStuffMacros.cmake
+++ cmake/modules/DuneStuffMacros.cmake
@@ -65,12 +65,12 @@
 SET( CMAKE_EXPORT_COMPILE_COMMANDS "ON" )

 SET( CMAKE_CXX_FLAGS_RELEASE CACHE STRING
-  "-DDNDEBUG -DNDEBUG -O2 -fPIC " )
+  "-DDNDEBUG -DNDEBUG -O2 -fPIC " ${CMAKE_CXX_FLAGS_RELEASE})

 SET( CMAKE_CXX_FLAGS "-DDUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS=1 ${CMAKE_CXX_FLAGS}" )

 SET( CMAKE_CXX_FLAGS_DEBUG
-  "-DDNDEBUG -g3 -ggdb  -Wunused-variable -Winline -fno-strict-aliasing -fPIC -Wall -Wextra -Wc++0x-compat -Wparentheses -pedantic -Wredundant-decls -Wshadow  -Wundef -Wnon-virtual-dtor -ftemplate-backtrace-limit=0" )
+  "-DDNDEBUG -g3 -ggdb  -Wunused-variable -Winline -fno-strict-aliasing -fPIC -Wall -Wextra -Wc++0x-compat -Wparentheses -pedantic -Wredundant-decls -Wshadow  -Wundef -Wnon-virtual-dtor -ftemplate-backtrace-limit=0 ${CMAKE_CXX_FLAGS_DEBUG}")

 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
         set( CMAKE_CXX_FLAGS_DEBUG CACHE STRING


SetupBuildFlags.cmake: Use -Werror=implicit-function-declaration only for C code compilation

The C++ code produces a compile time warning:
  cc1plus: warning: ‘-Werror=’ argument ‘-Werror=implicit-function-declaration’ is not valid for C++
despite CMake's check_cxx_compiler_flag() returning success.

--- cmake/modules/SetupBuildFlags.cmake
+++ cmake/modules/SetupBuildFlags.cmake
@@ -10,7 +10,6 @@

 macro(setup_build_flags _maintainer_mode)
 	list(APPEND proposed_flags
-		-Werror-implicit-function-declaration
 		-Wformat
 		-Wformat-security
 		-Winit-self
@@ -40,6 +39,7 @@

 	list(APPEND proposed_c_flags
 		${proposed_flags}
+		-Werror-implicit-function-declaration
 		-Wdeclaration-after-statement
 		-Wno-missing-field-initializers
 		-Wno-sign-compare


PROTON-465: FindPerlLibs fails on Ubuntu 12

If the search for libperl.so fails using the standard search in CMake,
then this alternative tool kicks in and searchs other known locations
for the file.

git-svn-id: 33ed6c3feaacb64944efc691d1ae8e09b17f2bf9@1628177 13f79535-47bb-0310-9956-ffa450edef68

--- tools/cmake/Modules/FindPerlLibs.cmake
+++ tools/cmake/Modules/FindPerlLibs.cmake
@@ -29,6 +29,25 @@

   # if either the library path is not found not set at all
   # then do our own search
+  if ( NOT PERL_LIBRARY )
+    EXECUTE_PROCESS( COMMAND ${PERL_EXECUTABLE} -V:libperl
+                     OUTPUT_VARIABLE PERL_LIBRARY_OUTPUT
+                     RESULT_VARIABLE PERL_LIBRARY_RESULT )
+
+    IF ( NOT PERL_LIBRARY_RESULT )
+      string(REGEX REPLACE "libperl='([^']+)'.*" "\\1" PERL_POSSIBLE_LIBRARIES ${PERL_LIBRARY_OUTPUT})
+    ENDIF ( NOT PERL_LIBRARY_RESULT )
+
+    MESSAGE ( STATUS  "Looking for ${PERL_POSSIBLE_LIBRARIES}" )
+
+    find_file(PERL_LIBRARY
+      NAMES ${PERL_POSSIBLE_LIBRARIES}
+      PATHS /usr/lib
+            ${PERL_ARCHLIB}/CORE
+      )
+
+  endif ( NOT PERL_LIBRARY )
+
   IF ( PERL_LIBRARY MATCHES .*-NOTFOUND OR NOT PERL_LIBRARY )
       EXECUTE_PROCESS ( COMMAND ${PERL_EXECUTABLE}
                         -MConfig -e "print \$Config{libperl}"


SVN_SILENT made messages (.desktop file)

--- plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
+++ plugins/sipe/ktpaccountskcm_plugin_sipe.desktop.cmake
@@ -7,6 +7,7 @@
 Comment[fr]=Interface utilisateur personnalisée pour la configuration de comptes en utilisant le gestionnaire de connexions « sipe ».
 Comment[nl]=Gebruikersinterface voor aangepaste accountconfiguratie voor accounts die de Sipe verbindingenbeheerder gebruiken.
 Comment[pl]=Własny interfejsu użytkownika konfiguracji kont dla kont wykorzystujących menadżera połączeń sipe.
+Comment[sk]=Vlastné používateľské rozhranie konfigurácie účtu pre účty používajúce správcu pripojení Sipe.
 Comment[sv]=Användargränssnitt för anpassad kontoinställning av konton som använder anslutningshanteraren Sipe.
 Comment[uk]=Інтерфейс користувача для нетипового налаштовування облікового запису за допомогою керування з’єднаннями sipe.
 Comment[x-test]=xxCustom account configuration user interface for accounts using the sipe connection manager.xx
@@ -18,6 +19,7 @@
 Name[fr]=Interface utilisateur pour la configuration de comptes « sipe ».
 Name[nl]=Gebruikersinterface voor Sipe accountconfiguratie
 Name[pl]=Interfejs użytkownika konfiguracji konta Sipe
+Name[sk]=Používateľské rozhranie konfigurácie účtu Sipe
 Name[sv]=Användargränssnitt för inställning av Sipe-konton
 Name[uk]=Інтерфейс користувача для налаштовування sipe
 Name[x-test]=xxSipe Account Configuration User Interfacexx


undo debug stuff

undo debug stuff

--- external/CapnProto.cmake
+++ external/CapnProto.cmake
@@ -72,11 +72,10 @@
          GROUP_NAME SPEC_FILES SRC_PREFIX INCLUDE_DIR TARGET_DIR OUTPUT_FILES)
   add_custom_command(
     OUTPUT ${OUTPUT_FILES}
-    COMMAND dir C:/projects/nupic-core/build/scripts/ThirdParty/Install/bin/
-    #COMMAND ${CAPNP_EXECUTABLE}
-    #    compile -o ${CAPNPC_CXX_EXECUTABLE}:${TARGET_DIR}
-    #    --src-prefix ${SRC_PREFIX} -I ${INCLUDE_DIR}
-    #    ${SPEC_FILES}
+    COMMAND ${CAPNP_EXECUTABLE}
+        compile -o ${CAPNPC_CXX_EXECUTABLE}:${TARGET_DIR}
+        --src-prefix ${SRC_PREFIX} -I ${INCLUDE_DIR}
+        ${SPEC_FILES}
     DEPENDS CapnProto
     COMMENT "Executing Cap'n Proto compiler"
   )