Fixed shared library linking by adding -Wl, --no-as-needed

Former-commit-id: 5438012e6e5151fa7d5142e9d74d432ddcb3a8ea

--- cmake-modules/FindMKL.cmake
+++ cmake-modules/FindMKL.cmake
@@ -420,7 +420,7 @@
                     endif()
                     add_library(mkl::mkl_${FORTRANVAR}_${MODEVAR}_${threadv} INTERFACE IMPORTED)
                     target_link_libraries(mkl::mkl_${FORTRANVAR}_${MODEVAR}_${threadv} INTERFACE
-#                            -Wl,--no-as-needed
+                            -Wl,--no-as-needed
                             mkl::mkl_blas_${MODEVAR}
                             mkl::mkl_lapack_${MODEVAR}
                             -Wl,--start-group
@@ -428,7 +428,7 @@
                             mkl::mkl_${THREADVAR}
                             mkl::mkl_core
                             -Wl,--end-group
-#                            -Wl,--as-needed
+                            -Wl,--as-needed
                             m
                             dl
                             )


Only make CUDA -march workaround if compiling with CUDA target (#585)

Fixes #584.

--- cmake/CompilerOptions.cmake
+++ cmake/CompilerOptions.cmake
@@ -135,12 +135,15 @@
         endif()
     endif()

-    # Prefix architecture options with `-Xcompiler=` when compiling CUDA sources, i.e.
-    # with nvcc.
-    set(arch_opt_cuda_guarded)
-    foreach(opt ${arch_opt})
-        list(APPEND arch_opt_cuda_guarded "$<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=>${opt}")
-    endforeach()
+    if (ARB_WITH_GPU)
+        # Prefix architecture options with `-Xcompiler=` when compiling CUDA sources, i.e.
+        # with nvcc.
+        set(arch_opt_cuda_guarded)
+        foreach(opt ${arch_opt})
+            list(APPEND arch_opt_cuda_guarded "$<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=>${opt}")
+        endforeach()

-    set("${optvar}" "${arch_opt_cuda_guarded}" PARENT_SCOPE)
+        set("${optvar}" "${arch_opt_cuda_guarded}" PARENT_SCOPE)
+    endif()
+
 endfunction()


Display system name and version.

Display system name and version.

--- cmake/ConfigureChecks.cmake
+++ cmake/ConfigureChecks.cmake
@@ -11,6 +11,9 @@
 include(cmake/CheckTypeExists.cmake)
 include(cmake/PlatformTest.cmake)
 include(TestBigEndian)
+
+message(STATUS "The system name is ${CMAKE_SYSTEM_NAME}")
+message(STATUS "The system version is ${CMAKE_SYSTEM_VERSION}")

 if(WIN32)
   # From PC/pyconfig.h:


SimAdvMesh should probably go before other libs

--- cmake/FindSimModSuite.cmake
+++ cmake/FindSimModSuite.cmake
@@ -60,8 +60,8 @@
 set(SIM_OPT_LIB_NAMES
   SimAdvMeshing)

+simLibCheck("${SIM_OPT_LIB_NAMES}" FALSE)
 simLibCheck("${SIM_LIB_NAMES}" TRUE)
-simLibCheck("${SIM_OPT_LIB_NAMES}" FALSE)

 string(FIND "${SIMMODSUITE_LIBS}" "/lib/" archStart)
 string(FIND "${SIMMODSUITE_LIBS}" "/libSim" archEnd)


Fix cmake warning on cmake/compiler_option.cmake

--- cmake/compiler_option.cmake
+++ cmake/compiler_option.cmake
@@ -55,4 +55,4 @@

     SET_PROPERTY( ${_CPP_STD_MODE} ${_CPP_STD_TARGET} APPEND_STRING PROPERTY COMPILE_FLAGS " -std=${_CPP_STD_CODE}" )
   ENDIF(  )
-ENDFUNCTION( USE_CPP_STD )
+ENDFUNCTION( SET_CPP_STD )


protobut 3.3.0-p1

protobut 3.3.0-p1

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -105,7 +105,7 @@
 hunter_config(PNG VERSION 1.6.26-p1)
 hunter_config(PocoCpp VERSION 1.7.8-p0)
 hunter_config(PostgreSQL VERSION 9.6.3)
-hunter_config(Protobuf VERSION 3.0.0-p1)
+hunter_config(Protobuf VERSION 3.3.0-p1)

 string(COMPARE EQUAL "${CMAKE_SYSTEM_NAME}" "Linux" _is_linux)
 if(_is_linux OR MINGW)


Revert "qi_install_header : check that first arg is a target"

This reverts commit 36965ff388cd09f7fabe909b998e42f9dc6e2415.
not such a good idea ...

--- cmake/qibuild/install.cmake
+++ cmake/qibuild/install.cmake
@@ -36,7 +36,6 @@
     qi_error("No headers specified")
   endif()

-  _qi_check_is_target(${target})
   # Handle ${target}_INTERNAL
   set(_should_install TRUE)
   if(${${target}_INTERNAL})


MAINT: fix on Windows.

MAINT: fix on Windows.

--- cmake/sara_use_halide.cmake
+++ cmake/sara_use_halide.cmake
@@ -116,10 +116,10 @@
     INTERFACE_LINK_LIBRARIES "${HALIDE_LIBRARIES}")
 endif ()

-# # Quick and dirty: distribute the DLLs in the binary folders.
-# if (WIN32)
-#   file(COPY ${HALIDE_DLL_DEBUG}   DESTINATION ${CMAKE_BINARY_DIR}/bin/Debug)
-#   file(COPY ${HALIDE_DLL_RELEASE} DESTINATION ${CMAKE_BINARY_DIR}/bin/Release)
-#   file(COPY ${HALIDE_DLL_RELEASE} DESTINATION ${CMAKE_BINARY_DIR}/bin/RelWithDebInfo)
-#   file(COPY ${HALIDE_DLL_RELEASE} DESTINATION ${CMAKE_BINARY_DIR}/bin/MinSizeRel)
-# endif ()
+# Quick and dirty: distribute the DLLs in the binary folders.
+if (WIN32)
+  file(COPY ${HALIDE_DLL_DEBUG}   DESTINATION ${CMAKE_BINARY_DIR}/bin/Debug)
+  file(COPY ${HALIDE_DLL_RELEASE} DESTINATION ${CMAKE_BINARY_DIR}/bin/Release)
+  file(COPY ${HALIDE_DLL_RELEASE} DESTINATION ${CMAKE_BINARY_DIR}/bin/RelWithDebInfo)
+  file(COPY ${HALIDE_DLL_RELEASE} DESTINATION ${CMAKE_BINARY_DIR}/bin/MinSizeRel)
+endif ()


Cleanup: use consistent whitespace

Cleanup: use consistent whitespace

--- src/cmake/external_libs.cmake
+++ src/cmake/external_libs.cmake
@@ -18,9 +18,9 @@
 ###########################################################################

 macro(_set_default variable value)
-	if(NOT ${variable})
-		set(${variable} ${value})
-	endif()
+  if(NOT ${variable})
+    set(${variable} ${value})
+  endif()
 endmacro()

 ###########################################################################
@@ -313,14 +313,14 @@
       unset(_llvm_libs_release)

       set(OSL_LIBRARIES
-	optimized ${OSL_ROOT_DIR}/lib/oslcomp.lib
-	optimized ${OSL_ROOT_DIR}/lib/oslexec.lib
-	optimized ${OSL_ROOT_DIR}/lib/oslquery.lib
-	optimized ${OSL_ROOT_DIR}/lib/pugixml.lib
-	debug ${OSL_ROOT_DIR}/lib/oslcomp_d.lib
-	debug ${OSL_ROOT_DIR}/lib/oslexec_d.lib
-	debug ${OSL_ROOT_DIR}/lib/oslquery_d.lib
-	debug ${OSL_ROOT_DIR}/lib/pugixml_d.lib
+        optimized ${OSL_ROOT_DIR}/lib/oslcomp.lib
+        optimized ${OSL_ROOT_DIR}/lib/oslexec.lib
+        optimized ${OSL_ROOT_DIR}/lib/oslquery.lib
+        optimized ${OSL_ROOT_DIR}/lib/pugixml.lib
+        debug ${OSL_ROOT_DIR}/lib/oslcomp_d.lib
+        debug ${OSL_ROOT_DIR}/lib/oslexec_d.lib
+        debug ${OSL_ROOT_DIR}/lib/oslquery_d.lib
+        debug ${OSL_ROOT_DIR}/lib/pugixml_d.lib
       )
     endif()
   endif()


Set SWIFT_TABLEGEN_TARGET as required by LLVM r305142.

With the change in LLVM r305142, CMake will fail if SWIFT_TABLEGEN_TARGET
is not set. When cross-compiling, it could be set differently than
SWIFT_TABLEGEN_EXE but it does not look like Swift supports that yet. For
now, just set it to the same value as SWIFT_TABLEGEN_EXE.

--- cmake/modules/SwiftSharedCMakeConfig.cmake
+++ cmake/modules/SwiftSharedCMakeConfig.cmake
@@ -73,6 +73,7 @@
   if ("${SWIFT_TABLEGEN_EXE}" STREQUAL "SWIFT_TABLEGEN_EXE-NOTFOUND")
     message(FATAL_ERROR "Failed to find tablegen in ${${product}_NATIVE_LLVM_TOOLS_PATH}")
   endif()
+  set(SWIFT_TABLEGEN_TARGET "${SWIFT_TABLEGEN_EXE}")

   include(AddLLVM)
   include(AddSwiftTableGen) # This imports TableGen from LLVM.
@@ -220,6 +221,7 @@
   set(${product}_NATIVE_CLANG_TOOLS_PATH "${CMAKE_BINARY_DIR}/bin")
   set(LLVM_PACKAGE_VERSION ${PACKAGE_VERSION})
   set(SWIFT_TABLEGEN_EXE llvm-tblgen)
+  set(SWIFT_TABLEGEN_TARGET "${SWIFT_TABLEGEN_EXE}")
   set(LLVM_CMAKE_DIR "${CMAKE_SOURCE_DIR}/cmake/modules")

   # If cmark was checked out into tools/cmark, expect to build it as


Renommage du répertoire OSSIM par otbossim.

--- otbIncludeDirectories.cmake
+++ otbIncludeDirectories.cmake
@@ -24,9 +24,9 @@
   ${OTB_SOURCE_DIR}/Utilities/BGL
   ${OTB_SOURCE_DIR}/Utilities/BGL/boost
   ${OTB_SOURCE_DIR}/Utilities/otbsvm
-  ${OTB_SOURCE_DIR}/Utilities/OSSIM
-  ${OTB_SOURCE_DIR}/Utilities/OSSIM/include
-  ${OTB_SOURCE_DIR}/Utilities/OSSIM/include/ossim
+  ${OTB_SOURCE_DIR}/Utilities/otbossim
+  ${OTB_SOURCE_DIR}/Utilities/otbossim/include
+  ${OTB_SOURCE_DIR}/Utilities/otbossim/include/ossim
   ${OTB_SOURCE_DIR}/Utilities/dxflib
   ${OTB_SOURCE_DIR}/Utilities/InsightJournal
 )
@@ -34,7 +34,7 @@
 #-----------------------------------------------------------------------------
 # Include directories from the ossim build tree
 SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
-${OTB_BINARY_DIR}/Utilities/OSSIM/include
+${OTB_BINARY_DIR}/Utilities/otbossim/include
 )

@@ -101,11 +101,13 @@
   ${OTB_INSTALL_INCLUDE_DIR}/DisparityMap
   ${OTB_INSTALL_INCLUDE_DIR}/Visu
   ${OTB_INSTALL_INCLUDE_DIR}/Gui
+  ${OTB_INSTALL_INCLUDE_DIR}/Projections
   ${OTB_INSTALL_INCLUDE_DIR}/Utilities
   ${OTB_INSTALL_INCLUDE_DIR}/Utilities/ITK
   ${OTB_INSTALL_INCLUDE_DIR}/Utilities/BGL
   ${OTB_INSTALL_INCLUDE_DIR}/Utilities/BGL/boost
   ${OTB_INSTALL_INCLUDE_DIR}/Utilities/otbsvm
+  ${OTB_INSTALL_INCLUDE_DIR}/Utilities/otbossim
   ${OTB_INSTALL_INCLUDE_DIR}/Utilities/InsightJournal
 )


CSharp: Added BuildDir option when initializing nuget cache.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -271,7 +271,7 @@
         set (TERM_WORKAROUND env TERM=xterm)
     endif ()
     execute_process(COMMAND ${TERM_WORKAROUND} ${MSBUILD} ${Urho3D_SOURCE_DIR}/Urho3D.part.sln /t:restore
-        /p:RestoreConfigFile="${Urho3D_SOURCE_DIR}/nuget.config")
+        /p:RestoreConfigFile="${Urho3D_SOURCE_DIR}/nuget.config" /p:BuildDir="${CMAKE_BINARY_DIR}/")
 endif()

 macro (__TARGET_GET_PROPERTIES_RECURSIVE OUTPUT TARGET PROPERTY)


From Simon Julier, "Please find attached FindCOLLADA.cmake with a patch for a framework naming issue for Mac platforms.

The collada dom Makefiles actually build a framework called Collada14Dom.framework (debug: Collada14Dom-d.framework). The current CMake rules, however, only look for collada14dom. Normally, the difference in case wouldn't matter but the rule fails on case sensitive HPFS partitions.
"

--- CMakeModules/FindCOLLADA.cmake
+++ CMakeModules/FindCOLLADA.cmake
@@ -44,7 +44,7 @@
 )

 FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY
-    NAMES collada_dom collada14dom libcollada14dom21 libcollada14dom22
+    NAMES collada_dom collada14dom Collada14Dom libcollada14dom21 libcollada14dom22
     PATHS
     ${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4
     $ENV{COLLADA_DIR}/build/${COLLADA_BUILDNAME}-1.4
@@ -65,7 +65,7 @@
 )

 FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY_DEBUG
-    NAMES collada_dom-d collada14dom-d libcollada14dom21-d libcollada14dom22-d
+    NAMES collada_dom-d collada14dom-d Collada14Dom-d libcollada14dom21-d libcollada14dom22-d
     PATHS
     ${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4-d
     $ENV{COLLADA_DIR}/build/${COLLADA_BUILDNAME}-1.4-d


More linux work.  Think I found the stager.

--- indra/cmake/Copy3rdPartyLibs.cmake
+++ indra/cmake/Copy3rdPartyLibs.cmake
@@ -251,20 +251,22 @@
         libapr-1.so.0
         libaprutil-1.so.0
         libatk-1.0.so
+        libboost_program_options-mt.so
+        libboost_regex-mt.so
         libbreakpad_client.so.0
         libcollada14dom.so
         libcrypto.so.1.0.0
         libdb-5.1.so
         libexpat.so
         libexpat.so.1
-    libglod.so
+        libglod.so
         libgmock_main.so
         libgmock.so.0
         libgmodule-2.0.so
         libgobject-2.0.so
         libgtest_main.so
         libgtest.so.0
-    libminizip.so
+        libminizip.so
         libopenal.so
         libopenjpeg.so
         libssl.so


Removed file InstallRequiredSystemLibraries.cmake

Our fixes are part of the official cmake now.

--- cmake/InstallRequiredSystemLibraries.cmake
+++ cmake/InstallRequiredSystemLibraries.cmake
@@ -1,483 +0,0 @@
-#.rst:
-# InstallRequiredSystemLibraries
-# ------------------------------
-#
-#
-#
-# By including this file, all library files listed in the variable
-# CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS will be installed with
-# install(PROGRAMS ...) into bin for WIN32 and lib for non-WIN32.  If
-# CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP is set to TRUE before including
-# this file, then the INSTALL command is not called.  The user can use
-# the variable CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS to use a custom install
-# command and install them however they want.  If it is the MSVC
-# compiler, then the microsoft run time libraries will be found and
-# automatically added to the CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS, and
-# installed.  If CMAKE_INSTALL_DEBUG_LIBRARIES is set and it is the MSVC
-# compiler, then the debug libraries are installed when available.  If
-# CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY is set then only the debug
-# libraries are installed when both debug and release are available.  If
-# CMAKE_INSTALL_MFC_LIBRARIES is set then the MFC run time libraries are
-# installed as well as the CRT run time libraries.  If
-# CMAKE_INSTALL_OPENMP_LIBRARIES is set then the OpenMP run time libraries
-# are installed as well.  If
-# CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION is set then the libraries are
-# installed to that directory rather than the default.  If
-# CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS is NOT set, then this
-# file warns about required files that do not exist.  You can set this
-# variable to ON before including this file to avoid the warning.  For
-# example, the Visual Studio Express editions do not include the
-# redistributable files, so if you include this file on a machine with
-# only VS Express installed, you'll get the warning.
-
-#=============================================================================
-# Copyright 2006-2009 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-if(MSVC)
-  file(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT)
-
-  if(CMAKE_CL_64)
-    if(MSVC_VERSION GREATER 1599)
-      # VS 10 and later:
-      set(CMAKE_MSVC_ARCH x64)
-    else()
-      # VS 9 and earlier:
-      set(CMAKE_MSVC_ARCH amd64)
-    endif()
-  else()
-    set(CMAKE_MSVC_ARCH x86)
-  endif()
-
-  get_filename_component(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH)
-  get_filename_component(base_dir "${devenv_dir}/../.." ABSOLUTE)
-
-  if(MSVC70)
-    set(__install__libs
-      "${SYSTEMROOT}/system32/msvcp70.dll"
-      "${SYSTEMROOT}/system32/msvcr70.dll"
-      )
-  endif()
-
-  if(MSVC71)
-    set(__install__libs
-      "${SYSTEMROOT}/system32/msvcp71.dll"
-      "${SYSTEMROOT}/system32/msvcr71.dll"
-      )
-  endif()
-
-  if(MSVC80)
-    # Find the runtime library redistribution directory.
-    get_filename_component(msvc_install_dir
-      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]" ABSOLUTE)
-    find_path(MSVC80_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest
-      PATHS
-        "${msvc_install_dir}/../../VC/redist"
-        "${base_dir}/VC/redist"
-      )
-    mark_as_advanced(MSVC80_REDIST_DIR)
-    set(MSVC80_CRT_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT")
-
-    # Install the manifest that allows DLLs to be loaded from the
-    # directory containing the executable.
-    if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
-      set(__install__libs
-        "${MSVC80_CRT_DIR}/Microsoft.VC80.CRT.manifest"
-        "${MSVC80_CRT_DIR}/msvcm80.dll"
-        "${MSVC80_CRT_DIR}/msvcp80.dll"
-        "${MSVC80_CRT_DIR}/msvcr80.dll"
-        )
-    else()
-      set(__install__libs)
-    endif()
-
-    if(CMAKE_INSTALL_DEBUG_LIBRARIES)
-      set(MSVC80_CRT_DIR
-        "${MSVC80_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC80.DebugCRT")
-      set(__install__libs ${__install__libs}
-        "${MSVC80_CRT_DIR}/Microsoft.VC80.DebugCRT.manifest"
-        "${MSVC80_CRT_DIR}/msvcm80d.dll"
-        "${MSVC80_CRT_DIR}/msvcp80d.dll"
-        "${MSVC80_CRT_DIR}/msvcr80d.dll"
-        )
-    endif()
-  endif()
-
-  if(MSVC90)
-    # Find the runtime library redistribution directory.
-    get_filename_component(msvc_install_dir
-      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir]" ABSOLUTE)
-    get_filename_component(msvc_express_install_dir
-      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir]" ABSOLUTE)
-    find_path(MSVC90_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest
-      PATHS
-        "${msvc_install_dir}/../../VC/redist"
-        "${msvc_express_install_dir}/../../VC/redist"
-        "${base_dir}/VC/redist"
-      )
-    mark_as_advanced(MSVC90_REDIST_DIR)
-    set(MSVC90_CRT_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT")
-
-    # Install the manifest that allows DLLs to be loaded from the
-    # directory containing the executable.
-    if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
-      set(__install__libs
-        "${MSVC90_CRT_DIR}/Microsoft.VC90.CRT.manifest"
-        "${MSVC90_CRT_DIR}/msvcm90.dll"
-        "${MSVC90_CRT_DIR}/msvcp90.dll"
-        "${MSVC90_CRT_DIR}/msvcr90.dll"
-        )
-    else()
-      set(__install__libs)
-    endif()
-
-    if(CMAKE_INSTALL_DEBUG_LIBRARIES)
-      set(MSVC90_CRT_DIR
-        "${MSVC90_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugCRT")
-      set(__install__libs ${__install__libs}
-        "${MSVC90_CRT_DIR}/Microsoft.VC90.DebugCRT.manifest"
-        "${MSVC90_CRT_DIR}/msvcm90d.dll"
-        "${MSVC90_CRT_DIR}/msvcp90d.dll"
-        "${MSVC90_CRT_DIR}/msvcr90d.dll"
-        )
-    endif()
-  endif()
-
-  macro(MSVCRT_FILES_FOR_VERSION version)
-    set(v "${version}")
-
-    # Find the runtime library redistribution directory.
-    get_filename_component(msvc_install_dir
-      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${v}.0;InstallDir]" ABSOLUTE)
-    find_path(MSVC${v}_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.CRT
-      PATHS
-        "${msvc_install_dir}/../../VC/redist"
-        "${base_dir}/VC/redist"
-        "$ENV{ProgramFiles}/Microsoft Visual Studio ${v}.0/VC/redist"
-        set(programfilesx86 "ProgramFiles(x86)")
-        "$ENV{${programfilesx86}}/Microsoft Visual Studio ${v}.0/VC/redist"
-      )
-    mark_as_advanced(MSVC${v}_REDIST_DIR)
-    set(MSVC${v}_CRT_DIR "${MSVC${v}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.CRT")
-
-    if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
-      set(__install__libs
-        "${MSVC${v}_CRT_DIR}/msvcp${v}0.dll"
-        "${MSVC${v}_CRT_DIR}/msvcr${v}0.dll"
-        )
-    else()
-      set(__install__libs)
-    endif()
-
-    if(CMAKE_INSTALL_DEBUG_LIBRARIES)
-      set(MSVC${v}_CRT_DIR
-        "${MSVC${v}_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.DebugCRT")
-      set(__install__libs ${__install__libs}
-        "${MSVC${v}_CRT_DIR}/msvcp${v}0d.dll"
-        "${MSVC${v}_CRT_DIR}/msvcr${v}0d.dll"
-        )
-    endif()
-  endmacro()
-
-  if(MSVC10)
-    MSVCRT_FILES_FOR_VERSION(10)
-  endif()
-
-  if(MSVC11)
-    MSVCRT_FILES_FOR_VERSION(11)
-  endif()
-
-  if(MSVC12)
-    MSVCRT_FILES_FOR_VERSION(12)
-  endif()
-
-  if(MSVC14)
-    MSVCRT_FILES_FOR_VERSION(14)
-  endif()
-
-  if(CMAKE_INSTALL_MFC_LIBRARIES)
-    if(MSVC70)
-      set(__install__libs ${__install__libs}
-        "${SYSTEMROOT}/system32/mfc70.dll"
-        )
-    endif()
-
-    if(MSVC71)
-      set(__install__libs ${__install__libs}
-        "${SYSTEMROOT}/system32/mfc71.dll"
-        )
-    endif()
-
-    if(MSVC80)
-      if(CMAKE_INSTALL_DEBUG_LIBRARIES)
-        set(MSVC80_MFC_DIR
-          "${MSVC80_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC80.DebugMFC")
-        set(__install__libs ${__install__libs}
-          "${MSVC80_MFC_DIR}/Microsoft.VC80.DebugMFC.manifest"
-          "${MSVC80_MFC_DIR}/mfc80d.dll"
-          "${MSVC80_MFC_DIR}/mfc80ud.dll"
-          "${MSVC80_MFC_DIR}/mfcm80d.dll"
-          "${MSVC80_MFC_DIR}/mfcm80ud.dll"
-          )
-      endif()
-
-      set(MSVC80_MFC_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFC")
-      # Install the manifest that allows DLLs to be loaded from the
-      # directory containing the executable.
-      if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
-        set(__install__libs ${__install__libs}
-          "${MSVC80_MFC_DIR}/Microsoft.VC80.MFC.manifest"
-          "${MSVC80_MFC_DIR}/mfc80.dll"
-          "${MSVC80_MFC_DIR}/mfc80u.dll"
-          "${MSVC80_MFC_DIR}/mfcm80.dll"
-          "${MSVC80_MFC_DIR}/mfcm80u.dll"
-          )
-      endif()
-
-      # include the language dll's for vs8 as well as the actuall dll's
-      set(MSVC80_MFCLOC_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFCLOC")
-      # Install the manifest that allows DLLs to be loaded from the
-      # directory containing the executable.
-      set(__install__libs ${__install__libs}
-        "${MSVC80_MFCLOC_DIR}/Microsoft.VC80.MFCLOC.manifest"
-        "${MSVC80_MFCLOC_DIR}/mfc80chs.dll"
-        "${MSVC80_MFCLOC_DIR}/mfc80cht.dll"
-        "${MSVC80_MFCLOC_DIR}/mfc80enu.dll"
-        "${MSVC80_MFCLOC_DIR}/mfc80esp.dll"
-        "${MSVC80_MFCLOC_DIR}/mfc80deu.dll"
-        "${MSVC80_MFCLOC_DIR}/mfc80fra.dll"
-        "${MSVC80_MFCLOC_DIR}/mfc80ita.dll"
-        "${MSVC80_MFCLOC_DIR}/mfc80jpn.dll"
-        "${MSVC80_MFCLOC_DIR}/mfc80kor.dll"
-        )
-    endif()
-
-    if(MSVC90)
-      if(CMAKE_INSTALL_DEBUG_LIBRARIES)
-        set(MSVC90_MFC_DIR
-          "${MSVC90_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugMFC")
-        set(__install__libs ${__install__libs}
-          "${MSVC90_MFC_DIR}/Microsoft.VC90.DebugMFC.manifest"
-          "${MSVC90_MFC_DIR}/mfc90d.dll"
-          "${MSVC90_MFC_DIR}/mfc90ud.dll"
-          "${MSVC90_MFC_DIR}/mfcm90d.dll"
-          "${MSVC90_MFC_DIR}/mfcm90ud.dll"
-          )
-      endif()
-
-      set(MSVC90_MFC_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFC")
-      # Install the manifest that allows DLLs to be loaded from the
-      # directory containing the executable.
-      if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
-        set(__install__libs ${__install__libs}
-          "${MSVC90_MFC_DIR}/Microsoft.VC90.MFC.manifest"
-          "${MSVC90_MFC_DIR}/mfc90.dll"
-          "${MSVC90_MFC_DIR}/mfc90u.dll"
-          "${MSVC90_MFC_DIR}/mfcm90.dll"
-          "${MSVC90_MFC_DIR}/mfcm90u.dll"
-          )
-      endif()
-
-      # include the language dll's for vs9 as well as the actuall dll's
-      set(MSVC90_MFCLOC_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFCLOC")
-      # Install the manifest that allows DLLs to be loaded from the
-      # directory containing the executable.
-      set(__install__libs ${__install__libs}
-        "${MSVC90_MFCLOC_DIR}/Microsoft.VC90.MFCLOC.manifest"
-        "${MSVC90_MFCLOC_DIR}/mfc90chs.dll"
-        "${MSVC90_MFCLOC_DIR}/mfc90cht.dll"
-        "${MSVC90_MFCLOC_DIR}/mfc90enu.dll"
-        "${MSVC90_MFCLOC_DIR}/mfc90esp.dll"
-        "${MSVC90_MFCLOC_DIR}/mfc90deu.dll"
-        "${MSVC90_MFCLOC_DIR}/mfc90fra.dll"
-        "${MSVC90_MFCLOC_DIR}/mfc90ita.dll"
-        "${MSVC90_MFCLOC_DIR}/mfc90jpn.dll"
-        "${MSVC90_MFCLOC_DIR}/mfc90kor.dll"
-        )
-    endif()
-
-    macro(MFC_FILES_FOR_VERSION version)
-      set(v "${version}")
-
-      # Multi-Byte Character Set versions of MFC are available as optional
-      # addon since Visual Studio 12.  So for version 12 or higher, check
-      # whether they are available and exclude them if they are not.
-      if("${v}" LESS 12 OR EXISTS "${MSVC${v}_MFC_DIR}/mfc${v}0d.dll")
-        set(mbcs ON)
-      else()
-        set(mbcs OFF)
-      endif()
-
-      if(CMAKE_INSTALL_DEBUG_LIBRARIES)
-        set(MSVC${v}_MFC_DIR
-          "${MSVC${v}_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.DebugMFC")
-        set(__install__libs ${__install__libs}
-          "${MSVC${v}_MFC_DIR}/mfc${v}0ud.dll"
-          "${MSVC${v}_MFC_DIR}/mfcm${v}0ud.dll"
-          )
-        if(mbcs)
-          set(__install__libs ${__install__libs}
-            "${MSVC${v}_MFC_DIR}/mfc${v}0d.dll"
-            "${MSVC${v}_MFC_DIR}/mfcm${v}0d.dll"
-          )
-        endif()
-      endif()
-
-      set(MSVC${v}_MFC_DIR "${MSVC${v}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.MFC")
-      if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
-        set(__install__libs ${__install__libs}
-          "${MSVC${v}_MFC_DIR}/mfc${v}0u.dll"
-          "${MSVC${v}_MFC_DIR}/mfcm${v}0u.dll"
-          )
-        if(mbcs)
-          set(__install__libs ${__install__libs}
-            "${MSVC${v}_MFC_DIR}/mfc${v}0.dll"
-            "${MSVC${v}_MFC_DIR}/mfcm${v}0.dll"
-          )
-        endif()
-      endif()
-
-      # include the language dll's as well as the actuall dll's
-      set(MSVC${v}_MFCLOC_DIR "${MSVC${v}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.MFCLOC")
-      set(__install__libs ${__install__libs}
-        "${MSVC${v}_MFCLOC_DIR}/mfc${v}0chs.dll"
-        "${MSVC${v}_MFCLOC_DIR}/mfc${v}0cht.dll"
-        "${MSVC${v}_MFCLOC_DIR}/mfc${v}0deu.dll"
-        "${MSVC${v}_MFCLOC_DIR}/mfc${v}0enu.dll"
-        "${MSVC${v}_MFCLOC_DIR}/mfc${v}0esn.dll"
-        "${MSVC${v}_MFCLOC_DIR}/mfc${v}0fra.dll"
-        "${MSVC${v}_MFCLOC_DIR}/mfc${v}0ita.dll"
-        "${MSVC${v}_MFCLOC_DIR}/mfc${v}0jpn.dll"
-        "${MSVC${v}_MFCLOC_DIR}/mfc${v}0kor.dll"
-        "${MSVC${v}_MFCLOC_DIR}/mfc${v}0rus.dll"
-        )
-    endmacro()
-
-    if(MSVC10)
-      MFC_FILES_FOR_VERSION(10)
-    endif()
-
-    if(MSVC11)
-      MFC_FILES_FOR_VERSION(11)
-    endif()
-
-    if(MSVC12)
-      MFC_FILES_FOR_VERSION(12)
-    endif()
-
-    if(MSVC14)
-      MFC_FILES_FOR_VERSION(14)
-    endif()
-  endif()
-
-  # MSVC 8 was the first version with OpenMP
-  # Furthermore, there is no debug version of this
-  if(CMAKE_INSTALL_OPENMP_LIBRARIES)
-    macro(OPENMP_FILES_FOR_VERSION version_a version_b)
-      set(va "${version_a}")
-      set(vb "${version_b}")
-      set(MSVC${va}_OPENMP_DIR "${MSVC${va}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vb}.OPENMP")
-
-      if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
-        set(__install__libs ${__install__libs}
-          "${MSVC${va}_OPENMP_DIR}/vcomp${vb}.dll")
-      endif()
-    endmacro()
-
-    if(MSVC80)
-      OPENMP_FILES_FOR_VERSION(80 80)
-    endif()
-    if(MSVC90)
-      OPENMP_FILES_FOR_VERSION(90 90)
-    endif()
-    if(MSVC10)
-      OPENMP_FILES_FOR_VERSION(10 100)
-    endif()
-    if(MSVC11)
-      OPENMP_FILES_FOR_VERSION(11 110)
-    endif()
-    if(MSVC12)
-      OPENMP_FILES_FOR_VERSION(12 120)
-    endif()
-    if(MSVC14)
-      OPENMP_FILES_FOR_VERSION(14 140)
-    endif()
-  endif()
-
-  foreach(lib
-      ${__install__libs}
-      )
-    if(EXISTS ${lib})
-      set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
-        ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
-    else()
-      if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
-        message(WARNING "system runtime library file does not exist: '${lib}'")
-        # This warning indicates an incomplete Visual Studio installation
-        # or a bug somewhere above here in this file.
-        # If you would like to avoid this warning, fix the real problem, or
-        # set CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS before including
-        # this file.
-      endif()
-    endif()
-  endforeach()
-endif()
-
-if(WATCOM)
-  get_filename_component( CompilerPath ${CMAKE_C_COMPILER} PATH )
-  if(CMAKE_C_COMPILER_VERSION)
-    set(_compiler_version ${CMAKE_C_COMPILER_VERSION})
-  else()
-    set(_compiler_version ${CMAKE_CXX_COMPILER_VERSION})
-  endif()
-  string(REGEX MATCHALL "[0-9]+" _watcom_version_list "${_compiler_version}")
-  list(GET _watcom_version_list 0 _watcom_major)
-  list(GET _watcom_version_list 1 _watcom_minor)
-  set( __install__libs
-    ${CompilerPath}/clbr${_watcom_major}${_watcom_minor}.dll
-    ${CompilerPath}/mt7r${_watcom_major}${_watcom_minor}.dll
-    ${CompilerPath}/plbr${_watcom_major}${_watcom_minor}.dll )
-  foreach(lib
-      ${__install__libs}
-      )
-    if(EXISTS ${lib})
-      set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
-        ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
-    else()
-      if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
-        message(WARNING "system runtime library file does not exist: '${lib}'")
-        # This warning indicates an incomplete Watcom installation
-        # or a bug somewhere above here in this file.
-        # If you would like to avoid this warning, fix the real problem, or
-        # set CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS before including
-        # this file.
-      endif()
-    endif()
-  endforeach()
-endif()
-
-
-# Include system runtime libraries in the installation if any are
-# specified by CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS.
-if(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
-  if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
-    if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION)
-      if(WIN32)
-        set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION bin)
-      else()
-        set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION lib)
-      endif()
-    endif()
-    install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
-      DESTINATION ${CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION})
-  endif()
-endif()


archive: only search for the release version

--- cmake/qibuild/modules/archive-config.cmake
+++ cmake/qibuild/modules/archive-config.cmake
@@ -3,12 +3,7 @@
 clean(ARCHIVE)
 fpath(ARCHIVE archive.h PATH_SUFFIXES archive)

-if(WIN32)
-  flib(ARCHIVE OPTIMIZED NAMES archive)
-  flib(ARCHIVE DEBUG     NAMES archive_d)
-else()
-  flib(ARCHIVE NAMES archive)
-endif()
+flib(ARCHIVE NAMES archive)

 if (APPLE)
   set(ARCHIVE_DEPENDS "ZLIB")


Disable CPACK_SET_DESTDIR on Windows

Disable CPACK_SET_DESTDIR on Windows

See http://comments.gmane.org/gmane.comp.programming.tools.cmake.user/43096

--- cmake/Packaging.cmake
+++ cmake/Packaging.cmake
@@ -7,7 +7,10 @@
 SET(CPACK_PACKAGE_VERSION_MAJOR "2")
 SET(CPACK_PACKAGE_VERSION_MINOR "0")
 SET(CPACK_PACKAGE_VERSION_PATCH "0")
-set(CPACK_SET_DESTDIR TRUE)
+
+if (NOT WINDOWS)
+	set(CPACK_SET_DESTDIR TRUE)
+endif()

 set(CPACK_COMPONENTS_ALL doxygen binaries libraries)


Add CMake support for building for MinGW

This section is similar to what already exists in libcxx and libcxxabi.

Differential Revision: https://reviews.llvm.org/D38380

git-svn-id: 62ef012455b6b8fcec9c41ca270ebf409aae1006@314716 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -29,6 +29,19 @@
   elseif (LIBUNWIND_HAS_GCC_S_LIB)
     list(APPEND CMAKE_REQUIRED_LIBRARIES gcc_s)
   endif ()
+  if (MINGW)
+    # Mingw64 requires quite a few "C" runtime libraries in order for basic
+    # programs to link successfully with -nodefaultlibs.
+    if (LIBUNWIND_USE_COMPILER_RT)
+      set(MINGW_RUNTIME ${LIBUNWIND_BUILTINS_LIBRARY})
+    else ()
+      set(MINGW_RUNTIME gcc_s gcc)
+    endif()
+    set(MINGW_LIBRARIES mingw32 ${MINGW_RUNTIME} moldname mingwex msvcrt advapi32
+                        shell32 user32 kernel32 mingw32 ${MINGW_RUNTIME}
+                        moldname mingwex msvcrt)
+    list(APPEND CMAKE_REQUIRED_LIBRARIES ${MINGW_LIBRARIES})
+  endif()
   if (CMAKE_C_FLAGS MATCHES -fsanitize OR CMAKE_CXX_FLAGS MATCHES -fsanitize)
     set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fno-sanitize=all")
   endif ()


LLVM_ON_WIN32 is not defined on config-ix.cmake. Use something else.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -1,3 +1,8 @@
+if( WIN32 AND NOT CYGWIN )
+  # We consider Cygwin as another Unix
+  set(PURE_WINDOWS 1)
+endif()
+
 include(CheckIncludeFile)
 include(CheckLibraryExists)
 include(CheckSymbolExists)
@@ -46,7 +51,7 @@
 check_include_file(malloc/malloc.h HAVE_MALLOC_MALLOC_H)
 check_include_file(memory.h HAVE_MEMORY_H)
 check_include_file(ndir.h HAVE_NDIR_H)
-if( NOT LLVM_ON_WIN32 )
+if( NOT PURE_WINDOWS )
   check_include_file(pthread.h HAVE_PTHREAD_H)
 endif()
 check_include_file(setjmp.h HAVE_SETJMP_H)
@@ -78,7 +83,7 @@
 check_include_file(mach-o/dyld.h HAVE_MACH_O_DYLD_H)

 # library checks
-if( NOT LLVM_ON_WIN32 )
+if( NOT PURE_WINDOWS )
   check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD)
   check_library_exists(pthread pthread_getspecific "" HAVE_PTHREAD_GETSPECIFIC)
   check_library_exists(pthread pthread_rwlock_init "" HAVE_PTHREAD_RWLOCK_INIT)
@@ -126,7 +131,7 @@
 check_symbol_exists(strcmp string.h HAVE_STRCMP)
 check_symbol_exists(strdup string.h HAVE_STRDUP)
 check_symbol_exists(strrchr string.h HAVE_STRRCHR)
-if( NOT LLVM_ON_WIN32 )
+if( NOT PURE_WINDOWS )
   check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK)
 endif()
 check_symbol_exists(sbrk unistd.h HAVE_SBRK)
@@ -148,7 +153,7 @@
 check_symbol_exists(memcpy string.h HAVE_MEMCPY)
 check_symbol_exists(memmove string.h HAVE_MEMMOVE)
 check_symbol_exists(setenv stdlib.h HAVE_SETENV)
-if ( LLVM_ON_WIN32 )
+if( PURE_WINDOWS )
   check_symbol_exists(_chsize_s io.h HAVE__CHSIZE_S)
 endif()
 if( HAVE_ARGZ_H )


Explicitly set Windows SDK version in CMake configuration.

--- cmake/configure.cmake
+++ cmake/configure.cmake
@@ -2,7 +2,7 @@
 file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/msvc)
 file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/msvc/build)
 message("Generating project files...")
