SuperBuild: enable qttools to compile linguist

--- SuperBuild/CMake/External_qt5.cmake
+++ SuperBuild/CMake/External_qt5.cmake
@@ -50,7 +50,8 @@
 file(TO_NATIVE_PATH ${QT5_SB_SRC} QT5_SB_SRC_NATIVE)

 #Common options for all cases
-# -skip qtbase
+# -skip qtbase
+# -skip qttools  (need linguist)
 set(QT5_SB_CONFIG
   "-prefix ${QT5_INSTALL_PREFIX_NATIVE} -L ${QT5_LIB_PREFIX_NATIVE} \
   -I ${QT5_INCLUDE_PREFIX_NATIVE} -I ${QT5_INCLUDE_FREETYPE_NATIVE} \
@@ -83,7 +84,6 @@
   -skip qtserialport  \
   -skip qtspeech \
   -skip qtsvg  \
-  -skip qttools  \
   -skip qttranslations  \
   -skip qtvirtualkeyboard  \
   -skip qtwayland  \


Minor cleanup

Minor cleanup

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

--- revision.cmake
+++ revision.cmake
@@ -2,7 +2,6 @@

 find_package(Subversion)

-message(STATUS ${Subversion_SVN_EXECUTABLE})
 if(Subversion_FOUND)
   EXECUTE_PROCESS(COMMAND ${Subversion_SVN_EXECUTABLE} info ${CMAKE_SOURCE_DIR}
     OUTPUT_VARIABLE SVN_INFO_OUTPUT ERROR_VARIABLE SVN_INFO_ERROR)


Fix bad cmake include

Fix bad cmake include

--- testing/examples/heatTransfer/TestBPFileMx1_zfp.cmake
+++ testing/examples/heatTransfer/TestBPFileMx1_zfp.cmake
@@ -3,7 +3,7 @@
 # accompanying file Copyright.txt for details.
 #------------------------------------------------------------------------------#

-include(ADIOS2Functions)
+include(ADIOSFunctions)

 add_test(NAME HeatTransfer.BP3.zfp.Mx1.Write
   COMMAND ${MPIEXEC_EXECUTABLE}


Fixed the TNUN_compiler_runtime_integer_checks variable definition. Minor other stylistic changes.

--- toolchains/clang.cmake
+++ toolchains/clang.cmake
@@ -15,9 +15,9 @@
 if( NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" AND NOT ANDROID ) # Tested with XCode 8 and Android NDK r13b
     list( APPEND TNUN_compiler_LTO -fwhole-program-vtables )

-# http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
-# http://clang.llvm.org/docs/AddressSanitizer.html
-# http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
+    # http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
+    # http://clang.llvm.org/docs/AddressSanitizer.html
+    # http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
     set( TNUN_linker_runtime_sanity_checks -fsanitize=undefined -fsanitize=address -fsanitize=safe-stack )
     # -fsanitize=cfi disabled because of error:
     # clang-3.9: error: invalid argument '-fsanitize=cfi' only allowed with '-flto'
@@ -27,15 +27,15 @@
     # clang-3.9: error: invalid argument '-fsanitize=address' not allowed with '-fsanitize=memory'
     set( TNUN_compiler_runtime_sanity_checks ${TNUN_linker_runtime_sanity_checks} -fno-omit-frame-pointer )
 endif()
-set( TNUN_linker_runtime_integer_checks -fsanitize=integer )
-set( TNUN_compiler_runtime_integer_checks ${TNUN_compiler_runtime_integer_checks} )
+set( TNUN_compiler_runtime_integer_checks -fsanitize=integer )
+set( TNUN_linker_runtime_integer_checks   ${TNUN_compiler_runtime_integer_checks} )

 # Leak sanitizer is available only on Clang on Linux x64.
 # http://clang.llvm.org/docs/LeakSanitizer.html
 # Currently it is very very slow (two orders of magnitude slower than Valgrind).
 #if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND TNUN_ABI STREQUAL "x64" )
 #    list( APPEND TNUN_compiler_runtime_sanity_checks -fsanitize=leak )
-#    list( APPEND TNUN_linker_runtime_sanity_checks -fsanitize=leak)
+#    list( APPEND TNUN_linker_runtime_sanity_checks   -fsanitize=leak )
 #endif()

 # Implementation note:


Fix error message when host-tools artifacts is not found

--- Buildroot.cmake
+++ Buildroot.cmake
@@ -278,7 +278,7 @@
         elseif(BR_HOST_TOOLS_ARTIFACT_PREBUILT)
             message(FATAL_ERROR
                     "Did not find expected host-tools artifact for ${name}. "
-                    "Was looking for ${BR_DEVICE_TREE_ARTIFACT_PREBUILT}")
+                    "Was looking for ${BR_HOST_TOOLS_ARTIFACT_PREBUILT}")
         endif()
     else()
         _buildroot_make(


cmake: Use cmake's built-in TestForSSTREAM when testing for sstream.

The original test for SSTREAM actually tested for STRSTREAM.  Instead
of fixing the logic to test for SSTREAM, it seemed easier just to use
cmake's built-in macro to perform the test.

--- Configure.cmake
+++ Configure.cmake
@@ -2,16 +2,9 @@
 # LOG4CPP_HAVE_SSTREAM
 ###########################################################

-FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/configure-tryouts/strstream.cpp.in"
-"#include <strstream>\n"
-"int main()\n"
-"{\n"
-"	std::ostrstream	os;\n"
-"	os.str();\n"
-"	return 0;\n"
-"}")
-CONFIGURE_FILE(${CMAKE_CURRENT_BINARY_DIR}/configure-tryouts/strstream.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/configure-tryouts/strstream.cpp)
-TRY_COMPILE(LOG4CPP_HAVE_SSTREAM ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/configure-tryouts/strstream.cpp OUTPUT_VARIABLE OUTPUT)
+INCLUDE(TestForSSTREAM)
+
+SET (LOG4CPP_HAVE_SSTREAM NOT ${CMAKE_NO_ANSI_STRING_HEADERS})

 ###########################################################
 # LOG4CPP_HAVE_GETTIMEOFDAY


fixed wrong PATH in cmake

fixed wrong PATH in cmake

--- FindTorch.cmake
+++ FindTorch.cmake
@@ -13,9 +13,9 @@
   get_filename_component (TORCH_BIN_DIR ${TORCH_EXECUTABLE} PATH)
 endif (TORCH_EXECUTABLE)

-find_library (TORCH_TH TH ${TORCH_BIN_DIR}/../lib)
-find_library (TORCH_luaT luaT ${TORCH_BIN_DIR}/../lib)
-find_library (TORCH_lua lua ${TORCH_BIN_DIR}/../lib)
+find_library (TORCH_TH TH ${TORCH_BIN_DIR}/../lib NO_DEFAULT_PATH)
+find_library (TORCH_luaT luaT ${TORCH_BIN_DIR}/../lib NO_DEFAULT_PATH)
+find_library (TORCH_lua lua ${TORCH_BIN_DIR}/../lib NO_DEFAULT_PATH)

 set (TORCH_LIBRARIES ${TORCH_TH} ${TORCH_luaT} ${TORCH_lua})


Make sure to avoid conda on static builds for glog

Former-commit-id: 963ecdbdb57f3c377a40bd4013240e171f6931a1

--- cmake-modules/Fetch_glog.cmake
+++ cmake-modules/Fetch_glog.cmake
@@ -24,7 +24,12 @@
     endif()

     # Glog should only look in conda on shared builds! Conda does not give us the static version
-    find_package(glog 0.4 NO_CMAKE_PACKAGE_REGISTRY)
+    if(NOT BUILD_SHARED_LIBS AND DMRG_PREFER_CONDA_LIBS)
+        # Static case - conda should not be searched
+        find_package(glog 0.4 HINTS ${CMAKE_INSTALL_PREFIX} PATHS $ENV{EBROOTGLOG} NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH)
+    elseif(DMRG_PREFER_CONDA_LIBS)
+        find_package(glog 0.4 NO_CMAKE_PACKAGE_REGISTRY)
+    endif()

     if(NOT TARGET glog::glog)
         message(STATUS "Looking for glog in system")


Enabled use of MSVC 1900 patches for VS2017+ compilers

--- cmake/PythonApplyPatches.cmake
+++ cmake/PythonApplyPatches.cmake
@@ -105,5 +105,11 @@
 set(_version ${CMAKE_C_COMPILER_VERSION})
 if(MSVC)
   set(_version ${MSVC_VERSION})
+  if ("${MSVC_VERSION}" VERSION_LESS "2000" AND
+    ("${MSVC_VERSION}" VERSION_EQUAL "1900" OR "${MSVC_VERSION}" VERSION_GREATER "1900"))
+    set(_version "1900")
+  else()
+    set(_version ${MSVC_VERSION})
+  endif()
 endif()
 _apply_patches("${_py_version}/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}/${_version}")


Move KodeMacros.cmake to playground/pim/kode

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

--- cmake/modules/KodeMacros.cmake
+++ cmake/modules/KodeMacros.cmake
@@ -1,27 +0,0 @@
-#
-# Macros for the 'kode' code generatation tools
-#
-# see FindKode.cmake for documentation
-#
-
-MACRO (KODE_ADD_XML_PARSER _sources)
-	foreach (_current_file ${ARGN})
-		get_filename_component( _schema ${_current_file} ABSOLUTE )
-		get_filename_component( _basename ${_schema} NAME_WE )
-
-		set( _source_cpp ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp )
-		set( _source_h   ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h )
-		set( _parser_cpp ${CMAKE_CURRENT_BINARY_DIR}/${_basename}_parser.cpp )
-		set( _parser_h   ${CMAKE_CURRENT_BINARY_DIR}/${_basename}_parser.h )
-
-		add_custom_command(
-			OUTPUT ${_source_cpp} ${_source_h} ${_parser_cpp} ${_parser_h}
-			COMMAND ${KODE_XML_COMPILER_EXECUTABLE}
-			ARGS --external-parser ${_schema}
-			MAIN_DEPENDENCY ${_schema}
-			DEPENDS ${_KODE_XML_COMPILER_DEP}
-		)
-
-		set( ${_sources} ${${_sources}} ${_source_cpp} ${_parser_cpp} )
-	endforeach (_current_file)
-ENDMACRO (KODE_ADD_XML_PARSER)


Simplify logic to deduce dictionary and derived names

The computed ${dictname} is always equal to ${dictionary},
since the latter is the name of a target, which might look
like a filename, but it's not a path, so there's nothing to
remove to make it a name.

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -390,11 +390,10 @@
   endforeach()

   #---Build the names for library, pcm and rootmap file ----
-  get_filename_component(dict_base_name ${dictionary} NAME_WE)
-  if(dict_base_name MATCHES "^G__")
+  if(dictionary MATCHES "^G__")
     string(SUBSTRING ${dictionary} 3 -1 deduced_arg_module)
   else()
-    set(deduced_arg_module ${dict_base_name})
+    get_filename_component(deduced_arg_module ${dictionary} NAME_WE)
   endif()

   #---Set the library output directory-----------------------
@@ -504,7 +503,6 @@
                              ${MODULE_LIB_DEPENDENCY} ${ARG_EXTRA_DEPENDENCIES}
                              ${runtime_cxxmodule_dependencies}
                      COMMAND_EXPAND_LISTS)
-  get_filename_component(dictname ${dictionary} NAME)

   if(ARG_NOTARGET)
     if(TARGET ${ARG_MODULE})
@@ -518,9 +516,9 @@
         " The dictionary source is then attached to this target instead of a custom dictionary target.")
     endif()
   else()
-    add_custom_target(${dictname} DEPENDS ${dictionary}.cxx ${pcm_name} ${rootmap_name} ${cpp_module_file})
+    add_custom_target(${dictionary} DEPENDS ${dictionary}.cxx ${pcm_name} ${rootmap_name} ${cpp_module_file})
     if(PROJECT_NAME STREQUAL "ROOT")
-      set_property(GLOBAL APPEND PROPERTY ROOT_PCH_DEPENDENCIES ${dictname})
+      set_property(GLOBAL APPEND PROPERTY ROOT_PCH_DEPENDENCIES ${dictionary})
     endif()
   endif()

@@ -529,7 +527,7 @@
     if (NOT TARGET ${main_pcm_target})
       message(FATAL_ERROR "Target ${main_pcm_target} not found! Please move ${main_pcm_target} before specifying MULTIDICT.")
     endif()
-    add_dependencies(${main_pcm_target} ${dictname})
+    add_dependencies(${main_pcm_target} ${dictionary})
   endif()

   if(NOT ARG_NOINSTALL AND NOT CMAKE_ROOTTEST_DICT AND DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY)
@@ -552,7 +550,7 @@
   if(ARG_BUILTINS AND NOT ARG_NOTARGET)
     foreach(arg1 ${ARG_BUILTINS})
       if(TARGET ${${arg1}_TARGET})
-        add_dependencies(${dictname} ${${arg1}_TARGET})
+        add_dependencies(${dictionary} ${${arg1}_TARGET})
       endif()
     endforeach()
   endif()


Disable -Wall flag.

Disable -Wall flag.

--- cmake/Modules/TbagCxxFlags.cmake
+++ cmake/Modules/TbagCxxFlags.cmake
@@ -101,10 +101,10 @@

 #/// Default tbag project setup.
 macro (tbag_cxx_flags)
-    tbag_cxx_flags__set_position_independent_code ()
-    tbag_cxx_flags__set_cpp_standard_11           ()
-    tbag_cxx_flags__set_debug_define              ()
-    tbag_cxx_flags__set_print_all_compile_warning ()
-    #tbag_cxx_flags__set_install_rpath            ()
+    tbag_cxx_flags__set_position_independent_code  ()
+    tbag_cxx_flags__set_cpp_standard_11            ()
+    tbag_cxx_flags__set_debug_define               ()
+    #tbag_cxx_flags__set_print_all_compile_warning ()
+    #tbag_cxx_flags__set_install_rpath             ()
 endmacro ()


