Remove check of source files done in lint hook (#247)

* Remove check of source files done in lint hook
* Reformat to match <= 80 chars line

Signed-off-by: Jorge Perez <afab1c53f90df8000fd0bd323d84f98f2c232f36@ekumenlabs.com>

--- ament_cmake_copyright/cmake/ament_cmake_copyright_lint_hook.cmake
+++ ament_cmake_copyright/cmake/ament_cmake_copyright_lint_hook.cmake
@@ -12,21 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.

-file(GLOB_RECURSE _source_files FOLLOW_SYMLINKS
-  "*.cmake"
-
-  "*.c"
-  "*.cc"
-  "*.cpp"
-  "*.cxx"
-  "*.h"
-  "*.hh"
-  "*.hpp"
-  "*.hxx"
-
-  "*.py"
-)
-if(_source_files)
-  message(STATUS "Added test 'copyright' to check for copyright in CMake / C / C++ / Python code")
-  ament_copyright()
-endif()
+message(
+  STATUS
+  "Added test 'copyright' to check source files copyright and LICENSE")
+ament_copyright()


build(WebAssemblyInterface): Do not link to imported targets

--- src/docker/itk-wasm/ITKWebAssemblyInterface.cmake
+++ src/docker/itk-wasm/ITKWebAssemblyInterface.cmake
@@ -52,13 +52,13 @@
       _target_link_libraries(${target} PRIVATE $<$<LINK_LANGUAGE:CXX>:wasi-exception-shim>)
       get_property(_link_flags TARGET ${wasm_target} PROPERTY LINK_FLAGS)
       set_property(TARGET ${wasm_target} PROPERTY LINK_FLAGS "-Wl,--export-if-defined=main -Wl,--export-if-defined=itk_wasm_input_array_alloc -Wl,--export-if-defined=itk_wasm_input_json_alloc -Wl,--export-if-defined=itk_wasm_output_json_address -Wl,--export-if-defined=itk_wasm_output_json_size -Wl,--export-if-defined=itk_wasm_output_array_address -Wl,--export-if-defined=itk_wasm_output_array_size -Wl,--export-if-defined=itk_wasm_free_all ${_link_flags}")
-      endif()
-    if(NOT ITK_WASM_NO_INTERFACE_LINK)
-      if(NOT TARGET WebAssemblyInterface)
-        find_package(ITK QUIET COMPONENTS WebAssemblyInterface)
-      endif()
-      if(TARGET WebAssemblyInterface)
-        _target_link_libraries(${wasm_target} PRIVATE WebAssemblyInterface)
+      if(NOT ITK_WASM_NO_INTERFACE_LINK)
+        if(NOT TARGET WebAssemblyInterface)
+          find_package(ITK QUIET COMPONENTS WebAssemblyInterface)
+        endif()
+        if(TARGET WebAssemblyInterface)
+          _target_link_libraries(${wasm_target} PRIVATE WebAssemblyInterface)
+        endif()
       endif()
     endif()
   endif()


arch_define.cmake: added round_robin option to arch definition

Signed-off-by: Alessandro Comodi <622632e70fd6771cf2cd943f69e5e51ab66adef8@antmicro.com>

--- xc7/make/arch_define.cmake
+++ xc7/make/arch_define.cmake
@@ -29,6 +29,7 @@
       --place_algorithm bounding_box
       --enable_timing_computations off
       --allow_unrelated_clustering on
+      --round_robin_prepacking on
     RR_PATCH_TOOL
       ${symbiflow-arch-defs_SOURCE_DIR}/xc7/utils/prjxray_routing_import.py
     RR_PATCH_CMD "${CMAKE_COMMAND} -E env \


update ctest list with new case names

update ctest list with new case names

--- reg_tests/CTestList.cmake
+++ reg_tests/CTestList.cmake
@@ -79,32 +79,32 @@
 #===============================================================================

 # OpenFAST regression tests
-of_Regression("AWT_YFix_WSt"                   "openfast;elastodyn;aerodyn14;servodyn")
-of_Regression("AWT_WSt_StartUp_HighSpShutDown" "openfast;elastodyn;aerodyn15;servodyn")
-of_Regression("AWT_YFree_WSt"                  "openfast;elastodyn;aerodyn15;servodyn")
-of_Regression("AWT_YFree_WTurb"                "openfast;elastodyn;aerodyn14;servodyn")
-of_Regression("AWT_WSt_StartUpShutDown"        "openfast;elastodyn;aerodyn15;servodyn")
-of_Regression("AOC_WSt"                        "openfast;elastodyn;aerodyn14;servodyn")
-of_Regression("AOC_YFree_WTurb"                "openfast;elastodyn;aerodyn15;servodyn")
-of_Regression("AOC_YFix_WSt"                   "openfast;elastodyn;aerodyn15;servodyn")
-of_Regression("UAE_YRamp_WSt"                  "openfast;elastodyn;aerodyn14;servodyn")
-of_Regression("UAE_Rigid_WRamp_PwrCurve"       "openfast;elastodyn;aerodyn15;servodyn")
-of_Regression("WP_VSP_WTurb_PitchFail"         "openfast;elastodyn;aerodyn14;servodyn")
-of_Regression("WP_VSP_ECD"                     "openfast;elastodyn;aerodyn15;servodyn")
-of_Regression("WP_VSP_WTurb"                   "openfast;elastodyn;aerodyn15;servodyn")
-of_Regression("WP_Stationary_Linear"           "openfast;elastodyn;aerodyn15")
-of_Regression("SWRT_YFree_VS_EDG01"            "openfast;elastodyn;aerodyn15;servodyn")
-of_Regression("SWRT_YFree_VS_EDC01"            "openfast;elastodyn;aerodyn15;servodyn")
-of_Regression("SWRT_YFree_VS_WTurb"            "openfast;elastodyn;aerodyn14;servodyn")
-of_Regression("5MW_DLL_Potential_WTurb"        "openfast;elastodyn;aerodyn15;servodyn")
-of_Regression("5MW_DLL_Potential_WTurb_WavesIrr"               "openfast;elastodyn;aerodyn15;servodyn;hydrodyn;subdyn")
-of_Regression("5MW_DLL_Potential_WSt_WavesReg"                 "openfast;elastodyn;aerodyn15;servodyn;hydrodyn;subdyn")
-of_Regression("5MW_DLL_Potential_WTurb_WavesIrrFixedYawGrowth" "openfast;elastodyn;aerodyn15;servodyn;hydrodyn;subdyn")
-of_Regression("5MW_DLL_WTurb_WavesIrr"                         "openfast;elastodyn;aerodyn14;servodyn;hydrodyn;map")
-of_Regression("5MW_DLL_WTurb_WavesIrr_WavesMulti"              "openfast;elastodyn;aerodyn15;servodyn;hydrodyn;map")
-of_Regression("5MW_DLL_WTurb_WavesIrr"                         "openfast;elastodyn;aerodyn15;servodyn;hydrodyn;map")
-of_Regression("5MW_WSt_WhiteNoise_OC4"                         "openfast;elastodyn;aerodyn15;servodyn;hydrodyn;moordyn")
-of_Regression("5MW_BD_DLL_Potential_WTurb"                     "openfast;beamdyn;aerodyn15;servodyn")
+of_Regression("AWT_YFix_WSt"                    "openfast;elastodyn;aerodyn14;servodyn")
+of_Regression("AWT_WSt_StartUp_HighSpShutDown"  "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression("AWT_YFree_WSt"                   "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression("AWT_YFree_WTurb"                 "openfast;elastodyn;aerodyn14;servodyn")
+of_Regression("AWT_WSt_StartUpShutDown"         "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression("AOC_WSt"                         "openfast;elastodyn;aerodyn14;servodyn")
+of_Regression("AOC_YFree_WTurb"                 "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression("AOC_YFix_WSt"                    "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression("UAE_Dnwind_YRamp_WSt"            "openfast;elastodyn;aerodyn14;servodyn")
+of_Regression("UAE_Upwind_Rigid_WRamp_PwrCurve" "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression("WP_VSP_WTurb_PitchFail"          "openfast;elastodyn;aerodyn14;servodyn")
+of_Regression("WP_VSP_ECD"                      "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression("WP_VSP_WTurb"                    "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression("WP_Stationary_Linear"            "openfast;elastodyn;aerodyn15")
+of_Regression("SWRT_YFree_VS_EDG01"             "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression("SWRT_YFree_VS_EDC01"             "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression("SWRT_YFree_VS_WTurb"             "openfast;elastodyn;aerodyn14;servodyn")
+of_Regression("5MW_Land_DLL_WTurb"              "openfast;elastodyn;aerodyn15;servodyn")
+of_Regression("5MW_OC3Mnpl_DLL_WTurb_WavesIrr"  "openfast;elastodyn;aerodyn15;servodyn;hydrodyn;subdyn")
+of_Regression("5MW_OC3Trpd_DLL_WSt_WavesReg"    "openfast;elastodyn;aerodyn15;servodyn;hydrodyn;subdyn")
+of_Regression("5MW_OC4Jckt_DLL_WTurb_WavesIrr_MGrowth" "openfast;elastodyn;aerodyn15;servodyn;hydrodyn;subdyn")
+of_Regression("5MW_ITIBarge_DLL_WTurb_WavesIrr"        "openfast;elastodyn;aerodyn14;servodyn;hydrodyn;map")
+of_Regression("5MW_TLP_DLL_WTurb_WavesIrr_WavesMulti"  "openfast;elastodyn;aerodyn15;servodyn;hydrodyn;map")
+of_Regression("5MW_OC3Spar_DLL_WTurb_WavesIrr"         "openfast;elastodyn;aerodyn15;servodyn;hydrodyn;map")
+of_Regression("5MW_OC4Semi_WSt_WavesWN"                "openfast;elastodyn;aerodyn15;servodyn;hydrodyn;moordyn")
+of_Regression("5MW_Land_BD_DLL_WTurb"                  "openfast;beamdyn;aerodyn15;servodyn")

 # BeamDyn regression tests
 bd_regression(bd_isotropic_rollup)


ffmpeg/4.x: update FFmpeg plugin

ffmpeg/4.x: update FFmpeg plugin

ffmpeg: 4.1.3 -> 4.2.1
libvpx: 1.8.0 -> 1.8.1

--- 3rdparty/ffmpeg/ffmpeg.cmake
+++ 3rdparty/ffmpeg/ffmpeg.cmake
@@ -1,9 +1,9 @@
-# Binaries branch name: ffmpeg/master_20190616
-# Binaries were created for OpenCV: 7b099e0fe2d929e55d6705b6ad510c2c9081606b
-ocv_update(FFMPEG_BINARIES_COMMIT "998718df34e35ea0fa429724875fc3900faa266f")
-ocv_update(FFMPEG_FILE_HASH_BIN32 "f03b47fb809edd2e06b6db135cbd3e49")
-ocv_update(FFMPEG_FILE_HASH_BIN64 "5c4571459570c288d874704244c428b5")
-ocv_update(FFMPEG_FILE_HASH_CMAKE "f710891525a04586d565d0e700e62a9c")
+# Binaries branch name: ffmpeg/master_20190910
+# Binaries were created for OpenCV: bea2c7545243ba2dabce6badc94dd55894a8e5ca
+ocv_update(FFMPEG_BINARIES_COMMIT "197f87f7e811a9ded35d989b37e50501ff6afaa4")
+ocv_update(FFMPEG_FILE_HASH_BIN32 "ab380c9dde361f30dd3604f88eef6c48")
+ocv_update(FFMPEG_FILE_HASH_BIN64 "90260a4da737fc045c9279567313ee9d")
+ocv_update(FFMPEG_FILE_HASH_CMAKE "ad57c038ba34b868277ccbe6dd0f9602")

 function(download_win_ffmpeg script_var)
   set(${script_var} "" PARENT_SCOPE)


Use the GNUInstallDirs module to find paths

--- src/toolbox/cmake/LStoreCommon.cmake
+++ src/toolbox/cmake/LStoreCommon.cmake
@@ -23,6 +23,7 @@
 include(FeatureSummary)
 include(CheckIncludeFile)
 include(CMakeDependentOption)
+include(GNUInstallDirs)
 include(${CMAKE_SOURCE_DIR}/cmake/Date.cmake)
 include(${CMAKE_SOURCE_DIR}/cmake/CompilerVersion.cmake)
 include(${CMAKE_SOURCE_DIR}/cmake/CompilerFlags.cmake)
@@ -100,11 +101,11 @@
 endforeach()

 target_link_libraries(library LINK_PUBLIC ${LIBS})
-install(TARGETS library DESTINATION lib)
+install(TARGETS library DESTINATION ${CMAKE_INSTALL_LIBDIR})
 install(FILES ${LSTORE_PROJECT_INCLUDES} DESTINATION include/${LSTORE_PROJECT_NAME}
         COMPONENT devel)
 if(WANT_STATIC)
-    install(TARGETS library-static DESTINATION lib COMPONENT devel)
+    install(TARGETS library-static DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
 endif(WANT_STATIC)

 #Add the exe build rules
@@ -116,7 +117,7 @@
     else()
         target_link_libraries(${f} ${library_lib})
     endif(WANT_STATIC)
-    install(TARGETS ${f} DESTINATION bin)
+    install(TARGETS ${f} DESTINATION ${CMAKE_INSTALL_BINDIR})
 endforeach(f)

 # Below is used for building packages


ENH: Update Hippo_Kitware_TubeTK.cmake

ENH: Update Hippo_Kitware_TubeTK.cmake

--- Hippo_Kitware_TubeTK.cmake
+++ Hippo_Kitware_TubeTK.cmake
@@ -22,7 +22,7 @@
 ##############################################################################

 set( SITE_NAME "Hippo.Kitware" )
-set( SITE_PLATFORM "apple-darwin12.4.0-clang-x86_64-boost-cppcheck-libsvm-vtk" )
+set( SITE_PLATFORM "apple-darwin12.4.0-clang-x86_64-boost-cppcheck-libsvm" )
 if( NOT SITE_BUILD_TYPE )
   set( SITE_BUILD_TYPE "RelWithDebInfo" )
 endif( NOT SITE_BUILD_TYPE )
@@ -31,7 +31,7 @@
 endif( NOT SITE_CTEST_MODE )
 set( SITE_CMAKE_GENERATOR "Unix Makefiles" )

-set( TubeTK_GIT_REPOSITORY "https://github.com/TubeTK/TubeTK.git" )
+set( TubeTK_GIT_REPOSITORY "git://github.com/TubeTK/TubeTK.git" )
 set( TubeTK_ROOT_DIR "/Users/snape/Development/TubeTK" )
 set( TubeTK_DASHBOARDS_DIR "${TubeTK_ROOT_DIR}/DashboardScripts" )
 set( TubeTK_SOURCE_DIR "${TubeTK_ROOT_DIR}/TubeTK-${SITE_CTEST_MODE}" )
@@ -72,7 +72,7 @@

 set( SITE_COVERAGE_COMMAND "/usr/local/bin/llvm-cov" )
 set( SITE_KWSTYLE_DIR "/usr/local/bin" )
-set( SITE_MEMORYCHECK_COMMAND "" )
+set( SITE_MEMORYCHECK_COMMAND "/usr/local/bin/valgrind" )

 set( SITE_GIT_COMMAND "/usr/local/bin/git" )
 set( SITE_SVN_COMMAND "/usr/local/bin/svn" )
@@ -151,9 +151,9 @@
 set( ENV{PATH} "${SITE_EXECUTABLE_DIRS}:$ENV{PATH}" )

 set( SITE_C_FLAGS
-  "-fPIC -W -Wall -Wextra -Wshadow -Wno-system-headers -Wwrite-strings -Wno-deprecated -Wno-deprecated-declarations -Wno-incompatible-pointer-types -Wno-invalid-source-encoding -Wno-sometimes-uninitialized -fno-diagnostics-fixit-info -fno-diagnostics-show-option -fno-show-column -fno-caret-diagnostics -fno-color-diagnostics" )
+  "-fPIC -W -Wall -Wextra -Wno-system-headers -Wwrite-strings -Wno-deprecated -Wno-deprecated-declarations -Wno-incompatible-pointer-types -Wno-invalid-source-encoding -Wno-sometimes-uninitialized -fno-diagnostics-fixit-info-fno-caret-diagnostics -fno-color-diagnostics" )
 set( SITE_CXX_FLAGS
-  "-fPIC -W -Wall -Wextra -Wshadow -Wno-system-headers -Wwrite-strings -Wno-deprecated -Wno-deprecated-declarations -Wno-incompatible-pointer-types -Wno-invalid-source-encoding -Wno-sometimes-uninitialized -Woverloaded-virtual -Wno-unused-private-field -fno-diagnostics-fixit-info -fno-diagnostics-show-option -fno-show-column -fno-caret-diagnostics -fno-color-diagnostics" )
+  "-fPIC -W -Wall -Wextra -Wno-system-headers -Wwrite-strings -Wno-deprecated -Wno-deprecated-declarations -Wno-incompatible-pointer-types -Wno-invalid-source-encoding -Wno-sometimes-uninitialized -Woverloaded-virtual -Wno-unused-private-field -fno-diagnostics-fixit-info -fno-caret-diagnostics -fno-color-diagnostics" )
 set( SITE_EXE_LINKER_FLAGS "" )
 set( SITE_SHARED_LINKER_FLAGS "${SITE_EXE_LINKER_FLAGS}" )

@@ -171,7 +171,7 @@
     "${SITE_SHARED_LINKER_FLAGS} ${COVERAGE_SHARED_LINKER_FLAGS}" )
 endif( SITE_NIGHTLY_COVERAGE OR SITE_CONTINUOUS_COVERAGE OR SITE_EXPERIMENTAL_COVERAGE )

-set( MEMORYCHECK_C_FLAGS "-g -O0 -ggdb" )
+set( MEMORYCHECK_C_FLAGS "-g" )
 set( MEMORYCHECK_CXX_FLAGS "${MEMORYCHECK_C_FLAGS}" )

 if( SITE_NIGHTLY_MEMORY OR SITE_CONTINUOUS_MEMORY OR SITE_EXPERIMENTAL_MEMORY )


BUG: slicer.kitware.com/midas3/ ExternalData will not support http.

Support for the http protocol is being removed from this ExternalData archive.
Make only support for https explicit to improve error messages.

Change-Id: I2fec19921295f51333046f087c0fd449442fac6b

--- CMake/ITKExternalData.cmake
+++ CMake/ITKExternalData.cmake
@@ -38,7 +38,7 @@
     "http://www.itk.org/files/ExternalData/%(algo)/%(hash)"

     # Mirror supported by the Slicer community.
-    "http://slicer.kitware.com/midas3/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"
+    "https://slicer.kitware.com/midas3/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"
     )
 endif()


COMP: cannot use compiler visibility with appleClang

--- CMake/OTBModuleMacros.cmake
+++ CMake/OTBModuleMacros.cmake
@@ -11,7 +11,12 @@
 # don't work. Set the option to off and hide it.
 if(APPLE AND CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION  VERSION_LESS "4.3")
   set( USE_COMPILER_HIDDEN_VISIBILITY OFF CACHE INTERNAL "" )
+elseif(APPLE)
+  #RK:  compiler visibility nor woking on osx with appleclang xcode.
+  #gcc is a symlink to clang
+  set( USE_COMPILER_HIDDEN_VISIBILITY OFF CACHE INTERNAL "" )
 endif()
+
 include(GenerateExportHeader)

 if(OTB_CPPCHECK_TEST)
@@ -108,7 +113,7 @@
   add_custom_target(${otb-module}-all ALL SOURCES ${_srcs})

   otb_module_use(${OTB_MODULE_${otb-module}_DEPENDS})
-
+
   foreach(dep IN LISTS OTB_MODULE_${otb-module}_OPTIONAL_DEPENDS)
     if (${dep}_ENABLED)
       otb_module_use(${dep})
@@ -117,11 +122,11 @@

   if(NOT DEFINED ${otb-module}_LIBRARIES)
     set(${otb-module}_LIBRARIES "")
-
+
     foreach(dep IN LISTS OTB_MODULE_${otb-module}_DEPENDS)
       list(APPEND ${otb-module}_LIBRARIES "${${dep}_LIBRARIES}")
     endforeach()
-
+
     foreach(dep IN LISTS OTB_MODULE_${otb-module}_OPTIONAL_DEPENDS)
       if (${dep}_ENABLED)
         list(APPEND ${otb-module}_LIBRARIES "${${dep}_LIBRARIES}")
@@ -137,7 +142,7 @@
     list(APPEND ${otb-module}_INCLUDE_DIRS ${${otb-module}_SOURCE_DIR}/include)
     install(DIRECTORY include/ DESTINATION ${${otb-module}_INSTALL_INCLUDE_DIR} COMPONENT Development)
   endif()
-
+
   if(NOT OTB_SOURCE_DIR)
     # When building a module outside the OTB source tree, find the export
     # header.


Upgrade OpenCV from version 3.4.2 to 3.4.8

OpenCV version 3.4.2 is not compatible with up-to-date Visual Studio 2019.

--- CMakeExternals/OpenCV.cmake
+++ CMakeExternals/OpenCV.cmake
@@ -41,8 +41,8 @@

     mitk_query_custom_ep_vars()

-    set(opencv_url ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/opencv-3.4.2.tar.gz)
-    set(opencv_url_md5 8aba51c788cac3583bb39a0c24a5888f)
+    set(opencv_url ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/opencv-3.4.8.tar.gz)
+    set(opencv_url_md5 5aa8240c28c00a7dacdf51698e0ced77)

     ExternalProject_Add(${proj}
       LIST_SEPARATOR ${sep}


cmake: added forgot hgid in version string

--- CMakeModules/hgscript.cmake
+++ CMakeModules/hgscript.cmake
@@ -3,7 +3,7 @@
 if (MERCURIAL_FOUND)
   MERCURIAL_HG_INFO(${TOP_SOURCE_DIR} THIS)
   MESSAGE("Current revision is ${THIS_HG_ID}")
-  set (THIS_HG_ID "${THIS_HG_ID}")
+  set (THIS_HG_ID "hgid: ${THIS_HG_ID}")
 else(MERCURIAL_FOUND)
   set (THIS_HG_ID)
 endif(MERCURIAL_FOUND)


Remove unknown from version tag in tarball builds

--- CMake_version_options.cmake
+++ CMake_version_options.cmake
@@ -15,14 +15,14 @@
 if (HOOMD_GIT_VERSION)
     set(HOOMD_VERSION_LONG "${HOOMD_GIT_VERSION}")
 else (HOOMD_GIT_VERSION)
-    set(HOOMD_VERSION_LONG "${HOOMD_VERSION}-unknown")
+    set(HOOMD_VERSION_LONG "${HOOMD_VERSION}")
 endif (HOOMD_GIT_VERSION)

 get_git_head_revision(GIT_REFSPEC GIT_SHA1)
 if (GIT_REFSPEC)
     set(HOOMD_GIT_REFSPEC "${GIT_REFSPEC}")
 else (GIT_REFSPEC)
-    set(HOOMD_GIT_REFSPEC "unknown")
+    set(HOOMD_GIT_REFSPEC "${HOOMD_VERSION_RAW}")
 endif (GIT_REFSPEC)

 if (GIT_SHA1)


Verification of the version of ITK chosen. Warning message if wrong version chosen. This verification was done only if ITK was not found, which was a bug

--- DTIProcess.cmake
+++ DTIProcess.cmake
@@ -54,11 +54,11 @@
 if(NOT ITK_FOUND)
     find_package(ITK REQUIRED)
     include(${ITK_USE_FILE})
-else()
-  if( NOT DEFINED ITKV3_COMPATIBILITY OR NOT ${ITKV3_COMPATIBILITY}  )
-    message( WARNING "Choose ITKv4 compiled with ITKV3_COMPATIBILITY set to ON (or GenerateCLP compiled against such an ITK version). If not, you may have compilation errors" )
-  endif()
-endif(NOT ITK_FOUND)
+endif(NOT ITK_FOUND)
+if( NOT DEFINED ITKV3_COMPATIBILITY OR NOT ${ITKV3_COMPATIBILITY}  )
+  message( WARNING "Choose ITKv4 compiled with ITKV3_COMPATIBILITY set to ON (or GenerateCLP compiled against such an ITK version). If not, you may have compilation errors" )
+endif()
+

 if(NOT VTK_FOUND)


Removed FindGLFW.cmake

Removed FindGLFW.cmake

--- CMakeModules/FindGLFW.cmake
+++ CMakeModules/FindGLFW.cmake
@@ -1,20 +0,0 @@
-FIND_PATH(GLFW_INCLUDE_DIR GL/glfw.h)
-
-FIND_LIBRARY(GLFW_LIBRARY NAMES glfw)
-#IF(NOT GLFW_LIBRARY)
-#    MESSAGE(SEND_ERROR "GLFW not found")
-#ENDIF(NOT GLFW_LIBRARY)
-
-IF(GLFW_INCLUDE_DIR AND GLFW_LIBRARY)
-   SET(GLFW_FOUND TRUE)
-ENDIF(GLFW_INCLUDE_DIR AND GLFW_LIBRARY)
-
-IF(GLFW_FOUND)
-   IF (NOT GLFW_FIND_QUIETLY)
-      MESSAGE(STATUS "Found GLFW: ${GLFW_LIBRARY}")
-   ENDIF (NOT GLFW_FIND_QUIETLY)
-ELSE(GLFW_FOUND)
-   IF (GLFW_FIND_REQUIRED)
-      MESSAGE(FATAL_ERROR "Could not find GLFW")
-   ENDIF (GLFW_FIND_REQUIRED)
-ENDIF(GLFW_FOUND)


Tweak tarball creation

Tweak tarball creation

--- GitTargets.cmake
+++ GitTargets.cmake
@@ -73,9 +73,10 @@

 if(GZIP_EXECUTABLE)
   add_custom_target(tarball
-    COMMAND ${GZIP_EXECUTABLE}
-      "${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar"
+    COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_PROJECT_NAME}-${VERSION}.tar.gz"
+    COMMAND ${GZIP_EXECUTABLE} "${CMAKE_PROJECT_NAME}-${VERSION}.tar"
     DEPENDS tarball-create
+    WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
     COMMENT
       "Compressing ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar.gz"
   )


pch changes

pch changes

--- build/build.cmake
+++ build/build.cmake
@@ -21,11 +21,8 @@
 	${BUILD}
 )

-settingsCR(datacompression)
-
-target_precompile_headers(datacompression PRIVATE
-	<3rdParty/zstd.h>
-)
+settingsCR(datacompression)
+createPCH(datacompression)

 target_include_directories(datacompression PUBLIC
 	"${root}/inc"
@@ -54,6 +51,7 @@
 add_executable(datacompression_tests ${SRCS})

 settingsCR(datacompression_tests)
+createPCH(datacompression_tests)

 set_property(TARGET datacompression_tests APPEND PROPERTY FOLDER tests)


TEST: use a model of the correct type

TEST: use a model of the correct type

--- Modules/Learning/Supervised/test/tests-shark.cmake
+++ Modules/Learning/Supervised/test/tests-shark.cmake
@@ -21,5 +21,5 @@
 otb_add_test(NAME leTvImageClassificationFilterSharkLoadModel COMMAND otbSupervisedTestDriver
   otbImageClassificationFilterLoadModel
   ${inputdata}/ROI_QB_MUL_4.tif
-  ${INPUTDATA}/ROI_QB_MUL_4_svmModel.txt
+  ${TEMP}/shark_rf_model.txt
   )


Fix build for machines that don't have ccache. (#308)

--- gapii/interceptor-lib/cc/CMakeBuild.cmake
+++ gapii/interceptor-lib/cc/CMakeBuild.cmake
@@ -11,6 +11,12 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
+set(LLVM_CCACHE_BUILD "OFF")
+find_program(CCACHE_FOUND ccache)
+if(CCACHE_FOUND)
+    set(LLVM_CCACHE_BUILD "ON")
+endif()

 if(ANDROID_ABI)
     if (ANDROID_ABI STREQUAL "aarch64")
@@ -39,7 +45,7 @@
         "-DLLVM_TARGETS_TO_BUILD:STRING=${LLVM_TARGET_ARCH}"
         "-DPYTHON_EXECUTABLE:PATH=${PYTHON_EXECUTABLE}"
         "-DLLVM_TABLEGEN:PATH=${CMAKE_BINARY_DIR}/../../../bin/llvm/llvm-tblgen${CMAKE_HOST_EXECUTABLE_SUFFIX}"
-        "-DLLVM_CCACHE_BUILD:BOOL=ON"
+        "-DLLVM_CCACHE_BUILD:BOOL=${LLVM_CCACHE_BUILD}"
     )
     add_cmake_target(llvm interceptor ${dst} "libinterceptor.so"
         DEPENDS ${sources}
@@ -52,7 +58,7 @@
     add_cmake(llvm "${CMAKE_SOURCE_DIR}/third_party/llvm"
         "-DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_CURRENT_BINARY_DIR}/toolchain.cmake"
         "-DPYTHON_EXECUTABLE:PATH=${PYTHON_EXECUTABLE}"
-        "-DLLVM_CCACHE_BUILD:BOOL=ON"
+        "-DLLVM_CCACHE_BUILD:BOOL=${LLVM_CCACHE_BUILD}"
     )
     add_cmake_target(llvm llvm-tblgen ${dst} "llvm-tblgen${CMAKE_HOST_EXECUTABLE_SUFFIX}"
         DEPENDS ${sources}


Add some quotes

Add some quotes

--- test/HalideGenerator.cmake
+++ test/HalideGenerator.cmake
@@ -109,7 +109,7 @@
     if (NOT target_is_pnacl)
       add_custom_command(OUTPUT "${FILTER_LIB}" "${FILTER_HDR}"
         DEPENDS "${args_GENERATOR_TARGET}"
-        COMMAND "${CMAKE_BINARY_DIR}/bin/${gen_target}${CMAKE_EXECUTABLE_SUFFIX}" "-g" "${gen_name}" "-f" "${func_name}" "-o" "${SCRATCH_DIR}" ${ARGN}
+        COMMAND "${CMAKE_BINARY_DIR}/bin/${gen_target}${CMAKE_EXECUTABLE_SUFFIX}" "-g" "${gen_name}" "-f" "${func_name}" "-o" "${SCRATCH_DIR}" "${ARGN}"
         # Create an archive using ar (or similar)
         COMMAND "${CMAKE_AR}" q "${FILTER_LIB}" "${SCRATCH_DIR}/${args_GENERATED_FUNCTION}.o"
         WORKING_DIRECTORY "${SCRATCH_DIR}"


include files in project directories

include files in project directories

git-svn-id: 53a346f67f76028cd3290d0c97fdb7682ad2a994@12125 358b74ad-2626-0410-af80-f4c3c349ae55

--- imageutilities/cmake/FindCUDASparse.cmake
+++ imageutilities/cmake/FindCUDASparse.cmake
@@ -22,10 +22,23 @@

 # FindCUDASparse.cmake

+if( CUDA_64_BIT_DEVICE_CODE )
+	set( CUDA_SPARSE_SEARCH_PATH_SUFFIXES
+		/lib64
+		/lib
+		/libx86_64-linux-gnu
+		/lib/x64
+	)
+else()
+	set( CUDA_SPARSE_SEARCH_PATH_SUFFIXES
+		/lib
+		/lib/win32
+	)
+endif()
 find_library(CUDA_SPARSE_LIBRARY
   NAMES cusparse
   PATHS "${CUDA_TOOLKIT_ROOT_DIR}"
-  PATH_SUFFIXES "/lib64" "/lib" "/lib/x86_64-linux-gnu" "lib/x64" "lib/Win32"
+  PATH_SUFFIXES ${CUDA_SPARSE_SEARCH_PATH_SUFFIXES}
   DOC "Location of sparse library"
   NO_DEFAULT_PATH
 )


adding copyright header

adding copyright header

Summary: as in the title

Reviewed By: Croohand

Differential Revision: D30041822

fbshipit-source-id: 923158fcba241f5cd2ace8f87fa12083fd22356c

--- build/fbcode_builder/CMake/RustStaticLibrary.cmake
+++ build/fbcode_builder/CMake/RustStaticLibrary.cmake
@@ -1,3 +1,5 @@
+# Copyright (c) Facebook, Inc. and its affiliates.
+
 include(FBCMakeParseArgs)

 set(
@@ -286,4 +288,4 @@
     RENAME ${staticlib_output_name}
     DESTINATION ${ARG_INSTALL_DIR}
   )
-endfunction()+endfunction()


COMP: Remove deprecated WRAPPER_LIBRARY_GROUPS

The WRAPPER_LIBRARY_GROUPS variable is no longer
supported or used.

--- Wrapping/TypedefMacros.cmake
+++ Wrapping/TypedefMacros.cmake
@@ -69,8 +69,6 @@
   # that should be included/wrapped before the rest in the given order.
   # Just the submodule group name is needed, not the full path or file name.
   set(WRAPPER_SUBMODULE_ORDER )
-  # WRAPPER_LIBRARY_GROUPS is a deprecated variable for this specification.
-  unset(WRAPPER_LIBRARY_GROUPS )

   # WRAPPER_LIBRARY_SWIG_INPUTS. List of C++ source files to be used
   # as input for Swig. This list is then appended to by
@@ -159,11 +157,6 @@
   # library and each wrapper language to be created.
   # Finally, this macro causes the language support files for the templates and
   # library here defined to be created.
-
-  # For backwards compatibility
-  if(WRAPPER_LIBRARY_GROUPS)
-    set(WRAPPER_SUBMODULE_ORDER ${WRAPPER_LIBRARY_GROUPS})
-  endif()

   # Next, include modules already in WRAPPER_SUBMODULE_ORDER, because those are
   # guaranteed to be processed first.


[cmake] Add module 'WintermuteSourceBuild'.

--- cmake/Modules/Internal/WintermuteSourceBuild.cmake
+++ cmake/Modules/Internal/WintermuteSourceBuild.cmake
@@ -19,10 +19,10 @@
 ###############################################################################
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)

-if (NOT _wntr_srcbld)
-  set(_wntr_srcbld ON PARENT_SCOPE)
-  message(STATUS "Source build of Wintermute; localizing necessary components.")
-else()
-  return()
-endif()
-
+SET(WINTERMUTE_CMAKE_DIR "${CMAKE_SOURCE_DIR}/cmake" PARENT_SCOPE)
+SET(WINTERMUTE_TEST_INCLUDE_DIRS
+  ${CMAKE_SOURCE_DIR}/test/include
+  ${CMAKE_SOURCE_DIR}/test
+  ${CMAKE_SOURCE_DIR}/src
+  ${CMAKE_BINARY_DIR}/src
+  CACHE INTERNAL "Damn.")


COMP (#2469): Added new interaction classes to build system

--- Modules/MitkExt/files.cmake
+++ Modules/MitkExt/files.cmake
@@ -18,6 +18,7 @@
   Algorithms/mitkExtractImageFilter.cpp
   Algorithms/mitkGeometryClipImageFilter.cpp
   Algorithms/mitkGeometryDataSource.cpp
+  Algorithms/mitkHeightFieldSurfaceClipImageFilter.cpp
   Algorithms/mitkHistogramMatching.cpp
   Algorithms/mitkImageRegistrationMethod.cpp
   Algorithms/mitkImageToLookupTableFilter.cpp
@@ -90,6 +91,7 @@
   DataManagement/mitkMesh.cpp
   DataManagement/mitkOrganTypeProperty.cpp
   DataManagement/mitkPlaneLandmarkProjector.cpp
+  DataManagement/mitkPlane.cpp
   DataManagement/mitkPointData.cpp
   DataManagement/mitkPropertyManager.cpp
   DataManagement/mitkPropertyObserver.cpp
@@ -120,6 +122,7 @@
   #Interactions/mitkCoordinateSupplier.cpp
   #Interactions/mitkDisplayCoordinateOperation.cpp
   #Interactions/mitkDisplayInteractor.cpp
+  Interactions/mitkAffineInteractor3D.cpp
   Interactions/mitkDisplayPointSetInteractor.cpp
   #Interactions/mitkDisplayVectorInteractor.cpp
   Interactions/mitkExtrudedContourInteractor.cpp
@@ -135,6 +138,7 @@
   Interactions/mitkSegmentationsProcessingTool.cpp
   Interactions/mitkSetRegionTool.cpp
   Interactions/mitkSocketClient.cpp
+  Interactions/mitkSurfaceDeformationInteractor3D.cpp
   Interactions/mitkSurfaceInteractor.cpp
   Interactions/mitkTool.cpp
   Rendering/mitkContourMapper2D.cpp


Updated FW to match shared

Updated FW to match shared

--- 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 "784eafff1be86411d77c81afbb9b44ae24aeea65")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "0c2087fb546ecd10b529e9e11668aed4d9ac2610")

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


Update FW: fix ColorCamera `preview`/`video`/`still` when multiple cameras use these outputs

--- 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 "70c0b8e0e8c47a63a0991cccd2088ac5ce5e825f")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "c6f9eda4f47b4aa26538b7e79743d1940db74bb5")

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


OAK-FFC 4P R5M1E5 IR/Dot support

OAK-FFC 4P R5M1E5 IR/Dot support

--- 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 "1333912662dc304ee757c94bdd34f20c4072995b")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "adbcc016c8bd5a5580a26d8b6250f77160203666")

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


