DOC: ExternalData: Update documentation to match CMake copy

Change-Id: I0ffa1b2b1f86d305e4eaf4d4efd272e3f85c3fa9

--- CMake/ExternalData.cmake
+++ CMake/ExternalData.cmake
@@ -1,144 +1,309 @@
-# - Manage data files stored outside source tree
-# Use this module to unambiguously reference data files stored outside the
-# source tree and fetch them at build time from arbitrary local and remote
-# content-addressed locations.  Functions provided by this module recognize
-# arguments with the syntax "DATA{<name>}" as references to external data,
-# replace them with full paths to local copies of those data, and create build
-# rules to fetch and update the local copies.
-#
-# The DATA{} syntax is literal and the <name> is a full or relative path
-# within the source tree.  The source tree must contain either a real data
-# file at <name> or a "content link" at <name><ext> containing a hash of the
-# real file using a hash algorithm corresponding to <ext>.  For example, the
-# argument "DATA{img.png}" may be satisfied by either a real "img.png" file in
-# the current source directory or a "img.png.md5" file containing its MD5 sum.
-#
-# The 'ExternalData_Expand_Arguments' function evaluates DATA{} references
-# in its arguments and constructs a new list of arguments:
-#  ExternalData_Expand_Arguments(
-#    <target>   # Name of data management target
-#    <outVar>   # Output variable
-#    [args...]  # Input arguments, DATA{} allowed
+#.rst:
+# ExternalData
+# ------------
+#
+# .. only:: html
+#
+#    .. contents::
+#
+# Manage data files stored outside source tree
+#
+# Introduction
+# ^^^^^^^^^^^^
+#
+# Use this module to unambiguously reference data files stored outside
+# the source tree and fetch them at build time from arbitrary local and
+# remote content-addressed locations.  Functions provided by this module
+# recognize arguments with the syntax ``DATA{<name>}`` as references to
+# external data, replace them with full paths to local copies of those
+# data, and create build rules to fetch and update the local copies.
+#
+# For example:
+#
+# .. code-block:: cmake
+#
+#  include(ExternalData)
+#  set(ExternalData_URL_TEMPLATES "file:///local/%(algo)/%(hash)"
+#                                 "file:////host/share/%(algo)/%(hash)"
+#                                 "http://data.org/%(algo)/%(hash)")
+#  ExternalData_Add_Test(MyData
+#    NAME MyTest
+#    COMMAND MyExe DATA{MyInput.png}
 #    )
-# It replaces each DATA{} reference in an argument with the full path of a
-# real data file on disk that will exist after the <target> builds.
-#
-# The 'ExternalData_Add_Test' function wraps around the CMake add_test()
-# command but supports DATA{} references in its arguments:
-#  ExternalData_Add_Test(
-#    <target>   # Name of data management target
-#    ...        # Arguments of add_test(), DATA{} allowed
-#    )
-# It passes its arguments through ExternalData_Expand_Arguments and then
-# invokes add_test() using the results.
-#
-# The 'ExternalData_Add_Target' function creates a custom target to manage
-# local instances of data files stored externally:
-#  ExternalData_Add_Target(
-#    <target>   # Name of data management target
-#    )
-# It creates custom commands in the target as necessary to make data files
-# available for each DATA{} reference previously evaluated by other functions
-# provided by this module.  A list of URL templates must be provided in the
-# variable ExternalData_URL_TEMPLATES using the placeholders "%(algo)" and
-# "%(hash)" in each template.  Data fetch rules try each URL template in order
-# by substituting the hash algorithm name for "%(algo)" and the hash value for
-# "%(hash)".
-#
-# The following hash algorithms are supported:
-#    %(algo)     <ext>     Description
-#    -------     -----     -----------
-#    MD5         .md5      Message-Digest Algorithm 5, RFC 1321
-# Note that the hashes are used only for unique data identification and
-# download verification.  This is not security software.
-#
-# Example usage:
-#   include(ExternalData)
-#   set(ExternalData_URL_TEMPLATES "file:///local/%(algo)/%(hash)"
-#                                  "http://data.org/%(algo)/%(hash)")
-#   ExternalData_Add_Test(MyData
-#     NAME MyTest
-#     COMMAND MyExe DATA{MyInput.png}
-#     )
-#   ExternalData_Add_Target(MyData)
-# When test "MyTest" runs the "DATA{MyInput.png}" argument will be replaced by
-# the full path to a real instance of the data file "MyInput.png" on disk.  If
-# the source tree contains a content link such as "MyInput.png.md5" then the
-# "MyData" target creates a real "MyInput.png" in the build tree.
-#
-# The DATA{} syntax can be told to fetch a file series using the form
-# "DATA{<name>,:}", where the ":" is literal.  If the source tree contains a
-# group of files or content links named like a series then a reference to one
-# member adds rules to fetch all of them.  Although all members of a series
-# are fetched, only the file originally named by the DATA{} argument is
-# substituted for it.  The default configuration recognizes file series names
-# ending with "#.ext", "_#.ext", ".#.ext", or "-#.ext" where "#" is a sequence
-# of decimal digits and ".ext" is any single extension.  Configure it with a
-# regex that parses <number> and <suffix> parts from the end of <name>:
+#  ExternalData_Add_Target(MyData)
+#
+# When test ``MyTest`` runs the ``DATA{MyInput.png}`` argument will be
+# replaced by the full path to a real instance of the data file
+# ``MyInput.png`` on disk.  If the source tree contains a content link
+# such as ``MyInput.png.md5`` then the ``MyData`` target creates a real
+# ``MyInput.png`` in the build tree.
+#
+# Module Functions
+# ^^^^^^^^^^^^^^^^
+#
+# .. command:: ExternalData_Expand_Arguments
+#
+#   The ``ExternalData_Expand_Arguments`` function evaluates ``DATA{}``
+#   references in its arguments and constructs a new list of arguments::
+#
+#     ExternalData_Expand_Arguments(
+#       <target>   # Name of data management target
+#       <outVar>   # Output variable
+#       [args...]  # Input arguments, DATA{} allowed
+#       )
+#
+#   It replaces each ``DATA{}`` reference in an argument with the full path of
+#   a real data file on disk that will exist after the ``<target>`` builds.
+#
+# .. command:: ExternalData_Add_Test
+#
+#   The ``ExternalData_Add_Test`` function wraps around the CMake
+#   :command:`add_test` command but supports ``DATA{}`` references in
+#   its arguments::
+#
+#     ExternalData_Add_Test(
+#       <target>   # Name of data management target
+#       ...        # Arguments of add_test(), DATA{} allowed
+#       )
+#
+#   It passes its arguments through ``ExternalData_Expand_Arguments`` and then
+#   invokes the :command:`add_test` command using the results.
+#
+# .. command:: ExternalData_Add_Target
+#
+#   The ``ExternalData_Add_Target`` function creates a custom target to
+#   manage local instances of data files stored externally::
+#
+#     ExternalData_Add_Target(
+#       <target>   # Name of data management target
+#       )
+#
+#   It creates custom commands in the target as necessary to make data
+#   files available for each ``DATA{}`` reference previously evaluated by
+#   other functions provided by this module.
+#   Data files may be fetched from one of the URL templates specified in
+#   the ``ExternalData_URL_TEMPLATES`` variable, or may be found locally
+#   in one of the paths specified in the ``ExternalData_OBJECT_STORES``
+#   variable.
+#
+# Module Variables
+# ^^^^^^^^^^^^^^^^
+#
+# The following variables configure behavior.  They should be set before
+# calling any of the functions provided by this module.
+#
+# .. variable:: ExternalData_BINARY_ROOT
+#
+#   The ``ExternalData_BINARY_ROOT`` variable may be set to the directory to
+#   hold the real data files named by expanded ``DATA{}`` references.  The
+#   default is ``CMAKE_BINARY_DIR``.  The directory layout will mirror that of
+#   content links under ``ExternalData_SOURCE_ROOT``.
+#
+# .. variable:: ExternalData_CUSTOM_SCRIPT_<key>
+#
+#   Specify a full path to a ``.cmake`` custom fetch script identified by
+#   ``<key>`` in entries of the ``ExternalData_URL_TEMPLATES`` list.
+#   See `Custom Fetch Scripts`_.
+#
+# .. variable:: ExternalData_LINK_CONTENT
+#
+#   The ``ExternalData_LINK_CONTENT`` variable may be set to the name of a
+#   supported hash algorithm to enable automatic conversion of real data
+#   files referenced by the ``DATA{}`` syntax into content links.  For each
+#   such ``<file>`` a content link named ``<file><ext>`` is created.  The
+#   original file is renamed to the form ``.ExternalData_<algo>_<hash>`` to
+#   stage it for future transmission to one of the locations in the list
+#   of URL templates (by means outside the scope of this module).  The
+#   data fetch rule created for the content link will use the staged
+#   object if it cannot be found using any URL template.
+#
+# .. variable:: ExternalData_OBJECT_STORES
+#
+#   The ``ExternalData_OBJECT_STORES`` variable may be set to a list of local
+#   directories that store objects using the layout ``<dir>/%(algo)/%(hash)``.
+#   These directories will be searched first for a needed object.  If the
+#   object is not available in any store then it will be fetched remotely
+#   using the URL templates and added to the first local store listed.  If
+#   no stores are specified the default is a location inside the build
+#   tree.
+#
+# .. variable:: ExternalData_SERIES_PARSE
+#               ExternalData_SERIES_PARSE_PREFIX
+#               ExternalData_SERIES_PARSE_NUMBER
+#               ExternalData_SERIES_PARSE_SUFFIX
+#               ExternalData_SERIES_MATCH
+#
+#   See `Referencing File Series`_.
+#
+# .. variable:: ExternalData_SOURCE_ROOT
+#
+#   The ``ExternalData_SOURCE_ROOT`` variable may be set to the highest source
+#   directory containing any path named by a ``DATA{}`` reference.  The
+#   default is ``CMAKE_SOURCE_DIR``.  ``ExternalData_SOURCE_ROOT`` and
+#   ``CMAKE_SOURCE_DIR`` must refer to directories within a single source
+#   distribution (e.g.  they come together in one tarball).
+#
+# .. variable:: ExternalData_TIMEOUT_ABSOLUTE
+#
+#   The ``ExternalData_TIMEOUT_ABSOLUTE`` variable sets the download
+#   absolute timeout, in seconds, with a default of ``300`` seconds.
+#   Set to ``0`` to disable enforcement.
+#
+# .. variable:: ExternalData_TIMEOUT_INACTIVITY
+#
+#   The ``ExternalData_TIMEOUT_INACTIVITY`` variable sets the download
+#   inactivity timeout, in seconds, with a default of ``60`` seconds.
+#   Set to ``0`` to disable enforcement.
+#
+# .. variable:: ExternalData_URL_ALGO_<algo>_<key>
+#
+#   Specify a custom URL component to be substituted for URL template
+#   placeholders of the form ``%(algo:<key>)``, where ``<key>`` is a
+#   valid C identifier, when fetching an object referenced via hash
+#   algorithm ``<algo>``.  If not defined, the default URL component
+#   is just ``<algo>`` for any ``<key>``.
+#
+# .. variable:: ExternalData_URL_TEMPLATES
+#
+#   The ``ExternalData_URL_TEMPLATES`` may be set to provide a list of
+#   of URL templates using the placeholders ``%(algo)`` and ``%(hash)``
+#   in each template.  Data fetch rules try each URL template in order
+#   by substituting the hash algorithm name for ``%(algo)`` and the hash
+#   value for ``%(hash)``.  Alternatively one may use ``%(algo:<key>)``
+#   with ``ExternalData_URL_ALGO_<algo>_<key>`` variables to gain more
+#   flexibility in remote URLs.
+#
+# Referencing Files
+# ^^^^^^^^^^^^^^^^^
+#
+# Referencing Single Files
+# """"""""""""""""""""""""
+#
+# The ``DATA{}`` syntax is literal and the ``<name>`` is a full or relative path
+# within the source tree.  The source tree must contain either a real
+# data file at ``<name>`` or a "content link" at ``<name><ext>`` containing a
+# hash of the real file using a hash algorithm corresponding to ``<ext>``.
+# For example, the argument ``DATA{img.png}`` may be satisfied by either a
+# real ``img.png`` file in the current source directory or a ``img.png.md5``
+# file containing its MD5 sum.
+#
+# Referencing File Series
+# """""""""""""""""""""""
+#
+# The ``DATA{}`` syntax can be told to fetch a file series using the form
+# ``DATA{<name>,:}``, where the ``:`` is literal.  If the source tree
+# contains a group of files or content links named like a series then a
+# reference to one member adds rules to fetch all of them.  Although all
+# members of a series are fetched, only the file originally named by the
+# ``DATA{}`` argument is substituted for it.  The default configuration
+# recognizes file series names ending with ``#.ext``, ``_#.ext``, ``.#.ext``,
+# or ``-#.ext`` where ``#`` is a sequence of decimal digits and ``.ext`` is
+# any single extension.  Configure it with a regex that parses ``<number>``
+# and ``<suffix>`` parts from the end of ``<name>``::
+#
 #  ExternalData_SERIES_PARSE = regex of the form (<number>)(<suffix>)$
-# For more complicated cases set:
+#
+# For more complicated cases set::
+#
 #  ExternalData_SERIES_PARSE = regex with at least two () groups
 #  ExternalData_SERIES_PARSE_PREFIX = <prefix> regex group number, if any
 #  ExternalData_SERIES_PARSE_NUMBER = <number> regex group number
 #  ExternalData_SERIES_PARSE_SUFFIX = <suffix> regex group number
+#
 # Configure series number matching with a regex that matches the
-# <number> part of series members named <prefix><number><suffix>:
+# ``<number>`` part of series members named ``<prefix><number><suffix>``::
+#
 #  ExternalData_SERIES_MATCH = regex matching <number> in all series members
-# Note that the <suffix> of a series does not include a hash-algorithm
+#
+# Note that the ``<suffix>`` of a series does not include a hash-algorithm
 # extension.
 #
