fix regression introduced in r1449 from what I fixed back in January for i#646

this fixes http://code.google.com/p/drmemory/issues/detail?id=943

SVN-Revision: 1480

--- make/cpp2asm_support.cmake
+++ make/cpp2asm_support.cmake
@@ -145,6 +145,12 @@
 # Assembler location and flags

 if (NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
+  if (UNIX)
+    # i#646: cmake 2.8.5 requires ASM-ATT to find as: but we don't want to change
+    # all our vars to have -ATT suffix so we set the search list instead.
+    # This must be done prior to enable_language(ASM).
+    set(CMAKE_ASM_COMPILER_INIT gas as)
+  endif (UNIX)
   # CMake does not support assembly with VS generators
   # (http://public.kitware.com/Bug/view.php?id=11536)
   # so we have to add our own custom commands and targets
@@ -162,9 +168,6 @@
   if (DEBUG)
     set(ASM_FLAGS "${ASM_FLAGS} -g")
   endif (DEBUG)
-  # i#646: cmake 2.8.5 requires ASM-ATT to find as: but we don't want to change
-  # all our vars to have -ATT suffix so we set the search list instead
-  set(CMAKE_ASM_COMPILER_INIT gas as)
 else (UNIX)
   if (X64)
     find_program(CMAKE_ASM_COMPILER ml64.exe HINTS "${cl_path}" DOC "path to assembler")


glfw3.1 prebuilt library directory added

--- cmake/FindGLFW.cmake
+++ cmake/FindGLFW.cmake
@@ -80,9 +80,11 @@
                 "${GLFW_LOCATION}/lib"
                 "${GLFW_LOCATION}/lib/x64"
                 "${GLFW_LOCATION}/lib-msvc110"
+                "${GLFW_LOCATION}/lib-vc2012"
                 "$ENV{GLFW_LOCATION}/lib"
                 "$ENV{GLFW_LOCATION}/lib/x64"
                 "$ENV{GLFW_LOCATION}/lib-msvc110"
+                "$ENV{GLFW_LOCATION}/lib-vc2012"
                 "${PROJECT_SOURCE_DIR}/extern/glfw/bin"
                 "${PROJECT_SOURCE_DIR}/extern/glfw/lib"
                 "$ENV{PROGRAMFILES}/GLFW/lib"


Detect a missing opusfile at configure time. Fixes #467.

--- cmake/FindOpus.cmake
+++ cmake/FindOpus.cmake
@@ -70,7 +70,7 @@
 # handle the QUIETLY and REQUIRED arguments and set OPUSFILE_FOUND to TRUE if
 # all listed variables are TRUE
 include( ${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake )
-FIND_PACKAGE_HANDLE_STANDARD_ARGS( Opus DEFAULT_MSG OPUS_LIBRARY OPUS_INCLUDE_DIR )
+FIND_PACKAGE_HANDLE_STANDARD_ARGS( Opus DEFAULT_MSG OPUSFILE_LIBRARY OPUS_LIBRARY OPUS_INCLUDE_DIR )

 set( OPUS_LIBRARIES ${OPUSFILE_LIBRARY} ${OPUS_LIBRARY} ${OGG_LIBRARIES} )
 set( OPUS_INCLUDE_DIRS ${OPUS_INCLUDE_DIR} ${OGG_INCLUDE_DIRS} ${OPUS_INCLUDE_DIR}/opus )


CMake: Move proto import path replacement to build time

With this change, the generated build system can now decide when the SAPI
protos are out of date and need to be rebuilt. Previously, the protos had
to always be regenerated which meant compiling a big part of the codebase
after each CMake configure run, even if nothing else changed.

PiperOrigin-RevId: 455599389
Change-Id: If75b6e870cd37f3136681fc73a404c5678623e52

--- cmake/SapiUtil.cmake
+++ cmake/SapiUtil.cmake
@@ -46,12 +46,25 @@
   endif()

   foreach(_file IN LISTS _pb_UNPARSED_ARGUMENTS)
-    file(READ "${_file}" _pb_orig)
-    string(REGEX REPLACE "import \".*/([^/]+\\.proto)\""
-                         "import \"\\1\"" _pb_repl "${_pb_orig}")
-    set(_file "${CMAKE_CURRENT_BINARY_DIR}/${_file}")
-    file(WRITE "${_file}" "${_pb_repl}")
-    list(APPEND _pb_files "${_file}")
+    get_filename_component(_abs_file_orig "${_file}" ABSOLUTE)
+    get_filename_component(_abs_file_repl
+                           "${CMAKE_CURRENT_BINARY_DIR}/${_file}" ABSOLUTE)
+
+    # Add a CMake script that replaces the actual import paths. An extra
+    # script file is necessary so that this happens at build time.
+    set(_cmake_gen "${CMAKE_CURRENT_BINARY_DIR}/${_file}.gen.cmake")
+    file(WRITE "${_cmake_gen}" "\
+file(READ \"${_abs_file_orig}\" _pb_orig)
+string(REGEX REPLACE \"import \\\".*/([^/]+\\\\.proto)\\\"\"\
+                     \"import \\\"\\\\1\\\"\" _pb_repl \"\${_pb_orig}\")
+file(WRITE \"${_abs_file_repl}\" \"\${_pb_repl}\")\
+")
+    add_custom_command(OUTPUT "${_abs_file_repl}"
+                       COMMAND "${CMAKE_COMMAND}"
+                       ARGS -P "${_cmake_gen}"
+                       DEPENDS "${_abs_file_orig}")
+
+    list(APPEND _pb_files "${_abs_file_repl}")
   endforeach()

   set(_outvar)
@@ -140,8 +153,8 @@

   # Create an include path for each file specified
   foreach(_file ${_pb_PROTOS})
-    get_filename_component(_abs_file ${_file} ABSOLUTE)
-    get_filename_component(_abs_path ${_abs_file} PATH)
+    get_filename_component(_abs_file "${_file}" ABSOLUTE)
+    get_filename_component(_abs_path "${_abs_file}" PATH)
     list(FIND _protobuf_include_path "${_abs_path}" _contains_already)
     if(${_contains_already} EQUAL -1)
       list(APPEND _protobuf_include_path -I ${_abs_path})
@@ -158,9 +171,9 @@

   set(_generated_srcs_all)
   foreach(_proto IN LISTS _pb_PROTOS)
-    get_filename_component(_abs_file ${_proto} ABSOLUTE)
-    get_filename_component(_abs_dir ${_abs_file} DIRECTORY)
-    get_filename_component(_basename ${_proto} NAME_WE)
+    get_filename_component(_abs_file "${_proto}" ABSOLUTE)
+    get_filename_component(_abs_dir "${_abs_file}" DIRECTORY)
+    get_filename_component(_basename "${_proto}" NAME_WE)

     set(_generated_srcs)
     foreach(_ext ${_pb_GENERATE_EXTENSIONS})
@@ -170,7 +183,7 @@
     list(APPEND _generated_srcs_all ${_generated_srcs})

     add_custom_command(OUTPUT ${_generated_srcs}
-                       COMMAND  protobuf::protoc
+                       COMMAND protobuf::protoc
                        ARGS --${_pb_LANGUAGE}_out
                             ${_dll_export_decl}${_pb_PROTOC_OUT_DIR}
                             ${_protobuf_include_path}


cmake: at least MSVC 2015 & default to __vectorcall

Signed-off-by: Matthias Kretz <372ea4eca737a13cd010ee806d4ce7b98ee71550@kde.org>

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -303,21 +303,17 @@
          AddCompilerFlag("/wd4748") # Disable warning "/GS can not protect parameters and local variables from local buffer overrun because optimizations are disabled in function" (I don't get it)
          add_definitions(-D_CRT_SECURE_NO_WARNINGS)
       endif()
-
-      # MSVC does not support inline assembly on 64 bit! :(
-      # searching the help for xgetbv doesn't turn up anything. So just fall back to not supporting AVX on Windows :(
-      # TODO: apparently MSVC 2010 SP1 added _xgetbv
-      set(Vc_DEFINITIONS "${Vc_DEFINITIONS} -DVc_NO_XGETBV")
+      vc_add_compiler_flag(Vc_COMPILE_FLAGS "/Gv") # default to __vectorcall

       # get rid of the min/max macros
       set(Vc_DEFINITIONS "${Vc_DEFINITIONS} -DNOMINMAX")

       # MSVC doesn't implement the XOP or FMA4 intrinsics
-      set(Vc_XOP_INTRINSICS_BROKEN true)
-      set(Vc_FMA4_INTRINSICS_BROKEN true)
-
-      if(MSVC_VERSION LESS 1700)
-         UserWarning("MSVC before 2012 has a broken std::vector::resize implementation. STL + Vc code will probably not compile.")
+      #set(Vc_XOP_INTRINSICS_BROKEN true)
+      #set(Vc_FMA4_INTRINSICS_BROKEN true)
+
+      if(MSVC_VERSION LESS 1900)
+         UserWarning("MSVC before 2015 does not support enough of C++11")
       endif()
    elseif(Vc_COMPILER_IS_CLANG)
       ##################################################################################################


Added variable substitution.

Added variable substitution.

--- cmake/easytest.cmake
+++ cmake/easytest.cmake
@@ -122,6 +122,13 @@
 			list(APPEND BUFFER "${LINE}")
 		endforeach()

+		# substitute variables set in key value.
+		string(REGEX MATCHALL "%[^% ]*" VAR_MATCHES "${BUFFER}")
+		foreach (MATCH ${VAR_MATCHES})
+			string(REPLACE "%" "" VARNAME "${MATCH}")
+			string(REPLACE "${MATCH}" "${${VARNAME}}" BUFFER "${BUFFER}")
+		endforeach ()
+
 		# Store the found matches in DEST (in parent scope).
 		set(${DEST} "${BUFFER}" PARENT_SCOPE)
 	endif ()


PERF: Update ITK tag

PERF: Update ITK tag

--- SuperBuild/External_ITKv5.cmake
+++ SuperBuild/External_ITKv5.cmake
@@ -149,7 +149,7 @@
   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITK.git)
   # set(${proj}_REPOSITORY ${git_protocol}://github.com/stnava/ITK.git)
-  set(${proj}_GIT_TAG a369470c93c433bb34a3557091d8caf2c2bb637e ) ## 20181107
+  set(${proj}_GIT_TAG f136bfe8bdb86c068ef1627ca2a5c02d5aa2fa24 ) ## 20190310
   set(ITK_VERSION_ID ITK-5.0) ### NOTE: When updating GIT_TAG, also update ITK_VERSION_ID

   ExternalProject_Add(${proj}


Fix typo found by Arjen: language-support ==> language_support.  This sorts
out the MinGW Fortran problems he was having and probably means the previous
fix to change CMAKE_SOURCE_DIR to CMAKE_HOME_DIRECTORY was not necessary.

svn path=/trunk/; revision=10882

--- cmake/modules/language_support/cmake-2.6/CMakeFortranInformation.cmake
+++ cmake/modules/language_support/cmake-2.6/CMakeFortranInformation.cmake
@@ -10,19 +10,19 @@
 ENDIF(CMAKE_COMPILER_IS_GNUG77)
 IF(CMAKE_Fortran_COMPILER_ID)
   # FIXME: PLplot specific path here that will be different for other projects.
-  IF(EXISTS ${CMAKE_HOME_DIRECTORY}/cmake/modules/language-support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake OR EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake)
+  IF(EXISTS ${CMAKE_HOME_DIRECTORY}/cmake/modules/language_support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake OR EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake)
     SET(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER_ID}-Fortran)
-  ENDIF(EXISTS ${CMAKE_HOME_DIRECTORY}/cmake/modules/language-support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake OR EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake)
+  ENDIF(EXISTS ${CMAKE_HOME_DIRECTORY}/cmake/modules/language_support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake OR EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake)
 ENDIF(CMAKE_Fortran_COMPILER_ID)
-IF(EXISTS ${CMAKE_HOME_DIRECTORY}/cmake/modules/language-support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
+IF(EXISTS ${CMAKE_HOME_DIRECTORY}/cmake/modules/language_support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
   # Use this file if it exists.
   SET(CMAKE_SYSTEM_AND_Fortran_COMPILER_INFO_FILE
-  ${CMAKE_HOME_DIRECTORY}/cmake/modules/language-support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
-ELSE(EXISTS ${CMAKE_HOME_DIRECTORY}/cmake/modules/language-support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
+  ${CMAKE_HOME_DIRECTORY}/cmake/modules/language_support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
+ELSE(EXISTS ${CMAKE_HOME_DIRECTORY}/cmake/modules/language_support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
   # This one apparently doesn't have to actually exist, see OPTIONAL below.
   SET(CMAKE_SYSTEM_AND_Fortran_COMPILER_INFO_FILE
   ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
-ENDIF(EXISTS ${CMAKE_HOME_DIRECTORY}/cmake/modules/language-support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
+ENDIF(EXISTS ${CMAKE_HOME_DIRECTORY}/cmake/modules/language_support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
 INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)

 # This should be included before the _INIT variables are


Added the proper kNet use #defines for Tundra on linux.

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -442,6 +442,10 @@
     endif()
     include_directories(${KNET_DIR}/include)
     link_directories(${KNET_DIR}/lib)
+    if (UNIX)
+        add_definitions(-DLINUX)
+    endif()
+    add_definitions(-DKNET_USE_BOOST)
 endmacro()

 macro(link_package_knet)


*** empty log message ***

*** empty log message ***

git-svn-id: b7791fb0f5d07d96612766859ad70a13be88ea96@2102 305cdda6-5ce1-45b3-a98d-dfc68c8b3305

--- utilities/FindNektar++.cmake
+++ utilities/FindNektar++.cmake
@@ -1,39 +0,0 @@
-# Find an installed Nektar++.  Will not find a Nektar++ development environment.
-SET(NEKTAR_SEARCH_PATH
-	${CMAKE_SOURCE_DIR}/../../Nektar++/dist/
-	${CMAKE_BINARY_DIR}/../Nektar++/dist/
-	${CMAKE_SOURCE_DIR}/../../Nektar++/*/dist/
-	${CMAKE_BINARY_DIR}/../Nektar++/*/dist/
-	/usr/include
-	/usr/local/include
-)
-
-FIND_PATH(NEKTAR++_ROOT_DIR Nektar++Config.cmake  ${NEKTAR_SEARCH_PATH} )
-
-IF (NEKTAR++_ROOT_DIR)
-	SET(NEKTAR++_FOUND TRUE)
-ELSE (NEKTAR++_ROOT_DIR)
-	SET(NEKTAR++_FOUND FALSE)
-ENDIF (NEKTAR++_ROOT_DIR)
-
-IF( NEKTAR++_FOUND )
-	INCLUDE(${NEKTAR++_ROOT_DIR}/Nektar++Config.cmake)
-
-	SET(NEKTAR++_INCLUDE_DIRS ${NEKTAR++_ROOT_DIR}/include)
-	SET(NEKTAR++_LIBRARY_DIRS ${NEKTAR++_ROOT_DIR}/lib)
-
-	SET(NEKTAR++_LIBRARIES MultiRegions LocalRegions SpatialDomains StdRegions LibUtilities)
-	# TODO - This is a little awkward because Nektar++ already knows what
-	# preprocessor definitions are defined, but I can't find a way to
-	# access them.  This is a maintenance issue.
-	IF( NEKTAR_USE_MEMORY_POOLS )
-		ADD_DEFINITIONS(-DNEKTAR_MEMORY_POOL_ENABLED)
-	ELSE( NEKTAR_USE_MEMORY_POOLS )
-		REMOVE_DEFINITIONS(-DNEKTAR_MEMORY_POOL_ENABLED)
-	ENDIF( NEKTAR_USE_MEMORY_POOLS )
-
-ELSE( NEKTAR++_FOUND )
-	SET(NEKTAR++_DEFINITIONS "")
-	SET(NEKTAR++_INCLUDE_DIRS "")
-ENDIF( NEKTAR++_FOUND )
-


Core/Tools: Fix compilation of tools under windows (#312)

--- modules/worldengine/nucleus/src/cmake/compiler/msvc/settings.cmake
+++ modules/worldengine/nucleus/src/cmake/compiler/msvc/settings.cmake
@@ -42,6 +42,10 @@
 add_definitions(-D_CRT_NONSTDC_NO_WARNINGS)
 message(STATUS "MSVC: Disabled POSIX warnings")

+#Ignore warnings about INTMAX_MAX
+add_definitions(-D__STDC_LIMIT_MACROS)
+message(STATUS "MSVC: Disabled INTMAX_MAX warnings")
+
 # disable warnings in Visual Studio 8 and above if not wanted
 if(NOT WITH_WARNINGS)
   if(MSVC AND NOT CMAKE_GENERATOR MATCHES "Visual Studio 7")


[CMake] Remove a redundant and potentially incorrect check.

There's a more robust check for which SDK to support already.
This also misses `arm64` as architecture.

--- cmake/modules/DarwinSDKs.cmake
+++ cmake/modules/DarwinSDKs.cmake
@@ -15,23 +15,6 @@
 set(SUPPORTED_WATCHOS_ARCHS "armv7k")
 set(SUPPORTED_WATCHOS_SIMULATOR_ARCHS "i386;arm64")
 set(SUPPORTED_OSX_ARCHS "x86_64;arm64;arm64e")
-
-# Get the SDK version from SDKSettings.
-execute_process(
-  COMMAND "defaults" "read" "${CMAKE_OSX_SYSROOT}/SDKSettings.plist" "Version"
-    OUTPUT_VARIABLE SWIFT_OSX_SDK_VERSION
-    OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-# Remove the last component, if any. e.g. 10.15.26 -> 10.15
-string(REGEX REPLACE "\([0-9]*[.][0-9]*\)[.][0-9]*" "\\1"
-       SWIFT_OSX_SDK_VERSION "${SWIFT_OSX_SDK_VERSION}")
-
-if (${SWIFT_OSX_SDK_VERSION} STREQUAL "10.14" OR
-    ${SWIFT_OSX_SDK_VERSION} STREQUAL "10.15")
-  set(SUPPORTED_OSX_ARCHS "x86_64")
-else()
-  set(SUPPORTED_OSX_ARCHS "x86_64;arm64e")
-endif()

 is_sdk_requested(OSX swift_build_osx)
 if(swift_build_osx)


Use quazip5 with QT5BUILD

Use quazip5 with QT5BUILD

--- cmake/modules/Findquazip.cmake
+++ cmake/modules/Findquazip.cmake
@@ -6,8 +6,13 @@
   set(QUAZIP_FOUND TRUE)
 else(QUAZIP_INCLUDE_DIR AND QUAZIP_LIBRARIES)

+  if(QT5BUILD)
+  find_path(QUAZIP_INCLUDE_DIR NAMES quazip5/quazip.h)
+  find_library(QUAZIP_LIBRARIES NAMES quazip5)
+  else(QT5BUILD)
   find_path(QUAZIP_INCLUDE_DIR NAMES quazip/quazip.h)
   find_library(QUAZIP_LIBRARIES NAMES quazip)
+  endif(QT5BUILD)

   include(FindPackageHandleStandardArgs)
   find_package_handle_standard_args(quazip DEFAULT_MSG QUAZIP_INCLUDE_DIR QUAZIP_LIBRARIES)


Add more warnings

Add more warnings

--- cmake/snippets/flags-gnu.cmake
+++ cmake/snippets/flags-gnu.cmake
@@ -68,6 +68,8 @@
 sprokit_check_compiler_flag(sprokit_warnings -Wmissing-braces)
 sprokit_check_compiler_flag(sprokit_warnings -Wimplicit-fallthrough)
 sprokit_check_compiler_flag(sprokit_warnings -Wdocumentation)
+sprokit_check_compiler_flag(sprokit_warnings -Wundef)
+sprokit_check_compiler_flag(sprokit_warnings -Wunused-macros)

 option(SPROKIT_ENABLE_NITPICK "Generate warnings about nitpicky things" OFF)
 if (SPROKIT_ENABLE_NITPICK)


oss: FindLibEvent.cmake: workaround cmake POLICY annoyances

Summary:
When pulled in as an external project into an environment
that has changed the default cmake policy, the trick we're using
to extract the full library path errors out.  This works around
that issue by saving the policy settings and then setting them
how we need them before restoring them after we're done.

refs https://github.com/facebook/folly/issues/1100

Reviewed By: yfeldblum

Differential Revision: D14766991

fbshipit-source-id: e2506bc0aebd9e66bc70b12c4c538c9e034f9f73

--- build/fbcode_builder/CMake/FindLibEvent.cmake
+++ build/fbcode_builder/CMake/FindLibEvent.cmake
@@ -36,7 +36,13 @@
   # this results in linker errors.
   # To resolve this, we ask cmake to lookup the full path to the library
   # and use that instead.
+  cmake_policy(PUSH)
+  if(POLICY CMP0026)
+    # Allow reading the LOCATION property
+    cmake_policy(SET CMP0026 OLD)
+  endif()
   get_target_property(LIBEVENT_LIB event LOCATION)
+  cmake_policy(POP)

   set(LibEvent_FOUND ${Libevent_FOUND})
   if (NOT LibEvent_FIND_QUIETLY)


install clang-format Visual Studio plugin, if MSVC

--- projects/clangformat.cmake
+++ projects/clangformat.cmake
@@ -48,5 +48,12 @@
     INSTALL_COMMAND ${CMAKE_COMMAND} -P cmake_install.cmake
     INSTALL_DIR ${STAGE_DIR}
     )
+  if(MSVC)
+    ExternalProject_Add_Step(clangformat_install clangformat_install_vsix
+      COMMAND ${CMAKE_COMMAND} -E make_directory ${STAGE_DIR}/pkg
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different ${BINARY_DIR}/Release/bin/ClangFormat.vsix ${STAGE_DIR}/pkg
+      DEPENDEES install
+      )
+  endif()
   set_property(TARGET clangformat_install PROPERTY FOLDER ${bld_folder})
 endfunction()


Added valgrind to tests as mentioned in #17

--- cdash/nightly.cmake
+++ cdash/nightly.cmake
@@ -117,8 +117,10 @@
   "-DIS_TESTING=ON"
   "-DMESHES=/lore/diamog/cdash/repos/EnGPar/pumi-meshes/"
   "-DGRAPHS=/lore/diamog/cdash/repos/EnGPar/EnGPar-graphs/"
-
-)
+  "-DVALGRIND=valgrind"
+  "-DVALGRIND_ARGS=--log-file=vg.%p;--error-exitcode=1;--suppressions=/lore/diamog/cdash/repos/EnGPar/mpich3.supp"
+  )
+
 message(STATUS "configure options ${CONFIGURE_OPTIONS}")
 build_subproject(master "${CONFIGURE_OPTIONS}")
 test_subproject(master)


ENH: Update DTIProcess version

ENH: Update DTIProcess version

--- SuperBuild/External_DTIProcess.cmake
+++ SuperBuild/External_DTIProcess.cmake
@@ -72,11 +72,13 @@
     -DUSE_SYSTEM_SlicerExecutionModel:BOOL=ON
     -DDTIProcess_SUPERBUILD:BOOL=OFF
     -DEXECUTABLES_ONLY:BOOL=ON
+    -DSubversion_SVN_EXECUTABLE:PATH=${SVNCOMMAND}
+    -D
     )

   ### --- End Project specific additions
   set( ${proj}_REPOSITORY ${git_protocol}://github.com/NIRALUser/DTIProcessToolkit.git)
-  set( ${proj}_GIT_TAG a7c39e485e492bc6b72f72348939d47835cd56cc )
+  set( ${proj}_GIT_TAG  863e5da765bb1177d34134b2d65f9212915410d1 )
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}
@@ -94,10 +96,9 @@
       ${${proj}_CMAKE_OPTIONS}
       ## We really do want to install to remove uncertainty about where the tools are
       ## (on Windows, tools might be in subfolders, like "Release", "Debug",...)
-      -DCMAKE_INSTALL_PREFIX:PATH=${EXTERNAL_BINARY_DIRECTORY}/${proj}-install
+      -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/${proj}-install
     DEPENDS
-      ${${proj}_DEPENDENCIES}
-    INSTALL_COMMAND ""
+      ${${proj}_DEPENDENCIES}
   )
   set(${extProjName}_DIR ${EXTERNAL_BINARY_DIRECTORY}/${proj}-build)
 else()


Remove unneeded CHUD framework searcher

Remove unneeded CHUD framework searcher

--- cmake/FindCHUDFramework.cmake
+++ cmake/FindCHUDFramework.cmake
@@ -1,17 +0,0 @@
-
-FIND_PATH(CHUD_FRAMEWORK_INCLUDE_DIR cblas.h /usr/include /usr/local/include
-	/System/Library/Frameworks/vecLib.framework/Versions/A/Headers/ )
-
-MARK_AS_ADVANCED(CHUD_FRAMEWORK_INCLUDE_DIR)
-
-SET( CHUD_FRAMEWORK_LINK_FLAGS "-framework CHUD" )
-
-IF (CHUD_FRAMEWORK_FOUND)
-  IF (NOT CHUD_FRAMEWORK_FIND_QUIETLY)
-     MESSAGE(STATUS "Found CHUD_FRAMEWORK: ${CHUD_FRAMEWORK_INCLUDE_DIR}")
-  ENDIF (NOT CHUD_FRAMEWORK_FIND_QUIETLY)
-ELSE(CHUD_FRAMEWORK_FOUND)
-  IF (CHUD_FRAMEWORK_FIND_REQUIRED)
-     MESSAGE(FATAL_ERROR "Could not find CHUD_FRAMEWORK")
-  ENDIF (CHUD_FRAMEWORK_FIND_REQUIRED)
-ENDIF (CHUD_FRAMEWORK_FOUND)


Commented NO_DEFAULT_PATH in cmake search [ci skip]

--- cmake/FindgenericLogger.cmake
+++ cmake/FindgenericLogger.cmake
@@ -71,7 +71,8 @@
     PATHS ${GENERICLOGGER_ROOT_DIR}
     PATH_SUFFIXES ${_GENERICLOGGER_POSSIBLE_INCLUDE_SUFFIXES}
     DOC "genericLogger include directory"
-    NO_DEFAULT_PATH)
+    # NO_DEFAULT_PATH
+    )
 ELSE (GENERICLOGGER_ROOT_DIR)
   # Use default path search
   FIND_PATH (GENERICLOGGER_INCLUDE_DIR
@@ -103,11 +104,13 @@
       FIND_LIBRARY (${_GENERICLOGGER_LIBRARY_BASE}_DEBUG
 	NAMES ${_GENERICLOGGER_COMPONENT_POSSIBLE_DEBUG_NAMES}
 	PATHS ${GENERICLOGGER_ROOT_DIR} PATH_SUFFIXES ${_GENERICLOGGER_POSSIBLE_LIB_SUFFIXES}
-	NO_DEFAULT_PATH)
+	# NO_DEFAULT_PATH
+	)
       FIND_LIBRARY (${_GENERICLOGGER_STATIC_LIBRARY_BASE}_DEBUG
 	NAMES ${_GENERICLOGGER_STATIC_COMPONENT_POSSIBLE_DEBUG_NAMES}
 	PATHS ${GENERICLOGGER_ROOT_DIR} PATH_SUFFIXES ${_GENERICLOGGER_POSSIBLE_LIB_SUFFIXES}
-	NO_DEFAULT_PATH)
+	# NO_DEFAULT_PATH
+	)
     ELSE (GENERICLOGGER_ROOT_DIR)
       FIND_LIBRARY (${_GENERICLOGGER_LIBRARY_BASE}_DEBUG
 	NAMES ${_GENERICLOGGER_COMPONENT_POSSIBLE_DEBUG_NAMES}
@@ -123,11 +126,13 @@
       FIND_LIBRARY (${_GENERICLOGGER_LIBRARY_BASE}_RELEASE
 	NAMES ${_GENERICLOGGER_COMPONENT_POSSIBLE_RELEASE_NAMES}
 	PATHS ${GENERICLOGGER_ROOT_DIR} PATH_SUFFIXES ${_GENERICLOGGER_POSSIBLE_LIB_SUFFIXES}
-	NO_DEFAULT_PATH)
+	# NO_DEFAULT_PATH
+	)
       FIND_LIBRARY (${_GENERICLOGGER_STATIC_LIBRARY_BASE}_RELEASE
 	NAMES ${_GENERICLOGGER_STATIC_COMPONENT_POSSIBLE_RELEASE_NAMES}
 	PATHS ${GENERICLOGGER_ROOT_DIR} PATH_SUFFIXES ${_GENERICLOGGER_POSSIBLE_LIB_SUFFIXES}
-	NO_DEFAULT_PATH)
+	# NO_DEFAULT_PATH
+	)
     ELSE (ICU_ROOT_DIR)
       FIND_LIBRARY (${_GENERICLOGGER_LIBRARY_BASE}_RELEASE
 	NAMES ${_GENERICLOGGER_COMPONENT_POSSIBLE_RELEASE_NAMES}


CMake 3.5 is a sad, sad affair.

CMake 3.5 is a sad, sad affair.

--- cmake/Modules/FindCatch.cmake
+++ cmake/Modules/FindCatch.cmake
@@ -41,27 +41,32 @@
 set(catch_sources catch.hpp)
 prepend(catch_sources "${catch_build_toplevel}/" ${catch_sources})

+# # !! Catch 3.5 does not have DOWNLOAD_NO_EXTRACT e.e
+# # Now I know why people don't like CMake that much: the earlier versions were kind of garbage
 # # External project to get sources
-ExternalProject_Add(CATCH_BUILD_SOURCE
-	BUILD_IN_SOURCE TRUE
-	BUILD_ALWAYS FALSE
-	DOWNLOAD_NO_EXTRACT TRUE
-	URL https://github.com/catchorg/Catch2/releases/download/v${catch_version}/catch.hpp
-	TLS_VERIFY TRUE
-	PREFIX ${catch_build_toplevel}
-	SOURCE_DIR ${catch_build_toplevel}
-	DOWNLOAD_DIR ${catch_build_toplevel}
-	TMP_DIR "${catch_build_toplevel}-tmp"
-	STAMP_DIR "${catch_build_toplevel}-stamp"
-	INSTALL_DIR "${catch_build_toplevel}/local"
-	CONFIGURE_COMMAND ""
-	BUILD_COMMAND ""
-	INSTALL_COMMAND ""
-	TEST_COMMAND ""
-	BUILD_BYPRODUCTS "${catch_sources}")
+#ExternalProject_Add(CATCH_BUILD_SOURCE
+#	BUILD_IN_SOURCE TRUE
+#	BUILD_ALWAYS FALSE
+#	DOWNLOAD_NO_EXTRACT TRUE
+#	URL https://github.com/catchorg/Catch2/releases/download/v${catch_version}/catch.hpp
+#	TLS_VERIFY TRUE
+#	PREFIX ${catch_build_toplevel}
+#	SOURCE_DIR ${catch_build_toplevel}
+#	DOWNLOAD_DIR ${catch_build_toplevel}
+#	TMP_DIR "${catch_build_toplevel}-tmp"
+#	STAMP_DIR "${catch_build_toplevel}-stamp"
+#	INSTALL_DIR "${catch_build_toplevel}/local"
+#	CONFIGURE_COMMAND ""
+#	BUILD_COMMAND ""
+#	INSTALL_COMMAND ""
+#	TEST_COMMAND ""
+#	BUILD_BYPRODUCTS "${catch_sources}")
+
+file(MAKE_DIRECTORY "${catch_build_toplevel}")
+file(DOWNLOAD https://github.com/catchorg/Catch2/releases/download/v${catch_version}/catch.hpp ${catch_sources})

 add_library(${catch_lib} INTERFACE)
-add_dependencies(${catch_lib} CATCH_BUILD_SOURCE)
+# add_dependencies(${catch_lib} CATCH_BUILD_SOURCE)
 target_include_directories(${catch_lib} INTERFACE ${catch_include_dirs})

 if (MSVC)


build: update poco version to 1.9.4

build: update poco version to 1.9.4

--- cmake/SetupDependencies.cmake
+++ cmake/SetupDependencies.cmake
@@ -34,7 +34,7 @@
 CPMAddPackage(
     NAME poco
     GITHUB_REPOSITORY pocoproject/poco
-    GIT_TAG "poco-1.9.0-release"
+    GIT_TAG "poco-1.9.4-release"
     OPTIONS
         "ENABLE_XML FALSE"
         "ENABLE_ENCODINGS FALSE"


Fix for ROOT-6837 (AliEn cmake include variable and Installation instructions)

--- cmake/modules/FindAlien.cmake
+++ cmake/modules/FindAlien.cmake
@@ -11,7 +11,7 @@
   set(ALIEN_FIND_QUIETLY TRUE)
 endif()

-find_path(ALIEN_INCLUDE_DIR gapiUI.h
+find_path(ALIEN_INCLUDE_DIR gapiUI.h PATHS
   ${ALIEN_DIR}/include $ENV{ALIEN_DIR}/include
   /usr/local/include
   /opt/alien/api/include


Ensure that DAVIX variables are maked as advance

--- cmake/modules/FindDavix.cmake
+++ cmake/modules/FindDavix.cmake
@@ -14,6 +14,6 @@

 # Handle the QUIETLY and REQUIRED arguments and set DAVIX_FOUND to TRUE if all listed variables are TRUE
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(DAVIX DEFAULT_MSG DAVIX_INCLUDE_DIRS DAVIX_LIBRARIES)
+find_package_handle_standard_args(DAVIX DEFAULT_MSG DAVIX_INCLUDE_DIR DAVIX_LIBRARY)

-mark_as_advanced(DAVIX_FOUND DAVIX_INCLUDE_DIRS DAVIX_LIBRARIES)
+mark_as_advanced(DAVIX_FOUND DAVIX_INCLUDE_DIR DAVIX_LIBRARY)


Change archive name from 'cc' to 'centos'

--- cmake/modules/RootCPack.cmake
+++ cmake/modules/RootCPack.cmake
@@ -92,7 +92,7 @@
     set(OS_NAME_VERSION Linux-fedora${osvers}-${arch})
   elseif(osid MATCHES CentOS)
     string(REGEX REPLACE "([0-9]+)[.].*" "\\1" osvers "${osvers}")
-    set(OS_NAME_VERSION Linux-cc${osvers}-${arch})
+    set(OS_NAME_VERSION Linux-centos${osvers}-${arch})
   else()
     set(OS_NAME_VERSION Linux-${osid}${osvers}${arch})
   endif()


[cpack] Embed arch in macos binary package file names:

Now that we need to distinguish x86_64 from arm. Also "macOS" version is not
necessarily "X" anymore.

--- cmake/modules/RootCPack.cmake
+++ cmake/modules/RootCPack.cmake
@@ -95,7 +95,7 @@
   execute_process(COMMAND sw_vers "-productVersion"
                   COMMAND cut -d . -f 1-2
                   OUTPUT_VARIABLE osvers OUTPUT_STRIP_TRAILING_WHITESPACE)
-  set(OS_NAME_VERSION macosx64-${osvers})
+  set(OS_NAME_VERSION macos-${osvers}-${CMAKE_SYSTEM_PROCESSOR})
 elseif(WIN32)
   set(OS_NAME_VERSION win32)
 else()


For gcc/g++ it is important in which order libs are included. Therefore core comes before base.

svn path=/trunk/; revision=7289

--- cmake/modules/wxwidgets.cmake
+++ cmake/modules/wxwidgets.cmake
@@ -27,7 +27,7 @@
 # DRIVERS_LINK_FLAGS  	  - list of LINK_FLAGS for all static devices.

 if(PLD_wxwidgets)
-  SET(wxWidgets_USE_LIBS base core)
+  SET(wxWidgets_USE_LIBS core base)
   find_package(wxWidgets)
   if(wxWidgets_FOUND)
     string(REGEX REPLACE ";" " -I"


boost cmake module not needed anymore

boost cmake module not needed anymore

--- cmake_modules/FindBoost.cmake
+++ cmake_modules/FindBoost.cmake
@@ -1,589 +0,0 @@
-# - Try to find Boost include dirs and libraries
-# Usage of this module as follows:
-#
-#     SET(Boost_USE_STATIC_LIBS ON)
-#     SET(Boost_USE_MULTITHREAD OFF)
-#     FIND_PACKAGE( Boost 1.34.1 COMPONENTS date_time filesystem iostreams ... )
-#
-# The Boost_ADDITIONAL_VERSIONS variable can be used to specify a list of
-# boost version numbers that should be taken into account when searching
-# for the libraries. Unfortunately boost puts the version number into the
-# actual filename for the libraries, so this might be needed in the future
-# when new boost versions are released.
-#
-# Currently this module searches for the following version numbers:
-# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0
-#
-# The components list needs to be the actual names of boost libraries, that is
-# the part of the actual library files that differ on different libraries. So
-# its "date_time" for "libboost_date_time...". Anything else will result in
-# errors
-#
-# You can provide a minimum version number that should be used. If you provide this
-# version number and specify the REQUIRED attribute, this module will fail if it
-# can't find the specified or a later version. If you specify a version number this is
-# automatically put into the considered list of version numbers and thus doesn't need
-# to be specified in the Boost_ADDITIONAL_VERSIONS variable
-#
-# Variables used by this module, they can change the default behaviour and need to be set
-# before calling find_package:
-#  Boost_USE_MULTITHREAD         Can be set to OFF to use the non-multithreaded
-#                                boost libraries. Defaults to ON.
-#  Boost_USE_STATIC_LIBS         Can be set to ON to force the use of the static
-#                                boost libraries. Defaults to OFF.
-#  Boost_ADDITIONAL_VERSIONS     A list of version numbers to use for searching
-#                                the boost include directory. The default list
-#                                of version numbers is:
-#                                1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0
-#                                If you want to look for an older or newer
-#                                version set this variable to a list of
-#                                strings, where each string contains a number, i.e.
-#                                SET(Boost_ADDITIONAL_VERSIONS "0.99.0" "1.35.0")
-#  BOOST_ROOT                    Preferred installation prefix for searching for Boost,
-#                                set this if the module has problems finding the proper Boost installation
-#  BOOST_INCLUDEDIR              Set this to the include directory of Boost, if the
-#                                module has problems finding the proper Boost installation
-#  BOOST_LIBRARYDIR              Set this to the lib directory of Boost, if the
-#                                module has problems finding the proper Boost installation
-#
-#  The last three variables are available also as environment variables
-#
-#
-# Variables defined by this module:
-#
-#  Boost_FOUND                          System has Boost, this means the include dir was found,
-#                                       as well as all the libraries specified in the COMPONENTS list
-#  Boost_INCLUDE_DIRS                   Boost include directories, not cached
-#  Boost_INCLUDE_DIR                    This is almost the same as above, but this one is cached and may be
-#                                       modified by advanced users
-#  Boost_LIBRARIES                      Link these to use the Boost libraries that you specified, not cached
-#  Boost_LIBRARY_DIRS                   The path to where the Boost library files are.
-#  Boost_VERSION                        The version number of the boost libraries that have been found,
-#                                       same as in version.hpp from Boost
-#  Boost_LIB_VERSION                    The version number in filename form as its appended to the library filenames
-#  Boost_MAJOR_VERSION                  major version number of boost
-#  Boost_MINOR_VERSION                  minor version number of boost
-#  Boost_SUBMINOR_VERSION               subminor version number of boost
-#  Boost_LIB_DIAGNOSTIC_DEFINITIONS     Only set on windows. Can be used with add_definitions
-#                                       to print diagnostic information about the automatic
-#                                       linking done on windows.
-
-# For each component you list the following variables are set.
-# ATTENTION: The component names need to be in lower case, just as the boost
-# library names however the cmake variables use upper case for the component
-# part. So you'd get Boost_SERIALIZATION_FOUND for example.
-#
-#  Boost_${COMPONENT}_FOUND             True IF the Boost library "component" was found.
-#  Boost_${COMPONENT}_LIBRARY           The absolute path of the Boost library "component".
-#  Boost_${COMPONENT}_LIBRARY_DEBUG     The absolute path of the debug version of the
-#                                       Boost library "component".
-#  Boost_${COMPONENT}_LIBRARY_RELEASE   The absolute path of the release version of the
-#                                       Boost library "component"
-#
-#  Copyright (c) 2006-2008 Andreas Schneider <mail@cynapses.org>
-#  Copyright (c) 2007      Wengo
-#  Copyright (c) 2007      Mike Jackson
-#  Copyright (c) 2008      Andreas Pakulat <apaku@gmx.de>
-#
-#  Redistribution AND use is allowed according to the terms of the New
-#  BSD license.
-#  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-#
-
-# this module required CMake 2.5 for the Boost_FIND_VERSION stuff
-# CMAKE_MINIMUM_REQUIRED(VERSION "2.6" FATAL_ERROR) #todo
-
-#MESSAGE(STATUS "Finding Boost libraries.... ")
-
-OPTION(Boost_USE_MULTITHREADED "Use the multithreaded versions of the boost libraries" ON)
-
-SET( _boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS} "1.35.0" "1.35" "1.34.1" "1.34.0" "1.34" "1.33.1" "1.33.0" "1.33" )
-
-
-############################################
-#
-# Check the existence of the libraries.
-#
-############################################
-# This macro was taken directly from the FindQt4.cmake file that is included
-# with the CMake distribution. This is NOT my work. All work was done by the
-# original authors of the FindQt4.cmake file. Only minor modifications were
-# made to remove references to Qt and make this file more generally applicable
-#########################################################################
-
-MACRO (_Boost_ADJUST_LIB_VARS basename)
-  IF (Boost_INCLUDE_DIR )
-    MESSAGE(STATUS "Adjusting ${basename} ")
-
-    IF (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE)
-      MESSAGE(STATUS "found both release and debug version")
-      # if the generator supports configuration types then set
-      # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
-      IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
-        SET(Boost_${basename}_LIBRARY optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
-      ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
-        # if there are no configuration types and CMAKE_BUILD_TYPE has no value
-        # then just use the release libraries
-        SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} )
-      ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
-      SET(Boost_${basename}_LIBRARIES optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
-    ENDIF (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE)
-
-    # if only the release version was found, set the debug variable also to the release version
-    IF (Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG)
-      MESSAGE(STATUS "only release version found")
-      SET(Boost_${basename}_LIBRARY_DEBUG ${Boost_${basename}_LIBRARY_RELEASE})
-      SET(Boost_${basename}_LIBRARY       ${Boost_${basename}_LIBRARY_RELEASE})
-      SET(Boost_${basename}_LIBRARIES     ${Boost_${basename}_LIBRARY_RELEASE})
-    ENDIF (Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG)
-
-    # if only the debug version was found, set the release variable also to the debug version
-    IF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE)
-      MESSAGE(STATUS "only debug version found")
-      SET(Boost_${basename}_LIBRARY_RELEASE ${Boost_${basename}_LIBRARY_DEBUG})
-      SET(Boost_${basename}_LIBRARY         ${Boost_${basename}_LIBRARY_DEBUG})
-      SET(Boost_${basename}_LIBRARIES       ${Boost_${basename}_LIBRARY_DEBUG})
-    ENDIF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE)
-
-    IF (Boost_${basename}_LIBRARY)
-      SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library")
-      GET_FILENAME_COMPONENT(Boost_LIBRARY_DIRS "${Boost_${basename}_LIBRARY}" PATH)
-      SET(Boost_${basename}_FOUND ON CACHE BOOL "Was the boost boost ${basename} library found")
-      MESSAGE(STATUS "Boost component library found ${basename}")
-    ENDIF (Boost_${basename}_LIBRARY)
-
-  ENDIF (Boost_INCLUDE_DIR )
-  # Make variables changeble to the advanced user
-  MARK_AS_ADVANCED(
-      Boost_${basename}_LIBRARY
-      Boost_${basename}_LIBRARY_RELEASE
-      Boost_${basename}_LIBRARY_DEBUG
-  )
-ENDMACRO (_Boost_ADJUST_LIB_VARS)
-
-#-------------------------------------------------------------------------------
-
-
-SET( _boost_IN_CACHE TRUE)
-IF(Boost_INCLUDE_DIR)
-  FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
-    STRING(TOUPPER ${COMPONENT} COMPONENT)
-    IF(NOT Boost_${COMPONENT}_FOUND)
-      SET( _boost_IN_CACHE FALSE)
-    ENDIF(NOT Boost_${COMPONENT}_FOUND)
-  ENDFOREACH(COMPONENT)
-ELSE(Boost_INCLUDE_DIR)
-  SET( _boost_IN_CACHE FALSE)
-ENDIF(Boost_INCLUDE_DIR)
-
-IF (_boost_IN_CACHE)
-  # in cache already
-  SET(Boost_FOUND TRUE)
-  FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
-    STRING(TOUPPER ${COMPONENT} COMPONENT)
-    _Boost_ADJUST_LIB_VARS( ${COMPONENT} )
-    SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${COMPONENT}_LIBRARY})
-  ENDFOREACH(COMPONENT)
-  SET(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR})
-  IF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0")
-    MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000")
-    MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000")
-    MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100")
-  ENDIF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0")
-ELSE (_boost_IN_CACHE)
-  # Need to search for boost
-
-  IF(WIN32)
-    # In windows, automatic linking is performed, so you do not have to specify the libraries.
-    # If you are linking to a dynamic runtime, then you can choose to link to either a static or a
-    # dynamic Boost library, the default is to do a static link.  You can alter this for a specific
-    # library "whatever" by defining BOOST_WHATEVER_DYN_LINK to force Boost library "whatever" to
-    # be linked dynamically.  Alternatively you can force all Boost libraries to dynamic link by
-    # defining BOOST_ALL_DYN_LINK.
-
-    # This feature can be disabled for Boost library "whatever" by defining BOOST_WHATEVER_NO_LIB,
-    # or for all of Boost by defining BOOST_ALL_NO_LIB.
-
-    # If you want to observe which libraries are being linked against then defining
-    # BOOST_LIB_DIAGNOSTIC will cause the auto-linking code to emit a #pragma message each time
-    # a library is selected for linking.
-    SET(Boost_LIB_DIAGNOSTIC_DEFINITIONS "-DBOOST_LIB_DIAGNOSTIC" CACHE STRING "Boost diagnostic define")
-  ENDIF(WIN32)
-
-
-  SET(_boost_INCLUDE_SEARCH_DIRS
-    C:/boost/include
-    "C:/Program Files/boost/boost_${Boost_MINIMUM_VERSION}"
-    # D: is very often the cdrom drive, IF you don't have a
-    # cdrom inserted it will popup a very annoying dialog
-    #D:/boost/include
-    /sw/local/include
-  )
-
-  SET(_boost_LIBRARIES_SEARCH_DIRS
-    C:/boost/lib
-    "C:/Program Files/boost/boost_${Boost_MINIMUM_VERSION}/lib"
-    /sw/local/lib
-  )
-
-  IF( NOT $ENV{BOOST_ROOT} STREQUAL "" )
-    SET(_boost_INCLUDE_SEARCH_DIRS $ENV{BOOST_ROOT}/include ${_boost_INCLUDE_SEARCH_DIRS})
-    SET(_boost_LIBRARIES_SEARCH_DIRS $ENV{BOOST_ROOT}/lib ${_boost_INCLUDE_SEARCH_DIRS})
-  ENDIF( NOT $ENV{BOOST_ROOT} STREQUAL "" )
-
-  IF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" )
-    SET(_boost_INCLUDE_SEARCH_DIRS $ENV{BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS})
-  ENDIF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" )
-
-  IF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" )
-    SET(_boost_LIBRARIES_SEARCH_DIRS $ENV{BOOST_LIBRARYDIR} ${_boost_INCLUDE_SEARCH_DIRS})
-  ENDIF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" )
-
-  IF( BOOST_ROOT )
-    IF (WIN32 OR CYGWIN)
-      SET(_boost_INCLUDE_SEARCH_DIRS ${BOOST_ROOT} ${_boost_INCLUDE_SEARCH_DIRS})
-      SET(_boost_LIBRARIES_SEARCH_DIRS ${BOOST_ROOT}/lib ${_boost_LIBRARIES_SEARCH_DIRS})
-    ELSE (WIN32 OR CYGWIN)
-      SET(_boost_INCLUDE_SEARCH_DIRS ${BOOST_ROOT}/include ${_boost_INCLUDE_SEARCH_DIRS})
-      SET(_boost_LIBRARIES_SEARCH_DIRS ${BOOST_ROOT}/lib ${_boost_LIBRARIES_SEARCH_DIRS})
-    ENDIF (WIN32 OR CYGWIN)
-  ENDIF( BOOST_ROOT )
-
-  IF( BOOST_INCLUDEDIR )
-    IF (WIN32)
-      SET(_boost_INCLUDE_SEARCH_DIRS ${BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS})
-    ELSE (WIN32)
-      SET(_boost_INCLUDE_SEARCH_DIRS ${BOOST_INCLUDEDIR}/include ${_boost_INCLUDE_SEARCH_DIRS})
-    ENDIF (WIN32)
-  ENDIF( BOOST_INCLUDEDIR )
-
-  IF( BOOST_LIBRARYDIR )
-    IF (WIN32)
-      SET(_boost_LIBRARIES_SEARCH_DIRS ${BOOST_LIBRARYDIR} ${_boost_LIBRARIES_SEARCH_DIRS})
-    ELSE (WIN32)
-      SET(_boost_LIBRARIES_SEARCH_DIRS ${BOOST_LIBRARYDIR}/include ${_boost_LIBRARIES_SEARCH_DIRS})
-    ENDIF (WIN32)
-  ENDIF( BOOST_LIBRARYDIR )
-
-  MESSAGE(STATUS "Boost_INCLUDE_DIR = ${Boost_INCLUDE_DIR}" )
-  #Try first in our own include search paths (e.g. BOOST_ROOT)
-  FOREACH(_boost_VER ${_boost_TEST_VERSIONS})
-    IF( NOT Boost_INCLUDE_DIR )
-
-      # Add in a path suffix, based on the required version, ideally we could
-      # read this from version.hpp, but for that to work we'd need to know the include
-      # dir already
-      SET(_boost_PATH_SUFFIX
-        boost-${_boost_VER}
-      )
-      MESSAGE(STATUS "try _boost_PATH_SUFFIX ${_boost_PATH_SUFFIX}" )
-
-      IF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
-          STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3" _boost_PATH_SUFFIX ${_boost_PATH_SUFFIX})
-      ELSEIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+")
-          STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2" _boost_PATH_SUFFIX ${_boost_PATH_SUFFIX})
-      ENDIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
-
-
-      FIND_PATH(Boost_INCLUDE_DIR
-          NAMES         boost/config.hpp
-          PATHS         ${_boost_INCLUDE_SEARCH_DIRS}
-          PATH_SUFFIXES ${_boost_PATH_SUFFIX}
-          NO_DEFAULT_PATH
-      )
-
-    ENDIF( NOT Boost_INCLUDE_DIR )
-  ENDFOREACH(_boost_VER)
-
-  # If nothing is found search again using system default paths
-  FOREACH(_boost_VER ${_boost_TEST_VERSIONS})
-    IF( NOT Boost_INCLUDE_DIR )
-
-      # Add in a path suffix, based on the required version, ideally we could
-      # read this from version.hpp, but for that to work we'd need to know the include
-      # dir already
-      SET(_boost_PATH_SUFFIX
-        boost-${_boost_VER}
-      )
-
-      IF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
-          STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3" _boost_PATH_SUFFIX ${_boost_PATH_SUFFIX})
-      ELSEIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+")
-          STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2" _boost_PATH_SUFFIX ${_boost_PATH_SUFFIX})
-      ENDIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
-
-      FIND_PATH(Boost_INCLUDE_DIR
-          NAMES         boost/config.hpp
-          PATH_SUFFIXES ${_boost_PATH_SUFFIX}
-      )
-
-    ENDIF( NOT Boost_INCLUDE_DIR )
-  ENDFOREACH(_boost_VER)
-  IF(Boost_INCLUDE_DIR)
-    # Extract Boost_VERSION and Boost_LIB_VERSION from version.hpp
-    # Read the whole file:
-    #
-    SET(BOOST_VERSION 0)
-    SET(BOOST_LIB_VERSION "")
-    FILE(READ "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS)
-
-    STRING(REGEX REPLACE ".*#define BOOST_VERSION ([0-9]+).*" "\\1" Boost_VERSION "${_boost_VERSION_HPP_CONTENTS}")
-    STRING(REGEX REPLACE ".*#define BOOST_LIB_VERSION \"([0-9_]+)\".*" "\\1" Boost_LIB_VERSION "${_boost_VERSION_HPP_CONTENTS}")
-
-    SET(Boost_LIB_VERSION ${Boost_LIB_VERSION} CACHE STRING "The library version string for boost libraries")
-    SET(Boost_VERSION ${Boost_VERSION} CACHE STRING "The version number for boost libraries")
-
-    IF(NOT "${Boost_VERSION}" STREQUAL "0")
-      MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000")
-      MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000")
-      MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100")
-
-    ENDIF(NOT "${Boost_VERSION}" STREQUAL "0")
-
-    MESSAGE(STATUS "Found one boost ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION} " )
-  ENDIF(Boost_INCLUDE_DIR)
-
-  #MESSAGE(STATUS "Boost_FIND_VERSION_MAJOR=${Boost_FIND_VERSION_MAJOR}")
-  #MESSAGE(STATUS "required Boost_VERSION_MAJOR=${Boost_VERSION_MAJOR}")
-  #MESSAGE(STATUS "Boost_FIND_VERSION_MINOR=${Boost_FIND_VERSION_MINOR} ")
-  #MESSAGE(STATUS "required Boost_VERSION_MINOR=${Boost_VERSION_MINOR}")
-
-  #Setting some more suffixes for the library
-  SET (Boost_LIB_PREFIX "")
-  IF ( WIN32 AND NOT CYGWIN)
-    SET (Boost_LIB_PREFIX "lib")
-  ENDIF ( WIN32 AND NOT CYGWIN )
-  SET (_boost_COMPILER "-gcc")
-  IF (MSVC71)
-    SET (_boost_COMPILER "-vc71")
-  ENDIF(MSVC71)
-  IF (MSVC80)
-    SET (_boost_COMPILER "-vc80")
-  ENDIF(MSVC80)
-  IF (MSVC90)
-    SET (_boost_COMPILER "-vc90")
-  ENDIF (MSVC90)
-  IF (MINGW)
-    SET (_boost_COMPILER "-mgw")
-  ENDIF(MINGW)
-  IF (CYGWIN)
-    SET (_boost_COMPILER "-gcc")
-  ENDIF (CYGWIN)
-  IF (UNIX)
-    IF (APPLE)
-        SET (_boost_COMPILER "")
-    ELSE (APPLE)
-      IF (NOT CMAKE_COMPILER_IS_GNUCC)
-        # This is for the intel compiler
-        SET (_boost_COMPILER "-il")
-      ELSE (NOT CMAKE_COMPILER_IS_GNUCC)
-        IF (NOT CYGWIN)
-        #find out the version of gcc being used.
-        EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
-            ARGS --version
-            OUTPUT_VARIABLE _boost_COMPILER_VERSION
-        )
-        STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.[0-9] .*" "\\1\\2"
-               _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION})
-          SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}")
-        ENDIF (NOT CYGWIN)
-      ENDIF (NOT CMAKE_COMPILER_IS_GNUCC)
-    ENDIF (APPLE)
-  ENDIF(UNIX)
-
-  SET (_boost_MULTITHREADED "-mt")
-
-  IF( NOT Boost_USE_MULTITHREADED )
-    SET (_boost_MULTITHREADED "")
-  ENDIF( NOT Boost_USE_MULTITHREADED )
-
-  SET( _boost_STATIC_TAG "")
-  IF (WIN32)
-    SET (_boost_ABI_TAG "g")
-    SET( _boost_STATIC_TAG "-s")
-  ENDIF(WIN32)
-  SET (_boost_ABI_TAG "${_boost_ABI_TAG}d")
-
-  # ------------------------------------------------------------------------
-  #  Begin finding boost libraries
-  # ------------------------------------------------------------------------
-  FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
-    MESSAGE(STATUS "look for component ${COMPONENT}")
-    STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
-    SET( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" )
-    SET( Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE-NOTFOUND" )
-    SET( Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG-NOTFOUND")
-
-    # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
-    IF( Boost_USE_STATIC_LIBS )
-      SET( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
-      IF(WIN32)
-        SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
-      ELSE(WIN32)
-        SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
-      ENDIF(WIN32)
-    ENDIF( Boost_USE_STATIC_LIBS )
-
-#    MESSAGE(STATUS "look for sufixes ${CMAKE_FIND_LIBRARY_SUFFIXES}")
-#    MESSAGE(STATUS "NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}")
-#    MESSAGE(STATUS "NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}")
-#    MESSAGE(STATUS "NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}")
-#    MESSAGE(STATUS "NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}")
-#    MESSAGE(STATUS "NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}")
-#    MESSAGE(STATUS "PATHS ${_boost_LIBRARIES_SEARCH_DIRS}")
-
-    FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
-        NAMES  ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}
-        PATHS  ${_boost_LIBRARIES_SEARCH_DIRS}
-    	  NO_DEFAULT_PATH
-    )
-    MESSAGE(STATUS "found ? ${Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE}")
-
-    IF( NOT ${Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE} )
-#      MESSAGE(STATUS "NAMES  ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}")
-#      MESSAGE(STATUS "NAMES  ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}")
-#      MESSAGE(STATUS "NAMES  ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}")
-#      MESSAGE(STATUS "NAMES  ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}")
-#      MESSAGE(STATUS "NAMES  ${Boost_LIB_PREFIX}boost_${COMPONENT}")
-      FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
-          NAMES  ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
-                 ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
-                 ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
-                 ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}
-                 ${Boost_LIB_PREFIX}boost_${COMPONENT}
-      )
-#      MESSAGE(STATUS "found ? ${Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE}")
-    ENDIF( NOT ${Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE} )
-
-    FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG
-        NAMES  ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_boost_ABI_TAG}
-        PATHS  ${_boost_LIBRARIES_SEARCH_DIRS}
-	NO_DEFAULT_PATH
-    )
-
-    IF( NOT ${Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG} )
-      FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG
-          NAMES  ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_boost_ABI_TAG}
-      )
-    ENDIF( NOT ${Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG} )
-    _Boost_ADJUST_LIB_VARS(${UPPERCOMPONENT})
-    IF( Boost_USE_STATIC_LIBS )
-      SET(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
-    ENDIF( Boost_USE_STATIC_LIBS )
-  ENDFOREACH(COMPONENT)
-  # ------------------------------------------------------------------------
-  #  End finding boost libraries
-  # ------------------------------------------------------------------------
-
-  SET(Boost_INCLUDE_DIRS
-    ${Boost_INCLUDE_DIR}
-  )
-
-  MESSAGE(STATUS "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
-  MESSAGE(STATUS "Boost_LIBRARIES: ${Boost_LIBRARIES}")
-
-  SET(Boost_FOUND FALSE)
-  IF(Boost_INCLUDE_DIR)
-    SET( Boost_FOUND TRUE )
-    IF( Boost_FIND_VERSION_MAJOR AND Boost_VERSION_MAJOR LESS "${Boost_FIND_VERSION_MAJOR}" )
-      MESSAGE(STATUS "Boost major version less than required")
-      SET( Boost_FOUND FALSE )
-    ELSE( Boost_FIND_VERSION_MAJOR AND Boost_VERSION_MAJOR LESS "${Boost_FIND_VERSION_MAJOR}" )
-      IF( Boost_FIND_VERSION_MINOR AND Boost_VERSION_MINOR LESS "${Boost_FIND_VERSION_MINOR}" )
-        MESSAGE(STATUS "Boost minor version less than required")
-        SET( Boost_FOUND FALSE )
-      ELSE( Boost_FIND_VERSION_MINOR AND Boost_VERSION_MINOR LESS "${Boost_FIND_VERSION_MINOR}" )
-        IF( Boost_FIND_VERSION_PATCH AND Boost_VERSION_SUBMINOR LESS "${Boost_FIND_VERSION_PATCH}" )
-          MESSAGE(STATUS "Boost patch version less than required")
-          SET( Boost_FOUND FALSE )
-        ENDIF( Boost_FIND_VERSION_PATCH AND Boost_VERSION_SUBMINOR LESS "${Boost_FIND_VERSION_PATCH}" )
-      ENDIF( Boost_FIND_VERSION_MINOR AND Boost_VERSION_MINOR LESS "${Boost_FIND_VERSION_MINOR}" )
-    ENDIF( Boost_FIND_VERSION_MAJOR AND Boost_VERSION_MAJOR LESS "${Boost_FIND_VERSION_MAJOR}" )
-    set(_boost_CHECKED_COMPONENT FALSE)
-    FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
-      STRING(TOUPPER ${COMPONENT} COMPONENT)
-      set(_boost_CHECKED_COMPONENT TRUE)
-      IF(NOT Boost_${COMPONENT}_FOUND)
-        MESSAGE(STATUS "Boost component not found ${COMPONENT}")
-        SET( Boost_FOUND FALSE)
-      ENDIF(NOT Boost_${COMPONENT}_FOUND)
-    ENDFOREACH(COMPONENT)
-    IF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT )
-      # Compatibility Code for backwards compatibility with CMake 2.4
-
-      # Look for the boost library path.
-      # Note that the user may not have installed any libraries
-      # so it is quite possible the Boost_LIBRARY_PATH may not exist.
-      SET(_boost_LIB_DIR ${Boost_INCLUDE_DIR})
-
-      IF("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+")
-        GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH)
-      ENDIF ("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+")
-
-      IF("${_boost_LIB_DIR}" MATCHES "/include$")
-        # Strip off the trailing "/include" in the path.
-        GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH)
-      ENDIF("${_boost_LIB_DIR}" MATCHES "/include$")
-
-      IF(EXISTS "${_boost_LIB_DIR}/lib")
-        SET (_boost_LIB_DIR ${_boost_LIB_DIR}/lib)
-      ELSE(EXISTS "${_boost_LIB_DIR}/lib")
-        IF(EXISTS "${_boost_LIB_DIR}/stage/lib")
-          SET(_boost_LIB_DIR ${_boost_LIB_DIR}/stage/lib)
-        ELSE(EXISTS "${_boost_LIB_DIR}/stage/lib")
-          SET(_boost_LIB_DIR "")
-        ENDIF(EXISTS "${_boost_LIB_DIR}/stage/lib")
-      ENDIF(EXISTS "${_boost_LIB_DIR}/lib")
-
-      IF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}")
-        SET(Boost_LIBRARY_DIRS ${_boost_LIB_DIR})
-      ENDIF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}")
-
-    ENDIF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT )
-
-  ELSE(Boost_INCLUDE_DIR)
-    SET( Boost_FOUND FALSE)
-  ENDIF(Boost_INCLUDE_DIR)
-
-  IF (Boost_FOUND)
-      IF (NOT Boost_FIND_QUIETLY)
-        MESSAGE(STATUS "Found The Following Boost Libraries:")
-        FOREACH ( COMPONENT  ${Boost_FIND_COMPONENTS} )
-          STRING( TOUPPER ${COMPONENT} UPPERCOMPONENT )
-          IF ( Boost_${UPPERCOMPONENT}_FOUND )
-            MESSAGE (STATUS "  ${COMPONENT}")
-	    SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${UPPERCOMPONENT}_LIBRARY})
-          ENDIF ( Boost_${UPPERCOMPONENT}_FOUND )
-        ENDFOREACH(COMPONENT)
-	MESSAGE(STATUS "Boost Version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
-      ENDIF(NOT Boost_FIND_QUIETLY)
-  ELSE (Boost_FOUND)
-      IF (Boost_FIND_REQUIRED)
-        MESSAGE(STATUS "Boost Version required: ${Boost_FIND_VERSION}. Found: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
-        MESSAGE(FATAL_ERROR "Couldn't find the Boost libraries and/or include directory, or the version found is too old. Please install the Boost libraries AND development packages. You can set BOOST_ROOT, BOOST_INCLUDEDIR and BOOST_LIBRARYDIR to help find Boost.")
-      ENDIF(Boost_FIND_REQUIRED)
-  ENDIF(Boost_FOUND)
-
-  # Under Windows, automatic linking is performed, so no need to specify the libraries.
-  IF (WIN32)
-      SET(Boost_LIBRARIES "")
-  ENDIF(WIN32)
-
-  # show the Boost_INCLUDE_DIRS AND Boost_LIBRARIES variables only in the advanced view
-  MARK_AS_ADVANCED(Boost_INCLUDE_DIRS
-      Boost_LIBRARIES
-      Boost_LIBRARY_DIRS
-  )
-ENDIF(_boost_IN_CACHE)


fix finding havok libs in relwithdebinfo mode (uses release unless LL_DEBUG_HAVOK is used

--- indra/cmake/Havok.cmake
+++ indra/cmake/Havok.cmake
@@ -7,13 +7,16 @@
 set(HAVOK_DEBUG_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-fulldebug)
 set(HAVOK_RELEASE_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/release/havok)

-if (LL_DEBUG_HAVOK AND NOT WIN32)
-    set(HAVOK_RELWITHDEBINFO_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-fulldebug)
-else (LL_DEBUG_HAVOK AND NOT WIN32)
-    # Always link relwithdebinfo to havok-hybrid on windows.
-    set(HAVOK_RELWITHDEBINFO_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-hybrid)
-endif (LL_DEBUG_HAVOK AND NOT WIN32)
-
+if (LL_DEBUG_HAVOK)
+   if (WIN32)
+      # Always link relwithdebinfo to havok-hybrid on windows.
+      set(HAVOK_RELWITHDEBINFO_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-hybrid)
+   else (WIN32)
+      set(HAVOK_RELWITHDEBINFO_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-fulldebug)
+   endif (WIN32)
+else (LL_DEBUG_HAVOK)
+   set(HAVOK_RELWITHDEBINFO_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/release/havok)
+endif (LL_DEBUG_HAVOK)

 set(HAVOK_LIBS
     hkBase


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -4,7 +4,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2009)

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -4,7 +4,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2009)

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -1,10 +1,10 @@
 # Do not edit!  Generated by kwsysDateStamp.py

 # KWSys version date year component.  Format is CCYY.
-SET(KWSYS_DATE_STAMP_YEAR  2008)
+SET(KWSYS_DATE_STAMP_YEAR  2009)

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


man target

man target

--- cmake/MyPackageStart.cmake
+++ cmake/MyPackageStart.cmake
@@ -22,6 +22,13 @@
   #
   IF (NOT TARGET check)
     ADD_CUSTOM_TARGET (check COMMAND ${CMAKE_CTEST_COMMAND})
+  ENDIF ()
+  #
+  # Ditto for the man target, appended to install processing
+  #
+  IF (NOT TARGET man)
+    INSTALL (CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_MAKE_PROGRAM} man)")
+    ADD_CUSTOM_TARGET (man)
   ENDIF ()
   #
   # Use GNUInstallDirs in order to enforce lib64 if needed


test=develop

test=develop

--- cmake/external/eigen.cmake
+++ cmake/external/eigen.cmake
@@ -17,7 +17,7 @@
         extern_eigen3
         ${EXTERNAL_PROJECT_LOG_ARGS}
         GIT_REPOSITORY  "https://github.com/sabreshao/hipeigen.git"
-        GIT_TAG         0cba03ff9f8f9f70bbd92ac5857b031aa8fed6f9
+        GIT_TAG         7cb2b6e5a4b4a1efe658abb215cd866c6fb2275e
         PREFIX          ${EIGEN_SOURCE_DIR}
         UPDATE_COMMAND  ""
         CONFIGURE_COMMAND ""


Update SDL2-Image to version 2.0.2 on appveyor

--- cmake/get-sdl2_image.cmake
+++ cmake/get-sdl2_image.cmake
@@ -5,7 +5,7 @@

 include(ExternalProject)

-set(SDL2_IMAGE_VERSION "2.0.1")
+set(SDL2_IMAGE_VERSION "2.0.2")

 # For win32 it's faster to download the pre-compiled development binaries.
 if (WIN32)
@@ -18,7 +18,7 @@
       PREFIX ${DEPENDENCY_EXTRACT_DIR}
       DOWNLOAD_DIR ${DEPENDENCY_DOWNLOAD_DIR}
       URL https://libsdl.org/projects/SDL_image/release/SDL2_image-devel-${SDL2_IMAGE_VERSION}-mingw.tar.gz
-      URL_MD5 1
+      URL_MD5 3be7159e1edc98c7f5ebbabbb5b2c667
       CONFIGURE_COMMAND ""
       BUILD_COMMAND ""
       INSTALL_COMMAND
@@ -36,7 +36,7 @@
       PREFIX ${DEPENDENCY_EXTRACT_DIR}
       DOWNLOAD_DIR ${DEPENDENCY_DOWNLOAD_DIR}
       URL https://libsdl.org/projects/SDL_image/release/SDL2_image-devel-${SDL2_IMAGE_VERSION}-VC.zip
-      URL_MD5 00338534c605262dcbf8ffe90ec2785d
+      URL_MD5 a731f9ce332f8acc0e4db1421a250ae2
       CONFIGURE_COMMAND ""
       BUILD_COMMAND ""
       INSTALL_COMMAND


Followup to 12607800, testing it in PB2 didn't work, trying again Be more explicit about path to (potential) plugin tests dirs

--- cmake/install_layout.cmake
+++ cmake/install_layout.cmake
@@ -103,7 +103,7 @@
 # just use if(INSTALL_PLUGINTESTDIR).
 # The plugin must set its own install path for tests
 #
-FILE(GLOB plugin_tests plugin/*/tests)
+FILE(GLOB plugin_tests ${CMAKE_SOURCE_DIR}/plugin/*/tests)

 #
 # STANDALONE layout


Fix uninstall with white char inside path

--- cmake/make_uninstall.cmake
+++ cmake/make_uninstall.cmake
@@ -20,7 +20,7 @@
 endif()

 file(READ "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt" files)
-string(REGEX REPLACE "[ \r\n\t]" ";" files "${files}")
+string(REGEX REPLACE "[\r\n]" ";" files "${files}")

 foreach(file ${files})
     message(STATUS "Uninstalling ${file}")


Remove remain ninja specific dependencies

GNU make didn't copy the file without `POST_BUILD`.
but file names doesn't be conflict unlike vpk and self.
so, we just move commends to libs gen part then remain empty custom
target parts for ninja

--- cmake_toolchain/vita.cmake
+++ cmake_toolchain/vita.cmake
@@ -152,39 +152,33 @@

   ## ELF EXPORT target
   separate_arguments(VITA_LIBS_GEN_FLAGS)
+
+  set(stub_lib lib${target-lib}_stub.a)
+  set(stub_weak_lib lib${target-lib}_stub_weak.a)
+
   add_custom_target(${target-dir}
     ALL
     COMMAND ${VITA_LIBS_GEN} ${VITA_LIBS_GEN_FLAGS} ${target_yml} ${CMAKE_CURRENT_BINARY_DIR}/${target-dir}
     COMMAND make -C ${CMAKE_CURRENT_BINARY_DIR}/${target-dir}
+    COMMAND ${CMAKE_COMMAND} -E copy
+      ${CMAKE_CURRENT_BINARY_DIR}/${target-dir}/${stub_lib}
+      ${CMAKE_CURRENT_BINARY_DIR}/${stub_lib}
+    COMMAND ${CMAKE_COMMAND} -E copy
+      ${CMAKE_CURRENT_BINARY_DIR}/${target-dir}/${stub_weak_lib}
+      ${CMAKE_CURRENT_BINARY_DIR}/${stub_weak_lib}
     DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${target-dir}.yml
     COMMENT "Building stubs ${target-dir}"
   )

-  set(stub_lib lib${target-lib}_stub.a)
-  set(stub_weak_lib lib${target-lib}_stub_weak.a)
-
-  if(${CMAKE_GENERATOR} MATCHES ".*Ninja.*")
-    add_custom_target(${stub_lib}
-      ALL
-      COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/${target-dir}/${stub_lib} ${stub_lib}
-      DEPENDS ${target-dir}
-    )
-    add_custom_target(${stub_weak_lib}
-      ALL
-      COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/${target-dir}/${stub_weak_lib} ${stub_weak_lib}
-      DEPENDS ${target-dir}
-    )
-  else()
-    add_custom_command(TARGET ${target-dir}
-      POST_BUILD
-      COMMAND ${CMAKE_COMMAND} -E copy
-        ${CMAKE_CURRENT_BINARY_DIR}/${target-dir}/${stub_lib}
-        ${CMAKE_CURRENT_BINARY_DIR}/${stub_lib}
-      COMMAND ${CMAKE_COMMAND} -E copy
-        ${CMAKE_CURRENT_BINARY_DIR}/${target-dir}/${stub_weak_lib}
-        ${CMAKE_CURRENT_BINARY_DIR}/${stub_weak_lib}
-    )
-  endif()
+  add_custom_target(${stub_lib}
+    ALL
+    DEPENDS ${target-dir}
+  )
+
+  add_custom_target(${stub_weak_lib}
+    ALL
+    DEPENDS ${target-dir}
+  )

   if(TARGET ${source})
     add_dependencies(${target-dir} ${source})


build: Fix missing gapir.exe

build: Fix missing gapir.exe

--- cmd/gapir/CMakeBuild.cmake
+++ cmd/gapir/CMakeBuild.cmake
@@ -19,6 +19,7 @@
     add_cmake_target("gapir-msvc" gapir "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" "gapir.exe"
         DEPENDEES gapir_static
         DEPENDS ${sources}
+        DESTINATION ${TARGET_INSTALL_PATH}
     )
     ExternalProject_Add_Step("gapir-msvc" dump_syms
         COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/../../third_party/breakpad/src/tools/windows/binaries/dump_syms.exe" "<BINARY_DIR>/bin/gapir.pdb" > "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/../gapir.sym"


handle COMPILE_FLAGS parameter to mic_add_* macros correctly

--- cmake/FindMIC.cmake
+++ cmake/FindMIC.cmake
@@ -174,7 +174,7 @@

       string(TOUPPER "${CMAKE_BUILD_TYPE}" _tmp)
       string(STRIP "${CMAKE_MIC_${_lang}_FLAGS} ${CMAKE_${_lang}_FLAGS_${_tmp}} ${_mic_cflags}" _flags)
-      string(REPLACE " " ";" _flags "${_flags}")
+      string(REPLACE " " ";" _flags "${_flags} ${ARGN}")
       get_directory_property(_inc INCLUDE_DIRECTORIES)
       foreach(_i ${_inc})
          list(APPEND _flags "-I${_i}")
@@ -183,7 +183,7 @@
       add_custom_command(OUTPUT "${${_output}}"
          COMMAND "${_compiler}" -mmic -fPIC
          -DVC_IMPL=MIC
-         ${_flags} ${ARGN} -c -o "${${_output}}" "${_abs}"
+         ${_flags} -c -o "${${_output}}" "${_abs}"
          DEPENDS "${_abs}"
          IMPLICIT_DEPENDS ${_lang} "${_abs}"
          WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
@@ -224,7 +224,7 @@
          elseif(_state EQUAL 0) # SOURCES
             set(_srcs ${_srcs} "${_arg}")
          elseif(_state EQUAL 1) # COMPILE_FLAGS
-            set(_cflags ${_cflags} "${_arg}")
+            list(APPEND _cflags "${_arg}")
          elseif(_state EQUAL 2) # LINK_LIBRARIES
             get_filename_component(_lpath "${_arg}" PATH)
             get_filename_component(_lname "${_arg}" NAME)


Create link_glog_gflags and link_gtest to replace link_paddle_exe and link_paddle_test

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -29,11 +29,25 @@
 # https://cmake.org/cmake/help/v3.0/module/CMakeParseArguments.html
 #

+# generic.cmake depends on {GLOG,GFLAGS,GTEST,GTEST_MAIN}_LIBRARIES
+# generated by cmake/external/*.cmake.
+
 # Because gflags depends on pthread, I copied the following snippet
 # from https://stackoverflow.com/a/29871891/724872.
 set(THREADS_PREFER_PTHREAD_FLAG ON)
 find_package(Threads REQUIRED)

+function(link_glog_gflags TARGET_NAME)
+  target_link_libraries(${TARGET_NAME} ${GLOG_LIBRARIES} ${GFLAGS_LIBRARIES} Threads::Threads)
+  add_dependencies(${TARGET_NAME} glog gflags)
+endfunction()
+
+function(link_gtest TARGET_NAME)
+  target_link_libraries(${TARGET_NAME} ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES})
+  add_dependencies(${TARGET_NAME} gtest)
+endfunction()
+
+
 # cc_library parses tensor.cc and figures out that target also depend on tensor.h.
 # cc_library(tensor
 #   SRCS
@@ -69,6 +83,7 @@
     target_link_libraries(${TARGET_NAME} ${cc_binary_DEPS})
     add_dependencies(${TARGET_NAME} ${cc_binary_DEPS})
   endif()
+  link_glog_gflags(${TARGET_NAME})
 endfunction(cc_binary)

 # The dependency to target tensor implies that if any of
@@ -88,12 +103,8 @@
     target_link_libraries(${TARGET_NAME} ${cc_test_DEPS})
     add_dependencies(${TARGET_NAME} ${cc_test_DEPS})
   endif()
-  target_link_libraries(${TARGET_NAME}
-    ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES}
-    ${GLOG_LIBRARIES}
-    ${GFLAGS_LIBRARIES}
-    Threads::Threads)
-  add_dependencies(${TARGET_NAME} gtest glog gflags)
+  link_glog_gflags(${TARGET_NAME})
+  link_gtest(${TARGET_NAME})
   add_test(${TARGET_NAME} ${TARGET_NAME})
 endfunction(cc_test)

@@ -130,6 +141,7 @@
     target_link_libraries(${TARGET_NAME} ${nv_binary_DEPS})
     add_dependencies(${TARGET_NAME} ${nv_binary_DEPS})
   endif()
+  link_glog_gflags(${TARGET_NAME})
 endfunction(nv_binary)

 # The dependency to target tensor implies that if any of
@@ -149,12 +161,8 @@
     target_link_libraries(${TARGET_NAME} ${nv_test_DEPS})
     add_dependencies(${TARGET_NAME} ${nv_test_DEPS})
   endif()
-  target_link_libraries(${TARGET_NAME}
-    ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES}
-    ${GLOG_LIBRARIES}
-    ${GFLAGS_LIBRARIES}
-    Threads::Threads)
-  add_dependencies(${TARGET_NAME} gtest glog gflags)
+  link_glog_gflags(${TARGET_NAME})
+  link_gtest(${TARGET_NAME})
   add_test(${TARGET_NAME} ${TARGET_NAME})
 endfunction(nv_test)