-execute_process(COMMAND ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR} -T v142 -A Win32
+execute_process(COMMAND ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR} -T v142 -A Win32 -DCMAKE_SYSTEM_VERSION=10.0.19041.0
   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/msvc/build
   RESULT_VARIABLE success
 )


Split off 7.10.18

Split off 7.10.18

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 10 )
-set ( HPCC_POINT 17 )
+set ( HPCC_POINT 19 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 7.8.2

Split off 7.8.2

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 8 )
-set ( HPCC_POINT 1 )
+set ( HPCC_POINT 3 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


[ioninja] release 3.2.3

[ioninja] release 3.2.3

--- version.cmake
+++ version.cmake
@@ -1,6 +1,6 @@
 set (VERSION_MAJOR     5)
 set (VERSION_MINOR     3)
-set (VERSION_REVISION  0)
+set (VERSION_REVISION  1)
 set (VERSION_TAG)

 set (VERSION_FILE_SUFFIX "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")


Split off 7.8.6

Split off 7.8.6

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 8 )
-set ( HPCC_POINT 5 )
+set ( HPCC_POINT 7 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Reorder variables and set compiler manually.

CTest cannot know the compiler until the project is configured.

--- CMake/MITKDashboardScript.TEMPLATE.cmake
+++ CMake/MITKDashboardScript.TEMPLATE.cmake
@@ -12,22 +12,13 @@
 #
 # Dashboard properties
 #
+set(MY_COMPILER "g++4.4.5")
+
 set(CTEST_CMAKE_COMMAND "/usr/bin/cmake")
 set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
-set(QT_QMAKE_EXECUTABLE "$ENV{QTDIR}/bin/qmake")
 set(CTEST_DASHBOARD_ROOT "/opt/dartclients")

-
-#
-# Some properties are determined by the script itself -- do not modify
-#
-set(MY_OPERATING_SYSTEM "${CMAKE_HOST_SYSTEM}") # Windows 7, Linux-2.6.32, Darwin...
-set(MY_COMPILER ${CMAKE_BUILD_TOOL})
-site_name(CTEST_SITE)
-# TODO: query by executing qmake
-execute_process(COMMAND qmake --version
-                OUTPUT_VARIABLE MY_QT_VERSION)
-string(REGEX REPLACE ".*Qt version ([0-9.]+) .*" "\\1" MY_QT_VERSION ${MY_QT_VERSION})
+set(QT_QMAKE_EXECUTABLE "/usr/bin/qmake")

 #
 # Dashboard options
@@ -86,6 +77,16 @@
 set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")

 #
+# Automatically determined properties
+#
+set(MY_OPERATING_SYSTEM "${CMAKE_HOST_SYSTEM}") # Windows 7, Linux-2.6.32, Darwin...
+site_name(CTEST_SITE)
+
+execute_process(COMMAND qmake --version
+                OUTPUT_VARIABLE MY_QT_VERSION)
+string(REGEX REPLACE ".*Qt version ([0-9.]+) .*" "\\1" MY_QT_VERSION ${MY_QT_VERSION})
+
+#
 # Project specific properties
 #
 set(CTEST_PROJECT_NAME "MITK")


ctest: shorten dashboard build names:

ctest: shorten dashboard build names:

Debian reports GNU/Linux not an underscore.

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

--- test.cmake
+++ test.cmake
@@ -83,7 +83,7 @@
    string(REGEX REPLACE "\\(.*\\)" "" os_ident "${os_ident}") # shorten the Distribution string, stripping everything in parens
    string(REPLACE "Scientific Linux SL" "SL" os_ident "${os_ident}")
    string(REPLACE " release" "" os_ident "${os_ident}")
-   string(REPLACE " GNU_Linux" "" os_ident "${os_ident}")
+   string(REPLACE " GNU/Linux" "" os_ident "${os_ident}")
    string(REPLACE "openSUSE" "Suse" os_ident "${os_ident}")
    string(STRIP "${os_ident}" os_ident)
 else()


Removed doc directories included in the 'git add' command run by doxygit Otherwise a manual git rm or git add --all is needed.

--- Doxygit.cmake
+++ Doxygit.cmake
@@ -66,6 +66,7 @@
 # sort entries forward for names, backwards for versions
 list(SORT Entries)
 set(LAST_Project)
+set(RemovedEntries)
 foreach(Entry ${Entries})
   string(REGEX REPLACE "^(.+)-.+$" "\\1" Project ${Entry})
   if(NOT Project STREQUAL LAST_Project)
@@ -100,6 +101,7 @@
     endforeach()

     foreach(SubEntry ${SubEntries}) # remove old documentation
+      list(APPEND RemovedEntries ${SubEntry})
       common_process("Remove old ${SubEntry}" FATAL_ERROR
         COMMAND ${CMAKE_COMMAND} -E remove_directory ${SubEntry}
         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
@@ -198,5 +200,6 @@
     ${BODY}</div>
 </html>")

-execute_process(COMMAND "${GIT_EXECUTABLE}" add --all images ${Entries}
+execute_process(
+  COMMAND "${GIT_EXECUTABLE}" add --all images ${Entries} ${RemovedEntries}
   css/github.css index.html WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")


Fix Windows library search

Fix Windows library search

As the `TBB_LIB_PATH_SUFFIX` is a semicolon seperated list on Windows, the double quotes have to be removed when expanding the variable. Else, the call to `find_library` will search for the single concatenated `PATH_SUFFIXES` and will not find anything at all.
PS: For me it works on Windows with this change (see your issue #1).

--- FindTBB.cmake
+++ FindTBB.cmake
@@ -175,12 +175,12 @@
     find_library(TBB_${_comp}_LIBRARY_RELEASE ${_comp}
         HINTS ${TBB_LIBRARY} ${TBB_SEARCH_DIR}
         PATHS ${TBB_DEFAULT_SEARCH_DIR}
-        PATH_SUFFIXES "${TBB_LIB_PATH_SUFFIX}")
+        PATH_SUFFIXES ${TBB_LIB_PATH_SUFFIX})

     find_library(TBB_${_comp}_LIBRARY_DEBUG ${_comp}_debug
         HINTS ${TBB_LIBRARY} ${TBB_SEARCH_DIR}
         PATHS ${TBB_DEFAULT_SEARCH_DIR} ENV LIBRARY_PATH
-        PATH_SUFFIXES "${TBB_LIB_PATH_SUFFIX}")
+        PATH_SUFFIXES ${TBB_LIB_PATH_SUFFIX})

     # Set the library to be used for the component


New version: 0.3.7

New version: 0.3.7

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


- seems like 0.10.13 is already out

- seems like 0.10.13 is already out

--- VERSION.cmake
+++ VERSION.cmake
@@ -46,6 +46,6 @@

 SET(LIBSATSOLVER_MAJOR "0")
 SET(LIBSATSOLVER_MINOR "10")
-SET(LIBSATSOLVER_PATCH "13")
+SET(LIBSATSOLVER_PATCH "14")

-# last released 0.10.11
+# last released 0.10.13


Update release version to 2.0.1

Update release version to 2.0.1

--- Version.cmake
+++ Version.cmake
@@ -10,7 +10,7 @@

 set(SimpleITK_VERSION_MAJOR 2)
 set(SimpleITK_VERSION_MINOR 0)
-set(SimpleITK_VERSION_PATCH 0)
+set(SimpleITK_VERSION_PATCH 1)
 #set(SimpleITK_VERSION_TWEAK "")


Increasing to version 0.8.0

Increasing to version 0.8.0

Change-Id: I0135b0db876bcc4200c907a9b9090917a18f6815

--- Version.cmake
+++ Version.cmake
@@ -9,7 +9,7 @@
 # Version info

 set(SimpleITK_VERSION_MAJOR 0)
-set(SimpleITK_VERSION_MINOR 7)
+set(SimpleITK_VERSION_MINOR 8)
 set(SimpleITK_VERSION_PATCH 0)
 #set(SimpleITK_VERSION_TWEAK "")


Support Python+MPI testing

Support Python+MPI testing

Change-Id: I221ab7225292f8436bb9c7dacfb97ec16c4ce276

--- CMake/vtkTestingMacros.cmake
+++ CMake/vtkTestingMacros.cmake
@@ -371,8 +371,9 @@
     endif()

     ExternalData_add_test(${externaldata_target}
-      NAME    ${vtk-module}Python-${vtk_test_prefix}${name}
-      COMMAND ${VTK_PYTHON_EXE} --enable-bt
+      NAME    ${vtk-module}Python${_vtk_test_python_suffix}-${vtk_test_prefix}${name}
+      COMMAND ${_vtk_test_python_pre_args}
+              ${VTK_PYTHON_EXE} --enable-bt
               ${VTK_PYTHON_ARGS}
               ${rtImageTest}
               ${CMAKE_CURRENT_SOURCE_DIR}/${name}.py
@@ -380,11 +381,27 @@
               ${${vtk-module}_ARGS}
               ${${name}_ARGS}
               ${_D} ${_B} ${_T} ${_V} ${_A})
-    set_tests_properties(${vtk-module}Python-${vtk_test_prefix}${name}
+    set_tests_properties(${vtk-module}Python${_vtk_test_python_suffix}-${vtk_test_prefix}${name}
       PROPERTIES
         LABELS "${${vtk-module}_TEST_LABELS}"
       )
   endforeach()
+endfunction()
+
+function(vtk_add_test_python_mpi)
+  set(_vtk_test_python_suffix "-MPI")
+
+  set(numprocs ${VTK_MPI_MAX_NUMPROCS})
+  if(${vtk-module}_NUMPROCS)
+    set(numprocs ${${vtk-module}_NUMPROCS})
+  endif()
+
+  set(_vtk_test_python_pre_args
+    ${VTK_MPIRUN_EXE}
+    ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} ${numprocs}
+    ${VTK_MPI_PREFLAGS})
+
+  vtk_add_test_python(${ARGN})
 endfunction()

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


build: improve boost module to emit less warnings

--- CMakeModules/FindBoost.cmake
+++ CMakeModules/FindBoost.cmake
@@ -661,12 +661,18 @@
   # ------------------------------------------------------------------------

   SET(_boost_LIBRARIES_SEARCH_DIRS
-    C:/boost/lib
-    C:/boost
-    "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib"
-    "$ENV{ProgramFiles}/boost"
+    /usr/local/lib
+    /usr/lib
     /sw/local/lib
   )
+  IF( WIN32 )
+      SET(_boost_LIBRARIES_SEARCH_DIRS
+        C:/boost/lib
+        C:/boost
+        "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib"
+        "$ENV{ProgramFiles}/boost"
+        ${_boost_LIBRARIES_SEARCH_DIRS})
+  ENDIF( WIN32 )
   IF( BOOST_ROOT )
     SET(_boost_LIBRARIES_SEARCH_DIRS
       ${BOOST_ROOT}/lib


cmake FEATURE read pcre2 version from header

Instead of running a binary found in the default path.
Refs #1615

--- CMakeModules/FindPCRE2.cmake
+++ CMakeModules/FindPCRE2.cmake
@@ -36,9 +36,19 @@
         ${CMAKE_LIBRARY_PATH}
         ${CMAKE_INSTALL_PREFIX}/lib)

-    if(PCRE2_LIBRARY)
-        # Check required version
-        execute_process(COMMAND pcre2-config --version OUTPUT_VARIABLE PCRE2_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
+    if(PCRE2_INCLUDE_DIR AND PCRE2_LIBRARY)
+        # learn pcre2 version
+        file(STRINGS ${PCRE2_INCLUDE_DIR}/pcre2.h PCRE2_VERSION_MAJOR
+            REGEX "#define[ ]+PCRE2_MAJOR[ ]+[0-9]+")
+        string(REGEX MATCH " [0-9]+" PCRE2_VERSION_MAJOR ${PCRE2_VERSION_MAJOR})
+        string(STRIP "${PCRE2_VERSION_MAJOR}" PCRE2_VERSION_MAJOR)
+
+        file(STRINGS ${PCRE2_INCLUDE_DIR}/pcre2.h PCRE2_VERSION_MINOR
+            REGEX "#define[ ]+PCRE2_MINOR[ ]+[0-9]+")
+        string(REGEX MATCH " [0-9]+" PCRE2_VERSION_MINOR ${PCRE2_VERSION_MINOR})
+        string(STRIP "${PCRE2_VERSION_MINOR}" PCRE2_VERSION_MINOR)
+
+        set(PCRE2_VERSION ${PCRE2_VERSION_MAJOR}.${PCRE2_VERSION_MINOR})
     endif()

     set(PCRE2_INCLUDE_DIRS ${PCRE2_INCLUDE_DIR})


Same with cmake.

Same with cmake.

--- config/defaults.cmake
+++ config/defaults.cmake
@@ -50,7 +50,7 @@
 option(MFEM_USE_RAJA "Enable RAJA" OFF)
 option(MFEM_USE_CEED "Enable CEED" OFF)
 option(MFEM_USE_UMPIRE "Enable Umpire" OFF)
-option(MFEM_USE_SIMD "Enable use of SIMD intrinsics" ON)
+option(MFEM_USE_SIMD "Enable use of SIMD intrinsics" OFF)
 option(MFEM_USE_ADIOS2 "Enable ADIOS2" OFF)

 set(MFEM_MPI_NP 4 CACHE STRING "Number of processes used for MPI tests")


Updated CTestConfig script from new dashboard.

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,13 +1,15 @@
 ## This file should be placed in the root directory of your project.
 ## Then modify the CMakeLists.txt file in the root directory of your
 ## project to incorporate the testing dashboard.
-## # The following are required to uses Dart and the Cdash dashboard
+##
+## # The following are required to submit to the CDash dashboard:
 ##   ENABLE_TESTING()
-##   INCLUDE(Dart)
-set(CTEST_PROJECT_NAME "XDATA-Web")
-set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
+##   INCLUDE(CTest)
+
+set(CTEST_PROJECT_NAME "Tangelo")
+set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")

 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "my.cdash.org")
-set(CTEST_DROP_LOCATION "/submit.php?project=XDATA-Web")
+set(CTEST_DROP_LOCATION "/submit.php?project=Tangelo")
 set(CTEST_DROP_SITE_CDASH TRUE)


Remove duplicated LIBUNWIND_ENABLED

Remove duplicated LIBUNWIND_ENABLED

--- project/cmake/ProjectBuildOption.cmake
+++ project/cmake/ProjectBuildOption.cmake
@@ -30,7 +30,6 @@
   option(LIBUNWIND_ENABLED "Enable using libunwind." ON)
 endif()

-cmake_dependent_option(LIBUNWIND_ENABLED "Enable using libunwind." ON "NOT WIN32;NOT MINGW;NOT CYGWIN" OFF)
 option(LOG_WRAPPER_ENABLE_LUA_SUPPORT "Enable lua support." ON)
 option(LOG_WRAPPER_CHECK_LUA "Check lua support." ON)
 set(LOG_WRAPPER_MAX_SIZE_PER_LINE


change library path to bin

change library path to bin

--- vtkCMakeOptions.cmake
+++ vtkCMakeOptions.cmake
@@ -2,6 +2,9 @@
 # This file can be included by other projects that use or depend on VTK
 # it sets up many default parameters and include paths
 #
+
+SET (LIBRARY_OUTPUT_PATH ${VTK_BINARY_DIR}/bin/ CACHE PATH "Single output directory for building all libraries.")
+SET (EXECUTABLE_OUTPUT_PATH ${VTK_BINARY_DIR}/bin/ CACHE PATH "Single output directory for building all executables.")

 OPTION (VTK_USE_RENDERING "Build the rendering classes used for displaying" ON)
 IF (VTK_USE_RENDERING)
@@ -120,8 +123,6 @@
   LINK_LIBRARIES(${CMAKE_THREAD_LIBS} ${CMAKE_DL_LIBS} -lm)
 ENDIF (UNIX)

-SET (LIBRARY_OUTPUT_PATH ${VTK_BINARY_DIR}/lib/ CACHE PATH "Single output directory for building all libraries.")
-SET (EXECUTABLE_OUTPUT_PATH ${VTK_BINARY_DIR}/bin/ CACHE PATH "Single output directory for building all executables.")

 OPTION(VTK_USE_ANSI_STDLIB "Use the ANSI standard iostream library", OFF)


ERR: Added missing include directory for zlib's configured header.

--- vtkCMakeOptions.cmake
+++ vtkCMakeOptions.cmake
@@ -88,6 +88,7 @@
 # Look for the PNG, zlib, jpeg, and tiff libraries and header files
 #
 INCLUDE_DIRECTORIES(${VTK_SOURCE_DIR}/Utilities/zlib)
+INCLUDE_DIRECTORIES(${VTK_BINARY_DIR}/Utilities/zlib)
 INCLUDE_DIRECTORIES(${VTK_SOURCE_DIR}/Utilities/png)
 INCLUDE_DIRECTORIES(${VTK_SOURCE_DIR}/Utilities/jpeg)
 INCLUDE_DIRECTORIES(${VTK_SOURCE_DIR}/Utilities/tiff)


Skip PGO if clang is too old, and add warnings for skipped PGO (#12248)

Clang/LLVM cannot merge profile data generated by a newer version of
itself. Training currently requires 3.6, but we don't want to completely
break the build for 3.5. I'm adding a version check to allow non-PGO
release builds on 3.5, along with a warning message. I'm also updating
the LTO detection to print a warning message if it causes PGO to be
disabled.

--- pgosupport.cmake
+++ pgosupport.cmake
@@ -42,10 +42,16 @@
                 set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS_RELWITHDEBINFO " /LTCG /USEPROFILE:PGD=${ProfilePath}")
             else(WIN32)
                 if(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELEASE OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELWITHDEBINFO)
-                    if(HAVE_LTO)
-                        target_compile_options(${TargetName} PRIVATE -flto -fprofile-instr-use=${ProfilePath} -Wno-profile-instr-out-of-date)
-                        set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS " -flto -fuse-ld=gold -fprofile-instr-use=${ProfilePath}")
-                    endif(HAVE_LTO)
+                    if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.6)
+                        if(HAVE_LTO)
+                            target_compile_options(${TargetName} PRIVATE -flto -fprofile-instr-use=${ProfilePath} -Wno-profile-instr-out-of-date)
+                            set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS " -flto -fuse-ld=gold -fprofile-instr-use=${ProfilePath}")
+                        else(HAVE_LTO)
+                            message(WARNING "LTO is not supported, skipping profile guided optimizations")
+                        endif(HAVE_LTO)
+                    else(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.6)
+                        message(WARNING "PGO is not supported; Clang 3.6 or later is required for profile guided optimizations")
+                    endif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.6)
                 endif(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELEASE OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELWITHDEBINFO)
             endif(WIN32)
         endif(EXISTS ${ProfilePath})


