Update ExternalProjectDependency based on commontk/Artichoke@5ee3d50

$ git shortlog 388fc33..5ee3d50 --no-merges
Jean-Christophe Fillion-Robin (12):
      Update tests setting policy CMP0054 to OLD.
      Set "use system" variable if it has NOT already been explicitly set
      _sb_list_to_string: Update function to not set CMP0007 to OLD
      _sb_list_to_string: Ensure function works with CMake 2.8.9
      Add support for specifying a different CMAKE_GENERATOR for each project
      Add support for specifying different toolset/platform for each project
      Teach mark_as_superbuild how to handle variables with double-quotes
      Add ExternalProject_SetIfNotDefined macro
      ExternalProject_SetIfNotDefined: Add support for QUIET argument
      Setup continuous integration testing using CircleCI 2.0
      README: Add CircleCI badge
      ExternalProjectDependency: Always pass USES_TERMINAL_* options

--- CMake/ctkMacroCheckExternalProjectDependency.cmake
+++ CMake/ctkMacroCheckExternalProjectDependency.cmake
@@ -1,3 +1,7 @@
+#.rst:
+# ExternalProjectDependency
+# -------------------------
+
 ###########################################################################
 #
 #  Library:   CTK
@@ -24,10 +28,16 @@
   set(EP_LIST_SEPARATOR "^^")
 endif()

+#.rst:
+# .. cmake:variable:: EXTERNAL_PROJECT_DIR
+#
 if(NOT EXISTS "${EXTERNAL_PROJECT_DIR}")
   set(EXTERNAL_PROJECT_DIR ${CMAKE_SOURCE_DIR}/SuperBuild)
 endif()

+#.rst:
+# .. cmake:variable:: EXTERNAL_PROJECT_FILE_PREFIX
+#
 if(NOT DEFINED EXTERNAL_PROJECT_FILE_PREFIX)
   set(EXTERNAL_PROJECT_FILE_PREFIX "External_")
 endif()
@@ -38,29 +48,39 @@
 else()
   set(EP_CMAKE_GENERATOR "${CMAKE_GENERATOR}")
 endif()
-
-#!
-#! mark_as_superbuild(<varname1>[:<vartype1>] [<varname2>[:<vartype2>] [...]])
-#!
-#! mark_as_superbuild(
-#!     VARS <varname1>[:<vartype1>] [<varname2>[:<vartype2>] [...]]
-#!     [PROJECTS <projectname> [<projectname> [...]] | ALL_PROJECTS]
-#!     [LABELS <label1> [<label2> [...]]]
-#!   )
-#!
-#! PROJECTS corresponds to a list of <projectname> that will be added using 'ExternalProject_Add' function.
-#!          If not specified and called within a project file, it defaults to the value of 'SUPERBUILD_TOPLEVEL_PROJECT'
-#!          Otherwise, it defaults to 'CMAKE_PROJECT_NAME'.
-#!          If instead 'ALL_PROJECTS' is specified, the variables and labels will be passed to all projects.
-#!
-#! VARS is an expected list of variables specified as <varname>:<vartype> to pass to <projectname>
-#!
-#!
-#! LABELS is an optional list of label to associate with the variable names specified using 'VARS' and passed to
-#!        the <projectname> as CMake CACHE args of the form:
-#!          -D<projectname>_EP_LABEL_<label1>=<varname1>;<varname2>[...]
-#!          -D<projectname>_EP_LABEL_<label2>=<varname1>;<varname2>[...]
-#!
+set(EP_CMAKE_GENERATOR_PLATFORM "${CMAKE_GENERATOR_PLATFORM}")
+set(EP_CMAKE_GENERATOR_TOOLSET "${CMAKE_GENERATOR_TOOLSET}")
+
+#.rst:
+# .. cmake:function:: mark_as_superbuild
+#
+# .. code-block:: cmake
+#
+#  mark_as_superbuild(<varname1>[:<vartype1>] [<varname2>[:<vartype2>] [...]])
+#
+# .. code-block:: cmake
+#
+#  mark_as_superbuild(
+#      VARS <varname1>[:<vartype1>] [<varname2>[:<vartype2>] [...]]
+#      [PROJECTS <projectname> [<projectname> [...]] | ALL_PROJECTS]
+#      [LABELS <label1> [<label2> [...]]]
+#    )
+#
+# .. code-block:: cmake
+#
+#  PROJECTS corresponds to a list of <projectname> that will be added using 'ExternalProject_Add' function.
+#           If not specified and called within a project file, it defaults to the value of 'SUPERBUILD_TOPLEVEL_PROJECT'
+#           Otherwise, it defaults to 'CMAKE_PROJECT_NAME'.
+#           If instead 'ALL_PROJECTS' is specified, the variables and labels will be passed to all projects.
+#
+#  VARS is an expected list of variables specified as <varname>:<vartype> to pass to <projectname>
+#
+#
+#  LABELS is an optional list of label to associate with the variable names specified using 'VARS' and passed to
+#         the <projectname> as CMake CACHE args of the form:
+#           -D<projectname>_EP_LABEL_<label1>=<varname1>;<varname2>[...]
+#           -D<projectname>_EP_LABEL_<label2>=<varname1>;<varname2>[...]
+#
 function(mark_as_superbuild)
   set(options ALL_PROJECTS CMAKE_CMD)
   set(oneValueArgs)
@@ -112,14 +132,15 @@
     VARS ${_vars_with_type} LABELS ${_sb_LABELS} ${optional_arg_ALL_PROJECTS})
 endfunction()

-#!
-#! _sb_extract_varname_and_vartype(<cmake_varname_and_type> <varname_var> [<vartype_var>])
-#!
-#! <cmake_varname_and_type> corresponds to variable name and variable type passed as "<varname>:<vartype>"
-#!
-#! <varname_var> will be set to "<varname>"
-#!
-#! <vartype_var> is an optional variable name that will be set to "<vartype>"
+#
+#  _sb_extract_varname_and_vartype(<cmake_varname_and_type> <varname_var> [<vartype_var>])
+#
+#  <cmake_varname_and_type> corresponds to variable name and variable type passed as "<varname>:<vartype>"
+#
+#  <varname_var> will be set to "<varname>"
+#
+#  <vartype_var> is an optional variable name that will be set to "<vartype>"
+#
 function(_sb_extract_varname_and_vartype cmake_varname_and_type varname_var)
   set(_vartype_var "${ARGV2}")
   string(REPLACE ":" ";" varname_and_vartype ${cmake_varname_and_type})
@@ -134,8 +155,6 @@

 function(_sb_list_to_string separator input_list output_string_var)
   set(_string "")
-  cmake_policy(PUSH)
-  cmake_policy(SET CMP0007 OLD)
   # Get list length
   list(LENGTH input_list list_length)
   # If the list has 0 or 1 element, there is no need to loop over.
@@ -146,35 +165,36 @@
     foreach(index RANGE ${last_element_index})
       # Get current item_value
       list(GET input_list ${index} item_value)
-      # .. and append to output string
-      set(_string  "${_string}${item_value}")
-      # Append separator if current element is NOT the last one.
-      if(NOT index EQUAL last_element_index)
-        set(_string  "${_string}${separator}")
+      if(NOT item_value STREQUAL "")
+        # .. and append non-empty value to output string
+        set(_string  "${_string}${item_value}")
+        # Append separator if current element is NOT the last one.
+        if(NOT index EQUAL last_element_index)
+          set(_string  "${_string}${separator}")
+        endif()
       endif()
     endforeach()
   endif()
   set(${output_string_var} ${_string} PARENT_SCOPE)
-  cmake_policy(POP)
-endfunction()
-
-
-#!
-#! _sb_cmakevar_to_cmakearg(<cmake_varname_and_type> <cmake_arg_var> <has_cfg_intdir_var> [<varname_var> [<vartype_var>]])
-#!
-#! <cmake_varname_and_type> corresponds to variable name and variable type passed as "<varname>:<vartype>"
-#!
-#! <cmake_arg_var> is a variable name that will be set to "-D<varname>:<vartype>=${<varname>}"
-#!
-#! <has_int_dir_var> is set to either TRUE or FALSE.
-#!                      FALSE means that the value does NOT reference ${CMAKE_CFG_INTDIR} and
-#!                      the generated cmake argument should be passed to ExternalProject_Add as CMAKE_CACHE_ARGS.
-#!                      TRUEmeans that the value does reference ${CMAKE_CFG_INTDIR} and
-#!                      the generated cmake argument should be passed to ExternalProject_Add as CMAKE_ARGS.
-#!
-#! <varname_var> is an optional variable name that will be set to "<varname>"
-#!
-#! <vartype_var> is an optional variable name that will be set to "<vartype>"
+endfunction()
+
+#
+#  _sb_cmakevar_to_cmakearg(<cmake_varname_and_type> <cmake_arg_var> <has_cfg_intdir_var> [<varname_var> [<vartype_var>]])
+#
+#  <cmake_varname_and_type> corresponds to variable name and variable type passed as "<varname>:<vartype>"
+#
+#  <cmake_arg_var> is a variable name that will be set to "-D<varname>:<vartype>=${<varname>}"
+#
+#  <has_int_dir_var> is set to either TRUE or FALSE.
+#                      FALSE means that the value does NOT reference ${CMAKE_CFG_INTDIR} and
+#                      the generated cmake argument should be passed to ExternalProject_Add as CMAKE_CACHE_ARGS.
+#                      TRUEmeans that the value does reference ${CMAKE_CFG_INTDIR} and
+#                      the generated cmake argument should be passed to ExternalProject_Add as CMAKE_ARGS.
+#
+#  <varname_var> is an optional variable name that will be set to "<varname>"
+#
+#  <vartype_var> is an optional variable name that will be set to "<vartype>"
+#
 function(_sb_cmakevar_to_cmakearg cmake_varname_and_type cmake_arg_var has_cfg_intdir_var)
   set(_varname_var "${ARGV3}")
   set(_vartype_var "${ARGV4}")
@@ -182,16 +202,9 @@
   _sb_extract_varname_and_vartype(${cmake_varname_and_type} _varname _vartype)

   set(_var_value "${${_varname}}")
-
-  set(_consider_cache_value 1)
-  if(DEFINED ${_varname}_SKIPCACHEVALUE AND ${_varname}_SKIPCACHEVALUE)
-    set(_consider_cache_value 0)
-  endif()
-  if(_consider_cache_value)
-    get_property(_value_set_in_cache CACHE ${_varname} PROPERTY VALUE SET)
-    if(_value_set_in_cache)
-      get_property(_var_value CACHE ${_varname} PROPERTY VALUE)
-    endif()
+  get_property(_value_set_in_cache CACHE ${_varname} PROPERTY VALUE SET)
+  if(_value_set_in_cache)
+    get_property(_var_value CACHE ${_varname} PROPERTY VALUE)
   endif()

   set(_has_cfg_intdir FALSE)
@@ -204,6 +217,10 @@
     endif()
   endif()

+  if(NOT _has_cfg_intdir)
+    string(REPLACE "\"" "\\\"" _var_value "${_var_value}")
+  endif()
+
   set(${cmake_arg_var} -D${_varname}:${_vartype}=${_var_value} PARENT_SCOPE)
   set(${has_cfg_intdir_var} ${_has_cfg_intdir} PARENT_SCOPE)

@@ -217,26 +234,26 @@

 set(_ALL_PROJECT_IDENTIFIER "ALLALLALL")

-#!
-#! _sb_append_to_cmake_args(
-#!     VARS <varname1>:<vartype1> [<varname2>:<vartype2> [...]]
-#!     [PROJECTS <projectname> [<projectname> [...]] | ALL_PROJECTS]
-#!     [LABELS <label1> [<label2> [...]]]
-#!   )
-#!
-#! PROJECTS corresponds to a list of <projectname> that will be added using 'ExternalProject_Add' function.
-#!          If not specified and called within a project file, it defaults to the value of 'SUPERBUILD_TOPLEVEL_PROJECT'
-#!          Otherwise, it defaults to 'CMAKE_PROJECT_NAME'.
-#!          If instead 'ALL_PROJECTS' is specified, the variables and labels will be passed to all projects.
-#!
-#! VARS is an expected list of variables specified as <varname>:<vartype> to pass to <projectname>
-#!
-#!
-#! LABELS is an optional list of label to associate with the variable names specified using 'VARS' and passed to
-#!        the <projectname> as CMake CACHE args of the form:
-#!          -D<projectname>_EP_LABEL_<label1>=<varname1>;<varname2>[...]
-#!          -D<projectname>_EP_LABEL_<label2>=<varname1>;<varname2>[...]
-#!
+#
+#  _sb_append_to_cmake_args(
+#      VARS <varname1>:<vartype1> [<varname2>:<vartype2> [...]]
+#      [PROJECTS <projectname> [<projectname> [...]] | ALL_PROJECTS]
+#      [LABELS <label1> [<label2> [...]]]
+#    )
+#
+#  PROJECTS corresponds to a list of <projectname> that will be added using 'ExternalProject_Add' function.
+#           If not specified and called within a project file, it defaults to the value of 'SUPERBUILD_TOPLEVEL_PROJECT'
+#           Otherwise, it defaults to 'CMAKE_PROJECT_NAME'.
+#           If instead 'ALL_PROJECTS' is specified, the variables and labels will be passed to all projects.
+#
+#  VARS is an expected list of variables specified as <varname>:<vartype> to pass to <projectname>
+#
+#
+#  LABELS is an optional list of label to associate with the variable names specified using 'VARS' and passed to
+#         the <projectname> as CMake CACHE args of the form:
+#           -D<projectname>_EP_LABEL_<label1>=<varname1>;<varname2>[...]
+#           -D<projectname>_EP_LABEL_<label2>=<varname1>;<varname2>[...]
+#
 function(_sb_append_to_cmake_args)
   set(options ALL_PROJECTS)
   set(oneValueArgs)
@@ -321,8 +338,19 @@

   list(APPEND _ep_arguments LIST_SEPARATOR ${EP_LIST_SEPARATOR})

-  list(APPEND _ep_arguments CMAKE_GENERATOR ${EP_CMAKE_GENERATOR})
-
+  list(APPEND _ep_arguments CMAKE_GENERATOR ${_sb_CMAKE_GENERATOR})
+  if(CMAKE_VERSION VERSION_GREATER "3.0")
+    list(APPEND _ep_arguments CMAKE_GENERATOR_PLATFORM ${_sb_CMAKE_GENERATOR_PLATFORM})
+  endif()
+  list(APPEND _ep_arguments CMAKE_GENERATOR_TOOLSET ${_sb_CMAKE_GENERATOR_TOOLSET})
+  if(CMAKE_VERSION VERSION_GREATER "3.3")
+    # USES_TERMINAL_* options were introduced in CMake 3.4
+    foreach(step IN ITEMS DOWNLOAD UPDATE CONFIGURE BUILD TEST INSTALL)
+      list(APPEND _ep_arguments
+        USES_TERMINAL_${step}
+        )
+    endforeach()
+  endif()
   set(${varname} ${_ep_arguments} PARENT_SCOPE)
 endfunction()