Fix for ROOT-8015 - cmake not honoring -Dbuiltin_lzma=OFF

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -144,10 +144,14 @@
 if(NOT builtin_lzma)
   message(STATUS "Looking for LZMA")
   find_package(LZMA)
-  if(LZMA_FOUND)
-  else()
-    message(STATUS "LZMA not found. Switching on builtin_lzma option")
-    set(builtin_lzma ON CACHE BOOL "" FORCE)
+  if(NOT LZMA_FOUND)
+    if(fail-on-missing)
+      message(FATAL_ERROR "LZMA not found and it is required ('fail-on-missing' enabled)."
+                          "Alternatively, you can enable the option 'builtin_lzma' to build the LZMA library internally.")
+    else()
+      message(STATUS "LZMA not found. Switching on builtin_lzma option")
+      set(builtin_lzma ON CACHE BOOL "" FORCE)
+    endif()
   endif()
 endif()
 if(builtin_lzma)


Always build TBB in Release mode (for the time being)

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1198,31 +1198,24 @@
     set(_tbb_compiler compiler=gcc)
   endif()
   if(MSVC)
+    set(vsdir "vs2012")
     set(TBB_LIBRARIES ${CMAKE_BINARY_DIR}/lib/tbb.lib)
-    if(winrtdebug)
-      set(config Debug)
-      set(suffix _debug)
-    else()
-      set(config Release)
-      set(suffix "")
-    endif()
-    set(vsdir "vs2012")
     ExternalProject_Add(
       TBB
       URL ${lcgpackages}/tbb${tbb_version}.tar.gz
       URL_HASH SHA256=780baf0ad520f23b54dd20dc97bf5aae4bc562019e0a70f53bfc4c1afec6e545
       INSTALL_DIR ${CMAKE_BINARY_DIR}
       CONFIGURE_COMMAND devenv.exe /useenv /upgrade build/${vsdir}/makefile.sln
-      BUILD_COMMAND devenv.exe /useenv /build "${config}|Win32" build/${vsdir}/makefile.sln
-      INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/${config}/tbb${suffix}.dll ${CMAKE_BINARY_DIR}/bin/tbb.dll
-              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/${config}/tbbmalloc${suffix}.dll ${CMAKE_BINARY_DIR}/bin/tbbmalloc.dll
-              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/${config}/tbbmalloc_proxy${suffix}.dll ${CMAKE_BINARY_DIR}/bin/tbbmalloc_proxy.dll
-              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/${config}/tbb${suffix}.lib ${CMAKE_BINARY_DIR}/lib/tbb.lib
-              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/${config}/tbbmalloc${suffix}.lib ${CMAKE_BINARY_DIR}/lib/tbbmalloc.lib
-              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/${config}/tbbmalloc_proxy${suffix}.lib ${CMAKE_BINARY_DIR}/lib/tbbmalloc_proxy.lib
-              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/${config}/tbb${suffix}.pdb ${CMAKE_BINARY_DIR}/bin/tbb.pdb
-              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/${config}/tbbmalloc${suffix}.pdb ${CMAKE_BINARY_DIR}/bin/tbbmalloc.pdb
-              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/${config}/tbbmalloc_proxy${suffix}.pdb ${CMAKE_BINARY_DIR}/bin/tbbmalloc_proxy.pdb
+      BUILD_COMMAND devenv.exe /useenv /build "Release|Win32" build/${vsdir}/makefile.sln
+      INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/Release/tbb.dll ${CMAKE_BINARY_DIR}/bin/
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/Release/tbbmalloc.dll ${CMAKE_BINARY_DIR}/bin/
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/Release/tbbmalloc_proxy.dll ${CMAKE_BINARY_DIR}/bin/
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/Release/tbb.lib ${CMAKE_BINARY_DIR}/lib/
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/Release/tbbmalloc.lib ${CMAKE_BINARY_DIR}/lib/
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/Release/tbbmalloc_proxy.lib ${CMAKE_BINARY_DIR}/lib/
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/Release/tbb.pdb ${CMAKE_BINARY_DIR}/bin/
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/Release/tbbmalloc.pdb ${CMAKE_BINARY_DIR}/bin/
+              COMMAND ${CMAKE_COMMAND} -E copy_if_different build/${vsdir}/Win32/Release/tbbmalloc_proxy.pdb ${CMAKE_BINARY_DIR}/bin/
               COMMAND ${CMAKE_COMMAND} -Dinstall_dir=<INSTALL_DIR> -Dsource_dir=<SOURCE_DIR>
                                        -P ${CMAKE_SOURCE_DIR}/cmake/scripts/InstallTBB.cmake
       BUILD_IN_SOURCE 1


Force LF: deps.info

Force LF: deps.info

--- cmake/modules/hunter_create_deps_info.cmake
+++ cmake/modules/hunter_create_deps_info.cmake
@@ -23,7 +23,8 @@
     )
   endif()