-# The DATA{} syntax can alternatively match files associated with the named
-# file and contained in the same directory.  Associated files may be specified
-# by options using the syntax DATA{<name>,<opt1>,<opt2>,...}.  Each option may
-# specify one file by name or specify a regular expression to match file names
-# using the syntax REGEX:<regex>.  For example, the arguments
-#   DATA{MyData/MyInput.mhd,MyInput.img}                   # File pair
-#   DATA{MyData/MyFrames00.png,REGEX:MyFrames[0-9]+\\.png} # Series
-# will pass MyInput.mha and MyFrames00.png on the command line but ensure
-# that the associated files are present next to them.
-#
-# The DATA{} syntax may reference a directory using a trailing slash and a
-# list of associated files.  The form DATA{<name>/,<opt1>,<opt2>,...} adds
-# rules to fetch any files in the directory that match one of the associated
-# file options.  For example, the argument DATA{MyDataDir/,REGEX:.*} will pass
-# the full path to a MyDataDir directory on the command line and ensure that
-# the directory contains files corresponding to every file or content link in
-# the MyDataDir source directory.
-#
-# The variable ExternalData_LINK_CONTENT may be set to the name of a supported
-# hash algorithm to enable automatic conversion of real data files referenced
-# by the DATA{} syntax into content links.  For each such <file> a content
-# link named "<file><ext>" is created.  The original file is renamed to the
-# form ".ExternalData_<algo>_<hash>" to stage it for future transmission to
-# one of the locations in the list of URL templates (by means outside the
-# scope of this module).  The data fetch rule created for the content link
-# will use the staged object if it cannot be found using any URL template.
-#
-# The variable ExternalData_OBJECT_STORES may be set to a list of local
-# directories that store objects using the layout <dir>/%(algo)/%(hash).
-# These directories will be searched first for a needed object.  If the object
-# is not available in any store then it will be fetched remotely using the URL
-# templates and added to the first local store listed.  If no stores are
-# specified the default is a location inside the build tree.
-#
-# The variable ExternalData_SOURCE_ROOT may be set to the highest source
-# directory containing any path named by a DATA{} reference.  The default is
-# CMAKE_SOURCE_DIR.  ExternalData_SOURCE_ROOT and CMAKE_SOURCE_DIR must refer
-# to directories within a single source distribution (e.g. they come together
-# in one tarball).
-#
-# The variable ExternalData_BINARY_ROOT may be set to the directory to hold
-# the real data files named by expanded DATA{} references.  The default is
-# CMAKE_BINARY_DIR.  The directory layout will mirror that of content links
-# under ExternalData_SOURCE_ROOT.
-#
-# Variables ExternalData_TIMEOUT_INACTIVITY and ExternalData_TIMEOUT_ABSOLUTE
-# set the download inactivity and absolute timeouts, in seconds.  The defaults
-# are 60 seconds and 300 seconds, respectively.  Set either timeout to 0
-# seconds to disable enforcement.
+# Referencing Associated Files
+# """"""""""""""""""""""""""""
+#
+# The ``DATA{}`` syntax can alternatively match files associated with the
+# named file and contained in the same directory.  Associated files may
+# be specified by options using the syntax
+# ``DATA{<name>,<opt1>,<opt2>,...}``.  Each option may specify one file by
+# name or specify a regular expression to match file names using the
+# syntax ``REGEX:<regex>``.  For example, the arguments::
+#
+#  DATA{MyData/MyInput.mhd,MyInput.img}                   # File pair
+#  DATA{MyData/MyFrames00.png,REGEX:MyFrames[0-9]+\\.png} # Series
+#
+# will pass ``MyInput.mha`` and ``MyFrames00.png`` on the command line but
+# ensure that the associated files are present next to them.
+#
+# Referencing Directories
+# """""""""""""""""""""""
+#
+# The ``DATA{}`` syntax may reference a directory using a trailing slash and
+# a list of associated files.  The form ``DATA{<name>/,<opt1>,<opt2>,...}``
+# adds rules to fetch any files in the directory that match one of the
+# associated file options.  For example, the argument
+# ``DATA{MyDataDir/,REGEX:.*}`` will pass the full path to a ``MyDataDir``
+# directory on the command line and ensure that the directory contains
+# files corresponding to every file or content link in the ``MyDataDir``
+# source directory.
+#
+# Hash Algorithms
+# ^^^^^^^^^^^^^^^
+#
+# The following hash algorithms are supported::
+#
+#  %(algo)     <ext>     Description
+#  -------     -----     -----------
+#  MD5         .md5      Message-Digest Algorithm 5, RFC 1321
+#  SHA1        .sha1     US Secure Hash Algorithm 1, RFC 3174
+#  SHA224      .sha224   US Secure Hash Algorithms, RFC 4634
+#  SHA256      .sha256   US Secure Hash Algorithms, RFC 4634
+#  SHA384      .sha384   US Secure Hash Algorithms, RFC 4634
+#  SHA512      .sha512   US Secure Hash Algorithms, RFC 4634
+#
+# Note that the hashes are used only for unique data identification and
+# download verification.
+#
+# .. _`ExternalData Custom Fetch Scripts`:
+#
+# Custom Fetch Scripts
+# ^^^^^^^^^^^^^^^^^^^^
+#
+# When a data file must be fetched from one of the URL templates
+# specified in the ``ExternalData_URL_TEMPLATES`` variable, it is
+# normally downloaded using the :command:`file(DOWNLOAD)` command.
+# One may specify usage of a custom fetch script by using a URL
+# template of the form ``ExternalDataCustomScript://<key>/<loc>``.
+# The ``<key>`` must be a C identifier, and the ``<loc>`` must
+# contain the ``%(algo)`` and ``%(hash)`` placeholders.
+# A variable corresponding to the key, ``ExternalData_CUSTOM_SCRIPT_<key>``,
+# must be set to the full path to a ``.cmake`` script file.  The script
+# will be included to perform the actual fetch, and provided with
+# the following variables:
+#
+# .. variable:: ExternalData_CUSTOM_LOCATION
+#
+#   When a custom fetch script is loaded, this variable is set to the
+#   location part of the URL, which will contain the substituted hash
+#   algorithm name and content hash value.
+#
+# .. variable:: ExternalData_CUSTOM_FILE
+#
+#   When a custom fetch script is loaded, this variable is set to the
+#   full path to a file in which the script must store the fetched
+#   content.  The name of the file is unspecified and should not be
+#   interpreted in any way.
+#
+# The custom fetch script is expected to store fetched content in the
+# file or set a variable:
+#
+# .. variable:: ExternalData_CUSTOM_ERROR
+#
+#   When a custom fetch script fails to fetch the requested content,
+#   it must set this variable to a short one-line message describing
+#   the reason for failure.

 #=============================================================================
-# Copyright 2010-2013 Kitware, Inc.
+# Copyright 2010-2015 Kitware, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without


ENH: ExternalData: Make compute_hash available at config time

Move the private compute_hash function up to the configuration-time
portion of the file out of the script-mode-only portion.

--- CMake/ExternalData.cmake
+++ CMake/ExternalData.cmake
@@ -208,6 +208,19 @@
 set(_ExternalData_SELF "${CMAKE_CURRENT_LIST_FILE}")
 get_filename_component(_ExternalData_SELF_DIR "${_ExternalData_SELF}" PATH)

+function(_ExternalData_compute_hash var_hash algo file)
+  if("${algo}" STREQUAL "MD5")
+    # TODO: Errors
+    execute_process(COMMAND "${CMAKE_COMMAND}" -E md5sum "${file}"
+      OUTPUT_VARIABLE output)
+    string(SUBSTRING ${output} 0 32 hash)
+    set("${var_hash}" "${hash}" PARENT_SCOPE)
+  else()
+    # TODO: Other hashes.
+    message(FATAL_ERROR "Hash algorithm ${algo} unimplemented.")
+  endif()
+endfunction()
+
 function(_ExternalData_atomic_write file content)
   string(RANDOM LENGTH 6 random)
   set(tmp "${file}.tmp${random}")
@@ -364,19 +377,6 @@

   # Atomically create/replace the real destination.
   file(RENAME "${tmp}" "${dst}")
-endfunction()
-
-function(_ExternalData_compute_hash var_hash algo file)
-  if("${algo}" STREQUAL "MD5")
-    # TODO: Errors
-    execute_process(COMMAND "${CMAKE_COMMAND}" -E md5sum "${file}"
-      OUTPUT_VARIABLE output)
-    string(SUBSTRING ${output} 0 32 hash)
-    set("${var_hash}" "${hash}" PARENT_SCOPE)
-  else()
-    # TODO: Other hashes.
-    message(FATAL_ERROR "Hash algorithm ${algo} unimplemented.")
-  endif()
 endfunction()

 function(_ExternalData_download_object hash algo obj)


find ossim from CMAKE_PREFIX_PATH

find ossim from CMAKE_PREFIX_PATH

--- CMake/External_OTB.cmake
+++ CMake/External_OTB.cmake
@@ -50,10 +50,11 @@
 if(USE_SYSTEM_OSSIM)
   set(OTB_SB_OSSIM_CONFIG)
 else()
-  set(OTB_SB_OSSIM_CONFIG
-    -DOSSIM_INCLUDE_DIR:PATH=${CMAKE_INSTALL_PREFIX}/include
-    -DOSSIM_LIBRARY:PATH=${CMAKE_INSTALL_PREFIX}/lib/libossim${CMAKE_SHARED_LIBRARY_SUFFIX}
-    )
+  #try OTB can find automatically from CMAKE_PREFIX_PATH
+  set(OTB_SB_OSSIM_CONFIG)
+    #-DOSSIM_INCLUDE_DIR:PATH=${CMAKE_INSTALL_PREFIX}/include
+    #-DOSSIM_LIBRARY:PATH=${CMAKE_INSTALL_PREFIX}/lib/libossim${CMAKE_SHARED_LIBRARY_SUFFIX}
+    #)
   list(APPEND ${proj}_DEPENDENCIES OSSIM)
 endif()


Update to ITK 4.5.1

Update to ITK 4.5.1

--- CMakeExternals/ITK.cmake
+++ CMakeExternals/ITK.cmake
@@ -70,8 +70,8 @@
      SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}-src
      BINARY_DIR ${proj}-build
      PREFIX ${proj}-cmake
-     GIT_REPOSITORY http://itk.org/ITK.git
-     GIT_TAG v4.5rc03
+     URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/InsightToolkit-4.5.1.tar.gz
+     URL_MD5 b161c35210a5cbc75dbb4acdd59df574
      INSTALL_COMMAND ""
      PATCH_COMMAND ${ITK_PATCH_COMMAND}
      CMAKE_GENERATOR ${gen}


set correct MD5 hash for vtk 6.2.0

set correct MD5 hash for vtk 6.2.0

--- CMakeExternals/VTK.cmake
+++ CMakeExternals/VTK.cmake
@@ -77,8 +77,7 @@
   endif()

   set(VTK_URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/VTK-6.2.0.tar.gz)
-#  set(VTK_URL_MD5 1f19dae22c42c032109bd3cf91c4e8c9)
-
+  set(VTK_URL_MD5 4790f8b3acdbc376997fbdc9d203f0b7)

   ExternalProject_Add(${proj}
     LIST_SEPARATOR ${sep}


FIX: Use the right file extension for python modules on Windows

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -407,13 +407,8 @@
     target_link_libraries(${PYTHON_MODULE_NAME} ${CEGUI_BASE_LIBNAME} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} ${EXTRA_LIBS} )
     set_target_properties(${PYTHON_MODULE_NAME} PROPERTIES PREFIX "")

-    # link the default modules when doing a static build.
-    if (NOT BUILD_SHARED_LIBS)
-        target_link_libraries(${PYTHON_MODULE_NAME}
-            ${CEGUI_STATIC_XMLPARSER_MODULE}
-            ${CEGUI_STATIC_IMAGECODEC_MODULE}
-            ${CEGUI_FALAGARD_WR_LIBNAME}
-        )
+    if (WIN32)
+        set_target_properties(${PYTHON_MODULE_NAME} PROPERTIES SUFFIX ".pyd")
     endif()

     if (NOT APPLE)


[cmake] use script to generate file list !

--- cmake/filelistGui.cmake
+++ cmake/filelistGui.cmake
@@ -1,6 +1,6 @@
 set( gui_sources
+    AboutDialog/AboutDialog.cpp
     BaseApplication.cpp
-    AboutDialog/AboutDialog.cpp
     RadiumWindow/SimpleWindow.cpp
     SelectionManager/SelectionManager.cpp
     SkeletonBasedAnimation/SkeletonBasedAnimationUI.cpp
@@ -30,9 +30,9 @@
 )

 set( gui_headers
+    AboutDialog/AboutDialog.hpp
     BaseApplication.hpp
     MainWindowInterface.hpp
-    AboutDialog/AboutDialog.hpp
     RadiumWindow/SimpleWindowFactory.hpp
     RadiumWindow/SimpleWindow.hpp
     RaGui.hpp


Change regex for helping to find gnat version to accommodate ".exe"
(or not) after "gcc" in string.

This change continues to work on Linux, and makes Ada work properly on
Wine.

svn path=/trunk/; revision=12258

--- cmake/modules/ada.cmake
+++ cmake/modules/ada.cmake
@@ -45,7 +45,7 @@
 if(ENABLE_ada)
   # Find the gnat version used in order to search for the right version of libgnat
   execute_process(COMMAND ${CMAKE_Ada_COMPILER} --version OUTPUT_VARIABLE ADA_OUTPUT)
-  string(REGEX MATCH "gcc [(][^)]*[)] ([0-9]*[.][0-9]*)[.][0-9]" ADA_OUTPUT_TRIM ${ADA_OUTPUT})
+  string(REGEX MATCH "gcc.* [(][^)]*[)] ([0-9]*[.][0-9]*)[.][0-9]" ADA_OUTPUT_TRIM ${ADA_OUTPUT})
   set(GNATVERSION ${CMAKE_MATCH_1})
   message(STATUS "gnat version = ${GNATVERSION}")
   find_library(GNAT_LIB NAMES gnat gnat-${GNATVERSION})


Avoid cmake error by quoting version check.  Also, tweak messages.

svn path=/trunk/; revision=6926

--- cmake/modules/pdl.cmake
+++ cmake/modules/pdl.cmake
@@ -40,12 +40,17 @@
       set(PDL_MINIMUM_VERSION "2.4.1")
       transform_version(NUMERICAL_PDL_MINIMUM_VERSION ${PDL_MINIMUM_VERSION})
       transform_version(NUMERICAL_PDL_VERSION ${PDL_VERSION})
-      if(NUMERICAL_PDL_VERSION LESS ${NUMERICAL_PDL_MINIMUM_VERSION})
+      if(NUMERICAL_PDL_VERSION LESS "${NUMERICAL_PDL_MINIMUM_VERSION}")
         message(STATUS "WARNING: "
         "perl PDL version < ${PDL_MINIMUM_VERSION}. "
 	"Disabling Perl/PDL examples")
         set(ENABLE_pdl OFF CACHE BOOL "Enable Perl/PDL examples in tests" FORCE)
-      endif(NUMERICAL_PDL_VERSION LESS ${NUMERICAL_PDL_MINIMUM_VERSION})
+      else(NUMERICAL_PDL_VERSION LESS "${NUMERICAL_PDL_MINIMUM_VERSION}")
+        message(STATUS
+	   "Perl and PDL are available and PDL passes version test.\n"
+	"   Enable Perl/PDL examples in tests"
+	)
+      endif(NUMERICAL_PDL_VERSION LESS "${NUMERICAL_PDL_MINIMUM_VERSION}")
     else(NOT PDL_RETURNCODE)
       message(STATUS "WARNING: "
       "perl PDL module not found. Disabling Perl/PDL examples")


Fix: the preprocessor macro SOFA_LIBSUFFIX being defined but empty can't be handled safely by the C++ compiler (sofa_tostring does not compile if it is empty, but there is no method for detecting it that will compile for all possible non empty values).

Former-commit-id: eb6c1e855550695c03d55416930abebd8de536cc

--- cmake/postProject.cmake
+++ cmake/postProject.cmake
@@ -80,10 +80,14 @@
         RELWITHDEBINFO_POSTFIX "${BUILDSUFFIX}"
         MINSIZEREL_POSTFIX "${BUILDSUFFIX}"
         COMPILE_DEFINITIONS_DEBUG "SOFA_LIBSUFFIX=${LIBSUFFIX}d"
-        COMPILE_DEFINITIONS_RELEASE "SOFA_LIBSUFFIX=${LIBSUFFIX}"
-        COMPILE_DEFINITIONS_RELWITHDEBINFO "SOFA_LIBSUFFIX=${LIBSUFFIX}"
-        COMPILE_DEFINITIONS_MINSIZEREL "SOFA_LIBSUFFIX=${LIBSUFFIX}"
         )