@@ -337,9 +365,13 @@
   set_property(GLOBAL PROPERTY SUPERBUILD_${proj}_INDENT ${_indent})
 endfunction()

-#!
-#! ExternalProject_Message(<project_name> <msg> [condition])
-#!
+#.rst:
+# .. cmake:function:: ExternalProject_Message
+#
+# .. code-block:: cmake
+#
+#  ExternalProject_Message(<project_name> <msg> [condition])
+#
 function(ExternalProject_Message proj msg)
   set(_display 1)
   if(NOT "x${ARGV2}" STREQUAL "x")
@@ -351,48 +383,52 @@
   endif()
 endfunction()

-#!
-#! superbuild_stack_content(<stack_name> <output_var>)
-#!
-#! <stack_name> corresponds to the name of stack.
-#!
-#! <output_var> is the name of CMake variable that will be set with the content
-#! of the stack identified by <stack_name>.
+#
+#  superbuild_stack_content(<stack_name> <output_var>)
+#
+#  <stack_name> corresponds to the name of stack.
+#
+#  <output_var> is the name of CMake variable that will be set with the content
+#  of the stack identified by <stack_name>.
+#
 function(superbuild_stack_content stack_name output_var)
   get_property(_stack GLOBAL PROPERTY ${stack_name})
   set(${output_var} ${_stack} PARENT_SCOPE)
 endfunction()

-#!
-#! superbuild_stack_size(<stack_name> <output_var>)
-#!
-#! <stack_name> corresponds to the name of stack.
-#!
-#! <output_var> is the name of CMake variable that will be set with the size
-#! of the stack identified by <stack_name>.
+#
+#  superbuild_stack_size(<stack_name> <output_var>)
+#
+#  <stack_name> corresponds to the name of stack.
+#
+#  <output_var> is the name of CMake variable that will be set with the size
+#  of the stack identified by <stack_name>.
+#
 function(superbuild_stack_size stack_name output_var)
   get_property(_stack GLOBAL PROPERTY ${stack_name})
   list(LENGTH _stack _stack_size)
   set(${output_var} ${_stack_size} PARENT_SCOPE)
 endfunction()

-#!
-#! superbuild_stack_push(<stack_name> <value>)
-#!
-#! <stack_name> corresponds to the name of stack.
-#!
-#! <value> is appended to the stack identified by <stack_name>.
+#
+#  superbuild_stack_push(<stack_name> <value>)
+#
+#  <stack_name> corresponds to the name of stack.
+#
+#  <value> is appended to the stack identified by <stack_name>.
+#
 function(superbuild_stack_push stack_name value)
   set_property(GLOBAL APPEND PROPERTY ${stack_name} ${value})
 endfunction()

-#!
-#! superbuild_stack_pop(<stack_name> <item_var>)
-#!
-#! <stack_name> corresponds to the name of stack.
-#!
-#! <item_var> names a CMake variable that will be set with the item
-#! removed from the stack identified by <stack_name>.
+#
+#  superbuild_stack_pop(<stack_name> <item_var>)
+#
+#  <stack_name> corresponds to the name of stack.
+#
+#  <item_var> names a CMake variable that will be set with the item
+#  removed from the stack identified by <stack_name>
+#
 function(superbuild_stack_pop stack_name item_var)
   get_property(_stack GLOBAL PROPERTY ${stack_name})
   list(LENGTH _stack _stack_size)
@@ -417,19 +453,29 @@
   set(${output_var} ${optional} PARENT_SCOPE)
 endfunction()

-
-#!
-#! ExternalProject_Include_Dependencies(<project_name>
-#!     [PROJECT_VAR <project_var>]
-#!     [EP_ARGS_VAR <external_project_args_var>]
-#!     [DEPENDS_VAR <depends_var>]
-#!     [USE_SYSTEM_VAR <use_system_var>]
-#!     [SUPERBUILD_VAR <superbuild_var>]
-#!   )
-#!
+#.rst:
+# .. cmake:function:: ExternalProject_Include_Dependencies
+#
+# .. code-block:: cmake
+#
+#  ExternalProject_Include_Dependencies(<project_name>
+#      [PROJECT_VAR <project_var>]
+#      [EP_ARGS_VAR <external_project_args_var>]
+#      [DEPENDS_VAR <depends_var>]
+#      [USE_SYSTEM_VAR <use_system_var>]
+#      [SUPERBUILD_VAR <superbuild_var>]
+#      [CMAKE_GENERATOR <cmake_generator>]
+#      [CMAKE_GENERATOR_PLATFORM <cmake_generator_platform>]
+#      [CMAKE_GENERATOR_TOOLSET <cmake_generator_toolset>]
+#    )
+#
 macro(ExternalProject_Include_Dependencies project_name)
   set(options)
-  set(oneValueArgs PROJECT_VAR DEPENDS_VAR EP_ARGS_VAR USE_SYSTEM_VAR SUPERBUILD_VAR)
+  set(oneValueArgs PROJECT_VAR DEPENDS_VAR EP_ARGS_VAR USE_SYSTEM_VAR SUPERBUILD_VAR
+    CMAKE_GENERATOR
+    CMAKE_GENERATOR_PLATFORM
+    CMAKE_GENERATOR_TOOLSET
+    )
   set(multiValueArgs)
   cmake_parse_arguments(_sb "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

@@ -439,6 +485,9 @@
       OR x${project_name} STREQUAL xDEPENDS_VAR
       OR x${project_name} STREQUAL xUSE_SYSTEM_VAR
       OR x${project_name} STREQUAL xSUPERBUILD_VAR
+      OR x${project_name} STREQUAL xCMAKE_GENERATOR
+      OR x${project_name} STREQUAL xCMAKE_GENERATOR_PLATFORM
+      OR x${project_name} STREQUAL xCMAKE_GENERATOR_TOOLSET
       )
     message(FATAL_ERROR "Argument <project_name> is missing !")
   endif()
@@ -492,6 +541,20 @@
     #message("[${project_name}] Setting _sb_SUPERBUILD_VAR with default value '${_sb_SUPERBUILD_VAR}'")
   endif()

+  # Set default for optional CMAKE_GENERATOR_* parameters
+  foreach(varname IN ITEMS
+    "CMAKE_GENERATOR"
+    "CMAKE_GENERATOR_PLATFORM"
+    "CMAKE_GENERATOR_TOOLSET"
+    )
+    if(NOT _sb_${varname})
+      set(_sb_${varname} ${EP_${varname}})
+      #message("[${project_name}] Setting _sb_${varname} with default value '${_sb_${varname}}'")
+    else()
+      #message("[${project_name}] Setting _sb_${varname} to value '${_sb_${varname}}'")
+    endif()
+  endforeach()
+
   # Keeping track of variable name independently of the recursion
   if(NOT DEFINED _sb_SB_VAR)
     set(_sb_SB_VAR ${_sb_SUPERBUILD_VAR})
@@ -522,7 +585,9 @@
   set(_sb_REQUIRED_DEPENDS)
   foreach(dep ${_sb_DEPENDS})
     if(NOT ${_sb_proj} STREQUAL ${SUPERBUILD_TOPLEVEL_PROJECT})
-      if(_sb_USE_SYSTEM)
+      # Set "use system" variable if it has NOT already been explicitly set
+      get_property(_sb_${dep}_USE_SYSTEM_VAR GLOBAL PROPERTY SB_${dep}_USE_SYSTEM_VAR)
+      if(_sb_USE_SYSTEM AND NOT DEFINED ${_sb_${dep}_USE_SYSTEM_VAR})
         set_property(GLOBAL PROPERTY SB_${dep}_USE_SYSTEM ${_sb_USE_SYSTEM})
         #message(${_sb_proj} "Property SB_${dep}_USE_SYSTEM set to [${_sb_USE_SYSTEM_VAR}:${_sb_USE_SYSTEM}]")
       endif()
@@ -557,6 +622,13 @@
   set_property(GLOBAL PROPERTY SB_${_sb_proj}_USE_SYSTEM       ${_sb_USE_SYSTEM})
   set_property(GLOBAL PROPERTY SB_${_sb_proj}_USE_SYSTEM_VAR   ${_sb_USE_SYSTEM_VAR})
   set_property(GLOBAL PROPERTY SB_${_sb_proj}_PROJECT_VAR      ${_sb_PROJECT_VAR})
+  foreach(varname IN ITEMS
+      "CMAKE_GENERATOR"
+      "CMAKE_GENERATOR_PLATFORM"
+      "CMAKE_GENERATOR_TOOLSET"
+    )
+    set_property(GLOBAL PROPERTY SB_${_sb_proj}_${varname}  ${_sb_${varname}})
+  endforeach()
   superbuild_stack_push(SB_PROJECT_STACK ${_sb_proj})

   # Include dependencies
@@ -579,6 +651,13 @@

   # Restore variables
   superbuild_stack_pop(SB_PROJECT_STACK _sb_proj)
+  foreach(varname IN ITEMS
+      "CMAKE_GENERATOR"
+      "CMAKE_GENERATOR_PLATFORM"
+      "CMAKE_GENERATOR_TOOLSET"
+    )
+    get_property(_sb_${varname}  GLOBAL PROPERTY SB_${_sb_proj}_${varname})
+  endforeach()
   get_property(_sb_PROJECT_VAR      GLOBAL PROPERTY SB_${_sb_proj}_PROJECT_VAR)
   get_property(_sb_USE_SYSTEM_VAR   GLOBAL PROPERTY SB_${_sb_proj}_USE_SYSTEM_VAR)
   get_property(_sb_USE_SYSTEM       GLOBAL PROPERTY SB_${_sb_proj}_USE_SYSTEM)
@@ -611,12 +690,23 @@
       set(${_sb_PROJECT_VAR} ${_sb_proj})

       set(SB_SECOND_PASS TRUE)
+      set(_ep_include_deps_EXTRA_ARGS )
+      foreach(varname IN ITEMS
+          "CMAKE_GENERATOR"
+          "CMAKE_GENERATOR_PLATFORM"
+          "CMAKE_GENERATOR_TOOLSET"
+        )
+        list(APPEND _ep_include_deps_EXTRA_ARGS
+          ${varname} ${_sb_${varname}}
+          )
+      endforeach()
       ExternalProject_Include_Dependencies(${_sb_proj}
         PROJECT_VAR ${_sb_PROJECT_VAR}
         DEPENDS_VAR ${_sb_DEPENDS_VAR}
         EP_ARGS_VAR ${_sb_EP_ARGS_VAR}
         USE_SYSTEM_VAR _sb_USE_SYSTEM
         SUPERBUILD_VAR ${_sb_SB_VAR}
+        ${_ep_include_deps_EXTRA_ARGS}
         )
       set(SB_SECOND_PASS FALSE)
     endif()
@@ -652,12 +742,15 @@
   #message("[${_sb_proj}] Setting ${_sb_USE_SYSTEM_VAR}:${_sb_USE_SYSTEM}")
 endmacro()

-
-#!
-#! ExternalProject_Add_Empty(<project_name>
-#!     DEPENDS <depends>
-#!   )
-#!
+#.rst:
+# .. cmake:function:: ExternalProject_Add_Empty
+#
+# .. code-block:: cmake
+#
+#  ExternalProject_Add_Empty(<project_name>
+#      DEPENDS <depends>
+#    )
+#
 macro(ExternalProject_Add_Empty project_name)
   set(options)
   set(oneValueArgs)
@@ -682,3 +775,71 @@
     DEPENDS ${_sb_DEPENDS}
     )
 endmacro()
+
+#.rst:
+# .. cmake:function:: ExternalProject_Install_CMake
+#
+# Install an external CMake-based project as part of the ``install`` target.
+#
+# .. code-block:: cmake
+#
+#  ExternalProject_Install_CMake(<project_name>)
+#
+# This causes building the main project's ``install`` target to also execute
+# the CMake install script for the specified external project. The project must
+# be previously declared with :command:`ExternalProject_Add`.
+#
+function(ExternalProject_Install_CMake project_name)
+  ExternalProject_Get_Property(${project_name} binary_dir)
+
+  install(SCRIPT ${binary_dir}/cmake_install.cmake)
+endfunction()
+
+#.rst:
+# .. cmake:function:: ExternalProject_SetIfNotDefined
+#
+# Set a variable to its default value if not already defined.
+#
+# .. code-block:: cmake
+#
+#  ExternalProject_SetIfNotDefined(<var> <defaultvalue> [OBFUSCATE] [QUIET])
+#
+# The default value is set with:
+#  (1) if set, the value environment variable <var>.
+#  (2) if set, the value of local variable variable <var>.
+#  (3) if none of the above, the value passed as a parameter.
+#
+# Setting the optional parameter 'OBFUSCATE' will display 'OBFUSCATED' instead of the real value.
+# Setting the optional parameter 'QUIET' will not display any message.
+macro(ExternalProject_SetIfNotDefined var defaultvalue)
+  set(_obfuscate FALSE)
+  set(_quiet FALSE)
+  foreach(arg ${ARGN})
+    if(arg STREQUAL "OBFUSCATE")
+      set(_obfuscate TRUE)
+    endif()
+    if(arg STREQUAL "QUIET")
+      set(_quiet TRUE)
+    endif()
+  endforeach()
+  if(DEFINED ENV{${var}} AND NOT DEFINED ${var})
+    set(_value "$ENV{${var}}")
+    if(_obfuscate)
+      set(_value "OBFUSCATED")
+    endif()
+    if(NOT _quiet)
+      message(STATUS "Setting '${var}' variable with environment variable value '${_value}'")
+    endif()
+    set(${var} $ENV{${var}})
+  endif()
+  if(NOT DEFINED ${var})
+    set(_value "${defaultvalue}")
+    if(_obfuscate)
+      set(_value "OBFUSCATED")
+    endif()
+    if(NOT _quiet)
+      message(STATUS "Setting '${var}' variable with default value '${_value}'")
+    endif()
+    set(${var} "${defaultvalue}")
+  endif()
+endmacro()


Ensure the in-application help can be build.

--- CMake/mitkBuildConfigurationWorkbenchRelease.cmake
+++ CMake/mitkBuildConfigurationWorkbenchRelease.cmake
@@ -1,3 +1,11 @@
 include(${CMAKE_CURRENT_LIST_DIR}/mitkBuildConfigurationDefault.cmake)

 set(MITK_VTK_DEBUG_LEAKS OFF CACHE BOOL "Enable VTK Debug Leaks" FORCE)
+
+# Ensure that the in-application help can be build
+if(NOT DOXYGEN_EXECUTABLE)
+  message(FATAL_ERROR "DOXYGEN_EXECUTABLE is not set")
+endif()
+if(NOT BLUEBERRY_USE_QT_HELP)
+  message(FATAL_ERROR "BLUEBERRY_USE_QT_HELP is required to be set to ON")
+endif()


Revert "Using tar.gz file rather than hg when looking up eigen"

This reverts commit 450fc9c2161db0eb722a7deaf3eb76cc34dd1639.

