[Conf] AirSched => AirTSP

[Conf] AirSched => AirTSP

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -389,9 +389,9 @@
       get_travelccm (${_arg_version})
     endif (${_arg_lower} STREQUAL "travelccm")

-    if (${_arg_lower} STREQUAL "airsched")
-      get_airsched (${_arg_version})
-    endif (${_arg_lower} STREQUAL "airsched")
+    if (${_arg_lower} STREQUAL "airtsp")
+      get_airtsp (${_arg_version})
+    endif (${_arg_lower} STREQUAL "airtsp")

     if (${_arg_lower} STREQUAL "airrac")
       get_airrac (${_arg_version})
@@ -691,28 +691,28 @@
 #    if the debug one is specified also include debug/optimized keywords
 #    in *_LIBRARIES variable
 function(_protobuf_find_libraries name filename)
-   find_library(${name}_LIBRARY
-       NAMES ${filename}
-       PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Release)
-   mark_as_advanced(${name}_LIBRARY)
-
-   find_library(${name}_LIBRARY_DEBUG
-       NAMES ${filename}
-       PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Debug)
-   mark_as_advanced(${name}_LIBRARY_DEBUG)
-
-   if(NOT ${name}_LIBRARY_DEBUG)
-      # There is no debug library
-      set(${name}_LIBRARY_DEBUG ${${name}_LIBRARY} PARENT_SCOPE)
-      set(${name}_LIBRARIES     ${${name}_LIBRARY} PARENT_SCOPE)
-   else()
-      # There IS a debug library
-      set(${name}_LIBRARIES
-          optimized ${${name}_LIBRARY}
-          debug     ${${name}_LIBRARY_DEBUG}
-          PARENT_SCOPE
+  find_library(${name}_LIBRARY
+    NAMES ${filename}
+    PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Release)
+  mark_as_advanced(${name}_LIBRARY)
+
+  find_library(${name}_LIBRARY_DEBUG
+    NAMES ${filename}
+    PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Debug)
+  mark_as_advanced(${name}_LIBRARY_DEBUG)
+
+  if(NOT ${name}_LIBRARY_DEBUG)
+    # There is no debug library
+    set(${name}_LIBRARY_DEBUG ${${name}_LIBRARY} PARENT_SCOPE)
+    set(${name}_LIBRARIES     ${${name}_LIBRARY} PARENT_SCOPE)
+  else()
+    # There IS a debug library
+    set(${name}_LIBRARIES
+      optimized ${${name}_LIBRARY}
+      debug     ${${name}_LIBRARY_DEBUG}
+      PARENT_SCOPE
       )
-   endif()
+  endif()
 endfunction()

 # ~~~~~~~~~~ Protobuf ~~~~~~~~~
@@ -1070,37 +1070,37 @@

 endmacro (get_travelccm)

-# ~~~~~~~~~~ AirSched ~~~~~~~~~
-macro (get_airsched)
+# ~~~~~~~~~~ AirTSP ~~~~~~~~~
+macro (get_airtsp)
   unset (_required_version)
   if (${ARGC} GREATER 0)
     set (_required_version ${ARGV0})
-    message (STATUS "Requires AirSched-${_required_version}")
+    message (STATUS "Requires AirTSP-${_required_version}")
   else (${ARGC} GREATER 0)
-    message (STATUS "Requires AirSched without specifying any version")
+    message (STATUS "Requires AirTSP without specifying any version")
   endif (${ARGC} GREATER 0)

-  find_package (AirSched ${_required_version} REQUIRED
-	HINTS ${WITH_AIRSCHED_PREFIX})
-  if (AirSched_FOUND)
+  find_package (AirTSP ${_required_version} REQUIRED
+	HINTS ${WITH_AIRTSP_PREFIX})
+  if (AirTSP_FOUND)
     #
-    message (STATUS "Found AirSched version: ${AIRSCHED_VERSION}")
+    message (STATUS "Found AirTSP version: ${AIRTSP_VERSION}")

     # Update the list of include directories for the project
-    include_directories (${AIRSCHED_INCLUDE_DIRS})
+    include_directories (${AIRTSP_INCLUDE_DIRS})

     # Update the list of dependencies for the project
-    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${AIRSCHED_LIBRARIES})
-
-  else (AirSched_FOUND)
-    set (ERROR_MSG "The AirSched library cannot be found. If it is installed")
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${AIRTSP_LIBRARIES})
+
+  else (AirTSP_FOUND)
+    set (ERROR_MSG "The AirTSP library cannot be found. If it is installed")
     set (ERROR_MSG "${ERROR_MSG} in a in a non standard directory, just invoke")
-    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_AIRSCHED_PREFIX=")
-    set (ERROR_MSG "${ERROR_MSG}<AirSched install path> variable.")
+    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_AIRTSP_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<AirTSP install path> variable.")
     message (FATAL_ERROR "${ERROR_MSG}")
-  endif (AirSched_FOUND)
-
-endmacro (get_airsched)
+  endif (AirTSP_FOUND)
+
+endmacro (get_airtsp)

 # ~~~~~~~~~~ AirRAC ~~~~~~~~~
 macro (get_airrac)
@@ -1495,7 +1495,7 @@
   if (EXISTS ${PROJ_PATH_CFG_SRC})
     set (PROJ_PATH_CFG ${PROJ_PATH_CFG_DIR}/${MODULE_NAME}-paths.hpp)
     configure_file (${PROJ_PATH_CFG_SRC} ${PROJ_PATH_CFG} @ONLY)
-
+
     # Add the 'hdr_cfg_${MODULE_NAME}' target, depending on the converted header
     add_custom_target (hdr_cfg_${MODULE_NAME} ALL DEPENDS ${PROJ_PATH_CFG})

@@ -2288,9 +2288,9 @@
     foreach (_option_item ${ARGN})
       string (REGEX MATCH "MAN([1-9])" _current_section_tmp "${_option_item}")
       if ("${CMAKE_MATCH_1}" STREQUAL "")
-	list (APPEND _man_arg_MAN${_current_section} ${_option_item})
+		list (APPEND _man_arg_MAN${_current_section} ${_option_item})
       else ("${CMAKE_MATCH_1}" STREQUAL "")
-	set (_current_section "${CMAKE_MATCH_1}")
+		set (_current_section "${CMAKE_MATCH_1}")
       endif ("${CMAKE_MATCH_1}" STREQUAL "")
     endforeach (_option_item ${ARGN})
   endif (${CMAKE_VERSION} VERSION_GREATER 2.8.1)
@@ -2683,19 +2683,19 @@
   endif (TravelCCM_FOUND)
 endmacro (display_travelccm)

-# AirSched
-macro (display_airsched)
-  if (AirSched_FOUND)
+# AirTSP
+macro (display_airtsp)
+  if (AirTSP_FOUND)
     message (STATUS)
-    message (STATUS "* AirSched:")
-    message (STATUS "  - AIRSCHED_VERSION .............. : ${AIRSCHED_VERSION}")
-    message (STATUS "  - AIRSCHED_BINARY_DIRS .......... : ${AIRSCHED_BINARY_DIRS}")
-    message (STATUS "  - AIRSCHED_EXECUTABLES .......... : ${AIRSCHED_EXECUTABLES}")
-    message (STATUS "  - AIRSCHED_LIBRARY_DIRS ......... : ${AIRSCHED_LIBRARY_DIRS}")
-    message (STATUS "  - AIRSCHED_LIBRARIES ............ : ${AIRSCHED_LIBRARIES}")
-    message (STATUS "  - AIRSCHED_INCLUDE_DIRS ......... : ${AIRSCHED_INCLUDE_DIRS}")
-  endif (AirSched_FOUND)
-endmacro (display_airsched)
+    message (STATUS "* AirTSP:")
+    message (STATUS "  - AIRTSP_VERSION .............. : ${AIRTSP_VERSION}")
+    message (STATUS "  - AIRTSP_BINARY_DIRS .......... : ${AIRTSP_BINARY_DIRS}")
+    message (STATUS "  - AIRTSP_EXECUTABLES .......... : ${AIRTSP_EXECUTABLES}")
+    message (STATUS "  - AIRTSP_LIBRARY_DIRS ......... : ${AIRTSP_LIBRARY_DIRS}")
+    message (STATUS "  - AIRTSP_LIBRARIES ............ : ${AIRTSP_LIBRARIES}")
+    message (STATUS "  - AIRTSP_INCLUDE_DIRS ......... : ${AIRTSP_INCLUDE_DIRS}")
+  endif (AirTSP_FOUND)
+endmacro (display_airtsp)

 # AirRAC
 macro (display_airrac)
@@ -2836,14 +2836,14 @@
 ##
 macro (display_doc_generation)
   message (STATUS)
-    message (STATUS "* Documentation to be generated ... :")
-	if (INSTALL_DOC)
-      message (STATUS "  + HTML main page ................ : ${DOXYGEN_OUTPUT_REL}")
-      message (STATUS "  + CSS-related files ............. : ${CSS_ALL_TARGETS}")
-      message (STATUS "  + Image-related files ........... : ${IMG_ALL_TARGETS}")
-      message (STATUS "  + PDF reference manual .......... : ${REFMAN_TEX} => ${REFMAN_PDF}")
-	endif (INSTALL_DOC)
-    message (STATUS "  + Man page sections ............. : ${MAN_ALL_TARGETS}")
+  message (STATUS "* Documentation to be generated ... :")
+  if (INSTALL_DOC)
+    message (STATUS "  + HTML main page ................ : ${DOXYGEN_OUTPUT_REL}")
+    message (STATUS "  + CSS-related files ............. : ${CSS_ALL_TARGETS}")
+    message (STATUS "  + Image-related files ........... : ${IMG_ALL_TARGETS}")
+    message (STATUS "  + PDF reference manual .......... : ${REFMAN_TEX} => ${REFMAN_PDF}")
+  endif (INSTALL_DOC)
+  message (STATUS "  + Man page sections ............. : ${MAN_ALL_TARGETS}")
 endmacro (display_doc_generation)

 ##
@@ -2935,7 +2935,7 @@
   display_sevmgr ()
   display_trademgen ()
   display_travelccm ()
-  display_airsched ()
+  display_airtsp ()
   display_airrac ()
   display_rmol ()
   display_airinv ()


Try to fix building unbound in clean environment.

I think something must have changed in newer versions of unbound, since
building now fails with an out of source build due to configlexer path
issues.

--- build/cmake/test/unbound.cmake
+++ build/cmake/test/unbound.cmake
@@ -3,6 +3,6 @@
   unbound
   URL http://www.unbound.net/downloads/unbound-${UNBOUND_VERSION}.tar.gz
   URL_HASH SHA256=${UNBOUND_HASH}
+  BUILD_IN_SOURCE 1
   CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${TEST_INSTALL_PREFIX}
-  INSTALL_COMMAND make install
 )


remove c++11 requirement

remove c++11 requirement

--- common.cmake
+++ common.cmake
@@ -11,34 +11,6 @@

 INCLUDE (CPack)
 INCLUDE (CTest)