Fix code generation

Fix code generation

--- CMake/clang.cmake
+++ CMake/clang.cmake
@@ -42,6 +42,8 @@

 if(ENABLE_COVERAGE)
   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-instr-generate -fcoverage-mapping")
+  set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage")
+  set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
 endif(ENABLE_COVERAGE)

 CHECK_CXX_COMPILER_FLAG("-Werror=missing-override" COMPILER_HAS_MISSING_OVERRIDE)


Wrong variable

Wrong variable

--- CMake/clang.cmake
+++ CMake/clang.cmake
@@ -35,7 +35,7 @@
 endif(ENABLE_PROFILE_INFO)

 if(ENABLE_ADDRESS_SANITIZER)
-  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer -fsanitize=address -fsanitize-blacklist=${CMAKE_PROJECT_SOURCE_DIR}/CMake/blacklist.txt")
+  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer -fsanitize=address -fsanitize-blacklist=${CMAKE_SOURCE_DIR}/CMake/blacklist.txt")
   set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fno-omit-frame-pointer -fsanitize=address -shared-libasan")
   set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fno-omit-frame-pointer -fsanitize=address -shared-libasan")
 endif(ENABLE_ADDRESS_SANITIZER)


ignoring some warnings in cdash

ignoring some warnings in cdash

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -19,7 +19,10 @@

 IF (NOT CTEST_DROP_SITE)
   set(CTEST_DROP_METHOD "http")