Submit to the public dashboard for now

Submit to the public dashboard for now

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -10,5 +10,5 @@
 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "open.cdash.org")
 #set(CTEST_DROP_LOCATION "/CDash/submit.php?project=MatViz")
-set(CTEST_DROP_LOCATION "/CDash/submit.php")
+set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard")
 set(CTEST_DROP_SITE_CDASH TRUE)


component fix - component now always include the include.cmake, even if component was previously built

--- components/configure.cmake
+++ components/configure.cmake
@@ -56,8 +56,8 @@

   ENDIF()

-  IF(EXISTS ${CURRENT_COMPONENT_DIR}/include.cmake)
-    INCLUDE(${CURRENT_COMPONENT_DIR}/include.cmake)
-  ENDIF()
+    IF(EXISTS ${CURRENT_COMPONENT_DIR}/include.cmake)
+      INCLUDE(${CURRENT_COMPONENT_DIR}/include.cmake)
+    ENDIF()

 ENDMACRO()


Add SYSTEM keyword option to ament_target_dependencies (#297)

* Add SYSTEM keyword option to ament_target_dependencies

Signed-off-by: Andre Nguyen <61e6ac4ebdc1039e9cdee5a89b31803143ca3db4@applanix.com>

* Add documentation of SYSTEM keyword for ament_target_dependencies

Signed-off-by: Andre Nguyen <61e6ac4ebdc1039e9cdee5a89b31803143ca3db4@applanix.com>

--- ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake
+++ ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake
@@ -31,6 +31,9 @@
 #   INTERFACE or PUBLIC keyword.
 #   If it starts with INTERFACE or PUBLIC, this keyword is used in the
 #   target_* calls.
+#   SYSTEM keyword.
+#   If the SYSTEM keyword is specified, it will be added to the
+#   target_include_directories calls.
 # :type ARGN: list of strings
 #
 # @public
@@ -40,7 +43,7 @@
     message(FATAL_ERROR "ament_target_dependencies() the first argument must be a valid target name")
   endif()
   if(${ARGC} GREATER 0)
-    cmake_parse_arguments(ARG "INTERFACE;PUBLIC" "" "" ${ARGN})
+    cmake_parse_arguments(ARG "INTERFACE;PUBLIC;SYSTEM" "" "" ${ARGN})
     set(optional_keyword "")
     set(required_keyword "PUBLIC")
     if(ARG_INTERFACE)
@@ -55,6 +58,10 @@
         message(FATAL_ERROR "ament_target_dependencies() PUBLIC keyword is only allowed before the package names")
       endif()
       set(optional_keyword PUBLIC)
+    endif()
+    set(system_keyword "")
+    if(ARG_SYSTEM)
+      set(system_keyword SYSTEM)
     endif()
     set(definitions "")
     set(include_dirs "")
@@ -127,13 +134,13 @@
       ament_include_directories_order(ordered_interface_include_dirs ${interface_include_dirs})
       # the interface include dirs are used privately to ensure proper order
       # and the interfaces cover the public case
-      target_include_directories(${target}
+      target_include_directories(${target} ${system_keyword}
         PRIVATE ${ordered_interface_include_dirs})
     endif()
     ament_include_directories_order(ordered_include_dirs ${include_dirs})
     target_link_libraries(${target}
       ${optional_keyword} ${interfaces})
-    target_include_directories(${target}
+    target_include_directories(${target} ${system_keyword}
       ${required_keyword} ${ordered_include_dirs})
     if(NOT ARG_INTERFACE)
       ament_libraries_deduplicate(unique_libraries ${libraries})


BUG: Post version is number of commits since tag

The number of commits since the version file changed was being
used. This is not corrected to number of commits since the tag.

Change-Id: Ic2c813f2ec91a96709408a0c375c2865c4c349f8

--- CMake/sitkSourceVersion.cmake
+++ CMake/sitkSourceVersion.cmake
@@ -20,10 +20,11 @@
 # match that of the tag, then it'll be considered the project is in
 # post release mode otherwise it's considered underdevelopment.
 #
-# One of the following variables will be defined as number of commits
-# since the projects Version.cmake file has been modified.
-#
-# _GIT_VERSION_POST
+# Only one of the following variables will be defined.
+# _GIT_VERSION_DEV is defined as number of commits
+# since the projects Version.cmake file has been modified. While
+# _GIT_VERSION_POST is defined as the number of commits since the tag.
+
 # _GIT_VERSION_DEV
 #

@@ -45,11 +46,11 @@
 endif()

 # find the closest anotated tag with the v prefix for version
-git_describe(_GIT_TAG "--match=v*" "--abbrev=0")
+git_describe(_GIT_TAG "--match=v*")

 git_commits_since("${PROJECT_SOURCE_DIR}/Version.cmake" _GIT_VERSION_COUNT)

-set(VERSION_REGEX "^v([0-9]+)\\.([0-9]+)+(\\.([0-9]+))?(\\.([0-9]+))?((a|b|c|rc)([0-9]+))?")
+set(VERSION_REGEX "^v([0-9]+)\\.([0-9]+)+(\\.([0-9]+))?(\\.([0-9]+))?((a|b|c|rc)[0-9]+)?(-[0-9]+)?")

 string(REGEX MATCH "${VERSION_REGEX}" _out "${_GIT_TAG}")

@@ -76,6 +77,14 @@
   set(_GIT_VERSION_RC "${CMAKE_MATCH_7}" ) # a,b,rc01 etc
 endif()

+if(NOT "${CMAKE_MATCH_9}" STREQUAL "")
+  #trim leading '-'
+  string(SUBSTRING "${CMAKE_MATCH_9}" 1 -1 CMAKE_MATCH_9)
+
+  set(_GIT_TAG_COUNT "${CMAKE_MATCH_9}")
+endif()
+
+
 set(_GIT_VERSION "${_GIT_VERSION_MAJOR}.${_GIT_VERSION_MINOR}")
 if(DEFINED _GIT_VERSION_PATCH)
   set(_GIT_VERSION "${_GIT_VERSION}.${_GIT_VERSION_PATCH}")
@@ -95,8 +104,8 @@

 if(_GIT_VERSION VERSION_EQUAL _${CMAKE_PROJECT_NAME}_VERSION)
-  if(_GIT_VERSION_COUNT) #ignore if 0
-    set(_GIT_VERSION_POST "${_GIT_VERSION_COUNT}")
+  if(_GIT_TAG_COUNT) #ignore if 0
+    set(_GIT_VERSION_POST "${_GIT_TAG_COUNT}")
   endif()
 else()
   # The first commit after a tag should increase the project version


updated mitkdata hash

updated mitkdata hash

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

 if(BUILD_TESTING)
-  set(revision_tag 5162d8f3)
-#                  ^^^^^^^^  these are just to check correct length of hash part
+  set(revision_tag 5e202c70)
+#                 ^^^^^^^^  these are just to check correct length of hash part

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


apply different patch witch does not disable antialiasing

--- CMakeExternals/PatchVTK.cmake
+++ CMakeExternals/PatchVTK.cmake
@@ -1,5 +1,5 @@
-set(path "Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx")
+set(path "Rendering/OpenGL/vtkOpenGL.h")
 file(STRINGS ${path} contents NEWLINE_CONSUME)
-string(REPLACE "//#define GLX_GLXEXT_LEGACY" "#define GLX_GLXEXT_LEGACY" contents ${contents})
+string(REPLACE "#define GL_GLEXT_LEGACY" "//#define GL_GLEXT_LEGACY" contents ${contents})
 set(CONTENTS ${contents})
 configure_file(${TEMPLATE_FILE} ${path} @ONLY)


Update UseODB.cmake

Update UseODB.cmake

--- cmake/UseODB.cmake
+++ cmake/UseODB.cmake
@@ -9,202 +9,171 @@
 set(CMAKE_INCLUDE_CURRENT_DIR TRUE)

 function(odb_compile outvar)
-  if(NOT ODB_EXECUTABLE)
-    message(FATAL_ERROR "odb compiler executable not found")
-  endif()
+	if(NOT ODB_EXECUTABLE)
+		message(FATAL_ERROR "odb compiler executable not found")
+	endif()

-  set(options GENERATE_QUERY GENERATE_SESSION GENERATE_SCHEMA GENERATE_PREPARED
-          GENERATE_SCHEMA_ONLY AT_ONCE)
-  set(oneValueParams SCHEMA_FORMAT SCHEMA_NAME TABLE_PREFIX
-    STANDARD SLOC_LIMIT
-    HXX_PROLOGUE HEADER_PROLOGUE INLINE_PROLOGUE SOURCE_PROLOGUE
-    HEADER_EPILOGUE INLINE_EPILOGUE SOURCE_EPILOGUE ODB_EPILOGUE
-    MULTI_DATABASE
-    INCLUDE_PREFIX
-    DEFAULT_POINTER
-    PGSQL_SERVER_VERSION
-          OUTPUT_DIR
-          )
-  set(multiValueParams FILES INCLUDE DB INCLUDE_REGEX PROFILE)
+	set(options AT_ONCE GENERATE_QUERY GENERATE_SESSION GENERATE_SCHEMA GENERATE_SCHEMA_ONLY GENERATE_PREPARED)
+	set(oneValueParams SCHEMA_FORMAT SCHEMA_NAME TABLE_PREFIX
+		STANDARD SLOC_LIMIT
+		HEADER_PROLOGUE INLINE_PROLOGUE SOURCE_PROLOGUE
+		HEADER_EPILOGUE INLINE_EPILOGUE SOURCE_EPILOGUE
+		MULTI_DATABASE
+		X_CPP_OPTION)
+	set(multiValueParams FILES INCLUDE DB PROFILE)

-  cmake_parse_arguments(PARAM "${options}" "${oneValueParams}" "${multiValueParams}" ${ARGN})
+	cmake_parse_arguments(PARAM "${options}" "${oneValueParams}" "${multiValueParams}" ${ARGN})

-  if(PARAM_UNPARSED_ARGUMENTS)
-    message(FATAL_ERROR "invalid arguments passed to odb_wrap_cpp: ${PARAM_UNPARSED_ARGUMENTS}")
-  endif()
+	if(PARAM_UNPARSED_ARGUMENTS)
+		message(FATAL_ERROR "invalid arguments passed to odb_wrap_cpp: ${PARAM_UNPARSED_ARGUMENTS}")
+	endif()

-  if(NOT PARAM_FILES)
-    message(FATAL_ERROR: "no input files to odb_compile")
-  endif()
+	if(NOT PARAM_FILES)
+		message(FATAL_ERROR: "no input files to odb_compile")
+	endif()

-  set(ODB_ARGS)
+	set(ODB_ARGS)

-  if(PARAM_MULTI_DATABASE)
-    list(APPEND ODB_ARGS --multi-database "${PARAM_MULTI_DATABASE}")
-    list(APPEND PARAM_DB common)
-  endif()
+	if(PARAM_MULTI_DATABASE)
+		list(APPEND ODB_ARGS --multi-database "${PARAM_MULTI_DATABASE}")
+		list(APPEND PARAM_DB common)
+	endif()

-  foreach(db ${PARAM_DB})
-    list(APPEND ODB_ARGS -d "${db}")
-  endforeach()
+	foreach(db ${PARAM_DB})
+		list(APPEND ODB_ARGS -d "${db}")
+	endforeach()

-  if(PARAM_GENERATE_QUERY)
-    list(APPEND ODB_ARGS --generate-query)
-  endif()
+	if(PARAM_AT_ONCE)
+		list(APPEND ODB_ARGS --at-once)
+	endif()

-  if(PARAM_GENERATE_SESSION)
-    list(APPEND ODB_ARGS --generate-session)
-  endif()
+	if(PARAM_GENERATE_QUERY)
+		list(APPEND ODB_ARGS --generate-query)
+	endif()

-  if(PARAM_GENERATE_SCHEMA)
-    list(APPEND ODB_ARGS --generate-schema)
-  endif()
+	if(PARAM_GENERATE_SESSION)
+		list(APPEND ODB_ARGS --generate-session)
+	endif()

-  if(PARAM_GENERATE_PREPARED)
-    list(APPEND ODB_ARGS --generate-prepared)
-  endif()
+	if(PARAM_GENERATE_SCHEMA)
+		list(APPEND ODB_ARGS --generate-schema)
+	endif()

-  if (PARAM_GENERATE_SCHEMA_ONLY)
-      list(APPEND ODB_ARGS --generate-schema-only)
-  endif()
+	if(PARAM_GENERATE_SCHEMA_ONLY)
+		list(APPEND ODB_ARGS --generate-schema-only)
+	endif()

-  if (PARAM_AT_ONCE)
-      list(APPEND ODB_ARGS --at-once)
-  endif()
+	if(PARAM_GENERATE_PREPARED)
+		list(APPEND ODB_ARGS --generate-prepared)
+	endif()

-  if(PARAM_SCHEMA_FORMAT)
-    list(APPEND ODB_ARGS --schema-format "${PARAM_SCHEMA_FORMAT}")
-  endif()
+	if(PARAM_SCHEMA_FORMAT)
+		list(APPEND ODB_ARGS --schema-format "${PARAM_SCHEMA_FORMAT}")
+	endif()

-  if(PARAM_SCHEMA_NAME)
-    list(APPEND ODB_ARGS --schema-name "${PARAM_SCHEMA_NAME}")
-  endif()
+	if(PARAM_SCHEMA_NAME)
+		list(APPEND ODB_ARGS --schema-name "${PARAM_SCHEMA_NAME}")
+	endif()

-  if(PARAM_TABLE_PREFIX)
-    list(APPEND ODB_ARGS --table-prefix "${PARAM_TABLE_PREFIX}")
-  endif()
+	if(PARAM_TABLE_PREFIX)
+		list(APPEND ODB_ARGS --table-prefix "${PARAM_TABLE_PREFIX}")
+	endif()

-  if(PARAM_STANDARD)
-    list(APPEND ODB_ARGS --std "${PARAM_STANDARD}")
-  endif()
+	if(PARAM_STANDARD)
+		list(APPEND ODB_ARGS --std "${PARAM_STANDARD}")
+	endif()

-  if(PARAM_SLOC_LIMIT)
-    list(APPEND ODB_ARGS --sloc-limit "${PARAM_SLOC_LIMIT}")
-  endif()
+	if(PARAM_SLOC_LIMIT)
+		list(APPEND ODB_ARGS --sloc-limit "${PARAM_SLOC_LIMIT}")
+	endif()

-  if(PARAM_HXX_PROLOGUE)
-    list(APPEND ODB_ARGS --hxx-prologue "${PARAM_HXX_PROLOGUE}")
-  endif()
+	if(PARAM_HEADER_PROLOGUE)
+		list(APPEND ODB_ARGS --hxx-prologue-file "${PARAM_HEADER_PROLOGUE}")
+	endif()

-  if(PARAM_HEADER_PROLOGUE)
-    list(APPEND ODB_ARGS --hxx-prologue-file "${PARAM_HEADER_PROLOGUE}")
-  endif()
+	if(PARAM_INLINE_PROLOGUE)
+		list(APPEND ODB_ARGS --ixx-prologue-file "${PARAM_INLINE_PROLOGUE}")
+	endif()

-  if(PARAM_INLINE_PROLOGUE)
-    list(APPEND ODB_ARGS --ixx-prologue-file "${PARAM_INLINE_PROLOGUE}")
-  endif()
+	if(PARAM_SOURCE_PROLOGUE)
+		list(APPEND ODB_ARGS --cxx-prologue-file "${PARAM_SOURCE_PROLOGUE}")
+	endif()

-  if(PARAM_SOURCE_PROLOGUE)
-    list(APPEND ODB_ARGS --cxx-prologue-file "${PARAM_SOURCE_PROLOGUE}")
-  endif()
+	if(PARAM_HEADER_EPILOGUE)
+		list(APPEND ODB_ARGS --hxx-epilogue-file "${PARAM_HEADER_EPILOGUE}")
+	endif()

-  if(PARAM_HEADER_EPILOGUE)
-    list(APPEND ODB_ARGS --hxx-epilogue-file "${PARAM_HEADER_EPILOGUE}")
-  endif()
+	if(PARAM_INLINE_EPILOGUE)
+		list(APPEND ODB_ARGS --ixx-epilogue-file "${PARAM_INLINE_EPILOGUE}")
+	endif()

-  if(PARAM_INLINE_EPILOGUE)
-    list(APPEND ODB_ARGS --ixx-epilogue-file "${PARAM_INLINE_EPILOGUE}")
-  endif()
+	if(PARAM_SOURCE_EPILOGUE)
+		list(APPEND ODB_ARGS --cxx-epilogue-file "${PARAM_SOURCE_EPILOGUE}")
+	endif()

-  if(PARAM_SOURCE_EPILOGUE)
-    list(APPEND ODB_ARGS --cxx-epilogue-file "${PARAM_SOURCE_EPILOGUE}")
-  endif()
+	foreach(profile ${PARAM_PROFILE})
+		list(APPEND ODB_ARGS --profile "${profile}")
+	endforeach()

-  if(PARAM_ODB_EPILOGUE)
-    list(APPEND ODB_ARGS --odb-epilogue "${PARAM_ODB_EPILOGUE}")
-  endif()
+	if(PARAM_X_CPP_OPTION)
+		list(APPEND ODB_ARGS -x "${PARAM_X_CPP_OPTION}")
+	endif()

-  if(PARAM_OUTPUT_DIR)
-    set(ODB_COMPILE_OUTPUT_DIR "${PARAM_OUTPUT_DIR}")
-  endif()
+	list(APPEND ODB_ARGS --output-dir "${ODB_COMPILE_OUTPUT_DIR}")
+	list(APPEND ODB_ARGS --hxx-suffix "${ODB_COMPILE_HEADER_SUFFIX}")
+	list(APPEND ODB_ARGS --ixx-suffix "${ODB_COMPILE_INLINE_SUFFIX}")
+	list(APPEND ODB_ARGS --cxx-suffix "${ODB_COMPILE_SOURCE_SUFFIX}")

-  if(PARAM_PROFILE)
-    foreach(p ${PARAM_PROFILE})
-      list(APPEND ODB_ARGS --profile "${p}")
-    endforeach()
-  endif()
+	if(PARAM_MULTI_DATABASE AND NOT "${ODB_COMPILE_FILE_SUFFIX}" MATCHES ".+:.+")
+		set(osuffix "${ODB_COMPILE_FILE_SUFFIX}")
+		set(ODB_COMPILE_FILE_SUFFIX)
+		foreach(db ${PARAM_DB})
+			if("${db}" MATCHES "common")
+				list(APPEND ODB_COMPILE_FILE_SUFFIX "${db}:${osuffix}")
+			else()
+				list(APPEND ODB_COMPILE_FILE_SUFFIX "${db}:${osuffix}_${db}")
+			endif()
+		endforeach()
+	endif()

-  if(PARAM_INCLUDE_PREFIX)
-    list(APPEND ODB_ARGS --include-prefix "${PARAM_INCLUDE_PREFIX}")
-  endif()
+	foreach(sfx ${ODB_COMPILE_FILE_SUFFIX})
+		list(APPEND ODB_ARGS --odb-file-suffix "${sfx}")
+	endforeach()

-  if (PARAM_DEFAULT_POINTER)
-      list(APPEND ODB_ARGS --default-pointer "${PARAM_DEFAULT_POINTER}")
-  endif()
+	foreach(dir ${PARAM_INCLUDE} ${ODB_INCLUDE_DIRS})
+		list(APPEND ODB_ARGS "-I${dir}")
+	endforeach()

-  if (PARAM_PGSQL_SERVER_VERSION)
-      list(APPEND ODB_ARGS --pgsql-server-version "${PARAM_PGSQL_SERVER_VERSION}")
-  endif()
+	file(REMOVE_RECURSE "${ODB_COMPILE_OUTPUT_DIR}")
+	file(MAKE_DIRECTORY "${ODB_COMPILE_OUTPUT_DIR}")

-  list(APPEND ODB_ARGS --output-dir "${ODB_COMPILE_OUTPUT_DIR}")
-  list(APPEND ODB_ARGS --hxx-suffix "${ODB_COMPILE_HEADER_SUFFIX}")
-  list(APPEND ODB_ARGS --ixx-suffix "${ODB_COMPILE_INLINE_SUFFIX}")
-  list(APPEND ODB_ARGS --cxx-suffix "${ODB_COMPILE_SOURCE_SUFFIX}")
+	foreach(input ${PARAM_FILES})
+		get_filename_component(fname "${input}" NAME_WE)
+		set(outputs)

-  if(PARAM_MULTI_DATABASE AND NOT "${ODB_COMPILE_FILE_SUFFIX}" MATCHES ".+:.+")
-    set(osuffix "${ODB_COMPILE_FILE_SUFFIX}")
-    set(ODB_COMPILE_FILE_SUFFIX)
-    foreach(db ${PARAM_DB})
-      if("${db}" MATCHES "common")
-        list(APPEND ODB_COMPILE_FILE_SUFFIX "${db}:${osuffix}")
-      else()
-        list(APPEND ODB_COMPILE_FILE_SUFFIX "${db}:${osuffix}_${db}")
-      endif()
-    endforeach()
-  endif()
+		foreach(sfx ${ODB_COMPILE_FILE_SUFFIX})
+			string(REGEX REPLACE ":.*$" "" pfx "${sfx}")
+			string(REGEX REPLACE "^.*:" "" sfx "${sfx}")

-  foreach(reg ${PARAM_INCLUDE_REGEX})
-      list(APPEND ODB_ARGS --include-regex "${reg}")
-  endforeach()
+			if(NOT "${PARAM_MULTI_DATABASE}" MATCHES "static" OR NOT "${pfx}" MATCHES "common")
+				set(output "${ODB_COMPILE_OUTPUT_DIR}/${fname}${sfx}${ODB_COMPILE_SOURCE_SUFFIX}")
+				list(APPEND ${outvar} "${output}")
+				list(APPEND outputs "${output}")
+			endif()
+		endforeach()

-  foreach(sfx ${ODB_COMPILE_FILE_SUFFIX})
-    list(APPEND ODB_ARGS --odb-file-suffix "${sfx}")
-  endforeach()
+		if(ODB_COMPILE_DEBUG)
+			set(_msg "${ODB_EXECUTABLE} ${ODB_ARGS} ${input}")
+			string(REPLACE ";" " " _msg "${_msg}")
+			message(STATUS "${_msg}")
+		endif()

-  foreach(dir ${PARAM_INCLUDE} ${ODB_INCLUDE_DIRS})
-    list(APPEND ODB_ARGS "-I${dir}")
-  endforeach()
+		add_custom_command(OUTPUT ${outputs}
+			COMMAND ${ODB_EXECUTABLE} ${ODB_ARGS} "${input}"
+			DEPENDS "${input}"
+			WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+			VERBATIM)
+	endforeach()

-  file(REMOVE_RECURSE "${ODB_COMPILE_OUTPUT_DIR}")
-  file(MAKE_DIRECTORY "${ODB_COMPILE_OUTPUT_DIR}")
-
-  foreach(input ${PARAM_FILES})
-    get_filename_component(fname "${input}" NAME_WE)
-    set(outputs)
-
-    foreach(sfx ${ODB_COMPILE_FILE_SUFFIX})
-      string(REGEX REPLACE ":.*$" "" pfx "${sfx}")
-      string(REGEX REPLACE "^.*:" "" sfx "${sfx}")
-
-      if(NOT "${PARAM_MULTI_DATABASE}" MATCHES "static" OR NOT "${pfx}" MATCHES "common")
-        set(output "${ODB_COMPILE_OUTPUT_DIR}/${fname}${sfx}${ODB_COMPILE_SOURCE_SUFFIX}")
-        list(APPEND ${outvar} "${output}")
-        list(APPEND outputs "${output}")
-      endif()
-    endforeach()
-
-    if(ODB_COMPILE_DEBUG)
-      set(_msg "${ODB_EXECUTABLE} ${ODB_ARGS} ${input}")
-      string(REPLACE ";" " " _msg "${_msg}")
-      message(STATUS "${_msg}")
-    endif()
-
-    add_custom_command(OUTPUT ${outputs}
-      COMMAND ${ODB_EXECUTABLE} ${ODB_ARGS} "${input}"
-      DEPENDS "${input}"
-      WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
-      VERBATIM)
-  endforeach()
-
-  set(${outvar} ${${outvar}} PARENT_SCOPE)
-  endfunction()
+	set(${outvar} ${${outvar}} PARENT_SCOPE)
+endfunction()


Some minor cleaning up [ci skip].

Some minor cleaning up [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -308,7 +308,7 @@
             ENDIF()

             # Add a definition in case of compilation from within Qt Creator
-            # using MSVC since JOM overrides some of our settings
+            # using MSVC and JOM since the latter overrides some of our settings

             IF(WIN32)
                 ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)


Trying to find out why Travis-CI cannot copy "/opt/qt53/plugins/printsupport/libcupsprintersupport.so" to "/home/travis/build/opencor/opencor/build/plugins/printsupport/libcupsprintersupport.so".

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -807,6 +807,7 @@

 IF(NOT EXISTS ${PROJECT_BUILD_DIR}/${DEST_DIRNAME})
     MESSAGE(">>> Creating '${PROJECT_BUILD_DIR}/${DEST_DIRNAME}'...")
+    EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BUILD_DIR}/${DEST_DIRNAME})
 ENDIF()

     IF("${ARGN}" STREQUAL "")


Deactivate OpenMP for preprocessing ... _OPENMP and _OPENACC are added by CLAW directly

--- compiler/cray.cmake
+++ compiler/cray.cmake
@@ -1,5 +1,5 @@
 # For Cray Compiler
-set(FPPFLAGS "-e P")                  # for preprocessing only
+set(FPPFLAGS "-e P -hnoomp")          # for preprocessing only
 set(FPP_REDIRECT false)               # cannot use redirection > to save file
 set(CLAW_TEST_FFP_FLAGS "-e Z")       # for preprocessing and compilation
 set(TEST_BASE_FLAGS "-h noacc,noomp") # Unactivate OpenACC and OpenMP


Change in FindAssimp.cmake

Change in FindAssimp.cmake

--- cmake/Modules/FindAssimp.cmake
+++ cmake/Modules/FindAssimp.cmake
@@ -14,7 +14,7 @@
   /opt/local/include
 )