-
-# Compiler-specific C++11 activation.
-if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
-    set(CMAKE_CXX_FLAGS                "-Wall -std=c++11")
-    set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g")
-    set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG")
-    set(CMAKE_CXX_FLAGS_RELEASE        "-O4 -DNDEBUG")
-    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
-
-    execute_process(
-        COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
-    if (NOT (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7))
-        message(FATAL_ERROR "${PROJECT_NAME} requires g++ 4.7 or greater.")
-    endif ()
-elseif (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
-
-    set(CMAKE_CXX_FLAGS                "-Wall -std=c++11")
-    set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g")
-    set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG")
-    set(CMAKE_CXX_FLAGS_RELEASE        "-O4 -DNDEBUG")
-    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
-
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
-elseif(${CMAKE_MAKE_PROGRAM} MATCHES "(msdev|devenv|nmake|MSBuild)")
-    add_definitions("/W2")
-else ()
-    message(FATAL_ERROR "Your C++ compiler does not support C++11.")
-endif ()

 if(TODO MATCHES "ON")


CR #121

CR #121

--- Compiler.cmake
+++ Compiler.cmake
@@ -1,7 +1,7 @@
 # Copyright (c) 2012-2013 Fabien Delalondre <fabien.delalondre@epfl.ch>
 #
 # Sets compiler optimization, definition and warnings according to
-# chosen compiler. Supported compilers are XL, Intel, Clang, gcc (4.1
+# chosen compiler. Supported compilers are XL, Intel, Clang, gcc (4.4
 # or later) and Visual Studio (2008 or later).
 #
 # Input Variables
@@ -39,9 +39,6 @@
 if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
   include(${CMAKE_CURRENT_LIST_DIR}/CompilerVersion.cmake)
   compiler_dumpversion(GCC_COMPILER_VERSION)
-  if(GCC_COMPILER_VERSION VERSION_LESS 4.1)
-    message(ERROR "GCC 4.1 or later required, found ${GCC_COMPILER_VERSION}")
-  endif()
   if(NOT WIN32 AND NOT XCODE_VERSION AND NOT RELEASE_VERSION)
     set(COMMON_GCC_FLAGS "${COMMON_GCC_FLAGS} -Werror")
   endif()


fix unix project config: provide cmake GLOW_HOME in find script

--- FindGLOW.cmake
+++ FindGLOW.cmake
@@ -10,6 +10,7 @@
 	IF(X64)

 	    FIND_PATH(GLOW_INCLUDE_PATH glow/ref_ptr.hpp
+		${GLOW_HOME}/include
 		$ENV{GLOW_DIR}/include
 		$ENV{GLOW_HOME}/include
 		$ENV{PROGRAMFILES}/GLOW/include
@@ -22,6 +23,7 @@
 	    FIND_LIBRARY(GLOW_LIBRARY
 		NAMES GLOW glow
 		PATHS
+		${GLOW_HOME}/lib
 		$ENV{GLOW_DIR}/lib
 		$ENV{GLOW_HOME}/lib
 		/usr/lib64
@@ -33,9 +35,10 @@
 	ELSE()

 	    FIND_PATH( GLOW_INCLUDE_PATH glow/ref_ptr.hpp
+		${GLOW_HOME}/include
 		$ENV{GLOW_DIR}/include
 		$ENV{GLOW_HOME}/include
-		$ENV{PROGRAMFILES}/GLOW/include
+		$ENV{PROGRAMFILES}/glow/include
 		/usr/include
 		/usr/local/include
 		/sw/include
@@ -45,8 +48,9 @@
 	    FIND_LIBRARY(GLOW_LIBRARY
 		NAMES GLOW glow
 		PATHS
+		${GLOW_HOME}/lib
 		$ENV{GLOW_DIR}/lib
-		$ENV{GLOW_HOME}/lib
+		$ENV{GLOW_HOME}/lib
 		/usr/lib
 		/usr/local/lib
 		/sw/lib


New hashvalue for new mitk-data containing software modus reference screenshots.

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

 if(BUILD_TESTING)

-  set(revision_tag 062612b5)
+  set(revision_tag 452cf3a4)

   ExternalProject_Add(${proj}
     URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MITK-Data_${revision_tag}.tar.gz


change default comment max think time

change default comment max think time

--- config.cmake
+++ config.cmake
@@ -17,7 +17,7 @@
 set_default(HTML_TAG_STORIES		10)
 set_default(FEED_INDEX_STORIES		15)

-set_default(COMMENT_MAX_DELAY		3600)	# 60 mins max think time
+set_default(COMMENT_MAX_DELAY		86400)	# 1 day max think time
 set_default(COMMENT_MIN_DELAY		10)	# 10 secs min think time

 set_default(DB_FILE			"data/db2")


Enable C++11 for GCC targets

Enable C++11 for GCC targets

The gnu++11 mode is used for now since some repos (notably uVisor)
depend on the GCC extensions. Once this is fixed, we should have no
problem switching to c++11.
Tested on our release repositores, and after a few changes in a couple
of repos, everything seems to compile fine.

--- CMake/toolchain.cmake
+++ CMake/toolchain.cmake
@@ -66,7 +66,7 @@
 set(_C_FAMILY_FLAGS_INIT "-fno-exceptions -fno-unwind-tables -ffunction-sections -fdata-sections -Wall -Wextra")
 set(CMAKE_C_FLAGS_INIT   "-std=c99 ${_C_FAMILY_FLAGS_INIT}")
 set(CMAKE_ASM_FLAGS_INIT "-fno-exceptions -fno-unwind-tables -x assembler-with-cpp")
-set(CMAKE_CXX_FLAGS_INIT "${_C_FAMILY_FLAGS_INIT} -fno-rtti -fno-threadsafe-statics")
+set(CMAKE_CXX_FLAGS_INIT "--std=gnu++11 ${_C_FAMILY_FLAGS_INIT} -fno-rtti -fno-threadsafe-statics")
 set(CMAKE_MODULE_LINKER_FLAGS_INIT
     "-fno-exceptions -fno-unwind-tables -Wl,--gc-sections -Wl,--sort-common -Wl,--sort-section=alignment"
 )


Make gpgme++ play nice with FindKDEWIN.cmake and possibly others. (cherry picked from commit 162c98a7149892717100cda3623741ee2b430a48)

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -3,6 +3,8 @@

 if ( GPGME_FOUND )

+set(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
+set(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES})
 set(CMAKE_REQUIRED_INCLUDES ${GPGME_INCLUDES})
 set(CMAKE_REQUIRED_DEFINITIONS ${KDE4_DEFINITIONS})
 set(CMAKE_REQUIRED_LIBRARIES)
@@ -426,7 +428,9 @@
   }
 " HAVE_GPGME_CONF_ARG_NEW_WITH_CONST_VALUE )

-set(CMAKE_REQUIRED_INCLUDES)
-set(CMAKE_REQUIRED_LIBRARIES)
+set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
+set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE})
+set(CMAKE_REQUIRED_INCLUDES_SAVE)
+set(CMAKE_REQUIRED_LIBRARIES_SAVE)

 endif()


Tweak message for variables passed to ITK sub-project

Change-Id: I1e1c44dfe116a21e9794a2c166a6d667c819ab8c

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -6,7 +6,7 @@

 foreach (_varName ${_varNames})
   if(_varName MATCHES "^ITK_" OR _varName MATCHES "FFTW")
-    message( "Variable defined ${_varName}: ${${_varName}}")
+    message( STATUS "Passing variable \"${_varName}=${${_varName}}\" to ITK external project.")
     list(APPEND ITK_VARS ${_varName})
   endif()
 endforeach()


COMP: Update VTK 8.2 to fix build against Qt 5.15.2

List of changes:

$ git shortlog 75414fe17..9f91f8a3f --no-merges
Aaron Knoll (1):
      [backport] added glFinish after eglSwapBuffers

Adam Rankin (5):
      [backport] Fix incorrect disabling of rendering when TrackHMD=false
      [backport] Integrate Ken Martin's comment into vtkOpenVRRenderWindow.cxx
      [backport] Undoing formatting changes
      [backport] Further formatting fix
      [backport] ENH: Exposing the generic tracker openvr device type to downstream projects

Andras Lasso (9):
      [backport] Simplify initialization of vtkAbstractPolyDataReader based readers
      [backport] Improve vtkSelectVisiblePoints tolerance specification
      [backport] Fix vtkTubeFilter corrupting input polydata cells
      [backport] Fix disappearing labels when anchor points are not in world
      [backport] Fix loss of precision in vtkPlanes::SetFrustumPlanes
      [backport] Fix vtkThinPlateSplineTransform forward transform for coplanar points
      [backport] Add "follow camera direction" orientation mode to vtkGlyph3D
      * [backport MR-6846] BUG: Fix crash in vtkImageHistogram if input contains NaN
      [backport MR-7233] Fix vtkGPUVolumeRayCastMapper multi-volume-rendering crash

Andrew Bauer (1):
      [backport] Change vtkOBBTree::IntersectWithLine to return the best information

Andrew J. P. Maclean (1):
      [backport MR-6943] Qt 5.15 needs the include file QPainterPath

Aravind Mamidi (1):
      [backport] Fix for BUG0013829: vtkAssembly::GetBounds adds bounds which are unintialized.

Ben Boeckel (1):
      [backport] vtkLabelPlacementMapper: fix in-frame detection

Bill Lorensen (1):
      [backport] BUG: Remote hidden file regex was incorrect

Clinton Stimpson (1):
      [backport] Add more support for custom shaders in composite mapper.

Cornelis Bockemühl (1):
      [backport] Avoid crashes with string arrays

Cory Quammen (3):
      [backport] Remove direct disable of GL_SCISSOR_TEST
      [backport] Silence viewport warnings
      [backport] Fix incomplete cherry pick in 8921e9a6

Csaba Pinter (1):
      [backport] Add shading to multi-volume rendering

Dan Lipsa (3):
      [backport] Do not call kCFCoreFoundationVersionNumber for OSMesa.
      [backport] Fix typo.
      [backport] OpenGL2/vtkOpenGLGlyph3DMapper: Fix segfault when indexArray is 0.

David E. DeMarle (1):
      [backport] fix a crash when rebuilding labelhierarchy

David Gobbi (1):
      [backport] Compatibility for Python 3.8

Davide Punzo (1):
      ENH: Add double clicks and selection events for widget interactions

Edwin Bennink (1):
      [backport] Fix ScaleContour function

Elvis Stansvik (1):
      [backport] Support fractional device pixel ratio in native Qt widget

Haocheng LIU (1):
      [backport] Fix the default scale mode in vtkGlyph3DMapper

Jean-Christophe Fillion-Robin (15):
      Revert "Revert "Added a mode in handle widget to allow showing disabled handles""
      ENH: Support setting custom default cursor for QVTKOpenGL[Native]Widget
      [backport MR-4983] BUG: vtk_module_load macro: Fix conditional test for target file include
      [backport MR-4983] BUG: vtkExternalModuleMacros: Ensure all required VTK variables are set
      [backport MR-4983] STYLE: Refactor build-system introducing vtkInitializeWrapPython module
      [backport MR-4983] STYLE: Refactor build-system introducing vtkModulePythonWrapping CMake module
      [backport MR-4983] ENH: vtkRenderingOpenVR: Support building module python wrapping externally
      BUG: Ensure VTK_PYTHON_SITE_PACKAGES_SUFFIX is set in vtkInitializeWrapPython
      [regression] COMP: vtkQWidgetTexture: Fix undefined _glPixelStorei symbol link error on macOS
      [backport MR-5816] vtkImageToImageStencil: Fix integer overflow to support image > 2GB
      [backport MR-6754] COMP: Rename CheckCXXSourceRuns CMake module bundled in VTK
      [backport MR-6754] COMP: Rename CHECK_CXX_SOURCE_RUNS to avoid conflict with CMake implementation
      COMP: Remove vtk-m submodule
      COMP: Update vtkAcceleratorsVTKm to remove vtkVTKm dependency
      COMP: Remove FindTBB and expect VTK to be configured with TBB_DIR

Ken Martin (6):
      [backport] OpenGL2/vtkOrderIndependentTranslucentPass: try a fix for osx gt120 systems
      [backport] OpenVR: minor fix to ensure depth is correct for controllers
      [backport] OpenVR: add event invokes for load and save camera state
      [backport] minor improvements to openvr classes
      [backport] some opengl related cleanups and features
      [backport] add qwidgets in a vtk rendering with events

Kyle Sunderland (4):
      [backport] Fix Windows multitouch and MacOS trackpad gesture interactions
      [backport] Fix bugs in vtkDijkstraGraphGeodesicPath
      [backport MR-6941] Fix infinite loop in vtkContourTriangulator
      [backport MR-7151] Add support for horizontal mouse scroll events

Mathieu Westphal (4):
      [backport] OpenGL2: Scale and Opacity table fix for point gaussian representation
      [backport] MakeSure the PolyLineWidget representation is updated
      [backport] Fix long array in legacy reader/writer
      [backport] Fix the wrong dimension of a vector

Michael Migliore (5):
      [backport] Set FileName to null in abstract reader
      [backport] Fix crash when a prop doesn't have bounds
      [backport] Fix normal computation when verts and lines are presents
      [backport] Fix crash when cell scalars is empty
      [backport] Fix shader error on Mesa and use enum

SET (1):
      [Backport] Exodus gcc 10 support

Sankhesh Jhaveri (6):
      [backport] Invoke CursorChangedEvent to from vtkGenericOpenGLRenderWindow
      [backport] Allow widgets to change cursor when using QVTKOpenGLWindow
      [backport] Allow widgets to change cursor when using QVTKOpenGLNativeWidget
      [backport] Ensure widget state doesn't change when widget already enabled/disabled
      [backport] Fix pickingmanager issue with invisible coincident handle widgets
      [backport] Add test for invisible coincident handle widgets with pickingmanager

Scott Wittenburg (1):
      [backport] PERF: vtkOpenGLContextDevice2D: Cache all drawn polydata instead of just the last one

Simon Drouin (6):
      [backport] Moved uniforms and GPU shaders to new class vtkShaderProperty
      vtkSkybox::StereoSphere not supported yet.
      [backport] Fix coding style.
      [backport] Added basic unit tests for vtkOpenGLUniforms
      [backport] Fixed compilation warning
      [backport] Fixed wrong return value.

T.J. Corona (1):
      [backport] vtkXMLReader: fix data type to support large datasets

Tristan Coulange (1):
      [backport] Fix vtkAxesActor GetBounds

Utkarsh Ayachit (4):
      [backport] Add `vtkRect::Intersect`, `vtkRect::MoveTo` APIs.
      [backport] Fix incorrect doc in vtkOpenGLContextDevice2D.
      [backport] vtkOpenGLContextDevice2D: respect tile-scale/tile-viewport.
      [backport] Fix vtkChartMatrix to not set invalid size

Will Schroeder (1):
      [backport] Some minor performance improvements

--- SuperBuild/External_VTK.cmake
+++ SuperBuild/External_VTK.cmake
@@ -72,7 +72,7 @@

 set(_git_tag)
 if("${ShapePopulationViewer_VTK_VERSION_MAJOR}" STREQUAL "8")
-  set(_git_tag "75414fe171e5ae2ed6e4df608deb1d578d9ec7c3")
+  set(_git_tag "9f91f8a3fd332e6cb1ac080db727f194d177ddc4") # slicer-v8.2.0-2018-10-02-74d9488523
 else()
   message(FATAL_ERROR "error: Unsupported ShapePopulationViewer_VTK_VERSION_MAJOR: ${ShapePopulationViewer_VTK_VERSION_MAJOR}")
 endif()


STYLE: Remove unused "FindDCMTK" CMake module

--- CMake/FindDCMTK.cmake
+++ CMake/FindDCMTK.cmake
@@ -1,347 +0,0 @@
-# - find DCMTK libraries and applications
-# The module defines the following variables:
-#
-#  DCMTK_INCLUDE_DIRS  - Directories to include to use DCMTK
-#  DCMTK_LIBRARIES     - Files to link against to use DCMTK
-#  DCMTK_FOUND         - If false, don't try to use DCMTK
-#  DCMTK_DIR           - (optional) Source directory for DCMTK
-#
-# DCMTK_DIR can be used to make it simpler to find the various include
-# directories and compiled libraries if you've just compiled it in the
-# source tree. Just set it to the root of the tree where you extracted
-# the source (default to /usr)
-#
-#
-# This file is able to find version of DCMTK that do or do not export
-# a DCMTKConfig.cmake file.
-#
-# IMPORTANT: A set of patches has been contributed to DCMTK
-# maintainers, as soon as:
-#   (1) it has been integrated upstream so that it is available in
-#   an official release (for example X.Y.Z),
-#   (2) code bases have been updated to build against X.Y.Z
-# This file could be removed.
-#
-# The set of patches is listed here: https://github.com/commontk/DCMTK/compare/79030ba...f461865
-#
-#
-# Waiting for this to happen, build systems will have to be able
-# to support different versions of DCMTK.
-#
-# On any given system, the following combination of DCMTK version could be
-# considered:
-#
-#         |   SYSTEM DCMTK      +      LOCAL DCMTK      |     Supported ?   |
-# ---------------------------------------------------------------------------
-# Case A  |   NA                +      [ ] DCMTKConfig  |         YES       |
-# ------------------------------------------------------|--------------------
-# Case B  |   NA                +      [X] DCMTKConfig  |         YES       |
-# ------------------------------------------------------|--------------------
-# Case C  |   [ ] DCMTKConfig   +      NA               |         YES       |
-# ------------------------------------------------------|--------------------
-# Case D  |   [X] DCMTKConfig   +      NA               |         YES       |
-# ------------------------------------------------------|--------------------
-# Case E  |   [ ] DCMTKConfig   +      [ ] DCMTKConfig  |         YES (*)   |
-# ------------------------------------------------------|--------------------
-# Case F  |   [X] DCMTKConfig   +      [ ] DCMTKConfig  |         NO        |
-# ------------------------------------------------------|--------------------
-# Case G  |   [ ] DCMTKConfig   +      [X] DCMTKConfig  |         YES       |
-# ------------------------------------------------------|--------------------
-# Case H  |   [X] DCMTKConfig   +      [X] DCMTKConfig  |         YES       |
-# ---------------------------------------------------------------------------
-#
-#  (*) See Troubleshooting section.
-#
-# Legend:
-#
-#   NA ...............: Means that no System or Local DCMTK is available
-#
-#   [ ] DCMTKConfig ..: Means that the version of DCMTK does NOT export a DCMTKConfig.cmake file.
-#
-#   [X] DCMTKConfig ..: Means that the version of DCMTK exports a DCMTKConfig.cmake file.
-#
-#
-#
-# In CTK commits 52d953 and 74b4b07, the FindDCMTK.cmake module has been updated to be able
-# to find both version of DCMTK ([ ] DCMTKConfig and [X] DCMTKConfig).
-#
-# It is a two steps process:
-#
-#   * Step 1:  Attempt to find DCMTK version providing a DCMTKConfig.cmake file. This is done
-#              with the help of ''
-#
-#   * Step 2:  If step 1 failed, rely on FindDCMTK.cmake to set DCMTK_* variables details below.
-#
-#
-#
-# Troubleshooting:
-#
-#    What to do if my project find a different version of DCMTK ?
-#
-#    Remove DCMTK entry from the CMake registry.
-#    Search for "CMake user package registry" on http://www.cmake.org/cmake/help/v2.8.9/cmake.html#command:find_package
-#
-#    Details: As some point, the DCMTK build tree was exported [1][2][3]. Indeed, before the set of
-#    patches discussed above has been contributed to upstream DCMTK, an initial implementation of
-#    a DCMTK build system exporting its build tree has been implemented and has been tested by some
-#    folks. This had the effect of populating the CMake registry.
-#
-#    Since Step1 does not exclude the CMake registry, when dealing with case E, the incorrect version of
-#    DCMTK could be found.
-#
-#    [1] http://slicer-devel.65872.n3.nabble.com/Packaging-seems-to-work-again-tp4028121p4028134.html
-#    [2] https://www.assembla.com/spaces/slicerrt/tickets/244-dcmtk_dir-vs--dcmtkconfig-cmake?comment=267984263#comment:267984263
-#    [3] http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:export
-#
-#
-#=============================================================================
-# Copyright 2004-2009 Kitware, Inc.
-# Copyright 2009-2010 Mathieu Malaterre <mathieu.malaterre@gmail.com>
-# Copyright 2010 Thomas Sondergaard <ts@medical-insight.com>
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distributed this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-#
-# Written for VXL by Amitha Perera.
-# Upgraded for GDCM by Mathieu Malaterre.
-# Modified for EasyViz by Thomas Sondergaard.
-#
-
-set(_dcmtk_dir_description "The directory of DCMTK build or install tree.")
-
-# Ensure that DCMTK_DIR is set to a reasonable default value
-# so that DCMTK libraries can be found on a standard Unix distribution.
-# It also overwrite the value of DCMTK_DIR after this one has been
-# set by a successful discovery of DCMTK by the unpatched FindDCMTK.cmake module
-# distributed with CMake (as of 0167cea)
-if(NOT DCMTK_DIR OR DCMTK_DIR STREQUAL "/usr/include/dcmtk")
-  set(DCMTK_DIR "/usr" CACHE PATH ${_dcmtk_dir_description} FORCE)
-endif()
-
-set(_SAVED_DCMTK_DIR ${DCMTK_DIR})
-
-#
-# Step1: Attempt to find a version of DCMTK providing a DCMTKConfig.cmake file.
-#
-message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake")
-find_package(DCMTK QUIET NO_MODULE)
-if(DCMTK_FOUND
-    AND NOT "x" STREQUAL "x${DCMTK_LIBRARIES}"
-    AND NOT "x" STREQUAL "x${DCMTK_INCLUDE_DIRS}")
-  message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake - ok")
-  return()
-else()
-  message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake - failed")
-endif()
-
-message(STATUS "Trying to find DCMTK relying on FindDCMTK.cmake")
-
-# Restore the value reset by the previous call to 'find_package(DCMTK QUIET NO_MODULE)'
-set(DCMTK_DIR ${_SAVED_DCMTK_DIR} CACHE PATH ${_dcmtk_dir_description} FORCE)
-
-
-#
-# Step2: Attempt to find a version of DCMTK that does NOT provide a DCMTKConfig.cmake file.
-#
-
-# prefer DCMTK_DIR over default system paths like /usr/lib
-if(DCMTK_DIR)
-  set(CMAKE_PREFIX_PATH ${DCMTK_DIR}/lib ${CMAKE_PREFIX_PATH}) # this is given to FIND_LIBRARY or FIND_PATH
-endif()
-
-# Find all libraries, store debug and release separately
-foreach(lib
-    dcmpstat
-    dcmsr
-    dcmsign
-    dcmtls
-    dcmqrdb
-    dcmnet
-    dcmjpeg
-    dcmimage
-    dcmimgle
-    dcmdata
-    oflog
-    ofstd
-    ijg12
-    ijg16
-    ijg8
-    )
-
-  # Find Release libraries
-  find_library(DCMTK_${lib}_LIBRARY_RELEASE
-    ${lib}
-    PATHS
-    ${DCMTK_DIR}/${lib}/libsrc
-    ${DCMTK_DIR}/${lib}/libsrc/Release
-    ${DCMTK_DIR}/${lib}/Release
-    ${DCMTK_DIR}/lib
-    ${DCMTK_DIR}/lib/Release
-    ${DCMTK_DIR}/dcmjpeg/lib${lib}/Release
-    NO_DEFAULT_PATH
-    )
-
-  # Find Debug libraries
-  find_library(DCMTK_${lib}_LIBRARY_DEBUG
-    ${lib}
-    PATHS
-    ${DCMTK_DIR}/${lib}/libsrc
-    ${DCMTK_DIR}/${lib}/libsrc/Debug
-    ${DCMTK_DIR}/${lib}/Debug
-    ${DCMTK_DIR}/lib
-    ${DCMTK_DIR}/lib/Debug
-    ${DCMTK_DIR}/dcmjpeg/lib${lib}/Debug
-    NO_DEFAULT_PATH
-    )
-
-  mark_as_advanced(DCMTK_${lib}_LIBRARY_RELEASE)
-  mark_as_advanced(DCMTK_${lib}_LIBRARY_DEBUG)
-
-  # Add libraries to variable according to build type
-  if(DCMTK_${lib}_LIBRARY_RELEASE)
-    list(APPEND DCMTK_LIBRARIES optimized ${DCMTK_${lib}_LIBRARY_RELEASE})
-  endif()
-
-  if(DCMTK_${lib}_LIBRARY_DEBUG)
-    list(APPEND DCMTK_LIBRARIES debug ${DCMTK_${lib}_LIBRARY_DEBUG})
-  endif()
-
-endforeach()
-
-set(CMAKE_THREAD_LIBS_INIT)
-if(DCMTK_oflog_LIBRARY_RELEASE OR DCMTK_oflog_LIBRARY_DEBUG)
-  # Hack - Not having a DCMTKConfig.cmake file to read the settings from, we will attempt to
-  # find the library in all cases.
-  # Ideally, pthread library should be discovered only if DCMTK_WITH_THREADS is enabled.
-  set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
-  find_package(Threads)
-endif()
-
-if(CMAKE_THREAD_LIBS_INIT)
-  list(APPEND DCMTK_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
-endif()
-
-#
-# SPECIFIC CASE FOR DCMTK BUILD DIR as DCMTK_DIR
-# (as opposed to a DCMTK install dir)
-# Have to find the source directory.
-if(EXISTS ${DCMTK_DIR}/CMakeCache.txt)
-          load_cache(${DCMTK_DIR} READ_WITH_PREFIX "EXT"
-          DCMTK_SOURCE_DIR)
-  if(NOT EXISTS ${EXTDCMTK_SOURCE_DIR})
-    message(FATAL_ERROR
-      "DCMTK build directory references
-nonexistant DCMTK source directory ${EXTDCMTK_SOURCE_DIR}")
-  endif()
-endif()
-
-set(DCMTK_config_TEST_HEADER osconfig.h)
-set(DCMTK_dcmdata_TEST_HEADER dctypes.h)
-set(DCMTK_dcmimage_TEST_HEADER dicoimg.h)
-set(DCMTK_dcmimgle_TEST_HEADER dcmimage.h)
-set(DCMTK_dcmjpeg_TEST_HEADER djdecode.h)
-set(DCMTK_dcmnet_TEST_HEADER assoc.h)
-set(DCMTK_dcmpstat_TEST_HEADER dcmpstat.h)
-set(DCMTK_dcmqrdb_TEST_HEADER dcmqrdba.h)
-set(DCMTK_dcmsign_TEST_HEADER sicert.h)
-set(DCMTK_dcmsr_TEST_HEADER dsrtree.h)
-set(DCMTK_dcmtls_TEST_HEADER tlslayer.h)
-set(DCMTK_ofstd_TEST_HEADER ofstdinc.h)
-set(DCMTK_oflog_TEST_HEADER oflog.h)
-set(DCMTK_dcmjpls_TEST_HEADER djlsutil.h)
-
-set(DCMTK_INCLUDE_DIR_NAMES)
-
-foreach(dir
-    config
-    dcmdata
-    dcmimage
-    dcmimgle
-    dcmjpeg
-    dcmjpls
-    dcmnet
-    dcmpstat
-    dcmqrdb
-    dcmsign
-    dcmsr
-    dcmtls
-    ofstd
-    oflog)
-  if(EXTDCMTK_SOURCE_DIR)
-    set(SOURCE_DIR_PATH
-      ${EXTDCMTK_SOURCE_DIR}/${dir}/include/dcmtk/${dir})
-  endif()
-  find_path(DCMTK_${dir}_INCLUDE_DIR
-    ${DCMTK_${dir}_TEST_HEADER}
-    PATHS
-    ${DCMTK_DIR}/${dir}/include
-    ${DCMTK_DIR}/${dir}
-    ${DCMTK_DIR}/include/dcmtk/${dir}
-    ${DCMTK_DIR}/${dir}/include/dcmtk/${dir}
-    ${DCMTK_DIR}/include/${dir}
-    ${SOURCE_DIR_PATH}
-    )
-  mark_as_advanced(DCMTK_${dir}_INCLUDE_DIR)
-  list(APPEND DCMTK_INCLUDE_DIR_NAMES DCMTK_${dir}_INCLUDE_DIR)
-
-  if(DCMTK_${dir}_INCLUDE_DIR)
-    # add the 'include' path so eg
-    #include "dcmtk/dcmimgle/dcmimage.h"
-    # works
-    get_filename_component(_include ${DCMTK_${dir}_INCLUDE_DIR} PATH)
-    get_filename_component(_include ${_include} PATH)
-    list(APPEND
-      DCMTK_INCLUDE_DIRS
-      ${DCMTK_${dir}_INCLUDE_DIR}
-      ${_include})
-  endif()
-endforeach()
-
-list(APPEND DCMTK_INCLUDE_DIRS ${DCMTK_DIR}/include)
-
-if(WIN32)
-  list(APPEND DCMTK_LIBRARIES netapi32 wsock32)
-endif()
-
-if(DCMTK_ofstd_INCLUDE_DIR)
-  get_filename_component(DCMTK_dcmtk_INCLUDE_DIR
-    ${DCMTK_ofstd_INCLUDE_DIR}
-    PATH
-    CACHE)
-  list(APPEND DCMTK_INCLUDE_DIRS ${DCMTK_dcmtk_INCLUDE_DIR})
-  mark_as_advanced(DCMTK_dcmtk_INCLUDE_DIR)
-endif()
-
-# Compatibility: This variable is deprecated
-set(DCMTK_INCLUDE_DIR ${DCMTK_INCLUDE_DIRS})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(DCMTK
-  REQUIRED_VARS ${DCMTK_INCLUDE_DIR_NAMES} DCMTK_LIBRARIES
-  FAIL_MESSAGE "Please set DCMTK_DIR and re-run configure")
-
-# Workaround bug in packaging of DCMTK 3.6.0 on Debian.
-# See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637687
-if(DCMTK_FOUND AND UNIX AND NOT APPLE)
-  include(CheckCXXSourceCompiles)
-  set(CMAKE_REQUIRED_FLAGS )
-  set(CMAKE_REQUIRED_DEFINITIONS )
-  set(CMAKE_REQUIRED_INCLUDES ${DCMTK_INCLUDE_DIRS})
-  set(CMAKE_REQUIRED_LIBRARIES ${DCMTK_LIBRARIES})
-  check_cxx_source_compiles("#include <dcmtk/config/osconfig.h>\n#include <dcmtk/ofstd/ofstream.h>\nint main(int,char*[]){return 0;}"
-    DCMTK_HAVE_CONFIG_H_OPTIONAL
-    )
-  if(NOT DCMTK_HAVE_CONFIG_H_OPTIONAL)
-    set(DCMTK_DEFINITIONS "HAVE_CONFIG_H")
-  endif()
-endif()
-
-message(STATUS "Trying to find DCMTK relying on FindDCMTK.cmake - ok")


Update FindGTest to latest CMake version

This CMake module has been update from CMake upstream as of
5efb8b9. This adds the addition of imported targets for the GTest
libraries, to the existing variables.

Change-Id: Ie40e570bf1a2621a9f9dcae8924c9a37f73feb57

--- CMake/FindGTest.cmake
+++ CMake/FindGTest.cmake
@@ -1,109 +1,98 @@
+# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
 #.rst:
 # FindGTest
 # ---------
 #
 # Locate the Google C++ Testing Framework.
 #
-# Defines the following variables:
-#
-# ::
-#
-#    GTEST_FOUND - Found the Google Testing framework
-#    GTEST_INCLUDE_DIRS - Include directories
-#
-#
-#
-# Also defines the library variables below as normal variables.  These
+# Imported targets
+# ^^^^^^^^^^^^^^^^
+#
+# This module defines the following :prop_tgt:`IMPORTED` targets:
+#
+# ``GTest::GTest``
+#   The Google Test ``gtest`` library, if found; adds Thread::Thread
+#   automatically
+# ``GTest::Main``
+#   The Google Test ``gtest_main`` library, if found
+#
+#
+# Result variables
+# ^^^^^^^^^^^^^^^^
+#
+# This module will set the following variables in your project:
+#
+# ``GTEST_FOUND``
+#   Found the Google Testing framework
+# ``GTEST_INCLUDE_DIRS``
+#   the directory containing the Google Test headers
+#
+# The library variables below are set as normal variables.  These
 # contain debug/optimized keywords when a debugging library is found.
 #
-# ::
-#
-#    GTEST_BOTH_LIBRARIES - Both libgtest & libgtest-main
-#    GTEST_LIBRARIES - libgtest
-#    GTEST_MAIN_LIBRARIES - libgtest-main
-#
-#
-#
-# Accepts the following variables as input:
-#
-# ::
-#
-#    GTEST_ROOT - (as a CMake or environment variable)
-#                 The root directory of the gtest install prefix
-#
-#
-#
-# ::
-#
-#    GTEST_MSVC_SEARCH - If compiling with MSVC, this variable can be set to
-#                        "MD" or "MT" to enable searching a GTest build tree
-#                        (defaults: "MD")
-#
-#
-#
-# Example Usage:
+# ``GTEST_LIBRARIES``
+#   The Google Test ``gtest`` library; note it also requires linking
+#   with an appropriate thread library
+# ``GTEST_MAIN_LIBRARIES``
+#   The Google Test ``gtest_main`` library
+# ``GTEST_BOTH_LIBRARIES``
+#   Both ``gtest`` and ``gtest_main``
+#
+# Cache variables
+# ^^^^^^^^^^^^^^^
+#
+# The following cache variables may also be set:
+#
+# ``GTEST_ROOT``
+#   The root directory of the Google Test installation (may also be
+#   set as an environment variable)
+# ``GTEST_MSVC_SEARCH``
+#   If compiling with MSVC, this variable can be set to ``MT`` or
+#   ``MD`` (the default) to enable searching a GTest build tree
+#
+#
+# Example usage
+# ^^^^^^^^^^^^^
 #
 # ::
 #
 #     enable_testing()
 #     find_package(GTest REQUIRED)
-#     include_directories(${GTEST_INCLUDE_DIRS})
-#
-#
-#
-# ::
 #
 #     add_executable(foo foo.cc)
-#     target_link_libraries(foo ${GTEST_BOTH_LIBRARIES})
-#
-#
-#
-# ::
+#     target_link_libraries(foo GTest::GTest GTest::Main)
 #
 #     add_test(AllTestsInFoo foo)
 #
 #
-#
-#
+# Deeper integration with CTest
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 #
 # If you would like each Google test to show up in CTest as a test you
-# may use the following macro.  NOTE: It will slow down your tests by
-# running an executable for each test and test fixture.  You will also
-# have to rerun CMake after adding or removing tests or test fixtures.
-#
-# GTEST_ADD_TESTS(executable extra_args ARGN)
-#
-# ::
-#
-#     executable = The path to the test executable
-#     extra_args = Pass a list of extra arguments to be passed to
-#                  executable enclosed in quotes (or "" for none)
-#     ARGN =       A list of source files to search for tests & test
-#                  fixtures. Or AUTO to find them from executable target.
-#
-#
-#
-# ::
-#
-#   Example:
+# may use the following macro::
+#
+#     GTEST_ADD_TESTS(executable extra_args files...)
+#
+# ``executable``
+#   the path to the test executable
+# ``extra_args``
+#   a list of extra arguments to be passed to executable enclosed in
+#   quotes (or ``""`` for none)
+# ``files...``
+#   a list of source files to search for tests and test fixtures.  Or
+#   ``AUTO`` to find them from executable target
+#
+# However, note that this macro will slow down your tests by running
+# an executable for each test and test fixture.
+#
+# Example usage::
+#
 #      set(FooTestArgs --foo 1 --bar 2)
 #      add_executable(FooTest FooUnitTest.cc)
 #      GTEST_ADD_TESTS(FooTest "${FooTestArgs}" AUTO)

-#=============================================================================
-# Copyright 2009 Kitware, Inc.
-# Copyright 2009 Philip Lowman <philip@yhbt.com>
-# Copyright 2009 Daniel Blezek <blezek@gmail.com>
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
 #
 # Thanks to Daniel Blezek <blezek@gmail.com> for the GTEST_ADD_TESTS code

@@ -118,6 +107,7 @@
     set(gtest_case_name_regex ".*\\( *([A-Za-z_0-9]+) *, *([A-Za-z_0-9]+) *\\).*")
     set(gtest_test_type_regex "(TYPED_TEST|TEST_?[FP]?)")
     foreach(source ${ARGN})
+        set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${source})
         file(READ "${source}" contents)
         string(REGEX MATCHALL "${gtest_test_type_regex} *\\(([A-Za-z_0-9 ,]+)\\)" found_tests ${contents})
         foreach(hit ${found_tests})
@@ -170,11 +160,17 @@
     if(GTEST_MSVC_SEARCH STREQUAL "MD")
         list(APPEND _gtest_libpath_suffixes
             msvc/gtest-md/Debug
-            msvc/gtest-md/Release)
+            msvc/gtest-md/Release
+            msvc/x64/Debug
+            msvc/x64/Release
+            )
     elseif(GTEST_MSVC_SEARCH STREQUAL "MT")
         list(APPEND _gtest_libpath_suffixes
             msvc/gtest/Debug
-            msvc/gtest/Release)
+            msvc/gtest/Release
+            msvc/x64/Debug
+            msvc/x64/Release
+            )
     endif()
 endif()

@@ -200,7 +196,7 @@
     _gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtest_maind)
 endif()

-include(FindPackageHandleStandardArgs)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTest DEFAULT_MSG GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)

 if(GTEST_FOUND)
@@ -208,4 +204,60 @@
     _gtest_append_debugs(GTEST_LIBRARIES      GTEST_LIBRARY)
     _gtest_append_debugs(GTEST_MAIN_LIBRARIES GTEST_MAIN_LIBRARY)
     set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES})