-  set(CTEST_DROP_SITE "cdashserver")
+  set(CTEST_DROP_SITE "cdash")
   set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Embree")
   set(CTEST_DROP_SITE_CDASH TRUE)
 endif()
+
+list (APPEND CTEST_CUSTOM_WARNING_EXCEPTION "warning #1478")  # deprecated function used
+list (APPEND CTEST_CUSTOM_WARNING_EXCEPTION "icpc: warning #10237: -lcilkrts linked in dynamically, static library not available")


try to ignore more of the followup noise

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -11,4 +11,5 @@
    "^make\\[[1-9]\\]: "
    "^collect2: ld returned . exit status"
    "\\.o: No such file or directory" # This is just a followup error message: linking fails after compilation failed
+   "error #10236: File not found: .*\\.o" # This is just a followup error message: linking fails after compilation failed
    "^make: \\*\\*\\* \\[all\\] Error ")


Compile STIR with C++11 but force boost::shared_ptr

Current STIR master will use std::shared_ptr by default when using
C++-11. That breaks SIRF (see Issue #60). As work-around, we force
usage of boost::shared_ptr.

It might not be necessary to compile STIR with C++11, but
it now has some ugly work-arounds related to unique_ptr if that isn't
available which can break SIRF.

--- SuperBuild/External_STIR.cmake
+++ SuperBuild/External_STIR.cmake
@@ -51,6 +51,8 @@
         -DBOOST_ROOT=${BOOST_ROOT}
         -DCMAKE_INSTALL_PREFIX=${STIR_Install_Dir}
         -DGRAPHICS=None
+        -DCMAKE_CXX_STANDARD=11
+        -DSTIR_USE_BOOST_SHARED_PTR=On
     INSTALL_DIR ${STIR_Install_Dir}
     DEPENDS
         ${${proj}_DEPENDENCIES}


Update SWIG version string

Update SWIG version string

Change-Id: If31d1a1a21003c831969c8ecf288fe4fecac74ed

--- SuperBuild/External_Swig.cmake
+++ SuperBuild/External_Swig.cmake
@@ -20,12 +20,12 @@

   if( USE_SWIG_FROM_GIT )
     set(SWIG_GIT_REPOSITORY "${git_protocol}://github.com/swig/swig.git" CACHE STRING "URL of swig git repo")
-    set(SWIG_GIT_TAG "rel-3.0.10" CACHE STRING "Tag in swig git repo")
+    set(SWIG_GIT_TAG "rel-3.0.11" CACHE STRING "Tag in swig git repo")
     mark_as_advanced(SWIG_GIT_REPO)
     mark_as_advanced(SWIG_GIT_TAG)
   endif()

-  set(SWIG_TARGET_VERSION "3.0.10" )
+  set(SWIG_TARGET_VERSION "3.0.11" )
   set(SWIG_DOWNLOAD_SOURCE_HASH "13732eb0f1ab2123d180db8425c1edea")
   set(SWIGWIN_DOWNLOAD_HASH "5cc57e3658f62b7f648bec7eed91a4f0" )


cmake msvc option update

cmake msvc option update

--- projects/cmake/internal_utils.cmake
+++ projects/cmake/internal_utils.cmake
@@ -17,8 +17,12 @@
       #else()
       #  set(${flag_var} "${${flag_var}} /W4")
       endif()
+
+      set(${flag_var} "${${flag_var}} /WX")
+      if (MSVC_VERSION LESS 1900)
+        set(${flag_var} "${${flag_var}} -wd4675")
+      endif()
     endforeach()
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
     foreach (flag_var
              CMAKE_CXX_FLAGS)
       message(STATUS "${flag_var}=${${flag_var}}")
@@ -35,13 +39,7 @@
   if (MSVC)
     # Newlines inside flags variables break CMake's NMake generator.
     # TODO(vladl@google.com): Add -RTCs and -RTCu to debug builds.
-    set(cxx_base_flags "-GS -W4 -WX -wd4505 -nologo -J -Zi")
-    if (MSVC_VERSION LESS 1400)
-      # Suppress spurious warnings MSVC 7.1 sometimes issues.
-      #set(cxx_base_flags "${cxx_base_flags} -wd4800")
-      #set(cxx_base_flags "${cxx_base_flags} -wd4511 -wd4512")
-      #set(cxx_base_flags "${cxx_base_flags} -wd4675")
-    endif()
+    set(cxx_base_flags "-GS -nologo -J -Zi")
     set(cxx_base_flags "${cxx_base_flags} -D_UNICODE -DUNICODE -DWIN32 -D_WIN32")
     set(cxx_base_flags "${cxx_base_flags} -DSTRICT -DWIN32_LEAN_AND_MEAN")
     set(cxx_exception_flags "-EHsc -D_HAS_EXCEPTIONS=1")


Bump to 1.7.9

Bump to 1.7.9

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(LIBREPO_MAJOR "1")
 SET(LIBREPO_MINOR "7")
-SET(LIBREPO_PATCH "8")
+SET(LIBREPO_PATCH "9")


Bump to 1.7.1

Bump to 1.7.1

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(LIBREPO_MAJOR "1")
 SET(LIBREPO_MINOR "7")
-SET(LIBREPO_PATCH "0")
+SET(LIBREPO_PATCH "1")


Bump to 1.7.0

Bump to 1.7.0

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(LIBREPO_MAJOR "1")
-SET(LIBREPO_MINOR "6")
+SET(LIBREPO_MINOR "7")
 SET(LIBREPO_PATCH "0")


New version 0.5.4

New version 0.5.4

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "5")
-SET(HAWKEY_PATCH "3")
+SET(HAWKEY_PATCH "4")


Bump version to 1.7.13

Bump version to 1.7.13

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(LIBREPO_MAJOR "1")
 SET(LIBREPO_MINOR "7")
-SET(LIBREPO_PATCH "12")
+SET(LIBREPO_PATCH "13")


Patch Python before building with MinGW

Patch Python before building with MinGW

The patching currently fails with an assertion error inside UnxUtils' patch application. Should I debug that?

--- cmake/modules/FindPython.cmake
+++ cmake/modules/FindPython.cmake
@@ -5,22 +5,138 @@

 if(BUILD_PYTHON)
 	if(NOT PYTHON_FOUND)