-  file(WRITE "${temp_deps_info}" "")
+  set(temp_deps_info_nolf "${temp_deps_info}.NOLF")
+  file(WRITE "${temp_deps_info_nolf}" "")

   foreach(dependency ${dependencies_list})
     string(REPLACE " " ";" dep_string "${dependency}")
@@ -48,6 +49,15 @@
           "Unexpected length ${dep_string_len} (string: ${dep_string})"
       )
     endif()
-    file(APPEND "${temp_deps_info}" "${dep_entry}\n")
+    file(APPEND "${temp_deps_info_nolf}" "${dep_entry}\n")
   endforeach()
+
+  # About '@ONLY': no substitutions expected but COPYONLY can't be
+  # used with NEWLINE_STYLE
+  configure_file(
+      "${temp_deps_info_nolf}"
+      "${temp_deps_info}"
+      @ONLY
+      NEWLINE_STYLE LF
+  )
 endfunction()


Added todo

Added todo

--- cmake/flags.cmake
+++ cmake/flags.cmake
@@ -9,7 +9,7 @@

 set(CSTANDARD "-std=c99")
 set(CDEBUG "-g")
-set(CWARN "-Wall -Wstrict-prototypes -Werror")
+set(CWARN "-Wall -Wstrict-prototypes -Werror") # TODO: add -Wextra and -pedantic
 set(CTUNING "-fpack-struct -fshort-enums -funsigned-bitfields -funsigned-char -flto -mrelax")

 set(COPT "-Os")