-FIND_LIBRARY( ASSIMP_LIBRARY assimp
+FIND_LIBRARY( ASSIMP_LIBRARIES assimp
 	${ASSIMP_ROOT_DIR}/lib32
   /usr/lib64
   /usr/lib
@@ -22,8 +22,7 @@
   /opt/local/lib
 )

-find_package_handle_standard_args(ASSIMP DEFAULT_MSG ASSIMP_LIBRARY ASSIMP_INCLUDE_DIR )
-IF(ASSIMP_INCLUDE_DIR AND ASSIMP_LIBRARY)
+find_package_handle_standard_args(ASSIMP DEFAULT_MSG ASSIMP_LIBRARIES ASSIMP_INCLUDE_DIR )
+IF(ASSIMP_INCLUDE_DIR AND ASSIMP_LIBRARIES)
   SET( ASSIMP_FOUND TRUE )
-  SET( ASSIMP_LIBRARIES ${ASSIMP_LIBRARY} )
-ENDIF(ASSIMP_INCLUDE_DIR AND ASSIMP_LIBRARY)+ENDIF(ASSIMP_INCLUDE_DIR AND ASSIMP_LIBRARIES)


Remove sdk version from veclib searching path.

--- cmake/Modules/FindvecLib.cmake
+++ cmake/Modules/FindvecLib.cmake
@@ -16,7 +16,7 @@
           DOC "vecLib include directory"
           PATHS /System/Library/Frameworks/Accelerate.framework/Versions/Current/${__veclib_include_suffix}
                 /System/Library/${__veclib_include_suffix}
-                /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/
+                /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/
           NO_DEFAULT_PATH)

 include(FindPackageHandleStandardArgs)


