Detect tolua++ lib from the deps package.

--- cmake/FindTOLUAPP.cmake
+++ cmake/FindTOLUAPP.cmake
@@ -4,9 +4,15 @@
 include(FindPackageHandleStandardArgs)

 find_path(TOLUAPP_H_PATH NAMES tolua++.h)
-find_library(TOLUAPP_LIB NAMES tolua++5.1 tolua++)
-find_library(TOLUAPP_LIB_DBG NAMES tolua++5.1_d tolua++_d)
+find_library(TOLUAPP_LIB NAMES tolua++5.1 tolua++ toluapp PATH_SUFFIXES dynamic)
+find_library(TOLUAPP_LIB_DBG NAMES tolua++5.1_d tolua++_d toluapp_d PATH_SUFFIXES dynamic)
 mark_as_advanced(TOLUAPP_H_PATH TOLUAPP_LIB TOLUAPP_LIB_DBG)
+
+if (WIN32 OR APPLE)
+    find_library(TOLUAPP_LIB_STATIC NAMES tolua++5.1 tolua++ toluapp PATH_SUFFIXES static)
+    find_library(TOLUAPP_LIB_STATIC_DBG NAMES tolua++5.1_d tolua++_d toluapp_d PATH_SUFFIXES static)
+    mark_as_advanced(TOLUAPP_LIB_STATIC TOLUAPP_LIB_STATIC_DBG)
+endif()

 find_package_handle_standard_args(TOLUAPP DEFAULT_MSG TOLUAPP_LIB TOLUAPP_H_PATH)

@@ -18,9 +24,17 @@
     if (TOLUAPP_LIB_DBG)
         set (TOLUAPP_LIBRARIES_DBG ${TOLUAPP_LIB_DBG})
     endif()
+    if (TOLUAPP_LIB_STATIC)
+        set (TOLUAPP_LIBRARIES_STATIC ${TOLUAPP_LIB_STATIC})
+    endif()
+    if (TOLUAPP_LIB_STATIC_DBG)
+        set (TOLUAPP_LIBRARIES_STATIC_DBG ${TOLUAPP_LIB_STATIC_DBG})
+    endif()
 else()
     set (TOLUAPP_INCLUDE_DIR)
     set (TOLUAPP_LIBRARIES)
     set (TOLUAPP_LIBRARIES_DBG)
+    set (TOLUAPP_LIBRARIES_STATIC)
+    set (TOLUAPP_LIBRARIES_STATIC_DBG)
 endif()


Forgot to add cache.json to cmake install in previous commit

--- cmake/InstallFAST.cmake
+++ cmake/InstallFAST.cmake
@@ -292,12 +292,12 @@
 )
 if(FAST_MODULE_OpenVINO)
 	if(WIN32)
-		install(FILES ${PROJECT_BINARY_DIR}/bin/plugins.xml
+		install(FILES ${PROJECT_BINARY_DIR}/bin/plugins.xml ${PROJECT_BINARY_DIR}/bin/cache.json
 		  DESTINATION fast/bin/
 			COMPONENT fast
 	  )
 	else()
-		install(FILES ${PROJECT_BINARY_DIR}/lib/plugins.xml
+		install(FILES ${PROJECT_BINARY_DIR}/lib/plugins.xml ${PROJECT_BINARY_DIR}/lib/cache.json
 			DESTINATION fast/lib/
 			COMPONENT fast
 		)


Fixed problem with backslashes in cmake status report

--- cmake/OpenCVUtils.cmake
+++ cmake/OpenCVUtils.cmake
@@ -90,13 +90,13 @@
 endmacro()

-# Status report macro.
+# Status report function.
 # Automatically align right column and selects text based on condition.
 # Usage:
 #   status(<text>)
 #   status(<heading> <value1> [<value2> ...])
 #   status(<heading> <condition> THEN <text for TRUE> ELSE <text for FALSE> )
-macro(status text)
+function(status text)
   set(status_cond)
   set(status_then)
   set(status_else)
@@ -140,7 +140,7 @@
   else()
     message(STATUS "${text}")
   endif()
-endmacro()
+endfunction()

 # splits cmake libraries list of format "general;item1;debug;item2;release;item3" to two lists


take out -pedantic as hyperscan build does not pass together with -Werror

--- cmake/build_rules.cmake
+++ cmake/build_rules.cmake
@@ -36,12 +36,12 @@
 set_property(GLOBAL PROPERTY rule_launch_link ccache)

 if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
-set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -Wshadow -pedantic -Wfatal-errors -fvisibility=hidden" )
-set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wall -pedantic -Wfatal-errors" )
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -Wshadow -Wfatal-errors -fvisibility=hidden" )
+set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wall -Wfatal-errors" )
 endif()
 if("${CMAKE_CXX_COMPILER_ID}" MATCHES "[cC]lang")
-set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -Wshadow -pedantic -Wfatal-errors -fvisibility=hidden -Wno-unused-private-field" )
-set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wall -pedantic -Wfatal-errors" )
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -Wshadow -Wfatal-errors -fvisibility=hidden -Wno-unused-private-field" )
+set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wall -Wfatal-errors" )
 endif()

 if(WIN32)


cmake: enable rpath on macosx flag

cmake: enable rpath on macosx flag

--- cmake/bvs-options.cmake
+++ cmake/bvs-options.cmake
@@ -1,3 +1,5 @@
+cmake_minimum_required(VERSION 3.0.2)
+
 ###############
 ### OPTIONS ###
 ###############
@@ -78,6 +80,7 @@

 if(BVS_OSX_ANOMALIES)
 	add_definitions(-DBVS_OSX_ANOMALIES)
+	set(CMAKE_MACOSX_RPATH ON)
 else()
 	remove_definitions(-DBVS_OSX_ANOMALIES)
 endif()


in fact we don't need that ENABLE_DEBBUILDING stuff now that nothing is modified until the target is built.

--- cmake/debian-util.cmake
+++ cmake/debian-util.cmake
@@ -4,6 +4,10 @@

 if (NOT TARGET debs)
   add_custom_target(debs)
+endif()
+
+if (NOT TARGET gendebian)
+  add_custom_target(gendebian)
 endif()

 set(CATKIN_DPKG_BUILDPACKAGE_FLAGS "-S")
@@ -18,10 +22,6 @@
     )

   include(${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/stack.cmake)
-
-  if (NOT CATKIN_ENABLE_DEBBUILDING)
-    return()
-  endif()

   assert(CATKIN_ENV)

@@ -46,5 +46,7 @@
     WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
     )

+  add_dependencies(gendebian ${PROJECT_NAME}-gendebian)
+
 endfunction()


Fix typo.

Fix typo.

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

Signed-off-by: Nicolas Despres <abdeb541ca46f1651c9cc594d44e707056e73d5d@gostai.com>

--- build-aux/cmake/modules/FindUrbiOpenSSL.cmake
+++ build-aux/cmake/modules/FindUrbiOpenSSL.cmake
@@ -90,7 +90,7 @@

     # Search for the include directory.
     package_search(PATH ${PACKAGE_NAME}_INCLUDE openssl/ssl.h
-                   FULLNAME "SDK Remote INCLUDE"
+                   FULLNAME "OpenSSL SSL INCLUDE"
                    PATHS ${${PACKAGE_NAME}_ROOT_DIR}/Debug/include
                          ${${PACKAGE_NAME}_ROOT_DIR}/Release/include
                          ${${PACKAGE_NAME}_ROOT_DIR}/include)


Use GEARSHIFFT_ROOT for absolute ext/ dir.

--- cmake/gearshifft-options.cmake
+++ cmake/gearshifft-options.cmake
@@ -11,7 +11,7 @@
 option(GEARSHIFFT_BACKEND_FFTW_PTHREADS "Use pthreads parallel FFTW libraries if found" OFF)
 option(GEARSHIFFT_BACKEND_HCFFT "< Not implemented yet >" OFF)

-set( GEARSHIFFT_EXT_DIR ${CMAKE_SOURCE_DIR}/../ext CACHE STRING "Install directory for external dependencies")
+set( GEARSHIFFT_EXT_DIR ${GEARSHIFFT_ROOT}/ext CACHE STRING "Install directory for external dependencies")

 set(GEARSHIFFT_CXX11_ABI "1" CACHE STRING "Enable _GLIBCXX_USE_CXX11_ABI in GCC 5.0+")
 set_property(CACHE GEARSHIFFT_CXX11_ABI PROPERTY STRINGS "0;1")
@@ -33,5 +33,5 @@
 if(GEARSHIFFT_VERBOSE)
   include(${GEARSHIFFT_ROOT}/cmake/get-gearshifft-options.cmake)
   get_gearshifft_options(gearshifft_options "\n ")
-  message(" ${gearshifft_options}")
+  message(" ${gearshifft_options}\n")
 endif()


Allow flag override.

Allow flag override.

--- cmake/toolchains/Arduino.cmake
+++ cmake/toolchains/Arduino.cmake
@@ -6,7 +6,9 @@
 #=============================================================================#
 #                              C Flags                                        #
 #=============================================================================#
-set(ARDUINO_C_FLAGS "-ffunction-sections -fdata-sections")
+if (NOT DEFINED ARDUINO_C_FLAGS)
+	set(ARDUINO_C_FLAGS "-ffunction-sections -fdata-sections")
+endif()
 set(CMAKE_C_FLAGS                "-g -Os       ${ARDUINO_C_FLAGS}" CACHE STRING "")
 set(CMAKE_C_FLAGS_DEBUG          "-g           ${ARDUINO_C_FLAGS}" CACHE STRING "")
 set(CMAKE_C_FLAGS_MINSIZEREL     "-Os -DNDEBUG ${ARDUINO_C_FLAGS}" CACHE STRING "")
@@ -16,7 +18,9 @@
 #=============================================================================#
 #                             C++ Flags                                       #
 #=============================================================================#
-set(ARDUINO_CXX_FLAGS "${ARDUINO_C_FLAGS} -fno-exceptions")
+if (NOT DEFINED ARDUINO_CXX_FLAGS)
+	set(ARDUINO_CXX_FLAGS "${ARDUINO_C_FLAGS} -fno-exceptions")
+endif()
 set(CMAKE_CXX_FLAGS                "-g -Os       ${ARDUINO_CXX_FLAGS}" CACHE STRING "")
 set(CMAKE_CXX_FLAGS_DEBUG          "-g           ${ARDUINO_CXX_FLAGS}" CACHE STRING "")
 set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG ${ARDUINO_CXX_FLAGS}" CACHE STRING "")
@@ -26,7 +30,9 @@
 #=============================================================================#
 #                       Executable Linker Flags                               #
 #=============================================================================#
-set(ARDUINO_LINKER_FLAGS "-Wl,--gc-sections")
+if (NOT DEFINED ARDUINO_LINKER_FLAGS)
+	set(ARDUINO_LINKER_FLAGS "-Wl,--gc-sections")
+endif()
 set(CMAKE_EXE_LINKER_FLAGS                "${ARDUINO_LINKER_FLAGS}" CACHE STRING "")
 set(CMAKE_EXE_LINKER_FLAGS_DEBUG          "${ARDUINO_LINKER_FLAGS}" CACHE STRING "")
 set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL     "${ARDUINO_LINKER_FLAGS}" CACHE STRING "")


Fixes opencv find problem under linux.

Fixes opencv find problem under linux.

--- CMakeModules/FindOpenCV2.cmake
+++ CMakeModules/FindOpenCV2.cmake
@@ -3,13 +3,13 @@
 # The follwoing variables are optionally searched for defaults
 #  OpenCV2_ROOT_DIR:                   Base directory of OpenCV 2 tree to use.
 #
-# The following are set after configuration is done:
+# The following are set after configuration is done:
 #  OpenCV2_FOUND
 #  OpenCV2_INCLUDE_DIRS
 #  OpenCV2_LIBRARIES
 #
 # $Id: $
-#
+#
 # Balazs [2011-01-18]:
 # - Created from scratch for the reorganized OpenCV 2 structure introduced at version 2.2
 # Jbohren [2011-06-10]:
@@ -33,11 +33,11 @@
 ELSE(WIN32)
     SET(OpenCV2_POSSIBLE_ROOT_DIRS
         "$ENV{ROS_ROOT}/../vision_opencv/opencv2/opencv"
-	"$ENV{OpenCV_ROOT_DIR}"                         # *NIX: custom install location (like ROS)
+  "$ENV{OpenCV_ROOT_DIR}"                         # *NIX: custom install location (like ROS)
         /usr/local                                      # Linux: default dir by CMake
         /usr                                            # Linux
         /opt/local                                      # OS X: default MacPorts location
-	)
+  )
 ENDIF(WIN32)

 # select exactly ONE OpenCV 2 base directory
@@ -61,7 +61,7 @@
           NAMES features2d.hpp
           PATHS "${OpenCV2_ROOT_DIR}/include/opencv2/features2d")
 FIND_PATH(OpenCV2_NONFREE_INCLUDE_DIR
-          NAMES features2d.hpp gpu.hpp nonfree.hpp ocl.hpp
+          NAMES features2d.hpp gpu.hpp nonfree.hpp ocl.hpp
           PATHS "${OpenCV2_ROOT_DIR}/include/opencv2/nonfree")
 FIND_PATH(OpenCV2_FLANN_INCLUDE_DIR
           NAMES flann.hpp
@@ -92,7 +92,7 @@
           PATHS "${OpenCV2_ROOT_DIR}/include/opencv2/gpu")

-# absolute path to all libraries
+# absolute path to all libraries
 SET(OPENCV2_LIBRARY_SEARCH_PATHS "${OpenCV2_ROOT_DIR}/lib")

 IF(WIN32)
@@ -172,7 +172,7 @@
     ${OpenCV2_CORE_INCLUDE_DIR}
     ${OpenCV2_IMGPROC_INCLUDE_DIR}
     ${OpenCV2_FEATURES2D_INCLUDE_DIR}
-    ${OpenCV2_NONFREE_INCLUDE_DIR}
+    #${OpenCV2_NONFREE_INCLUDE_DIR}
     ${OpenCV2_FLANN_INCLUDE_DIR}
     ${OpenCV2_CALIB3D_INCLUDE_DIR}
     ${OpenCV2_OBJDETECT_INCLUDE_DIR}
@@ -191,7 +191,7 @@
     ${OpenCV2_CORE_LIBRARY}
     ${OpenCV2_IMGPROC_LIBRARY}
     ${OpenCV2_FEATURES2D_LIBRARY}
-    ${OpenCV2_NONFREE_LIBRARY}
+    #${OpenCV2_NONFREE_LIBRARY}
     ${OpenCV2_FLANN_LIBRARY}
     ${OpenCV2_CALIB3D_LIBRARY}
     ${OpenCV2_OBJDETECT_LIBRARY}


Reenable OpenGL in Dependencies.cmake

Reenable OpenGL in Dependencies.cmake

--- cmake/Depdendencies.cmake
+++ cmake/Depdendencies.cmake
@@ -10,14 +10,14 @@

 ## OpenGL
 find_package(OpenGL REQUIRED)
-#list(APPEND FAST_SYSTEM_LIBRARIES ${OPENGL_LIBRARIES})
-#list(APPEND FAST_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR})
+list(APPEND FAST_SYSTEM_LIBRARIES ${OPENGL_LIBRARIES})
+list(APPEND FAST_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR})
 # If OS is Linux, also need X