-		if(WIN32)
-			message(WARNING "Building Python on Windows is not supported at the moment. You will probably run into problems.")
+		message(STATUS "Building Python from source.")
+		if(MINGW)
+			find_package(Patch REQUIRED)
+			include(ExternalProject)
+			ExternalProject_Add(PythonMinGWPatches
+				GIT_REPOSITORY https://github.com/Alexpux/MINGW-packages.git
+				GIT_TAG e9c507d51e5d9b7a026cfd374dad38128ed8ca4a
+				CONFIGURE_COMMAND "" #Don't do anything with this but download it.
+				BUILD_COMMAND ""
+				INSTALL_COMMAND ""
+				BUILD_IN_SOURCE 1
+			)
+			set(PATCH_SOURCE ${CMAKE_CURRENT_BINARY_DIR}/PythonMinGWPatches-prefix/src/PythonMinGWPatches)
+			set(PATCH_TARGET ${CMAKE_CURRENT_BINARY_DIR}/Python-prefix/src/Python)
+			set(PATCH_PYTHON_FOR_MINGW
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0000-make-_sysconfigdata.py-relocatable.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0100-MINGW-BASE-use-NT-thread-model.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0130-MINGW-configure-MACHDEP-and-platform-for-build.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0140-MINGW-preset-configure-defaults.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0150-MINGW-configure-largefile-support-for-windows-builds.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0160-MINGW-add-wincrypt.h-in-Python-random.c.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0170-MINGW-add-srcdir-PC-to-CPPFLAGS.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0180-MINGW-init-system-calls.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0190-MINGW-detect-REPARSE_DATA_BUFFER.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0200-MINGW-build-in-windows-modules-winreg.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0210-MINGW-determine-if-pwdmodule-should-be-used.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0220-MINGW-default-sys.path-calculations-for-windows-plat.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0230-MINGW-AC_LIBOBJ-replacement-of-fileblocks.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0240-MINGW-use-main-to-start-execution.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0260-MINGW-compiler-enable-new-dtags.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0270-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0300-MINGW-configure-for-shared-build.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0310-MINGW-dynamic-loading-support.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0320-MINGW-implement-exec-prefix.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0330-MINGW-ignore-main-program-for-frozen-scripts.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0340-MINGW-setup-exclude-termios-module.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0350-MINGW-setup-_multiprocessing-module.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0360-MINGW-setup-select-module.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0370-MINGW-setup-_ctypes-module-with-system-libffi.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0380-MINGW-defect-winsock2-and-setup-_socket-module.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0390-MINGW-exclude-unix-only-modules.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0400-MINGW-setup-msvcrt-and-_winapi-modules.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0410-MINGW-build-extensions-with-GCC.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0430-MINGW-find-import-library.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0440-MINGW-setup-_ssl-module.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0462-MINGW-support-stdcall-without-underscore.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0464-use-replace-instead-rename-to-avoid-failure-on-windo.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0470-MINGW-avoid-circular-dependency-from-time-module-dur.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0490-MINGW-customize-site.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0500-add-python-config-sh.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0510-cross-darwin-feature.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0520-py3k-mingw-ntthreads-vs-pthreads.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0530-mingw-system-libffi.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0540-mingw-semicolon-DELIM.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0550-mingw-regen-use-stddef_h.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0555-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0560-mingw-use-posix-getpath.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0565-mingw-add-ModuleFileName-dir-to-PATH.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0590-mingw-INSTALL_SHARED-LDLIBRARY-LIBPL.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0610-msys-cygwin-semi-native-build-sysconfig.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0620-mingw-sysconfig-like-posix.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0640-mingw-x86_64-size_t-format-specifier-pid_t.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0650-cross-dont-add-multiarch-paths-if-cross-compiling.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0660-mingw-use-backslashes-in-compileall-py.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0670-msys-convert_path-fix-and-root-hack.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0690-allow-static-tcltk.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0700-CROSS-avoid-ncursesw-include-path-hack.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0710-CROSS-properly-detect-WINDOW-_flags-for-different-nc.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0720-mingw-pdcurses_ISPAD.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0730-mingw-fix-ncurses-module.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0740-grammar-fixes.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0750-builddir-fixes.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0760-msys-monkeypatch-os-system-via-sh-exe.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0770-msys-replace-slashes-used-in-io-redirection.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0790-mingw-add-_exec_prefix-for-tcltk-dlls.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0800-mingw-install-layout-as-posix.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0810-remove_path_max.default.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0820-dont-link-with-gettext.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0830-ctypes-python-dll.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0840-gdbm-module-includes.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0850-use-gnu_printf-in-format.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0860-fix-_Py_CheckPython3-prototype.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0870-mingw-fix-ssl-dont-use-enum_certificates.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0890-mingw-build-optimized-ext.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0910-fix-using-dllhandle-and-winver-mingw.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0920-mingw-add-LIBPL-to-library-dirs.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0930-mingw-w64-build-overlapped-module.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0940-mingw-w64-Also-define-_Py_BEGIN_END_SUPPRESS_IPH-when-Py_BUILD_CORE_MODULE.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0950-mingw-w64-XP3-compat-GetProcAddress-GetTickCount64.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0960-mingw-w64-XP3-compat-GetProcAddress-GetFinalPathNameByHandleW.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/0980-mingw-readline-features-skip.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/1010-install-msilib.patch.patch
+				COMMAND ${PATCH_EXECUTABLE} -d ${PATCH_TARGET} -p 1 -i ${PATCH_SOURCE}/mingw-w64-python3/1500-mingw-w64-dont-look-in-DLLs-folder-for-python-dll.patch
+			)
+			ExternalProject_Add(Python
+				URL https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz
+				URL_HASH SHA512=248B3EF2DEFEE7C013E8AC7472B9F2828B1C5B07A2F091EAD46EBDF209BE11DD37911978B590367699D9FAD50F1B98B998BCEEC34FA8369BA30950D3A5FB596F
+				DEPENDS PythonMinGWPatches
+				PATCH_COMMAND ${PATCH_PYTHON_FOR_MINGW}
+				BUILD_COMMAND "" #TODO
+				INSTALL_COMMAND "" #TODO
+			)
+			set(PYTHON_EXECUTABLE ${CMAKE_INSTALL_PREFIX}/bin/python3)
+			set(PYTHON_VERSION_STRING "3.5.2")
+			set(PYTHON_VERSION_MAJOR 3)
+			set(PYTHON_VERSION_MINOR 5)
+			set(PYTHON_VERSION_PATCH 2)
+		else()
+			include(ExternalProject)
+			ExternalProject_Add(Python
+				URL https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz
+				URL_HASH SHA512=248B3EF2DEFEE7C013E8AC7472B9F2828B1C5B07A2F091EAD46EBDF209BE11DD37911978B590367699D9FAD50F1B98B998BCEEC34FA8369BA30950D3A5FB596F
+				CONFIGURE_COMMAND ./configure --prefix=${CMAKE_INSTALL_PREFIX} --enable-shared --with-threads
+				BUILD_IN_SOURCE 1
+			)
+			set(PYTHON_EXECUTABLE ${CMAKE_INSTALL_PREFIX}/bin/python3)
+			set(PYTHON_VERSION_STRING "3.5.2")
+			set(PYTHON_VERSION_MAJOR 3)
+			set(PYTHON_VERSION_MINOR 5)
+			set(PYTHON_VERSION_PATCH 2)
 		endif()
-		message(STATUS "Building Python from source.")
-		include(ExternalProject)
-		ExternalProject_Add(Python
-			URL https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz
-			URL_HASH SHA512=248B3EF2DEFEE7C013E8AC7472B9F2828B1C5B07A2F091EAD46EBDF209BE11DD37911978B590367699D9FAD50F1B98B998BCEEC34FA8369BA30950D3A5FB596F
-			CONFIGURE_COMMAND ./configure --prefix=${CMAKE_INSTALL_PREFIX} --enable-shared --with-threads
-			BUILD_IN_SOURCE 1
-		)
-		set(PYTHON_EXECUTABLE ${CMAKE_INSTALL_PREFIX}/bin/python3)
-		set(PYTHON_VERSION_STRING "3.5.2")
-		set(PYTHON_VERSION_MAJOR 3)
-		set(PYTHON_VERSION_MINOR 5)
-		set(PYTHON_VERSION_PATCH 2)
 		set(PYTHON_FOUND TRUE)
 	endif()
 else() #Just find it on the system.


Revert "Use dictionary object file as dependency for the PCH"

This reverts commit 07d25b24b7c5dbb33cc6063b9d8403ba6e13db93.
The object files still cause race conditions in some build
configurations when used as dependency.

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -527,27 +527,12 @@

     target_include_directories(${dictionary} PRIVATE
       ${includedirs} $<TARGET_PROPERTY:${ARG_MODULE},INCLUDE_DIRECTORIES>)
-
-    # We must depend on $<TARGET_OBJECTS:${dictionary}> here to create a
-    # file-level dependency between the dictionary and the PCH. If we depend on
-    # the source file, there is a race condition between the library and the PCH
-    # on the custom command that generates the dictionary, and if we use the
-    # ${dictionary} target, there is no file-level dependency and the PCH does
-    # not regenerate when the dictionary changes.
-    if(PROJECT_NAME STREQUAL "ROOT")
-      set_property(GLOBAL APPEND PROPERTY ROOT_PCH_DEPENDENCIES $<TARGET_OBJECTS:${dictionary}>)
-    endif()
   else()
     add_custom_target(${dictionary} DEPENDS ${dictionary}.cxx ${pcm_name} ${rootmap_name} ${cpp_module_file})
-
-    # Error out if this dictionary should be part of the PCH but won't cause
-    # it to regenerate it when it changes, due to the missing file-level dependency.
-    # We cannot add a dependency on the dictionary source since that creates a race
-    # condition on the custom command that generates the dictionary. Any target that
-    # triggers this error should be moved to use the object library as intermediate.
-    if(PROJECT_NAME STREQUAL "ROOT" AND NOT "${ARG_MODULE}" STREQUAL "")
-      message(FATAL_ERROR "Target ${dictionary} will not cause PCH to regenerate!")
-    endif()
+  endif()
+
+  if(PROJECT_NAME STREQUAL "ROOT")
+    set_property(GLOBAL APPEND PROPERTY ROOT_PCH_DEPENDENCIES ${dictionary})
   endif()

   if(ARG_MULTIDICT)


Update cache version

Update cache version

--- scripts/create-toolchain-info.cmake
+++ scripts/create-toolchain-info.cmake
@@ -34,7 +34,7 @@
 file(
     WRITE
     "${TOOLCHAIN_INFO_FILE}"
-    "Cache version: 2\n"
+    "Cache version: 3\n"
     "Polly toolchains:\n"
     "    IPHONEOS_ARCHS: ${IPHONEOS_ARCHS}\n"
     "    IPHONESIMULATOR_ARCHS: ${IPHONESIMULATOR_ARCHS}\n"


CMake: add dependencies on common gyb modules in 'utils/'

--- cmake/modules/SwiftHandleGybSources.cmake
+++ cmake/modules/SwiftHandleGybSources.cmake
@@ -46,7 +46,10 @@
       "${SWIFT_SOURCE_DIR}/utils/GYBUnicodeDataUtils.py"
       "${SWIFT_SOURCE_DIR}/utils/SwiftIntTypes.py"
       "${SWIFT_SOURCE_DIR}/utils/UnicodeData/GraphemeBreakProperty.txt"
-      "${SWIFT_SOURCE_DIR}/utils/UnicodeData/GraphemeBreakTest.txt")
+      "${SWIFT_SOURCE_DIR}/utils/UnicodeData/GraphemeBreakTest.txt"
+      "${SWIFT_SOURCE_DIR}/utils/gyb_stdlib_support.py"
+      "${SWIFT_SOURCE_DIR}/utils/gyb_stdlib_unittest_support.py"
+  )
   foreach (src ${${sources_var_name}})
     string(REGEX REPLACE "[.]gyb$" "" src_sans_gyb "${src}")
     if(src STREQUAL src_sans_gyb)


Add prefix to cmake functions.

Add prefix to cmake functions.

--- src/inserts/functions.cmake
+++ src/inserts/functions.cmake
@@ -1075,10 +1075,10 @@
 endfunction()

 ########################################
-# MACRO ragel
-########################################
-
-macro(ragel f)
+# MACRO cppan_ragel
+########################################
+
+macro(cppan_ragel f)
     set(i ${SDIR}/${f})
     set(o ${BDIR_PRIVATE}/${f}.cpp)
     add_custom_command(OUTPUT ${o}
@@ -1089,10 +1089,10 @@
 endmacro()

 ########################################
-# MACRO re2c
-########################################
-
-macro(re2c f)
+# MACRO cppan_re2c
+########################################
+
+macro(cppan_re2c f)
     set(i ${SDIR}/${f})
     set(o ${BDIR_PRIVATE}/${f}.cpp)
     add_custom_command(OUTPUT ${o}
@@ -1103,11 +1103,11 @@
 endmacro()

 ########################################
-# FUNCTION flex_bison
-########################################
-
-function(flex_bison lexer parser)
-    set(multiValueArgs LEXER_ARGS PARSER_ARGS)
+# FUNCTION cppan_flex_bison_internal
+########################################
+
+function(cppan_flex_bison_internal lexer)
+    set(multiValueArgs LEXER_ARGS PARSERS PARSER_ARGS)
     cmake_parse_arguments(FB "" "" "${multiValueArgs}" ${ARGN})

     set(bdir ${BDIR_PRIVATE}/fb)
@@ -1117,27 +1117,36 @@
         set(bison bison)
     endif()

-    # parser
-    get_filename_component(name ${parser} NAME)
-
-    set(d ${bdir}/${name})
-    execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${d})
-
-    add_custom_command(OUTPUT
+    # parsers
+    set(parser_headers)
+    foreach(parser ${FB_PARSERS})
+        get_filename_component(name ${parser} NAME)
+        #get_filename_component(name_we ${parser} NAME_WE)
+
+        set(d ${bdir}/${name})
+        execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${d})
+
+        add_custom_command(OUTPUT
+                ${d}/${name}.cpp
+                ${d}/${name}.hpp
+            COMMAND ${bison}
+                ${FB_PARSER_ARGS}
+                #-Dapi.prefix={yy_${name_we}}
+                -o ${d}/${name}.cpp
+                --defines=${d}/${name}.hpp
+                ${SDIR}/${parser}
+            DEPENDS ${bison} ${SDIR}/${parser}
+            WORKING_DIRECTORY ${d}
+        )
+        target_include_directories(${this} PRIVATE ${d})
+
+        target_sources(${this} PRIVATE
             ${d}/${name}.cpp
             ${d}/${name}.hpp
-        COMMAND ${bison} ${FB_PARSER_ARGS} -o ${d}/${name}.cpp --defines=${d}/${name}.hpp ${SDIR}/${parser}
-        DEPENDS ${bison} ${SDIR}/${parser}
-        WORKING_DIRECTORY ${d}
-    )
-    target_include_directories(${this} PRIVATE ${d})
-
-    target_sources(${this} PRIVATE
-        ${d}/${name}.cpp
-        ${d}/${name}.hpp
-    )
-
-    set(parser_header ${d}/${name}.hpp)
+        )
+
+        set(parser_headers ${parser_headers} ${d}/${name}.hpp)
+    endforeach()

     # lexer
     get_filename_component(d ${lexer} DIRECTORY)
