ARROW-14301: [C++] use consistent CMAKE_CXX_STANDARD definition

Tested locally with

```
archery docker run -e SETUPTOOLS_SCM_PRETEND_VERSION="6.0.0.dev444" -e CMAKE_ARGS=-DCMAKE_CXX_STANDARD=17 ubuntu-cpp
```

and

```
archery docker run -e SETUPTOOLS_SCM_PRETEND_VERSION="6.0.0.dev444" -e CMAKE_ARGS=-DCMAKE_CXX_STANDARD=11 ubuntu-cpp
```

and

```
archery docker run -e SETUPTOOLS_SCM_PRETEND_VERSION="6.0.0.dev444"  ubuntu-cpp
```

Closes #11393 from coryan/ARROW-14301-use-consistent-cmake-cxx-standard-version

Authored-by: Carlos O'Ryan <9e621187562cef94ec9617928f4eb1eb11d57112@google.com>
Signed-off-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -684,6 +684,7 @@
     -DCMAKE_C_FLAGS_${UPPERCASE_BUILD_TYPE}=${EP_C_FLAGS}
     -DCMAKE_CXX_FLAGS=${EP_CXX_FLAGS}
     -DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${EP_CXX_FLAGS}
+    -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
     -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=${CMAKE_EXPORT_NO_PACKAGE_REGISTRY}
     -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=${CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY})

@@ -2419,10 +2420,7 @@
     message(STATUS "Building Abseil-cpp from source")
     set(ABSL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/absl_ep-install")
     set(ABSL_CMAKE_ARGS
-        "${EP_COMMON_CMAKE_ARGS}"
-        -DABSL_RUN_TESTS=OFF
-        -DCMAKE_CXX_STANDARD=11
-        -DCMAKE_INSTALL_LIBDIR=lib
+        "${EP_COMMON_CMAKE_ARGS}" -DABSL_RUN_TESTS=OFF -DCMAKE_INSTALL_LIBDIR=lib
         "-DCMAKE_INSTALL_PREFIX=${ABSL_PREFIX}")
     set(ABSL_BUILD_BYPRODUCTS)
     set(ABSL_LIBRARIES)


build: cmake: fix FindMonkey paths for Yocto/Bitbake

Signed-off-by: Eduardo Silva <81f705dc2ce1a61a2621e0e4b442a9474e1d0c70@treasure-data.com>

--- cmake/FindMonkey.cmake
+++ cmake/FindMonkey.cmake
@@ -12,6 +12,7 @@
 find_path(MONKEY_INCLUDE_DIR
   NAMES monkey/mk_core.h monkey/mk_lib.h
   PATHS ${PROJECT_SOURCE_DIR}/lib/monkey/include
+  CMAKE_FIND_ROOT_PATH_BOTH
   )

 include(FindPackageHandleStandardArgs)


Updates HunterGate.cmake

Updates HunterGate.cmake

Signed-off-by: Wesley Ceraso Prudencio <db7d8f3d71fdd706836ac3d3fe5625d728589db8@gmail.com>

--- cmake/HunterGate.cmake
+++ cmake/HunterGate.cmake
@@ -288,7 +288,7 @@

   hunter_gate_status_debug("Run generate")
   execute_process(
-      COMMAND "${CMAKE_COMMAND}" "-H${dir}" "-B${build_dir}"
+      COMMAND "${CMAKE_COMMAND}" "-H${dir}" "-B${build_dir}" "-G${CMAKE_GENERATOR}"
       WORKING_DIRECTORY "${dir}"
       RESULT_VARIABLE download_result
       ${logging_params}


Since the build system visibility issues have been fixed for qt and
-DENABLE_DYNDRIVERS=OFF, allow qt for this case (and also indirectly
the -DBUILD_SHARED_LIBS=OFF case which sets ENABLE_DYNDRIVERS to OFF
internally).

svn path=/trunk/; revision=9914

--- cmake/modules/qt.cmake
+++ cmake/modules/qt.cmake
@@ -40,7 +40,7 @@

 find_package(Qt4)
 if(PLD_bmpqt OR PLD_jpgqt OR PLD_pngqt OR PLD_ppmqt OR PLD_tiffqt OR PLD_epsqt OR PLD_pdfqt OR PLD_qtwidget OR PLD_svgqt OR PLD_extqt)
-  if(ENABLE_DYNDRIVERS AND QT4_FOUND)
+  if(QT4_FOUND)
     if(PLD_svgqt AND ${QT_VERSION_MINOR} GREATER 2)
       set(QT_USE_QTSVG 1)
     endif(PLD_svgqt AND ${QT_VERSION_MINOR} GREATER 2)
@@ -55,7 +55,7 @@
     set(qt_RPATH ${QT_LIBRARY_DIR})
     #message("qt_LIBRARY_DIR = ${qt_LIBRARY_DIR}")
     set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${qt_LINK_FLAGS})
-  else(ENABLE_DYNDRIVERS AND QT4_FOUND)
+  else(QT4_FOUND)
     set(PLD_bmpqt OFF CACHE BOOL "Enable Qt Windows bmp device" FORCE)
     set(PLD_jpgqt OFF CACHE BOOL "Enable Qt jpg device" FORCE)
     set(PLD_pngqt OFF CACHE BOOL "Enable Qt png device" FORCE)
@@ -66,7 +66,7 @@
     set(PLD_qtwidget OFF CACHE BOOL "Enable Qt interactive device" FORCE)
     set(PLD_svgqt OFF CACHE BOOL "Enable Qt SVG device" FORCE)
     set(PLD_extqt OFF CACHE BOOL "Enable Qt ext device" FORCE)
-  endif(ENABLE_DYNDRIVERS AND QT4_FOUND)
+  endif(QT4_FOUND)
 endif(PLD_bmpqt OR PLD_jpgqt OR PLD_pngqt OR PLD_ppmqt OR PLD_tiffqt OR PLD_epsqt OR PLD_pdfqt OR PLD_qtwidget OR PLD_svgqt OR PLD_extqt)

 if(PLD_extqt)


Attempt to mask warnings caused by the fix for cuda 3.2 installed on system dirs

--- cmake/nvcc-check.cmake
+++ cmake/nvcc-check.cmake
@@ -64,7 +64,7 @@
   ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_COMPILER_IS_GNUCC)

-  IF(CMAKE_SYSTEM_NAME MATCHES "Linux" OR "APPLE")
+  IF(CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "APPLE")
       # For CUDA 3.2: surface_functions.h does some non-compliant things...
       #               so we tell g++ to ignore them when called via nvcc
       #               by passing the -fpermissive flag through the nvcc
@@ -73,12 +73,12 @@
       #               valid... resulting in TONS of warnings.  So, we go
       #               version checking again, this time nvcc...
       # Get the nvcc version number
-
-      IF(CUDA_VERSION_MAJOR MATCHES "3")
-          IF(CUDA_VERSION_MINOR MATCHES "2")
-              SET (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} --compiler-options='-fpermissive')
-              MESSAGE(STATUS "nvcc-check: CUDA 3.2 exception: CUDA_NVCC_FLAGS set to \"${CUDA_NVCC_FLAGS}\"")
-          ENDIF()
+
+      # This issue seems to be only if cuda is installed in system so test CUDA_INCLUDE_DIRS
+      # (see http://nvidia.custhelp.com/app/answers/detail/a_id/2869/~/linux-based-cuda-v3.x-compiler-issue-affecting-cuda-surface-apis)
+      IF(CUDA_VERSION_MAJOR MATCHES "3" AND CUDA_VERSION_MINOR MATCHES "2" AND CUDA_INCLUDE_DIRS MATCHES "/usr/include")
+          SET (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} --compiler-options='-fpermissive')
+          MESSAGE(STATUS "nvcc-check: CUDA 3.2 exception: CUDA_NVCC_FLAGS set to \"${CUDA_NVCC_FLAGS}\"")
       ENDIF()
   ENDIF()
 ENDIF(CUDA_FOUND)


Changed dependencies for debian package builds to remove development packages, when possible.

--- CMakeInstallation.cmake
+++ CMakeInstallation.cmake
@@ -74,7 +74,7 @@

   SET(CPACK_DEBIAN_PACKAGE_NAME "netcdf4-dev")
   SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${dpkg_arch}")
-  SET(CPACK_DEBIAN_PACKAGE_DEPENDS "zlib1g (>= 1:1.2.8), libhdf5-dev (>= 1.8.11), libcurl4-openssl-dev (>= 7.35.0)")
+  SET(CPACK_DEBIAN_PACKAGE_DEPENDS "zlib1g (>= 1:1.2.3.4), libhdf5-7 (>= 1.8.11), libcurl4-openssl-dev (>= 7.22.0)")
 ENDIF()


Fix the build error in MacOSX.

Fix the build error in MacOSX.

--- dep/uv.cmake
+++ dep/uv.cmake
@@ -16,7 +16,10 @@
 set (TBAG_DEP_UV_LIBRARIES_BUILD "${PROJECT_SOURCE_DIR}/dep/uv/.libs/libuv.a")
 set (TBAG_DEP_UV_LIBRARIES       ${TBAG_DEP_UV_LIBRARIES_BUILD})
 if (UNIX)
-    list (APPEND TBAG_DEP_UV_LIBRARIES -lrt -lpthread -lnsl -ldl)
+    list (APPEND TBAG_DEP_UV_LIBRARIES -lpthread)
+    if (NOT APPLE)
+        list (APPEND TBAG_DEP_UV_LIBRARIES -lrt -lnsl -ldl)
+    endif ()
 endif ()

 ## libuv custom target.


Win64 colladadom lib/dlls are named like their 32 bit counterpart now

--- indra/cmake/Copy3rdPartyLibs.cmake
+++ indra/cmake/Copy3rdPartyLibs.cmake
@@ -41,7 +41,7 @@
         libapriconv-1.dll
         ssleay32.dll
         libeay32.dll
-#        libcollada14dom22-d.dll
+        libcollada14dom22-d.dll
         glod.dll
         libhunspell.dll
         )
@@ -54,21 +54,13 @@
         libapriconv-1.dll
         ssleay32.dll
         libeay32.dll
-#        libcollada14dom22.dll
+        libcollada14dom22.dll
         glod.dll
         libhunspell.dll
         )

     set(debug_files ${debug_files} growl++.dll growl.dll )
     set(release_files ${release_files} growl++.dll growl.dll )
-
-    if( NOT ND_BUILD64BIT_ARCH )
-      set(collada_debug_files libcollada14dom22-d.dll )
-      set(collada_release_files libcollada14dom22.dll )
-    else( NOT ND_BUILD64BIT_ARCH )
-      set(collada_debug_files collada14dom.dll )
-      set(collada_release_files collada14dom.dll )
-    endif( NOT ND_BUILD64BIT_ARCH )

     if(USE_TCMALLOC)
       set(debug_files ${debug_files} libtcmalloc_minimal-debug.dll)


Removed custom D-Bus path

Removed custom D-Bus path

--- common.cmake
+++ common.cmake
@@ -1,4 +1,3 @@
-SET (CUSTOM_DBUS_PATH /usr/local/lib/)
 SET (INTERFACE_DIR ${MEDIAMANAGER_SOURCE_DIR}/interfaces/src-gen/)

 FIND_PACKAGE (PkgConfig)
@@ -19,7 +18,6 @@
                      ${MEDIAMANAGER_BINARY_DIR}/generated/dleyna/)

 LINK_DIRECTORIES (${PC_COMMONAPIDBUS_LIBRARY_DIRS})
-LINK_DIRECTORIES (${CUSTOM_DBUS_PATH})

 ADD_DEFINITIONS (${PC_COMMONAPIDBUS_CFLAGS} ${PC_GIO_UNIX_CFLAGS})


CI: enable c++11 and stdthreads on android

--- ci-build.cmake
+++ ci-build.cmake
@@ -62,6 +62,8 @@

     set(OTHER
         ${CROSS}
+        -DCMAKE_CXX_FLAGS=-std=c++11
+        -DOGRE_CONFIG_THREAD_PROVIDER=std
         -DOGRE_DEPENDENCIES_DIR=${CMAKE_CURRENT_SOURCE_DIR}/ogredeps)
     set(BUILD_DEPS TRUE)


CI: enable NEON for Android SDK

CI: enable NEON for Android SDK