fix checking for compiler/linker flags

fix checking for compiler/linker flags

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -1,12 +1,4 @@
-# check some compiler flags
 include(CheckCXXCompilerFlag)
-
-#CHECK_CXX_COMPILER_FLAG(-fsanitize=address COMPILER_SUPPORTS_SANITIZE_ADDRESS)
-#CHECK_CXX_COMPILER_FLAG(-fsanitize=undefined COMPILER_SUPPORTS_SANITIZE_UNDEFINED)
-#CHECK_CXX_COMPILER_FLAG(-fsanitize=leak COMPILER_SUPPORTS_SANITIZE_LEAK)
-#CHECK_CXX_COMPILER_FLAG(-fsanitize=thread COMPILER_SUPPORTS_SANITIZE_THREAD)
-
-set(TEST_PROGRAM "int main(int, char* []) { return 0; }")

 macro(to_parent)
         set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} PARENT_SCOPE)
@@ -15,22 +7,28 @@
 endmacro()

 macro(if_cxx_flag flag)
-        set(CMAKE_REQUIRED_FLAGS "${flag}")
-        CHECK_CXX_SOURCE_COMPILES("${TEST_PROGRAM}" COMPILER_SUPPORTS_${flag})
-
-        if(COMPILER_SUPPORTS_${flag})
+        string(REPLACE "-" "_" FLAGX ${flag})
+        string(REPLACE "=" "_" FLAGY ${FLAGX})
+        string(TOUPPER ${FLAGY} FLAGZ)
+
+        CHECK_CXX_COMPILER_FLAG("${flag}" COMPILER_SUPPORTS${FLAGZ})
+
+        if(COMPILER_SUPPORTS${FLAGZ})
                 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
         endif()
 endmacro()

-function(if_linker_flag flag)
-        set(CMAKE_REQUIRED_FLAGS ${flag})
-        CHECK_CXX_SOURCE_COMPILES("${TEST_PROGRAM}" COMPILER_SUPPORTS_FLAG)
-
-        if(COMPILER_SUPPORTS_FLAG)
+macro(if_linker_flag flag)
+        string(REPLACE "-" "_" FLAGX ${flag})
+        string(REPLACE "=" "_" FLAGY ${FLAGX})
+        string(TOUPPER ${FLAGY} FLAGZ)
+
+        CHECK_CXX_COMPILER_FLAG("${flag}" COMPILER_SUPPORTS${FLAGZ})
+
+        if(COMPILER_SUPPORTS${FLAGZ})
                 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${flag}")
         endif()
-endfunction()
+endmacro()

 # require C++14 support
 function(require_cpp14)
@@ -148,22 +146,19 @@
 # setup LTO
 function(setup_lto)
         # TODO: setup -flto=thin
-        set(CMAKE_REQUIRED_FLAGS "-flto")
-        CHECK_CXX_SOURCE_COMPILES("${TEST_PROGRAM}" COMPILER_SUPPORTS_LTO)
-
-        set(CMAKE_REQUIRED_FLAGS "-fno-fat-lto-objects")
-        CHECK_CXX_SOURCE_COMPILES("${TEST_PROGRAM}" COMPILER_SUPPORTS_NO_FAT_LTO_OBJECTS)
+        CHECK_CXX_COMPILER_FLAG("-flto" COMPILER_SUPPORTS_LTO)
+        CHECK_CXX_COMPILER_FLAG("-fno-fat-lto-objects" COMPILER_SUPPORTS_NO_FAT_LTO_OBJECTS)

         if(COMPILER_SUPPORTS_LTO)
                 get_filename_component(CMAKE_LTO_DIR ${CMAKE_CXX_COMPILER} DIRECTORY)
                 if(CMAKE_CXX_COMPILER_ID MATCHES GNU)