-#if(CMAKE_SYSTEM_NAME STREQUAL Linux)
-#    find_package(X11 REQUIRED)
-#    list(APPEND FAST_INCLUDE_DIRS ${X11_INCLUDE_DIR})
-#    list(APPEND FAST_SYSTEM_LIBRARIES ${X11_LIBRARIES})
-#endif()
+if(CMAKE_SYSTEM_NAME STREQUAL Linux)
+    find_package(X11 REQUIRED)
+    list(APPEND FAST_INCLUDE_DIRS ${X11_INCLUDE_DIR})
+    list(APPEND FAST_SYSTEM_LIBRARIES ${X11_LIBRARIES})
+endif()

 ## Qt
 if(FAST_MODULE_Visualization)


disable mscv for ssc

disable mscv for ssc

--- cmake/DetectOptions.cmake
+++ cmake/DetectOptions.cmake
@@ -175,11 +175,13 @@
 endif()

 # SSC
-if(ADIOS2_HAVE_MPI)
-    if(ADIOS2_USE_SSC STREQUAL AUTO)
-        set(ADIOS2_HAVE_SSC TRUE)
-    elseif(ADIOS2_USE_SSC)
-        set(ADIOS2_HAVE_SSC TRUE)
+if(NOT MSVC)
+    if(ADIOS2_HAVE_MPI)
+        if(ADIOS2_USE_SSC STREQUAL AUTO)
+            set(ADIOS2_HAVE_SSC TRUE)
+        elseif(ADIOS2_USE_SSC)
+            set(ADIOS2_HAVE_SSC TRUE)
+        endif()
     endif()
 endif()


Fixed typo in libunwind CMake script

Fixed typo in libunwind CMake script

--- cmake/FindLibUnwind.cmake
+++ cmake/FindLibUnwind.cmake
@@ -7,7 +7,7 @@
 FIND_PATH(LIBUNWIND_INCLUDE_DIR libunwind.h)
 if(NOT LIBUNWIND_INCLUDE_DIR)
   message(STATUS "failed to find libunwind.h")
-elif(NOT EXISTS "${LIBUNWIND_INCLUDE_DIR}/unwind.h")
+elseif(NOT EXISTS "${LIBUNWIND_INCLUDE_DIR}/unwind.h")
   message(STATUS "libunwind.h was found, but unwind.h was not found in that directory.")
   SET(LIBUNWIND_INCLUDE_DIR "")
 endif()


Use default version of Qt from Hunter

Use default version of Qt from Hunter

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -34,7 +34,7 @@
 hunter_config(cereal VERSION 1.1.2-p5)
 hunter_config(OpenCV VERSION 3.0.0-p6 CMAKE_ARGS "${OPENCV_CMAKE_ARGS}")
 hunter_config(spdlog VERSION 1.0.0-p0)
-hunter_config(Qt VERSION 5.5.1-cvpixelbuffer-2-p3)
+hunter_config(Qt VERSION ${HUNTER_Qt_VERSION})
 hunter_config(BoostCompute VERSION 0.5-p0)

 #  CMAKE_ARGS


Fix bug that prevented XCode to switch between Release and Debug build type.

--- cmake/PlatformMacOS.cmake
+++ cmake/PlatformMacOS.cmake
@@ -19,8 +19,11 @@
     # type (cf. http://www.cmake.org/pipermail/cmake/2006-December/012288.html)
     # Therefore, we re-define the CMAKE_CONFIGURATION_TYPES here according to the value
     # in CMAKE_BUILD_TYPES.
-    set(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE})
-    message(STATUS ">> Re-defining variable CMAKE_CONFIGURATION_TYPES := ${CMAKE_CONFIGURATION_TYPES}")
+    if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
+	set(CMAKE_CONFIGURATION_TYPES "Release;Debug")
+    else ()
+        set(CMAKE_CONFIGURATION_TYPES "Debug;Release")
+    endif ()

 endif()


Add possible PORTLIBS override env variable

--- cmake/arm-toolchain.cmake
+++ cmake/arm-toolchain.cmake
@@ -9,7 +9,7 @@
 SET(CMAKE_AR ${DEVKITARM}/bin/arm-none-eabi-ar)
 SET(CMAKE_RANLIB ${DEVKITARM}/bin/arm-none-eabi-ranlib)

-set(CMAKE_FIND_ROOT_PATH ${DEVKITARM} ${DEVKITPRO} ${DEVKITPRO}/portlibs/3ds ${DEVKITPRO}/portlibs/armv6k)
+set(CMAKE_FIND_ROOT_PATH $ENV{PORTLIBS}/3ds $ENV{PORTLIBS}/armv6k ${DEVKITARM} ${DEVKITPRO} ${DEVKITPRO}/portlibs/3ds ${DEVKITPRO}/portlibs/armv6k)
 # adjust the default behaviour of the FIND_XXX() commands:
 # search headers and libraries in the target environment, search
 # programs in the host environment


Added support for product names in package names

--- cmake/mysql_version.cmake
+++ cmake/mysql_version.cmake
@@ -121,11 +121,20 @@
       SET(SYSTEM_NAME_AND_PROCESSOR "${PLATFORM}-${MACHINE}")
     ENDIF()
   ENDIF()
-
-  SET(package_name "mysql-${VERSION}-${SYSTEM_NAME_AND_PROCESSOR}" )
-  # Sometimes package suffix is added (something like icc-glibc23)
+
+  IF(SHORT_PRODUCT_TAG)
+    SET(PRODUCT_TAG "-${SHORT_PRODUCT_TAG}")
+  ELSEIF(MYSQL_SERVER_SUFFIX)
+    SET(PRODUCT_TAG "${MYSQL_SERVER_SUFFIX}")  # Already has a leading dash
+  ELSE()
+    SET(PRODUCT_TAG)
+  ENDIF()
+
+  SET(package_name "mysql${PRODUCT_TAG}-${VERSION}-${SYSTEM_NAME_AND_PROCESSOR}")
+
+  # Sometimes package suffix is added (something like "-icc-glibc23")
   IF(PACKAGE_SUFFIX)
-    SET(package_name "${package_name}-${PACKAGE_SUFFIX}")
+    SET(package_name "${package_name}${PACKAGE_SUFFIX}")
   ENDIF()
   STRING(TOLOWER ${package_name} package_name)
   SET(CPACK_PACKAGE_FILE_NAME ${package_name})


fix warning flags on Windows

fix warning flags on Windows

--- rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
@@ -32,40 +32,37 @@

 set(_output_path "${CMAKE_CURRENT_BINARY_DIR}/rosidl_typesupport_connext_cpp/${PROJECT_NAME}/dds_connext")
 set(_generated_files "")
-set(_connext_compile_flags "-Wno-tautological-compare -Wno-return-type-c-linkage -Wno-deprecated-register")
 foreach(_idl_file ${rosidl_generate_interfaces_IDL_FILES})
   get_filename_component(_extension "${_idl_file}" EXT)
   if("${_extension}" STREQUAL ".msg")
     get_filename_component(name "${_idl_file}" NAME_WE)
     list(APPEND _generated_files "${_output_path}/${name}_.h")
-    set_source_files_properties("${_output_path}/${name}_.h"
-      PROPERTIES COMPILE_FLAGS ${_connext_compile_flags})
     list(APPEND _generated_files "${_output_path}/${name}_.cxx")
-    set_source_files_properties("${_output_path}/${name}_.cxx"
-      PROPERTIES COMPILE_FLAGS ${_connext_compile_flags})
     list(APPEND _generated_files "${_output_path}/${name}_Plugin.h")
-    set_source_files_properties("${_output_path}/${name}_Plugin.h"
-      PROPERTIES COMPILE_FLAGS ${_connext_compile_flags})
     list(APPEND _generated_files "${_output_path}/${name}_Plugin.cxx")
-    set_source_files_properties("${_output_path}/${name}_Plugin.cxx"
-      PROPERTIES COMPILE_FLAGS ${_connext_compile_flags})
     list(APPEND _generated_files "${_output_path}/${name}_Support.h")
-    set_source_files_properties("${_output_path}/${name}_Support.h"
-      PROPERTIES COMPILE_FLAGS ${_connext_compile_flags})
     list(APPEND _generated_files "${_output_path}/${name}_Support.cxx")
-    set_source_files_properties("${_output_path}/${name}_Support.cxx"
-      PROPERTIES COMPILE_FLAGS ${_connext_compile_flags})
     list(APPEND _generated_files "${_output_path}/${name}_TypeSupport.h")
-    set_source_files_properties("${_output_path}/${name}_TypeSupport.h"
-      PROPERTIES COMPILE_FLAGS ${_connext_compile_flags})
     list(APPEND _generated_files "${_output_path}/${name}_TypeSupport.cpp")
-    set_source_files_properties("${_output_path}/${name}_TypeSupport.cpp"
-      PROPERTIES COMPILE_FLAGS ${_connext_compile_flags})
   elseif("${_extension}" STREQUAL ".srv")
     get_filename_component(name "${_idl_file}" NAME_WE)
     list(APPEND _generated_files "${_output_path}/${name}_ServiceTypeSupport.cpp")
   endif()
 endforeach()
+
+# If not on Windows, disable some warnings with Connext's generated code
+if(NOT WIN32)
+  set(_connext_compile_flags
+    "-Wno-tautological-compare"
+    "-Wno-return-type-c-linkage"
+    "-Wno-deprecated-register"
+  )
+  string(REPLACE ";" " " _connext_compile_flags ${_connext_compile_flags})
+  foreach(_gen_file ${_generated_files})
+    set_source_files_properties("${_gen_file}"
+      PROPERTIES COMPILE_FLAGS ${_connext_compile_flags})
+  endforeach()
+endif()

 set(_dependency_files "")
 set(_dependencies "")


modules: updated FindCorrade.cmake.

modules: updated FindCorrade.cmake.


COMP: Remove unused variables passed to Superbuild projects.

Change-Id: Ieeb0e1263e7df2a5afb2bf29f5b04703af7e83f9

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -100,7 +100,6 @@
       BINARY_DIR Insight-Build
       CMAKE_GENERATOR ${gen}
       CMAKE_ARGS
-        -DGIT_EXECUTABLE:FILEPATH=${GIT_EXECUTABLE}
         -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
         -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
         -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
@@ -134,9 +133,7 @@
         -DCMAKE_BUILD_TYPE:STRING=${build_type}
         -DITK_DIR:STRING=${CMAKE_BINARY_DIR}/Insight-Build
         -DBUILD_SHARED_LIBS:BOOL=${shared}
-        -DBUILD_EXAMPLES:BOOL=OFF
         -DBUILD_TESTING:BOOL=OFF
-        -DUSE_TESTING:BOOL=OFF
         -DWRAP_JAVA:BOOL=OFF
         -DWRAP_PYTHON:BOOL=OFF
         -DWRAP_LUA:BOOL=OFF
@@ -144,7 +141,6 @@
         -DWRAP_TCL:BOOL=OFF
         -DWRAP_R:BOOL=OFF
         -DWRAP_RUBY:BOOL=OFF
-        -DUSE_SYSTEM_LUA:BOOL=OFF
       INSTALL_COMMAND ""
       DEPENDS
         "Insight"


git-svn-id: https://svn.icg.tugraz.at/svn/vmgpu/trunk/vmlibraries/imageutilities@10171 358b74ad-2626-0410-af80-f4c3c349ae55

--- imageutilities/cmake/FindImageUtilities.cmake
+++ imageutilities/cmake/FindImageUtilities.cmake
@@ -229,15 +229,6 @@
         set(IU_IUCORE_LIB_DEPENDENCIES ${IU_IUCORE_LIB_DEPENDENCIES} ${CUDA_SPARSE_LIBRARY})
       endif(CUDASparse_FOUND)

-      # Matlab
-      find_package(Matlab_ICG QUIET)
-      if(MATLAB_FOUND)
-        message("Matlab lib found")
-        include_directories(${MATLAB_INCLUDE_DIR})
-        cuda_include_directories(${MATLAB_INCLUDE_DIR})
-        set(IU_IUCORE_LIB_DEPENDENCIES ${IU_IUCORE_LIB_DEPENDENCIES} ${MATLAB_LIBRARIES})
-      endif(MATLAB_FOUND)
-
     endif(CUDA_FOUND AND CUDASDK_FOUND)
   endif(IU_IUCORE_FOUND)


fix emscripten toolchain for changes in latest emsdk (--cache no longer needed)

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -146,24 +146,16 @@
 set(CMAKE_C_COMPILER_WORKS TRUE)
 set(CMAKE_CXX_COMPILER_WORKS TRUE)

-# Find the .emscripten file and cache, this is either setup locally in the
+# Find the .emscripten file and, this is either setup locally in the
 # emscripten SDK (this is the preferred way and used by 'fips setup emscripten',
 # but it's a brand new feature: https://github.com/juj/emsdk/issues/24)
 # If an SDK-local .emscripten is not found, fall back to ~/.emscripten
 get_filename_component(EMSCRIPTEN_DOT_FILE "${EMSCRIPTEN_EMSDK}/.emscripten" ABSOLUTE)
-if (EMSCRIPTEN_TRACING)
-    # set a separate .emscripten_cache when tracing since this will use an
-    # instrumented dlmalloc.c
-    get_filename_component(EMSCRIPTEN_CACHE "${EMSCRIPTEN_EMSDK}/.emscripten_cache_tracing" ABSOLUTE)
-else()
-    get_filename_component(EMSCRIPTEN_CACHE "${EMSCRIPTEN_EMSDK}/.emscripten_cache" ABSOLUTE)
-endif()
 if (EXISTS "${EMSCRIPTEN_DOT_FILE}")
-    set(EMSC_COMMON_FLAGS "${EMSC_COMMON_FLAGS} --em-config ${EMSCRIPTEN_DOT_FILE} --cache ${EMSCRIPTEN_CACHE}")
+    set(EMSC_COMMON_FLAGS "${EMSC_COMMON_FLAGS} --em-config ${EMSCRIPTEN_DOT_FILE}")
     set(EMSC_AR_FLAGS "${EMSC_AR_FLAGS} --em-config ${EMSCRIPTEN_DOT_FILE}")
 else()
-    # no sdk-embedded config found, use the default (~/.emscripten and ~/.emscripten_cache)
-    # message(WARNING "Using global emscripten config and cache in '~'!")
+    # no sdk-embedded config found, use the default (~/.emscripten)
 endif()

 # tool suffic (.bat on windows)


Update FW with stereo confidence runtime config fix

--- 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 "c4b3d00943fc95edac6e51602e74ce506f72b191")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "998500e9b6cd25679bfacf54c085e4d6c494d944")

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


Update FW

Update FW

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "01db7be05a0beb6d634f5924ecdc0636871312e1")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "dfd5675da011ca6e4ee5387504b0ba6de7a84c37")

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


Fix typo that breaks dependency on builtin lzma

The LZMA_TARGET variable is what is checked by "BUILTINS LZMA" to add
a dependency, and it was replaced by LIBLZMA_TARGET by mistake when
migrating to CMake's own FindLibLZMA.cmake module in commit 7a1db612.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -182,7 +182,7 @@

 if(builtin_lzma)
   set(lzma_version 5.2.4)
-  set(LIBLZMA_TARGET LZMA)
+  set(LZMA_TARGET LZMA)
   message(STATUS "Building LZMA version ${lzma_version} included in ROOT itself")
   if(WIN32)
     set(LIBLZMA_LIBRARIES ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/lib/liblzma.lib)


project_include.cmake: Make esptool_py_custom_target callable from other directories