+	if(NOT "${LIBSUFFIX}" STREQUAL "")
+		set_target_properties(${PROJECT_NAME} PROPERTIES
+			COMPILE_DEFINITIONS_RELEASE "SOFA_LIBSUFFIX=${LIBSUFFIX}"
+			COMPILE_DEFINITIONS_RELWITHDEBINFO "SOFA_LIBSUFFIX=${LIBSUFFIX}"
+			COMPILE_DEFINITIONS_MINSIZEREL "SOFA_LIBSUFFIX=${LIBSUFFIX}"
+			)
+	endif()

     # if this project is a test, add it in the test group
     if(PROJECT_NAME MATCHES ".*_test.*")


fix mklml and cblas bug,test=develop (#20970)

--- cmake/third_party.cmake
+++ cmake/third_party.cmake
@@ -19,28 +19,12 @@

 set(THIRD_PARTY_BUILD_TYPE Release)

-set(WITH_MKLML ${WITH_MKL})
-if (NOT DEFINED WITH_MKLDNN)
-    if (WITH_MKL AND AVX2_FOUND)
-        set(WITH_MKLDNN ON)
-    else()
-        message(STATUS "Do not have AVX2 intrinsics and disabled MKL-DNN")
-        set(WITH_MKLDNN OFF)
-    endif()
-endif()
-
 # Correction of flags on different Platform(WIN/MAC) and Print Warning Message
 if (APPLE)
     if(WITH_MKL)
         MESSAGE(WARNING
             "Mac is not supported with MKL in Paddle yet. Force WITH_MKL=OFF.")
         set(WITH_MKL OFF CACHE STRING "Disable MKL for building on mac" FORCE)
-    endif()
-
-    if(WITH_MKLML)
-        MESSAGE(WARNING
-            "Mac is not supported with MKLML in Paddle yet. Force WITH_MKLML=OFF.")
-        set(WITH_MKLML OFF CACHE STRING "Disable MKLML package in MacOS" FORCE)
     endif()
 endif()

@@ -64,6 +48,16 @@
             "Windows or Mac is not supported with BOX_PS in Paddle yet."
             "Force WITH_BOX_PS=OFF")
         SET(WITH_BOX_PS OFF CACHE STRING "Disable BOX_PS package in Windows and MacOS" FORCE)
+    endif()
+endif()
+
+set(WITH_MKLML ${WITH_MKL})
+if (NOT DEFINED WITH_MKLDNN)
+    if (WITH_MKL AND AVX2_FOUND)
+        set(WITH_MKLDNN ON)
+    else()
+        message(STATUS "Do not have AVX2 intrinsics and disabled MKL-DNN")
+        set(WITH_MKLDNN OFF)
     endif()
 endif()

@@ -93,10 +87,11 @@
 if(WITH_MKLML)
     include(external/mklml)     # download, install mklml package
     list(APPEND third_party_deps mklml)
-elseif (NOT CBLAS_FOUND OR WIN32)
+endif()
+include(external/openblas)      # find first, then download, build, install openblas
+if(NOT CBLAS_FOUND)
     list(APPEND third_party_deps extern_openblas)
 endif()
-include(external/openblas)  # find first, then download, build, install openblas

 if(WITH_MKLDNN)
     include(external/mkldnn)    # download, build, install mkldnn


Fix openexr missing build command

Fix openexr missing build command

--- openexr.cmake
+++ openexr.cmake
@@ -33,6 +33,7 @@
         PKG_CONFIG_PATH=${FLYEM_PKGCONFIG_DIR}
         LDFLAGS=-L${FLYEM_BUILD_DIR}/lib
         CPPFLAGS=-I${FLYEM_BUILD_DIR}/include
+    BUILD_COMMAND     make
     INSTALL_COMMAND   make install
 )


Forgot to mark the new boost library variable as advanced

git-svn-id: 4ba210d0a933e3fb1aa9ab096f190cd38965d92a@969 fa922fa7-2fde-0310-acd8-f43f465a7996

--- src/CMake/boost/FindBoost.cmake
+++ src/CMake/boost/FindBoost.cmake
@@ -523,5 +523,5 @@
   # show the BOOST_INCLUDE_DIRS and BOOST_LIBRARIES variables only in the advanced view
   mark_as_advanced(BOOST_LIBRARIES BOOST_DEFINITIONS BOOST_LIBRARIES_SUFFIX)
   # hide all of the boost libraries
-  mark_as_advanced(BOOST_DATE_TIME_LIBRARY BOOST_FILESYSTEM_LIBRARY BOOST_IOSTREAMS_LIBRARY BOOST_PRG_EXEC_MONITOR_LIBRARY BOOST_PROGRAM_OPTIONS_LIBRARY BOOST_PYTHON_LIBRARY BOOST_REGEX_LIBRARY BOOST_SERIALIZATION_LIBRARY BOOST_SIGNALS_LIBRARY BOOST_TEST_EXEC_MONITOR_LIBRARY BOOST_THREAD_LIBRARY BOOST_UNIT_TEST_FRAMEWORK_LIBRARY BOOST_WSERIALIZATION_LIBRARY)
+  mark_as_advanced(BOOST_DATE_TIME_LIBRARY BOOST_FILESYSTEM_LIBRARY BOOST_IOSTREAMS_LIBRARY BOOST_PRG_EXEC_MONITOR_LIBRARY BOOST_PROGRAM_OPTIONS_LIBRARY BOOST_PYTHON_LIBRARY BOOST_REGEX_LIBRARY BOOST_SERIALIZATION_LIBRARY BOOST_SIGNALS_LIBRARY BOOST_SYSTEM_LIBRARY BOOST_TEST_EXEC_MONITOR_LIBRARY BOOST_THREAD_LIBRARY BOOST_UNIT_TEST_FRAMEWORK_LIBRARY BOOST_WSERIALIZATION_LIBRARY)
 endif (BOOST_LIBRARIES AND BOOST_INCLUDE_DIRS)


SVN_SILENT made messages (.desktop file)

--- xine/xine.desktop.cmake
+++ xine/xine.desktop.cmake
@@ -105,7 +105,7 @@
 Comment[ru]=Механизм Xine для Phonon
 Comment[se]=Phonon Xine duogášmohtor
 Comment[sk]=Phonon Xine podsystém
-Comment[sl]=Hrbtenica Xine za Phonon
+Comment[sl]=Zaledje Xine za Phonon
 Comment[sr]=Ксин као позадина Фонона
 Comment[sr@ijekavian]=Ксин као позадина Фонона
 Comment[sr@ijekavianlatin]=Xine kao pozadina Phonona


ENH: ExternalData: Retry download after HTTP 503 error

If a server is too busy to provide a requested object it may respond
with 503 even if it has the object.  Retry the request in this case.

Change-Id: Ifdfba14347a37133c661ce6bcfd9a2b1e1829068

--- CMake/ExternalData.cmake
+++ CMake/ExternalData.cmake
@@ -544,10 +544,19 @@
     else()
       set(absolute_timeout "")
     endif()
-    file(DOWNLOAD "${url}" "${file}" STATUS status ${inactivity_timeout} ${absolute_timeout} SHOW_PROGRESS)
+    file(DOWNLOAD "${url}" "${file}" STATUS status LOG log ${inactivity_timeout} ${absolute_timeout} SHOW_PROGRESS)
     list(GET status 0 err)
     list(GET status 1 msg)
-    if(NOT err OR NOT "${msg}" MATCHES "partial|timeout")
+    if(err)
+      if("${msg}" MATCHES "HTTP response code said error" AND
+          "${log}" MATCHES "error: 503")
+        set(msg "temporarily unavailable")
+      endif()
+    elseif("${log}" MATCHES "\nHTTP[^\n]* 503")
+      set(err TRUE)
+      set(msg "temporarily unavailable")
+    endif()
+    if(NOT err OR NOT "${msg}" MATCHES "partial|timeout|temporarily")
       break()
     elseif(retry)
       message(STATUS "[download terminated: ${msg}, retries left: ${retry}]")


Avoid numdiff check race condition in test

Use randomly generated file names for collision free (concurrent) checks
for numdiff support.

Otherwise, if a test subproject is configured concurrently (which might
happen if ctest accidentally triggers a reconfigure due to changed files
in the main project), the following error might occur:
    "The detected numdiff executable was not able to pass a simple relative
    tolerance test."

--- cmake/macros/macro_deal_ii_pickup_tests.cmake
+++ cmake/macros/macro_deal_ii_pickup_tests.cmake
@@ -149,10 +149,11 @@
   #
   STRING(FIND "${NUMDIFF_EXECUTABLE}" "numdiff" _found_numdiff_binary)
   IF(NOT "${_found_numdiff_binary}" STREQUAL "-1")
+    STRING(RANDOM _suffix)
     SET(_first_test_file_name
-      "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/numdiff-test-1.txt")
+      "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/numdiff-test-${_suffix}-1.txt")
     SET(_second_test_file_name
-      "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/numdiff-test-2.txt")
+      "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/numdiff-test-${_suffix}-2.txt")
     FILE(WRITE "${_first_test_file_name}" "0.99999999998\n2.0\n1.0\n")
     FILE(WRITE "${_second_test_file_name}" "1.00000000001\n2.0\n1.0\n")


added trapping behaviour for overflows

added trapping behaviour for overflows

--- cmake_compiler_settings/cmake/gcc_flags.cmake
+++ cmake_compiler_settings/cmake/gcc_flags.cmake
@@ -47,7 +47,7 @@
 add_compile_options(-Wnonnull -Wcast-qual -Wcast-align -Werror=null-dereference)

 # arithmetic/numeric warnings
-add_compile_options(-Wfloat-equal -Wsign-compare -Wconversion -Wsign-promo -Werror=shift-overflow)
+add_compile_options(-Wfloat-equal -Wsign-compare -Wconversion -Wsign-promo -Werror=shift-overflow -ftrapv)

 # logical operations
 add_compile_options(-Wlogical-op)


Fix FindLuaInterp handling of standard arguments

The FindLuaInterp find package module was not handling the standard
arguments correctly. So if the required lua executable was not set or
found correctly, the CMake processing would continue with unexpected
error messages and behavior.

--- CMake/FindLuaInterp.cmake
+++ CMake/FindLuaInterp.cmake
@@ -38,7 +38,7 @@
 # handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
 # all listed variables are TRUE
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Lua
+find_package_handle_standard_args(LuaInterp
                                   REQUIRED_VARS LUA_EXECUTABLE
                                   VERSION_VAR LUA_VERSION_STRING)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Set CircleCI to use Github for ITK repo

Set CircleCI to use Github for ITK repo

--- .circleci/circleci.cmake
+++ .circleci/circleci.cmake
@@ -62,6 +62,7 @@

 SET (_dashboard_cache "
+    ITK_GIT_REPOSITORY:STRING=\"https://github.com/InsightSoftwareConsortium/ITK.git\"
     BUILD_DOCUMENTS:BOOL=OFF
     BUILD_EXAMPLES:BOOL=OFF
     BUILD_SHARED_LIBS:BOOL=ON


Add compiler flags used by the buildteam to do release

--- cmake/build_configurations/mysql_release.cmake
+++ cmake/build_configurations/mysql_release.cmake
@@ -21,3 +21,72 @@
 SET(WITH_FEDERATED_STORAGE_ENGINE 1)
 SET(WITHOUT_EXAMPLE_STORAGE_ENGINE 1)
 SET(WITH_EMBEDDED_SERVER 1)
+SET(ENABLE_LOCAL_INFILE TRUE)
+SET(WITH_SSL bundled)
+SET(WITH_ZLIB bundled)
+
+
+IF(NOT COMPILATION_COMMENT)
+  SET(COMPILATION_COMMENT "MySQL Community Server (GPL)")
+ENDIF()
+
+IF(UNIX)
+  SET(CMAKE_INSTALL_PREFIX "/usr/local/mysql")
+  SET(WITH_EXTRA_CHARSETS complex)
+  SET(WITH_READLINE TRUE)
+  SET(WITH_PIC TRUE)
+
+  # Default GCC flags
+  IF(CMAKE_C_COMPILER_IS_GNUCXX)
+   SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O3 -static-libgcc -fno-omit-frame-pointer")
+   SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3 -static-libgcc -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti")
+  ENDIF()
+
+
+  # HPUX flags
+  IF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
+    IF(CMAKE_C_COMPILER_ID MATCHES "HP")
+      IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ia64")
+        SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g +O2 +DD64 +DSitanium2 -mt -AC99")
+        SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g +O2 +DD64 +DSitanium2 -mt -Aa")
+      ENDIF()
+    ENDIF()
+    SET(WITH_SSL)
+  ENDIF()
+
+  # Linux flags
+  IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+    IF(CMAKE_C_COMPILER_ID MATCHES "Intel")
+      SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-static-intel -g -O3 -unroll2 -ip -mp -restrict")
+      SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-static-intel -g -O3 -unroll2 -ip -mp -restrict")
+    ENDIF()
+  ENDIF()
+
+  # OSX flags
+  IF(APPLE)
+   SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-Os ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
+   SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Os ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
+  ENDIF()
+
+  # Solaris flags
+  IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
+    IF(CMAKE_C_COMPILER_ID MATCHES "SunPro")
+      IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
+        IF(CMAKE_SIZEOF_VOIDP EQUAL 4)
+          # 32 bit - optinmization is -xO2
+          SET(CMAKE_C_FLAGS_RELWITHDEBINFO
+            "-g -xO2 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic")
+          SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO
+            "-g0 -xO2 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic")
+        ELSE()
+          # 64 bit - optimization is -xO3
+          SET(CMAKE_C_FLAGS_RELWITHDEBINFO
+            "-g -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic")
+          SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO
+            "-g0 -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic")
+         ENDIF()
+       ENDIF()
+    ENDIF()
+  ENDIF()
+
+ ENDIF()


dok index now created in a serial way (for parallel compilation)

--- scripts/TorchHelp.cmake
+++ scripts/TorchHelp.cmake
@@ -37,6 +37,9 @@
 ADD_CUSTOM_TARGET(main-index-dok-files
   DEPENDS ${generatedfiles})
 ADD_DEPENDENCIES(documentation-dok main-index-dok-files)