--- modules/LookUpEigen3.cmake
+++ modules/LookUpEigen3.cmake
@@ -7,10 +7,6 @@
     )
 endif()

-if(NOT Eigen3_URL)
-    set(Eigen3_URL http://bitbucket.org/eigen/eigen/get/3.2.4.tar.gz)
-    set(Eigen3_MD5 4d0d77e06fef87b4fcd2c9b72cc8dc55)
-endif()
 if(NOT Eigen3_HG_REPOSITORY)
     set(Eigen3_HG_REPOSITORY https://bitbucket.org/eigen/eigen/)
 endif()


Fix error message

Fix error message

--- cmake/FindPixarUsd.cmake
+++ cmake/FindPixarUsd.cmake
@@ -18,10 +18,10 @@
 #  limitations under the License.

 if(NOT DEFINED USD_ROOT)
-    message(FATAL_ERROR "HOUDINI_ROOT not defined")
+    message(FATAL_ERROR "USD_ROOT not defined")
 endif()

-find_package(pxr CONFIG REQUIRED PATHS ${HOUDINI_ROOT})
+find_package(pxr CONFIG REQUIRED PATHS ${USD_ROOT})

 target_compile_definitions(UsdInterface
     INTERFACE
@@ -32,4 +32,4 @@
 target_link_libraries(UsdInterface
     INTERFACE
     hd usdHydra usdImaging
-    )+    )


Remove LL support when finding HAL package

New Find... file will be created to LL to treat it as a separated
library.

--- cmake/FindSTM32HAL.cmake
+++ cmake/FindSTM32HAL.cmake
@@ -7,9 +7,6 @@

     # Components that have _ex sources
     SET(HAL_EX_COMPONENTS adc crc dac flash i2c pcd pwr rcc rtc smartcard spi tim uart)
-
-    # Components that have ll_ in names instead of hal_
-    SET(HAL_LL_COMPONENTS "")

     SET(HAL_PREFIX stm32f0xx_)

@@ -23,9 +20,6 @@
     # Components that have _ex sources
     SET(HAL_EX_COMPONENTS adc dac flash gpio pcd rcc rtc tim)

-    # Components that have ll_ in names instead of hal_
-    SET(HAL_LL_COMPONENTS fsmc sdmmc usb)
-
     SET(HAL_PREFIX stm32f1xx_)

 ELSEIF(STM32_FAMILY STREQUAL "F2")
@@ -38,9 +32,6 @@

     # Components that have _ex sources
     SET(HAL_EX_COMPONENTS adc dac dma flash pwr rcc rtc tim)
-
-    # Components that have ll_ in names instead of hal_
-    SET(HAL_LL_COMPONENTS fsmc sdmmc usb)

     SET(HAL_PREFIX stm32f2xx_)

@@ -69,9 +60,6 @@
     SET(HAL_EX_COMPONENTS adc cryp dac dcmi dma flash fmpi2c hash i2c i2s pcd
                           pwr rcc rtc sai tim)

-    # Components that have ll_ in names instead of hal_
-    SET(HAL_LL_COMPONENTS fmc fsmc sdmmc usb)
-
     SET(HAL_PREFIX stm32f4xx_)

 ELSEIF(STM32_FAMILY STREQUAL "F7")
@@ -86,9 +74,6 @@
     SET(HAL_EX_COMPONENTS adc crc cryp dac dcmi dma flash hash i2c pcd
                           pwr rcc rtc sai tim)

-    # Components that have ll_ in names instead of hal_
-    SET(HAL_LL_COMPONENTS fmc sdmmc usb)
-
     SET(HAL_PREFIX stm32f7xx_)

 ELSEIF(STM32_FAMILY STREQUAL "L0")
@@ -100,9 +85,6 @@

     # Components that have _ex sources
     SET(HAL_EX_COMPONENTS adc comp crc cryp dac flash i2c pcd pwr rcc rtc smartcard tim uart usart)
-
-    # Components that have ll_ in names instead of hal_
-    SET(HAL_LL_COMPONENTS crs exti lpuart utils)

     SET(HAL_PREFIX stm32l0xx_)

@@ -118,11 +100,6 @@
     SET(HAL_EX_COMPONENTS adc crc cryp dac dfsdm dma flash hash i2c ltdc
                           opamp pcd pwr rcc rtc sai sd smartcard spi tim uart usart)

-
-    # Components that have ll_ in names instead of hal_
-    SET(HAL_LL_COMPONENTS adc comp crc crs dac dma dma2d exti fmc gpio i2c lptim lpuart
-                          opamp pwr rcc rng rtc sdmmc spi swpmi tim usart usb utils)
-
     SET(HAL_PREFIX stm32l4xx_)

 ENDIF()
@@ -151,14 +128,9 @@
     LIST(FIND HAL_COMPONENTS ${cmp} STM32HAL_FOUND_INDEX)
     IF(${STM32HAL_FOUND_INDEX} LESS 0)
         MESSAGE(FATAL_ERROR "Unknown STM32HAL component: ${cmp}. Available components: ${HAL_COMPONENTS}")
-    ENDIF()
-    LIST(FIND HAL_LL_COMPONENTS ${cmp} STM32HAL_FOUND_INDEX)
-    IF(${STM32HAL_FOUND_INDEX} LESS 0)
+	ELSE()
         LIST(APPEND HAL_HEADERS ${HAL_PREFIX}hal_${cmp}.h)
         LIST(APPEND HAL_SRCS ${HAL_PREFIX}hal_${cmp}.c)
-    ELSE()
-        LIST(APPEND HAL_HEADERS ${HAL_PREFIX}ll_${cmp}.h)
-        LIST(APPEND HAL_SRCS ${HAL_PREFIX}ll_${cmp}.c)
     ENDIF()
     LIST(FIND HAL_EX_COMPONENTS ${cmp} STM32HAL_FOUND_INDEX)
     IF(NOT (${STM32HAL_FOUND_INDEX} LESS 0))


Delete Translations.cmake

Delete Translations.cmake

--- cmake/Translations.cmake
+++ cmake/Translations.cmake
@@ -1,66 +0,0 @@
-# Translations.cmake, CMake macros written for Marlin, feel free to re-use them
-
-macro(add_translations_directory NLS_PACKAGE)
-    add_custom_target (i18n ALL COMMENT “Building i18n messages.”)
-    find_program (MSGFMT_EXECUTABLE msgfmt)
-    file (GLOB PO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.po)
-    foreach (PO_INPUT ${PO_FILES})
-        get_filename_component (PO_INPUT_BASE ${PO_INPUT} NAME_WE)
-        set (MO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PO_INPUT_BASE}.mo)
-        add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} -o ${MO_OUTPUT} ${PO_INPUT})
-
-        install (FILES ${MO_OUTPUT} DESTINATION
-            share/locale/${PO_INPUT_BASE}/LC_MESSAGES
-            RENAME ${NLS_PACKAGE}.mo)
-    endforeach (PO_INPUT ${PO_FILES})
-endmacro(add_translations_directory)
-
-
-macro(add_translations_catalog NLS_PACKAGE)
-    add_custom_target (pot COMMENT “Building translation catalog.”)
-    find_program (XGETTEXT_EXECUTABLE xgettext)
-
-    set(C_SOURCE "")
-    set(VALA_SOURCE "")
-    set(GLADE_SOURCE "")
-
-    foreach(FILES_INPUT ${ARGN})
-        set(BASE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT})
-
-        file (GLOB_RECURSE SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/ ${BASE_DIRECTORY}/*.c)
-        foreach(C_FILE ${SOURCE_FILES})
-            set(C_SOURCE ${C_SOURCE} ${C_FILE})
-        endforeach()
-
-        file (GLOB_RECURSE SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/ ${BASE_DIRECTORY}/*.vala)
-        foreach(VALA_C_FILE ${SOURCE_FILES})
-            set(VALA_SOURCE ${VALA_SOURCE} ${VALA_C_FILE})
-        endforeach()
-
-        file (GLOB_RECURSE SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/ ${BASE_DIRECTORY}/*.ui)
-        foreach(GLADE_C_FILE ${SOURCE_FILES})
-            set(GLADE_SOURCE ${GLADE_SOURCE} ${GLADE_C_FILE})
-        endforeach()
-    endforeach()
-
-    set(BASE_XGETTEXT_COMMAND
-        ${XGETTEXT_EXECUTABLE} -d ${NLS_PACKAGE}
-        -o ${CMAKE_CURRENT_SOURCE_DIR}/${NLS_PACKAGE}.pot
-        --add-comments="/" --keyword="_" --keyword="N_" --keyword="C_:1c,2" --keyword="NC_:1c,2" --keyword="ngettext:1,2" --keyword="Q_:1g" --from-code=UTF-8)
-
-   set(CONTINUE_FLAG "")
-
-    IF(NOT "${C_SOURCE}" STREQUAL "")
-        add_custom_command(TARGET pot WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${BASE_XGETTEXT_COMMAND} ${C_SOURCE})
-        set(CONTINUE_FLAG "-j")
-    ENDIF()
-
-    IF(NOT "${VALA_SOURCE}" STREQUAL "")
-        add_custom_command(TARGET pot WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${BASE_XGETTEXT_COMMAND} ${CONTINUE_FLAG} -LC\# ${VALA_SOURCE})
-        set(CONTINUE_FLAG "-j")
-    ENDIF()
-
-    IF(NOT "${GLADE_SOURCE}" STREQUAL "")
-        add_custom_command (TARGET pot WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${BASE_XGETTEXT_COMMAND} ${CONTINUE_FLAG} -LGlade ${GLADE_SOURCE})
-    ENDIF()
-endmacro()


Improve dependency management (see commit description)

 - add mecanism to skip dependency compilation after the first run
 - trigger error in main cmake file when error are encountered when configuring and compiling externals

--- cmake/externalFunc.cmake
+++ cmake/externalFunc.cmake
@@ -1,3 +1,5 @@
+set( CMAKE_EXECUTE_PROCESS_COMMAND_ECHO STDOUT)
+
 macro(addExternalFolder NAME FOLDER )
     # External resources/repositories are downloaded and built at configuration stage
     message(INFO "[addExternalFolder] process ${NAME} ${FOLDER}")
@@ -7,71 +9,97 @@
         COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/external/cmake
     )

-    if( "${ARGN}" )
+    if("${ARGN}" STREQUAL "")
+        message(STATUS "[addExternalFolder] Configure cmake project")
+    else ()
         message(STATUS "[addExternalFolder] Configure cmake project with options ${ARGN}")
-    else ()
-        message(STATUS "[addExternalFolder] Configure cmake project")
     endif()

-    execute_process(
-        COMMAND ${CMAKE_COMMAND} ${FOLDER}
-            -DCMAKE_GENERATOR=${CMAKE_GENERATOR}
-            -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-            -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-            -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-            -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-            -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-            -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
-            -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
-            -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
-            -DCMAKE_SHARED_LINKER_FLAGS=${CMAKE_SHARED_LINKER_FLAGS}
-            -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}
-            -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}
-            ${ARGN}
-        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/external
-    )
-    message(STATUS "[addExternalFolder] Start build")
-
-    set( RadiumExternalMakeTarget all)
-    string( TOLOWER ${CMAKE_GENERATOR} generator_lower)
-    if( MSVC AND NOT ${generator_lower} STREQUAL "ninja" )
-            set( RadiumExternalMakeTarget ALL_BUILD)
-            message(INFO "[addExternalFolder] Enable compatibility mode for VS Generator" )
+    string(TOUPPER ${NAME} NAME_UPPER)
+    set( UPDATE_EXTERNAL ON)
+    if( RADIUM_SKIP_${NAME_UPPER}_EXTERNAL )
+        set( UPDATE_EXTERNAL OFF)
     endif()

-    if( ${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.12 )
-    execute_process(
-        COMMAND ${CMAKE_COMMAND} --build . -j ${RADIUM_BUILD_EXTERNAL_PARALLEL_LEVEL} --config ${CMAKE_BUILD_TYPE} --target ${RadiumExternalMakeTarget}
-        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/external
+
+    if ( UPDATE_EXTERNAL )
+        execute_process(
+            COMMAND ${CMAKE_COMMAND} ${FOLDER}
+                -DCMAKE_GENERATOR=${CMAKE_GENERATOR}
+                -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+                -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
+                -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+                -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
+                -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
+                -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
+                -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
+                -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
+                -DCMAKE_SHARED_LINKER_FLAGS=${CMAKE_SHARED_LINKER_FLAGS}
+                -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}
+                -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}
+                ${ARGN}
+            WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/external
+            RESULT_VARIABLE ret
         )
+        if(NOT ret EQUAL "0")
+            message( FATAL_ERROR "[addExternalFolder] Cmake configure step failed. ")
+        endif()
+        message(STATUS "[addExternalFolder] Start build")
+
+        set( RadiumExternalMakeTarget all)
+        string( TOLOWER ${CMAKE_GENERATOR} generator_lower)
+        if( MSVC AND NOT ${generator_lower} STREQUAL "ninja" )
+                set( RadiumExternalMakeTarget ALL_BUILD)
+                message(INFO "[addExternalFolder] Enable compatibility mode for VS Generator" )
+        endif()
+
+        if( ${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.12 )
+        execute_process(
+            COMMAND ${CMAKE_COMMAND} --build . -j ${RADIUM_BUILD_EXTERNAL_PARALLEL_LEVEL} --config ${CMAKE_BUILD_TYPE} --target ${RadiumExternalMakeTarget}
+            WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/external
+            RESULT_VARIABLE ret
+            )
+        else()
+            set( TOOL_OPTIONS "" )
+            if( ${generator_lower} MATCHES "|makefile|" OR ${generator_lower} MATCHES "|ninja|" )
+              set( TOOL_OPTIONS -- -j${RADIUM_BUILD_EXTERNAL_PARALLEL_LEVEL} )
+            elseif( ${generator_lower} MATCHES "|visual|" )
+              set( TOOL_OPTIONS -- /m )
+            else()
+              message(WARNING "[addExternalFolder] Parallel build are not supported with your generator ${CMAKE_GENERATOR}")
+            endif()
+            execute_process(
+              COMMAND ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target ${RadiumExternalMakeTarget} ${TOOL_OPTIONS}
+              WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/external
+              RESULT_VARIABLE ret
+              )
+        endif()
+
+        if(NOT ret EQUAL "0")
+            message( FATAL_ERROR "[addExternalFolder] Cmake build step failed. ")
+        endif()
+        message(STATUS "[addExternalFolder] Build ended")
+
+        #Configure package
+        if(EXISTS "${FOLDER}/package.cmake")
+            set(EXTERNAL_TARGET_PACKAGE_FILE "${CMAKE_CURRENT_BINARY_DIR}/external/cmake/package-${NAME}.cmake")
+            message(STATUS "[addExternalFolder] Configure package file ${EXTERNAL_TARGET_PACKAGE_FILE}")
+            configure_file(${FOLDER}/package.cmake "${EXTERNAL_TARGET_PACKAGE_FILE}" COPYONLY)
+            unset(EXTERNAL_TARGET_PACKAGE_FILE)
+            include("${CMAKE_CURRENT_BINARY_DIR}/external/cmake/package-${NAME}.cmake")
+        endif()
+        OPTION( RADIUM_SKIP_${NAME_UPPER}_EXTERNAL "[addExternalFolder] Skip updating ${NAME}::external (disable for rebuild)" ON)
+
     else()
-        set( TOOL_OPTIONS "" )
-        if( ${generator_lower} MATCHES "|makefile|" OR ${generator_lower} MATCHES "|ninja|" )
-          set( TOOL_OPTIONS -- -j${RADIUM_BUILD_EXTERNAL_PARALLEL_LEVEL} )
-        elseif( ${generator_lower} MATCHES "|visual|" )
-          set( TOOL_OPTIONS -- /m )
-        else()
-          message(WARNING "[addExternalFolder] Parallel build are not supported with your generator ${CMAKE_GENERATOR}")
-        endif()
-        execute_process(
-          COMMAND ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target ${RadiumExternalMakeTarget} ${TOOL_OPTIONS}
-          WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/external
-          )
-    endif()
-
-    message(STATUS "[addExternalFolder] Build ended")
-
-    #Configure package
-    set(external_sources ${FOLDER}/CMakeLists.txt)
-    if(EXISTS "${FOLDER}/package.cmake")
-        set(EXTERNAL_TARGET_PACKAGE_FILE "${CMAKE_CURRENT_BINARY_DIR}/external/cmake/package-${NAME}.cmake")
-        message(STATUS "[addExternalFolder] Configure package file ${EXTERNAL_TARGET_PACKAGE_FILE}")
-        configure_file(${FOLDER}/package.cmake "${EXTERNAL_TARGET_PACKAGE_FILE}" COPYONLY)
-        unset(EXTERNAL_TARGET_PACKAGE_FILE)
-        include("${CMAKE_CURRENT_BINARY_DIR}/external/cmake/package-${NAME}.cmake")
-        list(APPEND external_sources ${FOLDER}/package.cmake)
+        message("[addExternalFolder] Skip ${NAME}::external update (use RADIUM_UPDATE_EXTERNAL_${NAME} to change behavior)")
     endif()

     #This dummy target add external/CMakeLists.txt to most IDEs
+    set(external_sources ${FOLDER}/CMakeLists.txt)
+    if(EXISTS "${FOLDER}/package.cmake")
+        list(APPEND external_sources ${FOLDER}/package.cmake)
+    endif()
     add_custom_target(External${NAME} ALL SOURCES ${external_sources})
+    include("${CMAKE_CURRENT_BINARY_DIR}/external/cmake/package-${NAME}.cmake")
+
 endmacro()


Removed pedantic warnings

Removed pedantic warnings

--- cmake/Compiler.cmake
+++ cmake/Compiler.cmake
@@ -20,7 +20,7 @@
     ENDIF()

     ADD_DEFINITIONS(-D_XOPEN_SOURCE=700)
-    ADD_COMPILE_OPTIONS(-Wall -Wextra -pedantic -Wno-unused-parameter
+    ADD_COMPILE_OPTIONS(-Wall -Wextra -Wno-unused-parameter
         -Wno-unused-variable -Wno-missing-braces -Wno-unused-function
         -Wno-variadic-macros)


update

update

--- cmake/FindGLFW.cmake
+++ cmake/FindGLFW.cmake
@@ -26,19 +26,19 @@
                     "${GLFW_DIR}/lib"
                     "${GLFW_DIR}/lib-vc2013"
             )
-        elseif (MSVC14 OR (${MSVC_VERSION} EQUAL 1900))
+        elseif (MSVC14 AND (${MSVC_VERSION} EQUAL 1900))
             find_library (GLFW_LIB NAMES glfw3
                 PATHS
                     "${GLFW_DIR}/lib"
                     "${GLFW_DIR}/lib-vc2015"
             )
-        elseif (MSVC15 OR (${MSVC_VERSION} EQUAL 2000))
+        elseif (MSVC14 AND ((${MSVC_VERSION} GREATER_EQUAL 1910) AND (${MSVC_VERSION} LESS 1920)))
             find_library (GLFW_LIB NAMES glfw3
                 PATHS
                     "${GLFW_DIR}/lib"
                     "${GLFW_DIR}/lib-vc2017"
             )
-        elseif (MSVC16 OR (${MSVC_VERSION} EQUAL 2100))
+        elseif (MSVC14 AND ((${MSVC_VERSION} GREATER_EQUAL 1920) AND (${MSVC_VERSION} LESS 1930)))
             find_library (GLFW_LIB NAMES glfw3
                 PATHS
                     "${GLFW_DIR}/lib"


Fix cmake/FindPOPT.cmake to correctly mark_as_advanced POPT_INCLUDE_DIRS.

Previously it was incorrectly marking the non-existent POPT_INCLUDES
as advanced.

--- cmake/FindPOPT.cmake
+++ cmake/FindPOPT.cmake
@@ -80,7 +80,7 @@

   mark_as_advanced (
     POPT_ROOT_DIR
-    POPT_INCLUDES
+    POPT_INCLUDE_DIRS
     POPT_LIBRARIES
     )


Drop library extension in find_library() call at FindZBar.cmake

--- cmake/FindZBar.cmake
+++ cmake/FindZBar.cmake
@@ -21,22 +21,25 @@
   SET(ZBAR_FOUND TRUE)

 ELSE (ZBAR_INCLUDE_DIR AND ZBAR_LIBRARIES)
-
+message(STATUS "Entering if")
   IF (WIN32)
+    message(STATUS "WIN32")
     FIND_PATH(ZBAR_LIBRARY_DIR
               NAMES bin/libzbar-0.dll
               HINTS "C:/Program Files" "C:/Program Files (x86)" "C:/"
               PATH_SUFFIXES ZBar)
-
+    message(STATUS "ZBAR_LIBRARY_DIR=${ZBAR_LIBRARY_DIR}")
     FIND_LIBRARY(ZBAR_LIBRARIES
-                 NAMES libzbar-0.lib
+                 NAMES zbar-0 libzbar-0
                  HINTS ${ZBAR_LIBRARY_DIR}/lib)
-
+    message(STATUS "ZBAR_LIBRARIES=${ZBAR_LIBRARIES}")
     FIND_PATH(ZBAR_INCLUDE_DIR
               NAMES zbar.h
               HINTS ${ZBAR_LIBRARY_DIR}
               PATH_SUFFIXES include)
+    message(STATUS "ZBAR_INCLUDE_DIR=${ZBAR_INCLUDE_DIR}")
   ELSE(WIN32)
+    message(STATUS "Not WIN32")
     FIND_PACKAGE(PkgConfig)
     #pkg_check_modules(PC_QCA2 QUIET qca2)
     pkg_check_modules(PC_ZBAR zbar)


build: fix findllvm script

build: fix findllvm script

--- cmake/Findllvm.cmake
+++ cmake/Findllvm.cmake
@@ -27,8 +27,8 @@
     OUTPUT_VARIABLE LLVM_LIBDIRS
     OUTPUT_STRIP_TRAILING_WHITESPACE)

-set(LLVM_INCLUDE_DIRS "${LLVM_C_INCLUDE_DIR} ${LLVM_INCLUDE_DIR}")
-set(LLVM_LIBRARIES "${LLVM_LIBRARIES} ${LLVM_SYSTEM_LIBS}")
+set(LLVM_INCLUDE_DIRS ${LLVM_C_INCLUDE_DIR} ${LLVM_INCLUDE_DIR})
+set(LLVM_LIBRARIES ${LLVM_LIBRARIES} ${LLVM_SYSTEM_LIBS})

 include(FindPackageHandleStandardArgs)


boost chrono lib

boost chrono lib

--- cmake/examples.cmake
+++ cmake/examples.cmake
@@ -1,5 +1,5 @@
 find_package(JsonCPP REQUIRED)
-find_package(Boost COMPONENTS system thread date_time REQUIRED)
+find_package(Boost COMPONENTS system thread date_time chrono REQUIRED)

 set(CMAKE_THREAD_PREFER_PTHREAD ON)
 find_package(Threads REQUIRED)
@@ -21,6 +21,7 @@
         ${JSONCPP_LIBRARY}
         ${Boost_THREAD_LIBRARY}
         ${Boost_DATE_TIME_LIBRARY}
+        ${Boost_CHRONO_LIBRARY}
         ${CMAKE_THREAD_LIBS_INIT}
     )
     if(WIN32)


cmake update for memcheck

cmake update for memcheck

git-svn-id: 6b1c4fe79111c0bc0cce83313250759594f8984b@8120 e128ff1e-fa79-4151-a8cb-522299a2c450

--- cmake/gsConfig.cmake
+++ cmake/gsConfig.cmake
@@ -69,6 +69,12 @@
     set(${PROJECT_NAME}_RUNTIME_OUTPUT_DIRECTORY_${CONFIG} bin)
     set(${PROJECT_NAME}_LIBRARY_OUTPUT_DIRECTORY_${CONFIG} lib)
 endforeach()
+
+#Configure Valgrind
+#find_program( MEMORYCHECK_COMMAND valgrind )
+#--gen-suppressions=all --trace-children=yes --track-origins=yes
+set( MEMORYCHECK_COMMAND_OPTIONS "--leak-check=full --show-reachable=yes --gen-suppressions=all" CACHE INTERNAL "")
+#set( MEMORYCHECK_SUPPRESSIONS_FILE "${gismo_SOURCE_DIR}/valgrind_supp.txt" CACHE INTERNAL "")

 # Enable C++ 11 features if present
 if(GISMO_BUILD_CPP11 AND NOT MSVC)


Fix location of generated header for subproject build

--- CommonLibrary.cmake
+++ CommonLibrary.cmake
@@ -32,8 +32,11 @@
   set(HEADERS ${${NAME}_HEADERS})
   set(PUBLIC_HEADERS ${${NAME}_PUBLIC_HEADERS})
   set(LINK_LIBRARIES ${${NAME}_LINK_LIBRARIES})
+
+  set(PROJECT_GENERATED_HEADER
+    ${PROJECT_BINARY_DIR}/include/${PROJECT_INCLUDE_NAME}/${PROJECT_INCLUDE_NAME}.in.h)

-  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_INCLUDE_NAME}.in.h
+  file(WRITE ${PROJECT_GENERATED_HEADER}
     "// generated by CommonLibrary.cmake, do not edit\n"
     "#ifndef ${NAME}_H\n"
     "#define ${NAME}_H\n")
@@ -44,14 +47,17 @@
     if(NOT PUBLIC_HEADER MATCHES "defines.+\\.h" AND
         PUBLIC_HEADER MATCHES ".*\\.h$" )

-      file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_INCLUDE_NAME}.in.h
+      file(APPEND ${PROJECT_GENERATED_HEADER}
         "#include <${PROJECT_INCLUDE_NAME}/${PUBLIC_HEADER}>\n")
     endif()
   endforeach()
-  file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_INCLUDE_NAME}.in.h "#endif\n")
-  set(PROJECT_INCLUDE_HEADER ${CMAKE_CURRENT_BINARY_DIR}/include/${PROJECT_INCLUDE_NAME}/${PROJECT_INCLUDE_NAME}.h)
+  file(APPEND ${PROJECT_GENERATED_HEADER} "#endif\n")
+  # note that the use of CMAKE_BINARY_DIR is intentional here
+  set(PROJECT_INCLUDE_HEADER
+    ${PROJECT_BINARY_DIR}/include/${PROJECT_INCLUDE_NAME}/${PROJECT_INCLUDE_NAME}.h)

-  configure_file(${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_INCLUDE_NAME}.in.h
+  configure_file(
+    ${PROJECT_GENERATED_HEADER}
     ${PROJECT_INCLUDE_HEADER} COPYONLY)
   list(APPEND PUBLIC_HEADERS ${PROJECT_INCLUDE_HEADER})


Toolchain fix for AIX to allow big memory allocations. (#27)

--- cmake/toolchains/aix/xlc-default.cmake
+++ cmake/toolchains/aix/xlc-default.cmake
@@ -10,12 +10,14 @@

 string(CONCAT DEFAULT_CXX_FLAGS
        "-q${BUILD_BITNESS} "
+       "-bmaxdata:0x50000000 "      # DRQS 13597546
        "-qalias=noansi "
        "-qarch=pwr6 "
        "-qdebug=nparseasm "
        "-qfuncsect "
+       "-qinline "
+       "-qlanglvl=newexcp "
        "-qlanglvl=staticstoreoverlinkage "
-       "-qmaxmem=-1 "
        "-qnotempinc "
        "-qrtti=all "
        "-qsuppress=1500-029 "
@@ -29,11 +31,15 @@
        "-qxflag=tocrel "
        "-qxflag=FunctionCVTmplArgDeduction2011 "
        "-qxflag=UnwindTypedefInClassDecl "
+       "-qxflag=inlinewithdebug:stepOverInline "
+       "-qxflag=noautoinline "
       )
 set(CMAKE_CXX_FLAGS ${DEFAULT_CXX_FLAGS} CACHE STRING "Default" FORCE)

 string(CONCAT DEFAULT_C_FLAGS
        "-q${BUILD_BITNESS} "
+       "-qtbtable=none "
+       "-qinline "
       )
 set(CMAKE_C_FLAGS   ${DEFAULT_C_FLAGS}   CACHE STRING "Default" FORCE)


added EMBREE_LIBRARY_XEONPHI to embree-config-linux.cmake

--- common/cmake/embree-config-linux.cmake
+++ common/cmake/embree-config-linux.cmake
@@ -16,5 +16,6 @@

 SET(EMBREE_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/../../../include)
 SET(EMBREE_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/../../libembree.so.@EMBREE_VERSION@)
+SET(EMBREE_LIBRARY_XEONPHI ${CMAKE_CURRENT_LIST_DIR}/../../libembree_xeonphi.so.@EMBREE_VERSION@)

 MARK_AS_ADVANCED(embree_DIR)


Fix typo (#86)

Fix typo (#86)

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

--- FindEqualizer.cmake
+++ FindEqualizer.cmake
@@ -205,7 +205,7 @@
         "See the ${CMAKE_CURRENT_LIST_FILE} for more details.")
     endif()
   endif()
-  find_package_handle_standard_args(Equalizer DEFAULT_MSG<
+  find_package_handle_standard_args(Equalizer DEFAULT_MSG
                                     _eq_LIBRARY _eq_INCLUDE_DIR)
 endif()


Removed the tomviz version from the install dir

--- projects/win32/tomviz.bundle.cmake
+++ projects/win32/tomviz.bundle.cmake
@@ -45,7 +45,7 @@
         PATTERN "*.lib" EXCLUDE)

 # install tomviz Python modules and others
-install(DIRECTORY "${install_location}/lib/tomviz-${tomviz_version}"
+install(DIRECTORY "${install_location}/lib/tomviz"
         DESTINATION "lib"
         USE_SOURCE_PERMISSIONS
         COMPONENT ${AppName}


win32: skip installing Python bits which moved around

--- projects/win32/tomviz.bundle.cmake
+++ projects/win32/tomviz.bundle.cmake
@@ -35,18 +35,6 @@
           USE_SOURCE_PERMISSIONS
           COMPONENT ${AppName}
           FILES_MATCHING PATTERN "python*.dll")
-
-  # install python pyd objects (python dlls).
-  # For 64 bit builds, these are in an amd64/ subdir
-  set(PYTHON_PCBUILD_SUBDIR "")
-  if(CMAKE_CL_64)
-    set(PYTHON_PCBUILD_SUBDIR "amd64/")
-  endif()
-  install(DIRECTORY "${SuperBuild_BINARY_DIR}/python/src/python/PCbuild/${PYTHON_PCBUILD_SUBDIR}"
-          DESTINATION "bin/Lib"
-          USE_SOURCE_PERMISSIONS
-          COMPONENT ${AppName}
-          FILES_MATCHING PATTERN "*.pyd")
 endif()

 # install paraview python modules and others.
@@ -63,15 +51,6 @@
         COMPONENT ${AppName}
         PATTERN "*.lib" EXCLUDE)

-# install all extra Python modules/packages.
-if (numpy_ENABLED)
-  # on Windows, all Python packages simply go under bin/Lib/site-packages"
-  install(DIRECTORY "${install_location}/lib/site-packages/"
-    DESTINATION "bin/Lib/site-packages"
-    USE_SOURCE_PERMISSIONS
-    COMPONENT ${AppName})
-endif()
-
 #------------------------------------------------------------------------------
 set (CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_LIST_DIR}/InstallerIcon.ico")


Looks like I broke Android builds on nearly all platforms. This should fix it up.

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -11,10 +11,18 @@

 # Default build output paths
 if (NOT OGRE_ARCHIVE_OUTPUT)
-  set(OGRE_ARCHIVE_OUTPUT ${OGRE_BINARY_DIR}/lib/$(PLATFORM_NAME))
+  if(APPLE AND NOT OGRE_BUILD_PLATFORM_ANDROID)
+    set(OGRE_ARCHIVE_OUTPUT ${OGRE_BINARY_DIR}/lib/$(PLATFORM_NAME))
+  else()
+    set(OGRE_ARCHIVE_OUTPUT ${OGRE_BINARY_DIR}/lib)
+  endif()
 endif ()
 if (NOT OGRE_LIBRARY_OUTPUT)
-  set(OGRE_LIBRARY_OUTPUT ${OGRE_BINARY_DIR}/lib/$(PLATFORM_NAME))
+  if(APPLE AND NOT OGRE_BUILD_PLATFORM_ANDROID)
+    set(OGRE_LIBRARY_OUTPUT ${OGRE_BINARY_DIR}/lib/$(PLATFORM_NAME))
+  else()
+    set(OGRE_LIBRARY_OUTPUT ${OGRE_BINARY_DIR}/lib)
+  endif()
 endif ()
 if (NOT OGRE_RUNTIME_OUTPUT)
   set(OGRE_RUNTIME_OUTPUT ${OGRE_BINARY_DIR}/bin)


fix issue in IPP search algorithm (when no IPPROOT available in system and IPP is installed)

--- OpenCVFindIPP.cmake
+++ OpenCVFindIPP.cmake
@@ -260,14 +260,14 @@
     # Note, if several IPP installations found the newest version will be
     # selected
     # ------------------------------------------------------------------------
-    foreach(CURDIR ${CMAKE_SYSTEM_PREFIX_PATH})
-        set(CURDIR ${CURDIR}/intel)
-        file(TO_CMAKE_PATH ${CURDIR} CURDIR)
-
-        if(EXISTS ${CURDIR})
-            file(GLOB_RECURSE IPP_H_PATH ${CURDIR}/ippversion.h)
-
-            if(IPP_H_PATH)
+    foreach(curdir ${CMAKE_SYSTEM_PREFIX_PATH})
+        set(curdir ${curdir}/intel)
+        file(TO_CMAKE_PATH ${curdir} CURDIR)
+
+        if(EXISTS ${curdir})
+            file(GLOB_RECURSE IPP_H_DIR ${curdir}/ippversion.h)
+
+            if(IPP_H_DIR)
                 set(IPP_FOUND 1)
             endif()

@@ -276,7 +276,7 @@
             set(IPP_LATEST_VERSION_STR ${IPP_VERSION_STR})

             # look through all dirs where ippversion.h was found
-            foreach(item ${IPP_H_PATH})
+            foreach(item ${IPP_H_DIR})

                 # traverse up to IPPROOT level
                 get_filename_component(_FILE_PATH ${item} PATH)
@@ -285,15 +285,14 @@
                 # extract IPP version info
                 get_ipp_version(${_ROOT_DIR})

+                # remember the latest version (if many found)
                 if(${IPP_LATEST_VERSION_STR} VERSION_LESS ${IPP_VERSION_STR})
-#                if(${IPP_LATEST_VERSION_STR} VERSION_GREATER ${IPP_VERSION_STR})
                     set(IPP_LATEST_VERSION_STR   ${IPP_VERSION_STR})
                     set(IPP_LATEST_VERSION_MAJOR ${IPP_VERSION_MAJOR})
                     set(IPP_LATEST_VERSION_MINOR ${IPP_VERSION_MINOR})
                     set(IPP_LATEST_VERSION_BUILD ${IPP_VERSION_BUILD})
                     set(IPP_ROOT_DIR ${_ROOT_DIR})
                 endif()
-
             endforeach()
         endif()
     endforeach()
@@ -301,3 +300,13 @@
     # set IPP INCLUDE, LIB dirs and library names
     set_ipp_variables(${IPP_LATEST_VERSION_STR})

+    # set CACHE variable IPP_H_PATH,
+    # path to IPP header files for the latest version
+    find_path(
+        IPP_H_PATH
+        NAMES ippversion.h
+        PATHS ${IPP_ROOT_DIR}
+        PATH_SUFFIXES include
+        DOC "The path to Intel(R) IPP header files"
+        NO_DEFAULT_PATH
+        NO_CMAKE_PATH)


CI: add GDAL_DATA&co variables for windows

--- CI/main_superbuild.cmake
+++ CI/main_superbuild.cmake
@@ -130,23 +130,26 @@
   set(ENV{PATH} "$ENV{PATH};${OTB_BUILD_BIN_DIR_NATIVE}" )
   set(ENV{PATH} "${XDK_PATH_NATIVE}\\bin;$ENV{PATH}" )
   set(ENV{PATH} "$ENV{PATH};${XDK_PATH_NATIVE}\\lib" )
+  set(ENV{GDAL_DATA} "${XDK_PATH_NATIVE}\\share\\gdal" )
+  set(ENV{GEOTIFF_CSV} "${XDK_PATH_NATIVE}\\share\\epsg_csv" )
+  set(ENV{PROJ_LIB} "${XDK_PATH_NATIVE}\\share" )
   # needed to load Qt plugins for testing, not for binary packages where we use a qt.conf file
   set(ENV{QT_PLUGIN_PATH} "${XDK_PATH_NATIVE}\\plugins")
+  set( CTEST_ENVIRONMENT
+"PATH=$ENV{PATH}
+GDAL_DATA=$ENV{GDAL_DATA}
+GEOTIFF_CSV=$ENV{GEOTIFF_CSV}
+PROJ_LIB=$ENV{PROJ_LIB}
+")
 else()
   set(ENV{PATH} "${XDK_PATH}/lib:${XDK_PATH}/bin:$ENV{PATH}" )
-endif()
-
-# FIX ME this part might platform dependent
-set( GDAL_DATA "${XDK_PATH}/share/gdal" )
-set( GEOTIFF_CSV "${XDK_PATH}/share/epsg_csv" )
-set( PROJ_LIB "${XDK_PATH}/share" )
-set( CTEST_ENVIRONMENT
+  #~ set( GDAL_DATA "${XDK_PATH}/share/gdal" )
+  #~ set( GEOTIFF_CSV "${XDK_PATH}/share/epsg_csv" )
+  #~ set( PROJ_LIB "${XDK_PATH}/share" )
+  set( CTEST_ENVIRONMENT
 "PATH=$ENV{PATH}
 ")
-# It seems that we do not need that
-# GDAL_DATA= GDAL_DATA
-# GEOTIFF_CSV= GEOTIFF_CSV
-# PROJ_LIB= PROJ_LIB
+endif()

 # Sources are already checked out : do nothing for update
 set(CTEST_GIT_UPDATE_CUSTOM "${CMAKE_COMMAND}" "-E" "echo" "No update")


videoio: set plugin output dir on windows to bin

--- modules/videoio/cmake/plugin.cmake
+++ modules/videoio/cmake/plugin.cmake
@@ -44,6 +44,7 @@
   )

   if(WIN32)
+    set_target_properties(${name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
     install(TARGETS ${name} OPTIONAL LIBRARY DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT plugins)
   else()
     install(TARGETS ${name} OPTIONAL LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT plugins)


CMake: assimp gives us non existing include dirs

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -321,10 +321,12 @@
   # workaround horribly broken assimp cmake
   add_library(fix::assimp INTERFACE IMPORTED)
   set_target_properties(fix::assimp PROPERTIES
-      INTERFACE_INCLUDE_DIRECTORIES "${ASSIMP_INCLUDE_DIRS}"
       INTERFACE_LINK_LIBRARIES "${ASSIMP_LIBRARIES}"
       INTERFACE_LINK_DIRECTORIES "${ASSIMP_LIBRARY_DIRS}"
   )
+  if(EXISTS "${ASSIMP_INCLUDE_DIRS}")
+    set_target_properties(fix::assimp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${ASSIMP_INCLUDE_DIRS}")
+  endif()
 endif()

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


Add boost 1.55

Add boost 1.55


Disabling X11 check for all Apple platforms. Because it may not always be available on the system.

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -72,7 +72,7 @@
 macro_log_feature(FREETYPE_FOUND "freetype" "Portable font engine" "http://www.freetype.org" TRUE "" "")

 # Find X11
-if (UNIX AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
+if (UNIX AND NOT APPLE)
   find_package(X11)
   macro_log_feature(X11_FOUND "X11" "X Window system" "http://www.x.org" TRUE "" "")
   macro_log_feature(X11_Xt_FOUND "Xt" "X Toolkit" "http://www.x.org" TRUE "" "")


Squashed 'cmake/' changes from 2eff847..eea4d4e

eea4d4e Fix using library paths when respective environment variables are not defined

git-subtree-dir: cmake
git-subtree-split: eea4d4e7d406dd3d62964bfbeddf74bd189d7d8a

--- libraries.cmake
+++ libraries.cmake
@@ -14,9 +14,14 @@
 #  along with this program.  If not, see <http://www.gnu.org/licenses/>.

 function(add_system_paths)
-  string(REPLACE ":" ";" LIBRARY_PATH $ENV{LIBRARY_PATH})
-  string(REPLACE ":" ";" LD_LIBRARY_PATH $ENV{LD_LIBRARY_PATH})
-  set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${LIBRARY_PATH} ${LD_LIBRARY_PATH} PARENT_SCOPE)
+  if(DEFINED ENV{LIBRARY_PATH})
+    string(REPLACE ":" ";" LIBRARY_PATH $ENV{LIBRARY_PATH})
+    set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${LIBRARY_PATH} PARENT_SCOPE)
+  endif()
+  if(DEFINED ENV{LD_LIBRARY_PATH})
+    string(REPLACE ":" ";" LD_LIBRARY_PATH $ENV{LD_LIBRARY_PATH})
+    set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${LD_LIBRARY_PATH} PARENT_SCOPE)
+  endif()
 endfunction()


adjust mitkMacroCreateModuleTest.cmake to prevent code dublication for each data and test type

--- CMake/mitkMacroCreateModuleTests.cmake
+++ CMake/mitkMacroCreateModuleTests.cmake
@@ -57,54 +57,34 @@
       endif()
     endforeach()

-    foreach(image ${MODULE_TESTIMAGES} ${ADDITIONAL_TEST_IMAGES} )
-      if(EXISTS ${image})
-        set(IMAGE_FULL_PATH ${image})
-      else()
-        # todo: maybe search other paths as well
-        # yes, please in mitk/Testing/Data, too
-        set(IMAGE_FULL_PATH ${MITK_DATA_DIR}/${image})
-      endif()
+    set(TEST_TYPES IMAGES SURFACES POINTSETS) # add other file types here

-      if(EXISTS ${IMAGE_FULL_PATH})
-        foreach( test ${MODULE_IMAGE_TESTS} )
-          get_filename_component(TName ${test} NAME_WE)
-          get_filename_component(ImageName ${IMAGE_FULL_PATH} NAME)
-          add_test(${TName}_${ImageName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TESTDRIVER} ${TName} ${IMAGE_FULL_PATH})
-          # Add labels for CDash subproject support
-          if(MODULE_SUBPROJECTS)
-            set_property(TEST ${TName}_${ImageName} PROPERTY LABELS ${MODULE_SUBPROJECTS} MITK)
-          endif()
-        endforeach()
-      else()
-        message("!!!!! No such file: ${IMAGE_FULL_PATH} !!!!!")
-      endif()
+    foreach(test_type ${TEST_TYPES})
+       foreach(test_data ${MODULE_TEST${test_type}} ${ADDITIONAL_TEST_${test_type}})
+         if(EXISTS ${test_data})
+           set(TEST_DATA_FULL_PATH ${test_data})
+           else()
+             # todo: maybe search other paths as well
+             # yes, please in mitk/Testing/Data, too
+             set(TEST_DATA_FULL_PATH ${MITK_DATA_DIR}/${test_data})
+           endif()
+
+           if(EXISTS ${TEST_DATA_FULL_PATH})
+             foreach( test ${MODULE_${test_type}_TESTS})
+               get_filename_component(TName ${test} NAME_WE)
+               get_filename_component(DName ${TEST_DATA_FULL_PATH} NAME)
+               add_test(${TName}_${DName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TESTDRIVER} ${TName} ${TEST_DATA_FULL_PATH})
+               # Add labels for CDash subproject support
+               if(MODULE_SUBPROJECTS)
+                 set_property(TEST ${TName}_${DName} PROPERTY LABELS ${MODULE_SUBPROJECTS} MITK)
+               endif()
+             endforeach()
+           else()
+             message("!!!!! No such file: ${TEST_DATA_FULL_PATH} !!!!!")
+           endif()
+         endforeach()
     endforeach()

-    foreach(surface ${MODULE_TESTSURFACES} ${ADDITIONAL_TEST_SURFACES} )
-      if(EXISTS ${surface})
-        set(SURFACE_FULL_PATH ${surface})
-      else()
-        # todo: maybe search other paths as well
-        # yes, please in mitk/Testing/Data, too
-        set(SURFACE_FULL_PATH ${MITK_DATA_DIR}/${surface})
-      endif()
-
-      if(EXISTS ${SURFACE_FULL_PATH})
-        foreach( test ${MODULE_SURFACE_TESTS} )
-          get_filename_component(TName ${test} NAME_WE)
-          get_filename_component(SurfaceName ${SURFACE_FULL_PATH} NAME)
-          add_test(${TName}_${SurfaceName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TESTDRIVER} ${TName} ${SURFACE_FULL_PATH})
-          # Add labels for CDash subproject support
-          if(MODULE_SUBPROJECTS)
-            set_property(TEST ${TName}_${SurfaceName} PROPERTY LABELS ${MODULE_SUBPROJECTS} MITK)
-          endif()
-        endforeach()
-      else()
-        message("!!!!! No such surface file: ${SURFACE_FULL_PATH} !!!!!")
-      endif()
-    endforeach()
-
-  endif()
+ endif()

 endmacro()


COMP: disable openmp on win32 (OTB)

COMP: disable openmp on win32 (OTB)

--- SuperBuild/CMake/External_otb.cmake
+++ SuperBuild/CMake/External_otb.cmake
@@ -27,6 +27,11 @@
 ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB GDAL OSSIM ITK TINYXML BOOST)

 ##get_property(OTB_DEPENDENCIES GLOBAL PROPERTY GLOBAL_OTB_DEPENDENCIES)
+
+set(OTB_USE_OPENMP TRUE)
+if(WIN32)
+  set(OTB_USE_OPENMP FALSE)
+endif()

 if(OTB_USE_CURL)
   ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB CURL)
@@ -184,6 +189,7 @@
   -DOTB_USE_GLFW:BOOL=${OTB_USE_GLFW}
   -DOTB_USE_GLUT:BOOL=${OTB_USE_GLUT}
   -DOTB_USE_QWT:BOOL=${OTB_USE_QWT}
+  -DOTB_USE_OPENMP:BOOL=${OTB_USE_OPENMP}
   -DOTB_WRAP_PYTHON:BOOL=${OTB_WRAP_PYTHON}
   -DOTB_WRAP_JAVA:BOOL=${OTB_WRAP_JAVA}
   ${OTB_ADDITIONAL_CACHE}


SuperBuild: disable versioned output lib and then a symlink

--- SuperBuild/CMake/External_png.cmake
+++ SuperBuild/CMake/External_png.cmake
@@ -22,7 +22,7 @@
   -DPNG_STATIC:BOOL=OFF
   -DPNG_SHARED:BOOL=ON
   -DPNG_TESTS:BOOL=OFF
-  -DVERSIONED_OUTPUT_LIB:BOOL=ON
+  -DVERSIONED_OUTPUT_LIB:BOOL=OFF
   -DSKIP_INSTALL_FILES:BOOL=ON
   -DSKIP_INSTALL_EXECUTABLES:BOOL=OFF
   ${PNG_SB_CONFIG}


Fix OSX missing -Wno-undefined-var-template

--- setup.cmake
+++ setup.cmake
@@ -15,7 +15,7 @@

 IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
 #OSX CLANG
-add_compile_options(-Weverything -Wno-deprecated-declarations -Wno-padded -Wno-c++98-compat-pedantic -Wno-global-constructors -Wno-exit-time-destructors -Wno-newline-eof -Wno-weak-vtables -Wno-weak-template-vtables -Wno-missing-prototypes -Wno-reserved-id-macro -Wno-unused-private-field)
+add_compile_options(-Weverything -Wno-deprecated-declarations -Wno-padded -Wno-c++98-compat-pedantic -Wno-global-constructors -Wno-exit-time-destructors -Wno-newline-eof -Wno-weak-vtables -Wno-weak-template-vtables -Wno-missing-prototypes -Wno-reserved-id-macro -Wno-unused-private-field -Wno-undefined-var-template)
 ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
 IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
 IF(${CMAKE_CXX_COMPILER} MATCHES ".*clang\\+\\+")


* Fixed python to be found from NAALI_DEPS_PATH

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@1311 5b2332b8-efa3-11de-8684-7d64432d61a3

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -78,6 +78,13 @@
         set (PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH})
         #unset (PYTHON_DEBUG_LIBRARIES ${PYTHON_DEBUG_LIBRARY})
     endif ()
+
+	if (MSVC)
+		set (PYTHON_LIBRARY_DIRS ${ENV_NAALI_DEP_PATH}/Python/lib)
+		set (PYTHON_INCLUDE_DIRS ${ENV_NAALI_DEP_PATH}/Python/include)
+		set (PYTHON_LIBRARIES python26)
+		set (PYTHON_DEBUG_LIBRARIES python26_d)
+	endif()

 endmacro (configure_python)


Silence discovery output

Silence discovery output

--- cmake/Modules/_CppUTestDiscovery.cmake
+++ cmake/Modules/_CppUTestDiscovery.cmake
@@ -71,17 +71,14 @@
     string(REGEX MATCH "^([^/.]+)" groupname ${testfullname})
     string(REGEX MATCH "([^/.]+)$" testname ${testfullname})
     if (NOT ("${groupname}" STREQUAL "${lastgroup}"))
-      message("TestGroup: ${groupname}:")
       set(lastgroup "${groupname}")
     endif (NOT ("${groupname}" STREQUAL "${lastgroup}"))
-    message("... ${testname}")
     buildtime_add_test(${EXECUTABLE_SHORT_NAME}.${testfullname} ${EMULATOR} ${EXECUTABLE} -sg ${groupname} -sn ${testname})
   endforeach()
 else (TESTS_DETAILED)
   set(DISCOVER_ARG "-lg")
   buildtime_discover_tests("${EXECUTABLE}" "${DISCOVER_ARG}" TestList_Groups)
   foreach(group ${TestList_Groups})
-    message("TestGroup: ${group}")
     buildtime_add_test(${EXECUTABLE_SHORT_NAME}.${group} ${EMULATOR} "${EXECUTABLE}" -sg ${group})
   endforeach()
 endif (TESTS_DETAILED)


- исправлена перекомпиляция

 - исправлена перекомпиляция

git-svn-id: 41bd7e47c31e4d43f97241d7529f6785d233c6d8@12169 23f926e6-80f1-49ca-85a0-60d4a27bb3ac

--- rdo/packages/cmake/trunk/bison.cmake
+++ rdo/packages/cmake/trunk/bison.cmake
@@ -18,7 +18,7 @@
 		OUTPUT ${GRAMMA_PATH}/rdogram${FILE_TYPE}.cpp ${GRAMMA_PATH}/rdogram${FILE_TYPE}.hpp
 		COMMAND set CYGWIN=nodosfilewarning
 		COMMAND set BISON_PKGDATADIR=${BISON_FLEX_DIRECTORY}/share/bison
-		COMMAND ${BISON_EXECUTABLE} ARGS -g -v ${BISON_DEFINE} -p${BISON_NAME} -o ${GRAMMA_PATH}/rdogram${FILE_TYPE}.cpp ${GRAMMA_PATH}/rdo${FILE_TYPE}.y
+		COMMAND ${BISON_EXECUTABLE} ARGS -g -v ${BISON_DEFINE} -p${BISON_NAME} -d -o ${GRAMMA_PATH}/rdogram${FILE_TYPE}.cpp ${GRAMMA_PATH}/rdo${FILE_TYPE}.y
 		DEPENDS ${GRAMMA_PATH}/rdo${FILE_TYPE}.y
 		COMMENT "[BISON][rdo${FILE_TYPE}] Building parser with bison ${BISON_VERSION}"
 		WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}


cpack: install debian copyright file on debian based distros

--- scripts/cmake/ElektraPackaging.cmake
+++ scripts/cmake/ElektraPackaging.cmake
@@ -339,6 +339,14 @@
 		)
 		set (CPACK_DEBIAN_LIBELEKTRA4-ALL_PACKAGE_RECOMMENDS "elektra-tests, elektra-doc, libelektra-dev") # add all .ddeb packages?

+		# install copyright file
+		foreach(component ${CPACK_COMPONENTS_ALL})
+			install (
+				FILES "${CMAKE_SOURCE_DIR}/scripts/packaging/copyright"
+				COMPONENT ${component}
+				DESTINATION "share/doc/${component}/")
+		endforeach()
+
 		# build debug package for each component
 		set (CPACK_DEBIAN_DEBUGINFO_PACKAGE "ON")


Add missing module that tests depend on.

Change-Id: I01dc3137d4f2323d07cca1442b64613eedc258fc

--- Filters/Parallel/module.cmake
+++ Filters/Parallel/module.cmake
@@ -13,4 +13,5 @@
     vtkRenderingParallel
     vtkFiltersParallelMPI
     vtkFiltersParallelImaging
+    vtkIOLegacy
   )


Multiple LEMON library naming hints.

Multiple LEMON library naming hints.

--- src/cmakeFindModules/FindLemon.cmake
+++ src/cmakeFindModules/FindLemon.cmake
@@ -41,7 +41,7 @@

   SET(LEMON_INCLUDE_DIR ${LEMON_DIR})

-  FIND_LIBRARY(LEMON_LIBRARY NAMES Lemon)
+  FIND_LIBRARY(LEMON_LIBRARY NAMES Lemon lemon emon)

   # locate Lemon libraries
   IF(DEFINED LEMON_LIBRARY)


New version: 0.4.7

New version: 0.4.7

--- hawkey/VERSION.cmake
+++ hawkey/VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "4")
-SET(HAWKEY_PATCH "6")
+SET(HAWKEY_PATCH "7")


Adding an automatically generated shell script to upload the source distribution to the web server.

--- Resources/CPack/PackageProject.cmake
+++ Resources/CPack/PackageProject.cmake
@@ -7,17 +7,17 @@
 #///////////////////////////////////////////////////////////////////////////////

-# ------------------------------------------------------------------------------
+# ------------------------------------------------------------------------------
 # This CMake code sets up for CPack to be used to generate native installers
 # ------------------------------------------------------------------------------
 if (MSVC)
     # Skip the install rules, we only want to gather a list of the system libraries
     SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP 1)
     #SET(CMAKE_INSTALL_DEBUG_LIBRARIES OFF)
-
+
     # Gather the list of system level runtime libraries
     INCLUDE (InstallRequiredSystemLibraries)
-
+
     # Our own Install rule for Release builds of the MSVC runtime libs
     IF (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
       INSTALL(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
@@ -66,15 +66,15 @@
     # anything else then you need to update this.
     set (UPLOAD_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}.tar.gz)
 elseif(WIN32)
-	if ( "${CMAKE_SIZEOF_VOID_P}" EQUAL "8" )
-		set(CPACK_PACKAGE_FILE_NAME "TomoGui-${TomoEngine_VERSION_SHORT}-Win64")
-		set (UPLOAD_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}.zip)
-	elseif( "${CMAKE_SIZEOF_VOID_P}" EQUAL "4" )
-		set(CPACK_PACKAGE_FILE_NAME "TomoGui-${TomoEngine_VERSION_SHORT}-Win32")
-		set (UPLOAD_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}.zip)
-	else()
-	    set(CPACK_PACKAGE_FILE_NAME "TomoGui-${TomoEngine_VERSION_SHORT}-Unknown")
-	    set (UPLOAD_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}.zip)
+  if ( "${CMAKE_SIZEOF_VOID_P}" EQUAL "8" )
+    set(CPACK_PACKAGE_FILE_NAME "TomoGui-${TomoEngine_VERSION_SHORT}-Win64")
+    set (UPLOAD_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}.zip)
+  elseif( "${CMAKE_SIZEOF_VOID_P}" EQUAL "4" )
+    set(CPACK_PACKAGE_FILE_NAME "TomoGui-${TomoEngine_VERSION_SHORT}-Win32")
+    set (UPLOAD_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}.zip)
+  else()
+      set(CPACK_PACKAGE_FILE_NAME "TomoGui-${TomoEngine_VERSION_SHORT}-Unknown")
+      set (UPLOAD_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}.zip)
     endif()
 else()
   set(CPACK_PACKAGE_FILE_NAME "TomoGui-${TomoEngine_VERSION_SHORT}-${CMAKE_SYSTEM_NAME}")
@@ -84,15 +84,15 @@

 set (TomoEngine_WEBSITE_SERVER "www.bluequartz.net")
 set (TomoEngine_WEBSITE_SERVER_PATH "/var/www/www.bluequartz.net/binaries/to81/.")
-set (TomoEngine_WEBSITE_SCP_USERNAME "mjackson")
+set (TomoEngine_WEBSITE_SCP_USERNAME "mjackson")
 #-- Create a bash script file that will upload the latest version to the web server
-configure_file(${PROJECT_RESOURCES_DIR}/upload.sh.in
-               ${PROJECT_BINARY_DIR}/upload.sh)
+configure_file(${PROJECT_RESOURCES_DIR}/upload.sh.in
+               ${PROJECT_BINARY_DIR}/upload.sh)

 set (TomoEngine_WEBSITE_SERVER_PATH "/var/www/www.openmbir.org/binaries/.")
-configure_file(${PROJECT_RESOURCES_DIR}/upload.sh.in
-${PROJECT_BINARY_DIR}/web_upload.sh)
-
+configure_file(${PROJECT_RESOURCES_DIR}/upload.sh.in
+${PROJECT_BINARY_DIR}/web_upload.sh)
+
 # Create an NSIS based installer for Windows Systems
 IF(WIN32 AND NOT UNIX)
   # There is a bug in NSIS that does not handle full unix paths properly. Make
@@ -124,6 +124,12 @@

 SET(CPACK_SOURCE_GENERATOR "ZIP")
 SET(CPACK_SOURCE_PACKAGE_FILE_NAME "TomoGui-${TomoEngine_VERSION_SHORT}-Source")
+
+#-- Create a bash script file that will upload the latest version to the web server
+set (UPLOAD_FILE_NAME ${CPACK_SOURCE_PACKAGE_FILE_NAME}.zip)
+configure_file(${PROJECT_RESOURCES_DIR}/upload.sh.in
+               ${PROJECT_BINARY_DIR}/src_upload.sh)
+
 SET(CPACK_SOURCE_TOPLEVEL_TAG "Source")
 SET(CPACK_IGNORE_FILES "/i386/;/x64/;/VS2008/;/zRel/;/Build/;/\\\\.git/;\\\\.*project")
 SET(CPACK_SOURCE_IGNORE_FILES "/i386/;/x64/;/VS2008/;/zRel/;/Build/;/\\\\.git/;\\\\.*project")


Turn off warnings as errors by default

Turn off warnings as errors by default

To make things easier for un-supported platfroms, keep warnings as
warnings by default, expecially as we near a release. This, for example,
allows a new user on Ubuntu 14.04 to build OSS. There are a couple
warnings there.

--- CMake/SurgSimBuildFlags.cmake
+++ CMake/SurgSimBuildFlags.cmake
@@ -31,7 +31,7 @@
 # Define our own debug symbol
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DOSS_DEBUG")

-option(SURGSIM_WARNINGS_AS_ERRORS "Treat warnings as errors in the compilation process" ON)
+option(SURGSIM_WARNINGS_AS_ERRORS "Treat warnings as errors in the compilation process" OFF)

 # G++ (C++ compilation) specific settings
 if(CMAKE_COMPILER_IS_GNUCXX)


Updated MITK-Data revision tag.

Updated MITK-Data revision tag.

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

 if(BUILD_TESTING)

-  set(revision_tag 4a49a318)
+  set(revision_tag 7c04beab)
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


FindOGITOR CMake script now works - on Windows :p

--- CMakeModules/FindOGITOR.cmake
+++ CMakeModules/FindOGITOR.cmake
@@ -13,20 +13,22 @@
 #  OGITOR_LIBRARIES - link these to use Ogitor

 include(FindPkgMacros)
+include(PreprocessorUtils)
 findpkg_begin(OGITOR)

 # Get path, convert backslashes as ${ENV_${var}}
 getenv_path(OGITOR_HOME)

 # construct search paths
-set(OGITOR_PREFIX_PATH ${OGITOR_HOME}/Ogitor ${ENV_OGITOR_HOME} /home/jacmoe/programming/ogitor/Ogitor /usr/local /usr/local/include /usr/local/lib /usr/include /usr/lib /usr/local/include/ogitor /usr/include/ogitor /usr/lib/ogitor /usr/local/lib/ogitor /home/jacmoe/programming/ogitor/build)
+set(OGITOR_PREFIX_PATH ${OGITOR_HOME} ${ENV_OGITOR_HOME} /usr/local /usr/local/include /usr/local/lib /usr/include /usr/lib /usr/local/include/ogitor /usr/include/ogitor /usr/lib/ogitor /usr/local/lib/ogitor)
 create_search_paths(OGITOR)
 # redo search if prefix path changed
 clear_if_changed(OGITOR_PREFIX_PATH
   OGITOR_LIBRARY_REL
   OGITOR_LIBRARY_DBG
   OGITOR_INCLUDE_DIR
-)
+  OGITOR_LIBRARIES
+  )

 set(OGITOR_LIBRARY_NAMES Ogitor)
 get_debug_names(OGITOR_LIBRARY_NAMES)
@@ -40,5 +42,41 @@
 find_library(OGITOR_LIBRARY_DBG NAMES ${OGITOR_LIBRARY_NAMES_DBG} HINTS ${OGITOR_LIB_SEARCH_PATH} ${OGITOR_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug)
 make_library_set(OGITOR_LIBRARY)

+if(OGITOR_INCLUDE_DIR AND OGITOR_LIBRARY_REL AND OGITOR_LIBRARY_DBG)
+	set(OGITOR_FOUND TRUE)
+endif(OGITOR_INCLUDE_DIR AND OGITOR_LIBRARY_REL AND OGITOR_LIBRARY_DBG)
+set(OGITOR_LIBRARIES ${OGITOR_LIBRARY_REL} ${OGITOR_LIBRARY_DBG})
+set(OGITOR_LIBRARIES ${OGITOR_LIBRARIES} CACHE STRING "Ogitor libraries")
+set(OGITOR_INCLUDE_DIRS ${OGITOR_INCLUDE_DIR})
+
 findpkg_finish(OGITOR)
+
 add_parent_dir(OGITOR_INCLUDE_DIRS OGITOR_INCLUDE_DIR)
+set(OGITOR_DEPENDENCY_INCLUDE_DIR "${OGITOR_INCLUDE_DIRS}/dependencies/include" CACHE STRING "Ogitor dependency include dir")
+set(OGITOR_DEPENDENCY_LIB_DIR "${OGITOR_INCLUDE_DIRS}/dependencies/lib" CACHE STRING "Ogitor dependency library dir")
+
+# Dependencies
+set(OGITOR_DEPENDENCIES_INCLUDES
+    "${OGITOR_DEPENDENCY_INCLUDE_DIR}/PagedGeometry"
+    "${OGITOR_DEPENDENCY_INCLUDE_DIR}/Caelum-0.5.0/main"
+    "${OGITOR_DEPENDENCY_INCLUDE_DIR}/HYDRAX/Hydrax/src/Hydrax"
+    "${OGITOR_DEPENDENCY_INCLUDE_DIR}/SkyX"
+    "${OGITOR_DEPENDENCY_INCLUDE_DIR}/MeshMagick"
+    "${OGITOR_DEPENDENCY_INCLUDE_DIR}/Angelscript"
+    #"${OGITOR_DEPENDENCY_INCLUDE_DIR}/lua/src"
+    "${OGITOR_DEPENDENCY_INCLUDE_DIR}/Angelscript/add_on/autowrapper"
+    "${OGITOR_DEPENDENCY_INCLUDE_DIR}/Angelscript/add_on/scriptbuilder"
+    "${OGITOR_DEPENDENCY_INCLUDE_DIR}/Angelscript/add_on/scriptstdstring"
+    "${OGITOR_DEPENDENCY_INCLUDE_DIR}/Angelscript/add_on/scriptmath"
+    "${OGITOR_DEPENDENCY_INCLUDE_DIR}/Angelscript/add_on/scriptarray"
+    "${OGITOR_DEPENDENCY_INCLUDE_DIR}/Angelscript/add_on/quaternion"
+    "${OGITOR_DEPENDENCY_INCLUDE_DIR}/Angelscript/add_on/vector3"
+    "${OGITOR_DEPENDENCY_INCLUDE_DIR}/Angelscript/add_on/debugger"
+    "${OGITOR_DEPENDENCY_INCLUDE_DIR}/OFS"
+    "${OGITOR_DEPENDENCY_INCLUDE_DIR}/GenericTextEditor"
+    "${OGITOR_DEPENDENCY_INCLUDE_DIR}/GenericImageEditor"
+    )
+	set(OGITOR_DEPENDENCIES_INCLUDES ${OGITOR_DEPENDENCIES_INCLUDES} CACHE STRING "Ogitor dependency includes")
+message(STATUS "${OGITOR_DEPENDENCIES_INCLUDES} OGITOR_DEPENDENCIES_INCLUDES.")
+message(STATUS "${OGITOR_DEPENDENCY_INCLUDE_DIR} OGITOR_DEPENDENCY_INCLUDE_DIR.")
+message(STATUS "${OGITOR_DEPENDENCY_LIB_DIR} OGITOR_DEPENDENCY_LIB_DIR.")


ENH: Generalize itk_module_use interface in ITKModuleMacros

Allow multiple modules to be used in a single call.  Replace loops
containing calls with calls passing all items previously iterated.
Factor module information file loading into a new itk_module_load macro.

--- CMake/ITKModuleMacros.cmake
+++ CMake/ITKModuleMacros.cmake
@@ -1,4 +1,35 @@
 get_filename_component(_ITKModuleMacros_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+
+macro(_itk_module_use_recurse mod)
+  if(NOT ${dep}_USED)
+    set(${mod}_USED 1)
+    itk_module_load("${mod}")
+    foreach(dep IN LISTS ${mod}_DEPENDS)
+      _itk_module_use_recurse(${dep})
+    endforeach()
+    if(${mod}_INCLUDE_DIRS)
+      include_directories(${${mod}_INCLUDE_DIRS})
+    endif()
+    if(${mod}_LIBRARY_DIRS)
+      link_directories(${${mod}_LIBRARY_DIRS})
+    endif()
+  endif()
+endmacro()
+
+macro(itk_module_load mod)
+  if(NOT ${mod}_LOADED)
+    include("${ITK_MODULES_DIR}/${mod}.cmake" OPTIONAL)
+    if(NOT ${mod}_LOADED)
+      message(FATAL_ERROR "No such module: \"${mod}\"")
+    endif()
+  endif()
+endmacro()
+
+macro(itk_module_use)
+  foreach(mod ${ARGN})
+    _itk_module_use_recurse("${mod}")
+  endforeach()
+endmacro()

 macro(itk_module _name)
   set(itk-module ${_name})
@@ -30,24 +61,6 @@
   list(SORT ITK_MODULE_${itk-module-test}_DEPENDS) # Deterministic order.
 endmacro()

-macro(itk_module_use mod)
-  set(${mod}_USED 1)
-  if(NOT ${mod}_LOADED)
-    include("${ITK_MODULES_DIR}/${mod}.cmake")
-  endif()
-  foreach(dep IN LISTS ${mod}_DEPENDS)
-    if(NOT ${dep}_USED)
-      itk_module_use(${dep})
-    endif()
-  endforeach()
-  if(${mod}_INCLUDE_DIRS)
-    include_directories(${${mod}_INCLUDE_DIRS})
-  endif()
-  if(${mod}_LIBRARY_DIRS)
-    link_directories(${${mod}_LIBRARY_DIRS})
-  endif()
-endmacro()
-
 macro(itk_module_impl)
   include(itk-module.cmake) # Load module meta-data
   set(${itk-module}_INSTALL_RUNTIME_DIR ${ITK_INSTALL_RUNTIME_DIR})
@@ -55,11 +68,7 @@
   set(${itk-module}_INSTALL_ARCHIVE_DIR ${ITK_INSTALL_ARCHIVE_DIR})
   set(${itk-module}_INSTALL_INCLUDE_DIR ${ITK_INSTALL_INCLUDE_DIR})

-  foreach(dep IN LISTS ITK_MODULE_${itk-module}_DEPENDS)
-    if(NOT ${dep}_USED)
-      itk_module_use(${dep})
-    endif()
-  endforeach()
+  itk_module_use(${ITK_MODULE_${itk-module}_DEPENDS})

   if(NOT DEFINED ${itk-module}_LIBRARIES)
     set(${itk-module}_LIBRARIES "")
@@ -111,10 +120,8 @@
 macro(itk_module_test)
   include(../itk-module.cmake) # Load module meta-data
   set(${itk-module-test}_LIBRARIES "")
+  itk_module_use(${ITK_MODULE_${itk-module-test}_DEPENDS})
   foreach(dep IN LISTS ITK_MODULE_${itk-module-test}_DEPENDS)
-    if(NOT ${dep}_USED)
-      itk_module_use(${dep})
-    endif()
     list(APPEND ${itk-module-test}_LIBRARIES "${${dep}_LIBRARIES}")
   endforeach()
 endmacro()


Added gdal/gdal.h to header search path, and gdal1.4.1 to the lib search path.

--- CMakeModules/FindGDAL.cmake
+++ CMakeModules/FindGDAL.cmake
@@ -9,7 +9,7 @@
 #
 # Created by Robert Osfield.

-FIND_PATH(GDAL_INCLUDE_DIR gdal.h
+FIND_PATH(GDAL_INCLUDE_DIR gdal.h gdal/gdal.h
         ${GDAL_DIR}/include
     $ENV{GDAL_DIR}/include
     $ENV{GDAL_DIR}
@@ -29,7 +29,7 @@
 )

 FIND_LIBRARY(GDAL_LIBRARY
-    NAMES gdal gdal_i gdal1.4.0 gdal1.3.2
+    NAMES gdal gdal_i gdal1.4.0 gdal1.4.1 gdal1.3.2
     PATHS
     ${GDAL_DIR}/lib
     $ENV{GDAL_DIR}/lib


Bump version to 0.11.1

Bump version to 0.11.1

--- CMake_version_options.cmake
+++ CMake_version_options.cmake
@@ -4,7 +4,7 @@
 ## Version information
 set(HOOMD_VERSION_MAJOR "0")
 set(HOOMD_VERSION_MINOR "11")
-set(HOOMD_VERSION_PATCH "0")
+set(HOOMD_VERSION_PATCH "1")
 set(HOOMD_VERSION "${HOOMD_VERSION_MAJOR}.${HOOMD_VERSION_MINOR}.${HOOMD_VERSION_PATCH}")

 # users may not have git installed, or this may be a tarball build - set a dummy version if that is the case


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/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   08)
+SET(KWSYS_DATE_STAMP_DAY   09)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

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


Update ITK superbuild version to 4.12.1

Update ITK superbuild version to 4.12.1

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

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


COMP: ITK_USE_REVIEW -> Module_ITKReview.

ITK_USE_REVIEW is deprecated for Module_ITKReview.

Issue SIMPLEITK-414.

Change-Id: I8f75adcc2fac018fd69c2521e1f11419b7e2f398

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -57,7 +57,7 @@
   -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
   -DITK_LEGACY_REMOVE:BOOL=ON
   -DITK_BUILD_ALL_MODULES:BOOL=ON
-  -DITK_USE_REVIEW:BOOL=ON
+  -DModule_ITKReview:BOOL=ON
   -DITK_WRAP_float:BOOL=ON
   -DITK_WRAP_unsigned_char:BOOL=ON
   -DITK_WRAP_signed_short:BOOL=ON


Update ITK version to after 5.3rc02

Update ITK version to after 5.3rc02

This include a number of compilation warning fixes and a fix to the
windows linking error.

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

-set(_DEFAULT_ITK_GIT_TAG "v5.3rc02")
+set(_DEFAULT_ITK_GIT_TAG "af32a779c4586304e52ddc27eb81656b949c9eeb")
 set(ITK_GIT_TAG "${_DEFAULT_ITK_GIT_TAG}" CACHE STRING "Tag in ITK git repo")
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")


ENH: Bump ITK Superbuild tag to 4.6.0.

ENH: Bump ITK Superbuild tag to 4.6.0.

Change-Id: If7f7f04c7f70568c6aedea6e3a1847ae77c2517f

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

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

 set( _vtk_args )


Added mingw support. (6)

Added mingw support. (6)

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -70,11 +70,8 @@
             endif()
             if($ENV{CC} STREQUAL "x86_64-w64-mingw32-gcc" )
                 set(CC_ARCH "x86_64")
-                list(APPEND CONFIGURE_OPTIONS "OPTIONS -DCMAKE_TOOLCHAIN_FILE=ci-tools/toolchain/toolchain-x86_64-w64-mingw32.cmake")
             elseif($ENV{CC} STREQUAL "i686-w64-mingw32-gcc")
-                set(CC_ARCH "x86")
-                list(APPEND CONFIGURE_OPTIONS "OPTIONS -DCMAKE_TOOLCHAIN_FILE=ci-tools/toolchain/toolchain-i686-w64-mingw32.cmake")
-            endif()
+                set(CC_ARCH "x86")            endif()
             #Warmup wine or test timings are going to be wrong
             exec_program(wine ARGS version OUTPUT_VARIABLE WINE_VERSION)
         endif()
@@ -165,7 +162,13 @@
 ctest_start(Continuous)
 ctest_update()
 ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-ctest_configure(${CONFIGURE_OPTIONS})
+if(CC_NAME STREQUAL "mingw" AND CC_ARCH STREQUAL "x86_64")
+    ctest_configure(OPTIONS "-DCMAKE_TOOLCHAIN_FILE=ci-tools/toolchain/toolchain-x86_64-w64-mingw32.cmake")
+elseif(CC_NAME STREQUAL "mingw" AND CC_ARCH STREQUAL "x86")
+    ctest_configure(OPTIONS "-DCMAKE_TOOLCHAIN_FILE=ci-tools/toolchain/toolchain-i686-w64-mingw32.cmake")
+else()
+    ctest_configure()
+endif()
 ctest_build()
 ctest_test()
 ctest_submit(PARTS Start Update Configure Build Test Upload Submit)
@@ -266,7 +269,13 @@
     ctest_start(Continuous)
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-    ctest_configure(${CONFIGURE_OPTIONS})
+    if(CC_NAME STREQUAL "mingw" AND CC_ARCH STREQUAL "x86_64")
+        ctest_configure(OPTIONS "-DCMAKE_TOOLCHAIN_FILE=ci-tools/toolchain/toolchain-x86_64-w64-mingw32.cmake")
+    elseif(CC_NAME STREQUAL "mingw" AND CC_ARCH STREQUAL "x86")
+        ctest_configure(OPTIONS "-DCMAKE_TOOLCHAIN_FILE=ci-tools/toolchain/toolchain-i686-w64-mingw32.cmake")
+    else()
+        ctest_configure()
+    endif()
     ctest_build()
     ctest_test()
     ctest_memcheck()


Changes by K. Smith (ksmith37@nd.edu) to properly handle include files in ROOT_GENERATE_DICTIONARY() macro See https://root.cern.ch/phpBB3/viewtopic.php?f=3&t=17589

--- etc/cmake/FindROOT.cmake
+++ etc/cmake/FindROOT.cmake
@@ -5,7 +5,9 @@
 # ROOT_INCLUDE_DIR    PATH to the include directory
 # ROOT_LIBRARIES      Most common libraries
 # ROOT_LIBRARY_DIR    PATH to the library directory
-
+#
+# Updated by K. Smith (ksmith37@nd.edu) to properly handle
+#  dependncies in ROOT_GENERATE_DICTIONARY

 find_program(ROOT_CONFIG_EXECUTABLE root-config
   PATHS $ENV{ROOTSYS}/bin)
@@ -38,17 +40,15 @@
   #set(ROOT_LIBRARIES ${ROOT_LIBRARIES} -lThread -lMinuit -lHtml -lVMC -lEG -lGeom -lTreePlayer -lXMLIO -lProof)
   #set(ROOT_LIBRARIES ${ROOT_LIBRARIES} -lProofPlayer -lMLP -lSpectrum -lEve -lRGL -lGed -lXMLParser -lPhysics)
   set(ROOT_LIBRARY_DIR ${ROOTSYS}/lib)
-
-  # Make variables changeble to the advanced user
-  mark_as_advanced(ROOT_CONFIG_EXECUTABLE)
-
-  if(NOT ROOT_FIND_QUIETLY)
-    message(STATUS "Found ROOT ${ROOT_VERSION} in ${ROOTSYS}")
-  endif()
 endif()

+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(ROOT DEFAULT_MSG ROOT_CONFIG_EXECUTABLE
+    ROOTSYS ROOT_VERSION ROOT_INCLUDE_DIR ROOT_LIBRARIES	ROOT_LIBRARY_DIR)

-include(CMakeMacroParseArguments)
+mark_as_advanced(ROOT_CONFIG_EXECUTABLE)
+
+include(CMakeParseArguments)
 find_program(ROOTCINT_EXECUTABLE rootcint PATHS $ENV{ROOTSYS}/bin)
 find_program(GENREFLEX_EXECUTABLE genreflex PATHS $ENV{ROOTSYS}/bin)
 find_package(GCCXML)
@@ -60,6 +60,12 @@
 #                                    OPTIONS opt1...)
 function(ROOT_GENERATE_DICTIONARY dictionary)
   CMAKE_PARSE_ARGUMENTS(ARG "" "" "LINKDEF;OPTIONS" "" ${ARGN})
+  #---Get the list of include directories------------------
+  get_directory_property(incdirs INCLUDE_DIRECTORIES)
+  set(includedirs)
+  foreach( d ${incdirs})
+  	set(includedirs ${includedirs} -I${d})
+  endforeach()
   #---Get the list of header files-------------------------
   set(headerfiles)
   foreach(fp ${ARG_UNPARSED_ARGUMENTS})
@@ -67,37 +73,29 @@
     if(files)
       foreach(f ${files})
         if(NOT f MATCHES LinkDef)
-          set(headerfiles ${headerfiles} ${f})
+          find_file(headerFile ${f} PATHS ${incdirs})
+          set(headerfiles ${headerfiles} ${headerFile})
+          unset(headerFile CACHE)
         endif()
       endforeach()
     else()
-      set(headerfiles ${headerfiles} ${fp})
+      find_file(headerFile ${fp} PATHS ${incdirs})
+      set(headerfiles ${headerfiles} ${headerFile})
+      unset(headerFile CACHE)
     endif()
-  endforeach()
-  #---Get the list of include directories------------------
-  get_directory_property(incdirs INCLUDE_DIRECTORIES)
-  set(includedirs)
-  foreach( d ${incdirs})
-   set(includedirs ${includedirs} -I${d})
   endforeach()
   #---Get LinkDef.h file------------------------------------
   set(linkdefs)
   foreach( f ${ARG_LINKDEF})
-    if( IS_ABSOLUTE ${f})
-      set(linkdefs ${linkdefs} ${f})
-    else()
-      if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/inc/${f})
-        set(linkdefs ${linkdefs} ${CMAKE_CURRENT_SOURCE_DIR}/inc/${f})
-      else()
-        set(linkdefs ${linkdefs} ${CMAKE_CURRENT_SOURCE_DIR}/${f})
-      endif()
-    endif()
+    find_file(linkFile ${f} PATHS ${incdirs})
+    set(linkdefs ${linkdefs} ${linkFile})
+    unset(linkFile CACHE)
   endforeach()
   #---call rootcint------------------------------------------
   add_custom_command(OUTPUT ${dictionary}.cxx ${dictionary}.h
                      COMMAND ${ROOTCINT_EXECUTABLE} -cint -f  ${dictionary}.cxx
                                           -c ${ARG_OPTIONS} ${includedirs} ${headerfiles} ${linkdefs}
-                     DEPENDS ${headerfiles} ${linkdefs})
+                     DEPENDS ${headerfiles} ${linkdefs} VERBATIM)
 endfunction()

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


modules: cleanup.

modules: cleanup.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -335,7 +335,7 @@
     endif()

     # Applications
-    if(${component} MATCHES .+Application)
+    if(${component} MATCHES ".+Application")
         set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_SUFFIX Magnum/Platform)

         # Android application dependencies
@@ -400,7 +400,7 @@
             ${_WINDOWCONTEXT_MAGNUM_LIBRARIES_DEPENDENCY})

     # Context libraries
-    elseif(${component} MATCHES .+Context)
+    elseif(${component} MATCHES ".+Context")
         set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_SUFFIX Magnum/Platform)
         set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES Context.h)

@@ -437,6 +437,8 @@
             unset(MAGNUM_${_COMPONENT}_LIBRARY)
         endif()

+    # No special setup for DebugTools library
+
     # Mesh tools library
     elseif(${component} STREQUAL MeshTools)
         set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES CompressIndices.h)
@@ -445,13 +447,17 @@
     elseif(${component} STREQUAL Primitives)
         set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES Cube.h)

+    # No special setup for SceneGraph library
+    # No special setup for Shaders library
+    # No special setup for Shapes library
+    # No special setup for Text library
+
     # TextureTools library
     elseif(${component} STREQUAL TextureTools)
         set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES Atlas.h)
     endif()

-    # The plugins don't have any dependencies, nothing additional to do for
-    # them
+    # No special setup for plugins

     # Try to find the includes
     if(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES)
@@ -476,7 +482,7 @@

         # Global aliases for Windowless*Application and *Application
         # components. If already set, unset them to avoid ambiguity.
-        if(${component} MATCHES Windowless.+Application)
+        if(${component} MATCHES "Windowless.+Application")
             if(NOT DEFINED MAGNUM_WINDOWLESSAPPLICATION_LIBRARIES AND NOT DEFINED MAGNUM_WINDOWLESSAPPLICATION_INCLUDE_DIRS)
                 set(MAGNUM_WINDOWLESSAPPLICATION_LIBRARIES ${MAGNUM_${_COMPONENT}_LIBRARIES})
                 set(MAGNUM_WINDOWLESSAPPLICATION_INCLUDE_DIRS ${MAGNUM_${_COMPONENT}_INCLUDE_DIRS})
@@ -484,7 +490,7 @@
                 unset(MAGNUM_WINDOWLESSAPPLICATION_LIBRARIES)
                 unset(MAGNUM_WINDOWLESSAPPLICATION_INCLUDE_DIRS)
             endif()
-        elseif(${component} MATCHES .+Application)
+        elseif(${component} MATCHES ".+Application")
             if(NOT DEFINED MAGNUM_APPLICATION_LIBRARIES AND NOT DEFINED MAGNUM_APPLICATION_INCLUDE_DIRS)
                 set(MAGNUM_APPLICATION_LIBRARIES ${MAGNUM_${_COMPONENT}_LIBRARIES})
                 set(MAGNUM_APPLICATION_INCLUDE_DIRS ${MAGNUM_${_COMPONENT}_INCLUDE_DIRS})
@@ -496,7 +502,7 @@

         # Global aliases for *Context components. If already set, unset them to
         # avoid ambiguity.
-        if(${component} MATCHES .+Context)
+        if(${component} MATCHES ".+Context")
             if(NOT DEFINED MAGNUM_CONTEXT_LIBRARIES AND NOT DEFINED MAGNUM_CONTEXT_INCLUDE_DIRS)
                 set(MAGNUM_CONTEXT_LIBRARIES ${MAGNUM_${_COMPONENT}_LIBRARIES})
                 set(MAGNUM_CONTEXT_INCLUDE_DIRS ${MAGNUM_${_COMPONENT}_INCLUDE_DIRS})


Add OpenSSL 1.0.2o

Add OpenSSL 1.0.2o

--- cmake/projects/OpenSSL/hunter.cmake
+++ cmake/projects/OpenSSL/hunter.cmake
@@ -85,6 +85,17 @@
     "https://github.com/openssl/openssl/archive/OpenSSL_1_1_0h.tar.gz"
     SHA1
     2168c88516556332ebaf7c31791132025a093c2b
+)
+
+hunter_add_version(
+    PACKAGE_NAME
+    OpenSSL
+    VERSION
+    "1.0.2o"
+    URL
+    "https://github.com/openssl/openssl/archive/OpenSSL_1_0_2o.tar.gz"
+    SHA1
+    ec7ad3650206f1045d48f2fe9ed4ad93a1228ec5
 )

 hunter_add_version(


[cmake] remove boost log by default

[cmake] remove boost log by default

--- cmake/siconos_find_common_dep.cmake
+++ cmake/siconos_find_common_dep.cmake
@@ -71,7 +71,7 @@
 # --- Boost ---
 compile_with(Boost 1.47 REQUIRED)

-SET(WITH_BOOST_LOG TRUE)
+#SET(WITH_BOOST_LOG TRUE)
 IF(WITH_BOOST_LOG)
   compile_with(Boost 1.47 COMPONENTS log  REQUIRED)
   APPEND_CXX_FLAGS("-DBOOST_LOG_DYN_LINK")


Fix windows build of nupic.core's Swig wraps that expects CAPNP_LITE not only to be defined (capnp recommends just defining it), but to actually have a value (non-zero).

--- external/CapnProto.cmake
+++ external/CapnProto.cmake
@@ -48,7 +48,7 @@

 if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
   set(CAPNP_CMAKE_DEFINITIONS -DCAPNP_LITE=1 -DEXTERNAL_CAPNP=1 -DBUILD_TOOLS=OFF)
-  set(CAPNP_COMPILER_DEFINITIONS ${CAPNP_COMPILER_DEFINITIONS} -DCAPNP_LITE)
+  set(CAPNP_COMPILER_DEFINITIONS ${CAPNP_COMPILER_DEFINITIONS} -DCAPNP_LITE=1)
   set(CAPNP_LINK_LIBRARIES ${capnproto_lib_capnp} ${capnproto_lib_kj})
 else()
   set(CAPNP_CMAKE_DEFINITIONS -DCAPNP_LITE=0)


Wrap include directories in BUILD_INTERFACE

This allows the jxl targets to be exported.
The current libjxl cmake build script does not do this yet,
but dependencies might.

e.g. SDL2_image is doing this

--- lib/jxl.cmake
+++ lib/jxl.cmake
@@ -400,10 +400,10 @@
 target_compile_options(jxl_dec-obj PUBLIC ${JPEGXL_COVERAGE_FLAGS})
 set_property(TARGET jxl_dec-obj PROPERTY POSITION_INDEPENDENT_CODE ON)
 target_include_directories(jxl_dec-obj PUBLIC
-  ${PROJECT_SOURCE_DIR}
-  ${CMAKE_CURRENT_SOURCE_DIR}/include
-  $<TARGET_PROPERTY:hwy,INTERFACE_INCLUDE_DIRECTORIES>
-  $<TARGET_PROPERTY:brotlicommon-static,INTERFACE_INCLUDE_DIRECTORIES>
+  "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>"
+  "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
+  "$<BUILD_INTERFACE:$<TARGET_PROPERTY:hwy,INTERFACE_INCLUDE_DIRECTORIES>>"
+  "$<BUILD_INTERFACE:$<TARGET_PROPERTY:brotlicommon-static,INTERFACE_INCLUDE_DIRECTORIES>>"
 )
 target_compile_definitions(jxl_dec-obj PUBLIC
   ${OBJ_COMPILE_DEFINITIONS}
@@ -470,9 +470,9 @@
 target_link_libraries(jxl_dec-static
   PUBLIC ${JPEGXL_COVERAGE_FLAGS} ${JPEGXL_DEC_INTERNAL_LIBS})
 target_include_directories(jxl_dec-static PUBLIC
-  "${PROJECT_SOURCE_DIR}"
-  "${CMAKE_CURRENT_SOURCE_DIR}/include"
-  "${CMAKE_CURRENT_BINARY_DIR}/include")
+  "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>"
+  "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
+  "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>")

 # The list of objects in the static and shared libraries.
 set(JPEGXL_INTERNAL_OBJECTS
@@ -491,9 +491,9 @@
 target_link_libraries(jxl-static
   PUBLIC ${JPEGXL_COVERAGE_FLAGS} ${JPEGXL_INTERNAL_LIBS})
 target_include_directories(jxl-static PUBLIC
-  "${PROJECT_SOURCE_DIR}"
-  "${CMAKE_CURRENT_SOURCE_DIR}/include"
-  "${CMAKE_CURRENT_BINARY_DIR}/include")
+  "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>"
+  "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
+  "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>")

 # JXL_EXPORT is defined to "__declspec(dllimport)" automatically by CMake
 # in Windows builds when including headers from the C API and compiling from
@@ -543,8 +543,8 @@
 target_link_libraries(jxl PRIVATE ${JPEGXL_INTERNAL_SHARED_LIBS})
 # Shared library include path contains only the "include/" paths.
 target_include_directories(jxl PUBLIC
-  "${CMAKE_CURRENT_SOURCE_DIR}/include"
-  "${CMAKE_CURRENT_BINARY_DIR}/include")
+  "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
+  "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>")
 set_target_properties(jxl PROPERTIES
   VERSION ${JPEGXL_LIBRARY_VERSION}
   SOVERSION ${JPEGXL_LIBRARY_SOVERSION}