@@ -1148,7 +1157,7 @@
             #${bdir}/${lexer}.h
         #COMMAND ${flex} -o ${bdir}/${lexer}.cpp --header-file=${lexer}.h ${SDIR}/${lexer}
         COMMAND ${flex} ${FB_LEXER_ARGS} -o ${bdir}/${lexer}.cpp ${SDIR}/${lexer}
-        DEPENDS ${flex} ${SDIR}/${lexer} ${parser_header}
+        DEPENDS ${flex} ${SDIR}/${lexer} ${parser_headers}
         WORKING_DIRECTORY ${bdir}
     )
     target_include_directories(${this} PRIVATE ${bdir}/${d})
@@ -1160,10 +1169,10 @@
 endfunction()

 ########################################
-# FUNCTION flex_bison_pair
-########################################
-
-function(flex_bison_pair type name)
+# MACRO cppan_generate_flex_bison_config
+########################################
+
+macro(cppan_generate_flex_bison_config)
     get_filename_component(dir ${name} DIRECTORY)
     get_filename_component(name2 ${name} NAME)
     set(name ${name2})
@@ -1180,10 +1189,15 @@

 #undef THIS_PARSER_NAME
 #undef THIS_PARSER_NAME_UP
-#undef MY_PARSER
+#undef THIS_LEXER_NAME
+#undef THIS_LEXER_NAME_UP

 #define THIS_PARSER_NAME    ${name}
 #define THIS_PARSER_NAME_UP ${name_upper}
+#define THIS_LEXER_NAME     ${lexer_name}
+#define THIS_LEXER_NAME_UP  ${lexer_name_up}
+
+#undef MY_PARSER
 #define MY_PARSER           ${parser_name}

 #define ${type}
@@ -1198,9 +1212,44 @@
         DEPENDS ${parser_include_in}
     )
     target_sources(${this} PRIVATE ${parser_include})
+endmacro()
+
+########################################
+# FUNCTION cppan_flex_bison_pair
+########################################
+
+function(cppan_flex_bison_pair type name)
+    set(lexer_name THIS_PARSER_NAME)
+    set(lexer_name_up THIS_PARSER_NAME_UP)
+    cppan_generate_flex_bison_config()

     # after include
-    flex_bison(${dir}/${name}.ll ${dir}/${name}.yy LEXER_ARGS --prefix=ll_${name} PARSER_ARGS -Dapi.prefix={yy_${name}})
+    cppan_flex_bison_internal(${dir}/${name}.ll PARSERS ${dir}/${name}.yy LEXER_ARGS --prefix=ll_${name} PARSER_ARGS -Dapi.prefix={yy_${name}})
 endfunction()

+########################################
+# FUNCTION cppan_flex_bison_multiple_parsers
+########################################
+
+function(cppan_flex_bison_multiple_parsers type lexer_name)
+    message(FATAL_ERROR "not implemented")
+
+    set(multiValueArgs PARSERS)
+    cmake_parse_arguments(FB "" "" "${multiValueArgs}" ${ARGN})
+
+    get_filename_component(lexer_dir ${lexer_name} DIRECTORY)
+    get_filename_component(lexer_name ${lexer_name} NAME)
+    string(TOUPPER ${lexer_name} lexer_name_up)
+
+    set(PARSERS)
+    foreach(p ${FB_PARSERS})
+        set(name ${p})
+        cppan_generate_flex_bison_config()
+        set(PARSERS ${PARSERS} ${dir}/${name}.yy)
+    endforeach()
+
+    # after include
+    cppan_flex_bison_internal(${dir}/${name}.ll PARSERS ${PARSERS} LEXER_ARGS --prefix=ll_${name})
+endfunction()
+
 ################################################################################


fixed external tf

fixed external tf

--- cmake/ExternalTensorflow.cmake
+++ cmake/ExternalTensorflow.cmake
@@ -36,29 +36,13 @@

 )

-#if(WIN32)
-#    # Tensorflow is built static on windows, need to include all dependecies
-#    list(APPEND LIBRARIES
-#        tensorflow.lib
-#        libprotobuf.lib
-#        libjpeg.lib
-#        libpng12_static.lib
-#        giflib.lib
-#        jsoncpp.lib
-#        farmhash.lib
-#        highwayhash.lib
-#        gpr.lib
-#        grpc_unsecure.lib
-#        grpc++_unsecure.lib
-#    )
-#    set(Tensorflow_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}tensorflow${CMAKE_STATIC_LIBRARY_SUFFIX})
-#else(WIN32)
-#    list(APPEND LIBRARIES
-#        ${CMAKE_SHARED_LIBRARY_PREFIX}tensorflow${CMAKE_SHARED_LIBRARY_SUFFIX}
-#    )
-#    set(Tensorflow_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}tensorflow${CMAKE_SHARED_LIBRARY_SUFFIX})
-#endif(WIN32)
 list(APPEND LIBRARIES
     ${CMAKE_SHARED_LIBRARY_PREFIX}tensorflow${CMAKE_SHARED_LIBRARY_SUFFIX}
 )
+# For windows we need this protobuf static lib for some reason..
+if(WIN32)
+    list(APPEND LIBRARIES
+        libprotobuf.lib
+    )
+endif(WIN32)
 list(APPEND FAST_EXTERNAL_DEPENDENCIES tensorflow)


support official /usr/include/ni as place for openni header

git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@1164 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/Modules/FindOpenNI.cmake
+++ cmake/Modules/FindOpenNI.cmake
@@ -18,7 +18,7 @@

 #add a hint so that it can find it without the pkg-config
 find_path(OPENNI_INCLUDE_DIR XnStatus.h
-          HINTS ${PC_OPENNI_INCLUDEDIR} ${PC_OPENNI_INCLUDE_DIRS} /usr/include/openni "${OPENNI_ROOT}" "$ENV{OPENNI_ROOT}"
+          HINTS ${PC_OPENNI_INCLUDEDIR} ${PC_OPENNI_INCLUDE_DIRS} /usr/include/openni /usr/include/ni "${OPENNI_ROOT}" "$ENV{OPENNI_ROOT}"
           PATHS "$ENV{PROGRAMFILES}/OpenNI/Include" "$ENV{PROGRAMW6432}/OpenNI/Include"
           PATH_SUFFIXES openni include Include)
 #add a hint so that it can find it without the pkg-config


Fix extra semicolon in compile/link flags

--- cmake/Modules/SampPlugin.cmake
+++ cmake/Modules/SampPlugin.cmake
@@ -18,8 +18,8 @@
   set_target_properties(${name} PROPERTIES PREFIX "")

   if(CMAKE_COMPILER_IS_GNUCC)
-    set_property(TARGET ${name} APPEND PROPERTY COMPILE_FLAGS "-m32")
-    set_property(TARGET ${name} APPEND PROPERTY LINK_FLAGS    "-m32")
+    set_property(TARGET ${name} APPEND_STRING PROPERTY COMPILE_FLAGS " -m32")
+    set_property(TARGET ${name} APPEND_STRING PROPERTY LINK_FLAGS    " -m32")
   endif()

   if(UNIX AND NOT WIN32)


CMakeLists.txt: Fix hidapi-hidraw naming in pkg-config search

Signed-off-by: Andrew Andrianov <02e0a999c50b1f88df7a8f5a04e1b76b35ea6a88@ncrmnt.org>

--- cmake/modules/FindHidApi.cmake
+++ cmake/modules/FindHidApi.cmake
@@ -45,7 +45,7 @@

 if((NOT HIDAPI_FOUND))
   message(STATUS "hidapi not found via pkg-config, trying find_library()")
-  find_library(HIDAPI NAMES hidapi hidapi-raw hidapi-libusb)
+  find_library(HIDAPI NAMES hidapi hidapi-hidraw hidapi-libusb)
   if (NOT HIDAPI)
     message(STATUS "Failed to find system installation of hidapi")
   else()


FindNodejs.cmake: added search paths for Ubuntu 16.04

Closes #566.

Signed-off-by: Alex Tereschenko <c1573d8a2714f7b294fae3af1bb5e489479ca966@gmail.com>
Signed-off-by: Brendan Le Foll <3e0e8c4069934e8b47d99704927a85c66c0ceb33@intel.com>

--- cmake/modules/FindNodejs.cmake
+++ cmake/modules/FindNodejs.cmake
@@ -23,13 +23,16 @@
 endif()

 # Now look for node. Flag an error if not found