--- components/esptool_py/project_include.cmake
+++ components/esptool_py/project_include.cmake
@@ -140,13 +140,14 @@
 #
 function(esptool_py_custom_target target_name flasher_filename dependencies)
     idf_build_get_property(idf_path IDF_PATH)
+    idf_component_get_property(esptool_py_dir esptool_py COMPONENT_DIR)
     add_custom_target(${target_name} DEPENDS ${dependencies}
         COMMAND ${CMAKE_COMMAND}
         -D IDF_PATH="${idf_path}"
         -D ESPTOOLPY="${ESPTOOLPY}"
         -D ESPTOOL_ARGS="write_flash;@flash_${flasher_filename}_args"
         -D WORKING_DIRECTORY="${build_dir}"
-        -P run_esptool.cmake
+        -P ${esptool_py_dir}/run_esptool.cmake
         WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
         USES_TERMINAL
         )


ARROW-5624: [C++] Fix typo causing build failure when -Duriparser_SOURCE=BUNDLED

Author: Wes McKinney <wesm+git@apache.org>

Closes #4590 from wesm/fix-uriparser and squashes the following commits:

408f4cf3a <Wes McKinney> -Duriparser_SOURCE=BUNDLED is broken

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -619,7 +619,7 @@
       build_uriparser()
     endif()
   elseif(uriparser_SOURCE STREQUAL "BUNDLED")
-    build_rapidjson()
+    build_uriparser()
   elseif(uriparser_SOURCE STREQUAL "SYSTEM")
     # Debian does not ship cmake configs for uriparser
     find_package(uriparser ${ARROW_URIPARSER_REQUIRED_VERSION} QUIET)


[cmake] make mumps work on F22 (hopefully more)

--- Numerics/cmake/FindMUMPS.cmake
+++ Numerics/cmake/FindMUMPS.cmake
@@ -42,13 +42,13 @@
   REQUIRED_VARS MUMPS_LIBRARY)

 IF(MUMPS_LIBRARY)
+  GET_FILENAME_COMPONENT(MUMPS_LIBRARY_DIRS ${MUMPS_LIBRARY} PATH)
   SET(MUMPS_LIBRARIES ${MUMPS_LIBRARY} ${MUMPS_COMMON_LIBRARY})
-
+
   IF(METIS_LIBRARY)
     SET(MUMPS_LIBRARIES ${MUMPS_LIBRARIES} ${METIS_LIBRARY})
-  ELSE()
-
-  ENDIF()
+  ENDIF(METIS_LIBRARY)
+
   IF(PORD_LIBRARY)
     SET(MUMPS_LIBRARIES ${MUMPS_LIBRARIES} ${PORD_LIBRARY})
   ENDIF()


Updated default emscripten root

Updated default emscripten root


Update superbuild SWIG to 3.0.5 release

Update superbuild SWIG to 3.0.5 release

Change-Id: If63597b53a1316515b600e9bd4cf4c9f05d004df

--- SuperBuild/External_Swig.cmake
+++ SuperBuild/External_Swig.cmake
@@ -12,9 +12,9 @@

 if(NOT SWIG_DIR)

-  set(SWIG_TARGET_VERSION 3.0.2)
-  set(SWIG_DOWNLOAD_SOURCE_HASH "62f9b0d010cef36a13a010dc530d0d41")
-  set(SWIG_DOWNLOAD_WIN_HASH "3f18de4fc09ab9abb0d3be37c11fbc8f")
+  set(SWIG_TARGET_VERSION 3.0.5)
+  set(SWIG_DOWNLOAD_SOURCE_HASH "dcb9638324461b9baba8e044fe59031d")
+  set(SWIG_DOWNLOAD_WIN_HASH "fd2e050f29e2a00b2348f5f7d3476490")

   if(WIN32)


COMP: Update to latest VMTK to fix build error

--- SuperBuild/External_VMTK.cmake
+++ SuperBuild/External_VMTK.cmake
@@ -50,7 +50,7 @@

   ExternalProject_SetIfNotDefined(
     ${CMAKE_PROJECT_NAME}_${proj}_GIT_TAG
-    "b5e8d0a86c63b629fc0199ee30114efd72fcb183"
+    "82628da0c583af789ea0bc7fb279418c58c7535a"
     QUIET
     )


removed confusing comment

removed confusing comment

--- BuildSetup.cmake
+++ BuildSetup.cmake
@@ -6,10 +6,6 @@
 # (2) $ cd build
 # (3) $ cmake -C ../BuildSetup.cmake ..
 # (4) $ make install
-#
-# NOTE for SL3/SL4 users:
-# For using afs reference installation replace step (3) with:
-# $ cmake -C /afs/desy.de/group/it/ilcsoft/vXX-XX/ILCSoft.cmake ..
 #
 # @author Jan Engels, DESY
 #############################################################################


CI: more generic main_ci

CI: more generic main_ci

--- CI/main_ci.cmake
+++ CI/main_ci.cmake
@@ -25,7 +25,12 @@
 set (ENV{LANG} "C") # Only ascii output

 # Build Configuration : Release, Debug..
-set (CTEST_BUILD_CONFIGURATION "Release")
+if(ci_build_type)
+  set (CTEST_BUILD_CONFIGURATION ${ci_build_type})
+else()
+  set (CTEST_BUILD_CONFIGURATION "Release")
+endif()
+
 set (CTEST_CMAKE_GENERATOR "Ninja")

 # detect short sha
@@ -121,7 +126,12 @@
 # ------------------------------ Build -----------------------------------------
 if(ci_skip_install)
   message(STATUS "Skip install")
-  set(CTEST_BUILD_TARGET)
+  if (ci_build_target)
+    message(STATUS "Building target: ${ci_build_target}")
+    set(CTEST_BUILD_TARGET ${ci_build_target})
+  else()
+    set(CTEST_BUILD_TARGET)
+  endif()
 else()
   set(CTEST_BUILD_TARGET install)
 endif()
@@ -162,7 +172,11 @@
 endif()

 # ----------------------------- Submit -----------------------------------------
-ctest_submit()
+if(ci_skip_submit)
+  message(STATUS "Skip submit")
+else()
+  ctest_submit()
+endif()

 # ---------------------------- Doxygen -----------------------------------------
 if(ENABLE_DOXYGEN)


update cmakeproto.cmake to fix build

update cmakeproto.cmake to fix build

--- CMakeProto.cmake
+++ CMakeProto.cmake
@@ -63,6 +63,7 @@
 protoc_go("github.com/google/gapid/gapis/replay" "gapis/replay" "replay.proto")
 protoc_go("github.com/google/gapid/gapis/resolve" "gapis/resolve" "resolvables.proto")
 protoc_go("github.com/google/gapid/gapis/resolve/dependencygraph" "gapis/resolve/dependencygraph" "resolvables.proto")
+protoc_go("github.com/google/gapid/gapis/resolve/initialcmds" "gapis/resolve/initialcmds" "resolvables.proto")
 protoc_go("github.com/google/gapid/gapis/service/path" "gapis/service/path" "path.proto")
 protoc_java("gapis/service/path" "path.proto" "com/google/gapid/proto/service/path/Path")
 protoc_go("github.com/google/gapid/gapis/service/box" "gapis/service/box" "box.proto")


Warning ==> WARNING to be consistent with remainder of WARNING messages.

svn path=/trunk/; revision=6974


Change include path for libc++.

Change include path for libc++.

Since CMake builds work without errors under GNU/Linux, switch to CMake builds.

--- tests/Makefile.cmake
+++ tests/Makefile.cmake
@@ -3,7 +3,7 @@
 COMPILER_INCLUDES   ?= @PLATFORM_FIXES@ -std=c++11 -stdlib=libc++ \
                         -I`@CLANG_EXECUTABLE@ -print-file-name=include` \
                         -I`@LLVM_CONFIG_EXECUTABLE@ --includedir` \
-                        -I`@LLVM_CONFIG_EXECUTABLE@ --prefix`/usr/include/c++/v1 \
+                        -I`@LLVM_CONFIG_EXECUTABLE@ --includedir`/c++/v1 \
                         -I/usr/include \
                         -I@DSL_INCLUDES@
 TEST_CASE           ?= ./tests/opencv_blur_8uc1


fix to CIL commit hash

fix to CIL commit hash

--- version_config.cmake
+++ version_config.cmake
@@ -167,11 +167,11 @@

   # CCPi CIL
   set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git)
-  set(DEFAULT_CCPi-Framework_TAG 510849ab4e0524a8778c4870d9536002aaf8c376 )
+  set(DEFAULT_CCPi-Framework_TAG ccb9a65318aa5ca1b72edfa9acf349cd14ad3747 )
   set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git)
-  set(DEFAULT_CCPi-RGL_TAG origin/master)
+  set(DEFAULT_CCPi-RGL_TAG a106da50c7f428db2e4115fe1bdc0c156a933a21 )
   set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git)
-  set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master)
+  set(DEFAULT_CCPi-FrameworkPlugins_TAG 0cb81711927adee9f2d1973a8af2b7799dd28ab6 )

 endif()


[minor][fix] minor fix

[minor][fix] minor fix

--- testing/run_tests.sh.cmake
+++ testing/run_tests.sh.cmake
@@ -183,7 +183,7 @@
 	    for k in $configs; do
 		# skip configurations with not all options enabled
 		if [ \( $i = 'true' -a $j = 'false' \)  \
-			-o \( $i = 'false' -a $j = 'false' \) ]; then
+			-o \( $i = 'false' -a $j = 'true' \) ]; then
 		    continue;
 		fi
 		local c=config.mpi-cuda.$idx


Disable FEATURE_MERGE_JIT_AND_ENGINE on *nix.

Now that #3058 has been fixed, the JIT can be consumed as a dynamic
library on all platforms.

--- clrdefinitions.cmake
+++ clrdefinitions.cmake
@@ -132,13 +132,10 @@
 add_definitions(-DFEATURE_MAIN_CLR_MODULE_USES_CORE_NAME)
 add_definitions(-DFEATURE_MERGE_CULTURE_SUPPORT_AND_ENGINE)

-# TODO_DJIT: Remove this "set" to commence loading JIT dynamically.
-if(NOT WIN32)
-  set(FEATURE_MERGE_JIT_AND_ENGINE 1)
-elseif (CLR_CMAKE_TARGET_ARCH_ARM64)
+if(CLR_CMAKE_TARGET_ARCH_ARM64)
   # TODO_DJIT: Remove this as part of enabling cross-compiling standalone JIT binary.
   set(FEATURE_MERGE_JIT_AND_ENGINE 1)
-endif(NOT WIN32)
+endif(CLR_CMAKE_TARGET_ARCH_ARM64)

 if(FEATURE_MERGE_JIT_AND_ENGINE)
   # Disable the following for UNIX altjit on Windows


Fix finding recent versions of ACML.

Fix finding recent versions of ACML.

--- cmake/FindACML.cmake
+++ cmake/FindACML.cmake
@@ -36,10 +36,6 @@
 SET(ACML_BASE_SEARCH_PATHS "/opt/acml" "C:\\AMD\\acml" "C:\\Program Files\\AMD\\acml")
 SET(ACML_SEARCH_PATHS "")

-# The various supported versions.  When new versions come out this will need
-# to be updated to allow automatic detection.
-SET(ACML_VERSIONS 4.2.0 4.1.0 4.0.0 3.5.0 3.6.0 3.6.1)
-
 SET(MP_COMPILER_VERSIONS gfortran64_mp gfortran64_mp_int64 pgi32_mp ifort32_mp)
 SET(COMPILER_VERSIONS gfortran64 gfortran64_int64 pgi32 ifort32)

@@ -52,17 +48,19 @@
 ENDIF( ACML_USE_OPENMP_LIBRARIES )

 FOREACH(path_iter ${ACML_BASE_SEARCH_PATHS})
-    FOREACH(version_iter ${ACML_VERSIONS})
+    FILE( GLOB install_path ${path_iter}*/ACML-EULA.txt )
+    IF (install_path)
+        LIST( GET install_path 0 install_path)
+        GET_FILENAME_COMPONENT( install_path ${install_path} PATH)
         FOREACH(compiler_iter ${COMPILER_VERSION_TO_USE})
-            LIST(APPEND ACML_SEARCH_PATHS ${path_iter}${version_iter}/${compiler_iter}/include)
+            LIST(APPEND ACML_SEARCH_PATHS
+                 ${install_path}/${compiler_iter}/include)
         ENDFOREACH(compiler_iter ${COMPILER_VERSION_TO_USE})
-    ENDFOREACH(version_iter ${ACML_VERSIONS})
+    ENDIF (install_path)
 ENDFOREACH(path_iter ${ACML_BASE_SEARCH_PATHS})

-#MESSAGE(${ACML_SEARCH_PATHS})
 FIND_PATH(ACML_INCLUDE_PATH acml.h ${ACML_SEARCH_PATHS} )
 SET(ACML_LIB_PATH ${ACML_INCLUDE_PATH}/../lib)
-#MESSAGE(${ACML_LIB_PATH})

 IF( ACML_USE_SHARED_LIBRARIES )
 	IF( ACML_USE_OPENMP_LIBRARIES )
@@ -100,5 +98,6 @@
   ENDIF (ACML_FIND_REQUIRED)
 ENDIF (ACML_FOUND)

+MARK_AS_ADVANCED(ACML ACML_INCLUDE_PATH ACML_SEARCH_PATHS
+    ACML_USE_OPENMP_LIBRARIES ACML_USE_SHARED_LIBRARIES)

-


Changed FFTW find, we dont need fortran fftw3f and fftw3l only fftw3 is needed

--- cmake/FindFFTW.cmake
+++ cmake/FindFFTW.cmake
@@ -49,21 +49,21 @@
     NO_DEFAULT_PATH
   )

-  find_library(
-    FFTWF_LIB
-    NAMES "fftw3f"
-    PATHS ${FFTW_ROOT}
-    PATH_SUFFIXES "lib" "lib64"
-    NO_DEFAULT_PATH
-  )
+# find_library(
+#   FFTWF_LIB
+#   NAMES "fftw3f"
+#   PATHS ${FFTW_ROOT}
+#   PATH_SUFFIXES "lib" "lib64"
+#   NO_DEFAULT_PATH
+# )

-  find_library(
-    FFTWL_LIB
-    NAMES "fftw3l"
-    PATHS ${FFTW_ROOT}
-    PATH_SUFFIXES "lib" "lib64"
-    NO_DEFAULT_PATH
-  )
+# find_library(
+#   FFTWL_LIB
+#   NAMES "fftw3l"
+#   PATHS ${FFTW_ROOT}
+#   PATH_SUFFIXES "lib" "lib64"
+#   NO_DEFAULT_PATH
+# )

   #find includes
   find_path(
@@ -82,18 +82,18 @@
     PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
   )

-  find_library(
-    FFTWF_LIB
-    NAMES "fftw3f"
-    PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
-  )
+# find_library(
+#   FFTWF_LIB
+#   NAMES "fftw3f"
+#   PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
+# )