paddle2onnx update version to 1.0.0rc2 (#44759)

--- cmake/external/paddle2onnx.cmake
+++ cmake/external/paddle2onnx.cmake
@@ -24,7 +24,7 @@
 include(ExternalProject)

 set(PADDLE2ONNX_PROJECT "extern_paddle2onnx")
-set(PADDLE2ONNX_VERSION "1.0.0rc")
+set(PADDLE2ONNX_VERSION "1.0.0rc2")
 set(PADDLE2ONNX_PREFIX_DIR ${THIRD_PARTY_PATH}/paddle2onnx)
 set(PADDLE2ONNX_SOURCE_DIR
     ${THIRD_PARTY_PATH}/paddle2onnx/src/${PADDLE2ONNX_PROJECT})


Fix: Dev: Fixed issue with finding yaml when pkg-config can not. !minor

--- cmake/modules/FindYaml-cpp.cmake
+++ cmake/modules/FindYaml-cpp.cmake
@@ -6,7 +6,7 @@
 endif()

 # Attempt to find it if not configured in pkgconfig
-if(NOT ${${MODULE_NAME}_FOUND})
+if(NOT ${MODULE_NAME}_FOUND)
     MESSAGE(STATUS "Looking manually")
     set(${MODULE_NAME}_LIBRARIES yaml-cpp)
     find_path(${MODULE_NAME}_INCLUDE_DIRS NAMES yaml.h PATH_SUFFIXES yaml-cpp)


updated czmq for uwp

updated czmq for uwp

--- cmake/projects/czmq/hunter.cmake
+++ cmake/projects/czmq/hunter.cmake
@@ -4,6 +4,17 @@
 include(hunter_cacheable)
 include(hunter_download)
 include(hunter_pick_scheme)
+
+hunter_add_version(
+    PACKAGE_NAME
+    czmq
+    VERSION
+    "4.2.0-p2"
+    URL
+    "https://github.com/fwinnen/czmq/releases/download/v4.2.0-p2/czmq-4.2.0-p2.tar.gz"
+    SHA1
+    d7d5a71f43a737441dff8d59b2cd585916fdd875
+)

 hunter_add_version(
     PACKAGE_NAME


Increment nICEr version (#1334)

Increment nICEr version (#1334)

--- erizo/src/third_party/nicer.cmake
+++ erizo/src/third_party/nicer.cmake
@@ -1,7 +1,7 @@
 set(NICER_BUILD "${CMAKE_CURRENT_BINARY_DIR}/libdeps/nicer")
 ExternalProject_Add(project_nicer
   GIT_REPOSITORY "https://github.com/lynckia/nicer.git"
-  GIT_TAG "1.2"
+  GIT_TAG "1.3"
   PREFIX ${NICER_BUILD}
   CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${NICER_BUILD}
   DOWNLOAD_DIR "${NICER_BUILD}/src"


Automated merge with https://bitbucket.org/seraph/mesh-development-vs2010

--- indra/cmake/LLPrimitive.cmake
+++ indra/cmake/LLPrimitive.cmake
@@ -24,6 +24,7 @@
     set(LLPRIMITIVE_LIBRARIES
         llprimitive
         collada14dom
+        minizip
         xml2
         pcrecpp
         pcre


CI: enable strict mode by default

CI: enable strict mode by default

--- ci-build.cmake
+++ ci-build.cmake
@@ -83,6 +83,7 @@
 execute_process(COMMAND cmake
     -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
     -DOGRE_BUILD_TESTS=ON
+    -DOGRE_RESOURCEMANAGER_STRICT=ON
     -DOGRE_BUILD_DEPENDENCIES=${BUILD_DEPS}
     -DSWIG_EXECUTABLE=/usr/bin/swig3.0
     ${RENDERSYSTEMS}


SVN_SILENT made messages (.desktop file)

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -111,7 +111,7 @@
 Comment[sr@latin]=GStreamer kao pozadina Phonona
 Comment[sv]=Phonon Gstreamer-gränssnitt
 Comment[th]=โปรแกรมเบื้องหลัง GStreamer ของ Phonon
-Comment[tr]=Phonon GStreamer arka ucu
+Comment[tr]=Phonon GStreamer arkaucu
 Comment[ug]=Phonon GStreamer نىڭ ئارقائۇچى
 Comment[uk]=Модуль використання GStreamer у Phonon
 Comment[x-test]=xxPhonon GStreamer backendxx


Removing hard coded include directories for HDF5

--- Resources/IncludeMXADataModelSource.cmake
+++ Resources/IncludeMXADataModelSource.cmake
@@ -18,7 +18,7 @@
 LINK_DIRECTORIES(${BOOST_LIBRARY_DIRS})

 #-- Add the HDF5 include directory
-INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIR})
+# INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIR})

 #-- Add in the MXADataModel Sources
 SET( MXADATAMODEL_SRCS
@@ -132,8 +132,8 @@

 INCLUDE_DIRECTORIES(${MXA_RESOURCES_DIR}/../src/)

-SET(HDF5_SUPPORT "1")
-SET(HDF5_VTK_BRIDGE "0")
+SET (HDF5_SUPPORT "1")
+SET (HDF5_VTK_BRIDGE "0")
 SET (TIFF_SUPPORT "0")
 SET (XML_SUPPORT "0")
 SET (BUILD_TESTING "0")


fixed mfx version for mctf support

fixed mfx version for mctf support

--- builder/ConfTargets.cmake
+++ builder/ConfTargets.cmake
@@ -57,9 +57,9 @@
 endif()

 if ( ${API_VERSION} VERSION_GREATER 1.25 )
-  set ( MFX_1_25_OPTIONS_ALLOWED ON )
+  set ( MFX_1_26_OPTIONS_ALLOWED ON )
 else()
-  set ( MFX_1_25_OPTIONS_ALLOWED OFF )
+  set ( MFX_1_26_OPTIONS_ALLOWED OFF )
 endif()

 if ( ${API_VERSION} VERSION_GREATER 1.33 )
@@ -99,7 +99,7 @@
 option( MFX_ENABLE_ASC "Enable ASC support?"  ON )

 cmake_dependent_option(
-  MFX_ENABLE_MCTF "Build with MCTF support?"  ${MFX_1_25_OPTIONS_ALLOWED}
+  MFX_ENABLE_MCTF "Build with MCTF support?"  ${MFX_1_26_OPTIONS_ALLOWED}
   "MFX_ENABLE_ASC;MFX_ENABLE_KERNELS" OFF)

 # Now we will include config file which may overwrite default values of the


Turn off -Werror within SPIRV-tools

Turn off -Werror within SPIRV-tools

--- 3rdparty/3rdparty.cmake
+++ 3rdparty/3rdparty.cmake
@@ -36,6 +36,7 @@
     INTERFACE_COMPILE_FEATURES cxx_std_17
 )
 set(SPIRV-Headers_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/SPIRV-Headers)
+set(SPIRV_WERROR OFF CACHE BOOL "Enable error on warning SPIRV-Tools" FORCE)
 add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/SPIRV-Tools)
 add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/glslang)


Update ios.toolchain.cmake

Update ios.toolchain.cmake

Added a deprecation warning to SIMULATOR platform type. Fixed some flaws in the documentation of the toolchain file.

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -53,12 +53,12 @@
 #
 # IOS_PLATFORM: OS (default) or SIMULATOR or SIMULATOR64 or TVOS or SIMULATOR_TVOS or WATCHOS or SIMULATOR_WATCHOS
 #    OS = Build for iPhoneOS.
-#    OS64 = Build for arm64 iPhoneOS.
+#    OS64 = Build for arm64 arm64e iPhoneOS.
 #    SIMULATOR = Build for x86 i386 iPhone Simulator.
 #    SIMULATOR64 = Build for x86_64 iPhone Simulator.
 #    TVOS = Build for AppleTVOS.
 #    SIMULATOR_TVOS = Build for x86_64 AppleTV Simulator.
-#    WATCHOS = Build for armv7k for WatchOS.
+#    WATCHOS = Build for armv7k arm64_32 for WatchOS.
 #    SIMULATOR_WATCHOS = Build for x86_64 for Watch Simulator.
 # CMAKE_OSX_SYSROOT: Path to the iOS SDK to use.  By default this is
 #    automatically determined from IOS_PLATFORM and xcodebuild, but
@@ -71,13 +71,13 @@
 # ENABLE_ARC: (1|0) Enables or disables ARC support. Default 1 (true, ARC enabled by default)
 # ENABLE_VISIBILITY: (1|0) Enables or disables symbol visibility support. Default 0 (false, visibility hidden by default)
 # IOS_ARCH: (armv7 armv7s armv7k arm64 arm64e arm64_32 i386 x86_64) If specified, will override the default architectures for the given IOS_PLATFORM
-#    OS = armv7 armv7s arm64 + arm64e (if applicable)
-#    OS64 = arm64 + arm64e (if applicable)
+#    OS = armv7 armv7s arm64 arm64e (if applicable)
+#    OS64 = arm64 arm64e (if applicable)
 #    SIMULATOR = i386
 #    SIMULATOR64 = x86_64
 #    TVOS = arm64
 #    SIMULATOR_TVOS = x86_64 (i386 has since long been deprecated)
-#    WATCHOS = armv7k + arm64_32 (if applicable)
+#    WATCHOS = armv7k arm64_32 (if applicable)
 #    SIMULATOR_WATCHOS = x86_64 (i386 has since long been deprecated)
 #
 # This toolchain defines the following variables for use externally:
@@ -161,6 +161,7 @@
   if(NOT IOS_ARCH)
     set(IOS_ARCH i386)
   endif()
+  message(WARNING "SIMULATOR IS DEPRECATED. Consider using SIMULATOR64 instead.")
 elseif(IOS_PLATFORM STREQUAL "SIMULATOR64")
   set(XCODE_IOS_PLATFORM iphonesimulator)
   if(NOT IOS_ARCH)


Adapted version of FindGStreamer.cmake module for GStreamer x86 release for Windows

--- cmake/FindGStreamer.cmake
+++ cmake/FindGStreamer.cmake
@@ -69,13 +69,13 @@
     macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
         find_path(${_component_prefix}_INCLUDE_DIRS
             NAMES ${_header}
-            PATHS C:/gstreamer/1.0/x86_64/include
+            PATHS C:/gstreamer/1.0/x86_64/include C:/gstreamer/1.0/x86/include
             PATH_SUFFIXES gstreamer-1.0
         )

         find_library(${_component_prefix}_LIBRARIES
             NAMES ${_library}
-            PATHS C:/gstreamer/1.0/x86_64/lib
+            PATHS C:/gstreamer/1.0/x86_64/lib C:/gstreamer/1.0/x86/lib
         )
     endmacro()
 else ()


MYPACKAGEPACK is reserved to the top-level

--- cmake/MyPackagePack.cmake
+++ cmake/MyPackagePack.cmake
@@ -1,146 +1,150 @@
 MACRO (MYPACKAGEPACK VENDOR SUMMARY)
   #
-  # Set common CPack variables
+  # This should be executed only at the top-level
   #
-  IF (MYPACKAGE_DEBUG)
-    MESSAGE (STATUS "[${PROJECT_NAME}-BOOTSTRAP-DEBUG] Configuration CPack")
-  ENDIF ()
-  SET (CPACK_PACKAGE_NAME                "${PROJECT_NAME}")
-  SET (CPACK_PACKAGE_VENDOR              "${VENDOR}")
-  SET (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${SUMMARY}")
-  SET (CPACK_PACKAGE_VERSION             "${${PROJECT_NAME}_VERSION}")
-  SET (CPACK_PACKAGE_VERSION_MAJOR       "${${PROJECT_NAME}_VERSION_MAJOR}")
-  SET (CPACK_PACKAGE_VERSION_MINOR       "${${PROJECT_NAME}_VERSION_MINOR}")
-  SET (CPACK_PACKAGE_VERSION_PATCH       "${${PROJECT_NAME}_VERSION_PATCH}")
-  IF (EXISTS "${PROJECT_SOURCE_DIR}/LICENSE")
-    CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/LICENSE"  "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt")
-    SET (CPACK_RESOURCE_FILE_LICENSE     "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt")
-  ELSE ()
+  IF (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
+    #
+    # Set common CPack variables
+    #
     IF (MYPACKAGE_DEBUG)
-      MESSAGE (STATUS "[${PROJECT_NAME}-START-DEBUG] No LICENSE")
+      MESSAGE (STATUS "[${PROJECT_NAME}-BOOTSTRAP-DEBUG] Configuration CPack")
     ENDIF ()
-    SET (CPACK_RESOURCE_FILE_LICENSE)
-  ENDIF ()
-  #
-  # Enable component to all archive packaging types
-  #
-  SET (CPACK_ARCHIVE_COMPONENT_INSTALL TRUE)
-  #
-  # Get all components in one package
-  #
-  SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
-  #
-  # Do not get fooled by components out of our control
-  #
-  SET (CPACK_COMPONENTS_ALL ManpageComponent DynamicLibraryComponent StaticLibraryComponent HeaderComponent ApplicationComponent)
-  #
-  # Include CPack - from now on we will have access to CPACK own macros
-  #
-  INCLUDE (CPack)
-  #
-  # Install types
-  #
-  IF (_HAVE_HEADERCOMPONENT OR _HAVE_DYNAMICLIBRARYCOMPONENT OR _HAVE_STATICLIBRARYCOMPONENT OR _HAVE_APPLICATIONCOMPONENT OR _HAVE_MANPAGECOMPONENT)
-    SET (_CAN_FULLTYPE TRUE)
-  ELSE ()
-    SET (_CAN_FULLTYPE FALSE)
-  ENDIF ()
-  IF (_HAVE_HEADERCOMPONENT OR _HAVE_DYNAMICLIBRARYCOMPONENT OR _HAVE_STATICLIBRARYCOMPONENT)
-    SET (_CAN_DEVELOPMENTTYPE TRUE)
-  ELSE ()
-    SET (_CAN_DEVELOPMENTTYPE FALSE)
-  ENDIF ()
-  IF (_CAN_FULLTYPE)
-    CPACK_ADD_INSTALL_TYPE (FullType        DISPLAY_NAME "Full")
-  ENDIF ()
-  IF (_CAN_DEVELOPMENTTYPE)
-    CPACK_ADD_INSTALL_TYPE (DevelopmentType DISPLAY_NAME "Development")
-  ENDIF ()
-  #
-  # Groups
-  #
-  IF (_HAVE_HEADERCOMPONENT)
-    SET (_CAN_DEVELOPMENTGROUP TRUE)
-  ELSE ()
-    SET (_CAN_DEVELOPMENTGROUP FALSE)
-  ENDIF ()
-  IF (_HAVE_DYNAMICLIBRARYCOMPONENT OR _HAVE_STATICLIBRARYCOMPONENT)
-    SET (_CAN_DEVELOPMENTLIBRARYGROUP TRUE)
-  ELSE ()
-    SET (_CAN_DEVELOPMENTLIBRARYGROUP FALSE)
-  ENDIF ()
-  IF (_HAVE_MANPAGECOMPONENT)
-    SET (_CAN_DOCUMENTGROUP TRUE)
-  ELSE ()
-    SET (_CAN_DOCUMENTGROUP FALSE)
-  ENDIF ()
-  IF (_HAVE_APPLICATIONCOMPONENT)
-    SET (_CAN_RUNTIMEGROUP TRUE)
-  ELSE ()
-    SET (_CAN_RUNTIMEGROUP FALSE)
-  ENDIF ()
-  IF (_CAN_DEVELOPMENTGROUP)
-    CPACK_ADD_COMPONENT_GROUP (DevelopmentGroup        DISPLAY_NAME "Development" DESCRIPTION "Develoment files\n\nThis group contains libraries and headers"  EXPANDED)
-  ENDIF ()
-  IF (_CAN_DEVELOPMENTLIBRARYGROUP)
-    CPACK_ADD_COMPONENT_GROUP (DevelopmentLibraryGroup DISPLAY_NAME "Libraries"   DESCRIPTION "Library files\n\nBoth static and dynamic version are provided" PARENT_GROUP DevelopmentGroup)
-  ENDIF ()
-  IF (_CAN_DOCUMENTGROUP)
-    CPACK_ADD_COMPONENT_GROUP (DocumentGroup           DISPLAY_NAME "Documents"   DESCRIPTION "Document files\n\nThis group contains all the provided documentation" EXPANDED)
-  ENDIF ()
-  IF (_CAN_RUNTIMEGROUP)
-    CPACK_ADD_COMPONENT_GROUP (RuntimeGroup            DISPLAY_NAME "Runtime"     DESCRIPTION "Runtime applications"  EXPANDED)
-  ENDIF ()
-  #
-  # Components
-  #
-  IF (_HAVE_MANPAGECOMPONENT)
-    CPACK_ADD_COMPONENT(ManpageComponent
-                        DISPLAY_NAME "Man pages"
-                        DESCRIPTION "Documentation in the man format\n\nUseful on all platforms but Windows, in general"
-                        GROUP DocumentGroup
-                        INSTALL_TYPES FullType)
-  ENDIF ()
-  IF (_HAVE_DYNAMICLIBRARYCOMPONENT)
-    CPACK_ADD_COMPONENT(DynamicLibraryComponent
-                        DISPLAY_NAME "Dynamic"
-                        DESCRIPTION "Dynamic Libraries\n\nNecessary almost anytime"
-                        GROUP DevelopmentLibraryGroup
-                        INSTALL_TYPES FullType DevelopmentType)
-  ENDIF ()
-  IF (_HAVE_STATICLIBRARYCOMPONENT)
-    CPACK_ADD_COMPONENT(StaticLibraryComponent
-                        DISPLAY_NAME "Static"
-                        DESCRIPTION "Static Libraries\n\nOnly programmers would eventually need that"
-                        GROUP DevelopmentLibraryGroup
-                        INSTALL_TYPES FullType DevelopmentType)
-  ENDIF ()
-  IF (_HAVE_HEADERCOMPONENT)
-    CPACK_ADD_COMPONENT(HeaderComponent
-                        DISPLAY_NAME "Headers"
-                        DESCRIPTION "C/C++ Headers\n\nProgrammers will need these files"
-                        GROUP DevelopmentGroup
-                        INSTALL_TYPES FullType DevelopmentType)
-  ENDIF ()
-  IF (_HAVE_APPLICATIONCOMPONENT)
-    CPACK_ADD_COMPONENT(ApplicationComponent
-                        DISPLAY_NAME "Applications"
-                        DESCRIPTION "Executables"
-                        GROUP RuntimeGroup
-                        INSTALL_TYPES FullType
-                        DEPENDS DynamicLibraryComponent)
-  ENDIF ()
-  #
-  # Quite subtil, but the "package" target is not visible at this time. There is a old standing bug
-  # in CMake about this.
-  # We use a custom target for package generation.
-  # In addition documentation is generated using the INSTALL(CODE xxx) hack.
-  #
-  ADD_CUSTOM_TARGET(pack
-    COMMAND ${CMAKE_MAKE_PROGRAM} package
-    COMMENT "Packaging Source files"
-    DEPENDS man
-    VERBATIM
+    SET (CPACK_PACKAGE_NAME                "${PROJECT_NAME}")
+    SET (CPACK_PACKAGE_VENDOR              "${VENDOR}")
+    SET (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${SUMMARY}")
+    SET (CPACK_PACKAGE_VERSION             "${${PROJECT_NAME}_VERSION}")
+    SET (CPACK_PACKAGE_VERSION_MAJOR       "${${PROJECT_NAME}_VERSION_MAJOR}")
+    SET (CPACK_PACKAGE_VERSION_MINOR       "${${PROJECT_NAME}_VERSION_MINOR}")
+    SET (CPACK_PACKAGE_VERSION_PATCH       "${${PROJECT_NAME}_VERSION_PATCH}")
+    IF (EXISTS "${PROJECT_SOURCE_DIR}/LICENSE")
+      CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/LICENSE"  "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt")
+      SET (CPACK_RESOURCE_FILE_LICENSE     "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt")
+    ELSE ()
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-START-DEBUG] No LICENSE")
+      ENDIF ()
+      SET (CPACK_RESOURCE_FILE_LICENSE)
+    ENDIF ()
+    #
+    # Enable component to all archive packaging types
+    #
+    SET (CPACK_ARCHIVE_COMPONENT_INSTALL TRUE)
+    #
+    # Get all components in one package
+    #
+    SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
+    #
+    # Do not get fooled by components out of our control
+    #
+    SET (CPACK_COMPONENTS_ALL ManpageComponent DynamicLibraryComponent StaticLibraryComponent HeaderComponent ApplicationComponent)
+    #
+    # Include CPack - from now on we will have access to CPACK own macros
+    #
+    INCLUDE (CPack)
+    #
+    # Install types
+    #
+    IF (_HAVE_HEADERCOMPONENT OR _HAVE_DYNAMICLIBRARYCOMPONENT OR _HAVE_STATICLIBRARYCOMPONENT OR _HAVE_APPLICATIONCOMPONENT OR _HAVE_MANPAGECOMPONENT)
+      SET (_CAN_FULLTYPE TRUE)
+    ELSE ()
+      SET (_CAN_FULLTYPE FALSE)
+    ENDIF ()
+    IF (_HAVE_HEADERCOMPONENT OR _HAVE_DYNAMICLIBRARYCOMPONENT OR _HAVE_STATICLIBRARYCOMPONENT)
+      SET (_CAN_DEVELOPMENTTYPE TRUE)
+    ELSE ()
+      SET (_CAN_DEVELOPMENTTYPE FALSE)
+    ENDIF ()
+    IF (_CAN_FULLTYPE)
+      CPACK_ADD_INSTALL_TYPE (FullType        DISPLAY_NAME "Full")
+    ENDIF ()
+    IF (_CAN_DEVELOPMENTTYPE)
+      CPACK_ADD_INSTALL_TYPE (DevelopmentType DISPLAY_NAME "Development")
+    ENDIF ()
+    #
+    # Groups
+    #
+    IF (_HAVE_HEADERCOMPONENT)
+      SET (_CAN_DEVELOPMENTGROUP TRUE)
+    ELSE ()
+      SET (_CAN_DEVELOPMENTGROUP FALSE)
+    ENDIF ()
+    IF (_HAVE_DYNAMICLIBRARYCOMPONENT OR _HAVE_STATICLIBRARYCOMPONENT)
+      SET (_CAN_DEVELOPMENTLIBRARYGROUP TRUE)
+    ELSE ()
+      SET (_CAN_DEVELOPMENTLIBRARYGROUP FALSE)
+    ENDIF ()
+    IF (_HAVE_MANPAGECOMPONENT)
+      SET (_CAN_DOCUMENTGROUP TRUE)
+    ELSE ()
+      SET (_CAN_DOCUMENTGROUP FALSE)
+    ENDIF ()
+    IF (_HAVE_APPLICATIONCOMPONENT)
+      SET (_CAN_RUNTIMEGROUP TRUE)
+    ELSE ()
+      SET (_CAN_RUNTIMEGROUP FALSE)
+    ENDIF ()
+    IF (_CAN_DEVELOPMENTGROUP)
+      CPACK_ADD_COMPONENT_GROUP (DevelopmentGroup        DISPLAY_NAME "Development" DESCRIPTION "Develoment files\n\nThis group contains libraries and headers"  EXPANDED)
+    ENDIF ()
+    IF (_CAN_DEVELOPMENTLIBRARYGROUP)
+      CPACK_ADD_COMPONENT_GROUP (DevelopmentLibraryGroup DISPLAY_NAME "Libraries"   DESCRIPTION "Library files\n\nBoth static and dynamic version are provided" PARENT_GROUP DevelopmentGroup)
+    ENDIF ()
+    IF (_CAN_DOCUMENTGROUP)
+      CPACK_ADD_COMPONENT_GROUP (DocumentGroup           DISPLAY_NAME "Documents"   DESCRIPTION "Document files\n\nThis group contains all the provided documentation" EXPANDED)
+    ENDIF ()
+    IF (_CAN_RUNTIMEGROUP)
+      CPACK_ADD_COMPONENT_GROUP (RuntimeGroup            DISPLAY_NAME "Runtime"     DESCRIPTION "Runtime applications"  EXPANDED)
+    ENDIF ()
+    #
+    # Components
+    #
+    IF (_HAVE_MANPAGECOMPONENT)
+      CPACK_ADD_COMPONENT(ManpageComponent
+                          DISPLAY_NAME "Man pages"
+                          DESCRIPTION "Documentation in the man format\n\nUseful on all platforms but Windows, in general"
+                          GROUP DocumentGroup
+                          INSTALL_TYPES FullType)
+    ENDIF ()
+    IF (_HAVE_DYNAMICLIBRARYCOMPONENT)
+      CPACK_ADD_COMPONENT(DynamicLibraryComponent
+                          DISPLAY_NAME "Dynamic"
+                          DESCRIPTION "Dynamic Libraries\n\nNecessary almost anytime"
+                          GROUP DevelopmentLibraryGroup
+                          INSTALL_TYPES FullType DevelopmentType)
+    ENDIF ()
+    IF (_HAVE_STATICLIBRARYCOMPONENT)
+      CPACK_ADD_COMPONENT(StaticLibraryComponent
+                          DISPLAY_NAME "Static"
+                          DESCRIPTION "Static Libraries\n\nOnly programmers would eventually need that"
+                          GROUP DevelopmentLibraryGroup
+                          INSTALL_TYPES FullType DevelopmentType)
+    ENDIF ()
+    IF (_HAVE_HEADERCOMPONENT)
+      CPACK_ADD_COMPONENT(HeaderComponent
+                          DISPLAY_NAME "Headers"
+                          DESCRIPTION "C/C++ Headers\n\nProgrammers will need these files"
+                          GROUP DevelopmentGroup
+                          INSTALL_TYPES FullType DevelopmentType)
+    ENDIF ()
+    IF (_HAVE_APPLICATIONCOMPONENT)
+      CPACK_ADD_COMPONENT(ApplicationComponent
+                          DISPLAY_NAME "Applications"
+                          DESCRIPTION "Executables"
+                          GROUP RuntimeGroup
+                          INSTALL_TYPES FullType
+                          DEPENDS DynamicLibraryComponent)
+    ENDIF ()
+    #
+    # Quite subtil, but the "package" target is not visible at this time. There is a old standing bug
+    # in CMake about this.
+    # We use a custom target for package generation.
+    # In addition documentation is generated using the INSTALL(CODE xxx) hack.
+    #
+    ADD_CUSTOM_TARGET(pack
+      COMMAND ${CMAKE_MAKE_PROGRAM} package
+      COMMENT "Packaging ${PROJECT_NAME}"
+      DEPENDS man
+      VERBATIM
     )
-
+  ENDIF ()
 ENDMACRO()


Don't append additional --coverage flag for a linker since it also uses the C(XX) flags

--- cmake/SetupCoverage.cmake
+++ cmake/SetupCoverage.cmake
@@ -34,24 +34,19 @@
     return()
 endif()

+# Note: C(XX) flags are also used in linker invocation
 if(CMAKE_CXX_FLAGS_DEBUG)
     # No point to set it if it's C-only project
     set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_DEBUG} --coverage"
         CACHE STRING "Flags used by the C++ compiler during coverage builds." FORCE)
+    mark_as_advanced(CMAKE_CXX_FLAGS_COVERAGE)
 endif()
 if(CMAKE_C_FLAGS_DEBUG)
     # No point to set it if it's C++-only project
     set(CMAKE_C_FLAGS_COVERAGE "${CMAKE_C_FLAGS_DEBUG} --coverage"
         CACHE STRING "Flags used by the C compiler during coverage builds." FORCE)
+    mark_as_advanced(CMAKE_C_FLAGS_COVERAGE)
 endif()
-set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} --coverage"
-    CACHE STRING "Flags used by the shared libraries linker during coverage builds." FORCE)
-set(CMAKE_EXE_LINKER_FLAGS_COVERAGE "${CMAKE_EXE_LINKER_FLAGS_DEBUG} --coverage"
-    CACHE STRING "Flags used for linking binaries during coverage builds." FORCE)
-mark_as_advanced(CMAKE_CXX_FLAGS_COVERAGE
-                 CMAKE_C_FLAGS_COVERAGE,
-                 CMAKE_SHARED_LINKER_FLAGS_COVERAGE,
-                 CMAKE_EXE_LINKER_FLAGS_COVERAGE)

 if(CMAKE_CONFIGURATION_TYPES)
     # Add 'Coverage' build type for multi-config generators


Enable warnings for ISPC for strict build

--- cmake/compiler/ispc.cmake
+++ cmake/compiler/ispc.cmake
@@ -99,6 +99,10 @@

 macro (ispc_compile)
   set(ISPC_ADDITIONAL_ARGS "")
+  if (NOT OSPRAY_STRICT_BUILD)
+    list(APPEND ISPC_ADDITIONAL_ARGS --woff)
+  endif()
+
   set(ISPC_TARGETS ${OSPRAY_ISPC_TARGET_LIST})

   set(ISPC_TARGET_EXT ${CMAKE_CXX_OUTPUT_EXTENSION})
@@ -137,11 +141,11 @@
   string(REPLACE " " ";" ISPC_OPT_FLAGS "${ISPC_OPT_FLAGS}")

   if (NOT WIN32)
-    set(ISPC_ADDITIONAL_ARGS ${ISPC_ADDITIONAL_ARGS} --pic)
+    list(APPEND ISPC_ADDITIONAL_ARGS --pic)
   endif()

   if (NOT OSPRAY_DEBUG_BUILD)
-    set(ISPC_ADDITIONAL_ARGS ${ISPC_ADDITIONAL_ARGS} --opt=disable-assertions)
+    list(APPEND ISPC_ADDITIONAL_ARGS --opt=disable-assertions)
   endif()

   foreach(src ${ARGN})
@@ -193,7 +197,6 @@
       --addressing=${OSPRAY_ISPC_ADDRESSING}
       ${ISPC_OPT_FLAGS}
       --target=${ISPC_TARGET_ARGS}
-      --woff
       --opt=fast-math
       ${ISPC_ADDITIONAL_ARGS}
       -h ${ISPC_TARGET_DIR}/${dir}/${fname}_ispc.h


Temporarily checkout the MergeBranch of dtk.

--- cmake/externals/dtk.cmake
+++ cmake/externals/dtk.cmake
@@ -27,6 +27,7 @@
     ExternalProject_Add(dtk
       PREFIX dtk
       ${location}
+      GIT_TAG MergeBranch
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}


Fix issues around MYSQL_TCP_PORT_DEFAULT (should be really 0 all the time)

--- cmake/mysql_version.cmake
+++ cmake/mysql_version.cmake
@@ -84,7 +84,11 @@
 IF(NOT MYSQL_TCP_PORT)
   SET(MYSQL_TCP_PORT ${MYSQL_TCP_PORT_DEFAULT})
   SET(MYSQL_TCP_PORT_DEFAULT "0")
-ENDIF()
+ELSEIF(MYSQL_TCP_PORT EQUAL MYSQL_TCP_PORT_DEFAULT)
+  SET(MYSQL_TCP_PORT_DEFAULT "0")
+ENDIF()
+
+
 IF(NOT MYSQL_UNIX_ADDR)
   SET(MYSQL_UNIX_ADDR "/tmp/mysql.sock")
 ENDIF()


changed mitk data revision for new tilted test data

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -13,7 +13,7 @@

 if(BUILD_TESTING)

-  set(revision_tag 255cba29)
+  set(revision_tag a9c994aa)
   #if(${proj}_REVISION_TAG)
   #  set(revision_tag ${${proj}_REVISION_TAG})
   #endif()


look for toku_config.h

look for toku_config.h

--- cmake_modules/TokuBuildTagDatabases.cmake
+++ cmake_modules/TokuBuildTagDatabases.cmake
@@ -30,7 +30,7 @@
   db-benchmark-test/*.h
   )
 list(APPEND all_hdrs
-  ${CMAKE_CURRENT_BINARY_DIR}/toku_include/config.h
+  ${CMAKE_CURRENT_BINARY_DIR}/toku_include/toku_config.h
   ${CMAKE_CURRENT_BINARY_DIR}/buildheader/db.h
   ${CMAKE_CURRENT_BINARY_DIR}/ft/log_header.h
   )


don't build ctags if on a mac and also using etags because of the case insensitive filesystem

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

--- cmake_modules/TokuBuildTagDatabases.cmake
+++ cmake_modules/TokuBuildTagDatabases.cmake
@@ -36,7 +36,9 @@
   )

 option(USE_CTAGS "Build the ctags database." ON)
-if (USE_CTAGS)
+if (USE_CTAGS AND
+    # Macs by default are not case-sensitive, so tags and TAGS clobber each other.  Do etags and not ctags in that case, because Emacs is superior. :P
+    (NOT APPLE OR NOT USE_ETAGS))
   find_program(CTAGS "ctags")
   if (NOT CTAGS MATCHES NOTFOUND)
     add_custom_command(


Treat Boost as system includes

Treat Boost as system includes

--- cmake/VexCLBoostTargets.cmake
+++ cmake/VexCLBoostTargets.cmake
@@ -8,7 +8,7 @@
     add_library(Boost::system IMPORTED INTERFACE)
     set_target_properties(Boost::system PROPERTIES
         INTERFACE_LINK_LIBRARIES "${Boost_SYSTEM_LIBRARY}"
-        INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
+        INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
         )
 endif()

@@ -16,7 +16,7 @@
     add_library(Boost::filesystem IMPORTED INTERFACE)
     set_target_properties(Boost::filesystem PROPERTIES
         INTERFACE_LINK_LIBRARIES "${Boost_FILESYSTEM_LIBRARY};Boost::system"
-        INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
+        INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
         )
 endif()

@@ -25,7 +25,7 @@
     add_library(Boost::thread IMPORTED INTERFACE)
     set_target_properties(Boost::thread PROPERTIES
         INTERFACE_LINK_LIBRARIES "${Boost_THREAD_LIBRARY};Threads::Threads"
-        INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
+        INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
         )
 endif()

@@ -33,7 +33,7 @@
     add_library(Boost::date_time IMPORTED INTERFACE)
     set_target_properties(Boost::date_time PROPERTIES
         INTERFACE_LINK_LIBRARIES "${Boost_DATE_TIME_LIBRARY}"
-        INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
+        INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
         )
 endif()

@@ -41,6 +41,6 @@
     add_library(Boost::chrono IMPORTED INTERFACE)
     set_target_properties(Boost::chrono PROPERTIES
         INTERFACE_LINK_LIBRARIES "${Boost_CHRONO_LIBRARY}"
-        INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
+        INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
         )
 endif()


compiler-warnings: on apple, raise frame/stack usage warn to 5K

no clue why it generates so bloaty code

--- cmake/compiler-warnings.cmake
+++ cmake/compiler-warnings.cmake
@@ -28,6 +28,11 @@

 # should be < 64Kb
 math(EXPR MAX_MEANINGFUL_SIZE 4*1024)
+if(APPLE)
+  # Apple XCode seems to generate HUGE stack/frames, much bigger than anything else.
+  math(EXPR MAX_MEANINGFUL_SIZE 5*1024)
+endif()
+
 CHECK_CXX_COMPILER_FLAG_AND_ENABLE_IT(-Wframe-larger-than=${MAX_MEANINGFUL_SIZE})
 CHECK_CXX_COMPILER_FLAG_AND_ENABLE_IT(-Wstack-usage=${MAX_MEANINGFUL_SIZE})


Fixed the issue where JASP version included `-Debug` when not needed

--- Tools/CMake/JASP.cmake
+++ Tools/CMake/JASP.cmake
@@ -69,8 +69,7 @@
 endif()

 # This one is GLOBAL
-option(JASP_DEBUG "Toggle the debug flag" ON)
-if(JASP_DEBUG)
+if(CMAKE_BUILD_TYPE STREQUAL "Debug")
   add_definitions(-DJASP_DEBUG)
 endif()

@@ -89,9 +88,10 @@
 option(UPDATE_JASP_SUBMODULES
        "Whether to automatically initialize and update the submodules" OFF)

-
 message(CHECK_START "Checking for CRYPT_KEY")
-set(CRYPT_KEY "" CACHE STRING "")
+set(CRYPT_KEY
+    ""
+    CACHE STRING "")
 if(CRYPT_KEY STREQUAL "")
   set(CRYPT_KEY $ENV{ENVIRONMENT_CRYPTKEY})


fix(build): armv7 uses linuxarmv6l

fix(build): armv7 uses linuxarmv6l

--- cmake/FindOpenFrameworks.cmake
+++ cmake/FindOpenFrameworks.cmake
@@ -10,18 +10,18 @@
 # =============================================================
 #   Populate necessary variables PLATFORM and LIB_PREFIX
 # =============================================================
+set(LIB_PREFIX "lib")
 if(APPLE)
   set(PLATFORM "osx")
   set(LIB_PREFIX "")
 elseif(UNIX AND ${ARCH} STREQUAL "x86_64")
   set(PLATFORM "linux64")
-  set(LIB_PREFIX "lib")
 elseif(UNIX AND ${ARCH} STREQUAL "x86_32")
   set(PLATFORM "linux")
-  set(LIB_PREFIX "lib")
 elseif(UNIX AND ${ARCH} STREQUAL "armv6")
   set(PLATFORM "linuxarmv6l")
-  set(LIB_PREFIX "lib")
+elseif(UNIX AND ${ARCH} STREQUAL "armv7")
+  set(PLATFORM "linuxarmv6l")
 elseif(MSVC)
   set(PLATFORM "windows")
 endif()


Fix: parameters order for calling pkg_check_modules, my bad

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

--- cmake/Modules/FindOpenNI.cmake
+++ cmake/Modules/FindOpenNI.cmake
@@ -8,7 +8,7 @@
 # OPENNI_DEFINITIONS - Compiler flags for OPENNI.

 find_package(PkgConfig)
-pkg_check_modules(PC_OPENNI openni-dev QUIET)
+pkg_check_modules(PC_OPENNI QUIET openni-dev)
 set(OPENNI_DEFINITIONS ${PC_OPENNI_CFLAGS_OTHER})

 find_path(OPENNI_INCLUDE_DIR XnStatus.h


Fix CppNetlib find module

Fix CppNetlib find module

--- cmake/find/FindCppNetlib.cmake
+++ cmake/find/FindCppNetlib.cmake
@@ -102,7 +102,7 @@
         ${_find_cppnetlib_upper}
         debug
         "${${_find_cppnetlib_upper_debug}}"
-        release
+        optimized
         "${${_find_cppnetlib_upper_release}}"
     )
   elseif(${_find_cppnetlib_upper_release})


Fix the FindVulkan.cmake for the new SDK on Windows

--- cmake/modules/FindVulkan.cmake
+++ cmake/modules/FindVulkan.cmake
@@ -10,15 +10,15 @@
         "$ENV{VK_SDK_PATH}/Include")
     if (CMAKE_CL_64)
         find_library(VULKAN_LIBRARY NAMES vulkan-1 HINTS
-            "$ENV{VULKAN_SDK}/Bin"
-            "$ENV{VK_SDK_PATH}/Bin")
+            "$ENV{VULKAN_SDK}/Lib"
+            "$ENV{VK_SDK_PATH}/Lib")
         find_library(VULKAN_STATIC_LIBRARY NAMES vkstatic.1 HINTS
-            "$ENV{VULKAN_SDK}/Bin"
-            "$ENV{VK_SDK_PATH}/Bin")
+            "$ENV{VULKAN_SDK}/Lib"
+            "$ENV{VK_SDK_PATH}/Lib")
     else()
         find_library(VULKAN_LIBRARY NAMES vulkan-1 HINTS
-            "$ENV{VULKAN_SDK}/Bin32"
-            "$ENV{VK_SDK_PATH}/Bin32")
+            "$ENV{VULKAN_SDK}/Lib32"
+            "$ENV{VK_SDK_PATH}/Lib32")
     endif()
 elseif (APPLE)
     find_library(VULKAN_LIBRARY MoltenVK)


[cmake] Complain if ninja too new an CMake too old:

Apple has switched to high-resolution timing for APFS, giving mu second resolution.
Ninja supports that since 1.9.0. BUT the binutils by Apple just write out zeros,
causing wrong time stamps and causing re-build events.

CMake has worked around that by touching the library generated by Apple binutils,
to update its timestamp. That means:
On Apple (assuming Apple filesystem), with a recent Ninja, CMake has to be >= 3.14.4.

This will be toned down to a WARNING message later - but for now, until we find the
CI nodes suffering from this, keep it as a FATAL_ERROR.

--- cmake/modules/SetUpMacOS.cmake
+++ cmake/modules/SetUpMacOS.cmake
@@ -6,6 +6,26 @@

 set(ROOT_ARCHITECTURE macosx)
 set(ROOT_PLATFORM macosx)
+
+# https://gitlab.kitware.com/cmake/cmake/issues/19222
+if(CMAKE_VERSION VERSION_LESS 3.14.4)
+  if(CMAKE_GENERATOR STREQUAL "Ninja")
+    find_program(NINJAPROG ninja DOC "looking for Ninja to be used")
+    if (NINJAPROG)
+      execute_process(COMMAND ${NINJAPROG} --version
+        OUTPUT_VARIABLE NINJAVERSION
+        OUTPUT_STRIP_TRAILING_WHITESPACE
+        RESULT_VARIABLE NINJAVERSIONRES)
+      if(${NINJAVERSIONRES} EQ 0)
+        if(${NINJAVERSION} VERSION_GREATER 1.8.2)
+          message(FATAL_ERROR "You have hit https://gitlab.kitware.com/cmake/cmake/issues/19222\n"
+            "Your build will be indeterministic, i.e. unreliable for incremental builds."
+            "To fix this, please install CMake >= 3.14.4!")
+        endif()
+      endif()
+    endif()
+  endif()
+endif()

 if (CMAKE_SYSTEM_NAME MATCHES Darwin)
   EXECUTE_PROCESS(COMMAND sw_vers "-productVersion"


Add experimental Qt version

Add experimental Qt version

--- cmake/projects/Qt/hunter.cmake
+++ cmake/projects/Qt/hunter.cmake
@@ -102,6 +102,17 @@
     PACKAGE_NAME
     Qt
     VERSION
+    "5.5.1-cvpixelbuffer-2-p1"
+    URL
+    "https://github.com/hunter-packages/Qt/releases/download/v5.5.1-cvpixelbuffer-2-p1/hunter-5.5.1-cvpixelbuffer-2.7z"
+    SHA1
+    2e2b765388d365987e70e0214a7a8b1f47fe0552
+)
+
+hunter_add_version(
+    PACKAGE_NAME
+    Qt
+    VERSION
     "5.6.0-alpha"
     URL
     "http://download.qt.io/development_releases/qt/5.6/5.6.0-alpha/single/qt-everywhere-opensource-src-5.6.0-alpha.7z"


not used

not used

--- SCOREC_StandAlone.cmake
+++ SCOREC_StandAlone.cmake
@@ -31,7 +31,6 @@
     CACHE string
     "the command line flag to give process count to MPIRUN")

-option(IS_VALGRIND "Test with valgrind" OFF)
 set(VALGRIND ""
     CACHE string
     "the valgrind executable")


KAA-306: Add a license header to iOS CMake script.

--- client/client-multi/client-c/toolchains/iOS.cmake
+++ client/client-multi/client-c/toolchains/iOS.cmake
@@ -1,3 +1,19 @@
+#
+# Copyright 2014-2015 CyberVision, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 # This file is based off of the Platform/Darwin.cmake and Platform/UnixPaths.cmake
 # files which are included with CMake 2.8.4
 # It has been altered for iOS development


Fixed issue #53, improved detection of Arduino SDK (added support for new version)

--- cmake/ArduinoToolchain.cmake
+++ cmake/ArduinoToolchain.cmake
@@ -38,10 +38,21 @@
 #=============================================================================#
 if(NOT ARDUINO_SDK_PATH)
     set(ARDUINO_PATHS)
-    foreach(VERSION 22 1)
+
+    foreach(DETECT_VERSION_MAJOR 1)
+        foreach(DETECT_VERSION_MINOR RANGE 5 0)
+            list(APPEND ARDUINO_PATHS arduino-${DETECT_VERSION_MAJOR}.${DETECT_VERSION_MINOR})
+            foreach(DETECT_VERSION_PATCH  RANGE 3 0)
+                list(APPEND ARDUINO_PATHS arduino-${DETECT_VERSION_MAJOR}.${DETECT_VERSION_MINOR}.${DETECT_VERSION_PATCH})
+            endforeach()
+        endforeach()
+    endforeach()
+
+    foreach(VERSION RANGE 23 19)
         list(APPEND ARDUINO_PATHS arduino-00${VERSION})
     endforeach()

+    message("ARDUION_PATHS=${ARDUINO_PATHS}")
     file(GLOB SDK_PATH_HINTS /usr/share/arduino*
                              /opt/local/ardiuno*
                              /usr/local/share/arduino*)


FIX: Ensure cmake vars are expanded correctly so right libname is used.

--HG--
branch : v0-8

--- cmake/CEGUIFindHelpers.cmake
+++ cmake/CEGUIFindHelpers.cmake
@@ -36,7 +36,7 @@
         string(TOUPPER "${_L}" _UL)
         find_library(${_UL}_LIBRARY${_LIBS_VAR_EXT} NAMES ${_L} HINTS ${PC_${_PREFIX}_LIBDIR} ${PC_${_PREFIX}${_STATIC}_LIBRARY_DIRS} PATH_SUFFIXES ${_PATH_SUFFIXES})
         if(${_UL}_LIBRARY${_LIBS_VAR_EXT})
-            list(APPEND ${_PREFIX}_LIBRARIES${_LIBS_VAR_EXT} ${${_UL}_LIBRARY}${_LIBS_VAR_EXT})
+            list(APPEND ${_PREFIX}_LIBRARIES${_LIBS_VAR_EXT} ${${_UL}_LIBRARY${_LIBS_VAR_EXT}})
         else()
             set(${_PREFIX}_FOUND_ALL_LIBS${_LIBS_VAR_EXT} FALSE)
         endif()


CMake: Remove generated wrappers before rebuilding them. Prevents old files from polluting C# sln and breaking build.

--- cmake/Modules/UrhoSWIG.cmake
+++ cmake/Modules/UrhoSWIG.cmake
@@ -202,6 +202,7 @@
   add_custom_command(
       OUTPUT "${swig_generated_file_fullname}" ${swig_extra_generated_files}
       # Let's create the ${swig_outdir} at execution time, in case dir contains $(OutDir)
+      COMMAND ${CMAKE_COMMAND} -E remove_directory ${swig_outdir}
       COMMAND ${CMAKE_COMMAND} -E make_directory ${swig_outdir}
       COMMAND "${CMAKE_COMMAND}" -E env "SWIG_LIB=${SWIG_DIR}" "${SWIG_EXECUTABLE}"
       ARGS "-${SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG}"


cmake: fix GCC precompiled headers warnings

--- cmake/OpenCVPCHSupport.cmake
+++ cmake/OpenCVPCHSupport.cmake
@@ -196,18 +196,20 @@

     _PCH_GET_TARGET_COMPILE_FLAGS(_target_cflags ${_name} ${_pch_output_to_use} ${_dowarn})
     #MESSAGE("Add flags ${_target_cflags} to ${_targetName} " )
+    if(CMAKE_COMPILER_IS_GNUCXX)
+      set(_target_cflags "${_target_cflags} -include \"${CMAKE_CURRENT_BINARY_DIR}/${_name}\"")
+    endif()

     GET_TARGET_PROPERTY(_sources ${_targetName} SOURCES)
     FOREACH(src ${_sources})
       if(NOT "${src}" MATCHES "\\.mm$")
         get_source_file_property(_flags "${src}" COMPILE_FLAGS)
-        if(_flags)
-          set(_flags "${_flags} ${_target_cflags}")
+        get_source_file_property(_flags2 "${src}" COMPILE_DEFINITIONS)
+        if(NOT _flags AND NOT _flags2)
+          set_source_files_properties("${src}" PROPERTIES COMPILE_FLAGS "${_target_cflags}")
         else()
-          set(_flags "${_target_cflags}")
-        endif()
-
-        set_source_files_properties("${src}" PROPERTIES COMPILE_FLAGS "${_flags}")
+          #ocv_debug_message("Skip PCH, flags: ${oldProps} defines: ${oldProps2}, file: ${src}")
+        endif()
       endif()
     ENDFOREACH()

@@ -283,20 +285,6 @@
       DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${_name}"
       DEPENDS ${_targetName}_pch_dephelp
       )
-
-    get_target_property(_sources ${_targetName} SOURCES)
-    foreach(src ${_sources})
-      if(NOT "${src}" MATCHES "\\.mm$")
-        get_source_file_property(oldProps "${src}" COMPILE_FLAGS)
-        get_source_file_property(oldProps2 "${src}" COMPILE_DEFINITIONS)
-        if(NOT oldProps AND NOT oldProps2)
-          set(newProperties "-include \"${CMAKE_CURRENT_BINARY_DIR}/${_name}\"")
-          set_source_files_properties("${src}" PROPERTIES COMPILE_FLAGS "${newProperties}")
-        else()
-          ocv_debug_message("Skip PCH, flags: ${oldProps} defines: ${oldProps2}, file: ${src}")
-        endif()
-      endif()
-    endforeach()

     ADD_PRECOMPILED_HEADER_TO_TARGET(${_targetName} ${_input}  ${_output} ${_dowarn})


[cmake] when using glibc wraps, also link librt

required for clock_gettime on systems with glibc version < 2.17

--- cmake/axl_std_settings.cmake
+++ cmake/axl_std_settings.cmake
@@ -535,8 +535,8 @@

 			set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${_WRAPPER_FLAGS}")
 			set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${_WRAPPER_FLAGS}")
-			set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} -laxl_glibc")
-			set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -laxl_glibc")
+			set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} -laxl_glibc -lrt")
+			set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -laxl_glibc -lrt")
 		endif()
 	endif()


[cmake] typo fix: missin _WARNING_ part in GCC_FLAG_CPP_WARNING_DELETE_NON_VIRTUAL_DTOR

--- cmake/axl_std_settings.cmake
+++ cmake/axl_std_settings.cmake
@@ -432,7 +432,7 @@
 		)

 	axl_create_compiler_flag_setting (
-		GCC_FLAG_CPP_DELETE_NON_VIRTUAL_DTOR
+		GCC_FLAG_CPP_WARNING_DELETE_NON_VIRTUAL_DTOR
 		DESCRIPTION "Warn about calling non-virtual dtor of a class with virtual funtions"
 		"-Wdelete-non-virtual-dtor" "-Wno-delete-non-virtual-dtor"
 		)


[cmake] add -Wno-char-subscripts as default for Xcode gen

--- cmake/axl_std_settings.cmake
+++ cmake/axl_std_settings.cmake
@@ -455,6 +455,13 @@
 			)

 		axl_create_compiler_flag_setting(
+			GCC_FLAG_WARNING_CHAR_SUBSCRIPTS
+			DESCRIPTION "Warn about array subsciprts of type 'char'"
+			DEFAULT "-Wno-char-subscripts"
+			"-Wchar-subscripts" "-Wno-char-subscripts"
+			)
+
+		axl_create_compiler_flag_setting(
 			GCC_FLAG_CPP_WARNING_DELETE_NON_VIRTUAL_DTOR
 			DESCRIPTION "Warn about calling non-virtual dtor of a class with virtual funtions"
 			DEFAULT "-Wno-delete-non-virtual-dtor"


Embree's MAX_ISA=SSE4.2 is also sufficient, closes #129

--- cmake/configure_embree.cmake
+++ cmake/configure_embree.cmake
@@ -52,7 +52,7 @@
   ENDIF()
 ENDIF()

-IF (${EMBREE_MAX_ISA} STREQUAL "NONE")
+IF (EMBREE_MAX_ISA STREQUAL "NONE")
   SET(EMBREE_ISA_SUPPORTS_SSE4   ${EMBREE_ISA_SSE42})
   SET(EMBREE_ISA_SUPPORTS_AVX    ${EMBREE_ISA_AVX})
   SET(EMBREE_ISA_SUPPORTS_AVX2   ${EMBREE_ISA_AVX2})
@@ -62,17 +62,18 @@
   SET(EMBREE_ISA_SUPPORTS_AVX    FALSE)
   SET(EMBREE_ISA_SUPPORTS_AVX2   FALSE)
   SET(EMBREE_ISA_SUPPORTS_AVX512 FALSE)
-
-  IF (${EMBREE_MAX_ISA} STREQUAL "SSE4.1")
+
+
+  IF (EMBREE_MAX_ISA MATCHES "SSE4\\.[12]$")
     SET(EMBREE_ISA_SUPPORTS_SSE4 TRUE)
-  ELSEIF (${EMBREE_MAX_ISA} STREQUAL "AVX")
+  ELSEIF (EMBREE_MAX_ISA STREQUAL "AVX")
     SET(EMBREE_ISA_SUPPORTS_SSE4 TRUE)
     SET(EMBREE_ISA_SUPPORTS_AVX  TRUE)
-  ELSEIF (${EMBREE_MAX_ISA} STREQUAL "AVX2")
+  ELSEIF (EMBREE_MAX_ISA STREQUAL "AVX2")
     SET(EMBREE_ISA_SUPPORTS_SSE4 TRUE)
     SET(EMBREE_ISA_SUPPORTS_AVX  TRUE)
     SET(EMBREE_ISA_SUPPORTS_AVX2 TRUE)
-  ELSEIF (${EMBREE_MAX_ISA} STREQUAL "AVX512KNL")
+  ELSEIF (EMBREE_MAX_ISA STREQUAL "AVX512KNL")
     SET(EMBREE_ISA_SUPPORTS_SSE4   TRUE)
     SET(EMBREE_ISA_SUPPORTS_AVX    TRUE)
     SET(EMBREE_ISA_SUPPORTS_AVX2   TRUE)


Switch to https://gitlab.gnome.org/GNOME/libxml2

--- cmake/external/libxml2.cmake
+++ cmake/external/libxml2.cmake
@@ -33,7 +33,7 @@
 include (ExternalProject)
 ExternalProject_Add(${LIBXML2_TARGET}
     PREFIX ${LIBXML2_TARGET}
-    GIT_REPOSITORY https://github.com/GNOME/libxml2.git
+    GIT_REPOSITORY https://gitlab.gnome.org/GNOME/libxml2
     GIT_TAG master
     UPDATE_COMMAND ""
     CONFIGURE_COMMAND ${LIBXML2_SRC_DIR}/autogen.sh --without-python


build: style updates (NFC)

build: style updates (NFC)

Adjust the CMakeLists.txt to match the rest of the usage.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -451,20 +451,16 @@
       LIBRARY_DIR ${SWIFT_LIBRARY_OUTPUT_INTDIR})

   if(SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_APPLE_PLATFORMS)
-    set_target_properties(${name}
-      PROPERTIES
+    set_target_properties(${name} PROPERTIES
       INSTALL_NAME_DIR "@rpath")
   elseif(SWIFT_HOST_VARIANT_SDK STREQUAL LINUX)
-    set_target_properties(${name}
-      PROPERTIES
+    set_target_properties(${name} PROPERTIES
       INSTALL_RPATH "$ORIGIN:/usr/lib/swift/linux")
   elseif(SWIFT_HOST_VARIANT_SDK STREQUAL CYGWIN)
-    set_target_properties(${name}
-      PROPERTIES
+    set_target_properties(${name} PROPERTIES
       INSTALL_RPATH "$ORIGIN:/usr/lib/swift/cygwin")
   elseif(SWIFT_HOST_VARIANT_SDK STREQUAL "ANDROID")
-    set_target_properties(${name}
-      PROPERTIES
+    set_target_properties(${name} PROPERTIES
       INSTALL_RPATH "$ORIGIN")
   endif()


don't link against internal BLAS/LAPACK on linux

--- cmake/modules/FindLibR.cmake
+++ cmake/modules/FindLibR.cmake
@@ -128,25 +128,25 @@
       message(STATUS "Could not find libR shared library.")
    endif()

-   # look for lapack
-   find_library(LIBR_LAPACK_LIBRARY NAMES Rlapack
-                HINTS ${LIBR_LIB_DIR} ${LIBRARY_ARCH_HINT_PATH} ${LIBR_HOME}/bin)
-   if(LIBR_LAPACK_LIBRARY)
-      set(LIBR_LIBRARIES ${LIBR_LIBRARIES} ${LIBR_LAPACK_LIBRARY})
-      if(UNIX)
-         set(LIBR_LIBRARIES ${LIBR_LIBRARIES} gfortran)
+   if(WIN32)
+      # look for lapack
+      find_library(LIBR_LAPACK_LIBRARY NAMES Rlapack
+                   HINTS ${LIBR_LIB_DIR} ${LIBRARY_ARCH_HINT_PATH} ${LIBR_HOME}/bin)
+      if(LIBR_LAPACK_LIBRARY)
+         set(LIBR_LIBRARIES ${LIBR_LIBRARIES} ${LIBR_LAPACK_LIBRARY})
+         if(UNIX)
+            set(LIBR_LIBRARIES ${LIBR_LIBRARIES} gfortran)
+         endif()
       endif()
-   endif()

-   # look for blas
-   find_library(LIBR_BLAS_LIBRARY NAMES Rblas
-                HINTS ${LIBR_LIB_DIR} ${LIBRARY_ARCH_HINT_PATH} ${LIBR_HOME}/bin)
-   if(LIBR_BLAS_LIBRARY)
-      set(LIBR_LIBRARIES ${LIBR_LIBRARIES} ${LIBR_BLAS_LIBRARY})
-   endif()
+      # look for blas
+      find_library(LIBR_BLAS_LIBRARY NAMES Rblas
+                   HINTS ${LIBR_LIB_DIR} ${LIBRARY_ARCH_HINT_PATH} ${LIBR_HOME}/bin)
+      if(LIBR_BLAS_LIBRARY)
+         set(LIBR_LIBRARIES ${LIBR_LIBRARIES} ${LIBR_BLAS_LIBRARY})
+      endif()

-   # look for rgraphapp on win32
-   if(WIN32)
+      # look for rgraphapp
       find_library(LIBR_GRAPHAPP_LIBRARY NAMES Rgraphapp
                    HINTS ${LIBR_LIB_DIR} ${LIBRARY_ARCH_HINT_PATH} ${LIBR_HOME}/bin)
       if(LIBR_GRAPHAPP_LIBRARY)


enhance xpSetFlags

enhance xpSetFlags

issue https://github.com/smanders/externpro/issues/264#issuecomment-589385701

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -2104,8 +2104,11 @@
 endmacro()

 macro(xpSetFlags) # preprocessor, compiler, linker flags
+  xpEnforceOutOfSourceBuilds()
+  xpSetUnitTestTools()
   enable_testing()
   set_property(GLOBAL PROPERTY USE_FOLDERS ON) # enables Solution Folders
+  set_property(GLOBAL PROPERTY GLOBAL_DEPENDS_NO_CYCLES ON)
   xpCommonFlags()
   xpEnableWarnings()
   if(NOT DEFINED XP_CMAKE_REPO_INSYNC)


CMake: Fix compilation on windows

CMake: Fix compilation on windows


using global scope

using global scope

--- cmake/lib.cmake
+++ cmake/lib.cmake
@@ -66,7 +66,8 @@
 MakeIncludesLink()

-set(ETHCRYPTO_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/include ${LIBSCRYPT_INCLUDE_DIRS} ${SECP256K1_INCLUDE_DIRS} ${CRYPTOPP_INCLUDE_DIRS} ${ETHCRYPTO_CONFIG_INCLUDE_DIR} PARENT_SCOPE)
-set(ETHCRYPTO_LIBRARY ethcrypto PARENT_SCOPE)
-set(ETHCRYPTO_LIBRARIES ${ETHCRYPTO_LIBRARY} PARENT_SCOPE)
+set(ETHCRYPTO_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/include" FORCE)
+set(ETHCRYPTO_INCLUDE_DIRS ${ETHCRYPTO_INCLUDE_DIR} ${LIBSCRYPT_INCLUDE_DIRS} ${SECP256K1_INCLUDE_DIRS} ${CRYPTOPP_INCLUDE_DIRS} ${ETHCRYPTO_CONFIG_INCLUDE_DIR}  CACHE STRING "" FORCE)
+set(ETHCRYPTO_LIBRARY "ethcrypto" CACHE STRING "" FORCE)
+set(ETHCRYPTO_LIBRARIES ${ETHCRYPTO_LIBRARY}  CACHE STRING "" FORCE)


Fix syntax error (missing space in SET command),  that effectively prevents mysqld from being build with SSL.

--- cmake/ssl.cmake
+++ cmake/ssl.cmake
@@ -25,7 +25,7 @@
   SET(SSL_LIBRARIES  yassl taocrypt)
   SET(SSL_INCLUDE_DIRS ${INC_DIRS})
   SET(SSL_INTERNAL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)
-  SET(SSL_DEFINES"-DHAVE_YASSL -DYASSL_PURE_C -DYASSL_PREFIX -DHAVE_OPENSSL -DYASSL_THREAD_SAFE")
+  SET(SSL_DEFINES "-DHAVE_YASSL -DYASSL_PURE_C -DYASSL_PREFIX -DHAVE_OPENSSL -DYASSL_THREAD_SAFE")
   CHANGE_SSL_SETTINGS("bundled")
   #Remove -fno-implicit-templates
   #(yassl sources cannot  be compiled with  it)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -15,7 +15,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2012)

 # KWSys version date month component.  Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 03)
+SET(KWSYS_DATE_STAMP_MONTH 04)

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


Supress Wuffs compiler warnings

Supress Wuffs compiler warnings

--- Source/cmake_core.cmake
+++ Source/cmake_core.cmake
@@ -268,7 +268,8 @@
             " $<$<CXX_COMPILER_ID:Clang>: -Wno-missing-prototypes>"
             " $<$<NOT:$<CXX_COMPILER_ID:MSVC>>: -Wno-suggest-override>"
             " $<$<NOT:$<CXX_COMPILER_ID:MSVC>>: -Wno-used-but-marked-unused>"
-            " $<$<NOT:$<CXX_COMPILER_ID:MSVC>>: -Wno-noexcept-type>")
+            " $<$<NOT:$<CXX_COMPILER_ID:MSVC>>: -Wno-noexcept-type>"
+            " $<$<NOT:$<CXX_COMPILER_ID:MSVC>>: -Wno-comma>")

     set_source_files_properties(astcenccli_image_external.cpp
         PROPERTIES


Supress Wuffs compiler warnings

Supress Wuffs compiler warnings

--- Source/cmake_core.cmake
+++ Source/cmake_core.cmake
@@ -264,11 +264,11 @@
             " $<$<NOT:$<CXX_COMPILER_ID:MSVC>>: -Wno-implicit-fallthrough>"
             " $<$<NOT:$<CXX_COMPILER_ID:MSVC>>: -Wno-tautological-type-limit-compare>"
             " $<$<NOT:$<CXX_COMPILER_ID:MSVC>>: -Wno-cast-qual>"
-            " $<$<CXX_COMPILER_ID:Clang>: -Wno-reserved-identifier>"
-            " $<$<CXX_COMPILER_ID:Clang>: -Wno-missing-prototypes>"
-            " $<$<CXX_COMPILER_ID:Clang>: -Wno-suggest-override>"
-            " $<$<CXX_COMPILER_ID:Clang>: -Wno-used-but-marked-unused>"
-            " $<$<CXX_COMPILER_ID:Clang>: -Wno-noexcept-type>")
+            " $<$<NOT:$<CXX_COMPILER_ID:MSVC>>: -Wno-reserved-identifier>"
+            " $<$<NOT:$<CXX_COMPILER_ID:MSVC>>: -Wno-missing-prototypes>"
+            " $<$<NOT:$<CXX_COMPILER_ID:MSVC>>: -Wno-suggest-override>"
+            " $<$<NOT:$<CXX_COMPILER_ID:MSVC>>: -Wno-used-but-marked-unused>"
+            " $<$<NOT:$<CXX_COMPILER_ID:MSVC>>: -Wno-noexcept-type>")

     set_source_files_properties(astcenccli_image_external.cpp
         PROPERTIES


Synchronize adm files

Synchronize adm files

--- adm_local_without_kernel/cmake_files/SalomeMacros.cmake
+++ adm_local_without_kernel/cmake_files/SalomeMacros.cmake
@@ -292,25 +292,27 @@
   MESSAGE(STATUS "  Optional packages - Detection report ")
   MESSAGE(STATUS "  ==================================== ")
   MESSAGE(STATUS "")
-  LIST(LENGTH _SALOME_OPTIONAL_PACKAGES_names _list_len)
-  # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
-  MATH(EXPR _range "${_list_len}-1")
-  FOREACH(_idx RANGE ${_range})
-    LIST(GET _SALOME_OPTIONAL_PACKAGES_names ${_idx} _pkg_name)
-    LIST(GET _SALOME_OPTIONAL_PACKAGES_found ${_idx} _pkg_found)
-    LIST(GET _SALOME_OPTIONAL_PACKAGES_flags ${_idx} _pkg_flag)
-    SALOME_JUSTIFY_STRING(${_pkg_name} ${_length} _pkg_name)
-    IF(_pkg_found)
-      SET(_found_msg "Found")
-      SET(_flag_msg "")
-    ELSE()
-      SET(_will_fail ON)
-      SET(_found_msg "NOT Found")
-      SET(_flag_msg " - ${_pkg_flag} can be switched OFF to skip this prerequisite.")
-    ENDIF()
-
-    MESSAGE(STATUS "  * ${_pkg_name}  ->  ${_found_msg}${_flag_msg}")
-  ENDFOREACH()
+  IF(DEFINED _SALOME_OPTIONAL_PACKAGES_names)
+    LIST(LENGTH _SALOME_OPTIONAL_PACKAGES_names _list_len)
+    # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
+    MATH(EXPR _range "${_list_len}-1")
+    FOREACH(_idx RANGE ${_range})
+      LIST(GET _SALOME_OPTIONAL_PACKAGES_names ${_idx} _pkg_name)
+      LIST(GET _SALOME_OPTIONAL_PACKAGES_found ${_idx} _pkg_found)
+      LIST(GET _SALOME_OPTIONAL_PACKAGES_flags ${_idx} _pkg_flag)
+      SALOME_JUSTIFY_STRING(${_pkg_name} ${_length} _pkg_name)
+      IF(_pkg_found)
+        SET(_found_msg "Found")
+        SET(_flag_msg "")
+      ELSE()
+        SET(_will_fail ON)
+        SET(_found_msg "NOT Found")
+        SET(_flag_msg " - ${_pkg_flag} can be switched OFF to skip this prerequisite.")
+      ENDIF()
+
+      MESSAGE(STATUS "  * ${_pkg_name}  ->  ${_found_msg}${_flag_msg}")
+    ENDFOREACH()
+  ENDIF(DEFINED _SALOME_OPTIONAL_PACKAGES_names)
   MESSAGE(STATUS "")
   MESSAGE(STATUS "")


deal with CMake double expansion

deal with CMake double expansion

--- ros_middleware_implementation/cmake/get_default_ros_middleware_implementation.cmake
+++ ros_middleware_implementation/cmake/get_default_ros_middleware_implementation.cmake
@@ -10,14 +10,14 @@
 function(get_default_ros_middleware_implementation var)
   get_available_ros_middleware_implementations(middleware_implementations)

-  if("${middleware_implementations}" STREQUAL "")
+  if("${middleware_implementations} " STREQUAL " ")
     message(FATAL_ERROR "Could not find any ROS middleware implementation.")
   endif()

   # option()
-  if(NOT "${ROS_MIDDLEWARE_IMPLEMENTATION}" STREQUAL "")
+  if(NOT "${ROS_MIDDLEWARE_IMPLEMENTATION} " STREQUAL " ")
     set(middleware_implementation "${ROS_MIDDLEWARE_IMPLEMENTATION}")
-  elseif(NOT "$ENV{ROS_MIDDLEWARE_IMPLEMENTATION}" STREQUAL "")
+  elseif(NOT "$ENV{ROS_MIDDLEWARE_IMPLEMENTATION} " STREQUAL " ")
     set(middleware_implementation "$ENV{ROS_MIDDLEWARE_IMPLEMENTATION}")
   else()
     # TODO detemine "default" implementation based on the available ones


output tool used to generate Connext type support

--- rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
@@ -153,7 +153,7 @@
   --dds-interface-base-path "${_dds_idl_base_path}"
   --idl-pp "${_idl_pp}"
   DEPENDS ${target_dependencies} ${_dds_idl_files}
-  COMMENT "Generating C++ type support for RTI Connext"
+  COMMENT "Generating C++ type support for RTI Connext (using '${_idl_pp}')"
   VERBATIM
 )


COMP: Use CIP develop branch

COMP: Use CIP develop branch

after merging SlicerCIPIntegration branch of CIP repository into
develop branch which includes required changes to include CIP CLI
modules

--- SuperBuild/External_CIP.cmake
+++ SuperBuild/External_CIP.cmake
@@ -25,7 +25,7 @@
   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
     GIT_REPOSITORY "${git_protocol}://github.com/acil-bwh/ChestImagingPlatform.git"
-    GIT_TAG "79c752196385124f592776e796c918c2176b0c1f" # use SlicerCIPIntegration branch to include CLI modules
+    GIT_TAG "431ced5ba9a0553ddaece7c11b41ca8d73d41787" # use develop branch to include CLI modules
     #DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E echo "Remove this line and uncomment GIT_REPOSITORY and GIT_TAG"
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${proj}-build


Let ITK use the same HDF5 as we do (#143)

By default, ITK builds its own HDF5. This shouldn't create conflicts, but might do.
We should be fine with using our own.

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -25,7 +25,7 @@
 set(proj ITK)

 # Set dependency list
-set(${proj}_DEPENDENCIES "")
+set(${proj}_DEPENDENCIES "HDF5")

 # Include dependent projects if any
 ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${proj}_DEPENDENCIES)
@@ -67,6 +67,10 @@
       -DCMAKE_INSTALL_PREFIX=${${proj}_Install_Dir}
 	    -DBUILD_SHARED_LIBS=ON
       -DCMAKE_BUILD_TYPE=${EXTERNAL_PROJECT_BUILD_TYPE}
+      -DHDF5_ROOT=${HDF5_ROOT}
+      -DHDF5_INCLUDE_DIRS=${HDF5_INCLUDE_DIRS}
+      -DHDF5_LIBRARIES=${HDF5_LIBRARIES}
+      -DITK_USE_SYSTEM_HDF5=ON
       -DBUILD_TESTING=OFF
       -DBUILD_EXAMPLES=OFF
 	  INSTALL_DIR ${${proj}_Install_Dir}


Update to the v4.13.0 release

Update to the v4.13.0 release

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -47,7 +47,7 @@
 mark_as_advanced(ITK_GIT_REPOSITORY)
 sitk_legacy_naming(ITK_GIT_REPOSITORY ITK_REPOSITORY)

-set(ITK_GIT_TAG "v4.13rc02" CACHE STRING "Tag in ITK git repo")
+set(ITK_GIT_TAG "v4.13.0" CACHE STRING "Tag in ITK git repo")
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")


Update to the v4.13.0 release

Update to the v4.13.0 release


Update ITK Superbuild along ITKv5.1 release branch

Include update to SimpleFilters remote module, therefore the custom
tag for the remote module can be removed.

Closes #1213, but addressing a divide by zero error in ITK code.

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -22,8 +22,6 @@
 if(NOT DEFINED Module_SimpleITKFilters)
   set(Module_SimpleITKFilters ON)
 endif()
-
-set(Module_SimpleITKFilters_GIT_TAG ce51d77771a54e7e0791fadb15e50dc38cbd8358 )

 get_cmake_property( _varNames VARIABLES )

@@ -55,7 +53,7 @@
 mark_as_advanced(ITK_GIT_REPOSITORY)
 sitk_legacy_naming(ITK_GIT_REPOSITORY ITK_REPOSITORY)

-set(_DEFAULT_ITK_GIT_TAG "v5.1.1")
+set(_DEFAULT_ITK_GIT_TAG "5e598141dbf059c9490b9e438ac424cfac47f172")
 set(ITK_GIT_TAG "${_DEFAULT_ITK_GIT_TAG}" CACHE STRING "Tag in ITK git repo")
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")


modules: updated FindCorrade.cmake from Corrade repository.

--- modules/FindCorrade.cmake
+++ modules/FindCorrade.cmake
@@ -43,6 +43,7 @@
 #   (Linux, BSD, OS X)
 #  CORRADE_TARGET_APPLE         - Defined if compiled for OS X
 #  CORRADE_TARGET_WINDOWS       - Defined if compiled for Windows
+#  CORRADE_TARGET_WINDOWS_RT    - Defined if compiled for Windows RT
 #  CORRADE_TARGET_NACL          - Defined if compiled for Google Chrome
 #   Native Client
 #  CORRADE_TARGET_NACL_NEWLIB   - Defined if compiled for Google Chrome
@@ -199,6 +200,7 @@
     TARGET_UNIX
     TARGET_APPLE
     TARGET_WINDOWS
+    TARGET_WINDOWS_RT
     TARGET_NACL
     TARGET_NACL_NEWLIB
     TARGET_NACL_GLIBC


ilastik.cmake: Added a new dependency: jsonschema

--- ilastik.cmake
+++ ilastik.cmake
@@ -31,6 +31,7 @@
 include (scikit-learn)
 include (nose)
 include (faulthandler)
+include (jsonschema) # Required for the dvid extension.

 # select the desired ilastik commit
 set(DEFAULT_ILASTIK_VERSION "v1.0.2")
@@ -71,7 +72,7 @@

 set (ilastik_dependencies ${vigra_NAME} ${h5py_NAME} ${psutil_NAME} ${nose_NAME}
                             ${blist_NAME} ${greenlet_NAME} ${yapsy_NAME} ${faulthandler_NAME}
-                            ${cylemon_NAME} ${scikit-learn_NAME})
+                            ${cylemon_NAME} ${scikit-learn_NAME} ${jsonschema_NAME})

 if (${build_pgmlink})
     # Tracking depends on pgmlink, which depends on CPLEX.


Fix finding Ogre framework on OS X

Fix finding Ogre framework on OS X

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -69,7 +69,11 @@
 endif ()

-set(OGRE_LIBRARY_NAMES "OgreMain${OGRE_LIB_SUFFIX}")
+if(APPLE)
+	set(OGRE_LIBRARY_NAMES "Ogre${OGRE_LIB_SUFFIX}")
+else()
+    set(OGRE_LIBRARY_NAMES "OgreMain${OGRE_LIB_SUFFIX}")
+endif()
 get_debug_names(OGRE_LIBRARY_NAMES)

 # construct search paths from environmental hints and


[OGRE-201] Update FindOgre.cmake after OGRE-181

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -559,6 +559,7 @@
   Media
   media
   share/OGRE/media
+  share/OGRE/Media
 )

 clear_if_changed(OGRE_PREFIX_WATCH OGRE_MEDIA_DIR)


Create new MITK testing data

Create new MITK testing data

Images were rotated around wrong center, due to bug in GetCenter-method.

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

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

   ExternalProject_Add(${proj}


Set new master of MITK-data including md5sum and git hash.

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -13,14 +13,14 @@

 if(BUILD_TESTING)

-  set(revision_tag 6572126b)
+  set(revision_tag 578a7578)
   #if(${proj}_REVISION_TAG)
   #  set(revision_tag ${${proj}_REVISION_TAG})
   #endif()

   ExternalProject_Add(${proj}
     URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MITK-Data_${revision_tag}.tar.gz
-    URL_MD5 ad2a35e2902572d6ba99a5e8e129b05e
+    URL_MD5 9c9ac8cae6dd8bef2815ce25735eb20f
     UPDATE_COMMAND ""
     CONFIGURE_COMMAND ""
     BUILD_COMMAND ""


Use libaravis-0.4

Use libaravis-0.4

--- CMakeModules/FindAravis.cmake
+++ CMakeModules/FindAravis.cmake
@@ -2,10 +2,10 @@

 FIND_PATH(ARAVIS_INCLUDE_PATH arv.h
   "$ENV{ARAVIS_INCLUDE_PATH}"
-  /usr/local/include/aravis-0.2
+  /usr/local/include/aravis-0.4
 )

-FIND_LIBRARY(ARAVIS_LIBRARY aravis-0.2
+FIND_LIBRARY(ARAVIS_LIBRARY aravis-0.4
   "$ENV{ARAVIS_LIBRARY}"
   /usr/local/lib
 )
@@ -13,3 +13,4 @@
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(ARAVIS DEFAULT_MSG
   ARAVIS_INCLUDE_PATH
   ARAVIS_LIBRARY)
+


find python libs on Windows

find python libs on Windows

--- CMakeModules/FindPython.cmake
+++ CMakeModules/FindPython.cmake
@@ -53,8 +53,10 @@
     "import sys; print '%d.%d' % (sys.version_info[0],sys.version_info[1])"
     OUTPUT_VARIABLE PYTHON_VERSION
     OUTPUT_STRIP_TRAILING_WHITESPACE)
+string(REPLACE "." "" PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})

-find_library(PYTHON_LIBRARIES "python${PYTHON_VERSION}"
+find_library(PYTHON_LIBRARIES
+    NAMES "python${PYTHON_VERSION_NO_DOTS}" "python${PYTHON_VERSION}"
     PATHS
         "${PYTHON_PREFIX}/lib"
         [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${PYTHON_VERSION}\\InstallPath]/libs


MDEV-12473 - fix rocksdb linking error

MDEV-12473 - fix rocksdb linking error

link rocksdb with librt, for clock_gettime()

--- storage/rocksdb/build_rocksdb.cmake
+++ storage/rocksdb/build_rocksdb.cmake
@@ -132,7 +132,7 @@
 if(WIN32)
   set(SYSTEM_LIBS ${SYSTEM_LIBS} Shlwapi.lib Rpcrt4.lib)
 else()
-  set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT})
+  set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT} ${LIBRT})
 endif()

 set(ROCKSDB_LIBS rocksdblib})


[numerics] change a passing test from WILL_FAIL to pass (WITH_MUMPS)

--- numerics/numerics_tests.cmake
+++ numerics/numerics_tests.cmake
@@ -356,9 +356,7 @@
   SET(fc3d__ADMM_Tol_1e-5_Max_10000_inTol_0_inMax_0_Capsules-i122-1617_PROPERTIES WILL_FAIL TRUE)
   SET(fc3d__ADMM_Tol_1e-5_Max_10000_inTol_0_inMax_0_IPARAM_SICONOS_FRICTION_3D_ADMM_RHO_STRATEGY_CONSTANT_Confeti-ex13-Fc3D-SBM_PROPERTIES WILL_FAIL TRUE)

-  IF(WITH_MUMPS)
-    SET(fc3d__NSN_AC_Tol_1e-5_Max_1000_inTol_0_inMax_0_IPARAM_1_Capsules-i100-1090_PROPERTIES WILL_FAIL TRUE)
-  ELSE()
+  IF(NOT WITH_MUMPS)
     SET(fc3d__NSN_AC_TEST_Tol_1e-5_Max_1000_inTol_0_inMax_0_IPARAM_1_Capsules-i100-1090_PROPERTIES WILL_FAIL TRUE)
     SET(fc3d__NSN_AC_TEST_Tol_1e-3_Max_1000_inTol_0_inMax_0_Capsules-i100-1090_PROPERTIES WILL_FAIL TRUE)
     SET(fc3d__NSN_AC_TEST_Tol_1e-5_Max_1000_inTol_0_inMax_0_IPARAM_1_Capsules-i100-889_PROPERTIES WILL_FAIL TRUE)


cpu.cmake: improve webp_check_compiler_flag output

WEBP_HAVE_FLAG_LOCAL -> WEBP_HAVE_FLAG_${WEBP_SIMD_FLAG} this will
include the flag being tested in the output:
-- Performing Test WEBP_HAVE_FLAG_NEON

Change-Id: I1c0a143a857b16e4eb1fcf8b23c176380a5fef29
(cherry picked from commit ee1057e3b133afe95d904e68166744dad2a0a3d0)

--- cmake/cpu.cmake
+++ cmake/cpu.cmake
@@ -1,7 +1,7 @@
 ## Check for SIMD extensions.

 function(webp_check_compiler_flag WEBP_SIMD_FLAG)
-  unset(WEBP_HAVE_FLAG_LOCAL CACHE)
+  unset(WEBP_HAVE_FLAG_${WEBP_SIMD_FLAG} CACHE)
   check_c_source_compiles("
       #include \"${CMAKE_CURRENT_LIST_DIR}/../src/dsp/dsp.h\"
       int main(void) {
@@ -10,9 +10,9 @@
         #endif
         return 0;
       }
-    " WEBP_HAVE_FLAG_LOCAL
+    " WEBP_HAVE_FLAG_${WEBP_SIMD_FLAG}
   )
-  if(WEBP_HAVE_FLAG_LOCAL)
+  if(WEBP_HAVE_FLAG_${WEBP_SIMD_FLAG})
     set(WEBP_HAVE_${WEBP_SIMD_FLAG} 1 PARENT_SCOPE)
   else()
     set(WEBP_HAVE_${WEBP_SIMD_FLAG} 0 PARENT_SCOPE)


suppress FPHSA name mismatch for empy (#1093)

--- cmake/empy.cmake
+++ cmake/empy.cmake
@@ -17,6 +17,7 @@
     endif(NOT _${module}_status)
   endif(NOT PY_${module_upper})
   include(FindPackageHandleStandardArgs)
+  set(FPHSA_NAME_MISMATCHED TRUE)
   find_package_handle_standard_args(PY_${module} DEFAULT_MSG PY_${module_upper})
 endfunction(find_python_module)


cmake(java): Fixup

cmake(java): Fixup


i#1955: suppress CMP0058 cmake warning

i#1955: suppress CMP0058 cmake warning

Suppresses the CMP0058 warning from cmake 3.3+ until we fix it properly.

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

--- make/policies.cmake
+++ make/policies.cmake
@@ -1,5 +1,5 @@
 # **********************************************************
-# Copyright (c) 2014-2015 Google, Inc.    All rights reserved.
+# Copyright (c) 2014-2016 Google, Inc.    All rights reserved.
 # **********************************************************

 # Redistribution and use in source and binary forms, with or without
@@ -27,6 +27,12 @@
 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 # DAMAGE.
+
+if ("${CMAKE_VERSION}" VERSION_EQUAL "3.3" OR
+    "${CMAKE_VERSION}" VERSION_GREATER "3.3")
+  # XXX i#1955: update our code to satisfy the changes in 3.3
+  cmake_policy(SET CMP0058 OLD)
+endif ()

 if ("${CMAKE_VERSION}" VERSION_EQUAL "3.1" OR
     "${CMAKE_VERSION}" VERSION_GREATER "3.1")


Make AMENT_RUN_PERFORMANCE_TESTS a CMake option (#280)

Signed-off-by: Scott K Logan <8c724d14625be4be480086a9212b212477a303ef@cottsay.net>

--- ament_cmake_google_benchmark/ament_cmake_google_benchmark-extras.cmake
+++ ament_cmake_google_benchmark/ament_cmake_google_benchmark-extras.cmake
@@ -15,6 +15,9 @@
 macro(_ament_cmake_google_benchmark_find_benchmark)
   if(NOT DEFINED _AMENT_CMAKE_GOOGLE_BENCHMARK_FIND_BENCHMARK)
     set(_AMENT_CMAKE_GOOGLE_BENCHMARK_FIND_BENCHMARK TRUE)
+
+    option(AMENT_RUN_PERFORMANCE_TESTS
+      "Enable performance tests instead of unconditionally skipping them" OFF)

     find_package(benchmark QUIET)


fix comment

fix comment

--- ios-nocodesign-10-1-arm64-dep-9-0-device-libcxx-hid-sections-lto.cmake
+++ ios-nocodesign-10-1-arm64-dep-9-0-device-libcxx-hid-sections-lto.cmake
@@ -17,7 +17,7 @@
 set(POLLY_XCODE_COMPILER "clang")

 polly_init(
-    "iOS ${IOS_SDK_VERSION} / Universal (arm64 armv7s armv7) / \
+    "iOS ${IOS_SDK_VERSION} / Universal (arm64) / \
 Deployment ${IOS_DEPLOYMENT_SDK_VERSION} / \
 ${POLLY_XCODE_COMPILER} / \
 No code sign / \


Add proper include search path to iOS SimpleApp

--- test/platforms/HalideAppTests.cmake
+++ test/platforms/HalideAppTests.cmake
@@ -239,6 +239,7 @@
   target_include_directories(${args_TARGET} PUBLIC
     ${HALIDE_INCLUDE_PATH}
     ${out_dir}
+    "${CMAKE_CURRENT_SOURCE_DIR}/.."
     )

 endfunction(halide_add_ios_app)


- Fixed build

- Fixed build

--- modules.cmake
+++ modules.cmake
@@ -10,13 +10,13 @@
 clever_add_module(std_date       ON  "enable the date module"       "")
 clever_add_module(std_concurrent ON  "enable the concurrent module" "")
 clever_add_module(std_regex      ON  "enable the regex module"      "")
-#clever_add_module(std_ffi        OFF "enable the ffi module"        "")
-#clever_add_module(std_rpc        ON  "enable the rpc module"        "")
+clever_add_module(std_ffi        OFF "enable the ffi module"        "")
+clever_add_module(std_rpc        OFF  "enable the rpc module"        "")
 clever_add_module(std_net        ON  "enable the net module"        "")
 clever_add_module(std_unicode    ON  "enable the unicode module"    "")
 clever_add_module(std_fcgi    	 OFF "enable the fcgi module"       "")
-#clever_add_module(web_request    OFF "enable the request module"    "")
-#clever_add_module(web_session    OFF "enable the session module"    "")
+clever_add_module(web_request    OFF "enable the request module"    "")
+clever_add_module(web_session    OFF "enable the session module"    "")

 # Simple modules
 clever_add_simple_module(std_file       ON  "enable the file module"       "")


lua: use 5.4 when available, fixes errors on fedora 33

--- scripts/cmake/Modules/FindLua.cmake
+++ scripts/cmake/Modules/FindLua.cmake
@@ -56,7 +56,7 @@

 # this is a function only to have all the variables inside go away automatically
 function (set_lua_version_vars)
-	set (LUA_VERSIONS5 5.3 5.2 5.1 5.0)
+	set (LUA_VERSIONS5 5.4 5.3 5.2 5.1 5.0)

 	if (Lua_FIND_VERSION_EXACT)
 		if (Lua_FIND_VERSION_COUNT GREATER 1)


fix: install copies wrongly named pdb file

include debug postfix when installing pdb file under win/msvc

--- CommonLibrary.cmake
+++ CommonLibrary.cmake
@@ -192,7 +192,7 @@
   endforeach()

   if(MSVC AND "${${NAME}_LIBRARY_TYPE}" MATCHES "SHARED")
-    install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/${Name}.pdb
+    install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/${Name}${CMAKE_DEBUG_POSTFIX}.pdb
       DESTINATION bin COMPONENT lib CONFIGURATIONS Debug)
     install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/RelWithDebInfo/${Name}.pdb
       DESTINATION bin COMPONENT lib CONFIGURATIONS RelWithDebInfo)


CR #115

CR #115

--- CommonLibrary.cmake
+++ CommonLibrary.cmake
@@ -9,8 +9,7 @@
 # * NAME_PUBLIC_HEADERS for public, installed header files
 # * NAME_LINK_LIBRARIES for dependencies of name
 # * NAME_LIBRARY_TYPE for setting shared or static library
-# * PROJECT_INCLUDE_NAME or lower case input Name for the include directory
-#   and single include header.
+# * PROJECT_INCLUDE_NAME for the include directory and project include header
 # * VERSION for the API version
 # * VERSION_ABI for the ABI version
 #


Removed redundant -ansi and -pedantic compiler flags.

--- cmake/ConfigureCompiler.cmake
+++ cmake/ConfigureCompiler.cmake
@@ -135,7 +135,7 @@
   # set GNU Compiler Collection flags
   if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
     set(CONFIGURE_COMPILER_SET_C_COMPILER_FLAGS ON)
-    set(CMAKE_C_FLAGS "-ansi -pedantic -Wall -Wextra -fmessage-length=100 -std=c99"
+    set(CMAKE_C_FLAGS "-pedantic -Wall -Wextra -fmessage-length=100 -std=c99"
                       CACHE STRING "Flags used by the compiler during all build types." FORCE)
     set(CMAKE_C_FLAGS_DEBUG "-DDEBUG -O0 -g"
                       CACHE STRING "Flags used by the compiler during debug builds." FORCE)
@@ -156,7 +156,7 @@
     else()
       set(CMAKE_CXX_FLAGS "-std=c++11")
     endif()
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ansi -pedantic -Wall -Wextra -Wno-long-long -fmessage-length=100"
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Wno-long-long -fmessage-length=100"
                         CACHE STRING "Flags used by the compiler during all build types." FORCE)
     set(CMAKE_CXX_FLAGS_DEBUG "-DDEBUG -O0 -g"
                         CACHE STRING "Flags used by the compiler during debug builds." FORCE)


Fix documentation in FindGtest.cmake

Fix documentation in FindGtest.cmake

thanks to Jose Luis Rivero in debian-science@.

--- cmake/Modules/FindGtest.cmake
+++ cmake/Modules/FindGtest.cmake
@@ -4,7 +4,7 @@
 # This sets the following variables:
 # GTEST_FOUND - True if GTest was found.
 # GTEST_INCLUDE_DIRS - Directories containing the GTest include files.
-# GTEST_SRC - Directories containing the GTest source files.
+# GTEST_SRC_DIR - Directories containing the GTest source files.

 if(CMAKE_SYSTEM_NAME STREQUAL Linux)
     set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} /usr /usr/local)


Fix case-sensivity issue with C++ flags

Fix case-sensivity issue with C++ flags

In some cases this causes the flags not to be used when building NaCl
binaries.

--- cmake/DaemonFlags.cmake
+++ cmake/DaemonFlags.cmake
@@ -157,10 +157,10 @@
     set_c_cxx_flag("-stdlib=libc++")
     set_c_cxx_flag("--pnacl-allow-exceptions")

-    set_c_cxx_flag("-Os -DNDEBUG"       MinSizeRel)
-    set_c_cxx_flag("-O3 -DNDEBUG"       Release)
-    set_c_cxx_flag("-O2 -DNDEBUG -g3"   RelWithDebInfo)
-    set_c_cxx_flag("-O0          -g3"   Debug)
+    set_c_cxx_flag("-Os -DNDEBUG"       MINSIZEREL)
+    set_c_cxx_flag("-O3 -DNDEBUG"       RELEASE)
+    set_c_cxx_flag("-O2 -DNDEBUG -g3"   RELWITHDEBINFO)
+    set_c_cxx_flag("-O0          -g3"   DEBUG)
 else()
     set_c_cxx_flag("-ffast-math")
     set_c_cxx_flag("-fno-strict-aliasing")


Fix: -DUSE_SYSTEM_MBEDTLS_LIBS=ON - undefined reference (#898)

--- cmake/Findmbedtls.cmake
+++ cmake/Findmbedtls.cmake
@@ -5,6 +5,7 @@
 find_library(MBEDTLS_CRYPTO_LIBRARY mbedcrypto)

 set(MBEDTLS_LIBRARIES ${MBEDTLS_SSL_LIBRARY} ${MBEDTLS_X509_LIBRARY} ${MBEDTLS_CRYPTO_LIBRARY})
+set(MBEDTLS_LIBRARIES ${MBEDTLS_LIBRARIES} PARENT_SCOPE)

 if (MBEDTLS_INCLUDE_DIR AND EXISTS "${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h")
     file(STRINGS "${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h" _MBEDTLS_VERSION_STRING REGEX "^#[\t ]*define[\t ]+MBEDTLS_VERSION_STRING[\t ]+\"[0-9]+.[0-9]+.[0-9]+\"")
@@ -12,14 +13,17 @@
 endif ()

 if (MBEDTLS_INCLUDE_DIR AND MBEDTLS_LIBRARIES AND MBEDTLS_VERSION)
-            find_package_handle_standard_args(mbedtls
-                REQUIRED_VARS
-                        MBEDTLS_INCLUDE_DIR
-                        MBEDTLS_LIBRARIES
-                VERSION_VAR
-                        MBEDTLS_VERSION
-            )

-        mark_as_advanced (MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARIES MBEDTLS_SSL_LIBRARY MBEDTLS_X509_LIBRARY MBEDTLS_CRYPTO_LIBRARY)
+    include(FindPackageHandleStandardArgs)
+
+    find_package_handle_standard_args(mbedtls
+        REQUIRED_VARS
+                MBEDTLS_INCLUDE_DIR
+                MBEDTLS_LIBRARIES
+        VERSION_VAR
+                MBEDTLS_VERSION
+    )
+
+    mark_as_advanced (MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARIES MBEDTLS_SSL_LIBRARY MBEDTLS_X509_LIBRARY MBEDTLS_CRYPTO_LIBRARY)

 endif (MBEDTLS_INCLUDE_DIR AND MBEDTLS_LIBRARIES AND MBEDTLS_VERSION)


set required flag to boost

set required flag to boost

--- cmake/ImportBoost.cmake
+++ cmake/ImportBoost.cmake
@@ -1,4 +1,4 @@
-find_package(Boost)
+find_package(Boost REQUIRED)
 mark_as_advanced(Boost_DIR)
 if(Boost_FOUND)
   set(HAVE_SYSTEM_BOOST TRUE)


Create tbag_modules__strip_regex_to_string() cmake macro.

--- cmake/TbagModules.cmake
+++ cmake/TbagModules.cmake
@@ -319,7 +319,34 @@
                                      "-DREGEX=${__regex}"
                                      -P "${TBAG_SCRIPT_DIR}/TbagStripRegex.cmake"
             DEPENDS ${__source_path}
-            COMMENT "Data to String: ${__output_path}" VERBATIM)
+            COMMENT "Strip regex: ${__output_path}" VERBATIM)
+    add_custom_target (${__target} SOURCES "${__output_path}")
+    list (APPEND TBAG_PROJECT_DEPENDENCIES ${__target})
+endmacro ()
+
+#/// StripRegex and Data2String.
+#///
+#/// @param __target      [in] Target name.
+#/// @param __output_path [in] Output file path.
+#/// @param __name        [in] Variable name.
+#/// @param __source_path [in] Source file path.
+#/// @param __regex       [in] Remove regex.
+#/// @param __hex_mode    [in] Hex mode (ON/OFF)
+macro (tbag_modules__strip_regex_to_string __target __output_path __name __source_path __regex __hex_mode)
+    set (__strip_output_temp_path "${CMAKE_BINARY_DIR}/${__target}.strip")
+    add_custom_command (
+            OUTPUT  "${__strip_output_temp_path}" "${__output_path}"
+            COMMAND ${CMAKE_COMMAND} "-DOUTPUT_PATH=${__strip_output_temp_path}"
+                                     "-DSOURCE_PATH=${__source_path}"
+                                     "-DREGEX=${__regex}"
+                                     -P "${TBAG_SCRIPT_DIR}/TbagStripRegex.cmake"
+            COMMAND ${CMAKE_COMMAND} "-DOUTPUT_PATH=${__output_path}"
+                                     "-DNAME=${__name}"
+                                     "-DSOURCE_PATH=${__strip_output_temp_path}"
+                                     "-DHEX_MODE=${__hex_mode}"
+                                     -P "${TBAG_SCRIPT_DIR}/TbagData2String.cmake"
+            DEPENDS ${__source_path}
+            COMMENT "StripRegex -> Data2String: ${__output_path}" VERBATIM)
     add_custom_target (${__target} SOURCES "${__output_path}")
     list (APPEND TBAG_PROJECT_DEPENDENCIES ${__target})
 endmacro ()


Trivial commit.

Trivial commit.

--- cmake/TbagModules.cmake
+++ cmake/TbagModules.cmake
@@ -489,6 +489,7 @@
     list (APPEND TBAG_PROJECT_INCLUDE_DIRS ${Tbag_INCLUDE_DIRS})
     list (APPEND TBAG_PROJECT_LDFLAGS      ${Tbag_LIBRARIES})
     if (Tbag_IS_STATIC)
+        tbag_debug (tbag_modules__apply_tbag "Found static tbag library.")
         list (APPEND TBAG_PROJECT_DEFINITIONS TBAG_STATIC_API)
     endif ()
 endmacro ()


CMake: fixed typo

CMake: fixed typo

--- cmake/globalutils.cmake
+++ cmake/globalutils.cmake
@@ -810,7 +810,7 @@

 #--------------------------------------------------------------------
 # Get target properties recursively by following all INTERFACE_LINK_LIBRARIES
-function(ivw_get_target_property_recursive relval target property)
+function(ivw_get_target_property_recursive retval target property)
     set(res "")
     get_target_property(target_type ${target} TYPE)
     if(NOT ${target_type} STREQUAL "INTERFACE_LIBRARY")
@@ -828,5 +828,5 @@
         endforeach(t)
     endif()
     list(REMOVE_DUPLICATES res)
-    set(${relval} ${res} PARENT_SCOPE)
-endfunction()+    set(${retval} ${res} PARENT_SCOPE)
+endfunction()


Specify rpath for pdf device driver.

Specify rpath for pdf device driver.

svn path=/trunk/; revision=10581

--- cmake/modules/pdf.cmake
+++ cmake/modules/pdf.cmake
@@ -24,6 +24,7 @@
 # pdf_COMPILE_FLAGS	  - individual COMPILE_FLAGS required to compile pdf
 # 			    device.
 # pdf_LINK_FLAGS	  - individual LINK_FLAGS for dynamic pdf device.
+# pdf_RPATH               - RPATH directory list for pdf device driver.
 # DRIVERS_LINK_FLAGS	  - list of LINK_FLAGS for all static devices.

 if(PLD_pdf)
@@ -37,6 +38,7 @@
       set(pdf_COMPILE_FLAGS "-I${hpdf_INCLUDE_DIRS}")
     endif(WIN32)
     set(pdf_LINK_FLAGS "${hpdf_LIBRARIES}")
+    set(pdf_RPATH ${hpdf_LIBRARY_DIRS})
     set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${pdf_LINK_FLAGS})
   else(hpdf_FOUND)
     message(STATUS "Looking for haru pdf header and library - not found")
@@ -44,4 +46,3 @@
     set(PLD_pdf OFF CACHE BOOL "Enable pdf device" FORCE)
   endif(hpdf_FOUND)
 endif(PLD_pdf)
-


Defining HPDF_SHARED breaks the Linux build of pdf.so using libharu-2.1.0
because in that case certain needed typedefs such as HPDF_fontdef are not
defined. Therefore remove -DHPDF_SHARED from the compiler flags for at least
the non-Windows build case.  The Windows build case still needs testing.

svn path=/trunk/; revision=10257

--- cmake/modules/pdf.cmake
+++ cmake/modules/pdf.cmake
@@ -33,8 +33,15 @@
     message(STATUS "Looking for haru pdf header and library - found")
     if(WIN32)
       set(pdf_COMPILE_FLAGS "-I${hpdf_INCLUDE_DIRS} -DHPDF_DLL")
+    elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+      # -DHPDF_SHARED really screws up a Linux build of the pdf device driver.
+      # I noticed the Linux build of libharu had no HPDF_ macros defined so
+      # don't set any here, and that seems to work.
+      set(pdf_COMPILE_FLAGS "-I${hpdf_INCLUDE_DIRS}")
     else(WIN32)
-      set(pdf_COMPILE_FLAGS "-I${hpdf_INCLUDE_DIRS} -DHPDF_SHARED")
+      # Guess no HPDF_ macros should be defined for platforms other than
+      # Windows or Linux.
+      set(pdf_COMPILE_FLAGS "-I${hpdf_INCLUDE_DIRS}")
     endif(WIN32)
     set(pdf_LINK_FLAGS "${hpdf_LIBRARIES}")
     set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${pdf_LINK_FLAGS})


Require MPI-3.0 or newer

Require MPI-3.0 or newer

MPI standard version 3.0 deprecates the C++ interface but
introduces, among other things, a few new predefined datatypes.

MPI datatype	                C++ datatype
============                    ============
MPI_CXX_BOOL	                bool
MPI_CXX_FLOAT_COMPLEX	        std::complex<float>
MPI_CXX_DOUBLE_COMPLEX	        std::complex<double>
MPI_CXX_LONG_DOUBLE_COMPLEX     std::complex<long double>

MPI-3.0 is supported by OpenMPI since version 1.8 (Mar 2014) and by
MPICH and its derivatives since version 3.0.0 (Dec 2012).

--- cmake/CommonDefs.cmake
+++ cmake/CommonDefs.cmake
@@ -173,7 +173,7 @@
 endmacro(add_prog)

 macro(add_mpi)
-    find_package (MPI)
+    find_package (MPI 3.0)
     message(STATUS "MPI includes: " ${MPI_CXX_INCLUDE_PATH} )
     message(STATUS "MPI CXX libs: " ${MPI_CXX_LIBRARIES} )
     message(STATUS "MPI definitions : " ${MPI_CXX_COMPILE_FLAGS} ${MPI_C_COMPILE_FLAGS})