-                        find_program(CMAKE_LTO_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar ${_CMAKE_TOOLCHAIN_SUFFIX} HINTS ${CMAKE_LTO_DIR})
-                        find_program(CMAKE_LTO_NM NAMES ${_CMAKE_TOOLCHAIN_PREFIX}gcc-nm HINTS ${CMAKE_LTO_DIR})
-                        find_program(CMAKE_LTO_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib HINTS ${CMAKE_LTO_DIR})
+                        find_program(CMAKE_LTO_AR NAMES ${CMAKE_TOOLCHAIN_PREFIX}gcc-ar ${CMAKE_TOOLCHAIN_SUFFIX} HINTS ${CMAKE_LTO_DIR})
+                        find_program(CMAKE_LTO_NM NAMES ${CMAKE_TOOLCHAIN_PREFIX}gcc-nm HINTS ${CMAKE_LTO_DIR})
+                        find_program(CMAKE_LTO_RANLIB NAMES ${CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib HINTS ${CMAKE_LTO_DIR})
                 elseif(CMAKE_CXX_COMPILER_ID MATCHES Clang)
-                        find_program(CMAKE_LTO_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}llvm-ar ${_CMAKE_TOOLCHAIN_SUFFIX} HINTS ${CMAKE_LTO_DIR})
-                        find_program(CMAKE_LTO_NM NAMES ${_CMAKE_TOOLCHAIN_PREFIX}llvm-nm HINTS ${CMAKE_LTO_DIR})
-                        find_program(CMAKE_LTO_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}llvm-ranlib HINTS ${CMAKE_LTO_DIR})
+                        find_program(CMAKE_LTO_AR NAMES ${CMAKE_TOOLCHAIN_PREFIX}llvm-ar ${CMAKE_TOOLCHAIN_SUFFIX} HINTS ${CMAKE_LTO_DIR})
+                        find_program(CMAKE_LTO_NM NAMES ${CMAKE_TOOLCHAIN_PREFIX}llvm-nm HINTS ${CMAKE_LTO_DIR})
+                        find_program(CMAKE_LTO_RANLIB NAMES ${CMAKE_TOOLCHAIN_PREFIX}llvm-ranlib HINTS ${CMAKE_LTO_DIR})
                 endif()

                 message("++ CMAKE_AR: ${CMAKE_LTO_AR}")


