Remove Linux/Windows bundling logic

Remove Linux/Windows bundling logic

I didn't copy the python files for those OSes anyway, so these don't do
anything.

--- cmake/SuperbuildInstallMacros.cmake
+++ cmake/SuperbuildInstallMacros.cmake
@@ -15,349 +15,6 @@
       "to create packages on Linux and Windows.")
   endif ()
 endif ()
-
-# TODO: The functions in this file should be grouped and made OS-agnostic.
-#       Keyword arguments should be used more and be uniform across all
-#       platforms.
-
-# =======================================================================
-# Linux
-# =======================================================================
-
-# INTERNAL
-# Install a binary and its required libraries to a location.
-#
-# _superbuild_unix_install_binary(
-#   LIBDIR <libdir>
-#   BINARY <path>
-#   TYPE <module|executable>
-#   [CLEAN]
-#   [DESTINATION <destination>]
-#   [LOCATION <location>]
-#   [INCLUDE_REGEXES <include-regex>...]
-#   [EXCLUDE_REGEXES <exclude-regex>...]
-#   [LOADER_PATHS <loader-paths>...]
-#   [SEARCH_DIRECTORIES <search-directory>...])
-function (_superbuild_unix_install_binary)
-  set(options
-    CLEAN)
-  set(values
-    DESTINATION
-    LIBDIR
-    LOCATION
-    BINARY
-    TYPE)
-  set(multivalues
-    INCLUDE_REGEXES
-    EXCLUDE_REGEXES
-    LOADER_PATHS
-    SEARCH_DIRECTORIES)
-  cmake_parse_arguments(_install_binary "${options}" "${values}" "${multivalues}" ${ARGN})
-
-  if (NOT _install_binary_BINARY)
-    message(FATAL_ERROR "Cannot install a binary without a path.")
-  endif ()
-
-  if (NOT IS_ABSOLUTE "${_install_binary_BINARY}")
-    message(FATAL_ERROR "Cannot install a binary without an absolute path (${_install_binary_BINARY}).")
-  endif ()
-
-  if (NOT _install_binary_DESTINATION)
-    set(_install_binary_DESTINATION
-      "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}")
-  endif ()
-
-  if (NOT _install_binary_LIBDIR)
-    message(FATAL_ERROR "Cannot install ${_install_binary_BINARY} without knowing where to put dependent libraries.")
-  endif ()
-
-  if (NOT _install_binary_TYPE)
-    message(FATAL_ERROR "Cannot install ${_install_binary_BINARY} without knowing its type.")
-  endif ()
-
-  if (_install_binary_TYPE STREQUAL "module" AND NOT _install_binary_LOCATION)
-    message(FATAL_ERROR "Cannot install ${_install_binary_BINARY} as a module without knowing where to place it.")
-  endif ()
-
-  set(fixup_bundle_arguments)
-  set(fixup_bundle_arguments
-    "${fixup_bundle_arguments} --destination ${_install_binary_DESTINATION}")
-  set(fixup_bundle_arguments
-    "${fixup_bundle_arguments} --type ${_install_binary_TYPE}")
-  set(fixup_bundle_arguments
-    "${fixup_bundle_arguments} --libdir ${_install_binary_LIBDIR}")
-
-  get_property(superbuild_has_cleaned GLOBAL PROPERTY
-    superbuild_has_cleaned)
-  if (_install_binary_CLEAN OR NOT superbuild_has_cleaned)
-    set_property(GLOBAL PROPERTY
-      superbuild_has_cleaned TRUE)
-    if (superbuild_is_install_target)
-      set(fixup_bundle_arguments
-        "${fixup_bundle_arguments} --new")
-    else ()
-      set(fixup_bundle_arguments
-        "${fixup_bundle_arguments} --clean --new")
-    endif ()
-  endif ()
-
-  if (_install_binary_LOCATION)
-    set(fixup_bundle_arguments
-      "${fixup_bundle_arguments} --location \"${_install_binary_LOCATION}\"")
-  endif ()
-
-  foreach (include_regex IN LISTS _install_binary_INCLUDE_REGEXES)
-    set(fixup_bundle_arguments
-      "${fixup_bundle_arguments} --include \"${include_regex}\"")
-  endforeach ()
-
-  foreach (exclude_regex IN LISTS _install_binary_EXCLUDE_REGEXES)
-    set(fixup_bundle_arguments
-      "${fixup_bundle_arguments} --exclude \"${exclude_regex}\"")
-  endforeach ()
-
-  foreach (loader_path IN LISTS _install_binary_LOADER_PATHS)
-    set(fixup_bundle_arguments
-      "${fixup_bundle_arguments} --loader-path \"${loader_path}\"")
-  endforeach ()
-
-  foreach (search_directory IN LISTS _install_binary_SEARCH_DIRECTORIES)
-    set(fixup_bundle_arguments
-      "${fixup_bundle_arguments} --search \"${search_directory}\"")
-  endforeach ()
-
-  install(CODE
-    "execute_process(
-      COMMAND \"${superbuild_python_executable}\"
-              \"${_superbuild_install_cmake_dir}/scripts/fixup_bundle.unix.py\"
-              ${fixup_bundle_arguments}
-              --manifest    \"${CMAKE_BINARY_DIR}/install.manifest\"
-              --source      \"${superbuild_install_location}\"
-              \"${_install_binary_BINARY}\"
-      RESULT_VARIABLE res
-      ERROR_VARIABLE  err)
-
-    if (res)
-      message(FATAL_ERROR \"Failed to install ${name}:\n\${err}\")
-    endif ()"
-    COMPONENT superbuild)
-endfunction ()
-
-function (_superbuild_unix_install_executable path libdir)
-  _superbuild_unix_install_binary(
-    BINARY      "${path}"
-    LIBDIR      "${libdir}"
-    TYPE        executable
-    ${ARGN})
-endfunction ()
-
-function (_superbuild_unix_install_module path subdir libdir)
-  _superbuild_unix_install_binary(
-    BINARY      "${path}"
-    LOCATION    "${subdir}"
-    LIBDIR      "${libdir}"
-    TYPE        module
-    ${ARGN})
-endfunction ()
-
-# Install a "forward executable" from the installation tree to the package.
-#
-# Usage:
-#
-#   superbuild_unix_install_program_fwd(<name> <library-paths>
-#     [INCLUDE_REGEXES <include-regex>...]
-#     [EXCLUDE_REGEXES <exclude-regex>...]
-#     [SEARCH_DIRECTORIES <search-directory>...])
-#
-# Note that this installs a program which was created using the KWSys forward
-# executable mechanisms. For "regular" binaries, see
-# ``superbuild_unix_install_program``.
-#
-# Installs a binary named ``<name>`` to the package. The ``<library-paths>`` is
-# a list of directories to search for the real binary and its libraries.
-# Relative paths are taken to be relative to the install directory. The
-# libraries are installed to the subdirectory the actual executable is found
-# in.
-#
-# The ``INCLUDE_REGEXES`` and ``EXCLUDE_REGEXES`` arguments may be used to
-# include or exclude found paths from being installed to the package. They are
-# Python regular expressions. ``SEARCH_DIRECTORIES`` is a list of directories
-# to search for dependent libraries.
-function (superbuild_unix_install_program_fwd name paths)
-  set(found FALSE)
-  foreach (path IN LISTS paths)
-    if (EXISTS "${superbuild_install_location}/${path}/${name}")
-      _superbuild_unix_install_module("${superbuild_install_location}/${path}/${name}" "${path}" "${path}" ${ARGN})
-      set(found TRUE)
-      break ()
-    endif ()
-  endforeach ()
-
-  if (NOT found)
-    message(FATAL_ERROR "Unable to find the actual executable for ${name}")
-  endif ()
-
-  _superbuild_unix_install_executable("${superbuild_install_location}/bin/${name}" "lib")
-endfunction ()
-
-# Install a program from the installation tree to the package.
-#
-# Usage:
-#
-#   superbuild_unix_install_program(<path> <libdir>
-#     [INCLUDE_REGEXES <include-regex>...]
-#     [EXCLUDE_REGEXES <exclude-regex>...]
-#     [SEARCH_DIRECTORIES <search-directory>...])
-#
-# Installs a program ``<name>`` into ``bin/`` and its dependent libraies into
-# ``<libdir>``.
-#
-# The ``INCLUDE_REGEXES`` and ``EXCLUDE_REGEXES`` arguments may be used to
-# include or exclude found paths from being installed to the package. They are
-# Python regular expressions. ``SEARCH_DIRECTORIES`` is a list of directories
-# to search for dependent libraries.
-function (superbuild_unix_install_program name libdir)
-  _superbuild_unix_install_executable("${name}" "${libdir}" ${ARGN})
-endfunction ()
-
-# Install a plugin to the package.
-#
-# Usage:
-#
-#   superbuild_unix_install_plugin(<filename> <libdir> <search-paths>
-#     [INCLUDE_REGEXES <include-regex>...]
-#     [EXCLUDE_REGEXES <exclude-regex>...]
-#     [LOADER_PATHS <loader-paths>...]
-#     [SEARCH_DIRECTORIES <search-directory>...])
-#
-# Install a plugin from ``<filename>`` to the package. The file is searched for
-# in ``<search-paths>`` under the superbuild's install tree. Required libraries
-# are installed to ``<libdir>``.
-#
-# The ``INCLUDE_REGEXES`` and ``EXCLUDE_REGEXES`` arguments may be used to
-# include or exclude found paths from being installed to the package. They are
-# Python regular expressions. ``LOADER_PATHS`` is a list of directories where
-# the executable loading the plugin is looking for libraries. These are
-# searched for dependencies first. ``SEARCH_DIRECTORIES`` is a list of
-# directories to search for dependent libraries.
-function (superbuild_unix_install_plugin name libdir paths)
-  if (IS_ABSOLUTE "${name}")
-    _superbuild_unix_install_module("${name}" "${paths}" "${libdir}" ${ARGN})
-    return ()
-  endif ()
-
-  set(found FALSE)
-  foreach (path IN LISTS paths)
-    if (EXISTS "${superbuild_install_location}/${path}/${name}")
-      _superbuild_unix_install_module("${superbuild_install_location}/${path}/${name}" "${path}" "${libdir}" ${ARGN})
-      set(found TRUE)
-      break ()
-    endif ()
-  endforeach ()
-
-  if (NOT found)
-    string(REPLACE ";" ", " paths_list "${paths}")
-    message(FATAL_ERROR "Unable to find the ${name} plugin in ${paths_list}")
-  endif ()
-endfunction ()
-
-# Install Python modules to the package.
-#
-# Usage:
-#
-#   superbuild_unix_install_python(
-#     MODULES <module>...
-#     LIBDIR <libdir>
-#     MODULE_DIRECTORIES <module-path>...
-#     [MODULE_DESTINATION <destination>]
-#     [INCLUDE_REGEXES <include-regex>...]
-#     [EXCLUDE_REGEXES <exclude-regex>...]
-#     [LOADER_PATHS <loader-paths>...]
-#     [SEARCH_DIRECTORIES <library-path>...])
-#
-# Installs Python modules or packages named ``<name>`` into the package. The
-# ``LIBDIR`` argument is used to place dependent libraries into the correct
-# subdirectory of the package. Libraries are searched for in
-# ``<library-paths>`` and relative paths are taken to be relative to the
-# superbuild's install directory. The modules are searched for in the
-# ``<module-paths>``. Modules are installed into the proper location
-# (``lib/python2.7/site-packages``) within the package, but may be placed
-# inside of a different directory by using the ``MODULE_DESTINATION`` argument.
-#
-# The ``INCLUDE_REGEXES`` and ``EXCLUDE_REGEXES`` arguments may be used to
-# include or exclude found paths from being installed to the package. They are
-# Python regular expressions. ``LOADER_PATHS`` is a list of directories where
-# the executable loading the Python modules is looking for libraries. These are
-# searched for dependencies first. ``SEARCH_DIRECTORIES`` is a list of
-# directories to search for dependent libraries.
-function (superbuild_unix_install_python)
-  set(values
-    MODULE_DESTINATION
-    LIBDIR)
-  set(multivalues
-    INCLUDE_REGEXES
-    EXCLUDE_REGEXES
-    LOADER_PATHS
-    SEARCH_DIRECTORIES
-    MODULE_DIRECTORIES
-    MODULES)
-  cmake_parse_arguments(_install_python "${options}" "${values}" "${multivalues}" ${ARGN})
-
-  if (NOT _install_python_LIBDIR)
-    message(FATAL_ERROR "Cannot install Python modules without knowing where to put dependent libraries.")
-  endif ()
-
-  if (NOT _install_python_MODULES)
-    message(FATAL_ERROR "No modules specified.")
-  endif ()
-
-  if (NOT _install_python_MODULE_DIRECTORIES)
-    message(FATAL_ERROR "No modules search paths specified.")
-  endif ()
-
-  set(fixup_bundle_arguments)
-
-  if (NOT _install_python_MODULE_DESTINATION)
-    set(_install_python_MODULE_DESTINATION "/site-packages")
-  endif ()
-
-  foreach (include_regex IN LISTS _install_python_INCLUDE_REGEXES)
-    list(APPEND fixup_bundle_arguments
-      --include "${include_regex}")
-  endforeach ()
-
-  foreach (exclude_regex IN LISTS _install_python_EXCLUDE_REGEXES)
-    list(APPEND fixup_bundle_arguments
-      --exclude "${exclude_regex}")
-  endforeach ()
-
-  foreach (search_directory IN LISTS _install_python_SEARCH_DIRECTORIES)
-    list(APPEND fixup_bundle_arguments
-      --search "${search_directory}")
-  endforeach ()
-
-  foreach (loader_path IN LISTS _install_python_LOADER_PATHS)
-    list(APPEND fixup_bundle_arguments
-      --loader-path "${loader_path}")
-  endforeach ()
-
-  install(CODE
-    "set(superbuild_python_executable \"${superbuild_python_executable}\")
-    include(\"${_superbuild_install_cmake_dir}/scripts/fixup_python.unix.cmake\")
-    set(python_modules \"${_install_python_MODULES}\")
-    set(module_directories \"${_install_python_MODULE_DIRECTORIES}\")
-
-    set(fixup_bundle_arguments \"${fixup_bundle_arguments}\")
-    set(bundle_destination \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}\")
-    set(bundle_manifest \"${CMAKE_BINARY_DIR}/install.manifest\")
-    set(libdir \"${_install_python_LIBDIR}\")
-
-    foreach (python_module IN LISTS python_modules)
-      superbuild_unix_install_python_module(\"\${CMAKE_INSTALL_PREFIX}\"
-        \"\${python_module}\" \"\${module_directories}\" \"lib/python2.7${_install_python_MODULE_DESTINATION}\")
-    endforeach ()"
-    COMPONENT superbuild)
-endfunction ()

 # =======================================================================
 # OS X
@@ -633,285 +290,3 @@
     endforeach ()"
     COMPONENT superbuild)
 endfunction ()
-
-# =======================================================================
-# Windows
-# =======================================================================
-
-# INTERNAL
-# Install a binary and its required libraries to a location.
-#
-# _superbuild_windows_install_binary(
-#   LIBDIR <libdir>
-#   BINARY <path>
-#   TYPE <module|executable>
-#   [CLEAN]
-#   [DESTINATION <destination>]
-#   [LOCATION <location>]
-#   [INCLUDE_REGEXES <include-regex>...]
-#   [EXCLUDE_REGEXES <exclude-regex>...]
-#   [BINARY_LIBDIR <binary_libdirs>...]
-#   [SEARCH_DIRECTORIES <search-directory>...])
-function (_superbuild_windows_install_binary)
-  set(options
-    CLEAN)
-  set(values
-    DESTINATION
-    LIBDIR
-    LOCATION
-    BINARY
-    TYPE)
-  set(multivalues
-    INCLUDE_REGEXES
-    EXCLUDE_REGEXES
-    BINARY_LIBDIR
-    SEARCH_DIRECTORIES)
-  cmake_parse_arguments(_install_binary "${options}" "${values}" "${multivalues}" ${ARGN})
-
-  if (NOT _install_binary_BINARY)
-    message(FATAL_ERROR "Cannot install a binary without a path.")
-  endif ()
-
-  if (NOT IS_ABSOLUTE "${_install_binary_BINARY}")
-    message(FATAL_ERROR "Cannot install a binary without an absolute path (${_install_binary_BINARY}).")
-  endif ()
-
-  if (NOT _install_binary_DESTINATION)
-    set(_install_binary_DESTINATION
-      "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}")
-  endif ()
-
-  if (NOT _install_binary_LIBDIR)
-    message(FATAL_ERROR "Cannot install ${_install_binary_BINARY} without knowing where to put dependent libraries.")
-  endif ()
-
-  if (NOT _install_binary_TYPE)
-    message(FATAL_ERROR "Cannot install ${_install_binary_BINARY} without knowing its type.")
-  endif ()
-
-  if (_install_binary_TYPE STREQUAL "module" AND NOT _install_binary_LOCATION)
-    message(FATAL_ERROR "Cannot install ${_install_binary_BINARY} as a module without knowing where to place it.")
-  endif ()
-
-  if (NOT _install_binary_BINARY_LIBDIR)
-    list(APPEND _install_binary_BINARY_LIBDIR "bin")
-  endif()
-
-  set(fixup_bundle_arguments)
-  set(fixup_bundle_arguments
-    "${fixup_bundle_arguments} --destination ${_install_binary_DESTINATION}")
-  set(fixup_bundle_arguments
-    "${fixup_bundle_arguments} --type ${_install_binary_TYPE}")
-  set(fixup_bundle_arguments
-    "${fixup_bundle_arguments} --libdir ${_install_binary_LIBDIR}")
-
-  get_property(superbuild_has_cleaned GLOBAL PROPERTY
-    superbuild_has_cleaned)
-  if (_install_binary_CLEAN OR NOT superbuild_has_cleaned)
-    set_property(GLOBAL PROPERTY
-      superbuild_has_cleaned TRUE)
-    if (superbuild_is_install_target)
-      set(fixup_bundle_arguments
-        "${fixup_bundle_arguments} --new")
-    else ()
-      set(fixup_bundle_arguments
-        "${fixup_bundle_arguments} --clean --new")
-    endif ()
-  endif ()
-
-  if (_install_binary_LOCATION)
-    set(fixup_bundle_arguments
-      "${fixup_bundle_arguments} --location \"${_install_binary_LOCATION}\"")
-  endif ()
-
-  foreach (include_regex IN LISTS _install_binary_INCLUDE_REGEXES)
-    set(fixup_bundle_arguments
-      "${fixup_bundle_arguments} --include \"${include_regex}\"")
-  endforeach ()
-
-  foreach (exclude_regex IN LISTS _install_binary_EXCLUDE_REGEXES)
-    set(fixup_bundle_arguments
-      "${fixup_bundle_arguments} --exclude \"${exclude_regex}\"")
-  endforeach ()
-
-  foreach(binary_libdir IN LISTS _install_binary_BINARY_LIBDIR)
-    set(fixup_bundle_arguments
-      "${fixup_bundle_arguments} --binary-libdir \"${binary_libdir}\"")
-  endforeach()
-
-  foreach (search_directory IN LISTS _install_binary_SEARCH_DIRECTORIES)
-    set(fixup_bundle_arguments
-      "${fixup_bundle_arguments} --search \"${search_directory}\"")
-  endforeach ()
-
-  install(CODE
-    "execute_process(
-      COMMAND \"${superbuild_python_executable}\"
-              \"${_superbuild_install_cmake_dir}/scripts/fixup_bundle.windows.py\"
-              ${fixup_bundle_arguments}
-              --manifest    \"${CMAKE_BINARY_DIR}/install.manifest\"
-              \"${_install_binary_BINARY}\"
-      RESULT_VARIABLE res
-      ERROR_VARIABLE  err)
-
-    if (res)
-      message(FATAL_ERROR \"Failed to install ${name}:\n\${err}\")
-    endif ()"
-    COMPONENT superbuild)
-endfunction ()
-
-function (_superbuild_windows_install_executable path libdir)
-  _superbuild_windows_install_binary(
-    BINARY      "${path}"
-    LIBDIR      "${libdir}"
-    TYPE        executable
-    ${ARGN})
-endfunction ()
-
-function (_superbuild_windows_install_module path subdir libdir)
-  _superbuild_windows_install_binary(
-    BINARY      "${path}"
-    LOCATION    "${subdir}"
-    LIBDIR      "${libdir}"
-    TYPE        module
-    ${ARGN})
-endfunction ()
-
-# Install a program from the installation tree to the package.
-#
-# Usage:
-#
-#   superbuild_windows_install_program(<path> <libdir>
-#     [INCLUDE_REGEXES <include-regex>...]
-#     [EXCLUDE_REGEXES <exclude-regex>...]
-#     [SEARCH_DIRECTORIES <search-directory>...])
-#
-# Installs a program ``<name>`` into ``bin/`` and its dependent libraies into
-# ``<libdir>``.
-#
-# The ``INCLUDE_REGEXES`` and ``EXCLUDE_REGEXES`` arguments may be used to
-# include or exclude found paths from being installed to the package. They are
-# Python regular expressions. ``SEARCH_DIRECTORIES`` is a list of directories
-# to search for dependent libraries.
-function (superbuild_windows_install_program name libdir)
-  _superbuild_windows_install_executable("${superbuild_install_location}/bin/${name}.exe" "${libdir}" ${ARGN})
-endfunction ()
-
-# Install a plugin to the package.
-#
-# Usage:
-#
-#   superbuild_windows_install_plugin(<filename> <libdir> <search-paths>
-#     [INCLUDE_REGEXES <include-regex>...]
-#     [EXCLUDE_REGEXES <exclude-regex>...]
-#     [SEARCH_DIRECTORIES <search-directory>...])
-#
-# Install a plugin from ``<filename>`` to the package. The file is searched for
-# in ``<search-paths>`` under the superbuild's install tree. Required libraries
-# are installed to ``<libdir>``.
-#
-# The ``INCLUDE_REGEXES`` and ``EXCLUDE_REGEXES`` arguments may be used to
-# include or exclude found paths from being installed to the package. They are
-# Python regular expressions. ``SEARCH_DIRECTORIES`` is a list of directories
-# to search for dependent libraries.
-function (superbuild_windows_install_plugin name libdir paths)
-  if (IS_ABSOLUTE "${name}")
-    _superbuild_windows_install_module("${name}" "${paths}" "${libdir}" ${ARGN})
-    return ()
-  endif ()
-
-  set(found FALSE)
-  foreach (path IN LISTS paths)
-    if (EXISTS "${superbuild_install_location}/${path}/${name}")
-      _superbuild_windows_install_module("${superbuild_install_location}/${path}/${name}" "${path}" "${libdir}" ${ARGN})
-      set(found TRUE)
-      break ()
-    endif ()
-  endforeach ()
-
-  if (NOT found)
-    string(REPLACE ";" ", " paths_list "${paths}")
-    message(FATAL_ERROR "Unable to find the ${name} plugin in ${paths_list}")
-  endif ()
-endfunction ()
-
-# Install Python modules to the package.
-#
-# Usage:
-#
-#   superbuild_windows_install_python(
-#     MODULES <module>...
-#     MODULE_DIRECTORIES <module-path>...
-#     [MODULE_DESTINATION <destination>]
-#     [INCLUDE_REGEXES <include-regex>...]
-#     [EXCLUDE_REGEXES <exclude-regex>...]
-#     [SEARCH_DIRECTORIES <library-path>...])
-#
-# Installs Python modules or packages named ``<name>`` into the package.
-# Libraries are searched for in ``<library-paths>`` and relative paths are
-# taken to be relative to the superbuild's install directory. The modules are
-# searched for in the ``<module-paths>``. Modules are installed into the proper
-# location (``lib/python2.7/site-packages``) within the package, but may be
-# placed inside of a different directory by using the ``MODULE_DESTINATION``
-# argument.
-#
-# The ``INCLUDE_REGEXES`` and ``EXCLUDE_REGEXES`` arguments may be used to
-# include or exclude found paths from being installed to the package. They are
-# Python regular expressions. ``SEARCH_DIRECTORIES`` is a list of directories
-# to search for dependent libraries.
-function (superbuild_windows_install_python)
-  set(values
-    MODULE_DESTINATION)
-  set(multivalues
-    INCLUDE_REGEXES
-    EXCLUDE_REGEXES
-    SEARCH_DIRECTORIES
-    MODULE_DIRECTORIES
-    MODULES)
-  cmake_parse_arguments(_install_python "${options}" "${values}" "${multivalues}" ${ARGN})
-
-  if (NOT _install_python_MODULES)
-    message(FATAL_ERROR "No modules specified.")
-  endif ()
-
-  if (NOT _install_python_MODULE_DIRECTORIES)
-    message(FATAL_ERROR "No modules search paths specified.")
-  endif ()
-
-  set(fixup_bundle_arguments)
-
-  if (NOT _install_python_MODULE_DESTINATION)
-    set(_install_python_MODULE_DESTINATION "/site-packages")
-  endif ()
-
-  foreach (include_regex IN LISTS _install_python_INCLUDE_REGEXES)
-    list(APPEND fixup_bundle_arguments
-      --include "${include_regex}")
-  endforeach ()
-
-  foreach (exclude_regex IN LISTS _install_python_EXCLUDE_REGEXES)
-    list(APPEND fixup_bundle_arguments
-      --exclude "${exclude_regex}")
-  endforeach ()
-
-  foreach (search_directory IN LISTS _install_python_SEARCH_DIRECTORIES)
-    list(APPEND fixup_bundle_arguments
-      --search "${search_directory}")
-  endforeach ()
-
-  install(CODE
-    "set(superbuild_python_executable \"${superbuild_python_executable}\")
-    include(\"${_superbuild_install_cmake_dir}/scripts/fixup_python.windows.cmake\")
-    set(python_modules \"${_install_python_MODULES}\")
-    set(module_directories \"${_install_python_MODULE_DIRECTORIES}\")
-
-    set(fixup_bundle_arguments \"${fixup_bundle_arguments}\")
-    set(bundle_destination \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}\")
-    set(bundle_manifest \"${CMAKE_BINARY_DIR}/install.manifest\")
-
-    foreach (python_module IN LISTS python_modules)
-      superbuild_windows_install_python_module(\"\${CMAKE_INSTALL_PREFIX}\"
-        \"\${python_module}\" \"\${module_directories}\" \"bin/Lib${_install_python_MODULE_DESTINATION}\")
-    endforeach ()"
-    COMPONENT superbuild)
-endfunction ()


Fix linkage with static OpenSSL on Windows.

--- cmake/projects/Libssh2/hunter.cmake
+++ cmake/projects/Libssh2/hunter.cmake
@@ -18,9 +18,9 @@
     VERSION
     "1.7.0"
     URL
-    "https://github.com/hunter-packages/libssh2/archive/libssh2-1.7.0-hunter-1.tar.gz"
+    "https://github.com/hunter-packages/libssh2/archive/libssh2-1.7.0-hunter-2.tar.gz"
     SHA1
-    d286289d2bb9aa8ef5365d06113e3f1c1f64e92f
+    284191652e208daf34018e7938e6ee6db9f99931
 )

 hunter_add_version(


ENH: upgrade muparserx to last stable release 3.0.5


Fix build, hopefully

Fix build, hopefully

--- Shared/CMake/JamomaPack.cmake
+++ Shared/CMake/JamomaPack.cmake
@@ -1,9 +1,12 @@
+if(WIN32)
+# We need to deploy our DLLs too.
 find_package(LibXml2 CONFIG)
 get_target_property(XML2_DLL xml2 IMPORTED_LOCATION)
 install(FILES "${XML2_DLL}"
 		DESTINATION support)

 # TODO portaudio, sndfile, etc...
+endif()

 SET(CPACK_PACKAGE_NAME "JamomaCore")
 SET(CPACK_PACKAGE_VENDOR "The Jamoma Foundation")


fix documentation tag dependencies

fix documentation tag dependencies

Fix specification of tag files for documentation module dependencies.
The location was wrong, causing the tag file to not be found.

--- CMake/doxygen.cmake
+++ CMake/doxygen.cmake
@@ -44,7 +44,7 @@
     set(tag_targets)

     foreach(tag ${ARGN})
-      if("x_${tag}" MATCHES "x_[Qq][Tt]4?")
+      if("x_${tag}" MATCHES "^x_[Qq][Tt]4?$")
         if(QT4_TAG_FILE)
           list(APPEND tag_files "\"${QT4_TAG_FILE}=${QT_DOC_DIR}/html\"")
         else()
@@ -53,12 +53,15 @@
             "but Qt tag file was not found."
           )
         endif()
-        list(APPEND tag_files "\"${QT4_EXTRA_TAG_FILE}=${QT_DOC_DIR}/html\"")
-        list(APPEND tag_targets doxygen-qt4-extra-tag)
+        set(tag qt4-extra)
+        set(tag_file "${QT4_EXTRA_TAG_FILE}")
+        set(tag_href "${QT_DOC_DIR}/html")
       else()
-        list(APPEND tag_files "\"${visGUI_BINARY_DIR}/doc/${tag}.tag=../${tag}\"")
-        list(APPEND tag_targets doxygen-${tag}-tag)
+        set(tag_file "${visGUI_BINARY_DIR}/doc/${tag}/${tag}.tag")
+        set(tag_href "../${tag}")
       endif()
+      list(APPEND tag_files "\"${tag_file}=${tag_href}\"")
+      list(APPEND tag_targets doxygen-${tag}-tag)
     endforeach()
     string(REPLACE ";" " " tag_files "${tag_files}")


add explanation for downloading different boost files on different OS's

--- superbuild/External-Boost.cmake
+++ superbuild/External-Boost.cmake
@@ -4,6 +4,11 @@
 message( "External project - Boost" )

 set( Boost_Bootstrap_Command )
+
+# Note: It IS important to download different files on different OS's:
+# on Unix-like systems, we need the file persmissions (only available in the .tar.gz),
+# while on Windows, we need CR/LF line feeds (only available in the .zip)
+
 if( UNIX )
   set( Boost_url "http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz")
   set( Boost_md5 93780777cfbf999a600f62883bd54b17)


Add ${LIBGFLAGS_LIBRARY} to IMPORTED_LINK_INTERFACE_LIBRARIES of glog::glog (#9169)

Summary:
X-link: https://github.com/facebook/hhvm/pull/9169

X-link: https://github.com/facebook/wangle/pull/208

X-link: https://github.com/facebookincubator/reindeer/pull/4

X-link: https://github.com/facebookincubator/velox/pull/2445

X-link: https://github.com/facebookincubator/hsthrift/pull/98

X-link: https://github.com/facebookincubator/katran/pull/171

X-link: https://github.com/facebookincubator/mvfst/pull/272

X-link: https://github.com/facebook/fboss/pull/118

X-link: https://github.com/facebookincubator/fizz/pull/81

X-link: https://github.com/facebookexperimental/eden/pull/127

X-link: https://github.com/facebook/sapling-staging/pull/7

X-link: https://github.com/facebookexperimental/edencommon/pull/4

X-link: https://github.com/facebookexperimental/rust-shed/pull/34

X-link: https://github.com/facebook/fbthrift/pull/521

X-link: https://github.com/facebook/watchman/pull/1055

Pull Request resolved: https://github.com/facebook/folly/pull/1854

X-link: https://github.com/facebook/openr/pull/140

X-link: https://github.com/facebook/fb303/pull/31

Previously Folly provided a polyfill of the `GflagsFlagSaver` symbol, which was removed since https://github.com/facebook/folly/commit/4dadde1256f74e756510a499c86459967f78afb9. Therefore, `glog` should solve the `GflagsFlagSaver` symbol directly from `gflags`.

This diff added `gflags` libraries as a dependency of the CMake project `glog::glog` into `fbcode_builder`'s `FindGlog.cmake`, so that the `fbcode_builder` users will be able to automatically link with `gflags`.

Reviewed By: alexeyt

Differential Revision: D39220438

fbshipit-source-id: 485d67bfeace955f83a4961372680f12eb9cc1a5


Fix and cleanup FindJsonCpp.cmake. Note that this now requires a jsoncpp lib with the one Linden Lab changeset, http://hg.secondlife.com/3p-jsoncpp/changeset/1e607b7ffffa Without this changeset, on standalone builds, the preprocessor will pick up the same file from jsoncpp twice instead of picking up the one from jsoncpp and one from boost that has the same filename. This will cause the usual missing header errors with boost, but without the one error saying missing include file. If building with Linden Laps prebuilts, this commit has no effect due to FindJsonCpp.cmake is not use in non-standalone builds.

--- indra/cmake/FindJsonCpp.cmake
+++ indra/cmake/FindJsonCpp.cmake
@@ -3,15 +3,14 @@
 # - Find JSONCpp
 # Find the JSONCpp includes and library
 # This module defines
-#  JSONCPP_INCLUDE_DIR, where to find json.h, etc.
+#  JSONCPP_INCLUDE_DIRS, where to find json.h, etc.
 #  JSONCPP_LIBRARIES, the libraries needed to use jsoncpp.
 #  JSONCPP_FOUND, If false, do not try to use jsoncpp.
 #  also defined, but not for general use are
 #  JSONCPP_LIBRARY, where to find the jsoncpp library.

-FIND_PATH(JSONCPP_INCLUDE_DIR jsoncpp/json.h
-/usr/local/include
-/usr/include
+FIND_PATH(JSONCPP_INCLUDE_DIRS json.h
+          PATH_SUFFIXES jsoncpp
 )

 # Get the GCC compiler version
@@ -23,21 +22,20 @@

 # Try to find a library that was compiled with the same compiler version as we currently use.
 SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so)
-IF (STANDALONE)
-    # On standalone, assume that the system installed library was compiled with the used compiler.
-    SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson.so)
-ENDIF (STANDALONE)
+
+# On standalone, assume that the system installed library was compiled with the used compiler.
+SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson.so)
+
 FIND_LIBRARY(JSONCPP_LIBRARY
   NAMES ${JSONCPP_NAMES}
-  PATHS /usr/lib /usr/local/lib
   )

-IF (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR)
+IF (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIRS)
     SET(JSONCPP_LIBRARIES ${JSONCPP_LIBRARY})
     SET(JSONCPP_FOUND "YES")
-ELSE (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR)
+ELSE (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIRS)
   SET(JSONCPP_FOUND "NO")
-ENDIF (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR)
+ENDIF (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIRS)

 IF (JSONCPP_FOUND)
@@ -51,10 +49,10 @@
 ENDIF (JSONCPP_FOUND)

 # Deprecated declarations.
-SET (NATIVE_JSONCPP_INCLUDE_PATH ${JSONCPP_INCLUDE_DIR} )
+SET (NATIVE_JSONCPP_INCLUDE_PATH ${JSONCPP_INCLUDE_DIRS} )
 GET_FILENAME_COMPONENT (NATIVE_JSONCPP_LIB_PATH ${JSONCPP_LIBRARY} PATH)

 MARK_AS_ADVANCED(
   JSONCPP_LIBRARY
-  JSONCPP_INCLUDE_DIR
+  JSONCPP_INCLUDE_DIRS
   )


Moving ITK superbuild to 4.5rc2

Moving ITK superbuild to 4.5rc2

Change-Id: I9af35b2aed5863f2834bd62ccb8e4379e8398a5c

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -26,7 +26,7 @@
 set(ITK_REPOSITORY git://itk.org/ITK.git)

 # NOTE: it is very important to update the ITK_DIR path with the
-set(ITK_TAG_COMMAND GIT_TAG v4.5rc01 )
+set(ITK_TAG_COMMAND GIT_TAG v4.5rc02 )

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )


ENH: Make superbuild ITK_TAG configurable.

This way "master" can be used, and additional testing feedback can be
presented to developers on the Insight dashboard.

--- Superbuild/External-ITK.cmake
+++ Superbuild/External-ITK.cmake
@@ -1,7 +1,9 @@
 #---------------------------------------------------------------------------
 # Get and build itk

-set( ITK_TAG "v4.2.1" )
+if( NOT ITK_TAG )
+  set( ITK_TAG "v4.2.1" )
+endif()

 ExternalProject_Add( ITK
   GIT_REPOSITORY "${git_protocol}://itk.org/ITK.git"


Fix c++0x detection

Fix c++0x detection

--- support/cmake/cxx14.cmake
+++ support/cmake/cxx14.cmake
@@ -46,7 +46,7 @@
       if (HAVE_STD_CPP11_FLAG)
         set(CPP14_FLAG -std=c++11)
       else ()
-        check_cxx_compiler_flag(-std=c++0x HAVE_STD_CPP11_FLAG)
+        check_cxx_compiler_flag(-std=c++0x HAVE_STD_CPP0X_FLAG)
         if (HAVE_STD_CPP0X_FLAG)
           set(CPP14_FLAG -std=c++0x)
         endif ()


Delete FindDL.cmake

Delete FindDL.cmake

--- CMake/FindDL.cmake
+++ CMake/FindDL.cmake
@@ -1,34 +0,0 @@
-###############################################################################
-# CMake macro to find libdl library.
-#
-# On success, the macro sets the following variables:
-# DL_FOUND       = if the library found
-# DL_LIBRARY     = full path to the library
-# DL_INCLUDE_DIR = where to find the library headers
-#
-# Author: Mateusz Loskot <mateusz@loskot.net>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-#
-###############################################################################
-if(DL_INCLUDE_DIR)
-	set(DL_FIND_QUIETLY TRUE)
-endif()
-
-find_path(DL_INCLUDE_DIR dlfcn.h)
-find_library(DL_LIBRARY NAMES dl)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(DL DEFAULT_MSG DL_LIBRARY DL_INCLUDE_DIR)
-
-if(NOT DL_FOUND)
-	# if dlopen can be found without linking in dl then,
-	# dlopen is part of libc, so don't need to link extra libs.
-	check_function_exists(dlopen DL_FOUND)
-	set(DL_LIBRARY "")
-endif()
-
-set(DL_LIBRARIES ${DL_LIBRARY})
-
-mark_as_advanced(DL_LIBRARY DL_INCLUDE_DIR)


Fix `-isystem` includes being incorrectly passed to execute_process()

The external command was being invoked with arguments: ["clang", ...,
"-isystem  /foo/bar/baz", ...], which meant that the compiler treated
the whitespace between the flag and the path as being part of the path
itself. (i.e. it was looking for "  /foo/bar/baz").

Fixed by passing the argument to execute_process() as
'-isystem/foo/bar/baz'; I also needed to ensure we normalized the value
of CMAKE_INCLUDE_SYSTEM_FLAG_<LANG>, which itself contains trailing
whitespace in some cases.

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -759,7 +759,7 @@
 		else()
 			list(FIND ${_systemIncludesVar} ${_include} _index)
 			if(_index GREATER -1 AND NOT "${_includeSystemFlag}" STREQUAL "")
-			        list (APPEND ${_cmdVar} "${_includeSystemFlag} ${_include}")
+			        list (APPEND ${_cmdVar} "${_includeSystemFlag}${_include}")
 			else()
 				list (APPEND ${_cmdVar} "-I${_include}")
 			endif()
@@ -1922,7 +1922,7 @@
 	get_target_property(COTIRE_TARGET_MAXIMUM_NUMBER_OF_INCLUDES ${_target} COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES)
 	cotire_get_source_files_undefs(COTIRE_UNITY_SOURCE_PRE_UNDEFS COTIRE_TARGET_SOURCES_PRE_UNDEFS ${COTIRE_TARGET_SOURCES})
 	cotire_get_source_files_undefs(COTIRE_UNITY_SOURCE_POST_UNDEFS COTIRE_TARGET_SOURCES_POST_UNDEFS ${COTIRE_TARGET_SOURCES})
-	set (COTIRE_INCLUDE_SYSTEM_FLAG ${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}})
+	string (STRIP "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" COTIRE_INCLUDE_SYSTEM_FLAG)
 	set (COTIRE_TARGET_CONFIGURATION_TYPES "${_configurations}")
 	foreach (_config ${_configurations})
 		string (TOUPPER "${_config}" _upperConfig)


CMP0011 is not known on older cmake versions and leads to build failures there.

--- indra/cmake/PNG.cmake
+++ indra/cmake/PNG.cmake
@@ -1,9 +1,13 @@
 # -*- cmake -*-

 # Silence warning about overriding findZLIB.cmake with our own copy.
-cmake_policy(SET CMP0017 OLD)
+
+if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 8 AND ${CMAKE_PATCH_VERSION} GREATER 3)
+ cmake_policy(SET CMP0017 OLD)
+ cmake_policy(SET CMP0011 NEW)
+endif(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 8 AND ${CMAKE_PATCH_VERSION} GREATER 3)
+
 # Silence warning about using policies to silence warnings about using policies.
-cmake_policy(SET CMP0011 NEW)

 include(Prebuilt)


handle ABI for cases when using MSVC with non VS generators

--- toolchains/msvc.toolchain.cmake
+++ toolchains/msvc.toolchain.cmake
@@ -48,8 +48,14 @@
   x64
 )

-if( NOT DEFINED TNUN_ABI )
+if( NOT DEFINED TNUN_ABI AND ${CMAKE_GENERATOR} MATCHES "Visual Studio" )
   if ( ${CMAKE_GENERATOR} MATCHES 64 )
+    set( TNUN_ABI x64 )
+  else()
+    set( TNUN_ABI Win32 )
+  endif()
+else()
+  if ( ${CMAKE_SIZEOF_VOID_P} EQUAL 8 )
     set( TNUN_ABI x64 )
   else()
     set( TNUN_ABI Win32 )


Fix incorrect ChibiOS RTOS sources for F0 devices.

--- cmake/ChibiOS/18.2/ChibiOS_RTOS.cmake
+++ cmake/ChibiOS/18.2/ChibiOS_RTOS.cmake
@@ -1,4 +1,4 @@
-FOREACH (FAMILY L0 L4)
+FOREACH (FAMILY F0 L0 L4)
     SET (CHIBIOS_SOURCES_${CHIBIOS_KERNEL}_${FAMILY}
         os/common/startup/ARMCMx/compilers/GCC/crt0_v6m.S
         os/common/ports/ARMCMx/chcore.c
@@ -7,7 +7,7 @@
     )
 ENDFOREACH()

-FOREACH (FAMILY F0 F1 F2 F3 F4 F7)
+FOREACH (FAMILY F1 F2 F3 F4 F7)
     SET (CHIBIOS_SOURCES_${CHIBIOS_KERNEL}_${FAMILY}
         os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S
         os/common/ports/ARMCMx/chcore.c


[cmake] Add support for using the standalone leaks sanitizer with LLVM.

This commit causes LLVM_USE_SANITIZER to now accept the "Leaks" option. This
will cause cmake to pass in -fsanitize=leak in all of the appropriate places.

I am making this change so that I can setup a linux bot that only detects
leaks.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -642,6 +642,9 @@
       append_common_sanitizer_flags()
       append("-fsanitize=address,undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all"
               CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+    elseif (LLVM_USE_SANITIZER STREQUAL "Leaks")
+      append_common_sanitizer_flags()
+      append("-fsanitize=leak" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
     else()
       message(FATAL_ERROR "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}")
     endif()


[CMake] MSVC is incorrectly emitting C4239 in some cases. Disable it.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -176,7 +176,6 @@

     # Promoted warnings to errors.
     -we4238 # Promote 'nonstandard extension used : class rvalue used as lvalue' to error.
-    -we4239 # Promote 'nonstandard extension used : 'token' : conversion from 'type' to 'type'' to error.
     )

   # Enable warnings


[build] copy Python detection code into StandaloneOverlays.cmake (#31234)

This is to support workflows that do not rely on reading the main
CMakeLists.txt.

Based upon #30992, #31020

Addresses rdar://62245784

--- cmake/modules/StandaloneOverlay.cmake
+++ cmake/modules/StandaloneOverlay.cmake
@@ -115,6 +115,14 @@
 include(SwiftComponents)
 include(DarwinSDKs)

+find_package(Python2 COMPONENTS Interpreter REQUIRED)
+find_package(Python3 COMPONENTS Interpreter)
+if(NOT Python3_Interpreter_FOUND)
+  message(WARNING "Python3 not found, using python2 as a fallback")
+  add_executable(Python3::Interpreter IMPORTED)
+  set_target_properties(Python3::Interpreter PROPERTIES
+    IMPORTED_LOCATION ${Python2_EXECUTABLE})
+endif()

 # Without this line, installing components is broken. This needs refactoring.
 swift_configure_components()


Fix typo regarding supported FreeBSD architectures

--- cmake/modules/SwiftConfigureSDK.cmake
+++ cmake/modules/SwiftConfigureSDK.cmake
@@ -212,7 +212,7 @@
           message(FATAL_ERROR "unknown arch for ${prefix}: ${arch}")
         endif()
       elseif("${prefix}" STREQUAL "FREEBSD")
-        if(arch STREQUAL x86_64)
+        if(NOT arch STREQUAL x86_64)
           message(FATAL_ERROR "unsupported arch for FreeBSD: ${arch}")
         endif()


[t:4871] turn -Werror back on

[t:4871] turn -Werror back on

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

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -116,12 +116,14 @@
   ## set icc warnings
   set(WARN_CFLAGS
     -Wall
+    -Werror
     -Wcheck  ## icc version of -Wextra
     )
 else()
   ## set gcc warnings
   set(WARN_CFLAGS
     -Wall
+    -Werror
     -Wextra
     -Wcast-align
     -Wbad-function-cast


COMP: Adding 4D array to test if that fixes issues with missing instantiations

--- Wrapping/ExplicitITK/WrapITKTypesExplicit.cmake
+++ Wrapping/ExplicitITK/WrapITKTypesExplicit.cmake
@@ -76,9 +76,10 @@
 SET(itk_Wrap_Explicit_Array2D ${WRAPPER_TEMPLATES})

 WRAP_EXPLICIT_TYPE("FixedArray" "FA")
-  UNIQUE(array_sizes "${EXPLICIT_ITK_DIMS};1")
+  UNIQUE(array_sizes "${EXPLICIT_ITK_DIMS};1;4")
   # make sure that 1-D FixedArrays are wrapped. Also wrap for each selected
-  # image dimension.
+  # image dimension. We also wrapped 4D arrays since some of the classes need
+  # it.
   # TODO: Do we need fixed arrays for all of these types? For just the selected
   # pixel types plus some few basic cases? Or just for a basic set of types?
   FOREACH(d ${array_sizes})


Fixed the Findcppnetlib script

Fixed the Findcppnetlib script

--- Findcppnetlib.cmake
+++ Findcppnetlib.cmake
@@ -45,27 +45,27 @@
 #

 # Assume not found.
-SET(CPPNETLIB_FOUND FALSE)
+set(CPPNETLIB_FOUND FALSE)
+set(CPPNETLIB_PATH)

-# PATH ________________________________________________________________________
+# Find headers
+find_path(CPPNETLIB_INCLUDE_DIR boost/network.hpp
+  HINTS ${CPPNETLIB_ROOT}/include $ENV{CPPNETLIB_ROOT}/include
+  ${CMAKE_SOURCE_DIR}/cppnetlib
+  /usr/local/include
+  /usr/include)

-if(NOT CPPNETLIB_PATH)
-  find_path(CPPNETLIB_INCLUDE_DIR boost/network.hpp
-    HINTS ${CPPNETLIB_ROOT}/include $ENV{CPPNETLIB_ROOT}/include
-    ${CMAKE_SOURCE_DIR}/cppnetlib
-    /usr/local/include
-    /usr/include)
-  mark_as_advanced (CPPNETLIB_INCLUDE_DIR)
-  set(CPPNETLIB_PATH "${CPPNETLIB_INCLUDE_DIR}/..")
+if(CPPNETLIB_INCLUDE_DIR)
+    set(CPPNETLIB_PATH "${CPPNETLIB_INCLUDE_DIR}/..")
 endif()

-# HEADERS AND DYNAMIC LIBRARIES_________________________________________________
+# Find dynamic libraries
+if(CPPNETLIB_PATH)
+    set(__libraries cppnetlib-client-connections
+                    cppnetlib-server-parsers
+                    cppnetlib-uri)

-if(CPPNETLIB_PATH)
-  set(__libraries
-    cppnetlib-client-connections cppnetlib-server-parsers cppnetlib-uri)
-
-  foreach(__library ${__libraries})
+    foreach(__library ${__libraries})
     if(TARGET ${__library})
       list(APPEND CPPNETLIB_LIBRARIES ${__library})
     else()
@@ -74,11 +74,10 @@
         PATHS ${CPPNETLIB_PATH}/lib64 ${CPPNETLIB_PATH}/lib)
       list(APPEND CPPNETLIB_LIBRARIES ${${__library}})
     endif()
-  endforeach()
-  mark_as_advanced(CPPNETLIB_LIBRARIES)
+    endforeach()
+    mark_as_advanced(CPPNETLIB_LIBRARIES)
 endif()

-# FOUND _______________________________________________________________________
 if(CPPNETLIB_FIND_REQUIRED)
   set(_cppnetlib_output 1)
 else()
@@ -88,7 +87,9 @@
 endif()

 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(CPPNETLIB DEFAULT_MSG CPPNETLIB_LIBRARIES CPPNETLIB_INCLUDE_DIR)
+find_package_handle_standard_args(CPPNETLIB DEFAULT_MSG
+                                  CPPNETLIB_LIBRARIES
+                                  CPPNETLIB_INCLUDE_DIR)

 if(CPPNETLIB_FOUND)
   set(CPPNETLIB_INCLUDE_DIRS ${CPPNETLIB_INCLUDE_DIR})


test: Fix test output conversion for `[` and `]`

When using `TEST_UPDATE` to convert the actual test output to the
expected test output we must convert `[` and `]` to `\[` and `\]`
to ensure it matches the actual content.

--- test/run.cmake
+++ test/run.cmake
@@ -90,7 +90,7 @@
   if("$ENV{TEST_UPDATE}" AND expect_xml_file AND EXISTS "${xml}")
     set(update_xml "${actual_xml}")
     string(REGEX REPLACE "^<\\?xml version=\"1.0\"\\?>" "^<\\\\?xml version=\"1.0\"\\\\?>" update_xml "${update_xml}")
-    string(REGEX REPLACE "([(*)])" "\\\\\\1" update_xml "${update_xml}")
+    string(REGEX REPLACE "([][(*)])" "\\\\\\1" update_xml "${update_xml}")
     string(REGEX REPLACE "<CastXML[^>]*>" "<CastXML[^>]*>" update_xml "${update_xml}")
     string(REGEX REPLACE "<GCC_XML[^>]*>" "<GCC_XML[^>]*>" update_xml "${update_xml}")
     string(REGEX REPLACE "mangled=\"[^\"]*\"" "mangled=\"[^\"]+\"" update_xml "${update_xml}")


build boost libraries both shared and dynamic

--- superbuild/External-Boost.cmake
+++ superbuild/External-Boost.cmake
@@ -41,6 +41,9 @@
 set(boost_toolset "--toolset=msvc-14.0")
 endif(MSVC_VERSION EQUAL 1500)

+
+
+
 if(${BUILD_SHARED_LIBS} MATCHES OFF)
   set(BUILD_LIBS "static")
 elseif(${BUILD_SHARED_LIBS} MATCHES ON)
@@ -53,7 +56,7 @@
   URL_MD5 ${Boost_md5}
   UPDATE_COMMAND ""
   CONFIGURE_COMMAND ${Boost_Bootstrap_Command} --prefix=${INSTALL_DEPENDENCIES_DIR}/lib
-  BUILD_COMMAND ${Boost_b2_Command} install -j8   --prefix=${INSTALL_DEPENDENCIES_DIR} --with-thread --with-filesystem --with-system --with-date_time --with-program_options  --with-atomic  address-model=${Boost_address_model} link=${BUILD_LIBS} ${boost_toolset}
+  BUILD_COMMAND ${Boost_b2_Command} install -j8   --prefix=${INSTALL_DEPENDENCIES_DIR} --with-thread --with-filesystem --with-system --with-date_time --with-program_options  --with-atomic  address-model=${Boost_address_model} link=static,shared ${boost_toolset}
   INSTALL_COMMAND ""
 )


allow option of compiling with libcurl. Turn on with cmake -DHTSLIB_USE_LIBCURL=1

--- cmake/BuildHtslib.cmake
+++ cmake/BuildHtslib.cmake
@@ -23,6 +23,11 @@
     )
 endif (NOT ZLIB_FOUND)

+if (HTSLIB_USE_LIBCURL)
+    set(HTSLIB_CONFIGURE_OPTIONS --enable-libcurl)
+    set(HTSLIB_XLIBRARIES curl crypto ssl)
+endif (HTSLIB_USE_LIBCURL)
+
 ExternalDependency_Add(
     htslib-1.3.2
     BUILD_BYPRODUCTS ${HTSLIB_LIB}
@@ -30,13 +35,13 @@
         URL ${CMAKE_SOURCE_DIR}/vendor/htslib-1.3.2.tgz
         SOURCE_DIR ${HTSLIB_ROOT}
         BINARY_DIR ${HTSLIB_ROOT}
-        CONFIGURE_COMMAND echo "Building htslib, build log at ${HTSLIB_LOG}"
+        CONFIGURE_COMMAND ./configure --prefix=${HTSLIB_ROOT} ${HTSLIB_CONFIGURE_OPTIONS} && echo "Building htslib, build log at ${HTSLIB_LOG}"
         BUILD_COMMAND make INCLUDES=-I${ZLIB_INCLUDE_DIRS} > ${HTSLIB_LOG} 2>&1
         INSTALL_COMMAND "true"
 )

 set(HTSlib_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS};${HTSLIB_ROOT}/htslib)
-set(HTSlib_LIBRARIES ${HTSLIB_LIB} m ${ZLIB_LIBRARIES})
+set(HTSlib_LIBRARIES ${HTSLIB_LIB} m ${HTSLIB_XLIBRARIES} ${ZLIB_LIBRARIES})

 if (NOT ZLIB_FOUND)
     add_dependencies(htslib-1.3.2 zlib)


Use spaces instead tab.

Use spaces instead tab.

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -463,10 +463,10 @@
         )
     endif()

-	# set boost to use dynamic linking
-	if (NOT CEGUI_BUILD_STATIC_CONFIGURATION)
-		add_definitions( -DBOOST_TEST_DYN_LINK )
-	endif()
+    # set boost to use dynamic linking
+    if (NOT CEGUI_BUILD_STATIC_CONFIGURATION)
+        add_definitions( -DBOOST_TEST_DYN_LINK )
+    endif()

     if (NOT APPLE AND CEGUI_INSTALL_WITH_RPATH)
         set_target_properties(${CEGUI_TARGET_NAME} PROPERTIES


Do not pass MBEDTLS_VERSION_* as REQUIRED_VARS

find_package_handle_standard_args checks that all passed REQUIRED_VARS
are set to a "truthy" value. In cases where one of MBEDTLS_VERSION_*
variables has a value of 0, that made the whole find script fail.

--- cmake/FindMbedTLS.cmake
+++ cmake/FindMbedTLS.cmake
@@ -111,9 +111,6 @@
                                       MBEDTLS_X509_LIBRARY
                                       MBEDTLS_LIBRARIES
                                       MBEDTLS_VERSION
-                                      MBEDTLS_VERSION_MAJOR
-                                      MBEDTLS_VERSION_MINOR
-                                      MBEDTLS_VERSION_PATCH
                                   VERSION_VAR MBEDTLS_VERSION)


Improve the find package superlu script to create a superlu target.

--- cmake/FindSuperLU.cmake
+++ cmake/FindSuperLU.cmake
@@ -12,13 +12,29 @@
   PATHS
   $ENV{SUPERLUDIR}
   ${INCLUDE_INSTALL_DIR}
+  ${SUPERLU_INSTALL_DIR}
   PATH_SUFFIXES
   superlu
+  include/superlu
   SRC
 )

+if (SuperLU_FIND_VERSION_EXACT)
+  set(_SUPERLU_KNOWN_VERSIONS ${SuperLU_FIND_VERSION})
+else()
+  set(_SUPERLU_KNOWN_VERSIONS ${SuperLU_FIND_VERSION} "5.2.1" "5.2" "5.1.1" "5.1" "5.0" "4.3" "4.2" "4.2" "4.0" "3.1" "3.0")
+endif()
+
+set(_SUPERLU_LIBRARY_NAMES)
+foreach(_VERSION ${_SUPERLU_KNOWN_VERSIONS})
+  list(APPEND _SUPERLU_LIBRARY_NAMES "superlu_${_VERSION}" "superlu-${_VERSION}")
+endforeach()
+list(APPEND _SUPERLU_LIBRARY_NAMES "superlu")
+unset(_VERSION)
+unset(_SUPERLU_KNOWN_VERSIONS)
+
 find_library(SUPERLU_LIBRARIES
-  NAMES "superlu_5.2.1" "superlu_5.2" "superlu_5.1.1" "superlu_5.1" "superlu_5.0" "superlu_4.3" "superlu_4.2" "superlu_4.1" "superlu_4.0" "superlu_3.1" "superlu_3.0" "superlu"
+  NAMES ${_SUPERLU_LIBRARY_NAMES}
   PATHS $ENV{SUPERLUDIR} ${LIB_INSTALL_DIR}
   PATH_SUFFIXES lib)

@@ -96,5 +112,33 @@

 mark_as_advanced(SUPERLU_INCLUDES SUPERLU_LIBRARIES)

+if(SUPERLU_FOUND)
+  if (NOT TARGET superlu)
+    if (NOT CMAKE_CFG_INTDIR STREQUAL .)
+        string(TOUPPER ${CMAKE_CFG_INTDIR} _CURRENT_BUILD_TYPE)
+    elseif(CMAKE_BUILD_TYPE)
+        string(TOUPPER ${CMAKE_BUILD_TYPE} _CURRENT_BUILD_TYPE)
+    else()
+        set(_CURRENT_BUILD_TYPE NOCONFIG)
+    endif()
+    set(_FIRST_LIB ${SUPERLU_LIBRARIES})
+    # I'm not aware of a framework for SuperLU but just in case.
+    # Treat apple frameworks separate
+    # See http://stackoverflow.com/questions/12547624/cant-link-macos-frameworks-with-cmake
+    if(APPLE AND ${_FIRST_LIB} MATCHES ".framework$")
+        string(REGEX REPLACE ".*/([A-Za-z0-9.]+).framework$" "\\1" FW_NAME ${_FIRST_LIB})
+        #message(STATUS "Matched '${FW_NAME}' to ${LIB}")
+        set(_FIRST_LIB "${_FIRST_LIB}/${FW_NAME}")
+    endif()

+    add_library(superlu UNKNOWN IMPORTED)
+    set_target_properties(superlu PROPERTIES
+      IMPORTED_LOCATION_${_CURRENT_BUILD_TYPE} ${_FIRST_LIB}
+      IMPORTED_CONFIGURATIONS ${_CURRENT_BUILD_TYPE}
+      INTERFACE_INCLUDE_DIRECTORIES ${SUPERLU_INCLUDES}
+    )

+    unset(_CURRENT_BUILD_TYPE)
+    unset(_FIRST_LIB)
+  endif()
+endif()


removed saigaconfig.cmake

removed saigaconfig.cmake

--- cmake/SAIGAConfig.cmake
+++ cmake/SAIGAConfig.cmake
@@ -1,58 +0,0 @@
-# Locates the SAIGA library
-# This module defines:
-# SAIGA_FOUND
-# SAIGA_INCLUDE_DIRS
-# SAIGA_LIBRARIES
-# SAIGA_LIBRARY
-
-
-find_path(SAIGA_INCLUDE_DIRS
-	NAMES
-		saiga/rendering/deferred_renderer.h
-	PATHS
-          	/usr/local/include
-)
-
-find_library(SAIGA_LIBRARY
-	NAMES
-		saiga
-    	PATHS
-		/usr/local/lib
-)
-
-
-#GLM is required
-find_path(SAIGA_GLM_INCLUDE_DIRS
-	NAMES
-		glm.hpp
-	PATHS
-		/usr/local/include
-		/usr/include
-		/usr/local/include
-	PATH_SUFFIXES
-		glm
-)
-
-
-#OpenGL is required
-find_package(OpenGL REQUIRED QUIET)
-
-#GLEW is required
-find_package(GLEW REQUIRED QUIET)
-
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(
-	saiga
-	DEFAULT_MSG
-        SAIGA_INCLUDE_DIRS
-        SAIGA_GLM_INCLUDE_DIRS
-        SAIGA_LIBRARY
-        OPENGL_LIBRARIES
-        GLEW_LIBRARIES
-)
-
-SET(SAIGA_INCLUDE_DIRS ${SAIGA_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIRS})
-SET(SAIGA_LIBRARY ${SAIGA_LIBRARY} ${OPENGL_LIBRARIES} ${GLEW_LIBRARIES})
-
-set(SAIGA_LIBRARIES ${SAIGA_LIBRARY})


Add version information to pkgconfig files.

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -303,7 +303,7 @@
         set(PKG_INTERNAL_DEPS "${PKG_INTERNAL_DEPS} -l${_dep}")
     endforeach(_dep)

-    set(_pc_file ${CMAKE_CURRENT_BINARY_DIR}/${_name}.pc)
+    set(_pc_file ${CMAKE_CURRENT_BINARY_DIR}/${_name}-${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}.pc)
     configure_file(${PROJECT_SOURCE_DIR}/cmake/pkgconfig.cmake.in ${_pc_file}
         @ONLY)
     install(FILES ${_pc_file} DESTINATION ${PKGCFG_INSTALL_DIR}


libs weren't linked against boost ?

libs weren't linked against boost ?

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -77,6 +77,8 @@
         set(_lib_type "STATIC")
     endif(PCL_SHARED_LIBS)
     add_library(${_name} ${_lib_type} ${ARGN})
+    #must link explicitly against boost.
+    target_link_libraries(${_name} ${Boost_LIBRARIES})
     set_target_properties(${_name} PROPERTIES
         VERSION ${PCL_VERSION}
         SOVERSION ${PCL_MAJOR_VERSION})


Add extra include directory as well.

Add extra include directory as well.

--- build_settings.cmake
+++ build_settings.cmake
@@ -63,6 +63,9 @@
     set(VALGRIND_COMMAND "${VALGRIND_EXECUTABLE} ${VALGRIND_OPTIONS}")
 endif()

+if(EXTRA_INCLUDE_DIRECTORY)
+    include_directories(${EXTRA_INCLUDE_DIRECTORY})
+endif()
 if(EXTRA_LINK_DIRECTORY)
     link_directories(${EXTRA_LINK_DIRECTORY})
 endif()


Push ParaView forward

Push ParaView forward

--- versions.cmake
+++ versions.cmake
@@ -92,7 +92,7 @@
   set(_paraview_revision "master")
 else()
   # Test the revision with OpenGL2 rendering before updating, update often!
-  set(_paraview_revision "21353a09b9172b4204e9412716e978fdd30da7d2")
+  set(_paraview_revision "992e4cf60f52254989952ff86d9e8366127f615e")
 endif()
 add_revision(paraview
   GIT_REPOSITORY "https://gitlab.kitware.com/paraview/paraview.git"


Fix comment

Fix comment

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -615,7 +615,7 @@
   ${CMAKE_OSX_SYSROOT_INT}/System/Library/Frameworks
   ${CMAKE_FRAMEWORK_PATH} CACHE STRING "Frameworks search paths")

-# Only search the specified iOS SDK, not the remainder of the host filesystem.
+# By default, search both the specified iOS SDK and the remainder of the host filesystem.
 if(NOT CMAKE_FIND_ROOT_PATH_MODE_PROGRAM)
   set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH CACHE STRING "" ${FORCE_CACHE})
 endif()


Add OS64 platform support

Add OS64 platform support

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -134,6 +134,11 @@
   set(XCODE_IOS_PLATFORM iphoneos)
   if(NOT IOS_ARCH)
     set(IOS_ARCH armv7 armv7s arm64)
+  endif()
+ elseif (IOS_PLATFORM STREQUAL "OS64")
+  set(XCODE_IOS_PLATFORM iphoneos)
+  if(NOT IOS_ARCH)
+    set(IOS_ARCH arm64)
   endif()
 elseif (IOS_PLATFORM STREQUAL "SIMULATOR")
   set(XCODE_IOS_PLATFORM iphonesimulator)


Temporarily fix the install combined by excluding arm64 for simulator builds.

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -149,6 +149,8 @@
 # if you don't set a deployment target it will be set the way you only get 64-bit builds
 if(NOT DEFINED DEPLOYMENT_TARGET AND XCODE_VERSION VERSION_GREATER 12.0)
   option(DROP_32_BIT "Will make drop 32-bit support universally. On later sdks you won't be able to build 32-bit apps" yes)
+  # Temporarily fix the arm64 issues in CMake install-combined by excluding arm64 for simulator builds (needed for Apple Silicon...)
+  set(CMAKE_XCODE_ATTRIBUTE_EXCLUDED_ARCHS[sdk=iphonesimulator*] "arm64")
 endif()

 ######## ALIASES (DEPRECATION WARNINGS)


utils/vlog: created target to update golden reference

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

--- utils/vlog/tests/v2x_tests.cmake
+++ utils/vlog/tests/v2x_tests.cmake
@@ -43,6 +43,9 @@
   diff(NAME ${V2X_GENERIC_TEST_NAME}_${V2X_GENERIC_TEST_TYPE}_diff GOLDEN ${V2X_GENERIC_TEST_NAME}.${V2X_GENERIC_TEST_TYPE}.golden.xml ACTUAL ${V2X_GENERIC_TEST_NAME}.${V2X_GENERIC_TEST_TYPE}.actual.xml)

   add_dependencies(all_v2x_tests ${V2X_GENERIC_TEST_NAME}_${V2X_GENERIC_TEST_TYPE}_diff)
+
+  # TODO This has to be completed in order update the golden pb_type/model accordingly
+  add_custom_target(${V2X_GENERIC_TEST_NAME}_update_golden_${V2X_GENERIC_TEST_TYPE})
 endfunction(V2X_GENERIC_TEST)

 function(V2X_TEST_MODEL)


Change run clang-format to relative command

--- clang-format.cmake
+++ clang-format.cmake
@@ -10,5 +10,5 @@

 add_custom_target(
 	style
-	COMMAND /usr/bin/clang-format -style=file
+	COMMAND clang-format -style=file
 	-i ${STYLE_SRC})


Begin adding script utility to platformer.

--- cmake/FileList.cmake
+++ cmake/FileList.cmake
@@ -216,6 +216,7 @@
 src/platformer/game/tile.cpp
 src/platformer/game/world.cpp
 src/platformer/object/object.cpp
+src/platformer/script/script.cpp
 )

 set(TRIGGER_SRC


Updated documentation

Updated documentation

--- cmake/gsConfig.cmake
+++ cmake/gsConfig.cmake
@@ -46,7 +46,7 @@
    set (GISMO_INDEX_TYPE "int" CACHE STRING
    #math(EXPR BITSZ_VOID_P "8*${CMAKE_SIZEOF_VOID_P}")
    #set (GISMO_INDEX_TYPE "int${BITSZ_VOID_P}_t" CACHE STRING
-   "Index type(int, unsigned, size_t)" FORCE)
+   "Index type(int, int32_t, int64_t, unsigned, size_t)" FORCE)
    set_property(CACHE GISMO_INDEX_TYPE PROPERTY STRINGS
    "int" "int32_t" "int64_t" "unsigned" "size_t" )
 endif()


CMake: Fix gcc static build lto

CMake: Fix gcc static build lto

--- cmake/pybind11.cmake
+++ cmake/pybind11.cmake
@@ -40,7 +40,14 @@
         # Prevent setting the /GL and -LTCG flag
         set(PYBIND11_LTO_CXX_FLAGS "" CACHE INTERNAL "")
         set(PYBIND11_LTO_LINKER_FLAGS "" CACHE INTERNAL "")
-    endif(MSVC)
+    elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+        # Workaround
+        CHECK_CXX_COMPILER_FLAG("-flto-partition=none" HAS_LTO_PARTITION_FLAG)
+        if(HAS_LTO_PARTITION_FLAG)
+            set(PYBIND11_LTO_CXX_FLAGS "" CACHE INTERNAL "")
+            set(PYBIND11_LTO_LINKER_FLAGS "-flto-partition=one" CACHE INTERNAL "")
+        endif(HAS_LTO_PARTITION_FLAG)
+    endif()
 endif(PYTHONLIBS_FOUND)


Some minor cleaning up [ci skip].

Some minor cleaning up [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -857,34 +857,32 @@
 #===============================================================================

 MACRO(OS_X_CLEAN_UP_FILE_WITH_QT_LIBRARIES DIRNAME FILENAME)
-    # Note: we only clean up the file with Qt libraries if we are to package
-    #       OpenCOR. Indeed, if we were to do this when building OpenCOR for,
-    #       say, debugging purposes, then we would end up with two sets of Qt
-    #       libraries (one in /Applications/Qt5 and another in the OpenCOR
-    #       bundle), potentially confusing tools such as Xcode, generating
-    #       messages like "XXX is implemented in both YYY and ZZZ. One of the
-    #       two will be used. Which one is undefined." even though everything is
-    #       actually fine...
+    # Strip the Qt file of all local symbols
+
+    SET(FULL_FILENAME ${DIRNAME}/${FILENAME})
+
+    IF(RELEASE_MODE)
+        ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
+                           COMMAND strip -x ${FULL_FILENAME})
+    ENDIF()
+
+    # Clean up the Qt file's id
+
+    ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
+                       COMMAND install_name_tool -id ${FILENAME}
+                                                     ${FULL_FILENAME})
+
+    # Make sure that the Qt file refers to our embedded version of its Qt
+    # dependencies
+    # Note: we only do this if we are to package OpenCOR. Indeed, if we were to
+    #       do this when building OpenCOR for, say, debugging purposes, then we
+    #       would end up with two sets of Qt libraries (one in /Applications/Qt5
+    #       and another in the OpenCOR bundle), potentially confusing tools such
+    #       as Xcode, generating messages like "XXX is implemented in both YYY
+    #       and ZZZ. One of the two will be used. Which one is undefined." even
+    #       though everything is actually fine...

     IF("$ENV{PACKAGE_OPENCOR}" STREQUAL "True")
-        # Strip the Qt file of all local symbols
-
-        SET(FULL_FILENAME ${DIRNAME}/${FILENAME})
-
-        IF(RELEASE_MODE)
-            ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
-                               COMMAND strip -x ${FULL_FILENAME})
-        ENDIF()
-
-        # Clean up the Qt file's id
-
-        ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
-                           COMMAND install_name_tool -id ${FILENAME}
-                                                         ${FULL_FILENAME})
-
-        # Make sure that the Qt file refers to our embedded version of its Qt
-        # dependencies
-
         FOREACH(DEPENDENCY ${ARGN})
             SET(DEPENDENCY_FILENAME ${DEPENDENCY}.framework/Versions/${QT_VERSION_MAJOR}/${DEPENDENCY})


changed download url for yapsy

changed download url for yapsy

--- yapsy.cmake
+++ yapsy.cmake
@@ -13,7 +13,7 @@
     1.10.2
     Yapsy-1.10.2-pythons2n3.tar.gz
     d905b574d4f55ff62e02603ec3dc89b3
-    https://pypi.python.org/packages/source/Y/Yapsy
+    http://downloads.sourceforge.net/project/yapsy/Yapsy-1.10.2
     FORCE)

 message ("Installing ${yapsy_NAME} into ilastik build area: ${BUILDEM_DIR} ...")


Added OPENTHREADS_ATOMIC_USE_MUTEX Cmake options that allows you to override the default detection of atomic implementatition, making it possible to force the use of Mutex for OpenThreads::Atomic, and as a consequence for use of Mutex for Referenced::ref/unref() counting.

--- CMakeModules/CheckAtomicOps.cmake
+++ CMakeModules/CheckAtomicOps.cmake
@@ -2,121 +2,136 @@
 # This module defines
 # OPENTHREADS_HAVE_ATOMIC_OPS

-INCLUDE(CheckCXXSourceRuns)
+OPTION(OPENTHREADS_ATOMIC_USE_MUTEX "Set to ON to force OpenThreads to use a mutex for Atmoic." OFF)

-# Do step by step checking,
-CHECK_CXX_SOURCE_RUNS("
-#include <cstdlib>
+IF (OPENTHREADS_ATOMIC_USE_MUTEX)

-int main()
-{
-   unsigned value = 0;
-   void* ptr = &value;
-   __sync_add_and_fetch(&value, 1);
-   __sync_synchronize();
-   __sync_sub_and_fetch(&value, 1);
-   if (!__sync_bool_compare_and_swap(&value, 0, 1))
-      return EXIT_FAILURE;
-
-   if (!__sync_bool_compare_and_swap(&ptr, ptr, ptr))
-      return EXIT_FAILURE;
+    SET(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS 0)
+    SET(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS 0)
+    SET(_OPENTHREADS_ATOMIC_USE_SUN 0)
+    SET(_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED 0)
+    SET(_OPENTHREADS_ATOMIC_USE_BSD_ATOMIC 0)

-   return EXIT_SUCCESS;
-}
-" _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS)
+    SET(_OPENTHREADS_ATOMIC_USE_MUTEX 1)

-CHECK_CXX_SOURCE_RUNS("
-#include <stdlib.h>
+ELSE()

-int main(int, const char**)
-{
-   unsigned value = 0;
-   void* ptr = &value;
-   __add_and_fetch(&value, 1);
-   __synchronize(value);
-   __sub_and_fetch(&value, 1);
-   if (!__compare_and_swap(&value, 0, 1))
-      return EXIT_FAILURE;
-
-   if (!__compare_and_swap((unsigned long*)&ptr, (unsigned long)ptr, (unsigned long)ptr))
-      return EXIT_FAILURE;
+    INCLUDE(CheckCXXSourceRuns)

-   return EXIT_SUCCESS;
-}
-" _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS)
+    # Do step by step checking,
+    CHECK_CXX_SOURCE_RUNS("
+    #include <cstdlib>

-CHECK_CXX_SOURCE_RUNS("
-#include <atomic.h>
-#include <cstdlib>
+    int main()
+    {
+       unsigned value = 0;
+       void* ptr = &value;
+       __sync_add_and_fetch(&value, 1);
+       __sync_synchronize();
+       __sync_sub_and_fetch(&value, 1);
+       if (!__sync_bool_compare_and_swap(&value, 0, 1))
+          return EXIT_FAILURE;

-int main(int, const char**)
-{
-   uint_t value = 0;
-   void* ptr = &value;
-   atomic_inc_uint_nv(&value);
-   membar_consumer();
-   atomic_dec_uint_nv(&value);
-   if (0 != atomic_cas_uint(&value, 0, 1))
-      return EXIT_FAILURE;
-
-   if (ptr != atomic_cas_ptr(&ptr, ptr, ptr))
-      return EXIT_FAILURE;
+       if (!__sync_bool_compare_and_swap(&ptr, ptr, ptr))
+          return EXIT_FAILURE;

-   return EXIT_SUCCESS;
-}
-" _OPENTHREADS_ATOMIC_USE_SUN)
+       return EXIT_SUCCESS;
+    }
+    " _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS)

-CHECK_CXX_SOURCE_RUNS("
-#include <windows.h>
-#include <intrin.h>
-#include <cstdlib>
+    CHECK_CXX_SOURCE_RUNS("
+    #include <stdlib.h>

-#pragma intrinsic(_InterlockedAnd)
-#pragma intrinsic(_InterlockedOr)
-#pragma intrinsic(_InterlockedXor)
+    int main(int, const char**)
+    {
+       unsigned value = 0;
+       void* ptr = &value;
+       __add_and_fetch(&value, 1);
+       __synchronize(value);
+       __sub_and_fetch(&value, 1);
+       if (!__compare_and_swap(&value, 0, 1))
+          return EXIT_FAILURE;

-int main(int, const char**)
-{
-   volatile long value = 0;
-   long data = 0;
-   long* volatile ptr = &data;
+       if (!__compare_and_swap((unsigned long*)&ptr, (unsigned long)ptr, (unsigned long)ptr))
+          return EXIT_FAILURE;

-   InterlockedIncrement(&value);
-   MemoryBarrier();
-   InterlockedDecrement(&value);
+       return EXIT_SUCCESS;
+    }
+    " _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS)

-   if (0 != InterlockedCompareExchange(&value, 1, 0))
-      return EXIT_FAILURE;
+    CHECK_CXX_SOURCE_RUNS("
+    #include <atomic.h>
+    #include <cstdlib>

-   if (ptr != InterlockedCompareExchangePointer((PVOID volatile*)&ptr, (PVOID)ptr, (PVOID)ptr))
-      return EXIT_FAILURE;
+    int main(int, const char**)
+    {
+       uint_t value = 0;
+       void* ptr = &value;
+       atomic_inc_uint_nv(&value);
+       membar_consumer();
+       atomic_dec_uint_nv(&value);
+       if (0 != atomic_cas_uint(&value, 0, 1))
+          return EXIT_FAILURE;

-   return EXIT_SUCCESS;
-}
-" _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED)
+       if (ptr != atomic_cas_ptr(&ptr, ptr, ptr))
+          return EXIT_FAILURE;

-CHECK_CXX_SOURCE_RUNS("
-#include <libkern/OSAtomic.h>
+       return EXIT_SUCCESS;
+    }
+    " _OPENTHREADS_ATOMIC_USE_SUN)

-int main()
-{
-  volatile int32_t value = 0;
-  long data = 0;
-  long * volatile ptr = &data;
-
-  OSAtomicIncrement32(&value);
-  OSMemoryBarrier();
-  OSAtomicDecrement32(&value);
-  OSAtomicCompareAndSwapInt(value, 1, &value);
-  OSAtomicCompareAndSwapPtr(ptr, ptr, (void * volatile *)&ptr);
-}
-" _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC)
+    CHECK_CXX_SOURCE_RUNS("
+    #include <windows.h>
+    #include <intrin.h>
+    #include <cstdlib>

+    #pragma intrinsic(_InterlockedAnd)
+    #pragma intrinsic(_InterlockedOr)
+    #pragma intrinsic(_InterlockedXor)

-IF(NOT _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS AND
-   NOT _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS AND
-   NOT _OPENTHREADS_ATOMIC_USE_SUN AND
-   NOT _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED AND
-   NOT _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC)
-           SET(_OPENTHREADS_ATOMIC_USE_MUTEX 1)
+    int main(int, const char**)
+    {
+       volatile long value = 0;
+       long data = 0;
+       long* volatile ptr = &data;
+
+       InterlockedIncrement(&value);
+       MemoryBarrier();
+       InterlockedDecrement(&value);
+
+       if (0 != InterlockedCompareExchange(&value, 1, 0))
+          return EXIT_FAILURE;
+
+       if (ptr != InterlockedCompareExchangePointer((PVOID volatile*)&ptr, (PVOID)ptr, (PVOID)ptr))
+          return EXIT_FAILURE;
+
+       return EXIT_SUCCESS;
+    }
+    " _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED)
+
+    CHECK_CXX_SOURCE_RUNS("
+    #include <libkern/OSAtomic.h>
+
+    int main()
+    {
+      volatile int32_t value = 0;
+      long data = 0;
+      long * volatile ptr = &data;
+
+      OSAtomicIncrement32(&value);
+      OSMemoryBarrier();
+      OSAtomicDecrement32(&value);
+      OSAtomicCompareAndSwapInt(value, 1, &value);
+      OSAtomicCompareAndSwapPtr(ptr, ptr, (void * volatile *)&ptr);
+    }
+    " _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC)
+
+    IF(NOT _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS AND
+       NOT _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS AND
+       NOT _OPENTHREADS_ATOMIC_USE_SUN AND
+       NOT _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED AND
+       NOT _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC)
+               SET(_OPENTHREADS_ATOMIC_USE_MUTEX 1)
+    ENDIF()
+
 ENDIF()


copy wx include directory during postinstall step on unix

* copy_directory is no longer part of stage_hdrs target (which is used by both unix and windows)
* cmake version 3.12.0 was failing because the include directory doesn't exist on Windows
* also additional clean-up and comments added

issue https://github.com/smanders/externpro/issues/203#issuecomment-410059499

--- projects/wx.cmake
+++ projects/wx.cmake
@@ -136,22 +136,16 @@
     endforeach()
     list(GET BUILD_CONFIGS 0 config)
   endif()
-  # stage_hdrs is a one-time thing, so copy headers from one of the wx build
-  # targets, but depend on all of them so this will always happen last
-  # (and wxx can depend on this)
   ExternalProject_Get_Property(wx${wx_VER} SOURCE_DIR)
   ExternalProject_Get_Property(wx${wx_VER}_${config} BINARY_DIR)
-  ExternalProject_Get_Property(wx${wx_VER}_${config} INSTALL_DIR)
   set(wxSOURCE_DIR ${SOURCE_DIR})
   set(wxBINARY_DIR ${BINARY_DIR})
-  set(wxINSTALL_DIR ${INSTALL_DIR})
   set(wxWINUNDEF ${wxSOURCE_DIR}/include/wx/msw/winundef.h)
+  set(TIFF_HDRS "src/tiff/libtiff/*.h")
   if(${wx_VER} EQUAL 31)
     set(wxSTAGE_DIR ${STAGE_DIR}/include/wx-3.1)
-    set(TIFF_HDRS "src/tiff/libtiff/*.h")
   elseif(${wx_VER} EQUAL 30)
     set(wxSTAGE_DIR ${STAGE_DIR}/include/wx-3.0)
-    set(TIFF_HDRS "src/tiff/libtiff/*.h")
   else()
     message(FATAL_ERROR "wx.cmake: wx version ${wx_VER} support lacking")
   endif()
@@ -159,14 +153,14 @@
     ExternalProject_Add(wx${wx_VER}_stage_hdrs DEPENDS ${wx${wx_VER}targets}
       DOWNLOAD_COMMAND "" DOWNLOAD_DIR ${NULL_DIR} BINARY_DIR ${NULL_DIR}
       SOURCE_DIR ${wxSOURCE_DIR}  INSTALL_DIR ${wxSTAGE_DIR}
-      PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory
-        ${wxINSTALL_DIR}/include/ ${STAGE_DIR}/include/
+      PATCH_COMMAND ""
       CONFIGURE_COMMAND ${CMAKE_COMMAND} -Dsrc:STRING=${wxWINUNDEF}
         -Ddst:STRING=<INSTALL_DIR>/externpro/
         -P ${MODULES_DIR}/cmscopyfiles.cmake
       BUILD_COMMAND ${CMAKE_COMMAND} -Dsrc:STRING=${wxSOURCE_DIR}/${TIFF_HDRS}
         -Ddst:STRING=<INSTALL_DIR>/wx/tiff/
         -P ${MODULES_DIR}/cmscopyfiles.cmake
+      # TRICKY: copy tiffconf.h from BINARY_DIR on Linux
       INSTALL_COMMAND ${CMAKE_COMMAND} -Dsrc:STRING=${wxBINARY_DIR}/${TIFF_HDRS}
         -Ddst:STRING=<INSTALL_DIR>/wx/tiff/
         -P ${MODULES_DIR}/cmscopyfiles.cmake
@@ -206,6 +200,10 @@
     ExternalProject_Add_Step(${XP_TARGET} postinstall_${XP_TARGET}
       COMMAND ${CMAKE_COMMAND} -E copy_directory
         <INSTALL_DIR>/lib ${STAGE_DIR}/lib
+      # NOTE: copying the include directory here would be duplicated
+      # if we ever again build more BUILD_CONFIGS than just Release
+      COMMAND ${CMAKE_COMMAND} -E copy_directory
+        <INSTALL_DIR>/include ${STAGE_DIR}/include
       DEPENDEES install
       )
     set_property(TARGET ${XP_TARGET} PROPERTY FOLDER ${bld_folder})


Fix missing rt lib

Fix missing rt lib

--- cmake/posix/px4_impl_posix.cmake
+++ cmake/posix/px4_impl_posix.cmake
@@ -176,6 +176,10 @@
 		-include ${PX4_INCLUDE_DIR}visibility.h
                 )

+        set(added_exe_linker_flags
+		-lpthread
+		)
+
 else()

         set(added_definitions
@@ -185,11 +189,12 @@
 		-Dnoreturn_function=__attribute__\(\(noreturn\)\)
 		-include ${PX4_INCLUDE_DIR}visibility.h
                 )
+
+        set(added_exe_linker_flags
+		-lpthread -lrt
+		)
+
 endif()
-
-        set(added_exe_linker_flags
-		-lpthread
-		)

 	# Add the toolchain specific flags


Sorted cvconfig.h.cmake in alphabetical order.

--- cmake/templates/cvconfig.h.cmake
+++ cmake/templates/cvconfig.h.cmake
@@ -1,5 +1,20 @@
-/* Video for Windows support */
-#cmakedefine HAVE_VFW
+/* OpenCV compiled as static or dynamic libs */
+#cmakedefine BUILD_SHARED_LIBS
+
+/* Compile for 'real' NVIDIA GPU architectures */
+#define CUDA_ARCH_BIN "${OPENCV_CUDA_ARCH_BIN}"
+
+/* Create PTX or BIN for 1.0 compute capability */
+#cmakedefine CUDA_ARCH_BIN_OR_PTX_10
+
+/* NVIDIA GPU features are used */
+#define CUDA_ARCH_FEATURES "${OPENCV_CUDA_ARCH_FEATURES}"
+
+/* Compile for 'virtual' NVIDIA PTX architectures */
+#define CUDA_ARCH_PTX "${OPENCV_CUDA_ARCH_PTX}"
+
+/* AVFoundation video libraries */
+#cmakedefine HAVE_AVFOUNDATION

 /* V4L capturing support */
 #cmakedefine HAVE_CAMV4L
@@ -7,17 +22,29 @@
 /* V4L2 capturing support */
 #cmakedefine HAVE_CAMV4L2

-/* V4L2 capturing support in videoio.h */
-#cmakedefine HAVE_VIDEOIO
-
-/* V4L/V4L2 capturing support via libv4l */
-#cmakedefine HAVE_LIBV4L
-
 /* Carbon windowing environment */
 #cmakedefine HAVE_CARBON

+/* AMD's Basic Linear Algebra Subprograms Library*/
+#cmakedefine HAVE_CLAMDBLAS
+
+/* AMD's OpenCL Fast Fourier Transform Library*/
+#cmakedefine HAVE_CLAMDFFT
+
 /* Cocoa API */
 #cmakedefine HAVE_COCOA
+
+/* C= */
+#cmakedefine HAVE_CSTRIPES
+
+/* NVidia Cuda Basic Linear Algebra Subprograms (BLAS) API*/
+#cmakedefine HAVE_CUBLAS
+
+/* NVidia Cuda Runtime API*/
+#cmakedefine HAVE_CUDA
+
+/* NVidia Cuda Fast Fourier Transform (FFT) API*/
+#cmakedefine HAVE_CUFFT

 /* IEEE1394 capturing support */
 #cmakedefine HAVE_DC1394
@@ -28,129 +55,103 @@
 /* IEEE1394 capturing support - libdc1394 v2.x */
 #cmakedefine HAVE_DC1394_2

+/* DirectShow Video Capture library */
+#cmakedefine HAVE_DSHOW
+
+/* Eigen Matrix & Linear Algebra Library */
+#cmakedefine HAVE_EIGEN
+
+/* FFMpeg video library */
+#cmakedefine HAVE_FFMPEG
+
+/* ffmpeg's libswscale */
+#cmakedefine HAVE_FFMPEG_SWSCALE
+
 /* ffmpeg in Gentoo */
 #cmakedefine HAVE_GENTOO_FFMPEG

-/* FFMpeg video library */
-#cmakedefine  HAVE_FFMPEG
-
-/* ffmpeg's libswscale */
-#cmakedefine  HAVE_FFMPEG_SWSCALE
-
 /* GStreamer multimedia framework */
-#cmakedefine  HAVE_GSTREAMER
+#cmakedefine HAVE_GSTREAMER

 /* GTK+ 2.0 Thread support */
-#cmakedefine  HAVE_GTHREAD
-
-/* Win32 UI */
-#cmakedefine HAVE_WIN32UI
+#cmakedefine HAVE_GTHREAD

 /* GTK+ 2.x toolkit */
-#cmakedefine  HAVE_GTK
-
-/* OpenEXR codec */
-#cmakedefine  HAVE_OPENEXR
+#cmakedefine HAVE_GTK

 /* Apple ImageIO Framework */
-#cmakedefine  HAVE_IMAGEIO
+#cmakedefine HAVE_IMAGEIO
+
+/* Intel Integrated Performance Primitives */
+#cmakedefine HAVE_IPP

 /* JPEG-2000 codec */
-#cmakedefine  HAVE_JASPER
+#cmakedefine HAVE_JASPER

 /* IJG JPEG codec */
-#cmakedefine  HAVE_JPEG
+#cmakedefine HAVE_JPEG

 /* libpng/png.h needs to be included */
-#cmakedefine  HAVE_LIBPNG_PNG_H
+#cmakedefine HAVE_LIBPNG_PNG_H

-/* PNG codec */
-#cmakedefine  HAVE_PNG
+/* V4L/V4L2 capturing support via libv4l */
+#cmakedefine HAVE_LIBV4L

-/* QuickTime video libraries */
-#cmakedefine  HAVE_QUICKTIME
-
-/* AVFoundation video libraries */
-#cmakedefine  HAVE_AVFOUNDATION
-
-/* TIFF codec */
-#cmakedefine  HAVE_TIFF
-
-/* Unicap video capture library */
-#cmakedefine  HAVE_UNICAP
-
-/* Xine video library */
-#cmakedefine  HAVE_XINE
-
-/* OpenNI library */
-#cmakedefine  HAVE_OPENNI
-
-/* Intel Integrated Performance Primitives */
-#cmakedefine  HAVE_IPP
-
-/* OpenCV compiled as static or dynamic libs */
-#cmakedefine  BUILD_SHARED_LIBS
-
-/* Define to 1 if your processor stores words with the most significant byte
-   first (like Motorola and SPARC, unlike Intel and VAX). */
-#cmakedefine  WORDS_BIGENDIAN
-
-/* Intel Threading Building Blocks */
-#cmakedefine  HAVE_TBB
-
-/* C= */
-#cmakedefine  HAVE_CSTRIPES
-
-/* Eigen Matrix & Linear Algebra Library */
-#cmakedefine  HAVE_EIGEN
-
-/* NVidia Cuda Runtime API*/
-#cmakedefine HAVE_CUDA
-
-/* NVidia Cuda Fast Fourier Transform (FFT) API*/
-#cmakedefine HAVE_CUFFT
-
-/* NVidia Cuda Basic Linear Algebra Subprograms (BLAS) API*/
-#cmakedefine HAVE_CUBLAS
+/* Microsoft Media Foundation Capture library */
+#cmakedefine HAVE_MSMF

 /* NVidia Video Decoding API*/
 #cmakedefine HAVE_NVCUVID

-/* Compile for 'real' NVIDIA GPU architectures */
-#define CUDA_ARCH_BIN "${OPENCV_CUDA_ARCH_BIN}"
-
-/* Compile for 'virtual' NVIDIA PTX architectures */
-#define CUDA_ARCH_PTX "${OPENCV_CUDA_ARCH_PTX}"
-
-/* NVIDIA GPU features are used */
-#define CUDA_ARCH_FEATURES "${OPENCV_CUDA_ARCH_FEATURES}"
-
-/* Create PTX or BIN for 1.0 compute capability */
-#cmakedefine CUDA_ARCH_BIN_OR_PTX_10
-
 /* OpenCL Support */
 #cmakedefine HAVE_OPENCL

-/* AMD's OpenCL Fast Fourier Transform Library*/
-#cmakedefine HAVE_CLAMDFFT
-
-/* AMD's Basic Linear Algebra Subprograms Library*/
-#cmakedefine HAVE_CLAMDBLAS
-
-/* DirectShow Video Capture library */
-#cmakedefine HAVE_DSHOW
-
-/* Microsoft Media Foundation Capture library */
-#cmakedefine HAVE_MSMF
-
-/* XIMEA camera support */
-#cmakedefine HAVE_XIMEA
+/* OpenEXR codec */
+#cmakedefine HAVE_OPENEXR

 /* OpenGL support*/
 #cmakedefine HAVE_OPENGL
+
+/* OpenNI library */
+#cmakedefine HAVE_OPENNI
+
+/* PNG codec */
+#cmakedefine HAVE_PNG

 /* Qt support */
 #cmakedefine HAVE_QT

 /* Qt OpenGL support */
 #cmakedefine HAVE_QT_OPENGL
+
+/* QuickTime video libraries */
+#cmakedefine HAVE_QUICKTIME
+
+/* Intel Threading Building Blocks */
+#cmakedefine HAVE_TBB
+
+/* TIFF codec */
+#cmakedefine HAVE_TIFF
+
+/* Unicap video capture library */
+#cmakedefine HAVE_UNICAP
+
+/* Video for Windows support */
+#cmakedefine HAVE_VFW
+
+/* V4L2 capturing support in videoio.h */
+#cmakedefine HAVE_VIDEOIO
+
+/* Win32 UI */
+#cmakedefine HAVE_WIN32UI
+
+/* XIMEA camera support */
+#cmakedefine HAVE_XIMEA
+
+/* Xine video library */
+#cmakedefine HAVE_XINE
+
+/* Define to 1 if your processor stores words with the most significant byte
+   first (like Motorola and SPARC, unlike Intel and VAX). */
+#cmakedefine WORDS_BIGENDIAN
+


Enable parallel build with MS VC++

Enable parallel build with MS VC++

--- cmake/compiler_settings.cmake
+++ cmake/compiler_settings.cmake
@@ -78,6 +78,11 @@
     endif()
 endif()

+# parallel build
+if(MSVC)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
+endif()
+
 # other compiler flags
 if(MSVC)
     # some of the clients are exceeding the 16-bit code section limit when building x64 debug, so use /bigobj when we build


Added support for `buildcache`.

Added support for `buildcache`.

Look for `clcache`/`ccache` only if we can't find `buildcache`.

--- cmake/environmentchecks.cmake
+++ cmake/environmentchecks.cmake
@@ -26,10 +26,12 @@
   find_package(Python ${PREFERRED_PYTHON_VERSION} COMPONENTS Interpreter Development)

   find_program(BUILDCACHE_EXE buildcache)
-  if(WIN32)
-    find_program(CLCACHE_EXE clcache)
-  else()
-    find_program(CCACHE_EXE ccache)
+  if(NOT BUILDCACHE_EXE)
+    if(WIN32)
+      find_program(CLCACHE_EXE clcache)
+    else()
+      find_program(CCACHE_EXE ccache)
+    endif()
   endif()
   find_program(CLANG_FORMAT_EXE NAMES ${PREFERRED_CLANG_FORMAT_NAMES} clang-format)
   find_program(CLANG_TIDY_EXE NAMES ${PREFERRED_CLANG_TIDY_NAMES} clang-tidy)
@@ -71,10 +73,12 @@

   set(CMAKE_REQUIRED_FLAGS ${_ORIGINAL_CMAKE_REQUIRED_FLAGS})

-  if(WIN32)
-    mark_as_advanced(CLCACHE_EXE)
-  else()
-    mark_as_advanced(CCACHE_EXE)
+  if(NOT BUILDCACHE_EXE)
+    if(WIN32)
+      mark_as_advanced(CLCACHE_EXE)
+    else()
+      mark_as_advanced(CCACHE_EXE)
+    endif()
   endif()

   mark_as_advanced(
@@ -132,15 +136,15 @@

 if(BUILDCACHE_EXE)
   set(BUILDCACHE_AVAILABLE TRUE CACHE INTERNAL "Executable required to cache compilations.")
-endif()
-
-if(WIN32)
-  if(CLCACHE_EXE)
-    set(CLCACHE_AVAILABLE TRUE CACHE INTERNAL "Executable required to cache compilations.")
-  endif()
 else()
-  if(CCACHE_EXE)
-    set(CCACHE_AVAILABLE TRUE CACHE INTERNAL "Executable required to cache compilations.")
+  if(WIN32)
+    if(CLCACHE_EXE)
+      set(CLCACHE_AVAILABLE TRUE CACHE INTERNAL "Executable required to cache compilations.")
+    endif()
+  else()
+    if(CCACHE_EXE)
+      set(CCACHE_AVAILABLE TRUE CACHE INTERNAL "Executable required to cache compilations.")
+    endif()
   endif()
 endif()


cmake/modules/FindNUMPY.cmake: Fixed how NumPy handles required nature.

--- cmake/modules/FindNUMPY.cmake
+++ cmake/modules/FindNUMPY.cmake
@@ -22,12 +22,11 @@
     CACHE PATH "Path to numpy include files" FORCE)

 IF(PYTHON_NUMPY_INCLUDE_DIR)
-    SET(NUMPY_FOUND TRUE)
+    MESSAGE(STATUS "Found Numpy")
+    MESSAGE(STATUS "  > includes:      ${PYTHON_NUMPY_INCLUDE_DIR}")
+ELSE()
+    MESSAGE(FATAL_ERROR "Could not find Numpy")
+ENDIF()

-    IF (NOT Numpy_FIND_QUIETLY)
-      MESSAGE(STATUS "Found Numpy")
-      MESSAGE(STATUS "  > includes:      ${PYTHON_NUMPY_INCLUDE_DIR}")
-    ENDIF()
-ELSE()
-    MESSAGE(FATAL_ERROR "Could not find Numpy.")
-ENDIF()
+
+MARK_AS_ADVANCED(PYTHON_NUMPY_INCLUDE_DIR)


Update to D11825.

Update to D11825.

Summary:
Adding `-latomic` to `ANDROID_LINKER_FLAGS` doesn't actually work.
Adding `atomic` to `LLDB_SYSTEM_LIBS` does.

Related: D11831.

Reviewers: Andrzej, ovyalov

Subscribers: tberghammer, danalbert, srhines, lldb-commits

Differential Revision: http://reviews.llvm.org/D11840

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@244343 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/platforms/Android.cmake
+++ cmake/platforms/Android.cmake
@@ -109,7 +109,11 @@
  endif()
 elseif( ANDROID_ABI STREQUAL "mips" )
  # http://b.android.com/182094
- set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -latomic" )
+ list( FIND LLDB_SYSTEM_LIBS atomic index )
+ if( index EQUAL -1 )
+  list( APPEND LLDB_SYSTEM_LIBS atomic )
+  set( LLDB_SYSTEM_LIBS ${LLDB_SYSTEM_LIBS} CACHE INTERNAL "" FORCE )
+ endif()
 endif()

 if( NOT LLVM_BUILD_STATIC )


ENH: remove java wrapping option from ci

--- CI/configure_options.cmake
+++ CI/configure_options.cmake
@@ -55,8 +55,7 @@
 OTB_MPIEXEC_OPT:STRING=--allow-run-as-root")

 set (otb_wrap_option
-"OTB_WRAP_JAVA:BOOL=ON
-OTB_WRAP_PYTHON:BOOL=ON")
+"OTB_WRAP_PYTHON:BOOL=ON")

 set (otb_data_option
 "OTB_DATA_USE_LARGEINPUT:BOOL=OFF


Build and install Boost in a single call to b2

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -131,12 +131,9 @@
   )

   if(MITK_USE_Boost_LIBRARIES)
-    set(_boost_build_cmd BUILD_COMMAND ${_build_cmd})
-    set(_install_cmd ${_build_cmd} install ${_macos_change_install_name_cmd} ${_windows_move_libs_cmd})
+    set(_boost_build_cmd BUILD_COMMAND ${_build_cmd} install ${_macos_change_install_name_cmd} ${_windows_move_libs_cmd})
   else()
-    set(_boost_build_cmd BUILD_COMMAND ${CMAKE_COMMAND} -E echo "no binary libraries")
-    set(_install_cmd ${CMAKE_COMMAND} -E echo "copying Boost header..."
-           COMMAND ${CMAKE_COMMAND} -E copy_directory "<SOURCE_DIR>/boost" "<INSTALL_DIR>/${_boost_install_include_dir}")
+    set(_boost_build_cmd BUILD_COMMAND ${_build_cmd} install)
   endif()

   ExternalProject_Add(${proj}-download
@@ -157,7 +154,7 @@
       --with-libraries=${_boost_libs}
       "--prefix=<INSTALL_DIR>"
     ${_boost_build_cmd}
-    INSTALL_COMMAND ${_install_cmd}
+    INSTALL_COMMAND "" # done in BUILD_COMMAND
     DEPENDS ${proj}-download ${proj_DEPENDENCIES}
     )


Update to DCMTK-3.6.1_20150924 in superbuild

--- CMakeExternals/DCMTK.cmake
+++ CMakeExternals/DCMTK.cmake
@@ -24,7 +24,7 @@
 endif()

 if(NOT DEFINED DCMTK_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
-  set(revision_tag ae3b946f6e6231)
+  set(revision_tag DCMTK-3.6.1_20150924)
   if(${proj}_REVISION_TAG)
     set(revision_tag ${${proj}_REVISION_TAG})
   endif()


Set revision to "default" when git is not available

This can happen when compiling releases which are downloaded without git files

--- CMakeModules/Version.cmake
+++ CMakeModules/Version.cmake
@@ -32,6 +32,11 @@
     OUTPUT_STRIP_TRAILING_WHITESPACE
 )

+IF(NOT GIT_COMMIT_HASH)
+    MESSAGE(STATUS "No git. Setting hash to default")
+    SET(GIT_COMMIT_HASH "default")
+ENDIF()
+
 CONFIGURE_FILE(
     ${CMAKE_MODULE_PATH}/version.h.in
     ${CMAKE_SOURCE_DIR}/include/af/version.h


fix submodules

fix submodules

--- cmake/Dependencies_core.cmake
+++ cmake/Dependencies_core.cmake
@@ -28,7 +28,13 @@
 #zlib
 find_package(ZLIB QUIET)
 if(${ZLIB_FOUND})
-    PackageHelper(ZLIB ${ZLIB_FOUND} "${ZLIB_INCLUDE_DIRS}" "${ZLIB_LIBRARIES}")
+
+    add_library(zlib INTERFACE)
+    target_link_libraries(zlib INTERFACE "${ZLIB_LIBRARIES}")
+    target_include_directories(zlib INTERFACE "${ZLIB_INCLUDE_DIRS}")
+
+    PackageHelperTarget(zlib ZLIB_FOUND)
+    #PackageHelper(ZLIB ${ZLIB_FOUND} "${ZLIB_INCLUDE_DIRS}" "${ZLIB_LIBRARIES}")
     SET(SAIGA_USE_ZLIB 1)
 elseif(SAIGA_USE_SUBMODULES)
      message("=================================")
@@ -38,7 +44,6 @@
   SET(SAIGA_USE_ZLIB 1)
   message("=================================")
 endif()
-

 # png
 find_package(PNG QUIET)
@@ -74,6 +79,21 @@

+
+#assimp
+find_package(ASSIMP QUIET)
+if(ASSIMP_FOUND)
+    PackageHelper(ASSIMP ${ASSIMP_FOUND} "${ASSIMP_INCLUDE_DIRS}" "${ASSIMP_LIBRARIES}")
+  SET(SAIGA_USE_ASSIMP 1)
+elseif(SAIGA_USE_SUBMODULES)
+     message("=================================")
+  message("Building Submodule assimp")
+  add_subdirectory(submodules/assimp)
+  PackageHelperTarget(assimp ASSIMP_FOUND)
+   SET(SAIGA_USE_ASSIMP 1)
+endif()
+
+
 #openmp
 if(SAIGA_CXX_WCLANG)
   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xclang -fopenmp")
@@ -148,17 +168,6 @@

-#assimp
-find_package(ASSIMP QUIET)
-PackageHelper(ASSIMP ${ASSIMP_FOUND} "${ASSIMP_INCLUDE_DIRS}" "${ASSIMP_LIBRARIES}")
-
-#set(CMAKE_FIND_DEBUG_MODE TRUE)
-#find_package(assimp CONFIG REQUIRED)
-#PackageHelperTarget(assimp::assimp ASSIMP_FOUND)
-if(ASSIMP_FOUND)
-  SET(SAIGA_USE_ASSIMP 1)
-endif()
-
 #libfreeimage
 find_package(FreeImagePlus QUIET)
 PackageHelper(FreeImagePlus ${FREEIMAGEPLUS_FOUND} "${FREEIMAGEPLUS_INCLUDE_PATH}" "${FREEIMAGEPLUS_LIBRARIES}")


Update protobuf lib

Update protobuf lib

--- cmake/external/protobuf.cmake
+++ cmake/external/protobuf.cmake
@@ -63,7 +63,7 @@
 ExternalProject_Add(${PROTOBUF_TARGET}
     PREFIX ${PROTOBUF_TARGET}
     GIT_REPOSITORY https://github.com/google/protobuf.git
-    GIT_TAG 1363bf9c051af36c555c23d734a204246c215697
+    GIT_TAG 204f99488ce1ef74565239cf3963111ae4c774b7
     UPDATE_COMMAND ""
     CONFIGURE_COMMAND ${CMAKE_COMMAND} ${PROTOBUF_INSTALL_DIR}/src/${PROTOBUF_TARGET}/cmake
         -G${CMAKE_GENERATOR}


Added botan-config-1.10 to list possible botan-config names

Such name is used on Fedora 20.

--- cmake/modules/FindBotan.cmake
+++ cmake/modules/FindBotan.cmake
@@ -14,7 +14,7 @@
 # libgcrypt is moving to pkg-config, but earlier version don't have it

 #search in typical paths for libgcrypt-config
-FIND_PROGRAM(BOTANCONFIG_EXECUTABLE NAMES botan-config)
+FIND_PROGRAM(BOTANCONFIG_EXECUTABLE NAMES botan-config botan-config-1.10)

 #reset variables
 set(BOTAN_LIBRARIES)


cmake/modules/FindVIGRA.cmake: Rename VIGRA_VIGRANUMPYCORE_LIBRARY_DIR to the more general VIGRANUMPY_SITEPACKAGE_DIR.

--- cmake/modules/FindVIGRA.cmake
+++ cmake/modules/FindVIGRA.cmake
@@ -4,7 +4,7 @@
 #  VIGRA_FOUND              - Set to false, or undefined, if vigra isn't found.
 #  VIGRA_INCLUDE_DIR        - Vigra include directory.
 #  VIGRA_VIGRANUMPYCORE_LIBRARY      - Vigra's vigranumpycore library
-#  VIGRA_VIGRANUMPYCORE_LIBRARY_DIR  - path to Vigra vigranumpycore library
+#  VIGRANUMPY_SITEPACKAGE_DIR  - path to Vigra vigranumpycore library

 # See if VIGRA_ROOT was set externally, if so use it.
@@ -26,7 +26,7 @@

 IF(NOT VIGRA_VIGRANUMPYCORE_LIBRARY_NOT_FOUND)
     GET_FILENAME_COMPONENT(VIGRA_VIGRANUMPYCORE_LIBRARY_PATH ${VIGRA_VIGRANUMPYCORE_LIBRARY} PATH)
-    SET( VIGRA_VIGRANUMPYCORE_LIBRARY_DIR ${VIGRA_VIGRANUMPYCORE_LIBRARY_PATH} CACHE PATH "Path to Vigra's vigranumpycore library.")
+    SET( VIGRANUMPY_SITEPACKAGE_DIR ${VIGRA_VIGRANUMPYCORE_LIBRARY_PATH} CACHE PATH "Path to Vigra's vigranumpycore library.")

     MESSAGE(STATUS "Found VIGRA")
     MESSAGE(STATUS "  > vigranumpy: ${VIGRA_VIGRANUMPYCORE_LIBRARY}")
@@ -41,5 +41,5 @@
 INCLUDE(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(VIGRA DEFAULT_MSG VIGRA_ROOT VIGRA_VIGRANUMPYCORE_LIBRARY_PATH VIGRA_VIGRANUMPYCORE_LIBRARY VIGRA_INCLUDE_DIR )

-MARK_AS_ADVANCED(VIGRA_ROOT VIGRA_INCLUDE_DIR VIGRA_VIGRANUMPYCORE_LIBRARY_PATH VIGRA_VIGRANUMPYCORE_LIBRARY VIGRA_VIGRANUMPYCORE_LIBRARY_DIR)
+MARK_AS_ADVANCED(VIGRA_ROOT VIGRA_INCLUDE_DIR VIGRA_VIGRANUMPYCORE_LIBRARY_PATH VIGRA_VIGRANUMPYCORE_LIBRARY VIGRANUMPY_SITEPACKAGE_DIR)


Rewrites FindclFFT, provides imported target clFFT::clFFT.

--- cmake/modules/FindclFFT.cmake
+++ cmake/modules/FindclFFT.cmake
@@ -1,77 +1,72 @@
 # - Find clFFT, AMD's OpenCL FFT library
-
-# This script defines the following variables:
-# CLFFT_INCLUDE_DIRS    - Location of clFFT's include directory.
-# CLFFT_LIBRARIES       - Location of clFFT's libraries
-# CLFFT_FOUND           - True if clFFT has been located
+#
+# Usage:
+#   find_package(clFFT [REQUIRED] [QUIET])
+#
+# It sets the following variables:
+# clFFT_INCLUDE_DIRS    - Location of clFFT's include directory.
+# clFFT_LIBRARIES       - Location of clFFT's libraries
+# clFFT_FOUND           - True if clFFT has been located
+#
+# It also defines the imported target clFFT::clFFT.
 #
 # If your clFFT installation is not in a standard installation directory, you
 # may provide a hint to where it may be found. Simply set the value CLFFT_ROOT
 # to the directory containing 'include/clFFT.h" prior to calling this script.
-#
-# By default this script will attempt to find the 32-bit version of clFFT.
-# If you desire to use the 64-bit version instead, set
-#   set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)
-# prior to calling this script.
-#=============================================================================
-# Copyright 2014 Brian Kloppenborg
-#
-# 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.
-#=============================================================================
-# - changed path finding functions to be more generic (tdd11235813)
-#=============================================================================

-IF(CLFFT_INCLUDE_DIRS)
-  # Already in cache, be silent
-  set (CLFFT_FIND_QUIETLY TRUE)
-ENDIF (CLFFT_INCLUDE_DIRS)

-FIND_PATH(CLFFT_ROOT_DIR
+find_path(CLFFT_ROOT_DIR
   NAMES include/clFFT.h
   PATHS CLFFT_ROOT
   PATHS ENV CLFFT_ROOT
   DOC "clFFT root directory.")

-FIND_PATH(CLFFT_ROOT_DIR
+find_path(CLFFT_ROOT_DIR
   NAMES include/clFFT.h
   DOC "clFFT root directory.")

-FIND_PATH(_CLFFT_INCLUDE_DIRS
+find_path(_CLFFT_INCLUDE_DIRS
   NAMES clFFT.h
-  PATHS ${CLFFT_ROOT_DIR}
+  PATHS "${CLFFT_ROOT_DIR}" "/usr"
   PATH_SUFFIXES "include"
   DOC "clFFT include directory")

-FIND_PATH(_CLFFT_INCLUDE_DIRS
+find_path(_CLFFT_INCLUDE_DIRS
   NAMES clFFT.h
   DOC "clFFT include directory")

-FIND_LIBRARY(_CLFFT_LIBRARY
+find_library(_CLFFT_LIBRARY
   NAMES clFFT
-  PATHS ${CLFFT_ROOT_DIR}
+  PATHS "${CLFFT_ROOT_DIR}" "/usr"
   PATH_SUFFIXES "lib" "lib64"
   DOC "clFFT library directory")

-FIND_LIBRARY(_CLFFT_LIBRARY
+find_library(_CLFFT_LIBRARY
   NAMES clFFT
   DOC "clFFT library directory")

-SET(CLFFT_INCLUDE_DIRS ${_CLFFT_INCLUDE_DIRS})
-SET(CLFFT_LIBRARIES ${_CLFFT_LIBRARY})
+set(clFFT_INCLUDE_DIRS ${_CLFFT_INCLUDE_DIRS})
+set(clFFT_LIBRARIES ${_CLFFT_LIBRARY})

-# handle the QUIETLY and REQUIRED arguments and set CLFFT_FOUND to TRUE if
+add_library(clFFT::clFFT IMPORTED INTERFACE)
+set_target_properties(clFFT::clFFT PROPERTIES
+  INTERFACE_LINK_LIBRARIES "${clFFT_LIBRARIES}"
+  INTERFACE_INCLUDE_DIRECTORIES "${clFFT_INCLUDE_DIRS}"
+  )
+
+# handle the QUIETLY and REQUIRED arguments and set clFFT_FOUND to TRUE if
 # all listed variables are TRUE
-INCLUDE (FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(CLFFT DEFAULT_MSG CLFFT_LIBRARIES CLFFT_INCLUDE_DIRS)
-MARK_AS_ADVANCED(CLFFT_LIBRARIES CLFFT_INCLUDE_DIRS)
+include (FindPackageHandleStandardArgs)
+find_package_handle_standard_args(clFFT DEFAULT_MSG clFFT_LIBRARIES clFFT_INCLUDE_DIRS)
+
+if(NOT clFFT_FIND_QUIETLY)
+  message("++ FindclFFT")
+  message("++ clFFT_INCLUDES    : ${clFFT_INCLUDE_DIRS}")
+  message("++ clFFT_LIBRARIES   : ${clFFT_LIBRARIES}")
+endif()
+
+mark_as_advanced(
+  clFFT_LIBRARIES
+  clFFT_INCLUDE_DIRS
+  )


Prevent cmake invocation from hanging on Ubuntu 17.10

Looks like soapcpp2 no longer includes version number
when passing -help, and hangs when passing "-v",
which is the fallback for Mac OS.. argh.

--- cmake/modules/FindgSOAP.cmake
+++ cmake/modules/FindgSOAP.cmake
@@ -3,7 +3,7 @@
 # include files and libraries are.
 #
 # This code sets the following variables:
-#
+#
 # GSOAP_LIBRARIES       = full path to the gsoap libraries
 # GSOAP_SSL_LIBRARIES   = full path to the gsoap ssl libraries
 # GSOAP_INCLUDE_DIR     = include dir to be used when using the gsoap library
@@ -20,13 +20,13 @@
 # -----------------------------------------------------
 find_library(GSOAP_LIBRARIES
     NAMES gsoap
-    HINTS ${GSOAP_LOCATION}/lib ${GSOAP_LOCATION}/lib64
+    HINTS ${GSOAP_LOCATION}/lib ${GSOAP_LOCATION}/lib64
           ${GSOAP_LOCATION}/lib32
     DOC "The main gsoap library"
 )
 find_library(GSOAP_SSL_LIBRARIES
     NAMES gsoapssl
-    HINTS ${GSOAP_LOCATION}/lib ${GSOAP_LOCATION}/lib64
+    HINTS ${GSOAP_LOCATION}/lib ${GSOAP_LOCATION}/lib64
           ${GSOAP_LOCATION}/lib32
     DOC "The ssl gsoap library"
 )
@@ -34,7 +34,7 @@
 # -----------------------------------------------------
 # GSOAP Include Directories
 # -----------------------------------------------------
-find_path(GSOAP_INCLUDE_DIR
+find_path(GSOAP_INCLUDE_DIR
     NAMES stdsoap2.h
     HINTS ${GSOAP_LOCATION} ${GSOAP_LOCATION}/include ${GSOAP_LOCATION}/include/*
     DOC "The gsoap include directory"
@@ -65,26 +65,26 @@
 string(REGEX MATCH "[0-9]*\\.[0-9]*\\.[0-9]*" GSOAP_VERSION ${GSOAP_STRING_VERSION})

 if( "${GSOAP_VERSION}" STREQUAL "..")
-  execute_process(COMMAND ${GSOAP_SOAPCPP2}  "-v"   OUTPUT_VARIABLE GSOAP_STRING_VERSION ERROR_VARIABLE GSOAP_STRING_VERSION )
+  execute_process(COMMAND ${GSOAP_SOAPCPP2}  "-v" TIMEOUT 1 OUTPUT_VARIABLE GSOAP_STRING_VERSION ERROR_VARIABLE GSOAP_STRING_VERSION )
   string(REGEX MATCH "[0-9]*\\.[0-9]*\\.[0-9]*" GSOAP_VERSION ${GSOAP_STRING_VERSION})
 endif()

 message(STATUS " - GSOAP VERSION : ${GSOAP_VERSION}")
 if( "${GSOAP_VERSION}"  VERSION_LESS "2.7.6")
 	set(GSOAP_276_COMPAT_FLAGS "")
-elseif ( "${GSOAP_VERSION}"  VERSION_LESS "2.7.14")
-	set(GSOAP_276_COMPAT_FLAGS "-z")
-else ( "${GSOAP_VERSION}"  VERSION_LESS "2.7.14")
-	set(GSOAP_276_COMPAT_FLAGS "-z1 -z2")
+elseif ( "${GSOAP_VERSION}"  VERSION_LESS "2.7.14")
+	set(GSOAP_276_COMPAT_FLAGS "-z")
+else ( "${GSOAP_VERSION}"  VERSION_LESS "2.7.14")
+	set(GSOAP_276_COMPAT_FLAGS "-z1 -z2")
 endif ( "${GSOAP_VERSION}"  VERSION_LESS "2.7.6")

 # -----------------------------------------------------
-# handle the QUIETLY and REQUIRED arguments and set GSOAP_FOUND to TRUE if
+# handle the QUIETLY and REQUIRED arguments and set GSOAP_FOUND to TRUE if
 # all listed variables are TRUE
 # -----------------------------------------------------
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(gsoap DEFAULT_MSG GSOAP_LIBRARIES
+find_package_handle_standard_args(gsoap DEFAULT_MSG GSOAP_LIBRARIES
     GSOAP_INCLUDE_DIR GSOAP_WSDL2H GSOAP_SOAPCPP2)
 mark_as_advanced(GSOAP_INCLUDE_DIR GSOAP_LIBRARIES GSOAP_WSDL2H GSOAP_SOAPCPP2)


COMP: fixed some tests

COMP: fixed some tests

--- CMake/CoreHelpers.cmake
+++ CMake/CoreHelpers.cmake
@@ -370,7 +370,7 @@
     ENDIF(EXISTS ${image})

     IF(EXISTS ${IMAGE_FULL_PATH})
-    FOREACH( test MODULE_IMAGE_TESTS} )
+    FOREACH( test ${MODULE_IMAGE_TESTS} )
       GET_FILENAME_COMPONENT(TName ${test} NAME_WE)
       GET_FILENAME_COMPONENT(ImageName ${IMAGE_FULL_PATH} NAME)
       ADD_TEST(${TName}_${ImageName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${KITNAME}TestDriver ${TName} ${IMAGE_FULL_PATH})


use force to set OpenCV flags and disable static CRT

--- external/vigra_cmake/VAD_OpenCV.cmake
+++ external/vigra_cmake/VAD_OpenCV.cmake
@@ -18,9 +18,10 @@
   string(REPLACE "set_target_properties(uninstall " "set_target_properties(uninstall-opencv " FILECONTENT ${FILECONTENT})
   file(WRITE "${VAD_EXTERNAL_ROOT}/OpenCV/cmake/OpenCVExtraTargets.cmake" ${FILECONTENT})

-  set(BUILD_TESTS OFF)
-  set(BUILD_PERF_TESTS OFF)
-  set(BUILD_EXAMPLES OFF)
+  set(BUILD_TESTS OFF CACHE BOOL "" FORCE)
+  set(BUILD_PERF_TESTS OFF CACHE BOOL "" FORCE)
+  set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
+  set(BUILD_WITH_STATIC_CRT OFF CACHE BOOL "" FORCE)

   # example of disabling something
   #set(BUILD_opencv_flann OFF CACHE BOOL "" FORCE)


- fail fast if java code fails to compiler

--- copasi/bindings/java/compile-native-files.cmake
+++ copasi/bindings/java/compile-native-files.cmake
@@ -1,4 +1,4 @@
-# Copyright (C) 2019 - 2021 by Pedro Mendes, Rector and Visitors of the
+# Copyright (C) 2019 - 2022 by Pedro Mendes, Rector and Visitors of the
 # University of Virginia, University of Heidelberg, and University
 # of Connecticut School of Medicine.
 # All rights reserved.
@@ -92,9 +92,14 @@
 	COMMAND "${Java_JAVAC_EXECUTABLE}"
 		 ${COMPATIBILITY_ARGS}
 		 -d java-files
-		 ${NATIVE_FILES}
+		 ${NATIVE_FILES}
+	RESULT_VARIABLE VAR
 	WORKING_DIRECTORY "${BIN_DIRECTORY}"
 )
+
+if (${VAR} EQUAL "1")
+  message( FATAL_ERROR "Failed to compile java files")
+endif()

 # enumerate class files
 file(GLOB_RECURSE CLASS_FILES RELATIVE ${BIN_DIRECTORY}/java-files ${BIN_DIRECTORY}/java-files/org/COPASI/*.class)


fix non-erased project var on re-read

fix non-erased project var on re-read

--- Modules/private/CakeProject.cmake
+++ Modules/private/CakeProject.cmake
@@ -136,6 +136,7 @@
     # clear the project setting variables for this function scope
     foreach(i ${_CAKE_PROJECT_VARS})
       set(${i} "")
+      _cake_set_project_var(${i} "")
     endforeach()

     # set the default values for certain variables


[ImageManip] - FW update:
    [API maintained]
        [setKeepAspectRatio]
            - resize with keeping aspect ratio + crop the input field of view to match the output aspect ratio
            - using the "setKeepAspectRatio" API in conjunction with the "setResizeThumbnail" API, the "setKeepAspectRatio" API will not have any effect because the "setResizeThumbnail" API has priority
            - keepAspectRatio config is True by default

    [bugs fixed]
        [artifacts/memory coruption]
            Properly extract the chroma rect
            Properly compute the luma/chroma cached memory size
            Input interleaved -> planar conversion + rect rotation
        [hang]
            input rectangle outside frame


Updating catking makefile

Updating catking makefile

--- catkin.cmake
+++ catkin.cmake
@@ -47,6 +47,10 @@
     src/OMPLPlanner.cpp
     src/OMPLSimplifier.cpp
     src/OMPLConversions.cpp
+    src/TSR.cpp
+    src/TSRChain.cpp
+#    src/TSRRobot.cpp
+    src/TSRGoal.cpp
     "${CMAKE_BINARY_DIR}/src/PlannerRegistry.cpp"
 )
 target_link_libraries(${PROJECT_NAME}