--- ci-build.cmake
+++ ci-build.cmake
@@ -66,6 +66,7 @@
         -DANDROID_PLATFORM=android-16
         -DANDROID_NDK=${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r17
         -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r17/build/cmake/android.toolchain.cmake
+        -DANDROID_ARM_NEON=TRUE
         -DANDROID_ABI=arm64-v8a)

     set(RENDERSYSTEMS


conan: os.cmake fixes

conan: os.cmake fixes

--- cmake/os.cmake
+++ cmake/os.cmake
@@ -48,6 +48,7 @@
       set(ARCH ${CONAN_SETTINGS_ARCH})
     endif()
   endif()
+  set(TRIPLE "${ARCH}-pc-linux-elf")
   set(LIBRARIES ${CONAN_LIBS})
   set(ELF_SYMS elf_syms)
   set(LINK_SCRIPT ${CONAN_INCLUDEOS_ROOT}/${ARCH}/linker.ld)
@@ -62,7 +63,7 @@
       set(ARCH x86_64)
     endif()
   endif()
-
+  set(TRIPLE "${ARCH}-pc-linux-elf")
   include_directories(
     ${INCLUDEOS_PREFIX}/${ARCH}/include/c++/v1
     ${INCLUDEOS_PREFIX}/${ARCH}/include/c++/v1/experimental
@@ -205,7 +206,11 @@
   set(LINK_SCRIPT ${INCLUDEOS_PREFIX}/${ARCH}/linker.ld)
 endif()

-
+# arch and platform defines
+message(STATUS "Building for arch ${ARCH}, platform ${PLATFORM}")
+
+set(CMAKE_CXX_COMPILER_TARGET ${TRIPLE})
+set(CMAKE_C_COMPILER_TARGET ${TRIPLE})

 # configure options
 option(default_stdout "Use the OS default stdout (serial)" ON)
@@ -220,11 +225,7 @@
 option(full_lto "Enable full LTO (also works on LD)" OFF)
 option(coroutines "Compile with coroutines TS support" OFF)

-# arch and platform defines
-message(STATUS "Building for arch ${ARCH}, platform ${PLATFORM}")
-set(TRIPLE "${ARCH}-pc-linux-elf")
-set(CMAKE_CXX_COMPILER_TARGET ${TRIPLE})
-set(CMAKE_C_COMPILER_TARGET ${TRIPLE})
+

@@ -326,16 +327,16 @@
 endfunction()

 function (os_add_library_from_path TARGET LIBRARY PATH)
-  set(FILE_NAME "${PATH}/lib${LIBRARY}.a")
-
-  if(NOT EXISTS ${FILE_NAME})
+  set(FILENAME "${PATH}/lib${LIBRARY}.a")
+
+  if(NOT EXISTS ${FILENAME})
     message(FATAL_ERROR "Library lib${LIBRARY}.a not found at ${PATH}")
     return()
   endif()

   add_library(${LIBRARY} STATIC IMPORTED)
   set_target_properties(${LIBRARY} PROPERTIES LINKER_LANGUAGE CXX)
-  set_target_properties(${LIBRARY} PROPERTIES IMPORTED_LOCATION ${FILE_NAME})
+  set_target_properties(${LIBRARY} PROPERTIES IMPORTED_LOCATION ${FILENAME})
   os_link_libraries(${TARGET}  --whole-archive ${LIBRARY} --no-whole-archive)
 endfunction()


ENH: centralized locaiton of CMakeFiles setting

--- Utilities/kwsys/kwsysPlatformCxxTests.cmake
+++ Utilities/kwsys/kwsysPlatformCxxTests.cmake
@@ -7,10 +7,12 @@
       COMPILE_DEFINITIONS -DTEST_${var} ${KWSYS_PLATFORM_CXX_TEST_DEFINES}
       OUTPUT_VARIABLE OUTPUT)
     IF(${var}_COMPILED)
-      FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeOutput.log
+      FILE(APPEND
+        ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
         "${description} compiled with the following output:\n${OUTPUT}\n\n")
     ELSE(${var}_COMPILED)
-      FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeError.log
+      FILE(APPEND
+        ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
         "${description} failed to compile with the following output:\n${OUTPUT}\n\n")
     ENDIF(${var}_COMPILED)
     IF(${invert} MATCHES INVERT)


This should fix SSE on windows, still need to test

--- src/unit_PARALLEL/cmake/FindSSE.cmake
+++ src/unit_PARALLEL/cmake/FindSSE.cmake
@@ -238,7 +238,19 @@
       message(STATUS "No SSE extensions found")
   endif()
 elseif(MSVC AND NOT CMAKE_CL_64)
-  if(DETECTED_SSE_20)
+ if(DETECTED_SSE_42)
+      SET(SSE_FLAGS "${SSE_FLAGS} -msse4.2")
+      set(SSE_VERSION "4.2")
+      SET(SSE_FOUND 1)
+  elseif(DETECTED_SSE_41)
+      SET(SSE_FLAGS "${SSE_FLAGS} -msse4.1")
+      set(SSE_VERSION "4.1")
+      SET(SSE_FOUND 1)
+  elseif(DETECTED_SSE_30)
+      SET(SSE_FLAGS "${SSE_FLAGS} -msse3")
+      set(SSE_VERSION "3.0")
+      SET(SSE_FOUND 1)
+  elseif(DETECTED_SSE_20)
       SET(SSE_FLAGS "${SSE_FLAGS} /arch:SSE2")
       set(SSE_VERSION "2.0")
       SET(SSE_FOUND 1)


fallback when no git-commit-id found

fallback when no git-commit-id found

--- src/version_string.cmake
+++ src/version_string.cmake
@@ -25,9 +25,9 @@

 else()
     # if we don't have git, try to read git-tag from file instead
-    file(READ "git-tag.txt" GIT_COMMIT_ID)
+    #file(READ "git-tag.txt" GIT_COMMIT_ID)

-    #set( GIT_COMMIT_ID "unknown (git not found!)")
+    set( GIT_COMMIT_ID "unknown")
     message( STATUS "version_string.cmake read from file GIT_COMMIT_ID: " ${GIT_COMMIT_ID})
     #message( WARNING "Git not found. Reading tag from git-tag.txt instead: " ${GIT_COMMIT_ID})
 endif()


Fixed 3p coverage script

Fixed 3p coverage script

--- utils/CodeCoverage.cmake
+++ utils/CodeCoverage.cmake
@@ -49,21 +49,12 @@
     MESSAGE(FATAL_ERROR "gcov not found! Aborting...")
 ENDIF () # NOT GCOV_PATH

-IF (NOT CMAKE_COMPILER_IS_GNUCXX)
-    # Clang version 3.0.0 and greater now supports gcov as well.
-    MESSAGE(WARNING "Compiler is not GNU gcc! Clang Version 3.0.0 and greater supports gcov as well, but older versions don't.")
-
-    IF (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-        MESSAGE(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
-    ENDIF ()
-ENDIF () # NOT CMAKE_COMPILER_IS_GNUCXX
-
 SET(CMAKE_CXX_FLAGS_COVERAGE
-        "-g -O0 --coverage -fprofile-arcs -ftest-coverage"
+        "-g -O0 --coverage"
         CACHE STRING "Flags used by the C++ compiler during coverage builds."
         FORCE)
 SET(CMAKE_C_FLAGS_COVERAGE
-        "-g -O0 --coverage -fprofile-arcs -ftest-coverage"
+        "-g -O0 --coverage"
         CACHE STRING "Flags used by the C compiler during coverage builds."
         FORCE)
 SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE


CMake: Add for checking an argument that this is not a standard system path (starting with "/bin" and "/lib")

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -680,10 +680,10 @@
           IF(TARGET ${_item})
             GET_TARGET_PROPERTY(_item ${_item} LOCATION)
           ENDIF()
-          GET_FILENAME_COMPONENT(_item ${_item} PATH)
+          GET_FILENAME_COMPONENT(_item ${_item} PATH)
         ENDIF()
         IF(EXISTS ${_item})
-          STRING(REGEX MATCH "^/usr" _usr_find ${_item})
+          STRING(REGEX MATCH "^(/usr|/lib|/bin)" _usr_find ${_item})
           LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item} _res)
           IF(NOT _usr_find AND _res EQUAL -1)
               LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item})


update makefiles to cleanups

update makefiles to cleanups

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

--- config.h.cmake
+++ config.h.cmake
@@ -54,7 +54,7 @@
 //////////////////////////////
 //missing functions
 //////////////////////////////
-#include "src/streams/compat/compat.h"
+#include "src/streams/strigi/compat.h"

 //////////////////////////////
 //misc
@@ -126,7 +126,7 @@
 	#endif
 #endif

-#include "strigiconfig.h"
+#include <strigi/strigiconfig.h>

 #define KDELIBSUFF "${KDELIBSUFF}"


Ticket #1789: Update windows dependencies

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -362,8 +362,12 @@
 	endif()
 endif(NOT HPUX)

-if (NOT WINDOWS)
-	option(HAVE_SSH_TO_JOB "Support for condor_ssh_to_job" ON)
+if (WINDOWS)
+    if (WANT_CONTRIB AND WITH_MANAGEMENT)
+        set ( CONDOR_QMF condor_qmflib;${QPID_FOUND} ) # global scoping dep
+    endif()
+else() # *nix
+    option(HAVE_SSH_TO_JOB "Support for condor_ssh_to_job" ON)
 endif()

 if (BUILD_TESTS)


start nighlty builds at 00:00:00 UTC

start nighlty builds at 00:00:00 UTC

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -5,7 +5,7 @@
 ##   ENABLE_TESTING()
 ##   INCLUDE(CTest)
 set(CTEST_PROJECT_NAME "Eigen")
-set(CTEST_NIGHTLY_START_TIME "06:00:00 UTC")
+set(CTEST_NIGHTLY_START_TIME "00:00:00 UTC")

 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "eigen.tuxfamily.org")


ignore warnings of generated and 3rd-party code

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

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -13,3 +13,4 @@
 set(CTEST_DROP_SITE_CDASH TRUE)

 set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 2000)
+set(CTEST_CUSTOM_WARNING_EXCEPTION "groupwise/soap" "mk4storage")


cmake: Set nightly start time to UTC.

cmake: Set nightly start time to UTC.

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -3,7 +3,7 @@
 set(MEMORYCHECK_SUPPRESSIONS_FILE ${CMAKE_SOURCE_DIR}/tests/valgrind-csync.supp)

 set(CTEST_PROJECT_NAME "csync")
-set(CTEST_NIGHTLY_START_TIME "01:00:00 CET")
+set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "mock.cryptomilk.org")


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


[llvm] [cmake] Use current directory in GenerateVersionFromVCS

Find dependent scripts of GenerateVersionFromVCS in current directory
rather than ../../cmake/modules.  I do not see any reason why the former
would not work and The latter is incorrect when GenerateVersionFromVCS
is used from install directory (i.e. in stand-alone builds).

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

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

--- cmake/modules/GenerateVersionFromVCS.cmake
+++ cmake/modules/GenerateVersionFromVCS.cmake
@@ -9,11 +9,9 @@
 # where "<NAME>" is substituted with the names specified in the input variables,
 # for each of the <NAME>_SOURCE_DIR given.

-get_filename_component(LLVM_DIR "${CMAKE_SCRIPT_MODE_FILE}" PATH)
-get_filename_component(LLVM_DIR "${LLVM_DIR}" PATH)
-get_filename_component(LLVM_DIR "${LLVM_DIR}" PATH)
+get_filename_component(LLVM_CMAKE_DIR "${CMAKE_SCRIPT_MODE_FILE}" PATH)

-list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}/cmake/modules")
+list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")

 include(VersionFromVCS)


List needed libraries and use ERROR_QUIET

--- cmake/modules/XROOTDApplePostInstall.cmake
+++ cmake/modules/XROOTDApplePostInstall.cmake
@@ -2,14 +2,27 @@
 # libraries on macOS after installation. The function changes the value from
 # ${build_libdir} to ${install_libdir} with the `install_name_tool` executable.
 # On successive reiterations of the `cmake --install` command,
-# `install_name_tool` would error out since LC_RPATH would be already set to
-# ${install_libdir}. Since that is what we want in the end, we redirect the
-# errors to /dev/null.
+# `install_name_tool` would error out since LC_RPATH would be already set to
+# ${install_libdir}. Since that is what we want in the end, we discard these
+# errors.

 function(xrootd_libs_change_rpath build_libdir install_libdir)

-  file(GLOB XROOTD_ALL_LIBRARIES
-    "${install_libdir}/libXrd*"
+  set(XROOTD_ALL_LIBRARIES libXrdAppUtils.dylib libXrdBlacklistDecision-4.so
+                           libXrdBwm-4.so libXrdCksCalczcrc32-4.so
+                           libXrdCl.dylib libXrdClProxyPlugin-4.so
+                           libXrdClient.dylib libXrdCmsRedirectLocal-4.so
+                           libXrdCrypto.dylib libXrdCryptoLite.dylib
+                           libXrdFfs.dylib libXrdFileCache-4.so
+                           libXrdN2No2p-4.so libXrdOssSIgpfsT-4.so
+                           libXrdPosix.dylib libXrdPosixPreload.dylib
+                           libXrdPss-4.so libXrdSec-4.so libXrdSecProt-4.so
+                           libXrdSeckrb5-4.so libXrdSecpwd-4.so
+                           libXrdSecsss-4.so libXrdSecunix-4.so
+                           libXrdServer.dylib libXrdSsi-4.so
+                           libXrdSsiLib.dylib libXrdSsiLog-4.so
+                           libXrdSsiShMap.dylib libXrdThrottle-4.so
+                           libXrdUtils.dylib libXrdXml.dylib libXrdXrootd-4.so
   )

   find_program(INSTALL_NAME_TOOL install_name_tool)
@@ -18,12 +31,13 @@
     message(STATUS "Found tool ${INSTALL_NAME_TOOL}")
     message(STATUS "Adjusting LC_RPATH variable of XRootD libraries in ${install_libdir}")

-    foreach(XRD_LIB_PATH ${XROOTD_ALL_LIBRARIES})
-      execute_process(COMMAND
-        bash -c "${INSTALL_NAME_TOOL} -rpath ${build_libdir} ${install_libdir} ${XRD_LIB_PATH} 2> /dev/null || true"
+    foreach(XRD_LIB_PATH IN LISTS XROOTD_ALL_LIBRARIES)
+      execute_process(COMMAND ${INSTALL_NAME_TOOL} -rpath
+                              ${build_libdir} ${install_libdir}
+                              ${install_libdir}/${XRD_LIB_PATH}
+                      ERROR_QUIET
       )
     endforeach()
-
   endif()

-endfunction()+endfunction()


holybro_durandal-v1_stackcheck limit to primary IMU only

--- boards/holybro/durandal-v1/stackcheck.cmake
+++ boards/holybro/durandal-v1/stackcheck.cmake
@@ -32,7 +32,7 @@
 		#imu/adis16448
 		#imu/adis16477
 		#imu/adis16497
-		imu/bmi088
+		#imu/bmi088
 		imu/mpu6000
 		#imu/mpu9250
 		#irlock


Update with KERNEL

Update with KERNEL

--- adm_local_without_kernel/cmake_files/SalomeMacros.cmake
+++ adm_local_without_kernel/cmake_files/SalomeMacros.cmake
@@ -111,14 +111,19 @@
   ENDIF(NOT SALOME_INSTALL_SCRIPTS_DEF_PERMS)
   FOREACH(file ${file_list})
     SET(PREFIX "")
-    IF(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY)
-      SET(PREFIX "${SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY}/")
-    ENDIF(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY)
+    IF(IS_ABSOLUTE ${file})
+      GET_FILENAME_COMPONENT(file_name ${file} NAME)
+    ELSE()
+      SET(file_name ${file})
+      IF(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY)
+	SET(PREFIX "${SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY}/")
+      ENDIF(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY)
+    ENDIF(IS_ABSOLUTE ${file})
     INSTALL(FILES ${PREFIX}${file} DESTINATION ${path} PERMISSIONS ${PERMS})
     GET_FILENAME_COMPONENT(ext ${file} EXT)
     IF(ext STREQUAL .py)
-      INSTALL(CODE "MESSAGE(STATUS \"py compiling ${CMAKE_INSTALL_PREFIX}/${path}/${file}\")")
-      INSTALL(CODE "SET(CMD \"import py_compile ; py_compile.compile('${CMAKE_INSTALL_PREFIX}/${path}/${file}')\")")
+      INSTALL(CODE "MESSAGE(STATUS \"py compiling ${CMAKE_INSTALL_PREFIX}/${path}/${file_name}\")")
+      INSTALL(CODE "SET(CMD \"import py_compile ; py_compile.compile('${CMAKE_INSTALL_PREFIX}/${path}/${file_name}')\")")
       INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"\${CMD}\")")
       INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -O -c \"\${CMD}\")")
     ENDIF(ext STREQUAL .py)
@@ -151,16 +156,26 @@
 # USAGE: SALOME_CONFIGURE_FILE(in_file out_file [INSTALL dir])
 #
 # ARGUMENTS:
-# in_file: IN : input file with full paths.
-# out_file: IN : output file with full paths.
+# in_file: IN : input file (if relative path is given, full file path is computed from current source dir).
+# out_file: IN : output file (if relative path is given, full file path is computed from current build dir).
 # If INSTALL is specified, then 'out_file' will be installed to the 'dir' directory.
 #----------------------------------------------------------------------------
 MACRO(SALOME_CONFIGURE_FILE IN_FILE OUT_FILE)
-  MESSAGE(STATUS "Creation of ${OUT_FILE}")
-  CONFIGURE_FILE(${IN_FILE} ${OUT_FILE} @ONLY)
+  IF(IS_ABSOLUTE ${IN_FILE})
+    SET(_in_file ${IN_FILE})
+  ELSE()
+    SET(_in_file ${CMAKE_CURRENT_SOURCE_DIR}/${IN_FILE})
+  ENDIF()
+  IF(IS_ABSOLUTE  ${OUT_FILE})
+    SET(_out_file ${OUT_FILE})
+  ELSE()
+    SET(_out_file ${CMAKE_CURRENT_BINARY_DIR}/${OUT_FILE})
+  ENDIF()
+  MESSAGE(STATUS "Creation of ${_out_file}")
+  CONFIGURE_FILE(${_in_file} ${_out_file} @ONLY)
   PARSE_ARGUMENTS(SALOME_CONFIGURE_FILE "INSTALL" "" ${ARGN})
   IF(SALOME_CONFIGURE_FILE_INSTALL)