patches: Use patches for 2.7.13 with all version >= 2.7.13

--- cmake/PythonApplyPatches.cmake
+++ cmake/PythonApplyPatches.cmake
@@ -74,13 +74,20 @@
   message(STATUS "")
 endfunction()

+set(_py_version ${PY_VERSION})
+if("${PY_VERSION}" VERSION_LESS "3.0" AND
+    ("${PY_VERSION}" VERSION_EQUAL "2.7.13" OR "${PY_VERSION}" VERSION_GREATER "2.7.13"))
+  set(_py_version "2.7.13")
+  message(STATUS "Using ${_py_version} patches for 2.7.13 <= PY_VERSION < 3.0.0")
+endif()
+
 # Apply patches
 _apply_patches("${PY_VERSION_MAJOR}.${PY_VERSION_MINOR}")
-_apply_patches("${PY_VERSION}")
-_apply_patches("${PY_VERSION}/${CMAKE_SYSTEM_NAME}")
-_apply_patches("${PY_VERSION}/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}")
+_apply_patches("${_py_version}")
+_apply_patches("${_py_version}/${CMAKE_SYSTEM_NAME}")
+_apply_patches("${_py_version}/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}")
 set(_version ${CMAKE_C_COMPILER_VERSION})
 if(MSVC)
   set(_version ${MSVC_VERSION})
 endif()