-endif()
+
+    include(CMakeFindDependencyMacro)
+    find_dependency(Threads)
+
+    if(NOT TARGET GTest::GTest)
+        add_library(GTest::GTest UNKNOWN IMPORTED)
+        set_target_properties(GTest::GTest PROPERTIES
+            INTERFACE_LINK_LIBRARIES "Threads::Threads")
+        if(GTEST_INCLUDE_DIRS)
+            set_target_properties(GTest::GTest PROPERTIES
+                INTERFACE_INCLUDE_DIRECTORIES "${GTEST_INCLUDE_DIRS}")
+        endif()
+        if(EXISTS "${GTEST_LIBRARY}")
+            set_target_properties(GTest::GTest PROPERTIES
+                IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
+                IMPORTED_LOCATION "${GTEST_LIBRARY}")
+        endif()
+        if(EXISTS "${GTEST_LIBRARY_RELEASE}")
+            set_property(TARGET GTest::GTest APPEND PROPERTY
+                IMPORTED_CONFIGURATIONS RELEASE)
+            set_target_properties(GTest::GTest PROPERTIES
+                IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
+                IMPORTED_LOCATION_RELEASE "${GTEST_LIBRARY_RELEASE}")
+        endif()
+        if(EXISTS "${GTEST_LIBRARY_DEBUG}")
+            set_property(TARGET GTest::GTest APPEND PROPERTY
+                IMPORTED_CONFIGURATIONS DEBUG)
+            set_target_properties(GTest::GTest PROPERTIES
+                IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
+                IMPORTED_LOCATION_DEBUG "${GTEST_LIBRARY_DEBUG}")
+        endif()
+      endif()
+      if(NOT TARGET GTest::Main)
+          add_library(GTest::Main UNKNOWN IMPORTED)
+          set_target_properties(GTest::Main PROPERTIES
+              INTERFACE_LINK_LIBRARIES "GTest::GTest")
+          if(EXISTS "${GTEST_MAIN_LIBRARY}")
+              set_target_properties(GTest::Main PROPERTIES
+                  IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
+                  IMPORTED_LOCATION "${GTEST_MAIN_LIBRARY}")
+          endif()
+          if(EXISTS "${GTEST_MAIN_LIBRARY_RELEASE}")
+            set_property(TARGET GTest::Main APPEND PROPERTY
+                IMPORTED_CONFIGURATIONS RELEASE)
+            set_target_properties(GTest::Main PROPERTIES
+                IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
+                IMPORTED_LOCATION_RELEASE "${GTEST_MAIN_LIBRARY_RELEASE}")
+          endif()
+          if(EXISTS "${GTEST_MAIN_LIBRARY_DEBUG}")
+            set_property(TARGET GTest::Main APPEND PROPERTY
+                IMPORTED_CONFIGURATIONS DEBUG)
+            set_target_properties(GTest::Main PROPERTIES
+                IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
+                IMPORTED_LOCATION_DEBUG "${GTEST_MAIN_LIBRARY_DEBUG}")
+          endif()
+    endif()
+endif()