-  find_library(
-    FFTWL_LIB
-    NAMES "fftw3l"
-    PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
-  )
+# find_library(
+#   FFTWL_LIB
+#   NAMES "fftw3l"
+#   PATHS ${PKG_FFTW_LIBRARY_DIRS} ${LIB_INSTALL_DIR}
+# )

   find_path(
     FFTW_INCLUDES


Do not use sagase on Mac OS X to find Ogre.

--- cmake/FindOgre.cmake
+++ cmake/FindOgre.cmake
@@ -3,7 +3,7 @@
 # UNIX/MAC: Uses sagase/find_library in linux as it works there mighty well when its installed on the system.
 # WINDOWS: Uses some more custom logic on windows to find things correct either from Tunda deps, Ogre SDK or Ogre source repo clone.

-if (NOT WIN32)
+if (NOT WIN32 AND NOT APPLE)
 # TODO Remove the use of Sagase for Linux and Mac Ogre lookup.
 # TODO: Remove configure_ogre and replace it with a use_package_ogre() and link_package_ogre()
 macro(configure_ogre)
@@ -45,7 +45,12 @@
     endif()

     if ("${OGRE_DIR}" STREQUAL "")
-        set(OGRE_DIR ${ENV_TUNDRA_DEP_PATH}/Ogre)
+        if (IS_DIRECTORY ${ENV_TUNDRA_DEP_PATH}/Ogre)
+            set(OGRE_DIR ${ENV_TUNDRA_DEP_PATH}/Ogre)
+        elseif (APPLE)
+            find_library(OGRE_LIBRARY Ogre)
+            set(OGRE_DIR ${OGRE_LIBRARY})
+        endif()
     endif()

     # The desired Ogre path is set in OGRE_DIR. The Ogre source tree comes in two flavors:
@@ -54,17 +59,25 @@
     # We want to support both so that one can do active development on the Ogre Hg repository, without
     # having to always do the intermediate SDK installation/deployment step.

-    if (IS_DIRECTORY ${OGRE_DIR}/OgreMain) # Ogre path points to #1 above.
+    if (APPLE AND IS_DIRECTORY ${OGRE_DIR}/Headers)
+        include_directories(${OGRE_DIR}/Headers)
+        link_directories(${OGRE_DIR})
+
+    elseif (IS_DIRECTORY ${OGRE_DIR}/OgreMain) # Ogre path points to #1 above.
         include_directories(${OGRE_DIR}/include)
         include_directories(${OGRE_DIR}/OgreMain/include)
-        include_directories(${OGRE_DIR}/RenderSystems/Direct3D9/include)
+	if (WIN32)
+       	    include_directories(${OGRE_DIR}/RenderSystems/Direct3D9/include)
+        endif()
         link_directories(${OGRE_DIR}/lib)
         message(STATUS "Using Ogre from Mercurial trunk directory " ${OGRE_DIR})
     elseif (IS_DIRECTORY ${OGRE_DIR}/include/OGRE) # If include/OGRE exists, then OGRE_DIR points to the SDK (#2 above)
         include_directories(${OGRE_DIR}/include/OGRE)
-        include_directories(${OGRE_DIR}/include/OGRE/RenderSystems/Direct3D9)
         link_directories(${OGRE_DIR}/lib)
-        link_directories(${OGRE_DIR}/lib/$(OutDir)/opt)
+        if (WIN32)
+            include_directories(${OGRE_DIR}/include/OGRE/RenderSystems/Direct3D9)
+            link_directories(${OGRE_DIR}/lib/$(OutDir)/opt)
+        endif()
         message(STATUS "Using Ogre from SDK directory " ${OGRE_DIR})
     else()
         message(FATAL_ERROR "When looking for Ogre, the path ${OGRE_DIR} does not point to a valid Ogre directory!")
@@ -74,11 +87,13 @@
 endif()

 macro(link_ogre)
-    if (NOT WIN32)
+    if (WIN32)
+        target_link_libraries(${TARGET_NAME} debug OgreMain_d debug RenderSystem_Direct3D9_d)
+        target_link_libraries(${TARGET_NAME} optimized OgreMain optimized RenderSystem_Direct3D9)
+    elseif (APPLE)
+        target_link_libraries(${TARGET_NAME} ${OGRE_LIBRARY})
+    else()
         use_package(OGRE)
         link_package(OGRE)
-    else()
-        target_link_libraries(${TARGET_NAME} debug OgreMain_d debug RenderSystem_Direct3D9_d)
-        target_link_libraries(${TARGET_NAME} optimized OgreMain optimized RenderSystem_Direct3D9)
     endif()
 endmacro()


[win] Use "d" postfix for zlib only in Debug build type

--- cmake/FindSkia.cmake
+++ cmake/FindSkia.cmake
@@ -90,7 +90,7 @@
   if(UNIX)
     set(ZLIB_LIB_FILE "${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib/lib/${CMAKE_STATIC_LIBRARY_PREFIX}z${CMAKE_STATIC_LIBRARY_SUFFIX}")
   else()
-    if(MSVC)
+    if(MSVC AND CMAKE_BUILD_TYPE STREQUAL Debug)
       set(ZLIB_MSVC_DEBUG_POSTFIX "d")
     endif()
     set(ZLIB_LIB_FILE "${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib/lib/zlib${ZLIB_MSVC_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")


remove SetCXX11.cmake

remove SetCXX11.cmake

--- cmake/SetCXX11.cmake
+++ cmake/SetCXX11.cmake
@@ -1,21 +0,0 @@
-# set c++11 flags automatically or let the user do it
-
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-
-if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
-    execute_process(
-        COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
-        set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs")
-    if (NOT (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7))
-        message(FATAL_ERROR "${PROJECT_NAME} requires g++ 4.7 or greater.")
-    endif ()
-elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel")
-    if ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
-        message( STATUS "Adding -stdlib=libc++ flag")
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
-    endif()
-else ()
-    message(FATAL_ERROR "Your C++ compiler does not support C++11.")
-endif ()
-
-


also look at the output of --version to determine the compiler vendor

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -44,6 +44,7 @@

 macro(vc_determine_compiler)
    if(NOT DEFINED Vc_COMPILER_IS_INTEL)
+      execute_process(COMMAND "${CMAKE_CXX_COMPILER}" "--version" OUTPUT_VARIABLE _cxx_compiler_version ERROR_VARIABLE _cxx_compiler_version)
       set(Vc_COMPILER_IS_INTEL false)
       set(Vc_COMPILER_IS_OPEN64 false)
       set(Vc_COMPILER_IS_CLANG false)
@@ -56,7 +57,7 @@
       elseif(CMAKE_CXX_COMPILER MATCHES "(opencc|openCC)$")
          set(Vc_COMPILER_IS_OPEN64 true)
          message(STATUS "Detected Compiler: Open64")
-      elseif(CMAKE_CXX_COMPILER MATCHES "clang\\+\\+$")
+      elseif(CMAKE_CXX_COMPILER MATCHES "clang\\+\\+$" OR "${_cxx_compiler_version}" MATCHES "clang")
          set(Vc_COMPILER_IS_CLANG true)
          exec_program(${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE Vc_CLANG_VERSION)
          string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" Vc_CLANG_VERSION "${Vc_CLANG_VERSION}")


Missed _DBG flag setting. (#125)

Missed _DBG flag setting. (#125)

--- cmake/bde_ufid.cmake
+++ cmake/bde_ufid.cmake
@@ -478,6 +478,7 @@
             >
             $<$<CONFIG:RelWithDebInfo>:
                 BDE_BUILD_TARGET_OPT
+                BDE_BUILD_TARGET_DBG
             >
             $<$<CONFIG:Debug>:
                 BDE_BUILD_TARGET_DBG


erthink-cmake: fix for e2k-lcc 1.24

erthink-cmake: fix for e2k-lcc 1.24

--- cmake/compiler.cmake
+++ cmake/compiler.cmake
@@ -73,23 +73,6 @@
   set(CMAKE_COMPILER_IS_GNUCXX OFF)
 endif()

-# Hard coding the compiler version is ugly from cmake POV, but
-# at least gives user a friendly error message. The most critical
-# demand for C++ compiler is support of C++11 lambdas, added
-# only in version 4.5 https://gcc.gnu.org/projects/cxx0x.html
-if(CMAKE_COMPILER_IS_GNUCC)
-  if(CMAKE_C_COMPILER_VERSION VERSION_LESS 4.5)
-    message(FATAL_ERROR "
-      Your GCC version is ${CMAKE_C_COMPILER_VERSION}, please update")
-  endif()
-endif()
-if(CMAKE_COMPILER_IS_GNUCXX)
-  if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.5)
-    message(FATAL_ERROR "
-      Your G++ version is ${CMAKE_CXX_COMPILER_VERSION}, please update")
-  endif()
-endif()
-
 if(CMAKE_C_COMPILER_LOADED)
   # Check for Elbrus lcc
   execute_process(COMMAND ${CMAKE_C_COMPILER} --version
@@ -136,6 +119,25 @@
   endif()
   unset(tmp_lxx_probe_version)
   unset(tmp_lxx_probe_result)
+endif()
+
+# Hard coding the compiler version is ugly from cmake POV, but
+# at least gives user a friendly error message. The most critical
+# demand for C++ compiler is support of C++11 lambdas, added
+# only in version 4.5 https://gcc.gnu.org/projects/cxx0x.html
+if(CMAKE_COMPILER_IS_GNUCC)
+  if(CMAKE_C_COMPILER_VERSION VERSION_LESS 4.5
+      AND NOT CMAKE_COMPILER_IS_ELBRUSC)
+    message(FATAL_ERROR "
+      Your GCC version is ${CMAKE_C_COMPILER_VERSION}, please update")
+  endif()
+endif()
+if(CMAKE_COMPILER_IS_GNUCXX)
+  if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.5
+      AND NOT CMAKE_COMPILER_IS_ELBRUSCXX)
+    message(FATAL_ERROR "
+      Your G++ version is ${CMAKE_CXX_COMPILER_VERSION}, please update")
+  endif()
 endif()

 if(CMAKE_CL_64)


Apple is UNIX but should use system boost

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

-if (UNIX)
+if (UNIX AND NOT APPLE)
   option(USE_SYSTEM_Boost "Build using an external version of Boost" OFF)
 else()
   option(USE_SYSTEM_Boost "Build using an external version of Boost" ON)


update common_utils svn external revision to 284 to get fixes for lidar renderer

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -28,7 +28,7 @@
 set(occ-map_depends libbot-drc opencv-drc)

 set(common_utils_url https://svn.csail.mit.edu/common_utils)
-set(common_utils_revision 280)
+set(common_utils_revision 284)
 set(common_utils_depends Eigen_pod libbot-drc occ-map octomap-drc)

 set(scanmatch_url https://svn.csail.mit.edu/scanmatch/trunk)


[FEATURE] OpenBSD support on cmake level

--- util/cmake/FindSeqAn.cmake
+++ util/cmake/FindSeqAn.cmake
@@ -359,7 +359,7 @@

 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
   set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} rt pthread)
-elseif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
+elseif ((${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") OR (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD"))
   set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} pthread)
   set (SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} "-D_GLIBCXX_USE_C99=1")
 endif ()
@@ -370,9 +370,9 @@
 mark_as_advanced(_SEQAN_HAVE_EXECINFO)
 if (_SEQAN_HAVE_EXECINFO)
   set(SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} "-DSEQAN_HAS_EXECINFO=1")
-  if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
+  if ((${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") OR (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD"))
     set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} execinfo elf)
-  endif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
+  endif ()
 endif (_SEQAN_HAVE_EXECINFO)

 # ZLIB


build: bump up zlib to 1.2.12

build: bump up zlib to 1.2.12

zlib-1.2.11.tar.gz is not available anymore from
https://zlib.net/zlib-1.2.11.tar.gz, so use
zlib-1.2.12.tar.gz instead.

Signed-off-by: Kefu Chai <cdc92d111bae0ed1ee3b3c8a1f849fcffc6b44f7@gmail.com>
Message-Id: <20220502064526.3242982-1-cdc92d111bae0ed1ee3b3c8a1f849fcffc6b44f7@gmail.com>

--- cooking_recipe.cmake
+++ cooking_recipe.cmake
@@ -121,8 +121,8 @@

 cooking_ingredient (zlib
   EXTERNAL_PROJECT_ARGS
-    URL https://zlib.net/zlib-1.2.11.tar.gz
-    URL_MD5 1c9f62f0778697a09d36121ead88e08e
+    URL https://zlib.net/zlib-1.2.12.tar.gz
+    URL_MD5 5fc414a9726be31427b440b434d05f78
     CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
     BUILD_COMMAND <DISABLE>
     INSTALL_COMMAND ${make_command} install)


fixed dcmtk debug build error for python builds

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -45,12 +45,11 @@
     if(MITK_USE_DCMTK)
       list(APPEND ctk_optional_cache_args
            -DDCMTK_DIR:PATH=${DCMTK_DIR}
-           -DDCMTK_CMAKE_DEBUG_POSTFIX:STRING=d
           )
       if(NOT MITK_USE_Python)
-      list(APPEND ctk_optional_cache_args
-           -DDCMTK_CMAKE_DEBUG_POSTFIX:STRING=d
-          )
+        list(APPEND ctk_optional_cache_args
+            -DDCMTK_CMAKE_DEBUG_POSTFIX:STRING=d
+            )
       endif()
       list(APPEND proj_DEPENDENCIES DCMTK)
     else()


add test to cmake file

add test to cmake file

--- Modules/DiffusionImaging/DiffusionCore/Testing/files.cmake
+++ Modules/DiffusionImaging/DiffusionCore/Testing/files.cmake
@@ -2,6 +2,7 @@
   mitkFactoryRegistrationTest.cpp
   mitkDiffusionImageEqualTest.cpp
   mitkNonLocalMeansDenoisingTest.cpp
+  mitkDiffusionImageEqualTest.cpp
 )

 set(MODULE_CUSTOM_TESTS


[FIX] Fixing the warning level for MSVC with new build system.

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

--- util/cmake/FindSeqAn.cmake
+++ util/cmake/FindSeqAn.cmake
@@ -210,14 +210,22 @@
 if (WIN32)
   # Always set NOMINMAX such that <Windows.h> does not define min/max as
   # macros.
-  set(SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -DNOMINMAX")
+  set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS}")
+  add_definitions (-DNOMINMAX)
 endif (WIN32)

 # Visual Studio Setup
 if (MSVC)
   # Warning level 3 for MSVC is disabled for now to see how much really bad warnings there are.
   #set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} /W3)
-  set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} /W2")
+
+  # TODO(holtgrew): This rather belongs into the SeqAn build system and notso much into FindSeqAn.cmake.
+
+  # Force to always compile with W2.
+  add_definitions (/W2)
+
+  # Disable warnings about unsecure (although standard) functions.
+  add_definitions (-D_SCL_SECURE_NO_WARNING)
 endif (MSVC)

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


Cleanup output messages to make it simpler to understand heaptrack.

--- heaptrack.sh.cmake
+++ heaptrack.sh.cmake
@@ -52,14 +52,18 @@
 fi
 LIBHEAPTRACK=$(readlink -f "$LIBHEAPTRACK")

-echo "starting application, this might take some time..."
-
+# setup named pipe to read data from
 pipe=/tmp/heaptrack_fifo$$
 mkfifo $pipe
 trap "rm -f $pipe" EXIT

-"$INTERPRETER" < $pipe | gzip -c > "$output.gz" &
+# interpret the data and compress the output on the fly
+output="$output.gz"
+"$INTERPRETER" < $pipe | gzip -c > "$output" &
 debuggee=$!
+
+echo "starting application, this might take some time..."
+echo "output will be written to $output"

 if [ -z "$debug" ]; then
   LD_PRELOAD=$LIBHEAPTRACK DUMP_HEAPTRACK_OUTPUT="$pipe" $@
@@ -71,4 +75,8 @@

 wait $debuggee

+echo "Heaptrack finished! Now run the following to investigate the data:"
+echo
+echo "  heaptrack_print $output | less"
+
 # kate: hl Bash


Update source to master

Update source to master

--- cmake/external/firestore.cmake
+++ cmake/external/firestore.cmake
@@ -18,7 +18,7 @@
   return()
 endif()

-set(version CocoaPods-8.3.0)
+set(version master)
 ExternalProject_Add(
   firestore


CMakeLists.txt: Fix windows and mac builds

Signed-off-by: Andrew Andrianov <02e0a999c50b1f88df7a8f5a04e1b76b35ea6a88@ncrmnt.org>

--- cmake/modules/FindHidApi.cmake
+++ cmake/modules/FindHidApi.cmake
@@ -14,10 +14,12 @@
   check_hidapi_package()
   set(HIDAPI_SOURCES "${HIDAPI_DIR}/windows/hid.c")
   set(HIDAPI_LIBRARIES "setupapi")
+  set(HIDAPI_STATIC_LIBRARIES ${HIDAPI_LIBRARIES})
 elseif(APPLE)
   check_hidapi_package()
   set(HIDAPI_SOURCES "${HIDAPI_DIR}/mac/hid.c")
   set(HIDAPI_LIBRARIES "-framework IOKit -framework CoreFoundation")
+  set(HIDAPI_STATIC_LIBRARIES ${HIDAPI_LIBRARIES})
 else()
   FIND_PACKAGE(PkgConfig)
   PKG_CHECK_MODULES(HIDAPI hidapi-libusb REQUIRED)


cmake: extensions: fix a STRUCT_SECTION_ITERABLE comment reference

The STRUCT_SECTION_ITERABLE have been renamed to drop the Z_ prefix,
this drops the last reference in the cmake comments.

Signed-off-by: Fabio Baltieri <1c55e39c05d9ab42261288cf330256b2af6ba179@google.com>

--- cmake/modules/extensions.cmake
+++ cmake/modules/extensions.cmake
@@ -3669,7 +3669,7 @@
 #
 #
 # Define an output section which will set up an iterable area
-# of equally-sized data structures. For use with Z_STRUCT_SECTION_ITERABLE.
+# of equally-sized data structures. For use with STRUCT_SECTION_ITERABLE.
 # Input sections will be sorted by name in lexicographical order.
 #
 # Each list for an input section will define the following linker symbols:


Tweak version script

Tweak version script

[ ] May break build
[ ] May break existing applications (see CHANGES.txt)
[ ] Bugfix
[ ] New Feature
[x] Cleanup
[ ] Optimization
[ ] Documentation

--- revision.cmake
+++ revision.cmake
@@ -6,8 +6,12 @@
   EXECUTE_PROCESS(COMMAND ${Subversion_SVN_EXECUTABLE} info ${CMAKE_SOURCE_DIR}
     OUTPUT_VARIABLE SVN_INFO_OUTPUT ERROR_VARIABLE SVN_INFO_ERROR)

-  if(NOT SVN_INFO_ERROR)
+  if(SVN_INFO_ERROR)
+    message(STATUS "No revision version support, subversion error: ${SVN_INFO_ERROR}")
+  else()
     Subversion_WC_INFO(${CMAKE_SOURCE_DIR} EQ_SVN)
     set(EQ_REVISION ${EQ_SVN_WC_REVISION})
   endif()
+else()
+  message(STATUS "No revision version support, subversion not found")
 endif(Subversion_FOUND)


Fix typo pour compile linux

Fix typo pour compile linux

--- CMake/ConfigXsilium.cmake
+++ CMake/ConfigXsilium.cmake
@@ -268,7 +268,7 @@
 		include(TemplateCompiler)
 	endif()

-	set(XSILIUM_FREETYPE_INCLUDE ${XSILIUM_DEP_DIR}/FreeType/include)
+	set(XSILIUM_FREETYPE_INCLUDE ${XSILIUM_DEP_DIR}/freetype/include)
 	set(XSILIUM_ZZIP_INCLUDE ${XSILIUM_DEP_DIR}/zziplib)
 	set(XSILIUM_OIS_INCLUDE ${XSILIUM_DEP_DIR}/ois/includes)
 	set(XSILIUM_OGRE_INCLUDE ${OGREPATH}/OgreMain/include ${OGREPATH}/Components/Terrain/include ${XSILIUM_BINARY_DIR}/include ${XSILIUM_PLATFORM})


Use FATAL_ERROR instead of FATAL.  Also find ARPACK quietly.

--- CMake/FindArmadillo.cmake
+++ CMake/FindArmadillo.cmake
@@ -194,26 +194,27 @@
     endif (NOT "${ARMA_USE_LAPACK}" STREQUAL "" AND NOT HAVE_LAPACK)

     if (NOT "${ARMA_USE_LAPACK}" STREQUAL "" AND NOT LAPACK_FOUND)
-      message(FATAL "Cannot find LAPACK library, but ARMA_USE_LAPACK is set. "
-                    "Try specifying LAPACK libraries manually by setting the "
-                    "LAPACK_LIBRARY variable.")
+      message(FATAL_ERROR "Cannot find LAPACK library, but ARMA_USE_LAPACK is "
+          "set. Try specifying LAPACK libraries manually by setting the "
+          "LAPACK_LIBRARY variable.")
     endif (NOT "${ARMA_USE_LAPACK}" STREQUAL "" AND NOT LAPACK_FOUND)

     if (NOT "${ARMA_USE_BLAS}" STREQUAL "" AND NOT BLAS_FOUND)
-      message(FATAL "Cannot find BLAS library, but ARMA_USE_BLAS is set.  Try "
-                    "specifying BLAS libraries manually by setting the "
-                    "BLAS_LIBRARY variable.")
+      message(FATAL_ERROR "Cannot find BLAS library, but ARMA_USE_BLAS is set. "
+          "Try specifying BLAS libraries manually by setting the BLAS_LIBRARY "
+          "variable.")
     endif (NOT "${ARMA_USE_BLAS}" STREQUAL "" AND NOT BLAS_FOUND)

     # Search for ARPACK (or replacement).
     if (NOT "${ARMA_USE_ARPACK}" STREQUAL "")
       # Use Armadillo ARPACK-finding procedure.
+      set(ARPACK_FIND_QUIETLY true)
       include(ARMA_FindARPACK)

       if (NOT ARPACK_FOUND)
-        message(ERROR "ARMA_USE_ARPACK is defined in armadillo_bits/config.hpp,"
-                      " but ARPACK cannot be found.  Try specifying "
-                      "ARPACK_LIBRARY.")
+        message(FATAL_ERROR "ARMA_USE_ARPACK is defined in "
+            "armadillo_bits/config.hpp, but ARPACK cannot be found.  Try "
+            "specifying ARPACK_LIBRARY.")
       endif (NOT ARPACK_FOUND)

       set(SUPPORT_LIBRARIES "${SUPPORT_LIBRARIES}" "${ARPACK_LIBRARY}")


BUG: Mantis-856: Fix TinyXML import script and enhance documentation

--- CMake/ImportTinyXML.cmake
+++ CMake/ImportTinyXML.cmake
@@ -3,19 +3,27 @@

 if(TINYXML_FOUND)
   option(OTB_USE_EXTERNAL_TINYXML "Use external TinyXML library." ON)
-
-  # Check if STL support is enabled with macro TIXML_USE_STL
-  try_compile(TIXML_USE_STL
-              ${CMAKE_CURRENT_BINARY_DIR}/CMake
-              ${CMAKE_CURRENT_SOURCE_DIR}/CMake/otbTestTinyXMLUseSTL.cxx
-              CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${TINYXML_INCLUDE_DIRS}" "-DLINK_LIBRARIES:STRING=${TINYXML_LIBRARIES}"
-              COMPILE_DEFINITIONS "-DTIXML_USE_STL"
-              OUTPUT_VARIABLE OUTPUT)
-
 else()
   option(OTB_USE_EXTERNAL_TINYXML "Use external TinyXML library." OFF)
+endif()
+mark_as_advanced(OTB_USE_EXTERNAL_TINYXML)
+
+if(OTB_USE_EXTERNAL_TINYXML)
+  if(TINYXML_FOUND)
+    # Check if STL support is enabled with macro TIXML_USE_STL
+    try_compile(TIXML_USE_STL
+                ${CMAKE_CURRENT_BINARY_DIR}/CMake
+                ${CMAKE_CURRENT_SOURCE_DIR}/CMake/otbTestTinyXMLUseSTL.cxx
+                CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${TINYXML_INCLUDE_DIRS}" "-DLINK_LIBRARIES:STRING=${TINYXML_LIBRARIES}"
+                COMPILE_DEFINITIONS "-DTIXML_USE_STL"
+                OUTPUT_VARIABLE OUTPUT)
+  else()
+    message(FATAL_ERROR "Can't build OTB without TinyXML. Install it "
+                        "on your system, or disable the option "
+                        "OTB_USE_EXTERNAL_TINYXML to use the internal one")
+  endif()
+else()
   set(TINYXML_LIBRARIES otbtinyXML)
   set(TIXML_USE_STL)
-  message(STATUS "Using TinyXML internal version")
+  message(STATUS "  Using TinyXML internal version")
 endif()
-mark_as_advanced(OTB_USE_EXTERNAL_TINYXML)


Fix test dependencies on Windows

Fix test dependencies on Windows

--- cmake/test.cmake
+++ cmake/test.cmake
@@ -94,7 +94,7 @@

 if (WIN32)
   set(test_output_path
-    "${test_output_path}/${CMAKE_CFG_INTDIR}")
+    "${test_output_path}/$<CONFIGURATION>")
 endif (WIN32)

 set(BUILDNAME "" CACHE STRING "The build name for CDash submissions")
@@ -161,8 +161,12 @@
   set_tests_properties(test-${testname}-${instance}
     PROPERTIES
       WORKING_DIRECTORY       "${test_working_path}"
-      FAIL_REGULAR_EXPRESSION "^Error: ;\nError: "
-      REQUIRED_FILES          "${test_output_path}/test-${testname}")
+      FAIL_REGULAR_EXPRESSION "^Error: ;\nError: ")
+  if (NOT WIN32)
+    set_tests_properties(test-${testname}-${instance}
+      PROPERTIES
+        REQUIRED_FILES "${test_output_path}/test-${testname}")
+  endif (NOT WIN32)
   if (test_environment)
     set_tests_properties(test-${testname}-${instance}
       PROPERTIES


i got the URL_MD5 parameter to EnternalProject_Add() working in Windows by adding CMake to the path.

--- cmake/trio.cmake
+++ cmake/trio.cmake
@@ -79,9 +79,7 @@
 		ExternalProject_Add(trio
 			PREFIX ${TRIO_DEFAULT_PREFIX}
 			URL ${TRIO_DOWNLOAD_URL}
-			# TODO: i can't seem to find an example of how URL_MD5 is supposed
-			# to be used, and the naive approach doesn't work.
-			#URL_MD5 ${TRIO_MD5SUM}
+			URL_MD5 ${TRIO_MD5SUM}
 			CONFIGURE_COMMAND ${TRIO_DEFAULT_PREFIX}/src/trio/configure --prefix=${TRIO_DEFAULT_PREFIX}
 			TEST_BEFORE_INSTALL ${TRIO_RUN_TESTS}
 			)
@@ -97,9 +95,7 @@
 		ExternalProject_Add(trio
 			PREFIX ${TRIO_DEFAULT_PREFIX}
 			URL ${TRIO_DOWNLOAD_URL}
-			# TODO: i can't seem to find an example of how URL_MD5 is supposed
-			# to be used, and the naive approach doesn't work.
-			#URL_MD5 ${TRIO_MD5SUM}
+			URL_MD5 ${TRIO_MD5SUM}
 			# BUG: trio's regression tests appear to fail.
 			#TEST_BEFORE_INSTALL ${TRIO_RUN_TESTS}
 			# WORKAROUND: the following option needs to be last, as CMake


From Peter Bear, "Attached is a fix for the detection of GDAL 1.7.0. The previous CMake file only supported up to 1.6, this fix supports 1.7."

--- CMakeModules/FindGDAL.cmake
+++ CMakeModules/FindGDAL.cmake
@@ -57,20 +57,20 @@
 )

 FIND_LIBRARY(GDAL_LIBRARY
-  NAMES gdal gdal_i gdal1.6.0 gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL
+  NAMES gdal gdal_i gdal1.7.0 gdal1.6.0 gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL
   PATHS
   $ENV{GDAL_DIR}
   NO_DEFAULT_PATH
   PATH_SUFFIXES lib64 lib
 )
 FIND_LIBRARY(GDAL_LIBRARY
-  NAMES gdal gdal_i gdal1.6.0 gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL
+  NAMES gdal gdal_i gdal1.7.0 gdal1.6.0 gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL
   PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
     NO_DEFAULT_PATH
     PATH_SUFFIXES lib64 lib
 )
 FIND_LIBRARY(GDAL_LIBRARY
-  NAMES gdal gdal_i gdal1.6.0 gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL
+  NAMES gdal gdal_i gdal1.7.0 gdal1.6.0 gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL
   PATHS
     ~/Library/Frameworks
     /Library/Frameworks


Downgrade GDCM from version 3.0.18 to 3.0.17

Version 3.0.18 introduced the gdcmext library which fails to link
against iconv functions on macOS.

--- CMakeExternals/GDCM.cmake
+++ CMakeExternals/GDCM.cmake
@@ -42,7 +42,7 @@
   ExternalProject_Add(${proj}
      LIST_SEPARATOR ${sep}
      GIT_REPOSITORY https://github.com/malaterre/GDCM.git
-     GIT_TAG v3.0.18
+     GIT_TAG v3.0.17
      GIT_SUBMODULES ""
      CMAKE_GENERATOR ${gen}
      CMAKE_GENERATOR_PLATFORM ${gen_platform}


COMP: update test reference

COMP: update test reference

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -12,7 +12,7 @@
 set(MITK-Data_DEPENDS ${proj})

 if(BUILD_TESTING)
-  set(revision_tag 2823b0e7) # first 8 characters of hash-tag
+  set(revision_tag ab904480) # first 8 characters of hash-tag
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


COMP: mitk data hash update

COMP: mitk data hash update

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -12,7 +12,7 @@
 set(MITK-Data_DEPENDS ${proj})

 if(BUILD_TESTING)
-  set(revision_tag 674f55a7)
+  set(revision_tag 5f90eb5e)
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


Update PythonQt to fix crash during PythonQt::cleanup()

Update PythonQt to commontk/PythonQt@cbf890f8eda122b8dca8e67d2bf75e85640ab297:

// -------------------------
    commit cbf890f8eda122b8dca8e67d2bf75e85640ab297
    Author: Max Smolens <max.smolens@kitware.com>
    Date:   Tue Sep 15 15:45:30 2015 -0400

	Fix PythonQtSignalReceiver crash during cleanup

	This commit fixes a crash during PythonQt::cleanup(). While destroying the
	PythonQtPrivate instance, any remaining PythonQtSignalReceivers that are kept
	alive only by their parent object will be destroyed. The crash occurs when
	PythonQtSignalReceiver's destructor calls back into
	PythonQtPrivate::removeSignalEmitter() when the PythonQtPrivate instance is
	mostly destroyed.

	Includes test case that crashes without the fix.
// -------------------------

--- CMakeExternals/PythonQt.cmake
+++ CMakeExternals/PythonQt.cmake
@@ -66,7 +66,7 @@
     message(FATAL_ERROR "error: Python is required to build ${PROJECT_NAME}")
   endif()

-  set(revision_tag d1b0cacf96d20513cd68cdfbdf9dc686b104c477)
+  set(revision_tag cbf890f8eda122b8dca8e67d2bf75e85640ab297)
   if(${proj}_REVISION_TAG)
     set(revision_tag ${${proj}_REVISION_TAG})
   endif()


Fix auto-detection of host tool for Android cross-compiling build. After using CMAKE_SYSROOT in the android.toolchain.cmake module, CMake will only find Doxygen when CMAKE_FIND_ROOT_PATH_MODE_PROGRAM is set to to NEVER. It is actually weird why it was working before when it was set to ONLY previously.

--- CMake/Toolchains/android.toolchain.cmake
+++ CMake/Toolchains/android.toolchain.cmake
@@ -1671,54 +1671,10 @@
 # Urho3D: we don't even need it now because setting CMAKE_SYSROOT will also do this for us
 #set( CMAKE_FIND_ROOT_PATH ${ANDROID_TOOLCHAIN_ROOT} ${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME} ${ANDROID_SYSROOT} )

-# only search for libraries and includes in the ndk toolchain
-set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
+# Urho3D: bug fix - only search for libraries and headers in the ndk toolchain; remove find_host_package() and find_host_program() macros because they are not needed in any cases
+set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
 set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
 set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
-
-
-# macro to find packages on the host OS
-macro( find_host_package )
- set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
- set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER )
- set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER )
- if( CMAKE_HOST_WIN32 )
-  SET( WIN32 1 )
-  SET( UNIX )
- elseif( CMAKE_HOST_APPLE )
-  SET( APPLE 1 )
-  SET( UNIX )
- endif()
- find_package( ${ARGN} )
- SET( WIN32 )
- SET( APPLE )
- SET( UNIX 1 )
- set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
- set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
- set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
-endmacro()
-
-
-# macro to find programs on the host OS
-macro( find_host_program )
- set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
- set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER )
- set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER )
- if( CMAKE_HOST_WIN32 )
-  SET( WIN32 1 )
-  SET( UNIX )
- elseif( CMAKE_HOST_APPLE )
-  SET( APPLE 1 )
-  SET( UNIX )
- endif()
- find_program( ${ARGN} )
- SET( WIN32 )
- SET( APPLE )
- SET( UNIX 1 )
- set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
- set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
- set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
-endmacro()

 macro( ANDROID_GET_ABI_RAWNAME TOOLCHAIN_FLAG VAR )


ci: For the purpose of memcheck only fail for defects, not test failures.

--- scripts/dashboard/common.cmake
+++ scripts/dashboard/common.cmake
@@ -493,8 +493,6 @@
     ctest_memcheck(RETURN_VALUE MEMCHECK_RETURN DEFECT_COUNT MEMCHECK_DEFECTS)
     if(NOT (MEMCHECK_DEFECTS EQUAL 0))
       message(SEND_ERROR "ctest memcheck defects found: ${MEMCHECK_DEFECTS}")
-    elseif(NOT (MEMCHECK_RETURN EQUAL 0))
-      message(SEND_ERROR "ctest memcheck return value: ${MEMCHECK_RETURN}")
     endif()
   endif()
   if(dashboard_do_submit)


Add flex bison definition.

Add flex bison definition.

--- src/inserts/functions.cmake
+++ src/inserts/functions.cmake
@@ -1212,6 +1212,9 @@
         DEPENDS ${parser_include_in}
     )
     target_sources(${this} PRIVATE ${parser_include})