-_apply_patches("${PY_VERSION}/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}/${_version}")
+_apply_patches("${_py_version}/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}/${_version}")


use json_test_data version 2.0.0

use json_test_data version 2.0.0

--- cmake/download_test_data.cmake
+++ cmake/download_test_data.cmake
@@ -1,7 +1,7 @@
 find_package(Git)

 set(JSON_TEST_DATA_URL     https://github.com/nlohmann/json_test_data)
-set(JSON_TEST_DATA_VERSION 1.0.0)
+set(JSON_TEST_DATA_VERSION 2.0.0)

 # target to download test data
 add_custom_target(download_test_data


fix bug: fix FindOpenCL's CMake CheckSymbolExists bug

--- cmake/modules/FindOpenCL.cmake
+++ cmake/modules/FindOpenCL.cmake
@@ -31,6 +31,8 @@
   endif ()
 endif ()

+include(CheckSymbolExists)
+
 if (OpenCL_FOUND)
   if (APPLE)
     set(CL_HEADER_FILE "${OpenCL_INCLUDE_DIRS}/OpenCL/cl.h")


Fix FindOracle.cmake to find version 19.x

--- cmake/modules/FindOracle.cmake
+++ cmake/modules/FindOracle.cmake
@@ -55,7 +55,7 @@
 )
 FIND_LIBRARY(
     ORACLE_LIBRARY_LNNZ
-    NAMES libnnz10 nnz10 libnnz11 nnz11 libnnz12 nnz12 nnz18 ociw32
+    NAMES libnnz10 nnz10 libnnz11 nnz11 libnnz12 nnz12 nnz18 nnz19 ociw32
     PATHS ${ORACLE_LIB_LOCATION}
 )


SetUpMacOS.cmake: save a call to execute_process()

--- cmake/modules/SetUpMacOS.cmake
+++ cmake/modules/SetUpMacOS.cmake
@@ -9,16 +9,14 @@
   EXECUTE_PROCESS(COMMAND sw_vers "-productVersion"
                   COMMAND cut -d . -f 1-2
                   OUTPUT_VARIABLE MACOSX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
+
   MESSAGE(STATUS "Found a Mac OS X System ${MACOSX_VERSION}")
-  EXECUTE_PROCESS(COMMAND sw_vers "-productVersion"
-                  COMMAND cut -d . -f 2
-                  OUTPUT_VARIABLE MACOSX_MINOR OUTPUT_STRIP_TRAILING_WHITESPACE)

   if(MACOSX_VERSION VERSION_GREATER 10.7 AND ${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
     set(libcxx ON CACHE BOOL "Build using libc++" FORCE)
   endif()

-  if(${MACOSX_MINOR} GREATER 4)
+  if(MACOSX_VERSION VERSION_GREATER 10.4)
     #TODO: check haveconfig and rpath -> set rpath true
     #TODO: check Thread, define link command
     #TODO: more stuff check configure script


Fixed yaml-cpp.pc file (with prefix)

Fixed yaml-cpp.pc file (with prefix)

--- yaml-cpp.pc.cmake
+++ yaml-cpp.pc.cmake
@@ -1,7 +1,7 @@
 prefix=@CMAKE_INSTALL_PREFIX@
 exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@LIB_INSTALL_DIR@
-includedir=@INCLUDE_INSTALL_DIR@
+libdir=${prefix}/@LIB_INSTALL_DIR@
+includedir=${prefix}/@INCLUDE_INSTALL_DIR@

 Name: Yaml-cpp
 Description: A YAML parser and emitter for C++


Disabling threading in OpenBLAS when Elemental is built in Pure mode

--- cmake/external_projects/ElMath/OpenBLAS.cmake
+++ cmake/external_projects/ElMath/OpenBLAS.cmake
@@ -63,6 +63,11 @@
     El_check_function_exists(dsytrd_ EL_HAVE_DSYTRD_POST_OPENBLAS)
     if(EL_HAVE_DGEMM_OPENBLAS OR EL_HAVE_DGEMM_POST_OPENBLAS)
       set(EL_HAVE_OPENBLAS_BLAS TRUE)
+      if(EL_HYBRID)
+        message("Found OpenBLAS as ${OpenBLAS}; you may want to experiment with the environment variable OPENBLAS_NUM_THREADS")
+      else()
+        message("Found OpenBLAS as ${OpenBLAS}; you may want to set the environment variable OPENBLAS_NUM_THREADS=1")
+      endif()
     else()
       message(WARNING "OpenBLAS was found as ${OpenBLAS}, but BLAS support was not detected")
     endif()
@@ -101,6 +106,12 @@
     endif()
   endif()

+  if(EL_HYBRID)
+    set(OPENBLAS_THREAD_COMMAND)
+  else()
+    set(OPENBLAS_THREAD_COMMAND USE_THREAD=0)
+  endif()
+
   ExternalProject_Add(project_openblas
     PREFIX ${CMAKE_INSTALL_PREFIX}
     GIT_REPOSITORY ${OPENBLAS_URL}
@@ -112,7 +123,7 @@
     INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
     CONFIGURE_COMMAND ""
     UPDATE_COMMAND ""
-    BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} CC=${CMAKE_C_COMPILER} FC=${CMAKE_Fortran_COMPILER} ${OPENBLAS_ARCH_COMMAND} libs netlib shared
+    BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} CC=${CMAKE_C_COMPILER} FC=${CMAKE_Fortran_COMPILER} ${OPENBLAS_THREAD_COMMAND} ${OPENBLAS_ARCH_COMMAND} libs netlib shared
     INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install PREFIX=<INSTALL_DIR>
   )


Fix yacma debug flag.

Fix yacma debug flag.

--- cmake/yacma/YACMACompilerLinkerSettings.cmake
+++ cmake/yacma/YACMACompilerLinkerSettings.cmake
@@ -111,7 +111,7 @@
         # This limit is supposed to be at least 1024 in C++11, but for some reason
         # clang sets this to 256, and gcc to 900.
         _YACMA_CHECK_ENABLE_CXX_FLAG(-ftemplate-depth=1024)
-        _YACMA_CHECK_ENABLE_CXX_FLAG(-Wold-style-cast)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wold-style-cast)
         # NOTE: disable this for now, as it results in a lot of clutter from Boost.
         # _YACMA_CHECK_ENABLE_CXX_FLAG(-Wzero-as-null-pointer-constant)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-pedantic-errors)