-    INSTALL(FILES ${OUT_FILE} DESTINATION ${SALOME_CONFIGURE_FILE_INSTALL})
+    INSTALL(FILES ${_out_file} DESTINATION ${SALOME_CONFIGURE_FILE_INSTALL})
   ENDIF(SALOME_CONFIGURE_FILE_INSTALL)
 ENDMACRO(SALOME_CONFIGURE_FILE)


checking error code in test.cmake

checking error code in test.cmake

--- scripts/test.cmake
+++ scripts/test.cmake
@@ -26,6 +26,12 @@
 # update external model repository
 FIND_PROGRAM(CTEST_GIT_COMMAND NAMES git)

+MACRO(check_result)
+  IF (NOT "${retcode}" STREQUAL "0")
+    MESSAGE(FATAL_ERROR "error executing process")
+  ENDIF()
+ENDMACRO()
+
 # macro that updates the test models
 MACRO(update_test_models)
   IF(NOT EXISTS "${TEST_MODELS_DIRECTORY}")
@@ -33,22 +39,25 @@
     EXECUTE_PROCESS(
       COMMAND ${CTEST_GIT_COMMAND} "clone" "git@git.sdvis.org:embree-models" embree-models
       WORKING_DIRECTORY ${TEST_MODELS_PARENT_DIRECTORY}
-    )
+      RESULT_VARIABLE retcode)
+    check_result()
   ELSE()
     MESSAGE("updating test models ...")
     EXECUTE_PROCESS(
       COMMAND ${CTEST_GIT_COMMAND} "fetch"
       WORKING_DIRECTORY ${TEST_MODELS_DIRECTORY}
-    )
+      RESULT_VARIABLE retcode)
+    check_result()
   ENDIF()
   IF (NOT TEST_MODELS_HASH)
     MESSAGE(FATAL_ERROR "no TEST_MODELS_HASH set")
   ENDIF()
   MESSAGE("checking out test models: ${TEST_MODELS_HASH}")
   EXECUTE_PROCESS(
-      COMMAND ${CTEST_GIT_COMMAND} "checkout" ${TEST_MODELS_HASH}
-      WORKING_DIRECTORY ${TEST_MODELS_DIRECTORY}
-  )
+    COMMAND ${CTEST_GIT_COMMAND} "checkout" ${TEST_MODELS_HASH}
+    WORKING_DIRECTORY ${TEST_MODELS_DIRECTORY}
+    RESULT_VARIABLE retcode)
+  check_result()
 ENDMACRO()

 # increase default output sizes for test outputs


improve compiler and architecture detection

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -298,23 +298,31 @@

     if( my_service_pack )
       set(${VAR} ${my_service_pack})
-	else()
-	  set(${VAR} "na")
-    endif()
-  else()
-    # on all other system we rely on ${CMAKE_CXX_COMPILER}
-	# supporting a "--version" flag
-	exec_program(${CMAKE_CXX_COMPILER}
-	  ARGS --version
-	  OUTPUT_VARIABLE eigen_cxx_compiler_version
-	)
-	# here I try to extract the version string
-	# - TODO: this can most likely be improved and fixed
-    string(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1.\\2.\\3"
-      eigen_cxx_compiler_version ${eigen_cxx_compiler_version})
-	# again, here is room for improvement
-	# what if the compiler is not "g++" !?
-    set(${VAR} "g++${eigen_cxx_compiler_version}")
+    else()
+      set(${VAR} "na")
+    endif()
+  else()
+    # on all other system we rely on ${CMAKE_CXX_COMPILER}
+    # supporting a "--version" flag
+    exec_program( ${CMAKE_CXX_COMPILER}
+                  ARGS --version
+                  OUTPUT_VARIABLE eigen_cxx_compiler_version_raw
+                )
+    # first extract the compiler name which is the first word
+    string( REGEX REPLACE ".*(llvm\\-g\\+\\+|g\\+\\+|icpc|clang).*" "\\1"
+            eigen_cxx_compiler_name ${eigen_cxx_compiler_version_raw})
+
+    if(eigen_cxx_compiler_name MATCHES ".*g\\+\\+.*")
+      string( REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1.\\2.\\3"
+              eigen_cxx_compiler_version ${eigen_cxx_compiler_version_raw})
+    elseif(eigen_cxx_compiler_name MATCHES "icpc|clang")
+      string( REGEX REPLACE ".* ([0-9]*)\\.([0-9]*) .*" "\\1.\\2"
+              eigen_cxx_compiler_version ${eigen_cxx_compiler_version_raw})
+    else()
+      set(eigen_cxx_compiler_version "_")
+    endif()
+
+    set(${VAR} "${eigen_cxx_compiler_name}-${eigen_cxx_compiler_version}")
   endif()
 endmacro(ei_get_compilerver)

@@ -378,7 +386,17 @@
 endmacro(ei_set_build_string)

 macro(ei_is_64bit_env VAR)
-  if(CMAKE_CL_64)
+
+  file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/is64.cpp"
+      "int main() { return (sizeof(int*) == 8 ? 1 : 0); }
+      ")
+  try_run(run_res compile_res
+         ${CMAKE_CURRENT_BINARY_DIR} "${CMAKE_CURRENT_BINARY_DIR}/is64.cpp"
+          RUN_OUTPUT_VARIABLE run_output)
+
+  if(compile_res AND run_res)
+    set(${VAR} ${run_res})
+  elseif(CMAKE_CL_64)
     set(${VAR} 1)
   elseif("$ENV{Platform}" STREQUAL "X64") # nmake 64 bit
     set(${VAR} 1)


cmake: change again the modules install directory

Commit 4363c4d3683c7587dd3eea35875afe43d3116e80 changes it to a
location within the Elektra libdir, which is not inside the own CMake
modules but still used by CMake;
recent commit ad3c1169946eefbcc105284ada930472f58af9a8 changes it back
with no reason (possibly a merge mistake).

Change it as commit 4363c4d3683c7587dd3eea35875afe43d3116e80 intended,
so CMake modules are installed in the correct place for them.

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -424,7 +424,7 @@
     )

 set (TARGET_CMAKE_FOLDER
-		"share/cmake-${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}/Modules"
+		"lib${LIB_SUFFIX}/cmake/Elektra"
 		CACHE STRING
 		"This folder (below prefix) will be used to install cmake files."
     )


Use -mthreads when compiling with MinGW

Use -mthreads when compiling with MinGW

--- cmake/FindPthreads.cmake
+++ cmake/FindPthreads.cmake
@@ -71,7 +71,11 @@
 # TODO:
 # Command line option -lpthread gets defined twice...
 if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
-  set(Pthreads_PACKAGE_CXX_FLAGS "-pthread")
+  if(MINGW)
+    set(Pthreads_PACKAGE_CXX_FLAGS "-mthreads")
+  else()
+    set(Pthreads_PACKAGE_CXX_FLAGS "-pthread")
+  endif()
 endif()

 find_package_handle_standard_args(Pthreads DEFAULT_MSG


cmake - Add tools [ci skip]

cmake - Add tools [ci skip]

--- cmake/SiconosTools.cmake
+++ cmake/SiconosTools.cmake
@@ -390,3 +390,22 @@
   endforeach()
   set(${result} ${dirs})
 endmacro()
+
+
+# Replacement for list(FILTER ...) (see cmake doc)
+# when current cmake version < 3.6)
+# Usage :
+# list_filter(<listname> <matching expr>)
+# example:
+# set(mylist name src plugin)
+# list_filter(mylist src)
+# ==> mylist contains only name and plugin
+function(list_filter inout_list_name regex)
+  foreach(name IN LISTS ${inout_list_name})
+    string(FIND ${name} ${regex} result)
+    if(${result} GREATER -1)
+      list(REMOVE_ITEM ${inout_list_name} ${name})
+    endif()
+  endforeach()
+  set(${inout_list_name} ${${inout_list_name}} PARENT_SCOPE)
+endfunction()


reference xcfun v2.0.0a1

reference xcfun v2.0.0a1

changes have only been on the python-c++ interface side
which should not affect xcint

--- cmake/custom/xcfun.cmake
+++ cmake/custom/xcfun.cmake
@@ -7,7 +7,7 @@
   GIT_REPOSITORY
     https://github.com/dftlibs/xcfun.git
   GIT_TAG
-    ca137ba62577796b6cf916fbb83ab79784096ecf
+    v2.0.0a1
   )

 add_subdirectory(


debug

debug

--- external/CapnProto.cmake
+++ external/CapnProto.cmake
@@ -72,7 +72,7 @@
          GROUP_NAME SPEC_FILES SRC_PREFIX INCLUDE_DIR TARGET_DIR OUTPUT_FILES)
   add_custom_command(
     OUTPUT ${OUTPUT_FILES}
-    COMMAND dir ${BIN_PRE}
+    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}


Reduce error message to status to allow offline work

--- GitExternal.cmake
+++ GitExternal.cmake
@@ -133,7 +133,7 @@
       WORKING_DIRECTORY "${DIR}"
       )
     if(nok)
-      message(FATAL_ERROR "${DIR} git checkout ${TAG} failed: ${error}\n")
+      message(STATUS "${DIR} git checkout ${TAG} failed: ${error}\n")
     endif()
   endif()
 endfunction()


Beautify some target names

Beautify some target names

--- GitExternal.cmake
+++ GitExternal.cmake
@@ -137,7 +137,7 @@
   endif()

   file(RELATIVE_PATH __dir ${CMAKE_SOURCE_DIR} ${DIR})
-  string(REGEX REPLACE "[:/]" "-" __target "${__dir}")
+  string(REGEX REPLACE "[:/\\.]" "-" __target "${__dir}")
   if(TARGET ${__target}-rebase)
     return()
   endif()
@@ -232,7 +232,7 @@
         list(GET DATA 2 TAG)

         # Create a unique, flat name
-        string(REPLACE "/" "_" GIT_EXTERNAL_NAME ${DIR}_${PROJECT_NAME})
+        string(REPLACE "/" "-" GIT_EXTERNAL_NAME ${DIR}_${PROJECT_NAME})

         if(NOT TARGET update_git_external_${GIT_EXTERNAL_NAME}) # not done
           # pull in identified external


emscripten: add ENVIRONMENT=web to MINIMAL_RUNTIME

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -159,7 +159,7 @@
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s FETCH=1")
 endif()
 if (FIPS_EMSCRIPTEN_USE_MINIMAL_RUNTIME)
-    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s MINIMAL_RUNTIME=1")
+    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s MINIMAL_RUNTIME=1 -s ENVIRONMENT=web")
 endif()

 set(EMSC_EXE_LINKER_FLAGS "${EMSC_EXE_LINKER_FLAGS} --shell-file ${FIPS_EMSCRIPTEN_SHELL_HTML}")


Update FW

Update FW

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "4e2882999984a6262facff1c12b94c1a2c115682")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "cd8f39616c6cd09899c29faa2191e645b60d7235")

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


Update mdk - RGB-depth alignment

Update mdk - RGB-depth alignment

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "823893894f2ee5d5bc4d1ebf6bb920a58fa1e231")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "f81a69c4d259004213234511738af9df1142c2c7")

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