+
+    # set potential access to private fields
+    target_compile_definitions(${this} PRIVATE HAVE_BISON_${name_upper}_PARSER)
 endmacro()

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


oppsie

oppsie

--- cmake-scripts/FindLibintl.cmake
+++ cmake-scripts/FindLibintl.cmake
@@ -43,15 +43,12 @@
     set(LIBINTL_LIBRARIES)
     set(LIBINTL_LIB_FOUND TRUE)
   else (LIBINTL_LIBC_HAS_DGETTEXT)
-    find_library(LIBINTL_LIBRARIES NAMES intl  )
-
     find_library(LIBINTL_LIBRARIES
       NAMES intl libintl
       HINTS
       PATH_SUFFIXES gettext/lib
       PATHS ${LIBINTL_SEARCH_PATHS}
     )
-
     if(LIBINTL_LIBRARIES)
       set(LIBINTL_LIB_FOUND TRUE)
     endif(LIBINTL_LIBRARIES)


Adding ability to specify the libMesh pkconfig type with the METHOD env var.

--- cmake/Modules/FindLIBMESH.cmake
+++ cmake/Modules/FindLIBMESH.cmake
@@ -5,13 +5,16 @@
     message(FATAL_ERROR "OpenMC builds with libMesh support require CMake version 3.12.0 or greater.")
 endif()