-find_path (NODE_ROOT_DIR "include/node/node.h" "include/src/node.h"
+find_path (NODE_ROOT_DIR "include/node/node.h" "include/src/node.h" "src/node.h"
   PATHS /usr/include/nodejs /usr/local/include/nodejs /usr/local/include)
 if (NODE_ROOT_DIR)
   add_include_dir(${NODE_ROOT_DIR}/include/src)
+  add_include_dir(${NODE_ROOT_DIR}/src)
   add_include_dir(${NODE_ROOT_DIR}/include/node)
   add_include_dir(${NODE_ROOT_DIR}/include/deps/v8/include)
+  add_include_dir(${NODE_ROOT_DIR}/deps/v8/include)
   add_include_dir(${NODE_ROOT_DIR}/include/deps/uv/include)
+  add_include_dir(${NODE_ROOT_DIR}/deps/uv/include)
 else()
   unset(NODEJS_INCLUDE_DIRS)
   message(ERROR " - node.h not found")


find qt loudly

find qt loudly

--- cmake/modules/FindQt4or5.cmake
+++ cmake/modules/FindQt4or5.cmake
@@ -49,10 +49,6 @@
   list(REMOVE_DUPLICATES ${output_list})
 endmacro()

-if (Qt4or5_FIND_QUIETLY)
-  set(_Qt4or5_FIND_PACKAGE_ARGS QUIET)
-endif()
-
 _qt4or5_component_names_to_qt_components(_Qt4or5_FIND_COMPONENTS ${Qt4or5_FIND_COMPONENTS})
 _qt4or5_component_names_to_qt_components(_Qt4or5_FIND_COMPONENTS ${Qt4or5_FIND_OPTIONAL_COMPONENTS})

@@ -66,6 +62,7 @@

   # Find Qt5 modules
   foreach (qt_component ${_Qt4or5_FIND_COMPONENTS})
+      message("LOoking for package ${qt_component}")
     find_package(Qt5${qt_component} ${Qt5_MIN_VERSION} ${_Qt4or5_FIND_PACKAGE_ARGS})
     if (Qt5${qt_component}_FOUND)
       _qt4or5_component_name_from_qt_component(component ${qt_component})


Fixed QTGLIB_LIBRARIES

Fixed QTGLIB_LIBRARIES

--- cmake/modules/FindQtGLib.cmake
+++ cmake/modules/FindQtGLib.cmake
@@ -29,17 +29,15 @@
     set(QTGLIB_DEFINITIONS ${PC_QTGLIB_CFLAGS_OTHER})
 endif (NOT WIN32)

-find_path(QTGLIB_INCLUDE_DIR QtGLib/channel.h
-   PATHS
-   ${PC_QTGLIB_INCLUDEDIR}
-   ${PC_QTGLIB_INCLUDE_DIRS}
+find_path(QTGLIB_INCLUDE_DIR
+   NAMES QGLib/Object
+   PATHS ${PC_QTGLIB_INCLUDEDIR} ${PC_QTGLIB_INCLUDE_DIRS}
    PATH_SUFFIXES QtGStreamer
    )

-find_library(QTGLIB_LIBRARIES NAMES QtGlib-2.0
-   PATHS
-   ${PC_QTGLIB_LIBDIR}
-   ${PC_QTGLIB_LIBRARY_DIRS}
+find_library(QTGLIB_LIBRARIES
+   NAMES QtGLib-2.0
+   PATHS ${PC_QTGLIB_LIBDIR} ${PC_QTGLIB_LIBRARY_DIRS}
    )

 include(FindPackageHandleStandardArgs)


[CMake] Add possibility to copy files for ROOT_ADD_GTEST

- Contrary to the documentation, ROOT_ADD_GTEST does not react to
`COPY_TO_BUILDDIR`. This adds the missing functionality.
- Further add documentation for existing functionality for
ROOT_ADD_TEST.

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -1282,7 +1282,7 @@
 #                        [TIMEOUT seconds]
 #                        [DEBUG]
 #                        [SOURCE_DIR dir] [BINARY_DIR dir]
-#                        [WORKING_DIR dir]
+#                        [WORKING_DIR dir] [COPY_TO_BUILDDIR files]
 #                        [BUILD target] [PROJECT project]
 #                        [PASSREGEX exp] [FAILREGEX epx]
 #                        [PASSRC code])
@@ -1535,12 +1535,13 @@
         /EXPORT:_Init_thread_footer /EXPORT:_Init_thread_header /EXPORT:_tls_index")
     set_property(TARGET ${test_suite} APPEND_STRING PROPERTY LINK_FLAGS ${test_exports})
   endif()
-
+
   ROOT_PATH_TO_STRING(mangled_name ${test_suite} PATH_SEPARATOR_REPLACEMENT "-")
   ROOT_ADD_TEST(
     gtest${mangled_name}
     COMMAND ${test_suite}
     WORKING_DIR ${CMAKE_CURRENT_BINARY_DIR}
+    COPY_TO_BUILDDIR ${ARG_COPY_TO_BUILDDIR}
   )
 endfunction()


Add possibility to execute ROOT gtest tests number of times, stopping at the first failure

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -659,7 +659,7 @@
     target_include_directories(${dictionary} PRIVATE
       ${incdirs} $<TARGET_PROPERTY:${ARG_MODULE},INCLUDE_DIRECTORIES>)
   else()
-    get_filename_component(dictionary_name ${dictionary} NAME)
+    get_filename_component(dictionary_name ${dictionary} NAME)
     add_custom_target(${dictionary_name} DEPENDS ${dictionary}.cxx ${pcm_name} ${rootmap_name} ${cpp_module_file})
   endif()

@@ -1681,11 +1681,12 @@
 #                        [WILLFAIL]
 #                        [COPY_TO_BUILDDIR file1 file2...] -- files to copy in the build directory
 #                        [LIBRARIES lib1 lib2...] -- Libraries to link against
-#                        [LABELS label1 label2...]) -- Labels to annotate the test
-#                        [INCLUDE_DIRS label1 label2...]) -- Extra target include directories
+#                        [LABELS label1 label2...] -- Labels to annotate the test
+#                        [INCLUDE_DIRS label1 label2...] -- Extra target include directories
+#                        [REPEATS number] -- Repeats testsuite `number` times, stopping at the first failure.

 function(ROOT_ADD_GTEST test_suite)
-  CMAKE_PARSE_ARGUMENTS(ARG "WILLFAIL" "" "COPY_TO_BUILDDIR;LIBRARIES;LABELS;INCLUDE_DIRS" ${ARGN})
+  CMAKE_PARSE_ARGUMENTS(ARG "WILLFAIL" "REPEATS" "COPY_TO_BUILDDIR;LIBRARIES;LABELS;INCLUDE_DIRS" ${ARGN})

   # ROOTUnitTestSupport
   if(NOT TARGET ROOTUnitTestSupport)
@@ -1718,11 +1719,14 @@
   if(ARG_LABELS)
     set(labels "LABELS ${ARG_LABELS}")
   endif()
+  if(ARG_REPEATS)
+    set(extra_command --gtest_repeat=${ARG_REPEATS} --gtest_break_on_failure)
+  endif()

   ROOT_PATH_TO_STRING(mangled_name ${test_suite} PATH_SEPARATOR_REPLACEMENT "-")
   ROOT_ADD_TEST(
     gtest${mangled_name}
-    COMMAND ${test_suite}
+    COMMAND ${test_suite} ${extra_command}
     WORKING_DIR ${CMAKE_CURRENT_BINARY_DIR}
     COPY_TO_BUILDDIR ${ARG_COPY_TO_BUILDDIR}
     ${willfail}
@@ -1791,7 +1795,7 @@
   if(ARG_WILLFAIL)
     set(will_fail WILLFAIL)
   endif()
-
+
   if(ARG_PYTHON_DEPS)
     list(APPEND labels python_runtime_deps)
   endif()


Fix incorrect dependency rules between globject and glbinding

--- cmake/submoduleGlObjects.cmake
+++ cmake/submoduleGlObjects.cmake
@@ -45,7 +45,7 @@
 ExternalProject_Add(
     globjects
     # Need to build glbinding_lib before configuring globjects
-    DEPENDS glbinding_lib
+    DEPENDS glbinding_lib glm_lib

     # where the source will live
     SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rdPartyLibraries/OpenGL/globjects"
@@ -54,6 +54,7 @@
     UPDATE_COMMAND ""

     GIT_SUBMODULES 3rdPartyLibraries/OpenGL/globjects
+
     # set the installatin to root
     # INSTALL_COMMAND cmake -E echo "Skipping install step."
     INSTALL_DIR "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}"
@@ -77,15 +78,9 @@

 add_custom_target(globjects_lib
-    DEPENDS  glbinding_lib glm_lib globjects
+    DEPENDS  glbinding_lib globjects
     )
 # ----------------------------------------------------------------------------------------------------------------------
-
-if(${RADIUM_SUBMODULES_BUILD_TYPE} MATCHES Debug)
-    set(GLOBJECTLIBNAME globjectsd)
-else()
-    set(GLOBJECTLIBNAME globjects)
-endif()

 if( MSVC OR MINGW )


-bug fix, path to paths

-bug fix, path to paths

--- cmakemodules/FindJSONCPP.cmake
+++ cmakemodules/FindJSONCPP.cmake
@@ -8,16 +8,14 @@
 #  JSONCPP_LIBRARY, where to find the jsoncpp library.
 set(JSONCPP_NAMES jsoncpp)

-FIND_PATH(JSONCPP_INCLUDE_DIR
+FIND_PATH(JSONCPP_INCLUDE_DIR
   NAMES
     json/json.h
-  PATH
+  PATHS
   	/usr/local/include/jsoncpp
     /usr/include/jsoncpp/
   	/usr/include
 	DOC "The JSONCpp include directory")
-
-#set(JSONCPP_NAMES jsoncpp)

 FIND_LIBRARY(JSONCPP_LIBRARY
   NAMES


[cmake]Don't enable inlining for LDC. It has issues ATM.

--- cmake/FindD.cmake
+++ cmake/FindD.cmake
@@ -114,7 +114,7 @@
 set(D_RELEASE_FLAGS -O -release)
 set(D_DEBUG_FLAGS -g )
 if(D_IS_LLVM)
-    set(D_RELEASE_FLAGS ${D_RELEASE_FLAGS} -enable-inlining)
+    set(D_RELEASE_FLAGS ${D_RELEASE_FLAGS})
     set(D_VERSION_FLAG -d-version)
     set(D_DEBUG_FLAG -d-debug)
 else(D_IS_LLVM)
@@ -674,4 +674,4 @@
     else(update_deps_tmp)
         file(STRINGS ${deps_file_tmp} ${out})
     endif(update_deps_tmp)
-endmacro(get_files_depends out)+endmacro(get_files_depends out)


* Add marssim to list of components to load

--- scripts/bocca-gui-backend.sh.cmake
+++ scripts/bocca-gui-backend.sh.cmake
@@ -1,6 +1,7 @@
 #!/bin/bash
 source /usr/local/modules/init/bash
 module load openmi cem/devel sedflux/devel hydrotrend/3.0 child csdms roms stm
+module load marssim

 if [ -z "${CMT_PROJECT_DIALOG_PATH+x}" ] ; then
   export CMT_PROJECT_DIALOG_PATH=@CONFIG_DIR@


Sanitize output for Release mode

Sanitize output for Release mode

git-svn-id: b66b41e514ff40863ef1aa95df2dbf63dd8d6be1@633 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/ACGOutput.cmake
+++ cmake/ACGOutput.cmake
@@ -29,7 +29,14 @@
     acg_color_message ("${_escape}[40;37m*                                                          *${_escape}[0m")
     acg_color_message ("${_escape}[40;37m* Package : ${_escape}[32m${_project} ${_escape}[37m      *${_escape}[0m")
     acg_color_message ("${_escape}[40;37m* Version : ${_escape}[32m${_version} ${_escape}[37m      *${_escape}[0m")
-    acg_color_message ("${_escape}[40;37m* Type    : ${_escape}[32m${CMAKE_BUILD_TYPE} ${_escape}[37m                                         *${_escape}[0m")
+
+    # Just artistic. remove 2 spaces for release to make it look nicer ;-)
+    if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
+       acg_color_message ("${_escape}[40;37m* Type    : ${_escape}[32m${CMAKE_BUILD_TYPE} ${_escape}[37m                                         *${_escape}[0m")
+    else()
+       acg_color_message ("${_escape}[40;37m* Type    : ${_escape}[32m${CMAKE_BUILD_TYPE} ${_escape}[37m                                       *${_escape}[0m")
+    endif()
+
     acg_color_message ("${_escape}[40;37m************************************************************${_escape}[0m")
 endfunction ()


cmake: add cunit detection support on Windows

--- cmake/FindCUnit.cmake
+++ cmake/FindCUnit.cmake
@@ -27,21 +27,40 @@
 # limitations under the License.
 #=============================================================================

-find_path(CUNIT_INCLUDE_DIR NAMES CUnit.h
-          PATH_SUFFIXES CUnit
-          DOC "The CUnit include directory"
+if(WIN32)
+set(_CUNIT_ROOT_HINTS
+	$ENV{CUNIT_ROOT_DIR}
+	${CUNIT_ROOT_DIR})
+
+set(_CUNIT_ROOT_PATHS
+	"$ENV{PROGRAMFILES}/CUnit"
+	"$ENV{SYSTEMDRIVE}/CUnit")
+
+set(_CUNIT_ROOT_HINTS_AND_PATHS
+	HINTS ${_CUNIT_ROOT_HINTS}
+	PATHS ${_CUNIT_ROOT_PATHS})
+endif(WIN32)
+
+find_path(CUNIT_INCLUDE_DIR
+	NAMES CUnit.h
+	HINTS ${_CUNIT_ROOT_HINTS_AND_PATHS}
+	PATH_SUFFIXES CUnit include
+	DOC "The CUnit include directory"
 )

-find_library(CUNIT_LIBRARY NAMES cunit
-          DOC "The CUnit library"
+find_library(CUNIT_LIBRARY
+	NAMES cunit
+	HINTS ${_CUNIT_ROOT_HINTS_AND_PATHS}
+	PATH_SUFFIXES lib
+	DOC "The CUnit library"
 )

 include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(CUnit DEFAULT_MSG CUNIT_LIBRARY CUNIT_INCLUDE_DIR)

 if(CUNIT_FOUND)
-  set( CUNIT_LIBRARIES ${CUNIT_LIBRARY} )
-  set( CUNIT_INCLUDE_DIRS ${CUNIT_INCLUDE_DIR} )
+		set(CUNIT_LIBRARIES ${CUNIT_LIBRARY})
+		set(CUNIT_INCLUDE_DIRS ${CUNIT_INCLUDE_DIR})
 endif()

 mark_as_advanced(CUNIT_INCLUDE_DIR CUNIT_LIBRARY)


fix path for program files

fix path for program files

--- cmake/FindVuzix.cmake
+++ cmake/FindVuzix.cmake
@@ -79,7 +79,7 @@
     endif()

     # Get desired program files directory
-    set(_PF86 "ProgramFiles(x86)")
+    set(_PF86 "Program Files(x86)")
     if(NOT "$ENV{${_PF86}}" STREQUAL "")
     # 32-bit dir: only set on win64
         file(TO_CMAKE_PATH "$ENV{_PF86}" _progfiles)


Fix git dirty revision buildinfo

Fix git dirty revision buildinfo

--- cmake/buildinfo.cmake
+++ cmake/buildinfo.cmake
@@ -35,8 +35,8 @@
     set(GIT_BRANCH "")
 else()
     execute_process(
-        COMMAND bash -c "git diff --quiet --exit-code || echo +"
-        OUTPUT_VARIABLE GIT_DIFF)
+        COMMAND git diff --quiet --exit-code
+        RESULT_VARIABLE GIT_DIFF)
     execute_process(
         COMMAND git describe --exact-match --tags
         OUTPUT_VARIABLE GIT_TAG ERROR_QUIET)
@@ -44,9 +44,14 @@
         COMMAND git rev-parse --abbrev-ref HEAD
         OUTPUT_VARIABLE GIT_BRANCH)

+    if(GIT_DIFF EQUAL 1)
+        set(GIT_DIRTY "+")
+    else()
+        set(GIT_DIRTY "")
+    endif()
+
     string(STRIP "${GIT_REV}" GIT_REV)
     string(SUBSTRING "${GIT_REV}" 1 7 GIT_REV)
-    string(STRIP "${GIT_DIFF}" GIT_DIFF)
     string(STRIP "${GIT_TAG}" GIT_TAG)
     string(STRIP "${GIT_BRANCH}" GIT_BRANCH)
 endif()
@@ -64,7 +69,7 @@
 {
     namespace buildinfo
     {
-        const char* BUILD_HASH = \"${GIT_REV}${GIT_DIFF}\";
+        const char* BUILD_HASH = \"${GIT_REV}${GIT_DIRTY}\";
         const char* BUILD_TAG = \"${GIT_TAG}\";
         const char* BUILD_BRANCH = \"${GIT_BRANCH}\";
         const char* BUILD_DATE = \"${BUILD_DATE}\";


MAINT: change runtime destination in CMake script.

--- cmake/do_macros.cmake
+++ cmake/do_macros.cmake
@@ -201,7 +201,7 @@
     # Specify where to install the static library.
     install(
       TARGETS DO_${DO_PROJECT_NAME}_${_library_name}
-      RUNTIME DESTINATION bin/DO/${DO_PROJECT_NAME} COMPONENT Libraries
+      RUNTIME DESTINATION bin COMPONENT Libraries
       LIBRARY DESTINATION lib/DO/${DO_PROJECT_NAME} COMPONENT Libraries
       ARCHIVE DESTINATION lib/DO/${DO_PROJECT_NAME} COMPONENT Libraries)
   else ()