Workaround cmake/curl refusing to download a https file.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1379,7 +1379,8 @@
   # http://stackoverflow.com/questions/9689183/cmake-googletest
   ExternalProject_Add(
     googletest
-    URL https://github.com/google/googletest/archive/release-1.8.0.zip
+    GIT_REPOSITORY https://github.com/google/googletest.git
+    GIT_TAG release-1.8.0
     # TIMEOUT 10
     # # Force separate output paths for debug and release builds to allow easy
     # # identification of correct lib in subsequent TARGET_LINK_LIBRARIES commands


#1932 Fixed SSE instability on mingw32

#1932 Fixed SSE instability on mingw32

--- cmake/OpenCVCompilerOptions.cmake
+++ cmake/OpenCVCompilerOptions.cmake
@@ -1,18 +1,3 @@
-if (WIN32)
-  # mingw compiler is known to produce unstable SSE code with -O3 hence we are trying to use -O2 instead
-  if(CMAKE_COMPILER_IS_GNUCXX)
-    foreach(flags CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG)
-      string(REPLACE "-O3" "-O2" ${flags} "${${flags}}")
-    endforeach()
-  endif()
-
-  if(CMAKE_COMPILER_IS_GNUCC)
-    foreach(flags CMAKE_C_FLAGS CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_DEBUG)
-      string(REPLACE "-O3" "-O2" ${flags} "${${flags}}")
-    endforeach()
-  endif()
-endif()
-
 if(MSVC)
   if(CMAKE_CXX_FLAGS STREQUAL CMAKE_CXX_FLAGS_INIT)
     # override cmake default exception handling option
@@ -27,6 +12,21 @@
 set(OPENCV_EXTRA_EXE_LINKER_FLAGS "")
 set(OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE "")
 set(OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG "")
+
+if(MINGW)
+  # mingw compiler is known to produce unstable SSE code
+  # here we are trying to workaround the problem
+  include(CheckCXXCompilerFlag)
+  CHECK_CXX_COMPILER_FLAG(-mstackrealign HAVE_STACKREALIGN_FLAG)
+  if(HAVE_STACKREALIGN_FLAG)
+    set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -mstackrealign")
+  else()
+    CHECK_CXX_COMPILER_FLAG(-mpreferred-stack-boundary=2 HAVE_PREFERRED_STACKBOUNDARY_FLAG)
+    if(HAVE_PREFERRED_STACKBOUNDARY_FLAG)
+      set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -mstackrealign")
+    endif()
+  endif()
+endif()

 if(CMAKE_COMPILER_IS_GNUCXX)
   # High level of warnings.


Make use of the gcctoolchain option (needed for llvm/clang on Linux)

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -103,9 +103,18 @@
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
   endif()
 endif()
+
 if(libcxx)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
 endif()
+
+if(gcctoolchain)
+  CHECK_CXX_COMPILER_FLAG("--gcc-toolchain=${gcctoolchain}" HAS_GCCTOOLCHAIN)
+  if(HAS_GCCTOOLCHAIN)
+     set(CMAKE_CXX_FLAGS "--gcc-toolchain=${gcctoolchain} ${CMAKE_CXX_FLAGS}")
+  endif()
+endif()
+
 if(gnuinstall)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DR__HAVE_CONFIG")
 endif()


Remove unused

Remove unused

--- cmake/modules/CommonFindMod.cmake
+++ cmake/modules/CommonFindMod.cmake
@@ -1,120 +0,0 @@
-#  Copyright 2010-2014 Matus Chochlik. Distributed under the Boost
-#  Software License, Version 1.0. (See accompanying file
-#  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-#
-macro(ogles_gpgpu_common_find_module PREFIX PC_NAME HEADER LIBRARY)
-  unset(${PREFIX}_FOUND)
-  unset(${PREFIX}_DEFINITIONS)
-  unset(${PREFIX}_INCLUDE_DIRS)
-  unset(${PREFIX}_LIBRARY_DIRS)
-  unset(${PREFIX}_LIBRARIES)
-
-  if(PKG_CONFIG_FOUND)
-    pkg_check_modules(PC_${PREFIX} QUIET ${PC_NAME})
-    if(PC_${PREFIX}_FOUND)
-      find_library(
-        ${PREFIX}_FULL_LIB_PATH NAMES ${PC_${PREFIX}_LIBRARIES}
-        PATHS ${PC_${PREFIX}_LIBRARY_DIRS}
-        NO_DEFAULT_PATH
-        )
-      if("${${PREFIX}_FULL_LIB_PATH}" MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}$")
-        set(${PREFIX}_DEFINITIONS "${PC_${PREFIX}_STATIC_DEFINITIONS}")
-        set(${PREFIX}_INCLUDE_DIRS "${PC_${PREFIX}_STATIC_INCLUDE_DIRS}")
-        set(${PREFIX}_LIBRARY_DIRS "${PC_${PREFIX}_STATIC_LIBRARY_DIRS}")
-        set(${PREFIX}_LIBRARIES "${PC_${PREFIX}_STATIC_LIBRARIES}")
-        foreach(TMP_LIBRARY ${PC_${PREFIX}_STATIC_LIBRARIES})
-          find_library(
-            ${TMP_LIBRARY}_FULL_LIB_PATH NAMES ${TMP_LIBRARY}
-            HINTS ${PC_${PREFIX}_STATIC_LIBRARY_DIRS}
-            )
-          set(${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARIES} ${${TMP_LIBRARY}_FULL_LIB_PATH})
-          unset(TMP_FULL_LIB_PATH)
-        endforeach()
-      else()
-        set(${PREFIX}_DEFINITIONS "${PC_${PREFIX}_DEFINITIONS}")
-        set(${PREFIX}_INCLUDE_DIRS "${PC_${PREFIX}_INCLUDE_DIRS}")
-        set(${PREFIX}_LIBRARY_DIRS "${PC_${PREFIX}_LIBRARY_DIRS}")
-        foreach(TMP_LIBRARY ${PC_${PREFIX}_LIBRARIES})
-          find_library(
-            ${TMP_LIBRARY}_FULL_LIB_PATH NAMES ${TMP_LIBRARY}
-            HINTS ${LIBRARY_SEARCH_PATHS} ${PC_${PREFIX}_LIBRARY_DIRS}
-            )
-          set(${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARIES} ${${TMP_LIBRARY}_FULL_LIB_PATH})
-          unset(TMP_FULL_LIB_PATH)
-        endforeach()
-      endif()
-      unset(${PREFIX}_FULL_LIB_PATH)
-    endif()
-  endif()
-
-  if(NOT(${PREFIX}_INCLUDE_DIRS))
-    unset(${PREFIX}_INCLUDE_DIRS)
-    find_path(
-      ${PREFIX}_INCLUDE_DIRS ${HEADER}
-      PATHS ${HEADER_SEARCH_PATHS}
-      NO_DEFAULT_PATH
-      )
-  endif()
-  if(NOT(${PREFIX}_INCLUDE_DIRS))
-    unset(${PREFIX}_INCLUDE_DIRS)
-    find_path(${PREFIX}_INCLUDE_DIRS ${HEADER})
-  endif()
-
-  if(NOT ${PREFIX}_LIBRARIES)
-    find_library(
-      ${PREFIX}_LIBRARIES NAMES ${LIBRARY}
-      PATHS ${LIBRARY_SEARCH_PATHS}
-      NO_DEFAULT_PATH
-      )
-  endif()
-  if(NOT ${PREFIX}_LIBRARIES)
-    find_library(${PREFIX}_LIBRARIES NAMES ${LIBRARY})
-  endif()
-
-  set(${PREFIX}_FOUND 0)
-  if((${PREFIX}_INCLUDE_DIRS) AND (${PREFIX}_LIBRARIES))
-
-    if(EXISTS ${PROJECT_SOURCE_DIR}/config/ext_lib/test_${PREFIX}.cpp)
-      if(NOT ${PREFIX}_LIBRARIES)
-        set(${PREFIX}_LIBRARIES "")
-      endif()
-      configure_file(
-        ${PROJECT_SOURCE_DIR}/config/ext_lib/test_${PREFIX}.cpp
-        ${PROJECT_BINARY_DIR}/ext_lib/test_${PREFIX}.cpp
-        )
-      try_run(
-        RUNS_WITH_${PREFIX} COMPILES_WITH_${PREFIX}
-        "${PROJECT_BINARY_DIR}/ext_lib"
-        "${PROJECT_BINARY_DIR}/ext_lib/test_${PREFIX}.cpp"
-        COMPILE_DEFINITIONS
-        "${OGLES_GPGPU_CPP_STD_COMPILER_SWITCH} ${${PREFIX}_DEFINITIONS}"
-        CMAKE_FLAGS
-        "-DINCLUDE_DIRECTORIES:STRING=${${PREFIX}_INCLUDE_DIRS} "
-        "-DLIBRARY_DIRECTORIES:STRING=${${PREFIX}_LIBRARY_DIRS} "
-        "-DLINK_DIRECTORIES:STRING=${${PREFIX}_LIBRARY_DIRS} "
-        "-DLINK_LIBRARIES:STRING=${${PREFIX}_LIBRARIES} "
-        )
-      if(COMPILES_WITH_${PREFIX})
-        if(RUNS_WITH_${PREFIX} EQUAL 0)
-          set(${PREFIX}_FOUND 1)
-          message(STATUS
-            "Found ${PREFIX}: "
-            "${${PREFIX}_INCLUDE_DIRS} "
-            "${${PREFIX}_LIBRARIES}"
-            )
-        else()
-          message(STATUS "Could NOT execute with ${PREFIX}")
-        endif()
-      else()
-        message(STATUS "Could NOT compile or link with ${PREFIX}")
-      endif()
-      unset(RUNS_WITH_${PREFIX})
-      unset(COMPILES_WITH_${PREFIX})
-    else()
-      set(${PREFIX}_FOUND 1)
-      message(STATUS "Found ${PREFIX}: ${${PREFIX}_INCLUDE_DIRS} ${${PREFIX}_LIBRARIES}")
-    endif()
-  else()
-    message(STATUS "Could NOT find ${PREFIX}")
-  endif()
-endmacro()


HIP_CLANG_FLAGS replaces HIP_HCC_FLAGS for ROCm later than 4.0 (#6955)

* HIP_CLANG_FLAGS replaces HIP_HCC_FLAGS for ROCm later than 4.0

HIP_HCC_FLAGS was deprecated in ROCm4.x

--- cmake/onnxruntime_providers.cmake
+++ cmake/onnxruntime_providers.cmake
@@ -1005,13 +1005,13 @@
       #list(APPEND HIP_CXX_FLAGS -O0)
   endif(CMAKE_BUILD_TYPE MATCHES Debug)

-  list(APPEND HIP_HCC_FLAGS ${HIP_CXX_FLAGS})
-
-  # Let hcc to generate GPU code during compilation
-  list(APPEND HIP_HCC_FLAGS -fno-gpu-rdc)
+  list(APPEND HIP_CLANG_FLAGS ${HIP_CXX_FLAGS})
+
+  # Generate GPU code during compilation
+  list(APPEND HIP_CLANG_FLAGS -fno-gpu-rdc)

   # Generate GPU code for GFX9 Generation
-  list(APPEND HIP_HCC_FLAGS --amdgpu-target=gfx906 --amdgpu-target=gfx908)
+  list(APPEND HIP_CLANG_FLAGS --amdgpu-target=gfx906 --amdgpu-target=gfx908)

   hip_add_library(onnxruntime_providers_rocm ${onnxruntime_providers_rocm_src})


Cacheable boost

Cacheable boost

Fix issue #106

--- cmake/projects/Boost/hunter.cmake
+++ cmake/projects/Boost/hunter.cmake
@@ -8,6 +8,7 @@
 endif()

 include(hunter_add_version)
+include(hunter_cacheable)
 include(hunter_cmake_args)
 include(hunter_download)
 include(hunter_pick_scheme)
@@ -152,4 +153,5 @@
 )

 hunter_pick_scheme(DEFAULT url_sha1_boost)
+hunter_cacheable(Boost)
 hunter_download(PACKAGE_NAME Boost)


build_activemqcpp: xpBuildDeps() call ordering

--- projects/activemqcpp.cmake
+++ projects/activemqcpp.cmake
@@ -28,6 +28,7 @@
   if(NOT (XP_DEFAULT OR XP_PRO_ACTIVEMQCPP))
     return()
   endif()
+  xpBuildDeps(depTgts ${PRO_ACTIVEMQCPP})
   xpGetArgValue(${PRO_ACTIVEMQCPP} ARG NAME VALUE NAME)
   xpGetArgValue(${PRO_ACTIVEMQCPP} ARG VER VALUE VER)
   set(XP_CONFIGURE
@@ -42,6 +43,5 @@
     ${STAGE_DIR}/share/cmake/usexp-${NAME}-config.cmake
     @ONLY NEWLINE_STYLE LF
     )
-  xpBuildDeps(depTgts ${PRO_ACTIVEMQCPP})
   xpCmakeBuild(activemqcpp "${depTgts}" "${XP_CONFIGURE}")
 endfunction()


Remove --blocking-factor from tar.  May be causing problems on AIX. Worth future investigation, but not now. #1863

--- build/cmake/TarGz.cmake
+++ build/cmake/TarGz.cmake
@@ -1,7 +1,7 @@
 add_custom_command(
 	OUTPUT ${CPACK_PACKAGE_FILE_NAME}.tar.gz
 	COMMAND mv ARGS ${CMAKE_INSTALL_PREFIX} ${CPACK_PACKAGE_FILE_NAME}
-	COMMAND tar ARGS czf ${CPACK_PACKAGE_FILE_NAME}.tar.gz --owner=0 --group=0 --numeric-owner --blocking-factor=2048 ${CPACK_PACKAGE_FILE_NAME}
+	COMMAND tar ARGS czf ${CPACK_PACKAGE_FILE_NAME}.tar.gz --owner=0 --group=0 --numeric-owner ${CPACK_PACKAGE_FILE_NAME}
 	COMMAND mv ARGS ${CPACK_PACKAGE_FILE_NAME} ${CMAKE_INSTALL_PREFIX}
 )
 add_custom_target(targz DEPENDS ${CPACK_PACKAGE_FILE_NAME}.tar.gz)


Improve some cmake functions.

Improve some cmake functions.

--- src/inserts/functions.cmake
+++ src/inserts/functions.cmake
@@ -832,9 +832,8 @@
     if (N EQUAL 0)
         return()
     endif()
-    list(GET src2 0 f)
-    set_source_files_properties(${f} PROPERTIES HEADER_FILE_ONLY True)
-    set(src ${src} ${f} PARENT_SCOPE)
+    set_source_files_properties(${src2} PROPERTIES HEADER_FILE_ONLY True)
+    #set(src ${src} ${src2} PARENT_SCOPE)
 endfunction()

 ########################################
@@ -844,9 +843,12 @@
 function(set_src_compiled s)
     set(src2 ${src})
     list(FILTER src2 INCLUDE REGEX "${s}")
-    list(GET src2 0 f)
-    set_source_files_properties(${f} PROPERTIES HEADER_FILE_ONLY False)
-    set(src ${src} ${f} PARENT_SCOPE)
+    list(LENGTH src2 N)
+    if (N EQUAL 0)
+        return()
+    endif()
+    set_source_files_properties(${src2} PROPERTIES HEADER_FILE_ONLY False)
+    #set(src ${src} ${src2} PARENT_SCOPE)
 endfunction()

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


[build] set linker parameters in a single way (for stdlib) (#30596)

Match the same fix as #30339 for `AddSwiftStdlib.cmake`.

Addresses rdar://problem/60791444

--- stdlib/cmake/modules/AddSwiftStdlib.cmake
+++ stdlib/cmake/modules/AddSwiftStdlib.cmake
@@ -802,26 +802,18 @@
     # Include LLVM Bitcode slices for iOS, Watch OS, and Apple TV OS device libraries.
     if(SWIFT_EMBED_BITCODE_SECTION AND NOT SWIFTLIB_SINGLE_DONT_EMBED_BITCODE)
       if(${SWIFTLIB_SINGLE_SDK} MATCHES "(I|TV|WATCH)OS")
-        # The two branches of this if statement accomplish the same end result
-        # We are simply accounting for the fact that on CMake < 3.16
-        # using a generator expression to
-        # specify a LINKER: argument does not work,
+        # Please note that using a generator expression to fit
+        # this in a single target_link_options does not work
+        # (at least in CMake 3.15 and 3.16),
         # since that seems not to allow the LINKER: prefix to be
         # evaluated (i.e. it will be added as-is to the linker parameters)
-        if(CMAKE_VERSION VERSION_LESS 3.16)
+        target_link_options(${target} PRIVATE
+          "LINKER:-bitcode_bundle"
+          "LINKER:-lto_library,${LLVM_LIBRARY_DIR}/libLTO.dylib")
+
+        if(SWIFT_EMBED_BITCODE_SECTION_HIDE_SYMBOLS)
           target_link_options(${target} PRIVATE
-            "LINKER:-bitcode_bundle"
-            "LINKER:-lto_library,${LLVM_LIBRARY_DIR}/libLTO.dylib")
-
-          if(SWIFT_EMBED_BITCODE_SECTION_HIDE_SYMBOLS)
-            target_link_options(${target} PRIVATE
-              "LINKER:-bitcode_hide_symbols")
-          endif()
-        else()
-          target_link_options(${target} PRIVATE
-            "LINKER:-bitcode_bundle"
-            $<$<BOOL:SWIFT_EMBED_BITCODE_SECTION_HIDE_SYMBOLS>:"LINKER:-bitcode_hide_symbols">
-            "LINKER:-lto_library,${LLVM_LIBRARY_DIR}/libLTO.dylib")
+            "LINKER:-bitcode_hide_symbols")
         endif()
       endif()
     endif()


Use cppunit/Portability.h to dictate CPPUNIT_VERSION instead of cppunit/config-auto.h

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

--- cmake/FindCppUnit.cmake
+++ cmake/FindCppUnit.cmake
@@ -68,7 +68,7 @@
 The following cache variables may also be set:

 ``CppUnit_INCLUDE_DIR``
-  The directory containing ``cppunit/config-auto.h``.
+  The directory containing ``cppunit/Portability.h``.
 ``CppUnit_LIBRARY``
   The path to the CppUnit library.

@@ -124,14 +124,14 @@
   )

 # Look for a standard cppunit header file.