+set(LIBMESH_PC_FILE libmesh)
+
+# if the METHOD variable is present, check specifically for
+# the libMesh .pc file for that build type
+if(DEFINED ENV{METHOD})
+  set(LIBMESH_PC_FILE libmesh-$ENV{METHOD})
+  message(STATUS "Using environment variable METHOD to determine libMesh build: ${LIBMESH_PC_FILE}")
+endif()
+
 include(FindPkgConfig)
 set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${LIBMESH_PC}")
 set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH True)
-pkg_check_modules(LIBMESH REQUIRED libmesh>=1.6.0 IMPORTED_TARGET)
-
-find_path(LIBMESH_PC NAMES libmesh.pc
-          HINTS ${LIBMESH_LIBDIR}
-          PATHS ENV LD_LIBRARY_PATH
-          PATH_SUFFIXES lib/pkgconfig pkgconfig
-          NO_DEFAULT_PATH)
+pkg_check_modules(LIBMESH REQUIRED ${LIBMESH_PC_FILE}>=1.6.0 IMPORTED_TARGET)


Add OPENVDB_INCLUDEDIR and OPENVDB_SESI_LIB to OpenVDBHoudiniSetup.cmake

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

--- cmake/OpenVDBHoudiniSetup.cmake
+++ cmake/OpenVDBHoudiniSetup.cmake
@@ -299,6 +299,25 @@
   set(ILMBASE_LIBRARYDIR ${_HOUDINI_LIB_DIR})
 endif()

+# OpenVDB
+
+if(NOT OPENVDB_INCLUDEDIR)
+  set(OPENVDB_INCLUDEDIR ${_HOUDINI_INCLUDE_DIR})
+endif()
+if(NOT OPENVDB_SESI_LIB)
+  # Full path to openvdb_sesi library
+  find_library(OPENVDB_SESI_LIB openvdb_sesi
+    ${_FIND_HOUDINI_ADDITIONAL_OPTIONS}
+    PATHS ${_HOUDINI_LIB_DIR}
+  )
+  if(NOT EXISTS ${OPENVDB_SESI_LIB})
+    message(WARNING "The OpenVDB Houdini CMake setup is unable to locate libopenvdb_sesi "
+      "within the Houdini installation at: ${_HOUDINI_LIB_DIR}. "
+      "This is needed for building the ABI tests."
+    )
+  endif()
+endif()
+
 # Boost - currently must be provided as VDB is not fully configured to
 # use Houdini's namespaced hboost


remove disable warning c4250

remove disable warning c4250

--- cmake/PlatformWindowsMSVC.cmake
+++ cmake/PlatformWindowsMSVC.cmake
@@ -20,7 +20,7 @@

 set(WIN32_COMPILE_FLAGS
-    "/nologo /Zc:wchar_t /Zc:forScope /GL /GF /GR /GS- /Zi /fp:precise /MP /wd4267 /wd4251 /wd4250 /wd4273 /W3 /WX "
+    "/nologo /Zc:wchar_t /Zc:forScope /GL /GF /GR /GS- /Zi /fp:precise /MP /wd4267 /wd4251 /wd4273 /W3 /WX "
     # nologo       -> no logo
     # Zc:wchar_t   -> treat wchar_t as built-in type: yes
     # Zc:forScope  -> force conformance in for loop scope: Yes


Made find script more robust.

Made find script more robust.

--- cmake/modules/FindArduino.cmake
+++ cmake/modules/FindArduino.cmake
@@ -57,13 +57,30 @@
 #        SERIAL       - Serial command [optional]
 # Creates a example from the specified library.

-file(GLOB SDK_PATHS /usr/share/arduino*)
-
+# paths to look for arduino
+set(ARDUINO_PATHS
+    /usr/local
+    /opt/local
+    /usr
+    /opt
+    )
+
+# find hints
+set(ARDUINO_HINTS)
+foreach(PREFIX ${ARDUINO_PATHS})
+    file(GLOB PREFIX_SDK_PATHS ${PREFIX}/share/arduino*)
+    set(ARDUINO_HINTS "${ARDUINO_HINTS} ${PREFIX_SDK_PATHS}")
+endforeach()
+message(STATUS "hints: ${ARDUINO_HINTS}")
+
+# find sdk path
 find_path(ARDUINO_SDK_PATH
-          NAMES lib/version.txt hardware libraries
-		  PATH_SUFFIXES  share/arduino
-		  HINTS ${SDK_PATHS}
-          DOC "Arduino Development Kit path.")
+    NAMES lib/version.txt hardware libraries
+    PATH ${ARDUINO_PATHS}
+    PATH_SUFFIXES  share/arduino-1.0 share/arduino
+    HINTS ${ARDUINO_HINTS}
+    DOC "Arduino Development Kit path.")
+message(STATUS "sdk path: ${ARDUINO_SDK_PATH}")

 # load_board_settings()
 #


Phidgets: Better autoguess of .h location

--- cmakemodules/FindPHIDGETS.cmake
+++ cmakemodules/FindPHIDGETS.cmake
@@ -18,12 +18,19 @@
 		"$ENV{ProgramFiles}/Phidgets/lib"
 	DOC "Full path of library file 'phidget21.so' or 'phidget21.lib'" )

+# Help find the .h files:
+IF (EXISTS ${PHIDGETS_LIBRARIES})
+	get_filename_component(AUX_PARENT_DIR1 ${PHIDGETS_LIBRARIES} PATH)
+	get_filename_component(AUX_PARENT_DIR2 ${AUX_PARENT_DIR1} PATH)
+ENDIF (EXISTS ${PHIDGETS_LIBRARIES})
+
 find_path(PHIDGETS_INCLUDE_DIR
 	NAMES phidget21.h
 	PATHS
 		"/usr/local/include"
 		"/usr/include/"
 		"$ENV{ProgramFiles}/Phidgets/include"
+		"${AUX_PARENT_DIR1}" "${AUX_PARENT_DIR2}"
 	DOC "Path to [PATH]/phidget21.h"
 )


Set the CC compiler to /opt/rocm/llvm/bin/clang if available (#421)

* Set CC compiler to clang if available.
* Missing clang not fatal.

--- install_deps.cmake
+++ install_deps.cmake
@@ -61,20 +61,36 @@
     if(HCC)
         set(ENV{CXX} ${HCC})
     else()
-	message(STATUS "Cannot find hcc")
-	find_program(CLANGXX clang++
+	    message(STATUS "Cannot find hcc")
+        find_program(CLANGXX clang++
+            PATHS
+                /opt/rocm/llvm
+                /opt/rocm
+            PATH_SUFFIXES
+                bin
+        )
+        if(CLANGXX)
+            set(ENV{CXX} ${CLANGXX})
+        else()
+            message(FATAL_ERROR "Cannot find clang++")
+        endif()
+    endif()
+endif()
+
+
+if(NOT DEFINED ENV{CC} AND NOT DEFINED CMAKE_C_COMPILER AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
+    find_program(CLANGC clang
 	    PATHS
 	        /opt/rocm/llvm
-		/opt/rocm
+		    /opt/rocm
 	    PATH_SUFFIXES
 	        bin
 	)
-	if(CLANGXX)
-	    set(ENV{CXX} ${CLANGXX})
+	if(CLANGC)
+	    set(ENV{CC} ${CLANGC})
 	else()
-            message(FATAL_ERROR "Cannot find clang++")
+        message(STATUS "Cannot find clang to set to CC")
 	endif()
-    endif()
 endif()

 cmake_get(pfultz2/rocm-recipes PREFIX ${PREFIX} CMAKE_ARGS ${PARSE_UNPARSED_ARGUMENTS})


Fix GDAL_DATA

Fix GDAL_DATA

--- cmake/DevBaseExternal.cmake
+++ cmake/DevBaseExternal.cmake
@@ -158,13 +158,11 @@
         HINTS ${GDAL_INCLUDE_DIR}/../bin
     )

-    if(WIN32)
-        set(GDAL_DATA ${GDAL_INCLUDE_DIR}/../share/gdal)
-    else()
-        set(GDAL_DATA ${GDAL_INCLUDE_DIR}/../../share/gdal)
-    endif()
-
-    if(NOT EXISTS "${GDAL_DATA}")
+    if(EXISTS "${GDAL_INCLUDE_DIR}/../share/gdal")
+        set(GDAL_DATA "${GDAL_INCLUDE_DIR}/../share/gdal")
+    elseif(EXISTS "${GDAL_INCLUDE_DIR}/../../share/gdal")
+        set(GDAL_DATA "${GDAL_INCLUDE_DIR}/../../share/gdal")
+    else()
         message(FATAL_ERROR "GDal data dir not found")
     endif()


Add force to symlink to fix issue #294

Add force to symlink to fix issue #294

--- cmake/InstallSymlinks.cmake
+++ cmake/InstallSymlinks.cmake
@@ -13,7 +13,7 @@
             file(MAKE_DIRECTORY \${DEST_DIR})
             file(RELATIVE_PATH SRC_REL \${DEST_DIR} \${SRC})
             message(STATUS \"symlink: \${SRC_REL} -> \${DEST}\")
-            execute_process(COMMAND ln -s \${SRC_REL} \${DEST})
+            execute_process(COMMAND ln -sf \${SRC_REL} \${DEST})
         endforeach()
     ")
 endfunction()


Fix compile warnings.

Fix compile warnings.

--- cmake/os/WindowsCache.cmake
+++ cmake/os/WindowsCache.cmake
@@ -84,7 +84,6 @@
 SET(HAVE_IPPROTO_IPV6 CACHE  INTERNAL "")
 SET(HAVE_IPV6 TRUE CACHE  INTERNAL "")
 SET(HAVE_IPV6_V6ONLY 1 CACHE  INTERNAL "")
-SET(HAVE_ISINF CACHE  INTERNAL "")
 SET(HAVE_LANGINFO_H CACHE  INTERNAL "")
 SET(HAVE_LDIV 1 CACHE  INTERNAL "")
 SET(HAVE_LIMITS_H 1 CACHE  INTERNAL "")


Make sure `qibuild install` does not fail when there are no install rules

I can't think of any reliable way to detect the lack of install
rules ...

Change-Id: Id5ff7b2f692ff6da0a272c716e0b4aa84d8c536a
Reviewed-on: http://gerrit.aldebaran.lan:8080/2730
Reviewed-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>
Tested-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>

--- cmake/qibuild/general.cmake
+++ cmake/qibuild/general.cmake
@@ -116,3 +116,7 @@
 option(BUILD_TESTS
   "If OFF, no test will be built, and `qibuild test` won't run any test"
   ON)
+
+# Always create an install rule, so that `qibuild install` never
+# fails
+install(CODE "")


Remove the useless get_filename_component() - the result isn't used anywhere
and it just doesn't work either.

svn path=/trunk/kdesupport/phonon/; revision=870775

--- cmake/FindGLIB2.cmake
+++ cmake/FindGLIB2.cmake
@@ -25,8 +25,6 @@
              NAMES glib-2.0
              PATHS ${PKG_GLIB_LIBRARY_DIRS} )

-get_filename_component(glib2LibDir ${PKG_GLIB_LIBRARIES} PATH)
-
 find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h
           PATH_SUFFIXES glib-2.0/include
           PATHS ${PKG_GLIB_INCLUDE_DIRS} ${PKG_GLIB_LIBRARIES} ${CMAKE_SYSTEM_LIBRARY_PATH})


build: separate flags

build: separate flags

This somehow worked with the build on Linux, but seems to fail on the buildbots.
Split the flags apart here as otherwise the two flags are treated as one, and
cause a compilation failure.

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@248654 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -207,8 +207,8 @@
     test_target_arch(mips "" "-mips32r2" "--target=mips-linux-gnu")
     test_target_arch(mips64 "" "-mips64r2" "-mabi=n64")
   elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "arm")