+
+# used to make sure dokindex is built in a serial way
+SET(all-dok-index "" CACHE INTERNAL "dokindex previous dependencies" FORCE)

 MACRO(ADD_TORCH_DOK srcdir dstdir section title rank)

@@ -103,7 +106,15 @@
       "${CMAKE_CURRENT_SOURCE_DIR}/${srcdir}/index.dok"
       "${Torch_SOURCE_DIR}/packages/dok/init.lua")

+    # the main dok depends on this
     ADD_DEPENDENCIES(documentation-dok ${dstdir}-dok-index)
+
+    # this one depends on all previous ones (serial build)
+    FOREACH(target ${all-dok-index})
+      ADD_DEPENDENCIES(${dstdir}-dok-index ${target})
+    ENDFOREACH(target ${all-dok-index})
+
+    SET(all-dok-index "${dstdir}-dok-index" "${all-dok-index}" CACHE INTERNAL "dokindex previous dependencies" FORCE)

   ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${srcdir}/index.dok")


Clear environment variable ANDROID_HOME

Clear environment variable ANDROID_HOME

--- scripts/clear-all.cmake
+++ scripts/clear-all.cmake
@@ -297,3 +297,4 @@
 # See bug https://github.com/headupinclouds/gatherer/issues/58
 unset(ENV{ANDROID_SDK_ROOT})
 unset(ENV{ANDROID_API_VERSION})
+unset(ENV{ANDROID_HOME})


Fix typo bug

Fix typo bug

--- CMake/utils/super3d-utils-configuration.cmake
+++ CMake/utils/super3d-utils-configuration.cmake
@@ -43,7 +43,7 @@
     set(gen_command_args ${gen_command_args} "-D${arg}=${${arg}}")
   endforeach()