Revert "Revert "ENH: Add Remote module group description to Doxygen.""

This reverts commit 67a8e13fbd54881ecb39d14f30df9df69e42a5ac.

Change-Id: Ib4b00f309e089fe214cda3336ae96ca96c0be473

--- CMake/ITKGroups.cmake
+++ CMake/ITKGroups.cmake
@@ -1,5 +1,18 @@
 # Set a list of group names
-set(group_list Core IO Filtering Registration Segmentation Numerics Video ThirdParty Bridge Nonunit Compatibility)
+set(group_list
+  Core
+  IO
+  Filtering
+  Registration
+  Segmentation
+  Numerics
+  Video
+  ThirdParty
+  Bridge
+  Nonunit
+  Compatibility
+  Remote
+  )

 set(Core_documentation "This group of modules contain the toolkit framework used
 by other modules.  There are common base classes for data objects and process
@@ -43,6 +56,16 @@

 set(Nonunit_documentation "This group of modules are intended to make use of an
 extensive set of the toolkit modules.")
+
+set(Remote_documentation "This group of modules is for ITK based code that have
+additional third-party dependencies not bundled with the toolkit,
+new algorithms or implementations seeking greater exposure and adoption,
+algorithms that hope to eventually be integrated into the toolkit,
+niche algorithms with limited application, and Modules in progress that do not
+yet have the test coverage and cross-platform standards required by the main toolkit.
++The modules are OFF by default in ITK's CMake configuration.
+Note that these modules do get the same level of support and backwards
+compatibility as other modules in the toolkit.")

 # Set a module name list for each group
 foreach( group ${group_list} )


additional quotes

additional quotes

--- CMake/toolchain.cmake
+++ CMake/toolchain.cmake
@@ -59,7 +59,7 @@

 # post-process elf files into .bin files (legacy backwards-compatible command):
-set(YOTTA_POSTPROCESS_COMMAND "${ARM_NONE_EABI_OBJCOPY} -O binary YOTTA_CURRENT_EXE_NAME YOTTA_CURRENT_EXE_NAME.bin")
+set(YOTTA_POSTPROCESS_COMMAND "\"${ARM_NONE_EABI_OBJCOPY}\" -O binary YOTTA_CURRENT_EXE_NAME YOTTA_CURRENT_EXE_NAME.bin")

 # set default compilation flags


Don't require VERSION 3.0 for cmake_policy.

Just disable problematic policies before calling project ()

--- CMakeUnitRunner.cmake
+++ CMakeUnitRunner.cmake
@@ -308,17 +308,14 @@
         set (TEST_DIRECTORY_CONFIGURE_SCRIPT
              "${TEST_DIRECTORY_NAME}/CMakeLists.txt")
         set (TEST_DIRECTORY_CONFIGURE_SCRIPT_CONTENTS
-             "cmake_policy (VERSION 3.0)\n"
-             "project (TestProject CXX C)\n"
              "cmake_minimum_required (VERSION 2.8 FATAL_ERROR)\n"
+             "if (POLICY CMP0042)\n"
+             "  cmake_policy (SET CMP0042 NEW)\n"
+             "endif (POLICY CMP0042)\n"
              "if (POLICY CMP0025)\n"
              "  cmake_policy (SET CMP0025 NEW)\n"
              "endif (POLICY CMP0025)\n"
              "project (TestProject CXX C)\n"
-             "cmake_minimum_required (VERSION 2.8 FATAL_ERROR)\n"
-             "if (POLICY CMP0042)\n"
-             "  cmake_policy (SET CMP0042 NEW)\n"
-             "endif (POLICY CMP0042)\n"
              "include (\"${CMAKE_CURRENT_SOURCE_DIR}/${TEST_FILE}\")\n")

         file (WRITE "${TEST_DIRECTORY_CONFIGURE_SCRIPT}"


Removed a useless line from ConfigureChecks.cmake.

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -240,7 +240,6 @@
     set(HAVE_ZLIB 0)
   endif()
 endif()
-set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)

 find_package(CppUnit)
 if(NOT CppUnit_FOUND AND BUILD_TESTS)


always creating both Release and Debug folders instead of just the one we should need.

--- Shared/CMake/JamomaUtilFunctions.cmake
+++ Shared/CMake/JamomaUtilFunctions.cmake
@@ -48,11 +48,26 @@

 	if(APPLE)
 		if(BUILD_JAMOMAMAX)
+
+			# TODO there appears to be some ambiguity when building because some things are build into debug/release even though CMAKE_BUILD_TYPE is the other here... [tap]
+
+			# ADD_CUSTOM_COMMAND(
+			#   TARGET ${LIBNAME}
+			#   POST_BUILD
+			#   COMMAND ${CMAKE_COMMAND} -E make_directory
+			#    ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/support
+			# )
 			ADD_CUSTOM_COMMAND(
 			  TARGET ${LIBNAME}
 			  POST_BUILD
 			  COMMAND ${CMAKE_COMMAND} -E make_directory
-			   ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/support
+			   ${CMAKE_BINARY_DIR}/Debug/support
+			)
+			ADD_CUSTOM_COMMAND(
+			  TARGET ${LIBNAME}
+			  POST_BUILD
+			  COMMAND ${CMAKE_COMMAND} -E make_directory
+			   ${CMAKE_BINARY_DIR}/Release/support
 			)
 			ADD_CUSTOM_COMMAND(
 			  TARGET ${LIBNAME} #Jamoma::Foundation # for instance


Fix a typo

Fix a typo

--- Modules/FindGCD.cmake
+++ Modules/FindGCD.cmake
@@ -11,7 +11,7 @@
 INCLUDE(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(GCD
    "Could not find GCD. voxrnd will still be working, but slow.
-   If you are using FreeBSD, consider installing devel/dispatch
+   If you are using FreeBSD, consider installing devel/libdispatch
    and devel/compiler-rt ports."
 GCD_LIBRARY GCD_INCLUDE_DIR)


ENH: ENH: MIDAS+CTest: allow the MIDAS arguments to be part of an arg rather than the entire arg

SVN-Revision: 3248

--- Application/CMakeScript/MIDAS.cmake
+++ Application/CMakeScript/MIDAS.cmake
@@ -70,6 +70,7 @@
   # Substitute the downloaded file argument(s)
   foreach(arg ${ARGN})
     if(arg MATCHES "MIDAS{[^}]*}")
+      string(REGEX MATCH "MIDAS{([^}]*)}" toReplace "${arg}")
       string(REGEX REPLACE "MIDAS{([^}]*)}" "\\1" keyFile "${arg}")
       # Split up the checksum extension from the real filename
       string(REGEX MATCH "\\.[^\\.]*$" hash_alg "${keyFile}")
@@ -125,10 +126,11 @@
 ")

       list(APPEND downloadScripts "${MIDAS_DATA_DIR}/MIDAS_FetchScripts/download_${checksum}.cmake")
-      list(APPEND testArgs "${MIDAS_DATA_DIR}/${base_file}")
-    else(arg MATCHES "^MIDAS{[^}]*}$")
+      string(REGEX REPLACE toReplace "${MIDAS_DATA_DIR}/${base_file}" newArg "${arg}")
+      list(APPEND testArgs ${newArg})
+    else(arg MATCHES "MIDAS{[^}]*}")
       list(APPEND testArgs ${arg})
-    endif(arg MATCHES "^MIDAS{[^}]*}$")
+    endif(arg MATCHES "MIDAS{[^}]*}")
   endforeach(arg)

   file(WRITE "${MIDAS_DATA_DIR}/MIDAS_FetchScripts/${testName}_fetchData.cmake"


Issue #45: Don't link directly to Python, as it should be dynamically loaded.

--- CMake/mpIncludePythonBindings.cmake
+++ CMake/mpIncludePythonBindings.cmake
@@ -18,11 +18,4 @@

 if(BUILD_Python_Boost OR BUILD_Python_PyBind)
   include_directories(${PYTHON_INCLUDE_DIRS})
-  if(NOT APPLE)
-    link_libraries(${PYTHON_LIBRARIES})
-  endif()
 endif()
-
-if(BUILD_Python_PyBind)
-  include_directories(${PYTHON_INCLUDE_DIRS})
-endif()


fix this when python is being used

fix this when python is being used

--- Code/cmake/Modules/RDKitUtils.cmake
+++ Code/cmake/Modules/RDKitUtils.cmake
@@ -61,9 +61,10 @@
     "LINK_LIBRARIES;DEPENDS;DEST"
     ""
     ${ARGN})
+  CAR(PYTEST_NAME ${PYTEST_DEFAULT_ARGS})
   CDR(PYTEST_SOURCES ${PYTEST_DEFAULT_ARGS})
   if(RDK_BUILD_PYTHON_WRAPPERS)
-    add_executable(${PYTHON_EXECUTABLE} ${PYTEST_SOURCES})
-    add_test(${PYTEST_NAME} ${EXECUTABLE_OUTPUT_PATH}/${PYTEST_NAME})
+    add_test(${PYTEST_NAME}  ${PYTHON_EXECUTABLE}
+             ${EXECUTABLE_OUTPUT_PATH}/${PYTEST_SOURCES})
   endif(RDK_BUILD_PYTHON_WRAPPERS)
 endmacro(add_pytest)


update static linkage too

update static linkage too

--- Code/cmake/Modules/RDKitUtils.cmake
+++ Code/cmake/Modules/RDKitUtils.cmake
@@ -55,6 +55,15 @@
               COMPONENT runtime )
       if(RDK_INSTALL_STATIC_LIBS)
         add_library(${RDKLIB_NAME}_static ${RDKLIB_SOURCES})
+
+        foreach(linkLib ${RDKLIB_LINK_LIBRARIES})
+          if(${linkLib} MATCHES "^(Boost)|(Thread)")
+            set(rdk_static_link_libraries "${rdk_static_link_libraries}${linkLib};")
+          else()
+            set(rdk_static_link_libraries "${rdk_static_link_libraries}${linkLib}_static;")
+          endif()
+        endforeach()
+        target_link_libraries(${RDKLIB_NAME}_static PUBLIC ${rdk_static_link_libraries})
         target_link_libraries(${RDKLIB_NAME}_static PUBLIC rdkit_base)
         INSTALL(TARGETS ${RDKLIB_NAME}_static EXPORT ${RDKit_EXPORTED_TARGETS}
                 DESTINATION ${RDKit_LibDir}/${RDKLIB_DEST}


Applied quoting patch to make Windows happy, #2145

--- core/rosbuild/private.cmake
+++ core/rosbuild/private.cmake
@@ -76,9 +76,9 @@
   if("$ENV{PYTHONPATH}" STREQUAL "")
     message("WARNING: PYTHONPATH is not set.  This is almost certainly wrong. Check the ROS installation instructions for details on setting PYTHONPATH.")
   else("$ENV{PYTHONPATH}" STREQUAL "")
-    if(NOT $ENV{PYTHONPATH} MATCHES ".*roslib.*")
+    if(NOT "$ENV{PYTHONPATH}" MATCHES ".*roslib.*")
       message("WARNING: PYTHONPATH does not appear to contain roslib.  This is almost certainly wrong. Check the ROS installation instructions for details on setting PYTHONPATH.")
-    endif(NOT $ENV{PYTHONPATH} MATCHES ".*roslib.*")
+    endif(NOT "$ENV{PYTHONPATH}" MATCHES ".*roslib.*")
   endif("$ENV{PYTHONPATH}" STREQUAL "")
 endmacro(_rosbuild_check_pythonpath)


SuperBuild: qt4 check variable exists before calling TO_NATIVE_PATH

--- SuperBuild/CMake/External_qt4.cmake
+++ SuperBuild/CMake/External_qt4.cmake
@@ -43,10 +43,15 @@
   set(FT_INCLUDE ${_SB_FREETYPE_INCLUDE_DIRS})
 endif()

-file(TO_NATIVE_PATH ${FT_INCLUDE} FT_INCLUDE_NATIVE)
-file(TO_NATIVE_PATH ${SB_INSTALL_PREFIX} QT4_INSTALL_PREFIX_NATIVE)
-file(TO_NATIVE_PATH ${SB_INSTALL_PREFIX}/include QT4_INCLUDE_PREFIX_NATIVE)
-file(TO_NATIVE_PATH ${SB_INSTALL_PREFIX}/lib QT4_LIB_PREFIX_NATIVE)
+if(FT_INCLUDE)
+  file(TO_NATIVE_PATH ${FT_INCLUDE} FT_INCLUDE_NATIVE)
+endif()
+
+if(SB_INSTALL_PREFIX)
+  file(TO_NATIVE_PATH ${SB_INSTALL_PREFIX} QT4_INSTALL_PREFIX_NATIVE)
+  file(TO_NATIVE_PATH ${SB_INSTALL_PREFIX}/include QT4_INCLUDE_PREFIX_NATIVE)
+  file(TO_NATIVE_PATH ${SB_INSTALL_PREFIX}/lib QT4_LIB_PREFIX_NATIVE)
+endif()

 if(WIN32)
   set(QT4_BIN_EXT ".exe")


BUG: make the string static, otherwise the contents are gone when we exit the functions

Alex

--- CMake/FindPythonLibs.cmake
+++ CMake/FindPythonLibs.cmake
@@ -173,7 +173,7 @@

   FOREACH(_currentModule ${PY_STATIC_MODULES_LIST})
-    FILE(APPEND ${_filenameTmp} "int CMakeLoadPythonModule_${_currentModule}(void) \n{\n  char name[]=\"${PYTHON_MODULE_PREFIX}${_currentModule}\"; return PyImport_AppendInittab(name, init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n")
+    FILE(APPEND ${_filenameTmp} "int CMakeLoadPythonModule_${_currentModule}(void) \n{\n  static char name[]=\"${PYTHON_MODULE_PREFIX}${_currentModule}\"; return PyImport_AppendInittab(name, init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n")
   ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST})

   FILE(APPEND ${_filenameTmp} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n")


Do not append the revision hash to the package name for releases.

--- CMake/mitkSetupCPack.cmake
+++ CMake/mitkSetupCPack.cmake
@@ -38,7 +38,7 @@
 set(CPACK_STRIP_FILES ON)

 # append revision number if available
-if(MITK_REVISION_ID)
+if(MITK_REVISION_ID AND MITK_VERSION_PATCH STREQUAL "99")
   if(MITK_WC_TYPE STREQUAL "git")
     set(git_hash ${MITK_REVISION_ID})
     string(LENGTH "${git_hash}" hash_length)


FindMKL.cmake: fix a typo

FindMKL.cmake: fix a typo

--- CMakeModules/FindMKL.cmake
+++ CMakeModules/FindMKL.cmake
@@ -326,7 +326,7 @@
     if(NOT TARGET MKL::MKL)
         add_library(MKL::MKL UNKNOWN IMPORTED)
         set_target_properties(MKL::MKL PROPERTIES
-            IMPORTED_LOCATION             "${SQLITE3_LIBRARIES}"
+            IMPORTED_LOCATION             "${MKL_LIBRARIES}"
             INTERFACE_INCLUDE_DIRECTORIES "${MKL_INCLUDE_DIR}")
     endif()
 else()


[cmake] handling doxygen config file

[cmake] handling doxygen config file

--- CMakeModules/doxygen.cmake
+++ CMakeModules/doxygen.cmake
@@ -1,5 +1,5 @@
 include(FindDoxygen)
-
+configure_file("eos.doxygen.in" "${CMAKE_BINARY_DIR}/eos.doxygen")
 if(NOT DOXYGEN_FOUND)
   message(STATUS "Doxygen not found.  Contract documentation will not be generated.")
 else()


mock is not enforce for USE_MOCK

mock is not enforce for USE_MOCK

--- Modules/PackRPM.cmake
+++ Modules/PackRPM.cmake
@@ -254,39 +254,40 @@
     MACRO(USE_MOCK spec_in)
 	FIND_PROGRAM(MOCK mock)
 	IF(MOCK STREQUAL "MOCK-NOTFOUND")
-	    MESSAGE(FATAL_ERROR "mock is not found in PATH!")
+	    MESSAGE("mock is not found in PATH, mock support disabled.")
+	ELSE(MOCK STREQUAL "MOCK-NOTFOUND")
+	    IF(NOT DEFINED MOCK_RPM_DIST_TAG)
+		STRING(REGEX MATCH "^fc([1-9][0-9]*)"  _fedora_mock_dist "${RPM_DIST_TAG}")
+		STRING(REGEX MATCH "^el([1-9][0-9]*)"  _el_mock_dist "${RPM_DIST_TAG}")
+
+		IF (_fedora_mock_dist)
+		    STRING(REGEX REPLACE "^fc([1-9][0-9]*)" "fedora-\\1" MOCK_RPM_DIST_TAG "${RPM_DIST_TAG}")
+		ELSEIF (_el_mock_dist)
+		    STRING(REGEX REPLACE "^el([1-9][0-9]*)" "epel-\\1" MOCK_RPM_DIST_TAG "${RPM_DIST_TAG}")
+		ELSE (_fedora_mock_dist)
+		    SET(MOCK_RPM_DIST_TAG "fedora-devel")
+		ENDIF(_fedora_mock_dist)
+		#MESSAGE ("MOCK_RPM_DIST_TAG=${MOCK_RPM_DIST_TAG}")
+	    ENDIF(NOT DEFINED MOCK_RPM_DIST_TAG)
+
+	    SETTING_FILE_GET_VARIABLE(_archStr BuildArch ${spec_in} ":")
+	    IF(NOT _archStr STREQUAL "noarch")
+		SET(_prj_srpm_path "${RPM_BUILD_SRPMS}/${PROJECT_NAME}-${PRJ_VER}-${PRJ_RELEASE}.src.rpm")
+		ADD_CUSTOM_TARGET(rpm_mock_i386
+		    COMMAND ${CMAKE_COMMAND} -E make_directory ${RPM_BUILD_RPMS}/i386
+		    COMMAND ${MOCK} -r  "${MOCK_RPM_DIST_TAG}-i386" --resultdir="${RPM_BUILD_RPMS}/i386" ${_prj_srpm_path}
+		    DEPENDS ${_prj_srpm_path}
+		    )
+
+		ADD_CUSTOM_TARGET(rpm_mock_x86_64
+		    COMMAND ${CMAKE_COMMAND} -E make_directory ${RPM_BUILD_RPMS}/x86_64
+		    COMMAND ${MOCK} -r  "${MOCK_RPM_DIST_TAG}-x86_64" --resultdir="${RPM_BUILD_RPMS}/x86_64" ${_prj_srpm_path}
+		    DEPENDS ${_prj_srpm_path}
+		    )
+
+	    ENDIF(NOT _archStr STREQUAL "noarch")
 	ENDIF(MOCK STREQUAL "MOCK-NOTFOUND")

-	IF(NOT DEFINED MOCK_RPM_DIST_TAG)
-	    STRING(REGEX MATCH "^fc([1-9][0-9]*)"  _fedora_mock_dist "${RPM_DIST_TAG}")
-	    STRING(REGEX MATCH "^el([1-9][0-9]*)"  _el_mock_dist "${RPM_DIST_TAG}")
-
-	    IF (_fedora_mock_dist)
-		STRING(REGEX REPLACE "^fc([1-9][0-9]*)" "fedora-\\1" MOCK_RPM_DIST_TAG "${RPM_DIST_TAG}")
-	    ELSEIF (_el_mock_dist)
-		STRING(REGEX REPLACE "^el([1-9][0-9]*)" "epel-\\1" MOCK_RPM_DIST_TAG "${RPM_DIST_TAG}")
-	    ELSE (_fedora_mock_dist)
-		SET(MOCK_RPM_DIST_TAG "fedora-devel")
-	    ENDIF(_fedora_mock_dist)
-	    #MESSAGE ("MOCK_RPM_DIST_TAG=${MOCK_RPM_DIST_TAG}")
-	ENDIF(NOT DEFINED MOCK_RPM_DIST_TAG)
-
-	SETTING_FILE_GET_VARIABLE(_archStr BuildArch ${spec_in} ":")
-	IF(NOT _archStr STREQUAL "noarch")
-	    SET(_prj_srpm_path "${RPM_BUILD_SRPMS}/${PROJECT_NAME}-${PRJ_VER}-${PRJ_RELEASE}.src.rpm")
-	    ADD_CUSTOM_TARGET(rpm_mock_i386
-		COMMAND ${CMAKE_COMMAND} -E make_directory ${RPM_BUILD_RPMS}/i386
-		COMMAND ${MOCK} -r  "${MOCK_RPM_DIST_TAG}-i386" --resultdir="${RPM_BUILD_RPMS}/i386" ${_prj_srpm_path}
-		DEPENDS ${_prj_srpm_path}
-		)
-
-	    ADD_CUSTOM_TARGET(rpm_mock_x86_64
-		COMMAND ${CMAKE_COMMAND} -E make_directory ${RPM_BUILD_RPMS}/x86_64
-		COMMAND ${MOCK} -r  "${MOCK_RPM_DIST_TAG}-x86_64" --resultdir="${RPM_BUILD_RPMS}/x86_64" ${_prj_srpm_path}
-		DEPENDS ${_prj_srpm_path}
-		)
-
-	ENDIF(NOT _archStr STREQUAL "noarch")
     ENDMACRO(USE_MOCK)

 ENDIF(NOT DEFINED _PACK_RPM_CMAKE_)


COMP: Added missing test dependency on the executable.

--- CMake/mitkTestPluginGenerator.cmake
+++ CMake/mitkTestPluginGenerator.cmake
@@ -10,11 +10,12 @@
   endif()

   add_test(NAME mitkPluginGeneratorCreateTest
-           COMMAND MITKPluginGenerator --project-name "${proj}" --project-app-name "TestApp"
-                           -ps org.test.plugin -pn "Test Plugin" -vn "Test View"
-                           -o ${test_project_out_dir} -y
+           COMMAND ${exec_target} --project-name "${proj}" --project-app-name "TestApp"
+                                  -ps org.test.plugin -pn "Test Plugin" -vn "Test View"
+                                  -o ${test_project_out_dir} -y
           )
   set_tests_properties(mitkPluginGeneratorCreateTest PROPERTIES
+                       DEPENDS ${exec_target}
                        LABELS "MITK;BlueBerry")

   if(CMAKE_CONFIGURATION_TYPES)


- do not re-generate export.h and test.h if they have not changed (#1901)

--- Code/cmake/Modules/RDKitUtils.cmake
+++ Code/cmake/Modules/RDKitUtils.cmake
@@ -167,6 +167,13 @@
   endif(RDK_BUILD_PYTHON_WRAPPERS)
 endmacro(add_pytest)

+function(computeMD5 target md5chksum)
+  execute_process(COMMAND ${CMAKE_COMMAND} -E md5sum ${target} OUTPUT_VARIABLE md5list)
+  string(REGEX REPLACE "([a-z0-9]+)" "\\1;" md5list "${md5list}")
+  list(GET md5list 0 md5)
+  set(${md5chksum} ${md5} PARENT_SCOPE)
+endfunction(computeMD5)
+
 function(downloadAndCheckMD5 url target md5chksum)
   if (NOT ${url} EQUAL "")
     get_filename_component(targetDir ${target} PATH)
@@ -187,15 +194,28 @@
       MESSAGE(FATAL_ERROR "The download of ${url} failed.")
     endif()
     if (NOT ${md5chksum} EQUAL "")
-      execute_process(COMMAND ${CMAKE_COMMAND} -E md5sum ${target} OUTPUT_VARIABLE md5list)
-      string(REGEX REPLACE "([a-z0-9]+)" "\\1;" md5list "${md5list}")
-      list(GET md5list 0 md5)
+      computeMD5(${target} md5)
       if (NOT md5 STREQUAL ${md5chksum})
         MESSAGE(FATAL_ERROR "The md5 checksum for ${target} is incorrect; expected: ${md5chksum}, found: ${md5}")
       endif()
     endif()
   endif()
 endfunction(downloadAndCheckMD5)
+
+function(overwriteIfChanged src dest)
+  set(overwrite TRUE)
+  if (EXISTS "${dest}")
+    computeMD5("${dest}" destMD5)
+    computeMD5("${src}" srcMD5)
+    if (${destMD5} STREQUAL ${srcMD5})
+      set(overwrite FALSE)
+    endif()
+  endif()
+  if (overwrite)
+    get_filename_component(destDir "${dest}" DIRECTORY)
+    file(COPY "${src}" DESTINATION "${destDir}")
+  endif()
+endfunction(overwriteIfChanged)

 function(createExportTestHeaders)
   file(GLOB_RECURSE cmakeLists LIST_DIRECTORIES false
@@ -212,7 +232,8 @@
   endforeach()
   list(REMOVE_DUPLICATES exportLibs)
   list(SORT exportLibs)
-  file(WRITE "${CMAKE_SOURCE_DIR}/Code/RDBoost/export.h"
+  set(exportPath "Code/RDBoost/export.h")
+  file(WRITE "${CMAKE_BINARY_DIR}/${exportPath}"
     "// auto-generated __declspec definition header\n"
     "#pragma once\n"
     "#ifndef SWIG\n"
@@ -223,12 +244,13 @@
     "\n"
     "#include <boost/config.hpp>\n"
     "#endif\n")
-  file(WRITE "${CMAKE_SOURCE_DIR}/Code/RDBoost/test.h"
+  set(testPath "Code/RDBoost/test.h")
+  file(WRITE "${CMAKE_BINARY_DIR}/${testPath}"
     "// auto-generated header to be imported in all cpp tests\n"
     "#pragma once\n")
   foreach(exportLib ${exportLibs})
     string(TOUPPER "${exportLib}" exportLib)
-    file(APPEND "${CMAKE_SOURCE_DIR}/Code/RDBoost/export.h"
+    file(APPEND "${CMAKE_BINARY_DIR}/${exportPath}"
       "\n"
       "// RDKIT_${exportLib}_EXPORT definitions\n"
       "#if defined(BOOST_HAS_DECLSPEC) && defined(RDKIT_DYN_LINK) && !defined(SWIG)\n"
@@ -242,10 +264,12 @@
       "#define RDKIT_${exportLib}_EXPORT\n"
       "#endif\n"
       "// RDKIT_${exportLib}_EXPORT end definitions\n")
-    file(APPEND "${CMAKE_SOURCE_DIR}/Code/RDBoost/test.h"
+    file(APPEND "${CMAKE_BINARY_DIR}/${testPath}"
       "\n"
       "#ifdef RDKIT_${exportLib}_BUILD\n"
       "#undef RDKIT_${exportLib}_BUILD\n"
       "#endif\n")
   endforeach()
+  overwriteIfChanged("${CMAKE_BINARY_DIR}/${exportPath}" "${CMAKE_SOURCE_DIR}/${exportPath}")
+  overwriteIfChanged("${CMAKE_BINARY_DIR}/${testPath}" "${CMAKE_SOURCE_DIR}/${testPath}")
 endfunction(createExportTestHeaders)


COMP (#6092): temporarly disable ug writer test

--- Modules/MitkExt/Testing/files.cmake
+++ Modules/MitkExt/Testing/files.cmake
@@ -17,7 +17,7 @@
   mitkToolManagerTest.cpp
 )
 SET(MODULE_IMAGE_TESTS
-  mitkUnstructuredGridVtkWriterTest.cpp
+  # mitkUnstructuredGridVtkWriterTest.cpp
   mitkCompressedImageContainerTest.cpp
   mitkCylindricToCartesianFilterTest.cpp
   mitkExtractImageFilterTest.cpp


SuperBuild: monteverdi is no longer an external project to OTB

--- SuperBuild/CMake/External_mvd.cmake
+++ SuperBuild/CMake/External_mvd.cmake
@@ -1,56 +0,0 @@
-#
-# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
-#
-# This file is part of Orfeo Toolbox
-#
-#     https://www.orfeo-toolbox.org/
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-if( __EXTERNAL_MVD__)
-  return()
-else()
-  set(__EXTERNAL_MVD__ 1)
-endif()
-
-SETUP_SUPERBUILD(MVD)
-
-set(MONTEVERDI_GIT_TAG "develop" CACHE STRING "branch name of monteverdi to build. Default is 'develop'")
-
-# declare dependencies
-ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(MVD OTB QWT QT4)
-
-set(MVD_SB_CONFIG)
-ADD_SUPERBUILD_CMAKE_VAR(MVD OTB_DIR)
-ADD_SUPERBUILD_CMAKE_VAR(MVD QWT_INCLUDE_DIR)
-ADD_SUPERBUILD_CMAKE_VAR(MVD QWT_LIBRARY)
-ADD_SUPERBUILD_CMAKE_VAR(MVD QT_QMAKE_EXECUTABLE)
-
-#TODO: control build testing via cmake variable properly
-
-ExternalProject_Add(MVD
-  PREFIX MVD
-  GIT_REPOSITORY "https://git@git.orfeo-toolbox.org/git/monteverdi2.git"
-  GIT_TAG "${MONTEVERDI_GIT_TAG}"
-  SOURCE_DIR ${MVD_SB_SRC}
-  BINARY_DIR ${MVD_SB_BUILD_DIR}
-  INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
-  DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
-  DEPENDS ${MVD_DEPENDENCIES}
-  CMAKE_CACHE_ARGS ${SB_CMAKE_CACHE_ARGS}
-  -DMonteverdi_INSTALL_LIB_DIR:STRING=lib
-  -DOTB_DATA_ROOT:STRING=${OTB_DATA_ROOT}
-  ${MVD_SB_CONFIG}
-  CMAKE_COMMAND ${SB_CMAKE_COMMAND}
-)


BUG: bug_stack_6s different flag needed for mingw

--- CMake/OTBSetStandardCompilerFlags.cmake
+++ CMake/OTBSetStandardCompilerFlags.cmake
@@ -135,16 +135,19 @@
   # Since CMake 2.8.11, the size of the stack is not modified by CMake on
   # windows platform, it uses the default size: with visual compiler it is 1Mbyte
   # which is to lower for us (thanks to 6S code).
-  if(WIN32)
+  if(MSVC)
     if (${CMAKE_VERSION} VERSION_GREATER "2.8.10.2")
       if("${CMAKE_EXE_LINKER_FLAGS}" MATCHES "/STACK:[0-9]+")
           message(STATUS "The size of the stack is already defined, so we dont't modified it.")
       else()
           set(OTB_REQUIRED_LINK_FLAGS "${OTB_REQUIRED_LINK_FLAGS} /STACK:10000000")
-          message(STATUS "Increase the size of the stack to 10Mbytes.")
-      endif()
-    endif()
-  endif()
+          message(STATUS "The stack size is set to 10 Mbytes (/STACK:10000000).")
+      endif()
+    endif() #if (${CMAKE_VERSION..
+  else(MINGW)
+    set(OTB_REQUIRED_LINK_FLAGS "${OTB_REQUIRED_LINK_FLAGS} -Wl,--stack,10000000")
+    message(STATUS "The stack size is set to 10 Mbytes (-Wl,--stack,10000000).")
+  endif() # if(MSVC)

   # On Visual Studio 8 MS deprecated C. This removes all 1.276E1265 security
   # warnings


BUG: Force static build of JsonCpp

BUG: Force static build of JsonCpp

--- CMake/Superbuild/External_JsonCpp.cmake
+++ CMake/Superbuild/External_JsonCpp.cmake
@@ -62,14 +62,17 @@
     CMAKE_GENERATOR ${gen}
     CMAKE_ARGS
       -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+      -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
       -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
       -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-      -DCMAKE_INSTALL_PREFIX:PATH=${${proj}_DIR}
+      -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
+      -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
       -DCMAKE_BUILD_TYPE:STRING=${build_type}
       ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
-      -DBUILD_SHARED_LIBS:BOOL=${shared}
-      -DJSONCPP_LIB_BUILD_SHARED:BOOL=${shared}
-      -DJSONCPP_WITH_TESTS:BOOL=OFF )
+      -DBUILD_SHARED_LIBS:BOOL=OFF
+      -DJSONCPP_LIB_BUILD_SHARED:BOOL=OFF
+      -DJSONCPP_WITH_TESTS:BOOL=OFF
+    INSTALL_COMMAND "" )

 else( NOT DEFINED ${proj}_DIR AND NOT ${USE_SYSTEM_JSONCPP} )
   if( ${USE_SYSTEM_JSONCPP} )


Fix android toolchain - now find_XXX works

--- CMake/toolchain/android.toolchain.cmake
+++ CMake/toolchain/android.toolchain.cmake
@@ -961,7 +961,7 @@
 set( BUILD_ANDROID True )

 # where is the target environment
-set( CMAKE_FIND_ROOT_PATH "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" )
+set( CMAKE_FIND_ROOT_PATH "/" "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" )

 # only search for libraries and includes in the ndk toolchain
 set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )


Changed elseif LINUX to UNIX, LINUX doesn't exist as a cmake variable

--- cmake/externals/medInria.cmake
+++ cmake/externals/medInria.cmake
@@ -48,7 +48,7 @@

 if(APPLE)
     set(medInria_exe_PATH ${binary_dir}/bin/medInria.app/Contents/MacOS/medInria PARENT_SCOPE)
-elseif(LINUX)
+elseif(UNIX)
     set(medInria_exe_PATH ${binary_dir}/bin/medInria PARENT_SCOPE)
 endif()


fixed typo in findMatlab.cmake

fixed typo in findMatlab.cmake

--- cmake/modules/FindMatlab.cmake
+++ cmake/modules/FindMatlab.cmake
@@ -89,7 +89,7 @@
             PATHS ${MATLAB_ROOT_PATHS}
             PATH_SUFFIXES ${MATLAB_LIB_SUFFIXES}
             NO_DEFAULT_PATH)
-        find_library(MATLAB_QT_QTCORE_LIBRARY libQtXml.so.4
+        find_library(MATLAB_QT_QTXML_LIBRARY libQtXml.so.4
             HINTS ${MATLAB_ROOT_HINTS}
             PATHS ${MATLAB_ROOT_PATHS}
             PATH_SUFFIXES ${MATLAB_LIB_SUFFIXES}
@@ -105,7 +105,7 @@
             PATHS ${MATLAB_ROOT_PATHS}
             PATH_SUFFIXES ${MATLAB_LIB_SUFFIXES}
             NO_DEFAULT_PATH)
-        find_library(MATLAB_QT_QTCORE_LIBRARY QtXml
+        find_library(MATLAB_QT_QTXML_LIBRARY QtXml
             HINTS ${MATLAB_ROOT_HINTS}
             PATHS ${MATLAB_ROOT_PATHS}
             PATH_SUFFIXES ${MATLAB_LIB_SUFFIXES}


Fix indentation in Unicode configure checks

--- cmake/ConfigureChecks.cmake
+++ cmake/ConfigureChecks.cmake
@@ -603,23 +603,23 @@
 set(HAVE_USABLE_WCHAR_T 0)
 set(Py_UNICODE_SIZE 2)

-if   ("${Py_UNICODE_SIZE}" STREQUAL "${SIZEOF_WCHAR_T}")
+if("${Py_UNICODE_SIZE}" STREQUAL "${SIZEOF_WCHAR_T}")
   set(PY_UNICODE_TYPE wchar_t)
   set(HAVE_USABLE_WCHAR_T 1)
   message(STATUS "Using wchar_t for unicode")
-else ("${Py_UNICODE_SIZE}" STREQUAL "${SIZEOF_WCHAR_T}")
-
-  if   ("${Py_UNICODE_SIZE}" STREQUAL "${SIZEOF_SHORT}")
+else("${Py_UNICODE_SIZE}" STREQUAL "${SIZEOF_WCHAR_T}")
+
+  if("${Py_UNICODE_SIZE}" STREQUAL "${SIZEOF_SHORT}")
     set(PY_UNICODE_TYPE "unsigned short")
     set(HAVE_USABLE_WCHAR_T 0)
     message(STATUS "Using unsigned short for unicode")
-  else ("${Py_UNICODE_SIZE}" STREQUAL "${SIZEOF_SHORT}")
-
-    if   ("${Py_UNICODE_SIZE}" STREQUAL "${SIZEOF_LONG}")
+  else("${Py_UNICODE_SIZE}" STREQUAL "${SIZEOF_SHORT}")
+
+    if("${Py_UNICODE_SIZE}" STREQUAL "${SIZEOF_LONG}")
       set(PY_UNICODE_TYPE "unsigned long")
       set(HAVE_USABLE_WCHAR_T 0)
       message(STATUS "Using unsigned long for unicode")
-    else ("${Py_UNICODE_SIZE}" STREQUAL "${SIZEOF_LONG}")
+    else("${Py_UNICODE_SIZE}" STREQUAL "${SIZEOF_LONG}")

       if(Py_USING_UNICODE)
         message(SEND_ERROR "No usable unicode type found, disable Py_USING_UNICODE to be able to build Python")


Reordered warning options

Reordered warning options

--- cmake/DevBaseCompiler.cmake
+++ cmake/DevBaseCompiler.cmake
@@ -63,7 +63,7 @@
     # -Wconversion
     # -Wsign-conversion
     set(CMAKE_CXX_FLAGS
-        "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wcast-qual -Wwrite-strings -Werror=strict-aliasing -pedantic -fno-strict-overflow -ftemplate-backtrace-limit=0"
+        "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wcast-qual -Wwrite-strings -Werror=strict-aliasing -fno-strict-overflow -ftemplate-backtrace-limit=0"
     )

     # This results in an error on mingw/gcc 4.8/windows. Some warning about


isRequired arg was not checked

isRequired arg was not checked

--- cmake/FindSimModSuite.cmake
+++ cmake/FindSimModSuite.cmake
@@ -20,7 +20,7 @@
   foreach(lib ${libs})
     unset(simlib CACHE)
     find_library(simlib "${lib}" PATHS ${SIMMETRIX_LIB_DIR})
-    if(isRequired AND simlib MATCHES "^simlib-NOTFOUND$")
+    if(${isRequired} AND simlib MATCHES "^simlib-NOTFOUND$")
       message(FATAL_ERROR "simmetrix library ${lib} not found in ${SIMMETRIX_LIB_DIR}")
     endif()
     set("SIMMODSUITE_${lib}_FOUND" TRUE CACHE INTERNAL "SimModSuite library present")


Set minimum cmake version

Set minimum cmake version

--- cmake/compiler_option.cmake
+++ cmake/compiler_option.cmake
@@ -1,3 +1,5 @@
+CMAKE_MINIMUM_REQUIRED( VERSION 2.8.8 FATAL_ERROR )
+
 INCLUDE( CMakeParseArguments )
 INCLUDE( cmake_lib_utils )


Default zeromq version updated

Default zeromq version updated

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -109,7 +109,7 @@
 hunter_config(spdlog VERSION 1.0.0-p0)
 hunter_config(szip VERSION 2.1.0-p1)
 hunter_config(wxWidgets VERSION 3.0.2)
-hunter_config(ZeroMQ VERSION 4.1.4)
+hunter_config(ZeroMQ VERSION 4.1.4-p2)
 hunter_config(Protobuf VERSION 3.0.0-beta-2)

 if(MINGW OR MSVC80)


Fix merge issues in gflags cmake file

Fix merge issues in gflags cmake file

--- cmake/external/gflags.cmake
+++ cmake/external/gflags.cmake
@@ -20,15 +20,8 @@
         -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF
         -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON)

-<<<<<<< HEAD
 ADD_LIBRARY(gflags STATIC IMPORTED)
 SET_PROPERTY(TARGET gflags PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/gflags_project/src/gflags/lib/libgflags.a)
 ADD_DEPENDENCIES(gflags gflags_project)
 SET(gflags_LIBRARIES "")
 LIST(APPEND gflags_LIBRARIES gflags)
-=======
-ADD_LIBRARY(Gflags STATIC IMPORTED)
-SET_PROPERTY(TARGET Gflags PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/gflags_project/src/gflags/lib/libgflags.a)
-SET(Gflags_LIBRARIES "")
-LIST(APPEND Gflags_LIBRARIES Gflags)
->>>>>>> a66edd4dc5a435483d5238db0b91e0a74aa51a71


[CMake] llvm_add_library: Add handling of the parameter ADDITIONAL_HEADERS to pass through to process_source.

I was insightless then about unknown optional parameters.
(Consider that LINK_LIBS foo bar ADDITIONAL_HEADERS qux quux)

Suggested by Michael Kruse. Thanks!

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -174,17 +174,21 @@
 #     Same as the variable LLVM_LINK_COMPONENTS.
 #   LINK_LIBS lib_targets...
 #     Same semantics as target_link_libraries().
-#   ADDITIONAL_HEADERS (implemented in LLVMProcessSources)
+#   ADDITIONAL_HEADERS
 #     May specify header files for IDE generators.
 #   )
 function(llvm_add_library name)
   cmake_parse_arguments(ARG
     "MODULE;SHARED;STATIC"
     "OUTPUT_NAME"
-    "DEPENDS;LINK_COMPONENTS;LINK_LIBS"
+    "ADDITIONAL_HEADERS;DEPENDS;LINK_COMPONENTS;LINK_LIBS"
     ${ARGN})
   list(APPEND LLVM_COMMON_DEPENDS ${ARG_DEPENDS})
-  llvm_process_sources(ALL_FILES ${ARG_UNPARSED_ARGUMENTS})
+  if(ARG_ADDITIONAL_HEADERS)
+    # Pass through ADDITIONAL_HEADERS.
+    set(ARG_ADDITIONAL_HEADERS ADDITIONAL_HEADERS ${ARG_ADDITIONAL_HEADERS})
+  endif()
+  llvm_process_sources(ALL_FILES ${ARG_UNPARSED_ARGUMENTS} ${ARG_ADDITIONAL_HEADERS})

   if(ARG_MODULE)
     if(ARG_SHARED OR ARG_STATIC)


update re2c to v2.2

update re2c to v2.2

--- cmake/modules/GetRE2C.cmake
+++ cmake/modules/GetRE2C.cmake
@@ -20,7 +20,7 @@
     download_project(
             PROJ                re2c
             GIT_REPOSITORY      https://github.com/skvadrik/re2c.git
-            GIT_TAG             2.1.1
+            GIT_TAG             2.2
             GIT_PROGRESS        1
             ${UPDATE_DISCONNECTED_IF_AVAILABLE}
     )


avoid useless system check on Windows

avoid useless system check on Windows

--- cmake/os/WindowsCache.cmake
+++ cmake/os/WindowsCache.cmake
@@ -57,6 +57,7 @@
 SET(HAVE_FCNTL_NONBLOCK CACHE  INTERNAL "")
 SET(HAVE_FCONVERT CACHE  INTERNAL "")
 SET(HAVE_FDATASYNC CACHE  INTERNAL "")
+SET(HAVE_DECL_FDATASYNC CACHE INTERNAL "")
 SET(HAVE_FENV_H CACHE  INTERNAL "")
 SET(HAVE_FESETROUND CACHE  INTERNAL "")
 SET(HAVE_FGETLN CACHE  INTERNAL "")


cmake: set new policy only when available

--- cmake/qibuild/general.cmake
+++ cmake/qibuild/general.cmake
@@ -37,7 +37,10 @@
 cmake_policy(SET CMP0011 NEW)
 # if() recognizes numbers and boolean constants.
 cmake_policy(SET CMP0012 NEW)
-cmake_policy(SET CMP0017 NEW)
+
+if(CMAKE_VERSION VERSION_GREATER "2.8.3")
+  cmake_policy(SET CMP0017 NEW)
+endif()

 # We use RUNTIME_DIRECTORY_<CONFIG> for visual studio
 # which is a very nice feature but that only came up with


ManageZanata: Default of LOCALES should be searched client side locales

--- Modules/ManageZanata.cmake
+++ Modules/ManageZanata.cmake
@@ -9,9 +9,6 @@
 #   - ManageFile
 #   - ManageMessage
 #   - ManageString
-#
-# Read following variables:
-#   - MANAGE_TRANSLATION_LOCALES: Locales that would be processed.
 #
 # Define following functions:
 #   MANAGE_ZANATA([<serverUrl>] [YES]
@@ -76,8 +73,7 @@
 #           Default: mvn -e
 #         + LOCALES locales: Locales to sync with Zanata.
 #             Specify the locales to sync with this Zanata server.
-#             If not specified, it uses MANAGE_TRANSLATION_LOCALES,
-#             which is produced by MANAGE_POT_FILE.
+#             If not specified, it uses client side system locales.
 #         + SRC_DIR dir: (Optional) Directory to put source documents
 #             (e.g. .pot).
 #           Default: CMAKE_CURRENT_SOURCE_DIR
@@ -260,9 +256,6 @@
     ELSE()
 	SET(zanataXml "${CMAKE_CURRENT_SOURCE_DIR}/zanata.xml")
     ENDIF()
-    IF(NOT _o_LOCALES)
-	SET(_o_LOCALES "${MANAGE_TRANSLATION_LOCALES}")
-    ENDIF()
     IF(DEFINED _o_GENERATE_ZANATA_XML)
 	ADD_CUSTOM_TARGET_COMMAND(zanata_xml
 	    OUTPUT "${zanataXml}"


ctkMacroCompilePythonScript - Do not add Copy target to ALL

The "copy" target is a convenient target allowing to only copy the file
without recompiling.

By adding it to "ALL", two copy of each input files were
happening simultaneously. while doing parallel build, this could lead
to a race condition.

--- CMake/ctkMacroCompilePythonScript.cmake
+++ CMake/ctkMacroCompilePythonScript.cmake
@@ -32,6 +32,7 @@
     SET(MY_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
   ENDIF()

+  SET(input_files)
   SET(copied_files)
   SET(copied_python_files)
   FOREACH(file ${MY_SCRIPTS})
@@ -48,7 +49,8 @@
       file(RELATIVE_PATH tgt_file ${CMAKE_CURRENT_BINARY_DIR} ${file})
       SET(tgt "${MY_DESTINATION_DIR}/${tgt_file}")
     ENDIF()
-
+
+    LIST(APPEND input_files ${src})
     ADD_CUSTOM_COMMAND(DEPENDS ${src}
                         COMMAND ${CMAKE_COMMAND} -E copy ${src} ${tgt}
                         OUTPUT ${tgt}
@@ -62,6 +64,7 @@
       SET(src "${CMAKE_CURRENT_SOURCE_DIR}/${file}")
       SET(tgt "${MY_DESTINATION_DIR}/${file}")

+      LIST(APPEND input_files ${src})
       ADD_CUSTOM_COMMAND(DEPENDS ${src}
                           COMMAND ${CMAKE_COMMAND} -E copy ${src} ${tgt}
                           OUTPUT ${tgt}
@@ -70,11 +73,9 @@
     ENDFOREACH()
   ENDIF()

-  IF(copied_files)
-    ADD_CUSTOM_TARGET(Copy${MY_TARGET_NAME}PythonFiles
-                      ALL
-                      DEPENDS ${copied_files})
-  ENDIF()
+  IF(input_files)
+    ADD_CUSTOM_TARGET(Copy${MY_TARGET_NAME}PythonFiles DEPENDS ${input_files} ${copied_files})
+  ENDIF()

   # Byte compile the Python files.
   SET(compile_all_script "${CMAKE_CURRENT_BINARY_DIR}/compile_${MY_TARGET_NAME}_python_scripts.py")


somehow working vtk python installer

somehow working vtk python installer

--- CMake/mitkMacroInstallPython.cmake
+++ CMake/mitkMacroInstallPython.cmake
@@ -1,82 +1,116 @@
+
+
+
+function(MITK_FUNCTION_INSTALL_PYTHON_LIB _target_filename _target_lib _target_conf)
+
+  install(FILES ${_target_lib}
+                DESTINATION bin
+                CONFIGURATIONS ${_target_conf})
+
+  if(UNIX AND NOT APPLE)
+     install(CODE "file(RPATH_REMOVE
+                           FILE \"\${CMAKE_INSTALL_PREFIX}/bin/${_target_filename}\")")
+   endif()
+endfunction()

 macro(MITK_INSTALL_PYTHON)

-find_package(VTK REQUIRED)
+  find_package(VTK REQUIRED)

-# Wrapping tools
-#set(_VTK_PYTHON_TARGETS vtkWrappingPythonCore vtkWrappingTools)
-set(_VTK_PYTHON_TARGETS )
+  # all libs with a python loader module
+  set(_VTK_PYTHON_TARGETS )
+  # Wrapping tools and dependencies
+  set(_VTK_PYTHON_WRAPPED_MODULES vtkWrappingPythonCore vtkWrappingTools)
+  # additional utilities
+  set(_VTK_UTILITY_DEPS
+    verdict
+    vtksqlite
+    vtkproj4
+    vtkhdf5
+    vtkhdf5_hl
+    vtklibxml2
+    vtkgl2ps
+    vtkNetCDF_cxx
+    vtkNetCDF
+    vtkexoIIc
+    vtkoggtheora )

-# find all vtk python wrapped targets
-foreach(_lib ${VTK_LIBRARIES})
-  # exclude system libs
-  if(${_lib} MATCHES "^vtk.+")
-    # use only python wrapped modules
-    if(TARGET ${_lib}PythonD)
-      list(APPEND _VTK_PYTHON_TARGETS ${_lib}Python)
+  foreach(t ${_VTK_UTILITY_DEPS})
+    list(APPEND _VTK_PYTHON_WRAPPED_MODULES ${t})
+  endforeach()
+
+  # find all vtk python wrapped targets
+  foreach(_lib ${VTK_LIBRARIES})
+    # exclude system libs
+    if(${_lib} MATCHES "^vtk.+")
+      # use only python wrapped modules
+      if(TARGET ${_lib}PythonD)
+        list(APPEND _VTK_PYTHON_TARGETS ${_lib}Python)
+        list(APPEND _VTK_PYTHON_WRAPPED_MODULES ${_lib})
+      endif()
     endif()
-  endif()
-endforeach()
+  endforeach()

-foreach(_target ${_VTK_PYTHON_TARGETS})
+  # install all targets that are python wrapped
+  foreach(_lib ${_VTK_PYTHON_WRAPPED_MODULES})
+    get_target_property(_target_lib_debug   ${_lib} IMPORTED_LOCATION_DEBUG)
+    get_target_property(_target_lib_release ${_lib} IMPORTED_LOCATION_RELEASE)
+    get_filename_component(_target_filename_debug   "${_target_lib_debug}" NAME)
+    get_filename_component(_target_filename_release "${_target_lib_release}" NAME)

-  # the python target library of the module
-  set(_lib ${_target}D)
+    if(_target_lib_debug)
+      MITK_FUNCTION_INSTALL_PYTHON_LIB(${_target_filename_debug} ${_target_lib_debug} "Debug")
+    endif()

-  # get target properties
-  get_target_property(_target_lib_debug  ${_lib} IMPORTED_LOCATION_DEBUG)
-  get_target_property(_target_lib_release ${_lib} IMPORTED_LOCATION_RELEASE)
-  get_filename_component(_target_filename_debug "${_target_lib_debug}" NAME)
-  get_filename_component(_target_filename_release "${_target_lib_release}" NAME)
+    if(_target_lib_release)
+      MITK_FUNCTION_INSTALL_PYTHON_LIB(${_target_filename_release} ${_target_lib_release} "Release")
+    endif()
+  endforeach()

-  get_filename_component(_filepath_debug  ${_target_lib_debug} PATH)
-  get_filename_component(_filepath_release  ${_target_lib_release} PATH)
+  # install the python modules and loaders
+  foreach(_target ${_VTK_PYTHON_TARGETS})

-  MESSAGE(${_lib})
-  MESSAGE(${_filepath_debug})
+    set(_lib ${_target}D)

-   if(_filepath_debug)
-     set(_python_mod_file_debug ${_target}${CMAKE_SHARED_LIBRARY_SUFFIX})
-     install(FILES "${_filepath_debug}/${_python_mod_file_debug}"
-                   DESTINATION bin
-                   CONFIGURATIONS Debug)
-        install(CODE "file(RPATH_REMOVE
-                              FILE \"\${CMAKE_INSTALL_PREFIX}/bin/${_python_mod_file_debug}\")")
-        MESSAGE("${_filepath_debug}/${_python_mod_file_debug}")
-   endif()
+    # get target properties
+    get_target_property(_target_lib_debug   ${_lib} IMPORTED_LOCATION_DEBUG)
+    get_target_property(_target_lib_release ${_lib} IMPORTED_LOCATION_RELEASE)
+    get_filename_component(_target_filename_debug   "${_target_lib_debug}" NAME)
+    get_filename_component(_target_filename_release "${_target_lib_release}" NAME)

-  #MESSAGE(${_target_lib_debug})
+    get_filename_component(_filepath_debug   ${_target_lib_debug} PATH)
+    get_filename_component(_filepath_release ${_target_lib_release} PATH)

-  if(_target_lib_debug)
-    install(FILES ${_target_lib_debug}
-                  DESTINATION bin
-                  CONFIGURATIONS Debug)
-  endif()
+    #MESSAGE(${_lib})
+    #MESSAGE(${_filepath_debug})

-  if(_target_lib_release)
-    install(FILES ${_target_lib_release}
-                  DESTINATION bin
-                  CONFIGURATIONS Release)
-  endif()
-  # remove rpath
-  if(UNIX AND NOT APPLE)
-     if(_target_filename_debug)
-       install(CODE "file(RPATH_REMOVE
-                             FILE \"\${CMAKE_INSTALL_PREFIX}/bin/${_target_filename_debug}\")")
-     endif()
+    if(_target_lib_debug)
+      MITK_FUNCTION_INSTALL_PYTHON_LIB(${_target_filename_debug} ${_target_lib_debug} "Debug")
+    endif()

-     if(_target_filename_release)
-       install(CODE "file(RPATH_REMOVE
-                               FILE \"\${CMAKE_INSTALL_PREFIX}/bin/${_target_filename_release}\")")
-     endif()
-  endif()
-endforeach()
+    if(_target_lib_release)
+      MITK_FUNCTION_INSTALL_PYTHON_LIB(${_target_filename_release} ${_target_lib_release} "Release")
+    endif()

-# install vtk python
-install(DIRECTORY ${VTK_DIR}/Wrapping/Python/vtk
-        DESTINATION bin
-        USE_SOURCE_PERMISSIONS
-        COMPONENT Runtime)
+    # if the target is a wrapped module install the python module loader
+    # and make sure the vtk module is installed
+    if(_filepath_debug)
+      set(_python_mod_file ${_target}${CMAKE_SHARED_LIBRARY_SUFFIX})
+      MITK_FUNCTION_INSTALL_PYTHON_LIB( ${_python_mod_file} "${_filepath_debug}/${_python_mod_file}" "Debug")
+    endif()
+
+    if(_filepath_release)
+      set(_python_mod_file ${_target}${CMAKE_SHARED_LIBRARY_SUFFIX})
+      MITK_FUNCTION_INSTALL_PYTHON_LIB(${_python_mod_file} "${_filepath_release}/${_python_mod_file}" "Release")
+    endif()
+
+  endforeach()
+
+  # install vtk python
+  install(DIRECTORY ${VTK_DIR}/Wrapping/Python/vtk
+          DESTINATION bin
+          USE_SOURCE_PERMISSIONS
+          COMPONENT Runtime)

 endmacro(MITK_INSTALL_PYTHON)


Corrects an issue where a change to the target template may not generate the appropriate main.cs for that template after the initial build configure.

--- Tools/CMake/torque3d.cmake
+++ Tools/CMake/torque3d.cmake
@@ -624,7 +624,7 @@
 if(NOT EXISTS "${projectOutDir}/${PROJECT_NAME}.torsion")
     CONFIGURE_FILE("${cmakeDir}/template.torsion.in" "${projectOutDir}/${PROJECT_NAME}.torsion")
 endif()
-if(EXISTS "${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/game/main.cs.in" AND NOT EXISTS "${projectOutDir}/main.cs")
+if(EXISTS "${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/game/main.cs.in")
     CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/game/main.cs.in" "${projectOutDir}/main.cs")
 endif()
 if(WIN32)


TRAVIS: execute_process cannot attach test results to dashboard

--- Utilities/Maintenance/TravisBuild.cmake
+++ Utilities/Maintenance/TravisBuild.cmake
@@ -89,9 +89,10 @@
 if(NOT _build_rv EQUAL 0)
   do_submit()
 endif ()
-
-execute_process(COMMAND  ${CTEST_COMMAND} "-R" "Tu" "."
-  WORKING_DIRECTORY "${CTEST_BINARY_DIRECTORY}"
-  )
+#identify data required for failing test and make a micro OTB-Data archive.
+ctest_test      (BUILD "${CTEST_BINARY_DIRECTORY}" INCLUDE Tu RETURN_VALUE _test_rv)
+# execute_process(COMMAND  ${CTEST_COMMAND} "-R" "Tu" "."
+#   WORKING_DIRECTORY "${CTEST_BINARY_DIRECTORY}"
+#   )

 do_submit()


COMP: Removed debugging output and upgraded to requiring CMake2.8

--- DashboardScripts/tubetk_coverage.cmake
+++ DashboardScripts/tubetk_coverage.cmake
@@ -1,27 +1,27 @@
 ##############################################################################
-#
+#
 # Library:   TubeTK
-#
+#
 # Copyright 2010 Kitware Inc. 28 Corporate Drive,
 # Clifton Park, NY, 12065, USA.
-#
-# All rights reserved.
-#
+#
+# All rights reserved.
+#
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
-#
+#
 #       http://www.apache.org/licenses/LICENSE-2.0
-#
+#
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
+#
 ##############################################################################

-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 2.8)

 include( ${CTEST_SCRIPT_DIRECTORY}/../../tubetk_config.cmake )

@@ -31,8 +31,6 @@

 include( ${CTEST_SCRIPT_DIRECTORY}/tubetk_cmakecache.cmake )

-MESSAGE( "CTEST_BINARY_DIRECTORY = ${CTEST_BINARY_DIRECTORY}" )
-
 ctest_start( "$ENV{TUBETK_RUN_MODEL}" )
 ctest_configure( BUILD "${CTEST_BINARY_DIRECTORY}" )
 ctest_read_custom_files( "${CTEST_BINARY_DIRECTORY}" )
@@ -40,4 +38,3 @@
 ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" )
 ctest_coverage( BUILD "${CTEST_BINARY_DIRECTORY}" )
 ctest_submit()
-


buildsys: add dependency handling

buildsys: add dependency handling

--- cmake/Modules/eo_helper.cmake
+++ cmake/Modules/eo_helper.cmake
@@ -5,22 +5,24 @@
 #
 # The passed include snippet will just be added to the command

-macro(_rule_eox file include)
+macro(_rule_eox file include deps)
     add_custom_command(
        OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${file}.x
        COMMAND eolian_gen ${include} --gc --eo -o ${CMAKE_CURRENT_SOURCE_DIR}/${file}.x ${CMAKE_CURRENT_SOURCE_DIR}/${file}
        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file}
+       DEPENDS ${deps}
     )
 endmacro()

 # macro to create a eolian generated header file
 #
 # other details are like the eox rule
-macro(_rule_eoh file include)
+macro(_rule_eoh file include deps)
     add_custom_command(
        OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${file}.h
        COMMAND eolian_gen ${include} --gh --eo -o ${CMAKE_CURRENT_SOURCE_DIR}/${file}.h ${CMAKE_CURRENT_SOURCE_DIR}/${file}
        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file}
+       DEPENDS ${deps}
     )
 endmacro()

@@ -32,23 +34,41 @@
 #
 # Only .eo and .eot files in build_files will be used to setup a module

-function(eo_rule_create build_files include_dirs)
+function(eo_rule_create build_files relative_include_dirs)
    string(REPLACE "\n" "" EOLIAN_EO_DIR_WITHOUT_NEWLINE "${EOLIAN_EO_DIR}")
-   set(includes "-I${EOLIAN_EO_DIR_WITHOUT_NEWLINE}")

+   # add std includes
+   list(APPEND include_dirs
+      ${EOLIAN_EO_DIR_WITHOUT_NEWLINE}
+    )
+
+   # convert relative to absolut
+   foreach(relative_include_dir ${relative_include_dirs})
+      list(APPEND include_dirs
+        ${CMAKE_CURRENT_SOURCE_DIR}/${relative_include_dir}
+      )
+   endforeach()
+
+   # work with the absolut paths
    foreach(include_cmd ${include_dirs})
-      string(CONCAT includes "${includes}" " -I${CMAKE_CURRENT_SOURCE_DIR}/${include_cmd}")
+      # build include cmd
+      string(CONCAT includes "${includes}" " -I${include_cmd}")
+      # fetch dep files
+      file(GLOB_RECURSE files "${include_cmd}/*.eo")
+      foreach(file ${files})
+        list(APPEND dep_files ${file})
+      endforeach()
    endforeach()

    string(REPLACE " " ";" includes "${includes}")
    foreach(file ${build_files})
       get_filename_component(ext ${file} EXT)
       if (ext MATCHES "^\\.eo$")
-         _rule_eoh("${file}" "${includes}")
-         _rule_eox("${file}" "${includes}")
+         _rule_eoh("${file}" "${includes}" "${dep_files}")
+         _rule_eox("${file}" "${includes}" "${dep_files}")
       endif()
       if (ext MATCHES "^\\.eot$")
-         _rule_eoh("${file}" "${includes}")
+         _rule_eoh("${file}" "${includes}" "${dep_files}")
       endif()
     endforeach()
 endfunction()


just a change on the website

just a change on the website

--- CMakeModules/script_BuildPackage.cmake
+++ CMakeModules/script_BuildPackage.cmake
@@ -3,7 +3,7 @@
 # build a CPack driven installer package
 include (InstallRequiredSystemLibraries)
 set (CPACK_NSIS_MODIFY_PATH "ON")
-set (_WEBSITE "https://sites.google.com/site/bellonemauro")
+set (_WEBSITE "https://www.maurobellone.com")
 set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
 set (CPACK_PACKAGE_VERSION "${CMAKE_OTA_FULL_VERSION}")


Fix Xcode build. It does not like absolute path PCH include.

--- CMake/Modules/Urho3D-CMake-common.cmake
+++ CMake/Modules/Urho3D-CMake-common.cmake
@@ -657,11 +657,14 @@
                     COMMENT "Precompiling header file '${HEADER_FILENAME}' for ${CONFIG} configuration")
             endforeach ()
             # Use the precompiled header file
+            if (NOT XCODE)
+                set (PCH_DIR ${CMAKE_CURRENT_BINARY_DIR}/)
+            endif ()
             foreach (FILE ${SOURCE_FILES})
                 if (FILE MATCHES \\.cpp$)
                     get_property (NO_PCH SOURCE ${FILE} PROPERTY NO_PCH)
                     if (NOT NO_PCH)
-                        set_property (SOURCE ${FILE} APPEND_STRING PROPERTY COMPILE_FLAGS " -include ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}")
+                        set_property (SOURCE ${FILE} APPEND_STRING PROPERTY COMPILE_FLAGS " -include ${PCH_DIR}${HEADER_FILENAME}")
                     endif ()
                 endif ()
             endforeach ()


Added compiler flags for native optimization.