Port ARM64x support (#9230)

Port ARM64x support (#9230)

--- cmake/winml.cmake
+++ cmake/winml.cmake
@@ -845,3 +845,28 @@
 # However, there are no cuda imports in winml_dll, and the linker throws the 4199 warning.
 # This is needed to allow winml_dll build with cuda enabled.
 target_link_options(winml_dll PRIVATE /ignore:4199)
+
+if (winml_is_inbox)
+  # Link *_x64/*_arm64 DLLs for the ARM64X forwarder
+  function(duplicate_shared_library target new_target)
+    get_target_property(sources ${target} SOURCES)
+    get_target_property(compile_definitions ${target} COMPILE_DEFINITIONS)
+    get_target_property(compile_options ${target} COMPILE_OPTIONS)
+    get_target_property(include_directories ${target} INCLUDE_DIRECTORIES)
+    get_target_property(link_libraries ${target} LINK_LIBRARIES)
+    get_target_property(link_options ${target} LINK_OPTIONS)
+
+    add_library(${new_target} SHARED ${sources})
+    add_dependencies(${target} ${new_target})
+    target_compile_definitions(${new_target} PRIVATE ${compile_definitions})
+    target_compile_options(${new_target} PRIVATE ${compile_options})
+    target_include_directories(${new_target} PRIVATE ${include_directories})
+    target_link_libraries(${new_target} PRIVATE ${link_libraries})
+    target_link_options(${new_target} PRIVATE ${link_options})
+  endfunction()
+
+  if (WAI_ARCH STREQUAL x64 OR WAI_ARCH STREQUAL arm64)
+    duplicate_shared_library(winml_dll Windows_AI_MachineLearning_${WAI_ARCH})
+    target_compile_features(Windows_AI_MachineLearning_${WAI_ARCH} PRIVATE cxx_std_17)
+  endif()
+endif()


Correct WSREP_PATCH_VERSION for 5.6 is 11

--- cmake/wsrep.cmake
+++ cmake/wsrep.cmake
@@ -18,7 +18,7 @@
 # so WSREP_VERSION is produced regardless

 # Set the patch version
-SET(WSREP_PATCH_VERSION "12")
+SET(WSREP_PATCH_VERSION "11")

 # MariaDB addition: Revision number of the last revision merged from
 # codership branch visible in @@visible_comment.


Add new NDK versions to android.toolchain.cmake

* Added r12b, r12, r11c, r11b, r11, r10e.
* This just means if the NDK is in one of the auto-search locations you
  won't have to set the ANDROID_NDK environment variable.

--- scripts/android.toolchain.cmake
+++ scripts/android.toolchain.cmake
@@ -216,7 +216,7 @@
 set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." )

 # NDK search paths
-set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r10d -r10c -r10b -r10 -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
+set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r12b -r12 -r11c -r11b -r11 -r10e -r10d -r10c -r10b -r10 -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
 if( NOT DEFINED ANDROID_NDK_SEARCH_PATHS )
  if( CMAKE_HOST_WIN32 )
   file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS )


Find the xgettext executable.

Find the xgettext executable.

--- examples/contacts/cmake/modules/FindGettext.cmake
+++ examples/contacts/cmake/modules/FindGettext.cmake
@@ -99,6 +99,7 @@
 FIND_PROGRAM(GETTEXT_MSGMERGE_EXECUTABLE msgmerge)

 FIND_PROGRAM(GETTEXT_MSGFMT_EXECUTABLE msgfmt)
+FIND_PROGRAM(GETTEXT_XGETTEXT_EXECUTABLE xgettext)

 MACRO(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFile)


Make fots:query a cdata section element again.

--- test/fots/ImportFOTS.cmake
+++ test/fots/ImportFOTS.cmake
@@ -23,7 +23,7 @@

 # Change this to modify which elements in FOTS driver results are output
 # as CDATA
-SET (FOTS_CDATA_ELEMENTS "test assert-xml")
+SET (FOTS_CDATA_ELEMENTS "fots:query test assert-xml")

 # Download and unpack pre-created archive
 SET (_outdir "${BUILDDIR}/test/fots")


adding REQUIRED flag to find_package(boost)

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@1334 a9d63959-f2ad-4865-b262-bf0e56cfafb6


Build SALOME with the Macrosoft Visual Studio 2010.

--- salome_adm/cmake_files/SalomeSetupPlatform.cmake
+++ salome_adm/cmake_files/SalomeSetupPlatform.cmake
@@ -94,26 +94,42 @@
   SET(PLATFORM_LIBS Ws2_32.lib)
   LIST(APPEND PLATFORM_LIBS Userenv.lib)      # At least for GEOM suit

-  # Disable iterator debugging on WINDOWS to avoid runtime error during checking iterators
-    # _SECURE_SCL
-    #             If defined as 1, unsafe iterator use causes a runtime error.
-    #             If defined as 0, checked iterators are disabled.
-    #             The default value for _SECURE_SCL is 1
-    # _SECURE_SCL_THROWS
-    #             If defined as 1, an out of range iterator use causes an exception at runtime.
-    #             If defined as 0, the program is terminated by calling invalid_parameter.
-    #             The default value for _SECURE_SCL_THROWS is 0
-
-  ADD_DEFINITIONS(-D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0)
-
-    # The symbol _HAS_ITERATOR_DEBUGGING can be used to turn off the iterator debugging feature in a debug build
-    #             If defined as 1, iterator debugging is enabled.
-    #             If defined as 0, iterator debugging is disabled.
-    #             The default value for _HAS_ITERATOR_DEBUGGING is 1
-
-  IF(NOT CMAKE_BUILD_TYPE STREQUAL "RELEASE" AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
-    ADD_DEFINITIONS(-D_HAS_ITERATOR_DEBUGGING=0)
-  ENDIF(NOT CMAKE_BUILD_TYPE STREQUAL "RELEASE" AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
+################################################################################################
+#
+# RNV: In the SALOME sometimes operating with STL collections is done in not fully valid way.
+#      To avoid run-time exception in Debug mode default values of the _SECURE_SCL,
+#      _SECURE_SCL_THROWS and _HAS_ITERATOR_DEBUGGING macros were redefined. It solved a problem
+#      then we used tne Microsoft Visual Studio 2008 to build SALOME on Windows platform.
+#      But in the Microsoft Visual Studio 2010 these macros affect on the size of STL collection
+#      classes(in difference from the Microsoft Visual Studio 2008: in this version of MSVS size
+#      of the STL collection  classes does not depend on these macros).
+#      All pre-requisite products are built by MSVS 2010 in Debug mode with the default
+#      values of the metioned above macros (namely _SECURE_SCL=1, _HAS_ITERATOR_DEBUGGING=1 and
+#      _SECURE_SCL_THROWS=1). So SALOME modules should be build in the same configuration.
+#
+################################################################################################
+#
+#  # Disable iterator debugging on WINDOWS to avoid runtime error during checking iterators
+#    # _SECURE_SCL
+#    #             If defined as 1, unsafe iterator use causes a runtime error.
+#    #             If defined as 0, checked iterators are disabled.
+#    #             The default value for _SECURE_SCL is 1
+#    # _SECURE_SCL_THROWS
+#    #             If defined as 1, an out of range iterator use causes an exception at runtime.
+#    #             If defined as 0, the program is terminated by calling invalid_parameter.
+#    #             The default value for _SECURE_SCL_THROWS is 0
+#
+#  ADD_DEFINITIONS(-D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0)
+#
+#    # The symbol _HAS_ITERATOR_DEBUGGING can be used to turn off the iterator debugging feature in a debug build
+#    #             If defined as 1, iterator debugging is enabled.
+#    #             If defined as 0, iterator debugging is disabled.
+#    #             The default value for _HAS_ITERATOR_DEBUGGING is 1
+#
+#  IF(NOT CMAKE_BUILD_TYPE STREQUAL "RELEASE" AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
+#    ADD_DEFINITIONS(-D_HAS_ITERATOR_DEBUGGING=0)
+#  ENDIF(NOT CMAKE_BUILD_TYPE STREQUAL "RELEASE" AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
+################################################################################################

   IF(MACHINE_IS_64)
     SET(SIZE_OF_LONG 4)                          # set sizeof(long) to 4 byte


Force patch version to '0'

Force patch version to '0'

--- cmake/LIEFGit.cmake
+++ cmake/LIEFGit.cmake
@@ -57,6 +57,7 @@

   if (NOT ${LIEF_IS_TAGGED})
     MATH(EXPR LIEF_VERSION_MINOR "${LIEF_VERSION_MINOR}+1")
+    set(LIEF_VERSION_PATCH 0)
   endif()
 else()
   set(LIEF_VERSION_MAJOR 0)


cmake: fix doxygen generation

cmake: fix doxygen generation

Former-commit-id: 5b4e3755c233d953c1d10d0af75264026b4e0543

--- cmake/doxygen.cmake
+++ cmake/doxygen.cmake
@@ -60,7 +60,7 @@
         set(tag_files)
         foreach(dependency ${dependencies})
             list(APPEND dependencies_targets "doc-${dependency}")
-            set(tag_files "${tag_files} misc/doxygen-tags/${dependency}=../${dependency}")
+            set(tag_files "${tag_files} misc/doxygen-tagfiles/${dependency}=../${dependency}")
         endforeach()

         # Generate a Doxyfile based on Doxyfile.in, with configure_file()


The sed was not correct in case we have a PAE kernel.

--- cmake/dtkPack.cmake
+++ cmake/dtkPack.cmake
@@ -27,6 +27,7 @@

 if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
   execute_process(COMMAND uname -r
+    COMMAND sed "s/\\.PAE//" # Getting of any PAE keyword
     COMMAND sed "s/.*\\.\\(\\w*\\.\\w*\\)$/\\1/"
     OUTPUT_VARIABLE PACKAGE_EXTENSION
     OUTPUT_STRIP_TRAILING_WHITESPACE)


ENH: Merge multiple static libs into singe one

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -11,22 +11,79 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-
-
+#
 # To simplify the build process of PaddlePaddle, we defined couple of
 # fundamental abstractions, e.g., how to build library, binary and
 # test in C++, CUDA and Go.
 #
 # -------------------------------------------
-#    C++	      CUDA C++	      Go
+#     C++        CUDA C++       Go
 # -------------------------------------------
-# cc_library	 nv_library	  go_library
-# cc_binary  	 nv_binary	  go_binary
-# cc_test        nv_test	  go_test
+# cc_library    nv_library   go_library
+# cc_binary     nv_binary    go_binary
+# cc_test       nv_test      go_test
 # -------------------------------------------
 #
 # cmake_parse_arguments can help us to achieve this goal.
 # https://cmake.org/cmake/help/v3.0/module/CMakeParseArguments.html
+#
+# cc_library|nv_library(<target_name> [STATIC SHARED] SRCS <file>... DEPS <libs>...)
+#
+# cc_library and nv_library can generate *.a, or *.so
+# if the corresponding keyword STATIC or SHARED is specified.
+#
+# cc_binary|nv_binary(<target_name> SRCS <file>... DEPS <libs>...)
+#
+# cc_binary and nv_binary can build souce code and link the dependent
+# libraries to generate a binary.
+#
+# cc_test|nv_test(<target_name> SRCS <file>... DEPS <libs>...)
+#
+# cc_test and nv_test can build test code, link gtest and other dependent
+# libraries to generate test suite.
+#
+# For example, in one folder, it contains
+#   ddim{.h, .cc, _test.cc, _test.cu}
+#   place{.h, cc, _test.cc}
+#
+# We can add build script as follows:
+#
+# cc_library(place STATIC SRCS place.cc)
+#
+# place.cc -> place.a
+# cc_library's STATIC OPTION will generate libplace.a.
+#
+# cc_test(place_test
+#    SRCS place_test.cc
+#    DEPS place glog gflags)
+#
+# place_test.cc, place, glog, gflags -> place_test
+# cc_test will combine place_test.cc, libplace.a with libglog.a.
+# and libgflags.a to generate place_test.
+#
+# cc_library(ddim STATIC SRCS ddim.cc)
+#
+# ddim.cc -> ddim.a
+# cc_library's STATIC OPTION will generate libddim.a.
+#
+# cc_test(ddim_test
+#    SRCS ddim_test.cc
+#    DEPS ddim)
+#
+# ddim_test.cc, ddim.a -> ddim_test
+# cc_test will build ddim_test.cc with libddim.a to generate ddim_test.
+#
+# nv_test(dim_test
+#    SRCS dim_test.cu
+#    DEPS ddim)
+#
+# dim_test.cu, ddim.a -> dim_test
+# nv_test will build dim_test.cu with libddim.a to generate dim_test.
+#
+# cc_library(framework DEPS place ddim)
+#
+# place.a, ddim.a -> framework.a
+# If no SRCS exists, merging libplace.a and libddim.a to generate libframework.a.
 #

 if(NOT APPLE)
@@ -34,33 +91,92 @@
     link_libraries(${CMAKE_THREAD_LIBS_INIT})
 endif(NOT APPLE)

-# cc_library parses tensor.cc and figures out that target also depend on tensor.h.
-# cc_library(tensor
-#   SRCS
-#   tensor.cc
-#   DEPS
-#   variant)
+function(merge_static_libs TARGET_NAME)
+	set(libs ${ARGN})
+	list(REMOVE_DUPLICATES libs)
+
+	# First get the file names of the libraries to be merged
+	foreach(lib ${libs})
+		get_target_property(libtype ${lib} TYPE)
+		if(NOT libtype STREQUAL "STATIC_LIBRARY")
+			message(FATAL_ERROR "merge_static_libs can only process static libraries")
+		endif()
+		set(libfiles ${libfiles} $<TARGET_FILE:${lib}>)
+  endforeach()
+
+  if(APPLE) # Use OSX's libtool to merge archives
+    add_custom_target(${TARGET_NAME}_archive
+      COMMAND libtool -static -o "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET_NAME}.a" ${libfiles}
+      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+      DEPENDS ${libs}
+      )
+    add_library(${TARGET_NAME} STATIC IMPORTED GLOBAL)
+    set_property(TARGET ${TARGET_NAME} PROPERTY
+      IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET_NAME}.a")
+    add_dependencies(${TARGET_NAME} ${TARGET_NAME}_archive)
+	else() # general UNIX: use "ar" to extract objects and re-add to a common lib
+		foreach(lib ${libs})
+			set(objlistfile ${lib}.objlist) # list of objects in the input library
+			set(objdir ${lib}.objdir)
+
+			add_custom_command(OUTPUT ${objdir}
+					COMMAND ${CMAKE_COMMAND} -E make_directory ${objdir})
+
+			add_custom_command(OUTPUT ${objlistfile}
+					COMMAND ${CMAKE_AR} -x "$<TARGET_FILE:${lib}>"
+					COMMAND ${CMAKE_AR} -t "$<TARGET_FILE:${lib}>" > ../${objlistfile}
+					DEPENDS ${lib} ${objdir}
+					WORKING_DIRECTORY ${objdir})
+
+			# Empty dummy source file that goes into merged library
+			set(mergebase ${lib}.mergebase.c)
+			add_custom_command(OUTPUT ${mergebase}
+					COMMAND ${CMAKE_COMMAND} -E touch ${mergebase}
+					DEPENDS ${objlistfile})
+
+			list(APPEND mergebases "${mergebase}")
+		endforeach()
+
+		# We need a target for the output merged library
+		add_library(${TARGET_NAME} STATIC ${mergebases})
+		set(outlibfile "$<TARGET_FILE:${TARGET_NAME}>")
+
+		foreach(lib ${libs})
+			add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
+					COMMAND ${CMAKE_AR} ru ${outlibfile} @"../${objlistfile}"
+					WORKING_DIRECTORY ${objdir})
+		endforeach()
+
+		add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
+				COMMAND ${CMAKE_RANLIB} ${outlibfile})
+	endif()
+endfunction(merge_static_libs)
+
 function(cc_library TARGET_NAME)
-  set(options OPTIONAL)
+  set(options STATIC static SHARED shared)
   set(oneValueArgs "")
   set(multiValueArgs SRCS DEPS)
   cmake_parse_arguments(cc_library "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-  if (${cc_library_OPTIONAL} STREQUAL "SHARED")
-    add_library(${TARGET_NAME} SHARED ${cc_library_SRCS})
-  else()
-    add_library(${TARGET_NAME} STATIC ${cc_library_SRCS})
-  endif()
-  if (cc_library_DEPS)
-    add_dependencies(${TARGET_NAME} ${cc_library_DEPS})
-  endif()
+  if (cc_library_SRCS)
+    if (cc_library_SHARED OR cc_library_shared) # build *.so
+      add_library(${TARGET_NAME} SHARED ${cc_library_SRCS})
+    else()
+      add_library(${TARGET_NAME} STATIC ${cc_library_SRCS})
+    endif()
+    if (cc_library_DEPS)
+      add_dependencies(${TARGET_NAME} ${cc_library_DEPS})
+    endif()
+  else(cc_library_SRCS)
+    if (cc_library_DEPS)
+      merge_static_libs(${TARGET_NAME} ${cc_library_DEPS})
+    else()
+      message(FATAL "Please specify source file or library in cc_library.")
+    endif()
+  endif(cc_library_SRCS)
 endfunction(cc_library)

-# cc_binary parses tensor.cc and figures out that target also depend on tensor.h.
-# cc_binary(tensor
-#   SRCS
-#   tensor.cc)
 function(cc_binary TARGET_NAME)
-  set(options OPTIONAL)
+  set(options "")
   set(oneValueArgs "")
   set(multiValueArgs SRCS DEPS)
   cmake_parse_arguments(cc_binary "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
@@ -71,13 +187,6 @@
   endif()
 endfunction(cc_binary)

-# The dependency to target tensor implies that if any of
-# tensor{.h,.cc,_test.cc} is changed, tensor_test need to be re-built.
-# cc_test(tensor_test
-#   SRCS
-#   tensor_test.cc
-#   DEPS
-#   tensor)
 function(cc_test TARGET_NAME)
   if(WITH_TESTING)
     set(options "")
@@ -91,28 +200,28 @@
   endif()
 endfunction(cc_test)

-# Suppose that ops.cu includes global functions that take Tensor as
-# their parameters, so ops depend on tensor. This implies that if
-# any of tensor.{h.cc}, ops.{h,cu} is changed, ops need to be re-built.
-# nv_library(ops
-#   SRCS
-#   ops.cu
-#   DEPS
-#   tensor)
 function(nv_library TARGET_NAME)
   if (WITH_GPU)
-    set(options OPTIONAL)
+    set(options STATIC static SHARED shared)
     set(oneValueArgs "")
     set(multiValueArgs SRCS DEPS)
     cmake_parse_arguments(nv_library "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-    if (${nv_library_OPTIONAL} STREQUAL "SHARED")
-      cuda_add_library(${TARGET_NAME} SHARED ${nv_library_SRCS})
-    else()
-      cuda_add_library(${TARGET_NAME} STATIC ${nv_library_SRCS})
-    endif()
-    if (nv_library_DEPS)
-      add_dependencies(${TARGET_NAME} ${nv_library_DEPS})
-    endif()
+    if(nv_library_SRCS)
+      if (nv_library_SHARED OR nv_library_shared) # build *.so
+        cuda_add_library(${TARGET_NAME} SHARED ${nv_library_SRCS})
+      else()
+          cuda_add_library(${TARGET_NAME} STATIC ${nv_library_SRCS})
+      endif()
+      if (nv_library_DEPS)
+        add_dependencies(${TARGET_NAME} ${nv_library_DEPS})
+      endif()
+    else(nv_library_SRCS)
+      if (nv_library_DEPS)
+        merge_static_libs(${TARGET_NAME} ${nv_library_DEPS})
+      else()
+        message(FATAL "Please specify source file or library in nv_library.")
+      endif()
+    endif(nv_library_SRCS)
   endif()
 endfunction(nv_library)

@@ -130,13 +239,6 @@
   endif()
 endfunction(nv_binary)

-# The dependency to target tensor implies that if any of
-# ops{.h,.cu,_test.cu} is changed, ops_test need to be re-built.
-# nv_test(ops_test
-#   SRCS
-#   ops_test.cu
-#   DEPS
-#   ops)
 function(nv_test TARGET_NAME)
   if (WITH_GPU AND WITH_TESTING)
     set(options "")


Revert "cmake: kconfig: Run Kconfig on every reconfiguration"

This reverts commit a8b361b17636e0547124e6afe4060fe974fe0a77.

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/kconfig.cmake
+++ cmake/kconfig.cmake
@@ -94,28 +94,63 @@
   endif()
 endforeach()

+# Calculate a checksum of merge_config_files to determine if we need
+# to re-generate .config
+set(merge_config_files_checksum "")
+foreach(f ${merge_config_files_with_absolute_paths})
+  file(MD5 ${f} checksum)
+  set(merge_config_files_checksum "${merge_config_files_checksum}${checksum}")
+endforeach()
+
+# Create a new .config if it does not exists, or if the checksum of
+# the dependencies has changed
+set(merge_config_files_checksum_file ${PROJECT_BINARY_DIR}/.cmake.dotconfig.checksum)
+set(CREATE_NEW_DOTCONFIG "")
+if(NOT EXISTS ${DOTCONFIG})
+  set(CREATE_NEW_DOTCONFIG 1)
+else()
+  # Read out what the checksum was previously
+  file(READ
+    ${merge_config_files_checksum_file}
+    merge_config_files_checksum_prev
+    )
+  set(CREATE_NEW_DOTCONFIG 1)
+  if(
+      ${merge_config_files_checksum} STREQUAL
+      ${merge_config_files_checksum_prev}
+      )
+    set(CREATE_NEW_DOTCONFIG 0)
+  endif()
+endif()
+if(CREATE_NEW_DOTCONFIG)
+  execute_process(
+    COMMAND
+    ${PYTHON_EXECUTABLE}
+    ${PROJECT_SOURCE_DIR}/scripts/kconfig/kconfig.py
+    ${KCONFIG_ROOT}
+    ${PROJECT_BINARY_DIR}/.config
+    ${PROJECT_BINARY_DIR}/include/generated/autoconf.h
+    ${merge_config_files}
+    WORKING_DIRECTORY ${APPLICATION_SOURCE_DIR}
+    # The working directory is set to the app dir such that the user
+    # can use relative paths in CONF_FILE, e.g. CONF_FILE=nrf5.conf
+    RESULT_VARIABLE ret
+  )
+  if(NOT "${ret}" STREQUAL "0")
+    message(FATAL_ERROR "command failed with return code: ${ret}")
+  endif()
+
+  file(WRITE
+    ${merge_config_files_checksum_file}
+    ${merge_config_files_checksum}
+    )
+endif()
+
 # Force CMAKE configure when the configuration files changes.
 foreach(merge_config_input ${merge_config_files} ${DOTCONFIG})
   set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${merge_config_input})
 endforeach()

-execute_process(
-  COMMAND
-  ${PYTHON_EXECUTABLE}
-  ${PROJECT_SOURCE_DIR}/scripts/kconfig/kconfig.py
-  ${KCONFIG_ROOT}
-  ${PROJECT_BINARY_DIR}/.config
-  ${PROJECT_BINARY_DIR}/include/generated/autoconf.h
-  ${merge_config_files}
-  WORKING_DIRECTORY ${APPLICATION_SOURCE_DIR}
-  # The working directory is set to the app dir such that the user
-  # can use relative paths in CONF_FILE, e.g. CONF_FILE=nrf5.conf
-  RESULT_VARIABLE ret
-  )
-if(NOT "${ret}" STREQUAL "0")
-  message(FATAL_ERROR "command failed with return code: ${ret}")
-endif()
-
 add_custom_target(config-sanitycheck DEPENDS ${DOTCONFIG})

 # Parse the lines prefixed with CONFIG_ in the .config file from Kconfig


No need to link in dl, we are not doing runtime dynamic linking

--- cmake/openssl.cmake
+++ cmake/openssl.cmake
@@ -37,7 +37,7 @@
             if(OpenSSL_FOUND)
                 set(LIBCRYPTO_LDFLAGS OpenSSL::Crypto)
                 if(NOT WIN32)
-                    set(LIBCRYPTO_LDFLAGS ${LIBCRYPTO_LDFLAGS} -ldl)
+                    set(LIBCRYPTO_LDFLAGS ${LIBCRYPTO_LDFLAGS})
                 endif(NOT WIN32)

                 set(LIBCRYPTO_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})


Added define for HAVE_CURLINFO_RESPONSE_CODE in config.h template for cmake-based builds.

--- config.h.in.cmake
+++ config.h.in.cmake
@@ -96,9 +96,10 @@
 #cmakedefine USE_ZLIB 1
 #cmakedefine USE_X_GETOPT 1
 #cmakedefine LARGE_FILE_TESTS 1
-#cmakedefine HAVE_CURLOPT_KEYPASSWD
 #cmakedefine HAVE_DECL_ISFINITE 1
-#cmakedefine HAVE_DECL_ISNAN
+#cmakedefine HAVE_DECL_ISNAN 1
+#cmakedefine HAVE_CURLOPT_KEYPASSWD 1
+#cmakedefine HAVE_CURLINFO_RESPONSE_CODE 1
 #cmakedefine HAVE_DECL_SIGNBIT 1
 #cmakedefine HAVE_DOPRNT
 #cmakedefine HAVE_ALLOCA


Don’t use generator expression to build .pc Libs lines

When building pkg-config files, compute linker flags with a string
substitution rather than the JOIN generator expression. This ensures
that commas in linker flags don’t get treated as argument separators in
JOIN.

Bug: https://bugs.debian.org/1011294
PiperOrigin-RevId: 450675966
Change-Id: I61eacc46a468bae5ff3dae2b437a564f2f1042c2

--- CMake/AbseilHelpers.cmake
+++ CMake/AbseilHelpers.cmake
@@ -170,6 +170,7 @@
           set(PC_CFLAGS "${PC_CFLAGS} ${cflag}")
         endif()
       endforeach()
+      string(REPLACE ";" " " PC_LINKOPTS "${ABSL_CC_LIB_LINKOPTS}")
       FILE(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/lib/pkgconfig/absl_${_NAME}.pc" CONTENT "\
 prefix=${CMAKE_INSTALL_PREFIX}\n\
 exec_prefix=\${prefix}\n\
@@ -181,7 +182,7 @@
 URL: https://abseil.io/\n\
 Version: ${PC_VERSION}\n\
 Requires:${PC_DEPS}\n\
-Libs: -L\${libdir} $<JOIN:${ABSL_CC_LIB_LINKOPTS}, > $<$<NOT:$<BOOL:${ABSL_CC_LIB_IS_INTERFACE}>>:-labsl_${_NAME}>\n\
+Libs: -L\${libdir} ${PC_LINKOPTS} $<$<NOT:$<BOOL:${ABSL_CC_LIB_IS_INTERFACE}>>:-labsl_${_NAME}>\n\
 Cflags: -I\${includedir}${PC_CFLAGS}\n")
       INSTALL(FILES "${CMAKE_BINARY_DIR}/lib/pkgconfig/absl_${_NAME}.pc"
               DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")


COMP: Upgrade VMTK for VTK 7 compatibility

--- CMakeExternals/VMTK.cmake
+++ CMakeExternals/VMTK.cmake
@@ -23,8 +23,8 @@

     ExternalProject_Add(${proj}
       LIST_SEPARATOR ${sep}
-      URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/vtkVmtk-vtk6-90e0233.tar.bz2
-      URL_MD5 c961f891868b7f91676509a9988ad76f
+      URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/vtkVmtk-7fdc618c.tar.bz2
+      URL_MD5 6ea04aa5921308abcad8a3ffc8e4ca2d
       PATCH_COMMAND ${PATCH_COMMAND} -N -p1 -i ${CMAKE_CURRENT_LIST_DIR}/VMTK.patch
       CMAKE_GENERATOR ${gen}
       CMAKE_ARGS


Improve debug output from artifactory download

Multiple artifacts may have been found and downloaded.

--- Artifactory.cmake
+++ Artifactory.cmake
@@ -151,7 +151,7 @@
                 COMMAND cmake -E create_symlink ${file} ${binary_directory}/artifact-prebuilt/${file_name})
         endforeach()

-        message(STATUS "    - Found prebuilt artifact for ${ARTIFACT_NAME}: ${prebuilt_artifact_files}")
+        message(STATUS "    - Found prebuilt artifact(s) for ${ARTIFACT_NAME}: ${prebuilt_artifact_files}")
     else()
         message(STATUS "    - No prebuilt artifacts found for ${ARTIFACT_NAME}")
     endif()


add ref files

add ref files

git-svn-id: de9bbed4c30e0eb58fe8e7d66f5c80b71699a07c@2496 bf01a9d7-0df3-0310-8ad4-b1c94d9ae2d5

--- Numerics/cmake/CMakeListsForExamples.cmake
+++ Numerics/cmake/CMakeListsForExamples.cmake
@@ -29,6 +29,13 @@
       MESSAGE(STATUS "Configuring file : ${CMAKE_CURRENT_BINARY_DIR}/${EXAMPLE_XML}")
       CONFIGURE_FILE(${_F} ${CMAKE_CURRENT_BINARY_DIR}/${EXAMPLE_XML}  @COPYONLY)
     ENDFOREACH(_F ${EXAMPLES_XML})
+    FILE(GLOB EXAMPLES_REF ${EXAMPLE_PATH}/*.ref)
+    FOREACH(_F ${EXAMPLES_REF})
+      GET_FILENAME_COMPONENT(EXAMPLE_REF ${_F} NAME)
+      MESSAGE(STATUS "Found ref file : ${_F}")
+      MESSAGE(STATUS "Configuring file : ${CMAKE_CURRENT_BINARY_DIR}/${EXAMPLE_REF}")
+      CONFIGURE_FILE(${_F} ${CMAKE_CURRENT_BINARY_DIR}/${EXAMPLE_REF}  @COPYONLY)
+    ENDFOREACH(_F ${EXAMPLES_REF})
     SET_SOURCE_FILES_PROPERTIES(${EXAMPLE} PROPERTIES LANGUAGE SICONOS)
     ADD_EXECUTABLE(${EXAMPLE_NAME} ${EXAMPLE})
     ADD_EXAMPLE(${EXAMPLE_NAME} ${EXAMPLE_NAME})


CI, test mycdash

CI, test mycdash

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -11,8 +11,10 @@

 # https is needed on cdash server side
 set(CTEST_DROP_METHOD "https")
-set(CTEST_DROP_SITE "cdash-tripop.inrialpes.fr")
-set(CTEST_DROP_LOCATION "/submit.php?project=Siconos")
+#set(CTEST_DROP_SITE "cdash-tripop.inrialpes.fr")
+set(CTEST_DROP_SITE "my.cdash.org")
+#set(CTEST_DROP_LOCATION "/submit.php?project=Siconos")
+set(CTEST_DROP_LOCATION "/index.php?project=Siconos")
 set(CTEST_DROP_SITE_CDASH TRUE)
 if(BUILD_NAME)
   set(CTEST_BUILD_NAME Siconos-${BUILD_NAME})


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")


New CDash dashboard up and running now

New CDash dashboard up and running now

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -4,10 +4,10 @@
 ## # The following are required to uses Dart and the Cdash dashboard
 ##   ENABLE_TESTING()
 ##   INCLUDE(CTest)
-set(CTEST_PROJECT_NAME "MatViz")
+set(CTEST_PROJECT_NAME "TomViz")
 set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT")

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "cdash.openchemistry.org")
-set(CTEST_DROP_LOCATION "/submit.php?project=MatViz")
+set(CTEST_DROP_SITE "open.cdash.org")
+set(CTEST_DROP_LOCATION "/submit.php?project=TomViz")
 set(CTEST_DROP_SITE_CDASH TRUE)


refs #5127 try to ignore build warnings in jemalloc source

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@50813 c7de825b-a66e-492c-adef-691d508d4ae1

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -226,7 +226,7 @@
   "clang: warning: unknown warning option"
   # don't complain about warnings in jemalloc source
   "jemalloc-3.2.0/src"
-  "jemalloc/internal/jemalloc_internal.h"
+  "jemalloc/internal"
   # don't complain about ranlib or libtool on empty archive
   "has no symbols"
   "the table of contents is empty"


refs #5833 don't run valgrind over helgrind

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@51468 c7de825b-a66e-492c-adef-691d508d4ae1

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -14,6 +14,7 @@
   portability/try-leak-uninit
   util/helgrind_test_circular_buffer
   util/helgrind_test_partitioned_counter
+  util/helgrind_test_partitioned_counter_5833
   ydb/diskfull.tdb
   ydb/drd_test_4015.tdb
   ydb/drd_test_groupcommit_count.tdb
@@ -231,4 +232,4 @@
   # don't complain about ranlib or libtool on empty archive
   "has no symbols"
   "the table of contents is empty"
-  )+  )


Clean up and make FindPySideTools CMake module more robust


Cmake: prevent daemon start without certificate

--- etc/init/openwsmand.sh.cmake
+++ etc/init/openwsmand.sh.cmake
@@ -56,20 +56,16 @@
 	echo "Using common server certificate /etc/ssl/servercerts/servercert.pem"
 	ln -s /etc/ssl/servercerts/server{cert,key}.pem @WSMANCONF_DIR@
       else
-        echo "Generating Openwsman server public certificate and private key"
-	FQDN=`hostname --fqdn`
-	if [ "x${X1}{FQDN}" = "x" ]; then
-	  FQDN=localhost.localdomain
-	fi
-cat << EOF | sh @WSMANCONF_DIR@/owsmangencert.sh > /dev/null 2>&1
---
-SomeState
-SomeCity
-SomeOrganization
-SomeOrganizationalUnit
-${X1}{FQDN}
-root@${X1}{FQDN}
-EOF
+	echo "FAILED: Starting openwsman server"
+        echo "There is no ssl server key available for openwsman server to use."
+	echo -e "Please generate one with the following script and start the openwsman service again:\n"
+	echo "##################################"
+        echo "/etc/openwsman/owsmangencert.sh"
+	echo "================================="
+
+	echo "NOTE: The script uses /dev/random device for generating some random bits while generating the server key."
+	echo "      If this takes too long, you can replace the value of \"RANDFILE\" in @SYSCONFDIR@/ssleay.cnf with /dev/urandom. Please understand the implications of replacing the RNADFILE."
+
       fi
     fi

@@ -145,8 +141,12 @@
     fi
     ;;

+   condrestart)
+      [ -e $lockfile ] && restart
+    ;;
+
     *)
-    echo "Usage: $0 {restart|start|stop|reload|force-reload|status}"
+    echo "Usage: $0 {restart|start|stop|reload|force-reload|status|condrestart}"
 esac

 if [ $lsb -ne 0 ]; then


#51 Fix CMake test that would overwrite .lib with .dll for variable SUFFIX

--- FFmpeg/FFmpeg.cmake
+++ FFmpeg/FFmpeg.cmake
@@ -7,7 +7,7 @@
 		set(SUFFIX ${CMAKE_IMPORT_LIBRARY_SUFFIX})
 	endif()

-	if (NOT "${SUFFIX}")
+	if ("${SUFFIX}" STREQUAL "")
 		set(SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
 	endif()


COMP: Add VTK Python module when wrapping ITKVtkGlue.

Required for missing vtkPythonUtil.h header.

Change-Id: Ida06b0d4adfa491bf78f4f5508b84a9709e45fb2

--- Modules/Bridge/VtkGlue/itk-module-init.cmake
+++ Modules/Bridge/VtkGlue/itk-module-init.cmake
@@ -5,8 +5,13 @@
 # Needed VTK version
 set(VERSION_MIN "5.10.0")

+set(_wrap_module)
+if(ITK_WRAP_PYTHON)
+  set(_wrap_module vtkWrappingPythonCore)
+endif()
 # Look for VTK
-find_package(VTK COMPONENTS
+find_package(VTK REQUIRED
+  COMPONENTS
   vtkCommonCore
   vtkRenderingCore
   vtkRenderingOpenGL
@@ -14,7 +19,8 @@
   vtkInteractionStyle
   vtkIOImage
   vtkImagingSources
-  REQUIRED)
+  ${_wrap_module}
+  )

 # Older versions of VTK (VTK 5.5 for example) do not have VTK_VERSION, in this
 # case it needs to be defined manually


Fixing NODEJS_LINK_FLAGS expansion

Fixing NODEJS_LINK_FLAGS expansion

Errant quotes caused the link flags to expand incorrectly (with
semicolons). The quotes shouldn't be necessary, so they can be safely
removed.

--- NodeJS.cmake
+++ NodeJS.cmake
@@ -606,7 +606,7 @@
         POSITION_INDEPENDENT_CODE TRUE
         CMAKE_CXX_STANDARD_REQUIRED TRUE
         CXX_STANDARD 11
-        LINK_FLAGS "${NODEJS_LINK_FLAGS}"
+        LINK_FLAGS ${NODEJS_LINK_FLAGS}
     )

     # Make sure we're buiilding in a build specific output directory


Update cmake-conan to 0.16.1

Update cmake-conan to 0.16.1

Former-commit-id: 3f147e451df2888b9432c928bfb21f3188546692

--- cmake-modules/SetupDependenciesConan.cmake
+++ cmake-modules/SetupDependenciesConan.cmake
@@ -108,7 +108,7 @@
         # Download cmake-conan automatically, you can also just copy the conan.cmake file
         if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
             message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
-            file(DOWNLOAD "https://github.com/conan-io/cmake-conan/raw/v0.15/conan.cmake"
+            file(DOWNLOAD "https://github.com/conan-io/cmake-conan/raw/v0.16.1/conan.cmake"
                     "${CMAKE_BINARY_DIR}/conan.cmake")
         endif()


Qt 5.9 Windows: Add Mfplat/Mfuuid/Mf/Evr/Dxva2 dependency

--- cmake/Qt5Multimedia_ZZZ_HunterPlugin.cmake
+++ cmake/Qt5Multimedia_ZZZ_HunterPlugin.cmake
@@ -78,6 +78,25 @@
   endif()
 endif()

+if(TARGET Qt5::DSServicePlugin)
+  if(WIN32)
+    # _MFCreateMediaType
+    _qt_cmake_extra_helpers_add_interface(Qt5::DSServicePlugin Mfplat)
+
+    # _IID_IMFGetService
+    _qt_cmake_extra_helpers_add_interface(Qt5::DSServicePlugin Mfuuid)
+
+    # _MFGetService
+    _qt_cmake_extra_helpers_add_interface(Qt5::DSServicePlugin Mf)
+
+    # _MFCreateVideoSampleFromSurface
+    _qt_cmake_extra_helpers_add_interface(Qt5::DSServicePlugin Evr)
+
+    # _DXVA2CreateDirect3DDeviceManager9
+    _qt_cmake_extra_helpers_add_interface(Qt5::DSServicePlugin Dxva2)
+  endif()
+endif()
+
 _qt_cmake_extra_helpers_add_source(
     Qt5::AVFServicePlugin
     "static_qt_AVFServicePlugin.cpp"


av_x-v1 remove mtd driver

av_x-v1 remove mtd driver

--- boards/av/x-v1/default.cmake
+++ boards/av/x-v1/default.cmake
@@ -88,7 +88,6 @@
 		mixer
 		motor_ramp
 		motor_test
-		mtd
 		nshterm
 		param
 		perf


fix systemd unit file install.

fix systemd unit file install.

--- cmake/ArangoDBInstall.cmake
+++ cmake/ArangoDBInstall.cmake
@@ -91,10 +91,10 @@
     ${PROJECT_BINARY_DIR}/usr/lib/systemd/system/arangodb3.service
     NEWLINE_STYLE UNIX)
   if (${USE_ENTERPRISE})
-    install(${PROJECT_BINARY_DIR}/usr/lib/systemd/system/arangodb3.service
+    install(FILES ${PROJECT_BINARY_DIR}/usr/lib/systemd/system/arangodb3.service
       DESTINATION /usr/lib/systemd/system/arangodb3e.service)
   else()
-    install(${PROJECT_BINARY_DIR}/usr/lib/systemd/system/arangodb3.service
+    install(FILES ${PROJECT_BINARY_DIR}/usr/lib/systemd/system/arangodb3.service
       DESTINATION /usr/lib/systemd/system/arangodb3.service)
   endif()
 endif()


Fixing issue with CMake >= 2.8.10.2 FindPackageHandleStandardArgs.

- Prior to CMake 2.8.10.2 FindPackageHandleStandardArgs was safe if
  passed <LIBRARY>_FOUND as a variable to validate, this is no longer
  true for newer CMake releases.
- Also adding missing SUITESPARSEQR_FOUND requirement for
  SUITESPARSE_FOUND.

Change-Id: I0fdde56585fc736bdfbf433901ad17ee9f1cc216

--- cmake/FindSuiteSparse.cmake
+++ cmake/FindSuiteSparse.cmake
@@ -428,6 +428,7 @@
     COLAMD_FOUND AND
     CCOLAMD_FOUND AND
     CHOLMOD_FOUND AND
+    SUITESPARSEQR_FOUND AND
     (SUITESPARSE_CONFIG_FOUND OR UFCONFIG_FOUND) AND
     BLAS_FOUND AND
     LAPACK_FOUND)
@@ -501,6 +502,11 @@

 # Handle REQUIRED and QUIET arguments to FIND_PACKAGE
 INCLUDE(FindPackageHandleStandardArgs)
+# A change to CMake after release 2.8.10.2 means that
+# FindPackageHandleStandardArgs() unsets <LibraryName>_FOUND without checking
+# if it is one of the variables passed whose existence & validity is verified
+# by FindPackageHandleStandardArgs() in conjunction with handling the REQUIRED
+# and QUIET optional arguments, as such we use an intermediary variable.
+SET(SUITESPARSE_FOUND_COPY ${SUITESPARSE_FOUND})
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(SuiteSparse DEFAULT_MSG
-  SUITESPARSE_FOUND SUITESPARSE_INCLUDE_DIRS SUITESPARSE_LIBRARIES)
-
+  SUITESPARSE_FOUND_COPY SUITESPARSE_INCLUDE_DIRS SUITESPARSE_LIBRARIES)


CMake: Place PDBs inside bin

CMake: Place PDBs inside bin

Change-Id: Iee6f7e85a615d27eb9a8190cad39cf7f2e814d63
Reviewed-on: http://review.couchbase.org/33297
Reviewed-by: Brett Lawson <c8c4369773d7d7226e031f0c4af62e3f38a08510@gmail.com>
Tested-by: Mark Nunberg <e7d42768707bf23038325b0b68d4b577e5f6064a@haskalah.org>

--- cmake/Modules/CopyPDB.cmake
+++ cmake/Modules/CopyPDB.cmake
@@ -27,15 +27,13 @@
         GET_TARGET_PROPERTY(_BIN_RDB ${target} LOCATION_RelWithDebInfo)
         TRANSFORM_TARGET(${_BIN_DEBUG} _DEBUG_PDB _DEBUG_EXP)
         TRANSFORM_TARGET(${_BIN_RDB} _RDB_PDB _RDB_EXP)
-        INSTALL(FILES
-            ${_DEBUG_PDB}
-            ${_DEBUG_EXP}
-            DESTINATION lib
-            CONFIGURATIONS DEBUG)
-        INSTALL(FILES
-            ${_RDB_PDB}
-            ${_RDB_EXP}
-            DESTINATION lib
-            CONFIGURATIONS RelWithDebInfo)
+        INSTALL(FILES ${_DEBUG_PDB} DESTINATION bin CONFIGURATIONS DEBUG)
+        INSTALL(FILES ${_RDB_PDB} DESTINATION bin CONFIGURATIONS RelWithDebInfo)
+        IF(_DEBUG_EXP)
+            INSTALL(FILES ${_DEBUG_EXP} DESTINATION lib CONFIGURATIONS DEBUG)
+        ENDIF()
+        IF(_RDB_EXP)
+            INSTALL(FILES ${_RDB_EXP} DESTINATION lib CONFIGURATIONS RelWithDebInfo)
+        ENDIF()
     ENDIF(MSVC)
 ENDMACRO()