-  set(tmp_file "${CMAKE_CURRENT_BINARY_DIR}/configure.${name}.output")
+  set(tmp_file "${CMAKE_CURRENT_BINARY_DIR}/configure.${action_name}.output")
   add_custom_command(
     OUTPUT  "${destination}"
     COMMAND "${CMAKE_COMMAND}"
@@ -67,11 +67,11 @@
   # Enters switch if not defined or false evaluating value
   if(NOT no_configure_target)
     # TODO: is the ${all} needed?
-    add_custom_target(configure-${name} ${all}
+    add_custom_target(configure-${action_name} ${all}
       DEPENDS "${destination}"
       SOURCES "${source}"  # Adding source for IDE integration
       )
-    add_dependencies(configure configure-${name})
+    add_dependencies(configure configure-${action_name})

     # for VisualStudio / XCode IDEs
     source_group("Configuration Files"


rm cmake/FindCplex.cmake

rm cmake/FindCplex.cmake

Signed-off-by: Matt Liberty <44ef1ce0ef6935daf739a0795dad249ba5322e97@eng.ucsd.edu>

--- cmake/FindCplex.cmake
+++ cmake/FindCplex.cmake
@@ -1,158 +0,0 @@
-# Source: https://github.com/martinsch/pgmlink
-
-# This module finds cplex.
-#
-# User can give CPLEX_ROOT_DIR as a hint stored in the cmake cache.
-#
-# It sets the following variables:
-#  CPLEX_FOUND              - Set to false, or undefined, if cplex isn't found.
-#  CPLEX_INCLUDE_DIRS       - include directory
-#  CPLEX_LIBRARIES          - library files
-
-if(WIN32)
-    execute_process(COMMAND cmd /C set CPLEX_STUDIO_DIR OUTPUT_VARIABLE CPLEX_STUDIO_DIR_VAR ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-    if(NOT CPLEX_STUDIO_DIR_VAR)
-        MESSAGE(FATAL_ERROR "Unable to find CPLEX: environment variable CPLEX_STUDIO_DIR<VERSION> not set.")
-    endif()
-
-    STRING(REGEX REPLACE "^CPLEX_STUDIO_DIR" "" CPLEX_STUDIO_DIR_VAR ${CPLEX_STUDIO_DIR_VAR})
-    STRING(REGEX MATCH "^[0-9]+" CPLEX_WIN_VERSION ${CPLEX_STUDIO_DIR_VAR})
-    STRING(REGEX REPLACE "^[0-9]+=" "" CPLEX_STUDIO_DIR_VAR ${CPLEX_STUDIO_DIR_VAR})
-    file(TO_CMAKE_PATH "${CPLEX_STUDIO_DIR_VAR}" CPLEX_ROOT_DIR_GUESS)
-
-    set(CPLEX_WIN_VERSION ${CPLEX_WIN_VERSION} CACHE STRING "CPLEX version to be used.")
-    set(CPLEX_ROOT_DIR "${CPLEX_ROOT_DIR_GUESS}" CACHE PATH "CPLEX root directory.")
-
-    MESSAGE(STATUS "Found CLPEX version ${CPLEX_WIN_VERSION} at '${CPLEX_ROOT_DIR}'")
-
-    STRING(REGEX REPLACE "/VC/bin/.*" "" VISUAL_STUDIO_PATH ${CMAKE_C_COMPILER})
-    STRING(REGEX MATCH "Studio [0-9]+" CPLEX_WIN_VS_VERSION ${VISUAL_STUDIO_PATH})
-    STRING(REGEX REPLACE "Studio " "" CPLEX_WIN_VS_VERSION ${CPLEX_WIN_VS_VERSION})
-
-    if(${CPLEX_WIN_VS_VERSION} STREQUAL "9")
-        set(CPLEX_WIN_VS_VERSION 2008)
-    elseif(${CPLEX_WIN_VS_VERSION} STREQUAL "10")
-        set(CPLEX_WIN_VS_VERSION 2010)
-    elseif(${CPLEX_WIN_VS_VERSION} STREQUAL "11")
-        set(CPLEX_WIN_VS_VERSION 2012)
-    else()
-        MESSAGE(FATAL_ERROR "CPLEX: unknown Visual Studio version at '${VISUAL_STUDIO_PATH}'.")
-    endif()
-
-    set(CPLEX_WIN_VS_VERSION ${CPLEX_WIN_VS_VERSION} CACHE STRING "Visual Studio Version")
-
-    if("${CMAKE_C_COMPILER}" MATCHES "amd64")
-        set(CPLEX_WIN_BITNESS x64)
-    else()
-        set(CPLEX_WIN_BITNESS x86)
-    endif()
-
-    set(CPLEX_WIN_BITNESS ${CPLEX_WIN_BITNESS} CACHE STRING "On Windows: x86 or x64 (32bit resp. 64bit)")
-
-    MESSAGE(STATUS "CPLEX: using Visual Studio ${CPLEX_WIN_VS_VERSION} ${CPLEX_WIN_BITNESS} at '${VISUAL_STUDIO_PATH}'")
-
-    if(NOT CPLEX_WIN_LINKAGE)
-        set(CPLEX_WIN_LINKAGE mda CACHE STRING "CPLEX linkage variant on Windows. One of these: mda (dll, release), mdd (dll, debug), mta (static, release), mtd (static, debug)")
-    endif(NOT CPLEX_WIN_LINKAGE)
-
-    # now, generate platform string
-    set(CPLEX_WIN_PLATFORM "${CPLEX_WIN_BITNESS}_windows_vs${CPLEX_WIN_VS_VERSION}/stat_${CPLEX_WIN_LINKAGE}")
-
-else()
-
-    set(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory.")
-    set(CPLEX_WIN_PLATFORM "")
-
-endif()
-
-
-FIND_PATH(CPLEX_INCLUDE_DIR
-        ilcplex/cplex.h
-        HINTS ${CPLEX_ROOT_DIR}/cplex/include
-        ${CPLEX_ROOT_DIR}/include
-        PATHS ENV C_INCLUDE_PATH
-        ENV C_PLUS_INCLUDE_PATH
-        ENV INCLUDE_PATH
-        )
-
-FIND_PATH(CPLEX_CONCERT_INCLUDE_DIR
-        ilconcert/iloenv.h
-        HINTS ${CPLEX_ROOT_DIR}/concert/include
-        ${CPLEX_ROOT_DIR}/include
-        PATHS ENV C_INCLUDE_PATH
-        ENV C_PLUS_INCLUDE_PATH
-        ENV INCLUDE_PATH
-        )
-
-FIND_LIBRARY(CPLEX_LIBRARY
-        NAMES cplex${CPLEX_WIN_VERSION} cplex
-        HINTS ${CPLEX_ROOT_DIR}/cplex/lib/${CPLEX_WIN_PLATFORM} #windows
-        ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_debian4.0_4.1/static_pic #unix
-        ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_sles10_4.1/static_pic #unix
-        ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_linux/static_pic #unix
-        ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_osx/static_pic #osx
-        ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_darwin/static_pic #osx
-        PATHS ENV LIBRARY_PATH #unix
-        ENV LD_LIBRARY_PATH #unix
-        )
-message(STATUS "CPLEX Library: ${CPLEX_LIBRARY}")
-
-FIND_LIBRARY(CPLEX_ILOCPLEX_LIBRARY
-        ilocplex
-        HINTS ${CPLEX_ROOT_DIR}/cplex/lib/${CPLEX_WIN_PLATFORM} #windows
-        ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_debian4.0_4.1/static_pic #unix
-        ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_sles10_4.1/static_pic #unix
-        ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_linux/static_pic #unix
-        ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_osx/static_pic #osx
-        ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_darwin/static_pic #osx
-        PATHS ENV LIBRARY_PATH
-        ENV LD_LIBRARY_PATH
-        )
-message(STATUS "ILOCPLEX Library: ${CPLEX_ILOCPLEX_LIBRARY}")
-
-FIND_LIBRARY(CPLEX_CONCERT_LIBRARY
-        concert
-        HINTS ${CPLEX_ROOT_DIR}/concert/lib/${CPLEX_WIN_PLATFORM} #windows
-        ${CPLEX_ROOT_DIR}/concert/lib/x86-64_debian4.0_4.1/static_pic #unix
-        ${CPLEX_ROOT_DIR}/concert/lib/x86-64_sles10_4.1/static_pic #unix
-        ${CPLEX_ROOT_DIR}/concert/lib/x86-64_linux/static_pic #unix
-        ${CPLEX_ROOT_DIR}/concert/lib/x86-64_osx/static_pic #osx
-        ${CPLEX_ROOT_DIR}/concert/lib/x86-64_darwin/static_pic #osx
-        PATHS ENV LIBRARY_PATH
-        ENV LD_LIBRARY_PATH
-        )
-message(STATUS "CONCERT Library: ${CPLEX_CONCERT_LIBRARY}")
-
-if(WIN32)
-    FIND_PATH(CPLEX_BIN_DIR
-            cplex${CPLEX_WIN_VERSION}.dll
-            HINTS ${CPLEX_ROOT_DIR}/cplex/bin/${CPLEX_WIN_PLATFORM} #windows
-            )
-else()
-    FIND_PATH(CPLEX_BIN_DIR
-            cplex
-            HINTS ${CPLEX_ROOT_DIR}/cplex/bin/x86-64_sles10_4.1 #unix
-            ${CPLEX_ROOT_DIR}/cplex/bin/x86-64_debian4.0_4.1 #unix
-            ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_linux #unix
-            ${CPLEX_ROOT_DIR}/cplex/bin/x86-64_osx #osx
-            ${CPLEX_ROOT_DIR}/cplex/bin/x86-64_darwin #osx
-            ENV LIBRARY_PATH
-            ENV LD_LIBRARY_PATH
-            )
-endif()
-message(STATUS "CPLEX Bin Dir: ${CPLEX_BIN_DIR}")
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPLEX DEFAULT_MSG
-        CPLEX_LIBRARY CPLEX_INCLUDE_DIR CPLEX_ILOCPLEX_LIBRARY CPLEX_CONCERT_LIBRARY CPLEX_CONCERT_INCLUDE_DIR)
-
-IF(CPLEX_FOUND)
-    SET(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR} ${CPLEX_CONCERT_INCLUDE_DIR})
-    SET(CPLEX_LIBRARIES ${CPLEX_CONCERT_LIBRARY} ${CPLEX_ILOCPLEX_LIBRARY} ${CPLEX_LIBRARY} )
-    IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
-        SET(CPLEX_LIBRARIES "${CPLEX_LIBRARIES};m;pthread")
-    ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
-ENDIF(CPLEX_FOUND)
-
-MARK_AS_ADVANCED(CPLEX_LIBRARY CPLEX_INCLUDE_DIR CPLEX_ILOCPLEX_LIBRARY CPLEX_CONCERT_INCLUDE_DIR CPLEX_CONCERT_LIBRARY)


ENH: upgrading dashboard from VS2008 to VS2010

--- Testing/Dashboard/pxDashboard_LKEB_win7-64_VS2010.cmake
+++ Testing/Dashboard/pxDashboard_LKEB_win7-64_VS2010.cmake
@@ -11,15 +11,15 @@
 # and defaults to Nightly.
 # NOTE that Model should directly follow the comma: no space allowed!
 #
-# Setup: Windows 7, Visual Studio 9 2008 Win64, Release mode, ITK 4.0.0
+# Setup: Windows 7, Visual Studio 10 2010 Win64, Release mode, ITK latest release
 # PC: LKEB, MS personal computer

 # Client maintainer: m.staring@lumc.nl
 set( CTEST_SITE "LKEB.PCMarius" )
-set( CTEST_BUILD_NAME "Win7-64bit-VS2008" )
+set( CTEST_BUILD_NAME "Win7-64bit-VS2010" )
 #set( CTEST_BUILD_FLAGS "-j2" ) # parallel build for makefiles
 set( CTEST_BUILD_CONFIGURATION Release )
-set( CTEST_CMAKE_GENERATOR "Visual Studio 9 2008 Win64" )
+set( CTEST_CMAKE_GENERATOR "Visual Studio 10 Win64" )
 set( CTEST_DASHBOARD_ROOT "D:/toolkits/ITKTools/nightly" )

 # Specify the kind of dashboard to submit
@@ -36,7 +36,7 @@

 SET( dashboard_cache "
 // Which ITK to use
-ITK_DIR:PATH=D:/toolkits/ITK/latest_release/bin_VS2008
+ITK_DIR:PATH=D:/toolkits/ITK/latest_release/bin_VS2010

 // Some ITKTools settings, defining the configuration
 ITKTOOLS_BUILD_TESTING:BOOL=ON


Updating the cmake version of cub to reflect bazel version.

PiperOrigin-RevId: 166757645

--- tensorflow/contrib/cmake/external/cub.cmake
+++ tensorflow/contrib/cmake/external/cub.cmake
@@ -14,8 +14,8 @@
 # ==============================================================================
 include (ExternalProject)

-set(cub_URL http://mirror.bazel.build/github.com/NVlabs/cub/archive/1.6.4.zip)
-set(cub_HASH SHA256=966d0c4f41e2bdc81aebf9ccfbf0baffaac5a74f00b826b06f4dee79b2bb8cee)
+set(cub_URL http://mirror.bazel.build/github.com/NVlabs/cub/archive/69ceda618313df8e9cac6659d607b08949455d14.tar.gz)
+set(cub_HASH SHA256=87e856522c283b8ea887c3b61d7d5b252d2dd74abac4f1d756d776e721223e82)
 set(cub_BUILD ${CMAKE_CURRENT_BINARY_DIR}/cub/src/cub)
 set(cub_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/cub/src/cub)
 set(cub_ARCHIVE_DIR ${CMAKE_CURRENT_BINARY_DIR}/external/cub_archive)


Add compiler and operation system dependent settings. Add DirectX9 findlib package from Ogre3D. Add for static builds with GCC compile flags to compile also the standard C++ lib statically.

--- CMake/ExampleBuild.cmake
+++ CMake/ExampleBuild.cmake
@@ -2,6 +2,9 @@
 	${CMAKE_MODULE_PATH}
 	${CMAKE_CURRENT_LIST_DIR}/Dependencies
 	${CMAKE_CURRENT_LIST_DIR}/Options
+	${CMAKE_CURRENT_LIST_DIR}/Compiler
+	${CMAKE_CURRENT_LIST_DIR}/Packages
+	${CMAKE_CURRENT_LIST_DIR}/OperationSystems
 )

 FUNCTION(BUILD_APP_GENERIC APP_NAME APP_SOURCE_FILES APP_HEADER_FILES APP_INSTALL_FILES, APP_INSTALL_DIRS APP_IS_WIN32 APP_INSTALL_PATH)
@@ -46,6 +49,15 @@

 	# When the examples are build without irrlicht library, we need to apply the same settings like for irrlicht
 	if (ZZZ_EXAMPLE_SINGLE_COMPILE)
+
+		# Compiler dependent settings
+		INCLUDE(CompilerMSVCLikeSettings)
+		INCLUDE(CompilerGCCLikeSettings)
+
+		# OS dependent settings
+		INCLUDE(OperationSystemLinux)
+		INCLUDE(OperationSystemWindows)
+
 		# Option dependent settings
 		INCLUDE(OptionStaticLib)
 		INCLUDE(OptionBuildExamples)
@@ -54,8 +66,10 @@
 		INCLUDE(OptionNativeOpenGL)

 		# Dependency related settings
-		INCLUDE(DependencyIMGUI)
 		INCLUDE(DependencyIrrlicht)
+		INCLUDE(DependencyOpenGL)
+		INCLUDE(DependencyDirectX9)
+		INCLUDE(DependencyDoxygen)

 		# Print all settings
 		#INCLUDE(PrintSettings)
@@ -75,7 +89,13 @@
 	else ()
 		ADD_EXECUTABLE(${APP_NAME} ${ALL_APP_SOURCE_FILES})
 	endif ()
-	TARGET_LINK_LIBRARIES(${APP_NAME} ${IRRIMGUI_LIBRARY} ${IRRIMGUI_DEPENDENCY_LIBRARIES})
+	TARGET_LINK_LIBRARIES(${APP_NAME} ${IRRIMGUI_LIBRARY} ${IRRIMGUI_DEPENDENCY_LIBRARIES} ${OS_DEPENDENT_LIBRARIES})
+
+#	if (GCC_LIKE_COMPILER)
+#		SET_TARGET_PROPERTIES(${APP_NAME} PROPERTIES
+#			COMPILE_FLAGS "-static -lpthread -static-libgcc -static-libstdc++"
+#		)
+#	endif ()

 	# Target installation
 	INSTALL(TARGETS ${APP_NAME}


Added VTK_LEGACY_REMOVE flag for superbuild

--- CMakeExternals/VTK.cmake
+++ CMakeExternals/VTK.cmake
@@ -81,6 +81,7 @@
         -DVTK_USE_GEOVIS:BOOL=OFF
         -DVTK_USE_SYSTEM_FREETYPE:BOOL=${VTK_USE_SYSTEM_FREETYPE}
         -DVTK_USE_QVTK_QTOPENGL:BOOL=OFF
+        -DVTK_LEGACY_REMOVE:BOOL=ON
         ${additional_cmake_args}
      DEPENDS ${proj_DEPENDENCIES}
     )


Typo

Typo

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@29150 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/checks/check_01_cxx_features.cmake
+++ deal.II/cmake/checks/check_01_cxx_features.cmake
@@ -113,7 +113,7 @@
   #       configure_threads.cmake which will determine and setup threads
   #       has to be called later...
   #
-  IF(NOT CMAKE_CROSSOMPILING) # Todo: Is it better to use DEAL_II_ALLOW_PLATFORM_INTROSPECTION here?
+  IF(NOT CMAKE_CROSSCOMPILING) # Todo: Is it better to use DEAL_II_ALLOW_PLATFORM_INTROSPECTION here?
     PUSH_TEST_FLAG("-pthread")
     CHECK_CXX_SOURCE_RUNS(
       "


Added missing include path for generated vpx_config files (VP9)

--- Source/VideoStreaming/VideoStreaming.cmake
+++ Source/VideoStreaming/VideoStreaming.cmake
@@ -160,6 +160,7 @@
     "${VP9_SOURCE_DIR}/vpx"
     "${VP9_SOURCE_DIR}/vp9"
     "${VP9_SOURCE_DIR}/vp9/common"
+    "${VP9_LIBRARY_DIR}"
   )
 ENDIF()


fixed test

fixed test

--- tests/package/package_source_tests/package_source_github_test.cmake
+++ tests/package/package_source_tests/package_source_github_test.cmake
@@ -32,7 +32,7 @@
   # resolve tests
   package_source_resolve_github("toeb/cmakepp")
   ans(res)
-  assertf({res.package_descriptor.id} STREQUAL "oo-cmake")
+  assertf({res.package_descriptor.id} STREQUAL "cmakepp")

   package_source_resolve_github("toeb/cppdynamic")
   ans(res)


Add detection of Visual Studio runtime from CMake environment

--- conan.cmake
+++ conan.cmake
@@ -65,12 +65,35 @@
         set(_SETTINGS ${_SETTINGS} -s arch=x86)
     endif()

-    set(_SETTINGS ${_SETTINGS} -s compiler.runtime=MD)
+    conan_cmake_detect_vs_runtime(_vs_runtime)
+    message(STATUS "Detected VS runtime: ${_vs_runtime}")
+    set(_SETTINGS ${_SETTINGS} -s compiler.runtime=${_vs_runtime})
   else()
       message(FATAL_ERROR "Conan: compiler setup not recognized")
   endif()

   set(${result} ${_SETTINGS} PARENT_SCOPE)
+endfunction()
+
+
+function(conan_cmake_detect_vs_runtime result)
+    string(TOUPPER ${CMAKE_BUILD_TYPE} build_type)
+    set(variables CMAKE_CXX_FLAGS_${build_type} CMAKE_C_FLAGS_${build_type} CMAKE_CXX_FLAGS CMAKE_C_FLAGS)
+    foreach(variable ${variables})
+        string(REPLACE " " ";" flags ${${variable}})
+        foreach (flag ${flags})
+            if(${flag} STREQUAL "/MD" OR ${flag} STREQUAL "/MDd" OR ${flag} STREQUAL "/MT" OR ${flag} STREQUAL "/MTd")
+                string(SUBSTRING ${flag} 1 -1 runtime)
+                set(${result} ${runtime} PARENT_SCOPE)
+                return()
+            endif()
+        endforeach()
+    endforeach()
+    if(${build_type} STREQUAL "DEBUG")
+        set(${result} "MDd" PARENT_SCOPE)
+    else()
+        set(${result} "MD" PARENT_SCOPE)
+    endif()
 endfunction()


ENH: Bump ITK version to HEAD

ENH: Bump ITK version to HEAD

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -73,7 +73,7 @@

 # Insight Segmentation and Registration Toolkit
 set( ITK_URL ${github_protocol}://github.com/InsightSoftwareConsortium/ITK.git )
-set( ITK_HASH_OR_TAG eda099680acca5b590a5f13e96bdebb9718a27a6 )
+set( ITK_HASH_OR_TAG 27bad878d16897a35484925ed06552cb00b871c0 )

 # Slicer Execution Model
 set( SlicerExecutionModel_URL


Use CTK_CMAKE_DIR instead of CTK_SOURCE_DIR

In case of external projects using this macro, CTK_SOURCE_DIR would
not be defined.

--- CMake/ctkFunctionGeneratePluginManifest.cmake
+++ CMake/ctkFunctionGeneratePluginManifest.cmake
@@ -93,8 +93,8 @@
 </RCC>
 ")

-  CONFIGURE_FILE("${CTK_SOURCE_DIR}/CMake/MANIFEST.MF.in" "${_manifest_filepath}" @ONLY)
-  CONFIGURE_FILE("${CTK_SOURCE_DIR}/CMake/plugin_manifest.qrc.in" "${_manifest_qrc_filepath}" @ONLY)
+  CONFIGURE_FILE("${CTK_CMAKE_DIR}/MANIFEST.MF.in" "${_manifest_filepath}" @ONLY)
+  CONFIGURE_FILE("${CTK_CMAKE_DIR}/plugin_manifest.qrc.in" "${_manifest_qrc_filepath}" @ONLY)

   QT4_ADD_RESOURCES(_qrc_src ${_manifest_qrc_filepath})


Remove now unnecessary SpirePM.cmake.

Remove now unnecessary SpirePM.cmake.

--- src/CMake/SpirePM.cmake
+++ src/CMake/SpirePM.cmake
@@ -1,520 +0,0 @@
-# - Spire package management module
-# Handles setting up Spire and all of its modules in hopefully the most
-# transparent way possible. This module has been heavily infulenced by
-# ExternalProject.cmake.
-#
-# The spire library must be built as an ecosystem of static libraries.
-# If you have more than one shared library in your project, only
-# link spire in one location (one shared library, or once in the executable).
-# Otherwise function lookup for OpenGL will break when using GLEW.
-#
-# The Spire_AddCore and Spire_AddModule functions add the following
-# variables to the PARENT_SCOPE namespace:
-#
-#  SPIRE_INCLUDE_DIRS   - All the spire include directories.
-#  SPIRE_LIBRARIES      - All libraries to link against.
-#
-# And these variables are only added by Spire_AddModule:
-#
-#  SPIRE_SHADER_DIRS    - All shader asset directories.
-#  SPIRE_ASSET_DIRS     - All asset directories.
-#
-# Spire_AddModule must be called after Spire_AddCore. AddModule needs
-# target properties that are set in Spire core.
-#
-# Spire core:
-#  Spire_AddCore(<name>           # Required - Target name that will be constructed for spire core.
-#    [PREFIX dir]                 # Same as ExternalProject_Add's PREFIX.
-#    [SOURCE_DIR dir]             # When specified, uses this directory as the source. If specified, spire core does not get automatically updated through git.
-#    [BINARY_DIR dir]             # Same as ExternalProject_Add's BINARY_DIR .
-#    [GIT_TAG tag]                # Same as ExternalProject_Add's GIT_TAG
-#    [GIT_REPOSITORY repo]        # Same as ExternalProject_Add's GIT_REPOSITORY.
-#    [USE_STD_THREADS truth]      # Set to 'ON' if you want to use spire threads.
-#    [MODULE_DIR dir]             # Module directory. Preferably outside of where cleaning happens.
-#    [SHADER_OUTPUT_DIR dir]      # Shader directory into which shaders will be copied. If present, shaders will be copied to this directory.
-#    [ASSET_OUTPUT_DIR dir]       # Asset directory into which assets will be copied. If present, assets will be copied to this directory.
-#    )
-#
-# Many of the ExternalProject settings are automatically generated for modules.
-# It is not recommeneded that you set SOURCE_DIR unless you are managing the
-# header locations for the source directory manually. If you set the source
-# directory, the source will not be downloaded and will not be updated using
-# git. You must manage that manually. Additionally, if you set the source
-# directory you can safely ignore the module name / repo and version function
-# parameters.
-#
-# You can find the public includes for a module in the SpireExt/<name> directory.
-# So the include path does depend on what you name the module's target.
-#
-# Spire modules:
-#  Spire_AddModule(<spire-core>   # Required - Target name of spire-core.
-#     <module name>               # Required - Module name; this is *not* the name of the target! Target is named: spire_spm_<module name>
-#     <repo>                      # Required - Name of the package or git repo. Only git repos are supported for now.
-#     <version>                   # Required - Version of the package to be used.
-#     [SOURCE_DIR dir]            # Same as Spire_AddCore. Source directory which when specified disables git synchronization.
-#     [SHADER_DIR dir]            # Specifies the directory containing module's shaders.
-#     [ASSET_DIR dir]             # Specifies the asset directory containing all spire assets.
-#     )
-#
-# Note that if the SHADER_OUTPUT_DIR is not set during the Spire_AddCore
-# call, then shaders will not be copied (since it does not know the desired
-# output directory). Likewise for the ASSET_OUTPUT_DIR.
-#
-# TODO: Should have some transparent way of copying shaders and assets. Some function
-# that ends up copying all of the assets and shaders into the 'correct' output
-# directory (determining what the correct output directory is, may be a harder
-# thing to do).
-#
-# TODO: Figure out how to handle modules that have dependencies on other
-#       modules. Like NPM. This will stay unresolved until there is a clear
-#       need for this.
-#
-# Also remember: you will probably want to use add_dependencies with the target
-# name.
-
-#-------------------------------------------------------------------------------
-# Pre-compute a regex to match documented keywords for each command.
-#-------------------------------------------------------------------------------
-# This code parses the *current* file and extracts parameter key words from the
-# documentation given above. It will match "# ... [...] # ..." style statements,
-# or "#  <funcname>(" style statements.
-# This code was pretty much lifted directly from KitWare's ExternalProject.cmake,
-# but then I documented what it's doing. It's not exactly straight forward.
-
-# Based on the current line in *this* file (SpirePM.cmake), we calc the number
-# of lines the documentation header consumes. Including this comment, that is
-# 12 lines upwards.
-math(EXPR _spm_documentation_line_count "${CMAKE_CURRENT_LIST_LINE} - 13")
-
-# Run a regex to extract parameter names from the *this* file (SpirePM.cmake).
-# Stuff the results into 'lines'.
-file(STRINGS "${CMAKE_CURRENT_LIST_FILE}" lines
-     LIMIT_COUNT ${_spm_documentation_line_count}
-     REGEX "^#  (  \\[[A-Z0-9_]+ [^]]*\\] +#.*$|[A-Za-z0-9_]+\\()")
-
-# Iterate over the results we obtained
-foreach(line IN LISTS lines)
-  # Check to see if we have found a function which is two spaces followed by
-  # any number of alphanumeric chararcters followed by a '('.
-  if("${line}" MATCHES "^#  [A-Za-z0-9_]+\\(")
-
-    # Are we already parsing a function?
-    if(_spm_func)
-      # We are parsing a function, save the current list of keywords in
-      # _spm_keywords_<function_name> in preparation to parse a new function.
-      set(_spm_keywords_${_spm_func} "${_spm_keywords_${_spm_func}})$")
-    endif()
-
-    # Note that _spm_func gets *set* HERE. See 'cmake --help-command string'.
-    # In this case, we are extracting the function's name into _spm_func.
-    string(REGEX REPLACE "^#  ([A-Za-z0-9_]+)\\(.*" "\\1" _spm_func "${line}")
-
-    #message("function [${_spm_func}]")
-
-    # Clear vars (we will be building a REGEX in _spm_keywords, hence
-    # the ^(. _spm_keyword_sep is only use to inject a separator at appropriate
-    # places while we are building the regex. In essence, we are skipping the
-    # first '|' that would usually be inserted.
-    set(_spm_keywords_${_spm_func} "^(")
-    set(_spm_keyword_sep)
-  else()
-    # Otherwise we must be parsing a parameter of the function. Extract the name
-    # of the parameter into _spm_key
-    string(REGEX REPLACE "^#    \\[([A-Z0-9_]+) .*" "\\1" _spm_key "${line}")
-    # Syntax highlighting gets a little wonky around this regex, need this - "
-
-    #message("  keyword [${_spm_key}]")
-
-    set(_spm_keywords_${_spm_func}
-      "${_spm_keywords_${_spm_func}}${_spm_keyword_sep}${_spm_key}")
-    set(_spm_keyword_sep "|")
-  endif()
-endforeach()
-# Duplicate of the 'Are we already parsing a function?' code above.
-# Just completes the regex.
-if(_spm_func)
-  set(_spm_keywords_${_spm_func} "${_spm_keywords_${_spm_func}})$")
-endif()
-
-# Include external project
-include(ExternalProject)
-
-# Record where this list file is located. We pass this directory into our
-# modules so they can also include SpirePM.
-# We do NOT want to access CMAKE_CURRENT_LIST_DIR from a function invokation.
-# If we do, then CMAKE_CURRENT_LIST_DIR will contain the calling CMakeLists.txt
-# file. See: http://stackoverflow.com/questions/12802377/in-cmake-how-can-i-find-the-directory-of-an-included-file
-set(DIR_OF_SPIREPM ${CMAKE_CURRENT_LIST_DIR})
-
-# Function for parsing arguments and values coming into the specified function
-# name 'f'. 'name' is the target name. 'ns' (namespace) is a value prepended
-# onto the key name before being added to the target namespace. 'args' list of
-# arguments to process.
-function(_spm_parse_arguments f ns args)
-  # Transfer the arguments to this function into target properties for the new
-  # custom target we just added so that we can set up all the build steps
-  # correctly based on target properties.
-  #
-  # We loop through ARGN and consider the namespace starting with an upper-case
-  # letter followed by at least two more upper-case letters, numbers or
-  # underscores to be keywords.
-  set(key)
-
-  foreach(arg IN LISTS args)
-    set(is_value 1)
-
-    # Check to see if we have a keyword. Otherwise, we will have a value
-    # associated with a keyword. Confirm that the arg doesn't match a few
-    # common exceptions.
-    if(arg MATCHES "^[A-Z][A-Z0-9_][A-Z0-9_]+$" AND
-        NOT ((arg STREQUAL "${key}") AND (key STREQUAL "COMMAND")) AND
-        NOT arg MATCHES "^(TRUE|FALSE)$")
-
-      # Now check to see if the argument is in our list of approved keywords.
-      # If is, then make sure we don't treat it as a value.
-      if(_spm_keywords_${f} AND arg MATCHES "${_spm_keywords_${f}}")
-        set(is_value 0)
-      endif()
-
-    endif()
-
-    if(is_value)
-      if(key)
-        # We have a key / value pair. Set the appropriate property.
-        if(NOT arg STREQUAL "")
-          # Set the variable in both scopes so we can test for existance
-          # and update as needed.
-          set(${ns}${key} "${arg}")
-          set(${ns}${key} "${arg}" PARENT_SCOPE)
-          #message("Set ${ns}${key} to ${arg}")
-        else()
-          if (${ns}${key})
-            # If we already have a value for this key, generated a semi-colon
-            # separated list.
-            set(value ${${ns}${key}})
-            set(${ns}${key} "${value};${arg}")
-            set(${ns}${key} "${value};${arg}" PARENT_SCOPE)
-            #message("Set2 ${ns}${key} to ${value};${arg}")
-          else()
-            set(${ns}${key} "${arg}")
-            set(${ns}${key} "${arg}" PARENT_SCOPE)
-          endif()
-        endif()
-      else()
-        # Missing Keyword
-        message(AUTHOR_WARNING "value '${arg}' with no previous keyword in ${f}")
-      endif()
-    else()
-      # Set the key to use in the next iteration.
-      set(key "${arg}")
-    endif()
-  endforeach()
-endfunction()
-
-
-# See: http://stackoverflow.com/questions/7747857/in-cmake-how-do-i-work-around-the-debug-and-release-directories-visual-studio-2
-function(_spm_build_target_output_dirs parent_var_to_update output_dir)
-
-  set(outputs)
-  set(outputs ${outputs} "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY:STRING=${output_dir}")
-  set(outputs ${outputs} "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:STRING=${output_dir}")
-  set(outputs ${outputs} "-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:STRING=${output_dir}")
-
-  # Second, for multi-config builds (e.g. msvc)
-  foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
-    string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG)
-    set(outputs ${outputs} "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG}:STRING=${output_dir}")
-    set(outputs ${outputs} "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG}:STRING=${output_dir}")
-    set(outputs ${outputs} "-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG}:STRING=${output_dir}")
-  endforeach(OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES)
-
-  set(${parent_var_to_update} ${outputs} PARENT_SCOPE)
-
-endfunction()
-
-function(Spire_BuildCoreThirdPartyIncludes out_var source_dir)
-  set(ret_val ${ret_val} "${source_dir}/Spire/3rdParty/glm")
-  set(ret_val ${ret_val} "${source_dir}/Spire/3rdParty/glew/include")
-  set(${out_var} ${ret_val} PARENT_SCOPE)
-endfunction()
-
-
-# 'name' - Name of the target that will be created.
-# This function will define or add to the following variables in the parent's
-# namespace.
-#
-#  SPIRE_INCLUDE_DIR     - All the spire include directories, including modules.
-#  SPIRE_LIBRARY         - All libraries to link against, including modules.
-#
-function(Spire_AddCore name)
-  # Parse all function arguments into our namespace prepended with _SPM_.
-  _spm_parse_arguments(Spire_AddCore _SPM_ "${ARGN}")
-
-  # Setup any defaults that the user provided.
-  if (DEFINED _SPM_PREFIX)
-    set(_ep_prefix "PREFIX" "${_SPM_PREFIX}")
-  else()
-    set(_ep_prefix "PREFIX" "${CMAKE_CURRENT_BINARY_DIR}/spire-core")
-    # We also set the _SPM_PREFIX variable in this case since we use it below.
-    set(_SPM_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/spire-core")
-  endif()
-
-  if (DEFINED _SPM_GIT_TAG)
-    set(_ep_git_tag "GIT_TAG" ${_SPM_GIT_TAG})
-  else()
-    set(_ep_git_tag "GIT_TAG" "origin/master")
-  endif()
-
-  if (DEFINED _SPM_GIT_REPOSITORY)
-    set(_ep_git_repo "GIT_REPOSITORY" ${_SPM_GIT_REPOSITORY})
-  else()
-    set(_ep_git_repo "GIT_REPOSITORY" "https://github.com/SCIInstitute/spire.git")
-  endif()
-
-  if (DEFINED _SPM_SOURCE_DIR)
-    set(_ep_source_dir "SOURCE_DIR" "${_SPM_SOURCE_DIR}")
-    # Clear git repo or git tag, if any.
-    set(_ep_git_repo)
-    set(_ep_git_tag)
-    set(_ep_update_command "UPDATE_COMMAND" "cmake .")
-  endif()
-
-  if (DEFINED _SPM_BINARY_DIR)
-    set(_ep_bin_dir "BINARY_DIR" $_SPM_BINARY_DIR)
-  endif()
-
-  if (DEFINED _SPM_USE_STD_THREADS)
-    set(_ep_spire_use_threads "-DUSE_STD_THREADS:BOOL=${_SPM_USE_STD_THREADS}")
-  else()
-    set(_ep_spire_use_threads "-DUSE_STD_THREADS:BOOL=ON")
-  endif()
-
-  # All the following 3 lines do is construct a series of values that will go
-  # into the CMAKE_ARGS key in ExternalProject_Add. These are a series
-  # binary of output directories. We want a central location for everything
-  # so we can keep track of the binaries.
-  set(_SPM_BASE_OUTPUT_DIR "${_SPM_PREFIX}/spire_modules_bin")
-  set(_SPM_CORE_OUTPUT_DIR "${_SPM_BASE_OUTPUT_DIR}/spire_core")
-  _spm_build_target_output_dirs(_ep_spire_output_dirs ${_SPM_CORE_OUTPUT_DIR})
-
-  ExternalProject_Add(${name}
-    ${_ep_prefix}
-    ${_ep_source_dir}
-    ${_ep_git_repo}
-    ${_ep_git_tag}
-    ${_ep_bin_dir}
-    INSTALL_COMMAND ""
-    CMAKE_ARGS
-      -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-      ${_ep_spire_use_threads}
-      ${_ep_spire_output_dirs}
-    )
-
-  if (DEFINED _SPM_SOURCE_DIR)
-    # Forces a build even though we are source only.
-    ExternalProject_Add_Step(${name} forcebuild
-      COMMAND ${CMAKE_COMMAND} -E echo
-      ALWAYS 1
-      DEPENDERS build
-      )
-  endif()
-
-  # This target property is used to place compiled modules where they belong.
-  set_target_properties(${name} PROPERTIES SPIRE_MODULE_OUTPUT_DIRECTORY "${_SPM_BASE_OUTPUT_DIR}")
-
-  # Setup imported library.
-  set(spire_library_name Spire)
-  set(spire_library_target_name SpireCoreLibraryTarget)
-  set(spire_library_path
-    "${_SPM_CORE_OUTPUT_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${spire_library_name}${CMAKE_STATIC_LIBRARY_SUFFIX}")
-  add_library(${spire_library_target_name} STATIC IMPORTED GLOBAL)
-  add_dependencies(${spire_library_target_name} ${name})
-  set_property(TARGET ${spire_library_target_name} PROPERTY IMPORTED_LOCATION "${spire_library_path}")
-
-  # Library path for the core module.
-  set(SPIRE_LIBRARIES ${SPIRE_LIBRARIES} "${spire_library_target_name}" PARENT_SCOPE)
-  set(SPIRE_LIBRARY_DIRS ${SPIRE_LIBRARY_DIRS} "${_SPM_CORE_OUTPUT_DIR}" PARENT_SCOPE)
-
-  # Retrieving properties from external projects will retrieve their fully
-  # initialized values (including if any defaults were set).
-  ExternalProject_Get_Property(${name} PREFIX)
-  ExternalProject_Get_Property(${name} SOURCE_DIR)
-  ExternalProject_Get_Property(${name} BINARY_DIR)
-  ExternalProject_Get_Property(${name} INSTALL_DIR)
-
-  set(SPIRE_INCLUDE_DIR ${SPIRE_INCLUDE_DIR} "${SOURCE_DIR}")
-  set(SPIRE_INCLUDE_DIR ${SPIRE_INCLUDE_DIR} PARENT_SCOPE)
-
-  set(SPIRE_MODULE_INCLUDE_DIRS PARENT_SCOPE)
-
-  Spire_BuildCoreThirdPartyIncludes(spire_third_party_dirs ${SOURCE_DIR})
-  set(SPIRE_3RDPARTY_INCLUDE_DIRS ${spire_third_party_dirs})
-  set(SPIRE_3RDPARTY_INCLUDE_DIRS "${SPIRE_3RDPARTY_INCLUDE_DIRS}" PARENT_SCOPE)
-
-  # Also set a target property containing all of the includes needed for the
-  # core spire library. This is used by modules in order.
-  set_target_properties(${name} PROPERTIES SPIRE_CORE_INCLUDE_DIRS "${SPIRE_INCLUDE_DIRS};${SPIRE_3RDPARTY_INCLUDE_DIRS}")
-  set_target_properties(${name} PROPERTIES SPIRE_BASE_MODULE_SRC_DIR "${PREFIX}/module_src/SpireExt")
-
-  # Set output directory for assets if the user passed the variable in.
-  if (DEFINED _SPM_ASSET_OUTPUT_DIR)
-    set_target_properties(${name} PROPERTIES ASSET_OUTPUT_DIR "${_SPM_ASSET_OUTPUT_DIR}")
-  endif()
-
-  # Set output directory for shaders if the user passed the variable in.
-  if (DEFINED _SPM_SHADER_OUTPUT_DIR)
-    set_target_properties(${name} PROPERTIES SHADER_OUTPUT_DIR "${_SPM_SHADER_OUTPUT_DIR}")
-  endif()
-
-endfunction()
-
-# Module are built using the root CMakeLists.txt but the output
-# directories of the modules are modified such that they end up in a
-# single area (under the spire-core prefix). Also, modules are linked
-# against the already pre-existing spire_core library. Either dynamically or
-# statically. Extra link directories are passed into the CMAKE_ARGS in
-# ExternalProject_Add.
-# Additionally, all spire modules must accept an output name
-# (SPIRE_OUTPUT_NAME). The output name will be used to target and link against
-# the generated static library.
-function (Spire_AddModule spire_core module_name repo version)
-
-  set(target_name "spire_spm_${module_name}")
-
-  # The name we will link against.
-  set(MODULE_STATIC_LIB_NAME "spirelib_${module_name}")
-
-  # Extract prefix and target module src directory from spire_core
-  get_target_property(BASE_MODULE_SRC_DIR ${spire_core} SPIRE_BASE_MODULE_SRC_DIR)
-  ExternalProject_Get_Property(${spire_core} PREFIX)
-  ExternalProject_Get_Property(${spire_core} SOURCE_DIR)
-  set(SPIRE_CORE_PREFIX ${PREFIX})
-  set(SPIRE_CORE_SRC ${SOURCE_DIR})
-  set(PREFIX)
-  set(SOURCE_DIR)
-  set(MODULE_PREFIX "${SPIRE_CORE_PREFIX}/module_build/${module_name}/${version}")
-  set(MODULE_SRC_DIR "${MODULE_PREFIX}/SpireExt/${module_name}")
-
-  # Parse all function arguments into our namespace prepended with _SPM_.
-  _spm_parse_arguments(Spire_AddCore _SPM_ "${ARGN}")
-
-  # Extract desired output directory from spire_core target.
-  get_target_property(_SPM_BASE_OUTPUT_DIR ${spire_core} SPIRE_MODULE_OUTPUT_DIRECTORY)
-  set(MODULE_BIN_OUTPUT_DIR "${_SPM_BASE_OUTPUT_DIR}/${target_name}")
-  _spm_build_target_output_dirs(_ep_spire_output_dirs ${MODULE_BIN_OUTPUT_DIR})
-
-  # If the user specified the source directory then don't automatically generate
-  # it for them and wipe out all git / download info.
-  if (DEFINED _SPM_SOURCE_DIR)
-    set(_ep_source_dir "SOURCE_DIR" "${_SPM_SOURCE_DIR}")
-    # Clear git repo or git tag, if any.
-    set(_ep_git_repo)
-    set(_ep_git_tag)
-
-    # Attempt to set include directory intelligently. This will allow use to
-    # use SpireExt/<module name> if the directory hierarchy is setup correctly
-    # on-disk.
-    set(SPIRE_MODULE_INCLUDE_DIRS ${SPIRE_MODULE_INCLUDE_DIRS} ${_SPM_SOURCE_DIR}/../.. PARENT_SCOPE)
-  else()
-    # If they did not, place the source directory in a consistent directory
-    # hierarchy such that the user can access the project using:
-    # SpireExt/<reponame>/. It is common to store public include
-    # headers at the root of the project for spire modules.
-    set(_ep_source_dir "SOURCE_DIR" "${MODULE_SRC_DIR}")
-    set(_ep_git_repo "GIT_REPOSITORY" "${repo}")
-    set(_ep_git_tag "GIT_TAG" "${version}")
-
-    # Set include directories.
-    set(SPIRE_MODULE_INCLUDE_DIRS ${SPIRE_MODULE_INCLUDE_DIRS} ${MODULE_PREFIX} PARENT_SCOPE)
-  endif()
-
-  if (DEFINED _SPM_SHADER_DIR)
-    # Set appropriate shader variable in PARENT_SCOPE.
-    set(SPIRE_SHADER_DIRS ${SPIRE_SHADER_DIRS} ${_SPM_SHADER_DIR} PARENT_SCOPE)
-  endif()
-
-  if (DEFINED _SPM_ASSET_DIR)
-    # Set appropriate asset variable in PARENT_SCOPE.
-    set(SPIRE_ASSET_DIRS ${SPIRE_ASSET_DIRS} ${_SPM_ASSET_DIR} PARENT_SCOPE)
-  endif()
-
-  get_target_property(CORE_INCLUDE_DIRS ${spire_core} SPIRE_CORE_INCLUDE_DIRS)
-
-  get_target_property(OUTPUT_SHADER_DIR ${spire_core} SHADER_OUTPUT_DIR)
-  if(OUTPUT_SHADER_DIR STREQUAL "NOTFOUND")
-    set(OUTPUT_SHADER_DIR "")
-  endif()
-
-  get_target_property(OUTPUT_ASSET_DIR ${spire_core} ASSET_OUTPUT_DIR)
-  if(OUTPUT_ASSET_DIR STREQUAL "NOTFOUND")
-    set(OUTPUT_ASSET_DIR "")
-  endif()
-
-  ExternalProject_Add(${target_name}
-    "PREFIX;${MODULE_PREFIX}"
-    ${_ep_git_repo}
-    ${_ep_git_tag}
-    ${_ep_source_dir}
-    INSTALL_COMMAND ""
-    CMAKE_ARGS
-      -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-      -DSPIRE_OUTPUT_MODULE_NAME:STRING=${MODULE_STATIC_LIB_NAME}
-      -DMOD_SPIRE_CMAKE_MODULE_PATH:STRING=${DIR_OF_SPIREPM}
-      -DMOD_SPIRE_CORE_SRC:STRING=${SPIRE_CORE_SRC}
-      -DOUTPUT_SHADER_DIR:STRING=${OUTPUT_SHADER_DIR}
-      -DOUTPUT_ASSET_DIR:STRING=${OUTPUT_ASSET_DIR}
-      ${_ep_spire_output_dirs}
-    )
-
-  if (DEFINED _SPM_SOURCE_DIR)
-    # Forces a build even though we are source only.
-    ExternalProject_Add_Step(${target_name} forcebuild
-      COMMAND ${CMAKE_COMMAND} -E echo
-      ALWAYS 1
-      DEPENDERS build
-      )
-  endif()
-
-  # We don't need to set SPIRE_INCLUDE_DIRS since it is assumed that the source
-  # for our module has been placed in the appropriate location and we can
-  # lookup the results using SpireExt/{target_name}.
-
-  # Setup imported library.
-  set(spire_library_name ${MODULE_STATIC_LIB_NAME})
-  set(spire_library_target_name ${MODULE_STATIC_LIB_NAME})
-  set(spire_library_path
-    "${MODULE_BIN_OUTPUT_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${spire_library_name}${CMAKE_STATIC_LIBRARY_SUFFIX}")
-  add_library(${spire_library_target_name} STATIC IMPORTED GLOBAL)
-  add_dependencies(${spire_library_target_name} ${target_name})
-  set_property(TARGET ${spire_library_target_name} PROPERTY IMPORTED_LOCATION "${spire_library_path}")
-
-  # Ensure this module can be found during the linking process.
-  set(SPIRE_LIBRARIES ${SPIRE_LIBRARIES} "${MODULE_STATIC_LIB_NAME}" PARENT_SCOPE)
-  set(SPIRE_LIBRARY_DIRS ${SPIRE_LIBRARY_DIRS} "${MODULE_BIN_OUTPUT_DIR}" PARENT_SCOPE)
-
-  # We do depend on the spire source being available before we compile our,
-  # hence the dependency.
-  add_dependencies(${target_name} ${spire_core})
-
-endfunction()
-
-function (Spire_CopyShaders src_shader_dir dest_shader_dir)
-  if (NOT dest_shader_dir STREQUAL "")
-    file(COPY ${src_shader_dir}/ DESTINATION ${dest_shader_dir}
-      FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
-      DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
-                            GROUP_READ
-                            WORLD_READ WORLD_EXECUTE)
-  endif()
-endfunction()
-
-function (Spire_CopyAssets src_asset_dir dest_asset_dir)
-  if (NOT dest_asset_dir STREQUAL "")
-    file(COPY ${src_asset_dir}/ DESTINATION ${dest_asset_dir}
-      FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
-      DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
-                            GROUP_READ
-                            WORLD_READ WORLD_EXECUTE)
-  endif()
-endfunction()
-


STYLE: Add comments on ANTS external

STYLE: Add comments on ANTS external

--- CMake/FindExternalTools.cmake
+++ CMake/FindExternalTools.cmake
@@ -468,13 +468,15 @@

 # ===== ANTS/WarpMultiTransform =====================================================
 set( SourceCodeArgs
+  # SVN_REPOSITORY "http://advants.svn.sourceforge.net/svnroot/advants/trunk"
+  # SVN_REVISION -r 1685 # 12/13/2012
   GIT_REPOSITORY "${git_protocol}://github.com/stnava/ANTs.git"
   GIT_TAG "6cb624225fe99047b562acb1a0cb053dc98dbc50" # 2013-01-31 Move to new repository home
   )
 set( CMAKE_ExtraARGS
   -DBUILD_TESTING:BOOL=OFF
   -DBUILD_SHARED_LIBS:BOOL=OFF
-  #  -DANTS_SUPERBUILD:BOOL=OFF
+  #  -DANTS_SUPERBUILD:BOOL=OFF # because needs boost
   -DSuperBuild_ANTS_USE_GIT_PROTOCOL:BOOL=${USE_GIT_PROTOCOL}
   -DUSE_SYSTEM_ITK:BOOL=ON
   -DITK_DIR:PATH=${ITK_DIR}


STYLE: Use more standard spacing in ITKExamplesMacros.cmake.

Change-Id: Ie84d0999b57fbed03c690ef94793404afb99ee20

--- CMake/ITKExamplesMacros.cmake
+++ CMake/ITKExamplesMacros.cmake
@@ -1,4 +1,4 @@
-include( CMakeParseArguments )
+include(CMakeParseArguments)

 # A high level target that the individual targets depend on.
 #add_custom_target( CreateTarballs ALL
@@ -14,38 +14,37 @@
 # tarball's in the example output directory, and custom targets for building
 # the Sphinx documentation for an individual example.  The Sphinx target will be
 # called ${example_name}Doc.
-macro( add_example example_name )
-  if( BUILD_DOCUMENTATION )
-    if( SPHINX_HTML_OUTPUT )
-      add_custom_target( ${example_name}Tarball
+macro(add_example example_name)
+  if(BUILD_DOCUMENTATION)
+    if(SPHINX_HTML_OUTPUT)
+      add_custom_target(${example_name}Tarball
         COMMAND ${PYTHON_EXECUTABLE} ${ITKExamples_SOURCE_DIR}/Utilities/CreateTarball.py
           ${example_name} ${SPHINX_DESTINATION}
         WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
         COMMENT "Creating tarballs for ${example_name}"
         DEPENDS copy_sources
         )
-      add_dependencies( CreateTarballs ${example_name}Tarball )
+      add_dependencies(CreateTarballs ${example_name}Tarball)
     endif()
   endif()

   # Process the example's CMakeLists.txt
-  add_subdirectory( ${example_name} )
-
+  add_subdirectory(${example_name})
 endmacro()

 # Macro if the corresponding module is enabled when ITK was built
 # Pass in the module directory path.  Also pass the module name as the second
 # argument if it is different than ITK${_dir}.
-macro( add_subdirectory_if_module_enabled _dir )
-  set( _module_name ITK${_dir} )
-  if( "${ARGV1}" STRGREATER "" )
-    set( _module_name ${ARGV1} )
+macro(add_subdirectory_if_module_enabled _dir)
+  set(_module_name ITK${_dir})
+  if("${ARGV1}" STRGREATER "")
+    set(_module_name ${ARGV1})
   endif()
-  list( FIND ITK_MODULES_ENABLED ${_module_name} _have )
+  list(FIND ITK_MODULES_ENABLED ${_module_name} _have)

-  if( NOT ${_have} EQUAL "-1" )
-    add_subdirectory( ${_dir} )
+  if(NOT ${_have} EQUAL "-1")
+    add_subdirectory(${_dir})
   endif()
 endmacro()

@@ -72,93 +71,89 @@
 # * By default TEST_NAME is set to ${EXAMPLE_NAME}TestBaselineComparison
 # * For Python the comparison test is added automatically

-function( compare_to_baseline )
+function(compare_to_baseline)

-  set( options
-  )
+  set(options)

-  set( oneValueArgs
+  set(oneValueArgs
     EXAMPLE_NAME
     TEST_IMAGE
     BASELINE_PREFIX
     TEST_NAME
-  )
+    )

-  set( multiValueArgs
+  set(multiValueArgs
     DEPENDS
     OPTIONS
-  )
+    )

-  cmake_parse_arguments( LOCAL_COMPARISON
+  cmake_parse_arguments(LOCAL_COMPARISON
     "${options}"
     "${oneValueArgs}"
     "${multiValueArgs}"
     ${ARGN}
-  )
+    )

-  if( NOT LOCAL_COMPARISON_EXAMPLE_NAME )
-    message( FATAL_ERROR "Syntax error in use of compare_to_baseline: EXAMPLE_NAME is required" )
+  if(NOT LOCAL_COMPARISON_EXAMPLE_NAME)
+    message(FATAL_ERROR "Syntax error in use of compare_to_baseline: EXAMPLE_NAME is required")
   endif()

-  if( NOT LOCAL_COMPARISON_BASELINE_PREFIX )
-    message( FATAL_ERROR "Syntax error in use of compare_to_baseline: BASELINE_PREFIX is required" )
+  if(NOT LOCAL_COMPARISON_BASELINE_PREFIX)
+    message(FATAL_ERROR "Syntax error in use of compare_to_baseline: BASELINE_PREFIX is required")
   endif()

-  set( depends ${LOCAL_COMPARISON_EXAMPLE_NAME}Test )
-  if( LOCAL_COMPARISON_DEPENDS )
-    set( depends ${LOCAL_COMPARISON_DEPENDS} )
+  set(depends ${LOCAL_COMPARISON_EXAMPLE_NAME}Test)
+  if(LOCAL_COMPARISON_DEPENDS)
+    set(depends ${LOCAL_COMPARISON_DEPENDS})
   endif()

-  file( GLOB baseline_image ${CMAKE_CURRENT_SOURCE_DIR}/${LOCAL_COMPARISON_EXAMPLE_NAME}/${LOCAL_COMPARISON_BASELINE_PREFIX}.* )
-  string( REPLACE .md5 "" baseline_image "${baseline_image}" )
-  get_filename_component( baseline_image_file "${baseline_image}" NAME )
-  set( baseline_image "${CMAKE_CURRENT_BINARY_DIR}/${LOCAL_COMPARISON_EXAMPLE_NAME}/${baseline_image_file}" )
+  file(GLOB baseline_image ${CMAKE_CURRENT_SOURCE_DIR}/${LOCAL_COMPARISON_EXAMPLE_NAME}/${LOCAL_COMPARISON_BASELINE_PREFIX}.*)
+  string(REPLACE .md5 "" baseline_image "${baseline_image}")
+  get_filename_component(baseline_image_file "${baseline_image}" NAME)
+  set(baseline_image "${CMAKE_CURRENT_BINARY_DIR}/${LOCAL_COMPARISON_EXAMPLE_NAME}/${baseline_image_file}")

-  if( NOT LOCAL_COMPARISON_TEST_IMAGE )
-    string( REPLACE Baseline "" test_image "${baseline_image}" )
+  if(NOT LOCAL_COMPARISON_TEST_IMAGE)
+    string(REPLACE Baseline "" test_image "${baseline_image}")
   else()
-    set( test_image ${CMAKE_CURRENT_BINARY_DIR}/${LOCAL_COMPARISON_EXAMPLE_NAME}/${LOCAL_COMPARISON_TEST_IMAGE} )
+    set(test_image ${CMAKE_CURRENT_BINARY_DIR}/${LOCAL_COMPARISON_EXAMPLE_NAME}/${LOCAL_COMPARISON_TEST_IMAGE})
   endif()

-  set( test_name )
-  if( NOT LOCAL_COMPARISON_TEST_NAME )
-    set( test_name ${LOCAL_COMPARISON_EXAMPLE_NAME}TestBaselineComparison )
+  set(test_name)
+  if(NOT LOCAL_COMPARISON_TEST_NAME)
+    set(test_name ${LOCAL_COMPARISON_EXAMPLE_NAME}TestBaselineComparison)
   else()
-    set( test_name ${LOCAL_COMPARISON_TEST_NAME} )
+    set(test_name ${LOCAL_COMPARISON_TEST_NAME})
   endif()

-  add_test( NAME ${test_name}
+  add_test(NAME ${test_name}
     COMMAND "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ImageCompareCommand"
       --test-image "${test_image}"
       --baseline-image "${baseline_image}"
       ${LOCAL_COMPARISON_OPTIONS}
-  )
+    )

-  set_tests_properties( ${test_name}
+  set_tests_properties(${test_name}
     PROPERTIES DEPENDS ${depends}
     )

-  get_property( has_python_test GLOBAL PROPERTY ${depends}HASPYTHONTEST )
-  if( ${has_python_test} )
-
-    set( python_test_name ${test_name}Python )
-    string( REPLACE . "Python." test_image "${test_image}" )
+  get_property(has_python_test GLOBAL PROPERTY ${depends}HASPYTHONTEST)
+  if(${has_python_test})
+    set(python_test_name ${test_name}Python)
+    string(REPLACE . "Python." test_image "${test_image}")

     # Add the comparison for the Python test output
     # Use the same baseline image as for the c++ output
-    add_test( NAME ${python_test_name}
+    add_test(NAME ${python_test_name}
       COMMAND "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ImageCompareCommand"
         --test-image "${test_image}"
         --baseline-image "${baseline_image}"
         ${LOCAL_COMPARISON_OPTIONS}
-    )
+      )

     # Depend on the Python test.
-    set( depends ${depends}Python )
+    set(depends ${depends}Python)
     set_tests_properties( ${python_test_name}
       PROPERTIES DEPENDS ${depends}
-    )
-
+      )
   endif()
-
 endfunction()


Adjust iOS player build settings

Adjust iOS player build settings

--- CMake/Modules/AtomicIOS.cmake
+++ CMake/Modules/AtomicIOS.cmake
@@ -14,7 +14,7 @@
 #    set (IOS_ARCH x86_64)
 #endif (${IOS_PLATFORM} STREQUAL "OS")

-set (CMAKE_OSX_ARCHITECTURES arm64)
+set (CMAKE_OSX_ARCHITECTURES $(ARCHS_STANDARD_INCLUDING_64_BIT))
 set (CMAKE_XCODE_EFFECTIVE_PLATFORMS -iphoneos -iphonesimulator)

 # Set Base SDK to "Latest iOS"


Correctly locate plugin binaries from Ogre 1.6 if pointed at it

--HG--
branch : v1-7
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/branches/v1-7%401621

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -109,6 +109,7 @@
     set(OGRE_INC_SEARCH_PATH ${dir}/include ${OGRE_INC_SEARCH_PATH})
     set(OGRE_LIB_SEARCH_PATH ${dir}/lib ${OGRE_LIB_SEARCH_PATH})
     set(OGRE_BIN_SEARCH_PATH ${dir}/bin ${OGRE_BIN_SEARCH_PATH})
+	set(OGRE_BIN_SEARCH_PATH ${dir}/Samples/Common/bin ${OGRE_BIN_SEARCH_PATH})
   endforeach(dir)
 else()
   set(OGRE_PREFIX_SOURCE "NOTFOUND")
@@ -397,15 +398,17 @@
         set(OGRE_PLUGIN_SEARCH_PATH_REL
           ${OGRE_LIBRARY_DIR_REL}/..
           ${OGRE_LIBRARY_DIR_REL}/../..
+		  ${OGRE_BIN_SEARCH_PATH}
         )
         set(OGRE_PLUGIN_SEARCH_PATH_DBG
           ${OGRE_LIBRARY_DIR_DBG}/..
           ${OGRE_LIBRARY_DIR_DBG}/../..
+		  ${OGRE_BIN_SEARCH_PATH}
         )
         find_path(OGRE_PLUGIN_DIR_REL NAMES "${PLUGIN}.dll" HINTS ${OGRE_PLUGIN_SEARCH_PATH_REL}
-          PATH_SUFFIXES "" bin bin/release bin/relwithdebinfo bin/minsizerel)
+          PATH_SUFFIXES "" bin bin/release bin/relwithdebinfo bin/minsizerel release)
         find_path(OGRE_PLUGIN_DIR_DBG NAMES "${PLUGIN}_d.dll" HINTS ${OGRE_PLUGIN_SEARCH_PATH_DBG}
-          PATH_SUFFIXES "" bin bin/debug)
+          PATH_SUFFIXES "" bin bin/debug debug)
       elseif (UNIX)
         get_filename_component(OGRE_PLUGIN_DIR_TMP ${OGRE_${PLUGIN}_LIBRARY_REL} PATH)
         set(OGRE_PLUGIN_DIR_REL ${OGRE_PLUGIN_DIR_TMP} CACHE STRING "Ogre plugin dir (release)")


FindOGRE.cmake now detects Boost even when Ogre is not statically compiled.

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -290,7 +290,7 @@
       set(OGRE_DEPS_FOUND FALSE)
 	endif ()
   endif ()
-
+endif()
   if (OGRE_CONFIG_THREADS)
     if (OGRE_CONFIG_THREAD_PROVIDER EQUAL 1)
       if (OGRE_STATIC)
@@ -301,7 +301,7 @@
       endif()

       set(OGRE_BOOST_COMPONENTS thread date_time)
-
+      find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
       if(Boost_FOUND AND Boost_VERSION GREATER 104900)
         if(Boost_VERSION GREATER 105300)
             set(OGRE_BOOST_COMPONENTS thread date_time system atomic chrono)
@@ -335,7 +335,7 @@
       endif ()
     endif ()
   endif ()
-
+if (OGRE_STATIC)
   if (NOT OGRE_DEPS_FOUND)
     pkg_message(OGRE "Could not find all required dependencies for the Ogre package.")
     set(OGRE_FOUND FALSE)


mitk data hash

mitk data hash

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

 if(BUILD_TESTING)

-  set(revision_tag e26a2799) # first 8 characters of hash-tag
+  set(revision_tag deced76d) # first 8 characters of hash-tag
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


PythonQt: Fix msvc 2010/2012 build issue

See commontk/PythonQt@9c92fd212605b

// --------------
Fix "_invalid_parameter_noinfo_noreturn" link error

By ensuring that "undef" of _DEBUG macro is not done before system
includes, it fixes the issue.

This commit is based on what has been within VTK.
See https://github.com/Kitware/VTK/commit/81d4a72c1195437403f1772559c9c28978818f03

See commontk/PythonQt#9

Thanks @Neosettler and @ihnorton for testing the patch.

Reported-by: Neosettler

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

-      set(revision_tag 15839e05924fa300ffc976e577b50c9b56644f12)
+      set(revision_tag 9c92fd212605bb5ff4d462323763acf65d87e4a7)
       if(${proj}_REVISION_TAG)
         set(revision_tag ${${proj}_REVISION_TAG})
       endif()


Search for GLEWmx in default paths too

Search for GLEWmx in default paths too

Same as [#1292](https://github.com/arrayfire/arrayfire/pull/1292) on arrayfire/arrayfire

--- CMakeModules/FindGLEWmx.cmake
+++ CMakeModules/FindGLEWmx.cmake
@@ -58,7 +58,6 @@
             /sw/lib
             /opt/local/lib
             ${GLEW_ROOT_DIR}/lib
-            NO_DEFAULT_PATH
             DOC "The GLEWmx library")
         UNSET(PX)
         UNSET(SX)
@@ -75,7 +74,6 @@
             /sw/lib
             /opt/local/lib
             ${GLEW_ROOT_DIR}/lib
-            NO_DEFAULT_PATH
             DOC "The GLEWmx library")
     ENDIF (USE_GLEWmx_STATIC)
 ENDIF (WIN32)


Additional CMake check on gengetopt

Additional CMake check on gengetopt

--- cmake/FindGengetopt.cmake
+++ cmake/FindGengetopt.cmake
@@ -5,8 +5,13 @@
   GET_FILENAME_COMPONENT(CLITK_CMAKE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
   ADD_SUBDIRECTORY(${CLITK_CMAKE_DIR}/../utilities/gengetopt ${CMAKE_CURRENT_BINARY_DIR}/gengetopt)
 ELSE(GENGETOPT STREQUAL "GENGETOPT-NOTFOUND")
-  ADD_EXECUTABLE(gengetopt IMPORTED)
-  SET_PROPERTY(TARGET gengetopt PROPERTY IMPORTED_LOCATION ${GENGETOPT})
+  IF(EXISTS ${GENGETOPT})
+    ADD_EXECUTABLE(gengetopt IMPORTED)
+    SET_PROPERTY(TARGET gengetopt PROPERTY IMPORTED_LOCATION ${GENGETOPT})
+  ELSE(EXISTS ${GENGETOPT})
+	  SET(GENGETOPT "GENGETOPT-NOTFOUND" CACHE FILEPATH "Path to a program." FORCE)
+    MESSAGE(FATAL_ERROR "No gengetopt executable found at the specified location")
+  ENDIF(EXISTS ${GENGETOPT})
 ENDIF(GENGETOPT STREQUAL "GENGETOPT-NOTFOUND")

 MACRO (WRAP_GGO GGO_SRCS)


cmake/bitcode_rules.cmake: accept both relative & absolute paths

--- cmake/bitcode_rules.cmake
+++ cmake/bitcode_rules.cmake
@@ -33,7 +33,11 @@
     get_filename_component(FNAME "${FILENAME}" NAME)
     set(BC_FILE "${CMAKE_CURRENT_BINARY_DIR}/${SUBDIR}/${FNAME}.bc")
     set(${BC_FILE_LIST} ${${BC_FILE_LIST}} ${BC_FILE} PARENT_SCOPE)
-    set(FULL_F_PATH "${CMAKE_SOURCE_DIR}/lib/kernel/${FILENAME}")
+    if(IS_ABSOLUTE "${FILENAME}")
+      set(FULL_F_PATH "${FILENAME}")
+    else()
+      set(FULL_F_PATH "${CMAKE_SOURCE_DIR}/lib/kernel/${FILENAME}")
+    endif()

     add_custom_command( OUTPUT "${BC_FILE}"
         DEPENDS "${FULL_F_PATH}"
@@ -51,7 +55,11 @@
     get_filename_component(FNAME "${FILENAME}" NAME)
     set(BC_FILE "${CMAKE_CURRENT_BINARY_DIR}/${SUBDIR}/${FNAME}.bc")
     set(${BC_FILE_LIST} ${${BC_FILE_LIST}} ${BC_FILE} PARENT_SCOPE)
-    set(FULL_F_PATH "${CMAKE_SOURCE_DIR}/lib/kernel/${FILENAME}")
+    if(IS_ABSOLUTE "${FILENAME}")
+      set(FULL_F_PATH "${FILENAME}")
+    else()
+      set(FULL_F_PATH "${CMAKE_SOURCE_DIR}/lib/kernel/${FILENAME}")
+    endif()

     add_custom_command(OUTPUT "${BC_FILE}"
         DEPENDS "${FULL_F_PATH}"
@@ -66,7 +74,11 @@
     get_filename_component(FNAME_WE "${FILENAME}" NAME_WE)
     set(BC_FILE "${CMAKE_CURRENT_BINARY_DIR}/${SUBDIR}/${FNAME}.bc")
     set(${BC_FILE_LIST} ${${BC_FILE_LIST}} ${BC_FILE} PARENT_SCOPE)
-    set(FULL_F_PATH "${CMAKE_SOURCE_DIR}/lib/kernel/${FILENAME}")
+    if(IS_ABSOLUTE "${FILENAME}")
+      set(FULL_F_PATH "${FILENAME}")
+    else()
+      set(FULL_F_PATH "${CMAKE_SOURCE_DIR}/lib/kernel/${FILENAME}")
+    endif()

     set(DEPENDLIST
           "${CMAKE_SOURCE_DIR}/include/_kernel.h"
@@ -123,7 +135,11 @@
     set(BC_FILE "${CMAKE_CURRENT_BINARY_DIR}/${SUBDIR}/${EXT}_${FNAME}.bc")
     list(APPEND ${BCLIST} "${BC_FILE}")
     set(${BCLIST} ${${BCLIST}} PARENT_SCOPE)
-    set(FULL_F_PATH "${CMAKE_SOURCE_DIR}/lib/kernel/${FILENAME}")
+    if(IS_ABSOLUTE "${FILENAME}")
+      set(FULL_F_PATH "${FILENAME}")
+    else()
+      set(FULL_F_PATH "${CMAKE_SOURCE_DIR}/lib/kernel/${FILENAME}")
+    endif()

     add_custom_command( OUTPUT "${BC_FILE}"
         DEPENDS "${FULL_F_PATH}"


rm two unused lines

rm two unused lines

--- cmake/custom/balboa.cmake
+++ cmake/custom/balboa.cmake
@@ -8,7 +8,6 @@
     INSTALL_COMMAND true  # currently no install command
     )

-link_directories(${PROJECT_BINARY_DIR}/balboa/src/balboa-build/src)
 link_directories(${PROJECT_BINARY_DIR}/balboa/src/balboa-build/lib)

 # workaround:
@@ -24,6 +23,3 @@
     )

 include_directories(${PROJECT_BINARY_DIR}/balboa/src/balboa/api)
-
-# consider renaming to include instead of modules
-include_directories(${PROJECT_BINARY_DIR}/balboa/src/balboa-build/modules)


Fix typo in CMake macro draco_add_executable()

$lib_NAME -> $exe_NAME.

--- cmake/draco_targets.cmake
+++ cmake/draco_targets.cmake
@@ -130,7 +130,7 @@
   endif()

   if(BUILD_SHARED_LIBS AND (MSVC OR WIN32))
-    target_compile_definitions(${lib_NAME} PRIVATE "DRACO_BUILDING_DLL=0")
+    target_compile_definitions(${exe_NAME} PRIVATE "DRACO_BUILDING_DLL=0")
   endif()

   if(exe_LIB_DEPS)


BUG: Superbuild boost do not set architecture (mantis-1035)

--- SuperBuild/CMake/External_boost.cmake
+++ SuperBuild/CMake/External_boost.cmake
@@ -7,9 +7,7 @@
 set(BOOST_SB_CONFIG)

 if(OTB_COMPILER_ARCH_IS_X64)
-  set(BOOST_SB_CONFIG architecture=x86 address-model=64)
-else()
-  set(BOOST_SB_CONFIG architecture=x86)
+  set(BOOST_SB_CONFIG address-model=64)
 endif()

 set(BOOST_SB_CONFIG
@@ -74,4 +72,4 @@
 else()
   set(_SB_Boost_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
 endif()
-SUPERBUILD_PATCH_SOURCE(BOOST)+SUPERBUILD_PATCH_SOURCE(BOOST)


Switched to data archive for icu with iOS

--- ThirdPartyLibraries.cmake
+++ ThirdPartyLibraries.cmake
@@ -1763,7 +1763,9 @@
   ${CONFIGURE_LIB_TYPE} ${HOST} ${SYSROOT}")
 if (IS_IOS)
   set(ICU_BUILD_COMMAND
-      "${ICU_BUILD_COMMAND} --with-cross-build=${ICU_CROSS_BUILD}")
+      "${ICU_BUILD_COMMAND} --with-cross-build=${ICU_CROSS_BUILD}\
+       --with-data-packaging=archive")
+  set(ICU_DATA_ARCHIVE ${ICU_PREFIX}/share/icu/52.1/icudt52l.dat)
 endif ()
 add_external_project(
   ${ICU_TARGET}