-    test_target_arch(arm "" "-march=armv7-a -mfloat-abi=soft")
-    test_target_arch(armhf "" "-march=armv7-a -mfloat-abi=hard")
+    test_target_arch(arm "" "-march=armv7-a" "-mfloat-abi=soft")
+    test_target_arch(armhf "" "-march=armv7-a" "-mfloat-abi=hard")
   elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "aarch32")
     test_target_arch(aarch32 "" "-march=armv8-a")
   elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "aarch64")


specify group, display name and description of the documentation component

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

--- cmake/pcl_cpack.cmake
+++ cmake/pcl_cpack.cmake
@@ -69,6 +69,9 @@
     # add documentation
     if(BUILD_documentation)
         set(CPACK_COMPONENTS_ALL "${CPACK_COMPONENTS_ALL} doc")
+        set(PCL_CPACK_COMPONENTS "${PCL_CPACK_COMPONENTS}\nset(CPACK_COMPONENT_DOC_GROUP \"PCL\")\n")
+        set(PCL_CPACK_COMPONENTS "${PCL_CPACK_COMPONENTS}\nset(CPACK_COMPONENT_DOC_DISPLAY_NAME \"Documentation\")\n")
+        set(PCL_CPACK_COMPONENTS "${PCL_CPACK_COMPONENTS}\nset(CPACK_COMPONENT_DOC_DESCRIPTION \"API documentation and tutorials\")\n")
     endif(BUILD_documentation)
     # add PCLConfig
     set(CPACK_COMPONENTS_ALL "${CPACK_COMPONENTS_ALL} pclconfig")


Fix development version check on DISSECT_VERSION.

--- cmake/pcl_utils.cmake
+++ cmake/pcl_utils.cmake
@@ -60,7 +60,7 @@
 # Pull the component parts out of the version number.
 macro(DISSECT_VERSION)
     # Detect if we're in a developlment version and generate pretty version string
-    if(${PCL_VERSION_TWEAK} EQUAL 99)
+    if(PCL_VERSION_TWEAK EQUAL 99)
         set(PCL_DEV_VERSION 1)
         set(PCL_VERSION_PRETTY "${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}.${PCL_VERSION_PATCH}-dev")
     else()


CUDA driver API: restructure module handling.

--- runtime/hipacc_cu.hpp.cmake
+++ runtime/hipacc_cu.hpp.cmake
@@ -658,32 +658,8 @@
 // DRIVER API
 //