-FIND_PATH ( CppUnit_INCLUDE_DIR cppunit/config-auto.h
+FIND_PATH ( CppUnit_INCLUDE_DIR cppunit/Portability.h
   NO_DEFAULT_PATH
   PATHS ${_CPPUNIT_INCLUDE_SEARCH_DIRS}
   PATH_SUFFIXES include
   )

-IF ( EXISTS "${CppUnit_INCLUDE_DIR}/cppunit/config-auto.h" )
-  FILE ( STRINGS "${CppUnit_INCLUDE_DIR}/cppunit/config-auto.h"
+IF ( EXISTS "${CppUnit_INCLUDE_DIR}/cppunit/Portability.h" )
+  FILE ( STRINGS "${CppUnit_INCLUDE_DIR}/cppunit/Portability.h"
     _cppunit_version_string REGEX "#define CPPUNIT_VERSION "
     )
   STRING ( REGEX REPLACE "#define CPPUNIT_VERSION +\"(.+)\".*$" "\\1"


add BLAS dependency in FindSuperLU.cmake

--- cmake/FindSuperLU.cmake
+++ cmake/FindSuperLU.cmake
@@ -3,19 +3,29 @@
   set(SUPERLU_FIND_QUIETLY TRUE)
 endif (SUPERLU_INCLUDES AND SUPERLU_LIBRARIES)

-find_path(SUPERLU_INCLUDES
-  NAMES
-  superlu/supermatrix.h
-  PATHS
-  $ENV{SUPERLUDIR}
-  ${INCLUDE_INSTALL_DIR}
-)
+find_package(BLAS)

-find_library(SUPERLU_LIBRARIES superlu PATHS $ENV{SUPERLUDIR} ${LIB_INSTALL_DIR})
+if(BLAS_FOUND)
+
+  find_path(SUPERLU_INCLUDES
+    NAMES
+    superlu/supermatrix.h
+    PATHS
+    $ENV{SUPERLUDIR}
+    ${INCLUDE_INSTALL_DIR}
+  )

-if(SUPERLU_LIBRARIES AND CMAKE_COMPILER_IS_GNUCXX)
-  set(SUPERLU_LIBRARIES ${SUPERLU_LIBRARIES} -lgfortran)
-endif(SUPERLU_LIBRARIES AND CMAKE_COMPILER_IS_GNUCXX)
+  find_library(SUPERLU_LIBRARIES superlu PATHS $ENV{SUPERLUDIR} ${LIB_INSTALL_DIR})
+
+  if(SUPERLU_LIBRARIES AND CMAKE_COMPILER_IS_GNUCXX)
+    set(SUPERLU_LIBRARIES ${SUPERLU_LIBRARIES} -lgfortran)
+  endif(SUPERLU_LIBRARIES AND CMAKE_COMPILER_IS_GNUCXX)
+
+  if(SUPERLU_LIBRARIES)
+    set(SUPERLU_LIBRARIES ${SUPERLU_LIBRARIES} ${BLAS_LIBRARIES})
+  endif(SUPERLU_LIBRARIES)
+
+endif(BLAS_FOUND)

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(SUPERLU DEFAULT_MSG


Rolled back to a working version with quotes

--- cmake/FindCUDA_wrap.cmake
+++ cmake/FindCUDA_wrap.cmake
@@ -14,7 +14,7 @@
   if (CMAKE_COMPILER_IS_GNUCC)
     set (CUDA_PROPAGATE_HOST_FLAGS OFF)
     if (CMAKE_C_FLAGS)
-        set (CUDA_NVCC_FLAGS --compiler-options "${CMAKE_C_FLAGS}")
+        set (CUDA_NVCC_FLAGS "--compiler-options \"${CMAKE_C_FLAGS}\"")
     endif ()
   endif ()


Linux fixes.

Linux fixes.

--- cmake/FindGstreamer.cmake
+++ cmake/FindGstreamer.cmake
@@ -94,6 +94,12 @@
                                        DOC "gstrtsp library to link with"
                                        NO_SYSTEM_ENVIRONMENT_PATH)

+FIND_LIBRARY(GSTREAMER_gstrtspserver_LIBRARY NAMES gstrtspserver-1.0 libgstrtspserver-1.0
+                                       PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
+                                       ENV LIB
+                                       DOC "gstrtsp library to link with"
+                                       NO_SYSTEM_ENVIRONMENT_PATH)
+
 FIND_LIBRARY(GSTREAMER_gstsdp_LIBRARY NAMES gstsdp-1.0 libgstsdp-1.0
                                       PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
                                       ENV LIB


cmake: fix renderdoc cmake script

cmake: fix renderdoc cmake script

--- cmake/FindRenderDoc.cmake
+++ cmake/FindRenderDoc.cmake
@@ -13,19 +13,19 @@
 # RENDERDOC_LIBRARY
 # RENDERDOC_FOUND

-set(RENDERDOC_ROOT CACHE PATH "RenderDoc installation directory")
+# Temporarily override suffixes to allow correct DLL search on WIN32
+set(RENDERDOC_SUFFIXES_SAVE ${CMAKE_FIND_LIBRARY_SUFFIXES})
+
+if(WIN32)
+    # Use a sensible default, but we let you change it since it's in the cache
+    set(RENDERDOC_ROOT "C:/Program Files/RenderDoc" CACHE PATH "RenderDoc installation directory")
+    set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
+endif()

 find_path(RENDERDOC_INCLUDE_DIR
     NAMES renderdoc.h renderdoc_app.h
     PATHS ${RENDERDOC_ROOT}
     DOC "Include path for RenderDoc's API")
-
-# Temporarily override suffixes to allow correct DLL search on WIN32
-set(RENDERDOC_SUFFIXES_SAVE ${CMAKE_FIND_LIBRARY_SUFFIXES})
-
-if(WIN32)
-    set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
-endif()

 find_library(RENDERDOC_LIBRARY
     NAMES renderdoc


Try to fix CI stuff.

Try to fix CI stuff.

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -13,13 +13,13 @@

 # Gitlab CI support
-if ($ENV{CI_PIPELINE_ID})
+if (DEFINED ENV{CI_PIPELINE_ID})
 	add_definitions(-DCI_PIPELINE_ID=$ENV{CI_PIPELINE_ID})
 endif()
-if ($ENV{CI_COMMIT_SHA})
+if (DEFINED ENV{CI_COMMIT_SHA})
 	add_definitions(-DCI_COMMIT_SHA=$ENV{CI_COMMIT_SHA})
 endif()
-if ($ENV{CI_COMMIT_REF_SLUG})
+if (DEFINED ENV{CI_COMMIT_REF_SLUG})
 	add_definitions(-DCI_COMMIT_REF_SLUG=$ENV{CI_COMMIT_REF_SLUG})
 	if (string_starts_with($ENV{CI_COMMIT_REF_SLUG} release))
 		set(DEV_BUILD 0)


Fixed some issues with the cmake code coverage script (incorrect filename when building debug, since it then has '-d' postfix etc.)

--- cmake/code-coverage.cmake
+++ cmake/code-coverage.cmake
@@ -8,8 +8,8 @@
     message("CODE COVERAGE - Current compiler is ${CMAKE_CXX_COMPILER_ID}. Code-coverage only available for GCC.")
     set(SKIP_COVERAGE true)

-elseif(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
-    message("CODE COVERAGE - Code-coverage only available when building for Debug.\n")
+elseif(NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT CMAKE_BUILD_TYPE STREQUAL "Coverage")
+    message("CODE COVERAGE - Code-coverage only available when building for Debug or Coverage.\n")
     set(SKIP_COVERAGE true)

 elseif(NOT GCOV)
@@ -52,7 +52,7 @@
     set(multiValueArgs "")
     cmake_parse_arguments(args "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

-    # Set compile flags to produce coverage files, and make sure dependant targets link correctly.
+    # Set flags to produce coverage files when compiling target
     target_compile_options( ${args_TARGET}
 	    PRIVATE
 		    -g -O0 --coverage
@@ -69,22 +69,25 @@
     )

     set(TARGET_COVERAGE ${args_TARGET}_coverage_analysis)
-    set(OUTPUT_DIR ${TARGET_BINARY_DIR}/${TARGET_COVERAGE})
-    set(OUTPUT_FILE ${OUTPUT_DIR}/${args_TARGET}.info)
+    set(OUTPUT_DIR "${TARGET_BINARY_DIR}/${TARGET_COVERAGE}")
+    set(GCOV_INFO_FILE "${args_TARGET}_coverage.info")

     add_custom_target( ${TARGET_COVERAGE}
-        # Cleanup lcov
+        COMMAND ${CMAKE_COMMAND} -E make_directory ${TARGET_COVERAGE}
+        # Reset execution counters
         COMMAND ${LCOV} --directory . --zerocounters
         # Run tests
-        COMMAND ${args_TEST_RUNNER}
+        COMMAND "./$<TARGET_FILE_NAME:${args_TEST_RUNNER}>"
+        # Create test coverage data
+        COMMAND ${LCOV} --capture --directory . --output-file "${GCOV_INFO_FILE}"
         # Generating report
-        COMMAND ${CMAKE_COMMAND} -E make_directory ${OUTPUT_DIR}
-        COMMAND ${LCOV} --directory . --capture --output-file "${OUTPUT_FILE}"
-        COMMAND ${GENHTML} --output-directory "${OUTPUT_DIR}" "${OUTPUT_FILE}"
+        COMMAND ${GENHTML} --output-directory "${OUTPUT_DIR}" "${GCOV_INFO_FILE}"
+        # Cleanup
+        COMMAND ${CMAKE_COMMAND} -E remove "${GCOV_INFO_FILE}"

         DEPENDS ${args_TEST_RUNNER}
-        WORKING_DIRECTORY ${TARGET_BINARY_DIR}
-        COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."
+        WORKING_DIRECTORY ./ # Relative to the build tree directory corresponding to the current source directory
+        COMMENT "Running code coverage analysis (gcov) and generating report."
     )

     add_dependencies( ${COVERAGE_ALL}


Fix working on list when its not a list

Fix working on list when its not a list

Change-Id: Iec98b0c59131546d25bce2149ad050e02a0bc358

--- cmake/internal/doit.cmake
+++ cmake/internal/doit.cmake
@@ -442,6 +442,9 @@

 MACRO(INTERNAL_DOIT_REMOVE_DUPLICATES)
-	LIST(REMOVE_DUPLICATES GoogleMock_PACKAGE_LIBS)
-	SET(GoogleMock_PACKAGE_LIBS  ${GoogleMock_PACKAGE_LIBS}	CACHE INTERNAL "")
+	LIST(LENGTH GoogleMock_PACKAGE_LIBS ListLength)
+	IF(NOT  ${ListLength} EQUAL 0)
+		LIST(REMOVE_DUPLICATES GoogleMock_PACKAGE_LIBS)
+		SET(GoogleMock_PACKAGE_LIBS  ${GoogleMock_PACKAGE_LIBS}	CACHE INTERNAL "")
+	ENDIF()
 ENDMACRO(INTERNAL_DOIT_REMOVE_DUPLICATES)


Prevent search for disabled optional dependencies in targets.

--- cmake/pcl_pclconfig.cmake
+++ cmake/pcl_pclconfig.cmake
@@ -37,7 +37,11 @@
         if(_opt_deps)
             set(PCLCONFIG_OPTIONAL_DEPENDENCIES "${PCLCONFIG_OPTIONAL_DEPENDENCIES}set(pcl_${_ss}_opt_dep ")
             foreach(_opt_dep ${_opt_deps})
-                set(PCLCONFIG_OPTIONAL_DEPENDENCIES "${PCLCONFIG_OPTIONAL_DEPENDENCIES}${_opt_dep} ")
+                string(TOUPPER "WITH_${_opt_dep}" _tmp)
+                string(REGEX REPLACE "-(.*)" "" _condition ${_tmp}) #libusb-1.0 case
+                if(${_condition})
+                  set(PCLCONFIG_OPTIONAL_DEPENDENCIES "${PCLCONFIG_OPTIONAL_DEPENDENCIES}${_opt_dep} ")
+                endif()
             endforeach(_opt_dep)
             set(PCLCONFIG_OPTIONAL_DEPENDENCIES "${PCLCONFIG_OPTIONAL_DEPENDENCIES})\n")
         endif(_opt_deps)


ENH: quick stab at a rollup button

ENH: quick stab at a rollup button

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -15,6 +15,7 @@
 SET (PROJECT_URL "http://www.itk.org/")

 # Dart server configuration
+SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/insight-rollup-dashboard.sh")
 SET (CVS_WEB_URL "http://${DROP_SITE}/cgi-bin/cvsweb.cgi/Insight/")
 SET (CVS_WEB_CVSROOT "Insight")


cant put doctest as a precompiled header

--- build/build.cmake
+++ build/build.cmake
@@ -60,7 +60,6 @@
 )

 target_precompile_headers(core PRIVATE
-	<3rdParty/doctest.h>
     <3rdParty/fmt.h>
     <3rdParty/function2.h>
     <3rdParty/spdlog.h>


python: update md5s for new prebuilt python

--- versions.cmake
+++ versions.cmake
@@ -48,11 +48,11 @@
   if (64bit_build)
     add_revision(python
       URL "http://www.tomviz.org/files/python-2.7.3-win64.tar.gz"
-      URL_MD5 "4318b8f771eda5606d9ce7f0be9f82e1")
+      URL_MD5 "8df6359a4fc9101b51496e5e618383b1")
   else ()
     add_revision(python
       URL "http://www.tomviz.org/files/python-2.7.3-win32.tar.gz"
-      URL_MD5 "6ba441784a672e08379d23ddd61146f0")
+      URL_MD5 "4d78cef437fe6441791d14d14b5d57ee")
   endif ()
 else()
   add_revision(python


Bump TubeTK to get the interactive segment tubes fixes/improvements

--- CMake/Superbuild/External_TubeTK.cmake
+++ CMake/Superbuild/External_TubeTK.cmake
@@ -45,7 +45,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "https://github.com/KitwareMedical/TubeTK.git"
-    GIT_TAG "be9483afc58802298f4081db7127d056c5154715"
+    GIT_TAG "a80bcaafef4a30e07475e9808dbfd81d0b4c1201"
     CMAKE_CACHE_ARGS
       -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}


Dismiss old versions and generically parse supported versions

--- CMake/mitkFunctionGetMSVCVersion.cmake
+++ CMake/mitkFunctionGetMSVCVersion.cmake
@@ -7,44 +7,13 @@
 function(mitkFunctionGetMSVCVersion )

 if(MSVC)
-  if(MSVC_VERSION EQUAL 1600)
-    set(VISUAL_STUDIO_VERSION_MAJOR "10" PARENT_SCOPE)
-    set(VISUAL_STUDIO_VERSION_MINOR "0" PARENT_SCOPE)
-    set(VISUAL_STUDIO_PRODUCT_NAME "Visual Studio 2010" PARENT_SCOPE)
-  elseif(MSVC_VERSION EQUAL 1700)
-    set(VISUAL_STUDIO_VERSION_MAJOR "11" PARENT_SCOPE)
-    set(VISUAL_STUDIO_VERSION_MINOR "0" PARENT_SCOPE)
-    set(VISUAL_STUDIO_PRODUCT_NAME "Visual Studio 2012" PARENT_SCOPE)
-  elseif(MSVC_VERSION EQUAL 1800)
-    set(VISUAL_STUDIO_VERSION_MAJOR "12" PARENT_SCOPE)
-    set(VISUAL_STUDIO_VERSION_MINOR "0" PARENT_SCOPE)
-    set(VISUAL_STUDIO_PRODUCT_NAME "Visual Studio 2013" PARENT_SCOPE)
-  elseif(MSVC_VERSION EQUAL 1900)
-    set(VISUAL_STUDIO_VERSION_MAJOR "14" PARENT_SCOPE)
-    set(VISUAL_STUDIO_VERSION_MINOR "0" PARENT_SCOPE)
-    set(VISUAL_STUDIO_PRODUCT_NAME "Visual Studio 2015" PARENT_SCOPE)
-  elseif(MSVC_VERSION EQUAL 1910)
-    set(VISUAL_STUDIO_VERSION_MAJOR "14" PARENT_SCOPE)
-    set(VISUAL_STUDIO_VERSION_MINOR "0" PARENT_SCOPE)
+  if(MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 2000)
     set(VISUAL_STUDIO_PRODUCT_NAME "Visual Studio 2017" PARENT_SCOPE)
-  elseif(MSVC_VERSION EQUAL 1911)
-    set(VISUAL_STUDIO_VERSION_MAJOR "14" PARENT_SCOPE)
-    set(VISUAL_STUDIO_VERSION_MINOR "1" PARENT_SCOPE)
-    set(VISUAL_STUDIO_PRODUCT_NAME "Visual Studio 2017" PARENT_SCOPE)
-  elseif(MSVC_VERSION EQUAL 1912)
-    set(VISUAL_STUDIO_VERSION_MAJOR "14" PARENT_SCOPE)
-    set(VISUAL_STUDIO_VERSION_MINOR "2" PARENT_SCOPE)
-    set(VISUAL_STUDIO_PRODUCT_NAME "Visual Studio 2017" PARENT_SCOPE)
-  elseif(MSVC_VERSION EQUAL 1913)
-    set(VISUAL_STUDIO_VERSION_MAJOR "14" PARENT_SCOPE)
-    set(VISUAL_STUDIO_VERSION_MINOR "3" PARENT_SCOPE)
-    set(VISUAL_STUDIO_PRODUCT_NAME "Visual Studio 2017" PARENT_SCOPE)
-  elseif(MSVC_VERSION EQUAL 1914)
-    set(VISUAL_STUDIO_VERSION_MAJOR "14" PARENT_SCOPE)
-    set(VISUAL_STUDIO_VERSION_MINOR "4" PARENT_SCOPE)
-    set(VISUAL_STUDIO_PRODUCT_NAME "Visual Studio 2017" PARENT_SCOPE)
+    set(VISUAL_STUDIO_VERSION_MAJOR 14 PARENT_SCOPE)
+    string(SUBSTRING ${MSVC_VERSION} 3 -1 version_minor)
+    set(VISUAL_STUDIO_VERSION_MINOR ${version_minor} PARENT_SCOPE)
   else()
-    message(WARNING "Unknown Visual Studio version ${MSVC_VERSION}. Please update CMake/mitkFunctionGetMSVCVersion.cmake.")
+    message(WARNING "Unknown Visual Studio version ${MSVC_VERSION} (CMake/mitkFunctionGetMSVCVersion.cmake)")
   endif()

   if("${CMAKE_GENERATOR}" MATCHES ".*Win64")


added patch version for building package

--- CMakeModules/script_BuildPackage.cmake
+++ CMakeModules/script_BuildPackage.cmake
@@ -7,6 +7,7 @@
      "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
 set (CPACK_PACKAGE_VERSION_MAJOR "${CMAKE_OTA_VERSION_NUMBER_MAJOR}")
 set (CPACK_PACKAGE_VERSION_MINOR "${CMAKE_OTA_VERSION_NUMBER_MINOR}")
+set (CPACK_PACKAGE_VERSION_PATCH "${CMAKE_OTA_VERSION_NUMBER_PATCH}")
 set (CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/Resources/icon.ico")
 #set (CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/Resources/icon.bmp") -- FILE NOT FOUND -- ??
 if( WIN32 AND NOT UNIX )
@@ -15,6 +16,8 @@
 endif()

 message (STATUS "BUILD PACKAGE STATUS MESSAGE : building version ${CMAKE_OTA_FULL_VERSION} " )
+message (STATUS "BUILD PACKAGE STATUS MESSAGE : building version major ${CMAKE_OTA_VERSION_NUMBER_MAJOR} " )
+message (STATUS "BUILD PACKAGE STATUS MESSAGE : building version minor ${CMAKE_OTA_VERSION_NUMBER_MINOR} " )

 set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CMAKE_PROJECT_NAME}-${CMAKE_OTA_FULL_VERSION}")


Working on CMake documentaiton.

Working on CMake documentaiton.

--- INSTALL.cmake
+++ INSTALL.cmake
@@ -1,5 +1,5 @@
-Documentation for getting and building netCDF
-*********************************************
+Documentation for getting and building netCDF with CMake
+********************************************************

 This document is for getting and building the netCDF C library and
 utilities, version 4.3.  Other libraries that depend on the netCDF C
@@ -44,8 +44,22 @@
 Once you have downloaded and unpacked the distribution, see the
 following section on building.

-Building NetCDF
-***************
+For additional instructions on getting and building the netCDF
+dependencies, please see the 'INSTALL' text file.
+
+Getting CMake
+*************
+
+CMake, a software configuration and testing tool, is maintained by
+Kitware.  CMake is available in many linux package management
+systems, as well as the 'macports' package management system for
+OSX.
+
+CMake may also be downloaded for these platforms, as well as Windows,
+from the CMake website at http://www.cmake.org.
+
+Building NetCDF with CMake
+**************************

 The netCDF-C library and utilities requires 3rd party libraries for
 full functionality.
@@ -55,90 +69,12 @@
   *  Building with HDF4 Support
   *  Building with Parallel I/O Support

-Building with NetCDF-4 and the Remote Data Client
-*************************************************
-
-The usual way of building netCDF requires the HDF5, zlib, and curl
-libraries. (And, optionally, the szlib library). Versions required are
-at least HDF5 1.8.8, zlib 1.2.5, and curl 7.18.0 or later.
-(Optionally, if building with szlib, get szip 2.0 or later.)
-
-HDF5 1.8.9 and zlib 1.2.7 packages are available from the netCDF-4 ftp
-site:
-
-  ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4
-
-If you wish to use the remote data client code, then you will also
-need libcurl, which can be obtained from the curl website:
-
-  http://curl.haxx.se/download.html
-
-Make sure you run ``make check'' for the HDF5 and zlib
-distributions. They are very well-behaved distributions, but sometimes
-the build doesn't work (perhaps because of something subtly
-misconfigured on the target machine). If one of these libraries is not
-working, netCDF will have serious problems.
-
-Note that for building netCDF, it is not necessary to build the HDF5
-Fortran, C++, or Java API's.  Only the HDF5 C library is used.
-
-Optionally, you can also build netCDF-4 with the szip library
-(a.k.a. szlib). NetCDF cannot create szipped data files, but can read
-HDF5 data files that have used szip.
-
-There are license restrictions on the use of szip, see the section on
-licensing terms in the web page on szip compression in HDF products:
-
-  http://www.hdfgroup.org/doc_resource/SZIP/
-
-These license restrictions seem to apply to commercial users who are
-writing data. (Data readers are not restricted.) But here at NetCDF
-World Headquarters, in Sunny Boulder, Colorado, there are no lawyers,
-only programmers, so please read the szip documents for the license
-agreement to see how it applies to your situation.
-
-If ``make check'' fails for either zlib or HDF5, the problem must be
-resolved before the netCDF-4 installation can continue. For HDF5
-problems, see the HDF5 help services:
-
-  http://www.hdfgroup.org/services/support.html
-
-Build zlib like this:
-
-  ./configure --prefix=/home/ed/local
-  make check install
-
-Then you build HDF5, specifying the location of the zlib library:
-
-  ./configure --with-zlib=/home/ed/local --prefix=/home/ed/local
-  make check install
-
-Note that for shared libraries, you may need to add the install
-directory to the LD_LIBRARY_PATH environment variable. See the netCDF
-FAQ:
-
-  http://www.unidata.ucar.edu/netcdf/docs/faq.html#Shared%20Libraries
-
-for more details on using shared libraries.
-
-If you are building HDF5 with szip, then include the --with-szlib=
-option, with the directory holding the szip library.
-
-After HDF5 is done, build netcdf, specifying the location of the HDF5,
-zlib, and (if built into HDF5) the szip header files and libraries in
-the CPPFLAGS and LDFLAGS environment variables.  For example:
-
-  CPPFLAGS=-I/home/ed/local/include LDFLAGS=-L/home/ed/local/lib ./configure --prefix=/home/ed/local
-  make check install
-
-The configure script will try to find necessary tools in your
-path. When you run configure you may optionally use the --prefix
-argument to change the default installation directory. The above
-examples install the zlib, HDF5, and netCDF-4 libraries in
-/home/ed/local/lib, the header file in /home/ed/local/include, and the
-utilities in /home/ed/local/bin.  If you don't provide a --prefix
-option, installation will be in /usr/local/, in subdirectories lib/,
-include/, and bin/.
+Note that CMake encourages 'out-of-source-tree' builds, i.e. the
+directory used to build netCDF is not the root of the netCDF
+file structure.  For example, it is fairly common practice to
+create a 'build' directory inside the source directory. The examples
+in this file will use syntax which assumes the user is currently
+located in c:\netcdf-src-dir\build\.

 Building NetCDF with Classic Library Only
 *****************************************
@@ -160,8 +96,15 @@
 To build without support for the netCDF-4 formats or the additional
 netCDF-4 functions, but with remote access, use:

-  ./configure --prefix=/home/ed/local --disable-netcdf-4
-  make check install
+Windows:
+	> cmake -DCMAKE_INSTALL_PREFIX=C:\Home\Ed\Local -DENABLE_NETCDF_4=OFF
+	> cmake --build .
+	> cmake --build . --target RUN_TESTS
+	> cmake --build . --target INSTALL
+
+Linux/Unix:
+  	> ./cmake -DCMAKE_INSTALL_PREFIX=/home/ed/local -DENABLE_NETCDF_4=OFF
+   	> make test install

 (Replace ``/home/ed/local'' with the name of the directory where
 netCDF is to be installed.)
@@ -171,16 +114,22 @@
 with full support for netCDF-4 APIs and format but without remote
 client access, use:

-  ./configure --prefix=/home/ed/local --disable-dap
-  make check install
+Windows:
+	> cmake -DCMAKE_INSTALL_PREFIX=C:\Home\Ed\Local -DENABLE_DAP=OFF
+	> cmake --build .
+	> cmake --build . --target RUN_TESTS
+	> cmake --build . --target INSTALL

-To build without netCDF-4 support or remote client access, use:
-
-  ./configure --prefix=/home/ed/local --disable-netcdf-4 --disable-dap
-  make check install
+Linux/Unix
+	> ./cmake -DCMAKE_INSTALL_PREFIX=/home/ed/local -DENABLE_DAP=OFF
+	> make test install
+

 If you get the message that netCDF installed correctly, then you are
 done!
+>>>> Pick Up Here <<<<
+
+

 Building with HDF4 Support
 **************************


Update error message.

Update error message.

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -55,7 +55,7 @@

 IF(NOT CMAKE_COMPILER_IS_GNUCXX)
 	IF(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-		MESSAGE(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
+        MESSAGE(FATAL_ERROR "Compiler is not GNU gcc or Clang! Aborting...")
 	ENDIF()
 ENDIF() # NOT CMAKE_COMPILER_IS_GNUCXX


Reformatted lines in `CodeCoverage.cmake`.

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -51,26 +51,26 @@
 find_program(GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/tests)

 if(NOT GCOV_PATH)
-	message(FATAL_ERROR "gcov not found! Aborting...")
+  message(FATAL_ERROR "gcov not found! Aborting...")
 endif()

 if(NOT CMAKE_COMPILER_IS_GNUCXX)
-	# Clang version 3.0.0 and greater now supports gcov as well.
-	message(WARNING
-        "Compiler is not GNU gcc! Clang Version 3.0.0 and greater supports "
-        "gcov as well, but older versions don't."
-    )
-
-	if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-		message(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
-	endif()
+  # Clang version 3.0.0 and greater now supports gcov as well.
+  message(
+    WARNING
+    "Compiler is not GNU gcc! Clang Version 3.0.0 and greater supports "
+    "gcov as well, but older versions don't."
+  )
+
+  if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+    message(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
+  endif()
 endif()

 set(CMAKE_C_FLAGS_COVERAGE "-g -O0 --coverage -fprofile-arcs -ftest-coverage"
     CACHE STRING "Flags used by the C compiler during coverage builds."
     FORCE)
-set(CMAKE_CXX_FLAGS_COVERAGE
-    "-g -O0 --coverage -fprofile-arcs -ftest-coverage"
+set(CMAKE_CXX_FLAGS_COVERAGE "-g -O0 --coverage -fprofile-arcs -ftest-coverage"
     CACHE STRING "Flags used by the C++ compiler during coverage builds."
     FORCE)
 set(CMAKE_EXE_LINKER_FLAGS_COVERAGE ""
@@ -81,64 +81,62 @@
     "Flags used by the shared libraries linker during coverage builds."
     FORCE)

-mark_as_advanced(
-    CMAKE_CXX_FLAGS_COVERAGE
-    CMAKE_C_FLAGS_COVERAGE
-    CMAKE_EXE_LINKER_FLAGS_COVERAGE
-    CMAKE_SHARED_LINKER_FLAGS_COVERAGE )
+mark_as_advanced(CMAKE_CXX_FLAGS_COVERAGE
+                 CMAKE_C_FLAGS_COVERAGE
+                 CMAKE_EXE_LINKER_FLAGS_COVERAGE
+                 CMAKE_SHARED_LINKER_FLAGS_COVERAGE)

 if (NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR
-         CMAKE_BUILD_TYPE STREQUAL "Coverage"))
+  CMAKE_BUILD_TYPE STREQUAL "Coverage"))
   message(WARNING
-      "Code coverage results with an optimized (non-Debug) build may be "
-      "misleading" )
+          "Code coverage results with an optimized (non-Debug) build may be "
+          "misleading")
 endif()

 # Param _targetname     The name of new the custom make target
 # Param _testrunner     The name of the target which runs the tests.
-#						MUST return ZERO always, even on errors.
-#						If not, no coverage report will be created!
+#                       MUST return ZERO always, even on errors.
+#                       If not, no coverage report will be created!
 # Param _outputname     lcov output is generated as _outputname.info
 #                       HTML report is generated in _outputname/index.html
 # Optional fourth parameter is passed as arguments to _testrunner
 #   Pass them in list form, e.g.: "-j;2" for -j 2
 function(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname)
-	if(NOT LCOV_PATH)
-		message(FATAL_ERROR "lcov not found! Aborting...")
-	endif() # NOT LCOV_PATH
+  if(NOT LCOV_PATH)
+    message(FATAL_ERROR "lcov not found! Aborting...")
+  endif() # NOT LCOV_PATH

-	if(NOT GENHTML_PATH)
-		message(FATAL_ERROR "genhtml not found! Aborting...")
-	endif() # NOT GENHTML_PATH
+  if(NOT GENHTML_PATH)
+    message(FATAL_ERROR "genhtml not found! Aborting...")
+  endif() # NOT GENHTML_PATH

-	# Setup target
-	add_custom_target(${_targetname}
-		# Cleanup lcov
-		${LCOV_PATH} --directory . --zerocounters
-
-		# Run tests
-		COMMAND ${_testrunner} ${ARGV3}
-
-		# Capturing lcov counters and generating report
-		COMMAND ${LCOV_PATH} --directory . --capture --output-file
-                ${_outputname}.info
-		COMMAND ${LCOV_PATH} --remove ${_outputname}.info
-                'tests/*' '/usr/*' --output-file ${_outputname}.info.cleaned
-		COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned
-		COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info
-                ${_outputname}.info.cleaned
-
-		WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-		COMMENT "Resetting code coverage counters to zero.\n"
-                "Processing code coverage counters and generating report."
-	)
+  # Setup target
+  add_custom_target(${_targetname}
+    # Cleanup lcov
+    ${LCOV_PATH} --directory . --zerocounters
+    # Run tests
+    COMMAND ${_testrunner} ${ARGV3}
+    # Capturing lcov counters and generating report
+    COMMAND ${LCOV_PATH} --directory . --capture --output-file
+            ${_outputname}.info
+    COMMAND ${LCOV_PATH} --remove ${_outputname}.info
+            'test/*' '/usr/*' --output-file ${_outputname}.info.cleaned
+    COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned
+    COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info
+            ${_outputname}.info.cleaned
+
+    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+    COMMENT "Resetting code coverage counters to zero.\n"
+            "Processing code coverage counters and generating report."
+  )

 	# Show info where to find the report
-	add_custom_command(TARGET ${_targetname} POST_BUILD
-		COMMAND ;
-		COMMENT "Open ./${_outputname}/index.html in your browser to view "
-                "the coverage report."
+  add_custom_command(
+    TARGET ${_targetname} POST_BUILD
+    COMMAND ;
+    COMMENT "Open ./${_outputname}/index.html in your browser to view "
+            "the coverage report."
 	)
 endfunction() # SETUP_TARGET_FOR_COVERAGE

@@ -151,28 +149,29 @@
 function(SETUP_TARGET_FOR_COVERAGE_COBERTURA _targetname
                                              _testrunner
                                              _outputname)
-	if(NOT PYTHON_EXECUTABLE)
-		message(FATAL_ERROR "Python not found! Aborting...")
-	endif() # NOT PYTHON_EXECUTABLE
+  if(NOT PYTHON_EXECUTABLE)
+    message(FATAL_ERROR "Python not found! Aborting...")
+  endif() # NOT PYTHON_EXECUTABLE

-	if(NOT GCOVR_PATH)
-		message(FATAL_ERROR "gcovr not found! Aborting...")
-	endif() # NOT GCOVR_PATH
+  if(NOT GCOVR_PATH)
+    message(FATAL_ERROR "gcovr not found! Aborting...")
+  endif() # NOT GCOVR_PATH

-	add_custom_target(${_targetname}
-		# Run tests
-		${_testrunner} ${ARGV3}
+  add_custom_target(${_targetname}
+    # Run tests
+    ${_testrunner} ${ARGV3}

-		# Running gcovr
-		COMMAND ${GCOVR_PATH} -x -r ${CMAKE_SOURCE_DIR}
-                -e '${CMAKE_SOURCE_DIR}/tests/'  -o ${_outputname}.xml
-		WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-		COMMENT "Running gcovr to produce Cobertura code coverage report."
-	)
+    # Running gcovr
+    COMMAND ${GCOVR_PATH} -x -r ${CMAKE_SOURCE_DIR}
+            -e '${CMAKE_SOURCE_DIR}/test/'  -o ${_outputname}.xml
+    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+    COMMENT "Running gcovr to produce Cobertura code coverage report."
+  )

-	# Show info where to find the report
-	add_custom_command(TARGET ${_targetname} POST_BUILD
-		COMMAND ;
-		COMMENT "Cobertura code coverage report saved in ${_outputname}.xml."
-	)
+  # Show info where to find the report
+  add_custom_command(
+    TARGET ${_targetname} POST_BUILD
+    COMMAND ;
+    COMMENT "Cobertura code coverage report saved in ${_outputname}.xml."
+  )
 endfunction() # SETUP_TARGET_FOR_COVERAGE_COBERTURA


Proper override of user option.

Proper override of user option.

svn path=/trunk/; revision=6817

--- cmake/modules/xwin.cmake
+++ cmake/modules/xwin.cmake
@@ -59,7 +59,7 @@
     endif(HAVE_PTHREAD)
     set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${xwin_LINK_FLAGS})
   else(X11_FOUND)
-    set(PLD_xwin OFF)
+    set(PLD_xwin OFF CACHE BOOL "enable xwin device" FORCE)
   endif(X11_FOUND)
 endif(PLD_xwin)


cmake: Make for_production option default on

--- cmake/post.service.cmake
+++ cmake/post.service.cmake
@@ -294,7 +294,7 @@
   set(PRE_BSS_SIZE  "--defsym PRE_BSS_AREA=0x200000")
 endif()

-option(for_production "Stop the OS when conditions not suitable for production" OFF)
+option(for_production "Stop the OS when conditions not suitable for production" ON)
 if (for_production)
   set(PROD_USE 0x2000)
 else()


cmake-modules
 * FindThirdPartyMatlab.cmake : fail safely when Matlab 64b is installed, thus cmake found matlab but not the libs.

git-svn-id: ed1ce8e5c168003d808aec37bc6fda77b178f7bb@3221 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- trunk/cmake-modules/FindThirdPartyMatlab.cmake
+++ trunk/cmake-modules/FindThirdPartyMatlab.cmake
@@ -37,7 +37,7 @@

 IF(Matlab_FOUND)
 	MESSAGE(STATUS "  Found Matlab...")
-
+	SET(Matlab_LIB_FOUND TRUE)
 	INCLUDE_DIRECTORIES(${Matlab_INCLUDE})

 	FOREACH(Matlab_LIB ${Matlab_LIBRARIES})
@@ -45,13 +45,18 @@
 		FIND_LIBRARY(Matlab_LIB1 NAMES ${Matlab_LIB} PATHS ${Matlab_LIB_DIRECTORIES} NO_DEFAULT_PATH)
 		FIND_LIBRARY(Matlab_LIB1 NAMES ${Matlab_LIB})
 		IF(Matlab_LIB1)
-			MESSAGE(STATUS "    [  OK  ] Third party lib ${Matlab_LIB1}")
+			MESSAGE(STATUS "	[  OK  ] Third party lib ${Matlab_LIB1}")
 			TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${Matlab_LIB1})
 		ELSE(Matlab_LIB1)
-			MESSAGE(STATUS "    [FAILED] Third party lib ${Matlab_LIB}")
+			MESSAGE(STATUS "	[FAILED] Third party lib ${Matlab_LIB}")
+			SET(Matlab_LIB_FOUND FALSE)
 		ENDIF(Matlab_LIB1)
 	ENDFOREACH(Matlab_LIB)
-	ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyMatlab)
+	IF(Matlab_LIB_FOUND)
+		ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyMatlab)
+	ELSE(Matlab_LIB_FOUND)
+		MESSAGE(STATUS "  FAILED to find Matlab Libs, the plugins won't be built.")
+	ENDIF(Matlab_LIB_FOUND)
 ELSE(Matlab_FOUND)
 	MESSAGE(STATUS "  FAILED to find Matlab...")
-ENDIF(Matlab_FOUND)
+ENDIF(Matlab_FOUND)


cmake updates

cmake updates

--- vtkCMakeOptions.cmake
+++ vtkCMakeOptions.cmake
@@ -5,7 +5,7 @@

 OPTION (VTK_USE_RENDERING "Build the rendering classes used for displaying")
 IF (VTK_USE_RENDERING)
-  INCLUDE (${CMAKE_SOURCE_DIR}/CMake/Modules/FindOpenGL.cmake)
+  INCLUDE (${CMAKE_ROOT}/Modules/FindOpenGL.cmake)
   INCLUDE_DIRECTORIES(${VTK_SOURCE_DIR}/Rendering)
   LINK_DIRECTORIES(${VTK_BINARY_DIR}/Rendering)
 ENDIF (VTK_USE_RENDERING)
@@ -48,7 +48,7 @@
 #
 OPTION(VTK_WRAP_TCL "wrap classes into the TCL intepreted language")
 IF (VTK_WRAP_TCL)
-  INCLUDE (${CMAKE_SOURCE_DIR}/CMake/Modules/FindTCL.cmake)
+  INCLUDE (${CMAKE_ROOT}/Modules/FindTCL.cmake)

   # add in the Tcl values if found
   IF (TCL_INCLUDE_PATH)


This was not the right fix for unresolved externals

This reverts commit ff64407196527d99e30816a5f14ece84cce4f307.

--- common/cmake/intel.cmake
+++ common/cmake/intel.cmake
@@ -88,12 +88,12 @@

   # remove libmmd dependency
   IF (NOT EMBREE_STATIC_RUNTIME)
-    STRING(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG " /nodefaultlib:libmmdd.lib libmmt.lib")
-    STRING(APPEND CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO " /nodefaultlib:libmmdd.lib libmmt.lib")
-    STRING(APPEND CMAKE_EXE_LINKER_FLAGS_RELEASE " /nodefaultlib:libmmd.lib libmmt.lib")
-    STRING(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG " /nodefaultlib:libmmdd.lib libmmt.lib")
-    STRING(APPEND CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO " /nodefaultlib:libmmdd.lib libmmt.lib")
-    STRING(APPEND CMAKE_SHARED_LINKER_FLAGS_RELEASE " /nodefaultlib:libmmd.lib libmmt.lib")
+    STRING(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG " /nodefaultlib:libmmdd.lib")
+    STRING(APPEND CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO " /nodefaultlib:libmmdd.lib")
+    STRING(APPEND CMAKE_EXE_LINKER_FLAGS_RELEASE " /nodefaultlib:libmmd.lib")
+    STRING(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG " /nodefaultlib:libmmdd.lib")
+    STRING(APPEND CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO " /nodefaultlib:libmmdd.lib")
+    STRING(APPEND CMAKE_SHARED_LINKER_FLAGS_RELEASE " /nodefaultlib:libmmd.lib")
   ENDIF()

 ELSE()


New version: 0.4.3

New version: 0.4.3

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


version

version

--- VERSION.cmake
+++ VERSION.cmake
@@ -45,7 +45,7 @@
 #

 SET(LIBSATSOLVER_MAJOR "0")
-SET(LIBSATSOLVER_MINOR "12")
-SET(LIBSATSOLVER_PATCH "3")
+SET(LIBSATSOLVER_MINOR "13")
+SET(LIBSATSOLVER_PATCH "0")

 # last released 0.12.2


Update version to 1.2.3

Update version to 1.2.3

--- Version.cmake
+++ Version.cmake
@@ -10,7 +10,7 @@

 set(SimpleITK_VERSION_MAJOR 1)
 set(SimpleITK_VERSION_MINOR 2)
-set(SimpleITK_VERSION_PATCH 2)
+set(SimpleITK_VERSION_PATCH 3)
 #set(SimpleITK_VERSION_TWEAK "")


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -13,6 +13,7 @@
 Name[nl]=Instant Messaging
 Name[pt]=Mensagens Instantâneas
 Name[pt_BR]=Mensagens instantâneas
+Name[ru]=Система обмена сообщениями
 Name[sk]=Priama komunikácia
 Name[sl]=Hipno sporočanje
 Name[sr]=Брзо гласништво
@@ -38,6 +39,7 @@
 Comment[nl]=Begin een chat met een van uw IM-contactpersonen of wijzig uw IM-status
 Comment[pt]=Iniciar uma conversa com qualquer um dos seus contactos MI ou mudar o seu estado
 Comment[pt_BR]=Inicia um bate-papo com um dos seus contatos de MI ou altera o seu status
+Comment[ru]=Начать общение с любым вашим контактом или изменить ваш статус в системе обмена сообщениями
 Comment[sk]=Spustiť rozhovor s nejakým z vašich IM kontaktov alebo zmeniť váš IM stav
 Comment[sl]=Začnite klepet s katerimkoli izmed vaših stikov hipnega sporočanja ali spremenite vaše stanje
 Comment[sr]=Започните ћаскање преко ИМ контакта или измените своје ИМ стање


cmake: remove sitl_gazebo build -j2

cmake: remove sitl_gazebo build -j2

 - allow ninja build to automatically determine parallelism

--- platforms/posix/cmake/sitl_target.cmake
+++ platforms/posix/cmake/sitl_target.cmake
@@ -45,7 +45,7 @@
 	USES_TERMINAL_BUILD true
 	EXCLUDE_FROM_ALL true
 	BUILD_ALWAYS 1
-	BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> -- -j2
+	BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR>
 )

 ExternalProject_Add(mavsdk_tests


Update defaults.cmake.

Update defaults.cmake.

--- defaults.cmake
+++ defaults.cmake
@@ -109,7 +109,7 @@
   set(output_message "-- Looking for ${dir_mode}include directory '${dir}' - ")
   if(EXISTS "${dir}/")
     message("${output_message}found")
-    if(NOT "" STREQUAL ${dir_mode})
+    if(NOT "" STREQUAL "${dir_mode}")
       include_directories(${ARGV1} ${dir})
     else()
       include_directories(${dir})


Fix location detection for the RPMs.

Fix location detection for the RPMs.

--- cmake/packages/rpm.cmake
+++ cmake/packages/rpm.cmake
@@ -9,18 +9,11 @@
 # This produces the RPM packages, using client/rpm.txt for the second package.
 ################################################################################

-set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${ARANGODB_PACKAGE_REVISION}_${ARANGODB_PACKAGE_ARCHITECTURE}")
-
-
 # deploy the Init script:
 set(RPM_INIT_SCRIPT "${PROJECT_SOURCE_DIR}/Installation/rpm/rc.arangod.Centos")
 set(RPM_INIT_SCRIPT_TARGET "${CMAKE_INSTALL_FULL_SYSCONFDIR}/init.d")
 set(RPM_INIT_SCRIPT_TARGET_NAME arangodb3)
-
-get_cmake_property(_variableNames VARIABLES)
-foreach (_variableName ${_variableNames})
-  message(STATUS "${_variableName}=${${_variableName}}")
-endforeach()
+set(CPACK_COMPONENTS_GROUPING IGNORE)

 install(
   FILES ${RPM_INIT_SCRIPT}
@@ -30,14 +23,24 @@
   COMPONENT debian-extras
   )

-################################################################################
-# hook to build the server package
-################################################################################
+#
+set(PACKAGE_VERSION "-${CPACK_PACKAGE_VERSION}-${ARANGODB_PACKAGE_REVISION}.${ARANGODB_PACKAGE_ARCHITECTURE}")
+set(CPACK_PACKAGE_FILE_NAME   "${CPACK_PACKAGE_NAME}${PACKAGE_VERSION}")
+set(CPACK_CLIENT_PACKAGE_FILE_NAME "arangodb3-client${PACKAGE_VERSION}")
+set(CPACK_RPM_PACKAGE_RELOCATABLE FALSE)
+
+set(CPACK_TEMPORARY_DIRECTORY         "${PROJECT_BINARY_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/RPM/RPMS/${ARANGODB_PACKAGE_ARCHITECTURE}")
+set(CPACK_TEMPORARY_PACKAGE_FILE_NAME "${CPACK_TEMPORARY_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}.rpm")
+
+get_cmake_property(_variableNames VARIABLES)
+foreach (_variableName ${_variableNames})
+  message(STATUS "${_variableName}=${${_variableName}}")
+endforeach()
+
 add_custom_target(package-arongodb-server
   COMMAND ${CMAKE_COMMAND} .
-  COMMAND ${CMAKE_CPACK_COMMAND} -G RPM
-  COMMAND cp "${PROJECT_BINARY_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/RPM/PRMS/${ARANGODB_PACKAGE_ARCHITECTURE}/*.rpm" "${PROJECT_BINARY_DIR}"
-#  _CPack_Packages/Linux/RPM/RPMS/x86_64/
+  COMMAND ${CMAKE_CPACK_COMMAND} -V -G RPM
+  COMMAND cp "${CPACK_TEMPORARY_DIRECTORY}/${CPACK_CLIENT_PACKAGE_FILE_NAME}.rpm" "${PROJECT_BINARY_DIR}"
   WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
 list(APPEND PACKAGES_LIST package-arongodb-server)


Update cmake/pcl_find_ros.cmake

Update cmake/pcl_find_ros.cmake

turn USE_ROS ON

--- cmake/pcl_find_ros.cmake
+++ cmake/pcl_find_ros.cmake
@@ -25,7 +25,7 @@
 #todo: do we really need the next two lines?
 #set(ROS_ROOT $ENV{ROS_ROOT})
 #if(ROS_ROOT)
-    option(USE_ROS "Integrate with ROS rather than using native files" OFF)
+    option(USE_ROS "Integrate with ROS rather than using native files" ON)
     message(STATUS "Found ROS; USE_ROS is ${USE_ROS}")
     if(USE_ROS)
         # Search for ROS


build: also link with zlib and irrxml dependencies if they are present

--- tools/cmake/modules/Findassimp.cmake
+++ tools/cmake/modules/Findassimp.cmake
@@ -60,13 +60,35 @@
     find_library(ASSIMP_LIBRARY_RELEASE assimp-${ASSIMP_MSVC_VERSION}-mt.lib  PATHS ${ASSIMP_LIBRARY_DIR})
     find_library(ASSIMP_LIBRARY_DEBUG   assimp-${ASSIMP_MSVC_VERSION}-mtd.lib PATHS ${ASSIMP_LIBRARY_DIR})

+    find_library(ASSIMP_IRRXML_LIBRARY_RELEASE IrrXML.lib  PATHS ${ASSIMP_LIBRARY_DIR})
+    find_library(ASSIMP_IRRXML_LIBRARY_DEBUG   IrrXMLd.lib PATHS ${ASSIMP_LIBRARY_DIR})
+
+    find_library(ASSIMP_ZLIB_LIBRARY_RELEASE zlibstatic.lib  PATHS ${ASSIMP_LIBRARY_DIR})
+    find_library(ASSIMP_ZLIB_LIBRARY_DEBUG   zlibstaticd.lib PATHS ${ASSIMP_LIBRARY_DIR})
+
+    set(assimp_lib_release ${ASSIMP_LIBRARY_RELEASE})
+    set(assimp_lib_debug ${ASSIMP_LIBRARY_DEBUG})
+
+    if(ASSIMP_IRRXML_LIBRARY_RELEASE AND ASSIMP_IRRXML_LIBRARY_DEBUG)
+        set(assimp_lib_debug   ${assimp_lib_debug}   ${ASSIMP_IRRXML_LIBRARY_DEBUG})
+        set(assimp_lib_release ${assimp_lib_release} ${ASSIMP_IRRXML_LIBRARY_RELEASE})
+    endif()
+    if(ASSIMP_ZLIB_LIBRARY_RELEASE AND ASSIMP_ZLIB_LIBRARY_DEBUG)
+        set(assimp_lib_debug   ${assimp_lib_debug}   ${ASSIMP_ZLIB_LIBRARY_RELEASE})
+        set(assimp_lib_release ${assimp_lib_release} ${ASSIMP_ZLIB_LIBRARY_DEBUG})
+    endif()
+
     if(ASSIMP_LIBRARY_DEBUG)
         set(assimp_LIBRARIES
-            optimized 	${ASSIMP_LIBRARY_RELEASE}
-            debug		${ASSIMP_LIBRARY_DEBUG}
+            optimized
+                ${assimp_lib_release}
+            debug
+                ${assimp_lib_debug}
         )
     else()
-        set(assimp_LIBRARIES ${ASSIMP_LIBRARY_RELEASE} )
+        set(assimp_LIBRARIES
+            ${assimp_lib_release}
+        )
     endif()
 else(WIN32)


COMP: Update GROUPS to fix packaging of RigidAlignmentModuleMetadata on windows

List of changes:

$ git shortlog 957322993..d73b2f7b4 --no-merges
Jean-Christophe Fillion-Robin (1):
      COMP: Fix packaging of RigidAlignmentModuleMetadata on windows

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -39,7 +39,7 @@
 FetchContent_Populate(${extension_name}
   SOURCE_DIR     ${${extension_name}_SOURCE_DIR}
   GIT_REPOSITORY ${EP_GIT_PROTOCOL}://github.com/NIRALUser/GROUPS.git
-  GIT_TAG        9573229937eeca85bb671d1c466bd7cebca27740 # master
+  GIT_TAG        d73b2f7b42296e8f22d24ea4adcb06b9ccf5b9da # master
   GIT_PROGRESS   1
   QUIET
   )


Increase cmake package version

Increase cmake package version

Set cmake-specific package version to 14.4.0 (from 14.3.1, apparently
forgotten at 14.3.2 release).

--- src/soxconfig.h.cmake
+++ src/soxconfig.h.cmake
@@ -1,4 +1,4 @@
-#define PACKAGE_VERSION "14.3.1"
+#define PACKAGE_VERSION "14.4.0"

 #cmakedefine EXTERNAL_GSM             1
 #cmakedefine EXTERNAL_LPC10           1


Add auto-load modules for DICOM IO

Add auto-load modules for DICOM IO

DICOM, DICOM PM, DICOM RT, DICOM SEG, MITK Multilabel

--- CMake/Whitelists/MinimalCmdApps.cmake
+++ CMake/Whitelists/MinimalCmdApps.cmake
@@ -1,6 +1,25 @@
 include(${CMAKE_CURRENT_LIST_DIR}/Minimal.cmake)

 list(APPEND enabled_modules
+  AlgorithmsExt
+  Annotation
   CommandLine
+  ContourModel
   CoreCmdApps
+  DataTypesExt
+  DICOMPM
+  DICOMPMIO
+  DICOMQI
+  DICOMReader
+  DICOMReaderServices
+  DicomRT
+  DicomRTIO
+  DICOMSegIO
+  ModelFit
+  Multilabel
+  MultilabelIO
+  LegacyGL
+  SceneSerialization
+  SceneSerializationBase
 )
+


--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -27,6 +27,7 @@
 Name[nds]=VLC
 Name[nl]=VLC
 Name[pa]=VLC
+Name[pl]=VLC
 Name[pt]=VLC
 Name[pt_BR]=VLC
 Name[ro]=VLC
@@ -60,6 +61,7 @@
 Comment[nds]=VLC-Hülpprogramm för Phonon
 Comment[nl]=VLC-backend van Phonon
 Comment[pa]=ਫੋਨੋਨ VLC ਬੈਕਐਂਡ
+Comment[pl]=Silnik VLC dla Phonon
 Comment[pt]=Infra-estrutura do VLC para o Phonon
 Comment[pt_BR]=Infraestrutura do VLC para o Phonon
 Comment[ro]=Suportul VLC pentru Phonon


[Issue #77] Fixed msgmerge being called with --lang on versions <=0.17 by cmake.

--- .cmake/Modules/GettextTranslate.cmake
+++ .cmake/Modules/GettextTranslate.cmake
@@ -252,13 +252,29 @@

     else()

-      add_custom_target(${PO_TARGET}
-        COMMAND ${GettextTranslate_MSGMERGE_EXECUTABLE} --lang=${lang}
-          ${PO_FILE_NAME} ${TEMPLATE_FILE_ABS}
-          -o ${PO_FILE_NAME}.new
-        COMMAND mv ${PO_FILE_NAME}.new ${PO_FILE_NAME}
-        DEPENDS ${TEMPLATE_FILE_ABS}
+      execute_process(
+        COMMAND ${GettextTranslate_MSGMERGE_EXECUTABLE} --version
+        OUTPUT_VARIABLE MSGMERGE_VERSION_MSG
       )
+      string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" MSGMERGE_VERSION "${MSGMERGE_VERSION_MSG}")
+
+      if ("${MSGMERGE_VERSION}" VERSION_GREATER "0.17")
+          add_custom_target(${PO_TARGET}
+            COMMAND ${GettextTranslate_MSGMERGE_EXECUTABLE} --lang=${lang}
+              ${PO_FILE_NAME} ${TEMPLATE_FILE_ABS}
+              -o ${PO_FILE_NAME}.new
+            COMMAND mv ${PO_FILE_NAME}.new ${PO_FILE_NAME}
+            DEPENDS ${TEMPLATE_FILE_ABS}
+          )
+      else ()
+          add_custom_target(${PO_TARGET}
+            COMMAND ${GettextTranslate_MSGMERGE_EXECUTABLE}
+              ${PO_FILE_NAME} ${TEMPLATE_FILE_ABS}
+              -o ${PO_FILE_NAME}.new
+            COMMAND mv ${PO_FILE_NAME}.new ${PO_FILE_NAME}
+            DEPENDS ${TEMPLATE_FILE_ABS}
+          )
+      endif ()

     endif()


HGVersion.cmake: fix quoting and whitespace problems.

Tested on Windows and Mac.

--- tools/cmake/HGVersion.cmake
+++ tools/cmake/HGVersion.cmake
@@ -4,22 +4,14 @@
 message(STATUS "GETTING HG VERSION")
 #message( STATUS PROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} )

-#exec_program( hg ${PROJECT_SOURCE_DIR} ARGS paths OUTPUT_VARIABLE ${PROJECT_NAME}_HGPATHS )
-#message( STATUS "${PROJECT_NAME}_HGPATHS=${${PROJECT_NAME}_HGPATHS}}" )
-exec_program( hg ${PROJECT_SOURCE_DIR} ARGS tip --template='{rev}:{node|short}\n' OUTPUT_VARIABLE __HGTIP__ )
+execute_process(
+    COMMAND hg tip --template "{rev}:{node|short}"
+    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+    OUTPUT_VARIABLE __HGTIP__
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
 message(STATUS "__HGTIP__=${__HGTIP__}")

-#SET( CHANGESET  "\"" ${__HGTIP__} "\"" )
-SET( CHANGESET  "\""  "\"" )
-
-#string( REPLACE "\n" ";" __HGTIP__ ${__HGTIP__} )
-#foreach(HGTIP ${__HGTIP__})
-#    string(SUBSTRING "${HGTIP}" 0 11 HGTIPSTART)
-#    if (HGTIPSTART MATCHES "changeset: ")
-#        SET( CHANGESET  "\"" ${HGTIP} "\"" )
-#        message(STATUS "${HGTIP}")
-#    endif()
-#endforeach()
+SET( CHANGESET  "\"" ${__HGTIP__} "\"" )

 add_custom_target(buildheader ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/buildtime.h)
 file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/buildtime.h )


cmake: Remove useless set

cmake: Remove useless set

Change-Id: Idaffa314c7e0a6f1d19dc90384e7fe4d3ffead33

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -424,11 +424,6 @@
     ${VALUE_CODE_IMPLEMENTATION_LIB}interface
   )

-  set (SERVER_PUBLIC_HEADERS
-    ${PARAM_SERVER_IMPL_LIB_EXTRA_HEADERS}
-    ${SERVER_GENERATED_HEADERS}
-  )
-
   set_property (TARGET ${VALUE_CODE_IMPLEMENTATION_LIB}impl
     PROPERTY PUBLIC_HEADER
       ${PARAM_SERVER_IMPL_LIB_EXTRA_HEADERS}


ENH: fix for Utilities/verdict: it seems this library was added to VTK's Utilities without fitting it into a similar framework as the other support libraries. It remained the only library among the 35 or so (!) others that was not prefixed by 'vtk'; its headers were not installed properly (unfortunately, two of them have the same name, and only one was installed); there was not support for using a different Verdict library, one provided by the system itself or another toolkit (as demonstrated by VTK's freetype, jpeg, libxml2, png, tiff, zlib, etc). I fixed the CMakeLists.txt file so that a library name can be overriden (to "vtkverdict" here), and the second header is installed properly (to a customizable location as well, one different from the default/unfortunate "include/include/verdict.h"). Considering that verdict is not as widely used as PNG, or JPEG, I didn't tackle the support for a system's verdict library.

--- vtkIncludeDirectories.cmake
+++ vtkIncludeDirectories.cmake
@@ -184,6 +184,7 @@
 VTK_THIRD_PARTY_INCLUDE(NetCDF vtknetcdf)
 VTK_THIRD_PARTY_INCLUDE(Exodus2 vtkexodus2/include)
 VTK_THIRD_PARTY_INCLUDE(MATERIALLIBRARY MaterialLibrary)
+VTK_THIRD_PARTY_INCLUDE(VERDICT verdict)

 # Include GUI support
 IF(VTK_USE_GUISUPPORT)


Added DESTINATION argument

Added DESTINATION argument

--- ament_cmake_python/cmake/ament_python_install_module.cmake
+++ ament_cmake_python/cmake/ament_python_install_module.cmake
@@ -17,6 +17,9 @@
 #
 # :param module_file: the Python module file
 # :type MODULE_FILE: string
+# :param DESTINATION: the base package to install the module to, rooted on
+#   PYTHON_INSTALL_DIR (default: install as a top level module)
+# :type DESTINATION: string
 #
 macro(ament_python_install_module)
   _ament_cmake_python_register_environment_hook()
@@ -24,9 +27,10 @@
 endmacro()

 function(_ament_cmake_python_install_module module_file)
-  if(ARGN)
-    message(FATAL_ERROR
-      "ament_python_install_module() called with unused arguments: ${ARGN}")
+  cmake_parse_arguments(ARG "" "DESTINATION" "" ${ARGN})
+  if(ARG_UNPARSED_ARGUMENTS)
+    message(FATAL_ERROR "ament_python_install_module() called with unused "
+      "arguments: ${ARG_UNPARSED_ARGUMENTS}")
   endif()

   if(NOT IS_ABSOLUTE "${module_file}")
@@ -41,19 +45,32 @@
     message(FATAL_ERROR "ament_python_install_module() variable "
       "'PYTHON_INSTALL_DIR' must not be empty")
   endif()
+
+  set(destination "")
+  set(module_name "")
+  get_filename_component(name "${module_file}" NAME_WE)
+
+  if(NOT ARG_DESTINATION)
+    set(destination "${PYTHON_INSTALL_DIR}")
+    set(module_name "${name}")
+  else()
+    set(destination "${PYTHON_INSTALL_DIR}/${ARG_DESTINATION}")
+    set(module_name "${ARG_DESTINATION}/${name}")
+  endif()
+
   install(
     FILES "${module_file}"
-    DESTINATION "${PYTHON_INSTALL_DIR}"
+    DESTINATION "${destination}"
   )
   # TODO optionally compile Python file

   get_filename_component(name "${module_file}" NAME_WE)
-  list(FIND AMENT_CMAKE_PYTHON_INSTALL_INSTALLED_NAMES "${name}" index)
+  list(FIND AMENT_CMAKE_PYTHON_INSTALL_INSTALLED_NAMES "${destination}" index)
   if(NOT index EQUAL -1)
     message(FATAL_ERROR "ament_python_install_module() a Python module file "
-      "or package with the same name '${name}' has been installed before")
+      "or package with the same name '${destination}' has been installed before")
   endif()
-  list(APPEND AMENT_CMAKE_PYTHON_INSTALL_INSTALLED_NAMES "${name}")
+  list(APPEND AMENT_CMAKE_PYTHON_INSTALL_INSTALLED_NAMES "${destination}")
   set(AMENT_CMAKE_PYTHON_INSTALL_INSTALLED_NAMES
     "${AMENT_CMAKE_PYTHON_INSTALL_INSTALLED_NAMES}" PARENT_SCOPE)
 endfunction()