-// Compile CUDA source file to ptx assembly using nvcc compiler
-void hipaccCompileCUDAToPTX(std::string file_name, int cc, std::string build_options = std::string()) {
-    char line[FILENAME_MAX];
-    FILE *fpipe;
-
-    std::stringstream ss;
-    ss << cc;
-
-    std::string command = "${NVCC} -ptx -arch=compute_" + ss.str() + " ";
-    command += build_options + " " + file_name;
-    command += " -o " + file_name + ".ptx 2>&1";
-
-    if (!(fpipe = (FILE *)popen(command.c_str(), "r"))) {
-        perror("Problems with pipe");
-        exit(EXIT_FAILURE);
-    }
-
-    while (fgets(line, sizeof(char) * FILENAME_MAX, fpipe)) {
-        std::cerr << line;
-    }
-    pclose(fpipe);
-}
-
-
-// Load ptx assembly, create a module and kernel
-void hipaccCreateModuleKernel(CUfunction &function, CUmodule &module, std::string file_name, std::string kernel_name, int cc) {
+// Create a module from ptx assembly
+void hipaccCreateModule(CUmodule &module, const void *ptx, int cc) {
     CUresult err = CUDA_SUCCESS;
     CUjit_target target_cc;

@@ -706,31 +682,65 @@
     #endif

-    std::ifstream srcFile(file_name.c_str());
-    if (!srcFile.is_open()) {
-        std::cerr << "ERROR: Can't open PTX source file '" << file_name.c_str() << "'!" << std::endl;
-        exit(EXIT_FAILURE);
-    }
-
-    std::string ptxString(std::istreambuf_iterator<char>(srcFile),
-            (std::istreambuf_iterator<char>()));
-
     const int errorLogSize = 10240;
     char errorLogBuffer[errorLogSize] = {0};

+    int num_options = 2;
     CUjit_option options[] = { CU_JIT_ERROR_LOG_BUFFER, CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES, CU_JIT_TARGET };
     void *optionValues[] = { (void *)errorLogBuffer, (void *)errorLogSize, (void *)target_cc };

-    // Load PTX source
-    err = cuModuleLoadDataEx(&module, ptxString.c_str(), 2, options, optionValues);
+    // load ptx source
+    err = cuModuleLoadDataEx(&module, ptx, num_options, options, optionValues);
+
     if (err != CUDA_SUCCESS) {
         std::cerr << "Error log: " << errorLogBuffer << std::endl;
     }
     checkErrDrv(err, "cuModuleLoadDataEx()");
-
-    // Get function entry point
-    err = cuModuleGetFunction(&function, module, kernel_name.c_str());
-    checkErrDrv(err, "cuModuleGetFunction()");
+}
+
+
+// Compile CUDA source file and create module
+void hipaccCompileCUDAToModule(CUmodule &module, std::string file_name, int cc, std::string build_options = std::string()) {
+    char line[FILENAME_MAX];
+    FILE *fpipe;
+
+    std::stringstream ss;
+    ss << cc;
+
+    std::string command = "${NVCC} -ptx -arch=compute_" + ss.str() + " ";
+    command += build_options + " " + file_name;
+    command += " -o " + file_name + ".ptx 2>&1";
+
+    if (!(fpipe = (FILE *)popen(command.c_str(), "r"))) {
+        perror("Problems with pipe");
+        exit(EXIT_FAILURE);
+    }
+
+    while (fgets(line, sizeof(char) * FILENAME_MAX, fpipe)) {
+        std::cerr << line;
+    }
+    pclose(fpipe);
+
+    std::string ptx_filename = file_name + ".ptx";
+    std::ifstream ptx_file(ptx_filename);
+    if (!ptx_file.is_open()) {
+        std::cerr << "ERROR: Can't open PTX source file '" << ptx_filename << "'!" << std::endl;
+        exit(EXIT_FAILURE);
+    }
+
+    std::string ptx_string(std::istreambuf_iterator<char>(ptx_file), (std::istreambuf_iterator<char>()));
+
+    const char *ptx = (const char *)ptx_string.c_str();
+    // compile ptx
+    hipaccCreateModule(module, ptx, cc);
+}
+
+
+// Get kernel from a module
+void hipaccGetKernel(CUfunction &function, CUmodule &module, std::string kernel_name) {
+    // get function entry point
+    CUresult err = cuModuleGetFunction(&function, module, kernel_name.c_str());
+    checkErrDrv(err, "cuModuleGetFunction('" + kernel_name + "')");
 }

@@ -1110,14 +1120,13 @@

         std::string compile_options = "-D PPT=" + num_ppt_ss.str() + " -D BS=" + num_bs_ss.str() + " -I./include ";
         compile_options += "-D BSX_EXPLORE=64 -D BSY_EXPLORE=1 ";
-        hipaccCompileCUDAToPTX(filename, cc, compile_options);
-
-        std::string ptx_filename = filename + ".ptx";
         CUmodule modReduction;
+        hipaccCompileCUDAToModule(modReduction, filename, cc, compile_options);
+
         CUfunction exploreReduction2D;
         CUfunction exploreReduction1D;
-        hipaccCreateModuleKernel(exploreReduction2D, modReduction, ptx_filename, kernel2D, cc);
-        hipaccCreateModuleKernel(exploreReduction1D, modReduction, ptx_filename, kernel1D, cc);
+        hipaccGetKernel(exploreReduction2D, modReduction, kernel2D);
+        hipaccGetKernel(exploreReduction1D, modReduction, kernel1D);

         float min_dt=FLT_MAX;
         for (size_t i=0; i<HIPACC_NUM_ITERATIONS; ++i) {
@@ -1220,7 +1229,6 @@
         max_threads_per_block, size_t max_threads_for_kernel, size_t
         max_smem_per_block, size_t heu_tx, size_t heu_ty, int cc) {
     CUresult err = CUDA_SUCCESS;
-    std::string ptx_filename = filename + ".ptx";
     size_t opt_tx=warp_size, opt_ty=1;
     float opt_time = FLT_MAX;

@@ -1275,11 +1283,12 @@
             std::string compile_options = "-D BSX_EXPLORE=" +
                 num_threads_x_ss.str() + " -D BSY_EXPLORE=" +
                 num_threads_y_ss.str() + " -I./include ";
-            hipaccCompileCUDAToPTX(filename, cc, compile_options);

             CUmodule modKernel;
+            hipaccCompileCUDAToModule(modKernel, filename, cc, compile_options);
+
             CUfunction exploreKernel;
-            hipaccCreateModuleKernel(exploreKernel, modKernel, ptx_filename, kernel, cc);
+            hipaccGetKernel(exploreKernel, modKernel, kernel);

             // load constant memory
             CUdeviceptr constMem;


ManageGConf: Fixed

ManageGConf: Fixed

--- Modules/ManageGConf.cmake
+++ Modules/ManageGConf.cmake
@@ -7,12 +7,12 @@
 #     )
 #     - Process schemas file.
 #       * Parameters:
-#         + FILE <schemasFile>: (Optional) See GCONF_SCHEMAS_FILE.
-#           If not specified, it will determined by following order:
-#           "GCONF_SCHEMAS_FILE"
-#           "${SYSCONF_DIR}/gconf/schemas
-#         + INSTALL_DIR <dir>: (Optional) See GCONF_INSTALL_DIR.
-#         + CONFIG_SOURCE <source>: (Optional) See GCONF_CONFIG_SOURCE.
+#         + FILE <schemasFile>: (Optional) Path to GConf .schema.
+#           Default: ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.schemas
+#         + INSTALL_DIR <dir>: (Optional) Directory to install GConf .schemas file.
+#	    Default: ${SYSCONF_DIR}/gconf/schemas
+#         + CONFIG_SOURCE <source>: (Optional) Configuration source.
+#           Default: "" (Use the system default)
 #       * Reads and defines following variables:
 #         + GCONF_SCHEMAS_FILE: Schema file.
 #           Default: ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.schemas
@@ -45,55 +45,40 @@
     FEDORA_NAME "GConf2"
     )

-MACRO(MANAGE_GCONF_SCHEMAS)
+SET(MANAGE_GCONF_SCHEMAS_VALID_OPTIONS "FILE" "INSTALL_DIR" "CONFIG_SOURCE")
+FUNCTION(MANAGE_GCONF_SCHEMAS)
     INCLUDE(ManageVersion)
-    SET(_validOptions "FILE" "INSTALL_DIR" "CONFIG_SOURCE")
-    VARIABLE_PARSE_ARGN(_opt _validOptions ${ARGN})
+    VARIABLE_PARSE_ARGN(_o MANAGE_GCONF_SCHEMAS_VALID_OPTIONS ${ARGN})

-    ## Determine GCONF_SCHEMA_FILE
-    IF(NOT "${_opt_FILE}" STREQUAL "")
-	SET(GCONF_SCHEMAS_FILE ${_opt_FILE})
-    ELSEIF("${GCONF_SCHEMAS_FILE}" STREQUAL "")
-	SET(GCONF_SCHEMAS_FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.schemas")
-    ENDIF(NOT "${_opt_FILE}" STREQUAL "")
+    IF(NOT _o_FILE)
+	SET(_o_FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.schemas")
+    ENDIF()

-    GET_FILENAME_COMPONENT(_gconf_schemas_basename ${GCONF_SCHEMAS_FILE} NAME)
+    GET_FILENAME_COMPONENT(schemasBasename ${_o_FILE} NAME)

-    ## Determine GCONF_SCHEMAS_INSTALL_DIR
-    IF(NOT "${_opt_INSTALL_DIR}" STREQUAL "")
-	SET(GCONF_SCHEMAS_INSTALL_DIR ${_opt_INSTALL_DIR})
-    ELSEIF("${GCONF_SCHEMAS_INSTALL_DIR}" STREQUAL "")
-	IF("${SYSCONF_INSTALL_DIR}" STREQUAL "")
-	    SET(GCONF_SCHEMAS_INSTALL_DIR  "${SYSCONF_DIR}/gconf/schemas")
-	ELSE("${SYSCONF_INSTALL_DIR}" STREQUAL "")
-	    SET(GCONF_SCHEMAS_INSTALL_DIR  "${SYSCONF_INSTALL_DIR}/gconf/schemas")
-	ENDIF("${SYSCONF_INSTALL_DIR}" STREQUAL "")
-    ENDIF(NOT "${_opt_INSTALL_DIR}" STREQUAL "")
+    IF(NOT _o_INSTALL_DIR)
+	SET(_o_INSTALL_DIR  "${SYSCONF_DIR}/gconf/schemas")
+    ENDIF()

-    ## Determine GCONF_CONFIG_SOURCE
-    IF(NOT "${_opt_CONFIG_SOURCE}" STREQUAL "")
-	SET(GCONF_CONFIG_SOURCE ${_opt_INSTALL_DIR})
-    ELSEIF("${GCONF_CONFIG_SOURCE}" STREQUAL "")
-	SET(GCONF_CONFIG_SOURCE "")
-    ENDIF(NOT "${_opt_CONFIG_SOURCE}" STREQUAL "")

     ADD_CUSTOM_TARGET(uninstall_schemas
-	COMMAND GCONF_CONFIG_SOURCE=${GCONF_CONFIG_SOURCE}
+	COMMAND GCONF_CONFIG_SOURCE=${_o_CONFIG_SOURCE}
 	${GCONF2_EXECUTABLE} --makefile-uninstall-rule
-	${GCONF_SCHEMAS_INSTALL_DIR}/${_gconf_schemas_basename}
-	COMMENT "Uninstalling schemas"
+	"${_o_INSTALL_DIR}/${schemasBasename}"
+	COMMENT "uninstall_schemas"
+	VERBATIM
 	)

     ADD_CUSTOM_TARGET(install_schemas
-	COMMAND cmake -E copy ${GCONF_SCHEMAS_FILE} ${GCONF_SCHEMAS_INSTALL_DIR}/${_gconf_schemas_basename}
+	COMMAND ${CMAKE_COMMAND} -E copy "${_o_FILE}" "${_o_INSTALL_DIR}/${schemasBasename}"
 	COMMAND GCONF_CONFIG_SOURCE=${GCONF_CONFIG_SOURCE}
 	${GCONF2_EXECUTABLE} --makefile-install-rule
-	${GCONF_SCHEMAS_INSTALL_DIR}/${_gconf_schemas_basename}
-	DEPENDS ${GCONF_SCHEMAS_FILE}
-	COMMENT "Installing schemas"
+	"${_o_INSTALL_DIR}/${schemasBasename}"
+	DEPENDS "${_o_FILE}"
+	COMMENT "install_schemas"
+	VERBATIM
 	)

-    MANAGE_FILE_INSTALL(SYSCONF ${GCONF_SCHEMAS_FILE}
-	DEST_SUBDIR "gconf/schemas")
-ENDMACRO(MANAGE_GCONF_SCHEMAS)
+    INSTALL(FILES ${_o_FILE} DESTINATION "${SYSCONF_DIR}/gconf/schemas")
+ENDFUNCTION(MANAGE_GCONF_SCHEMAS)


Make crypto.prf file reflect reality: this is where QCA is getting installed, which is not necessarily the Qt prefix.

svn path=/trunk/kdesupport/qca/; revision=1352135

--- crypto.prf.cmake
+++ crypto.prf.cmake
@@ -1,5 +1,5 @@
-QCA_INCDIR = @QT_INCLUDE_DIR@
-QCA_LIBDIR = @QT_LIBRARY_DIR@
+QCA_INCDIR = @CMAKE_INSTALL_PREFIX@/include
+QCA_LIBDIR = @LIB_INSTALL_DIR@

 CONFIG *= qt
 INCLUDEPATH += $$QCA_INCDIR/QtCrypto


Add trace on retreived branch

Add trace on retreived branch

--- CI/main_superbuild.cmake
+++ CI/main_superbuild.cmake
@@ -68,7 +68,7 @@
 endif()

 if (clone_res)
-  message( SEND_ERROR "Problem in retreiving the archive")
+  message( SEND_ERROR "Problem in retreiving the archive of ${BRANCH_NAME}")
   return()
 endif()


ENH: ExternalData: Warn on missing file instead of failing

When the primary source tree path named by a DATA{} reference does not
exist, produce an AUTHOR_WARNING instead of a FATAL_ERROR.  This is
useful when writing a new DATA{} reference to a test reference output
that has not been created yet.  This way the developer can run the test,
manually verify the output, and then copy it into place to provide the
reference and eliminate the warning.

If the named source tree path is expected to be a file but exists as a
directory, we still need to produce a FATAL_ERROR.

Change-Id: Ib94f499df7d07c80f6e82e075c218dd3b307439d

--- CMake/ExternalData.cmake
+++ CMake/ExternalData.cmake
@@ -399,6 +399,7 @@
   set(external "") # Entries external to the source tree.
   set(internal "") # Entries internal to the source tree.
   set(have_original ${data_is_directory})
+  set(have_original_as_dir 0)

   # Process options.
   set(series_option "")
@@ -448,11 +449,18 @@
   endif()

   if(NOT have_original)
-    message(FATAL_ERROR "Data file referenced by argument\n"
+    if(have_original_as_dir)
+      set(msg_kind FATAL_ERROR)
+      set(msg "that is directory instead of a file!")
+    else()
+      set(msg_kind AUTHOR_WARNING)
+      set(msg "that does not exist as a file (with or without an extension)!")
+    endif()
+    message(${msg_kind} "Data file referenced by argument\n"
       "  ${arg}\n"
       "corresponds to source tree path\n"
       "  ${reldata}\n"
-      "that does not exist as a file (with or without an extension)!")
+      "${msg}")
   endif()

   if(external)
@@ -569,27 +577,33 @@
       set(alg "")
     endif()
     if("x${relname}" MATCHES "^x${regex}$" # matches
-        AND NOT IS_DIRECTORY "${top_src}/${entry}" # not a directory
         AND NOT "x${relname}" MATCHES "(^x|/)\\.ExternalData_" # not staged obj
         )
-      set(name "${top_src}/${relname}")
-      set(file "${top_bin}/${relname}")
-      if(alg)
-        list(APPEND external "${file}|${name}|${alg}")
-      elseif(ExternalData_LINK_CONTENT)
-        _ExternalData_link_content("${name}" alg)
-        list(APPEND external "${file}|${name}|${alg}")
-      elseif(NOT top_same)
-        list(APPEND internal "${file}|${name}")
-      endif()
-      if("${relname}" STREQUAL "${reldata}")
-        set(have_original 1)
+      if(IS_DIRECTORY "${top_src}/${entry}")
+        if("${relname}" STREQUAL "${reldata}")
+          set(have_original_as_dir 1)
+        endif()
+      else()
+        set(name "${top_src}/${relname}")
+        set(file "${top_bin}/${relname}")
+        if(alg)
+          list(APPEND external "${file}|${name}|${alg}")
+        elseif(ExternalData_LINK_CONTENT)
+          _ExternalData_link_content("${name}" alg)
+          list(APPEND external "${file}|${name}|${alg}")
+        elseif(NOT top_same)
+          list(APPEND internal "${file}|${name}")
+        endif()
+        if("${relname}" STREQUAL "${reldata}")
+          set(have_original 1)
+        endif()
       endif()
     endif()
   endforeach()
   set(external "${external}" PARENT_SCOPE)
   set(internal "${internal}" PARENT_SCOPE)
   set(have_original "${have_original}" PARENT_SCOPE)
+  set(have_original_as_dir "${have_original_as_dir}" PARENT_SCOPE)
 endfunction()

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


PKG: fixup mxe gcc dir and list of system dlls exceptions

--- CMake/MinGWPackage.cmake
+++ CMake/MinGWPackage.cmake
@@ -15,6 +15,8 @@
     set(MXE_OBJDUMP "${PACKAGE_MXEROOT}/usr/bin/x86_64-w64-mingw32.shared-objdump")
   endif()

+  file(GLOB MXE_GCC_LIB_DIR "${MXE_BIN_DIR}/gcc*")
+  list(APPEND PACKAGE_SEARCHDIRS ${MXE_GCC_LIB_DIR})
   list(APPEND PACKAGE_SEARCHDIRS ${MXE_BIN_DIR})
   list(APPEND PACKAGE_SEARCHDIRS "${MXE_BIN_DIR}/../qt/bin") #Qt
   list(APPEND PACKAGE_SEARCHDIRS "${MXE_BIN_DIR}/../qt/lib") #Qwt
@@ -42,39 +44,35 @@

 endmacro(package_mingw)

-SET(SYSTEM_DLLS
+set(SYSTEM_DLLS
   msvc.*dll
-  USER32.dll
-  GDI32.dll
-  SHELL32.DLL
-  KERNEL32.dll
-  ADVAPI32.dll
-  CRYPT32.dll
-  WS2_32.dll
+  user32.dll
+  gdi32.dll
+  shell32.dll
+  kernel32.dll
+  advapi32.dll
+  crypt32.dll
+  ws2_32.dll
   wldap32.dll
   ole32.dll
-  OPENGL32.DLL
-  GLU32.DLL
-  COMDLG32.DLL
-  IMM32.DLL
-  OLEAUT32.dll
-  COMCTL32.DLL
-  WINMM.DLL
+  opengl32.dll
+  glu32.dll
+  comdlg32.dll
+  imm32.dll
+  oleaut32.dll
+  comctl32.dll
+  winmm.dll
+  shfolder.dll
+  secur32.dll
+  wsock32.dll
+  winspool.drv)

-  SHELL32.dll
-  WLDAP32.dll
-  OPENGL32.dll
-  GLU32.dll
-  comdlg32.dll
-  IMM32.dll
-  WINMM.dll
-  WINSPOOL.DRV)
-
-## http://www.cmake.org/Wiki/CMakeMacroListOperations
-macro(IS_SYSTEM_DLL matched value)
+macro(is_system_dll matched value)
   set(${matched})
+  string(TOLOWER ${value} value_)
   foreach (pattern ${SYSTEM_DLLS})
-    if(${value} MATCHES ${pattern})
+    string(TOLOWER ${pattern} pattern_)
+    if(${value_} MATCHES ${pattern_})
       set(${matched} TRUE)
     endif()
   endforeach()
@@ -90,9 +88,7 @@
 endmacro()

 function(process_deps infile)
-
   get_filename_component(bn ${infile} NAME)
-
   list_contains(contains "${bn}" "${alldlls}")
   if(NOT contains)
     set(DLL_FOUND FALSE)
@@ -100,14 +96,20 @@
       if(NOT DLL_FOUND)
         if(EXISTS ${SEARCHDIR}/${infile})
           set(DLL_FOUND TRUE)
-
+        else()
+          string(TOLOWER ${infile} infile_lower)
+          if(EXISTS ${SEARCHDIR}/${infile_lower})
+            set(DLL_FOUND TRUE)
+            set(infile ${infile_lower})
+          endif()
+        endif()
+        if(DLL_FOUND)
           message(STATUS "Processing ${SEARCHDIR}/${infile}")
           if(NOT "${infile}" MATCHES "otbapp")
-            install(
-              FILES "${SEARCHDIR}/${infile}"
+            install(FILES "${SEARCHDIR}/${infile}"
               DESTINATION ${PACKAGE_PREFIX_DIR}/bin)
           else()
-
+            ##message(STATUS "skipping..${infile}")
           endif()
           if(NOT EXISTS ${MXE_OBJDUMP})
             message(FATAL_ERROR "objdump executable not found. please check MXE_OBJDUMP is set to correct cross compiled executable")


Fixed check to ensure the tests file actually exists Actually coded by DaveH, reviewed by CG

--- indra/cmake/LLAddBuildTest.cmake
+++ indra/cmake/LLAddBuildTest.cmake
@@ -3,7 +3,8 @@
 INCLUDE(LLMath)

 MACRO(ADD_BUILD_TEST_NO_COMMON name parent)
-    IF (EXISTS tests/${name}_test.cpp)
+#   MESSAGE("${CMAKE_CURRENT_SOURCE_DIR}/tests/${name}_test.cpp")
+    IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests/${name}_test.cpp")
         SET(no_common_libraries
             ${APRUTIL_LIBRARIES}
             ${APR_LIBRARIES}
@@ -22,12 +23,14 @@
             ${CMAKE_SOURCE_DIR}/test/test.cpp
             )
         ADD_BUILD_TEST_INTERNAL(${name} ${parent} "${no_common_libraries}" "${no_common_source_files}")
-    ENDIF (EXISTS tests/${name}_test.cpp)
+    ENDIF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests/${name}_test.cpp")
 ENDMACRO(ADD_BUILD_TEST_NO_COMMON name parent)

 MACRO(ADD_BUILD_TEST name parent)
-    IF (EXISTS tests/${name}_test.cpp)
+#   MESSAGE("${CMAKE_CURRENT_SOURCE_DIR}/tests/${name}_test.cpp")
+    IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests/${name}_test.cpp")
+
         SET(basic_libraries
             ${LLCOMMON_LIBRARIES}
             ${APRUTIL_LIBRARIES}
@@ -42,7 +45,7 @@
             ${CMAKE_SOURCE_DIR}/test/lltut.cpp
             )
         ADD_BUILD_TEST_INTERNAL(${name} ${parent} "${basic_libraries}" "${basic_source_files}")
-    ENDIF (EXISTS tests/${name}_test.cpp)
+    ENDIF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests/${name}_test.cpp")
 ENDMACRO(ADD_BUILD_TEST name parent)


Fixed definition of BOOST_SPIRIT_THREADSAFE

Using the INTERFACE_COMPILE_DEFINITIONS properties does not allow
transitive transfer of the flags to arabica-dependent projects

--- ThirdPartyLibraries.cmake
+++ ThirdPartyLibraries.cmake
@@ -769,9 +769,7 @@
 if (NOT IS_IOS)
   add_dependencies(${ARABICA_TARGET} ${LIBXML_TARGET})
 endif ()
-set_target_properties(
-    ${ARABICA_TARGET} PROPERTIES INTERFACE_COMPILE_DEFINITIONS
-    "BOOST_SPIRIT_THREADSAFE")
+add_definitions(-DBOOST_SPIRIT_THREADSAFE)

 ################################################################################
 # BerkeleyDB.


Bring in the 2D transfer function fix

Bring in the 2D transfer function fix

--- versions.cmake
+++ versions.cmake
@@ -80,7 +80,7 @@
   set(_paraview_revision "master")
 else()
   # Test the revision locally before proposing a move
-  set(_paraview_revision "ae4263019d571691dc88ca41da8e85f761cceea0")
+  set(_paraview_revision "eda913252d27e0d7d968b1dd93826f309e653dfb")
 endif()
 # Locally patched ParaView repo, or main repo
 #set(_paraview_repo "https://gitlab.kitware.com/paraview/paraview.git")


Update to the ParaView 5.5 release tag

Update to the ParaView 5.5 release tag

--- versions.cmake
+++ versions.cmake
@@ -80,7 +80,7 @@
   set(_paraview_revision "master")
 else()
   # Test the revision locally before proposing a move
-  set(_paraview_revision "v5.5.0-RC2")
+  set(_paraview_revision "v5.5.0")
 endif()
 add_revision(paraview
   GIT_REPOSITORY "https://gitlab.kitware.com/paraview/paraview.git"


Force -Wall on Travis builds (#850)

Force -Wall on Travis builds (#850)

--- src/cmake/compiler.cmake
+++ src/cmake/compiler.cmake
@@ -64,8 +64,11 @@
 # turn on more detailed warnings and consider warnings as errors
 if (NOT MSVC)
     add_definitions ("-Wall")
-    if (STOP_ON_WARNING)
+    if (STOP_ON_WARNING OR DEFINED ENV{CI})
         add_definitions ("-Werror")
+        # N.B. Force CI builds (Travis defines $CI) to use -Werror, even if
+        # STOP_ON_WARNING has been switched off by default, which we may do
+        # in release branches.
     endif ()
 endif ()


Remove more not interesting warnings from MSVC

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -113,18 +113,26 @@
     remove_msvc_warning(4251) # class <> needs to be dll-export
     remove_msvc_warning(4503) # mangled name too long was truncated
     remove_msvc_warning(4514) # unreferenced inline function has been removed
+    remove_msvc_warning(4571) # catch(...) semantics changed since Visual C++ 7.1;
     remove_msvc_warning(4582) # constructor is not implicitly called
     remove_msvc_warning(4583) # destructor is not implicitly called
     remove_msvc_warning(4623) # default constructor was implicitly defined as deleted
     remove_msvc_warning(4625) # copy constructor was implicitly defined as deleted
     remove_msvc_warning(4626) # assignment operator was implicitly defined as deleted
+    remove_msvc_warning(4643) # forward declaring 'optional' in namespace std is not permitted by the C++ Standard
     remove_msvc_warning(4668) # not defined preprocessor macro, replacing with '0' for '#if/#elif'
     remove_msvc_warning(4627) # move assignment operator was implicitly defined as deleted
     remove_msvc_warning(4710) # function not inlined
     remove_msvc_warning(4711) # function selected for automatic inlining
     remove_msvc_warning(4820) # padding added
+    remove_msvc_warning(4868) # compiler may not enforce left-to-right evaluation order in braced initializer list
     remove_msvc_warning(5026) # move constructor was implicitly defined as deleted
     remove_msvc_warning(5027) # move assignment operator was implicitly defined as deleted
+    remove_msvc_warning(5039) # pointer or reference to potentially throwing function passed to extern C function under -EHc.
+
+    # Noisy warnings from external code that are checked by clang
+    remove_msvc_warning(4365) # conversion from '...' to '...', signed/unsigned mismatch
+    remove_msvc_warning(4774) # format string is not a string literal
 else()
     # Add some warnings in debug mode
     # Basic set of warnings