Added individual error handling.

Added individual error handling.

--- CMake/MITKDashboardDriverScript.cmake
+++ CMake/MITKDashboardDriverScript.cmake
@@ -83,6 +83,10 @@

 set(CTEST_USE_LAUNCHERS 1)

+if(NOT DARTCLIENT_ERROR_FILE)
+  set(DARTCLIENT_ERROR_FILE "${CTEST_BINARY_DIRECTORY}/dartclient_error.txt")
+endif()
+
 if(empty_binary_directory)
   message("Directory ${CTEST_BINARY_DIRECTORY} cleaned !")
   ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
@@ -103,6 +107,8 @@
 # run_ctest macro
 #
 MACRO(run_ctest)
+  set(dartclient_error)
+
   ctest_start(${model})
   ctest_update(SOURCE "${CTEST_CHECKOUT_DIR}" RETURN_VALUE res)

@@ -129,7 +135,12 @@
 ")
   endif()

-  if (res GREATER 0 OR force_build)
+  if(NOT dartclient_error AND res LESS 0)
+    # update error
+    set(dartclient_error "Update or checkout error")
+  endif()
+
+  if(res GREATER 0 OR force_build)

     ctest_submit(PARTS Update)

@@ -140,7 +151,13 @@

     ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}"
       OPTIONS "-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}"
+      RETURN_VALUE res
     )
+
+    if(NOT dartclient_error AND res)
+      set(dartclient_error "SuperBuild configure error (code ${res})")
+    endif()
+
     ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}")
     ctest_submit(PARTS Configure)
     ctest_submit(FILES "${CTEST_BINARY_DIRECTORY}/Project.xml")
@@ -154,17 +171,32 @@
       foreach(superbuild_target ${SUPERBUILD_TARGETS})
         message("----------- [ Build ${superbuild_target} - SuperBuild ] -----------")
         set(CTEST_BUILD_TARGET "${superbuild_target}")
-        ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+        ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
+          RETURN_VALUE res
+          NUMBER_ERRORS num_errors
+          NUMBER_WARNINGS num_warnings)
         ctest_submit(PARTS Build)

+        if(NOT dartclient_error AND res)
+          set(dartclient_error "Build error for ${superbuild_target} (code ${res}): Warnings ${num_warnings}, Errors ${num_errors}")
+        elseif(NOT dartclient_error AND num_warnings)
+          set(dartclient_error "Warnings for ${superbuild_target}: ${num_warnings}")
+        endif()
+
+        # runs only tests that have a LABELS property matching "SuperBuild"
         ctest_test(
           BUILD "${CTEST_BINARY_DIRECTORY}"
           INCLUDE_LABEL "SuperBuild"
           PARALLEL_LEVEL 8
           EXCLUDE ${TEST_TO_EXCLUDE_REGEX}
+          RETURN_VALUE res
           )
-        # runs only tests that have a LABELS property matching "${subproject}"
+
         ctest_submit(PARTS Test)
+
+        if(NOT dartclient_error AND res)
+          set(dartclient_error "Test failures for ${superbuild_target} (code ${res})")
+        endif()
       endforeach()

       # HACK Unfortunately ctest_coverage ignores the build argument, back-up the original dirs
@@ -182,8 +214,17 @@

         # Build target
         set(CTEST_BUILD_TARGET "${external_project}")
-        ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+        ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
+          RETURN_VALUE res
+          NUMBER_ERRORS num_errors
+          NUMBER_WARNINGS num_warnings)
         ctest_submit(PARTS Build)
+
+        if(NOT dartclient_error AND res)
+          set(dartclient_error "Build error for ${external_project} (code ${res}): Warnings ${num_warnings}, Errors ${num_errors}")
+        elseif(NOT dartclient_error AND num_warnings)
+          set(dartclient_error "Warnings for ${external_project}: ${num_warnings}")
+        endif()

         # HACK Unfortunately ctest_coverage ignores the build argument, try to force it...
         file(READ "${CTEST_BINARY_DIRECTORY}/${external_project_build_dir}/CMakeFiles/TargetDirectories.txt" mitk_build_coverage_dirs)
@@ -191,16 +232,21 @@

         message("----------- [ Test ${external_project} ] -----------")

+        # runs only tests that have a LABELS property matching "${external_project}"
         ctest_test(
           BUILD "${CTEST_BINARY_DIRECTORY}/${external_project_build_dir}"
           APPEND
           INCLUDE_LABEL "${external_project}"
           PARALLEL_LEVEL 8
           EXCLUDE ${TEST_TO_EXCLUDE_REGEX}
+          RETURN_VALUE res
           )
-        # runs only tests that have a LABELS property matching "${external_project}"

         ctest_submit(PARTS Test)
+
+        if(NOT dartclient_error AND res)
+          set(dartclient_error "Test failures for ${external_project} (code ${res})")
+        endif()

         # Coverage per external project
         if (WITH_COVERAGE AND CTEST_COVERAGE_COMMAND)
@@ -226,18 +272,33 @@

     # build everything at superbuild level which has not yet been built
     set(CTEST_BUILD_TARGET)
-    ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+    ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
+      RETURN_VALUE res
+      NUMBER_ERRORS num_errors
+      NUMBER_WARNINGS num_warnings)
+
     ctest_submit(PARTS Build)
-
+
+    if(NOT dartclient_error AND res)
+      set(dartclient_error "Build error for SuperBuild (code ${res}): Warnings ${num_warnings}, Errors ${num_errors}")
+    elseif(NOT dartclient_error AND num_warnings)
+      set(dartclient_error "Warnings for SuperBuild: ${num_warnings}")
+    endif()
+
+    # runs only tests that have a LABELS property matching "SuperBuild"
     ctest_test(
       BUILD "${CTEST_BINARY_DIRECTORY}"
       INCLUDE_LABEL "SuperBuild"
       PARALLEL_LEVEL 8
       EXCLUDE ${TEST_TO_EXCLUDE_REGEX}
+      RETURN_VALUE res
       )
-    # runs only tests that have a LABELS property matching "${subproject}"
+
     ctest_submit(PARTS Test)

+    if(NOT dartclient_error AND res)
+      set(dartclient_error "Test failures for SuperBuild (code ${res})")
+    endif()

     set(build_dir "${CTEST_BINARY_DIRECTORY}/${PROJECT_BUILD_DIR}")

@@ -245,9 +306,14 @@
     # Configure target
     ctest_configure(BUILD "${build_dir}"
       OPTIONS "-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS}"
+      RETURN_VALUE res
     )
     ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}")
     ctest_submit(PARTS Configure)
+
+    if(NOT dartclient_error AND res)
+      set(dartclient_error "Configure error in ${build_dir} (code ${res})")
+    endif()

     foreach(subproject ${CTEST_PROJECT_SUBPROJECTS})
       set_property(GLOBAL PROPERTY SubProject ${subproject})
@@ -256,8 +322,17 @@

       # Build target
       set(CTEST_BUILD_TARGET "${subproject}")
-      ctest_build(BUILD "${build_dir}" APPEND)
+      ctest_build(BUILD "${build_dir}" APPEND
+        RETURN_VALUE res
+        NUMBER_ERRORS num_errors
+        NUMBER_WARNINGS num_warnings)
       ctest_submit(PARTS Build)
+
+      if(NOT dartclient_error AND res)
+        set(dartclient_error "Build error for ${subproject} (code ${res}): Warnings ${num_warnings}, Errors ${num_errors}")
+      elseif(NOT dartclient_error AND num_warnings)
+        set(dartclient_error "Warnings for ${subproject}: ${num_warnings}")
+      endif()
     endforeach()

     # Build the rest of the project
@@ -266,8 +341,17 @@

     message("----------- [ Build All ] -----------")
     set(CTEST_BUILD_TARGET)
-    ctest_build(BUILD "${build_dir}" APPEND)
+    ctest_build(BUILD "${build_dir}" APPEND
+      RETURN_VALUE res
+      NUMBER_ERRORS num_errors
+      NUMBER_WARNINGS num_warnings)
     ctest_submit(PARTS Build)
+
+    if(NOT dartclient_error AND res)
+      set(dartclient_error "Build error (code ${res}): Warnings ${num_warnings}, Errors ${num_errors}")
+    elseif(NOT dartclient_error AND num_warnings)
+      set(dartclient_error "Warnings: ${num_warnings}")
+    endif()

     # HACK Unfortunately ctest_coverage ignores the build argument, try to force it...
     file(READ ${build_dir}/CMakeFiles/TargetDirectories.txt mitk_build_coverage_dirs)
@@ -278,16 +362,21 @@
       set_property(GLOBAL PROPERTY Label ${subproject})
       message("----------- [ Test ${subproject} ] -----------")

+      # runs only tests that have a LABELS property matching "${subproject}"
       ctest_test(
         BUILD "${build_dir}"
         APPEND
         INCLUDE_LABEL "${subproject}"
         PARALLEL_LEVEL 8
         EXCLUDE ${TEST_TO_EXCLUDE_REGEX}
+        RETURN_VALUE res
         )
-      # runs only tests that have a LABELS property matching "${subproject}"

       ctest_submit(PARTS Test)
+
+      if(NOT dartclient_error AND res)
+        set(dartclient_error "Test failures for ${subproject} (code ${res})")
+      endif()

       # Coverage per sub-project
       if (WITH_COVERAGE AND CTEST_COVERAGE_COMMAND)
@@ -326,14 +415,24 @@

     # Global dynamic analysis ...
     if (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND)
-        message("----------- [ Global memcheck ] -----------")
-        ctest_memcheck(BUILD "${build_dir}")
-        ctest_submit(PARTS MemCheck)
-      endif ()
+      message("----------- [ Global memcheck ] -----------")
+      ctest_memcheck(BUILD "${build_dir}")
+      ctest_submit(PARTS MemCheck)
+    endif ()

     # Note should be at the end
     ctest_submit(PARTS Notes)

+  endif()
+
+  # Clear the CTEST_CHECKOUT_COMMAND variable to prevent continuous clients
+  # to try to checkout again
+  set(CTEST_CHECKOUT_COMMAND "")
+
+  if(dartclient_error)
+    file(WRITE ${DARTCLIENT_ERROR_FILE} "${dartclient_error}")
+  else()
+    file(REMOVE ${DARTCLIENT_ERROR_FILE})
   endif()
 endmacro()


COMP: Exclude MICROBIRD_TRACKER and US_TELEMED_SDK from build configuration "All".

--- CMake/mitkBuildConfigurationAll.cmake
+++ CMake/mitkBuildConfigurationAll.cmake
@@ -10,6 +10,7 @@
   SUPERBUILD

   KWSTYLE
+  MICROBIRD_TRACKER
   MICRON_TRACKER
   OPTITRACK_TRACKER
   TOF_KINECT
@@ -17,6 +18,7 @@
   TOF_MESASR4000
   TOF_PMDCAMBOARD
   TOF_PMDCAMCUBE
+  US_TELEMED_SDK
 )

 get_cmake_property(_cache_vars CACHE_VARIABLES)


[Build] Improved PythonLibs support on RedHat/CentOS/EPEL.

--- config/FindPythonLibsWrapper.cmake
+++ config/FindPythonLibsWrapper.cmake
@@ -2,8 +2,16 @@
 # script. Indeed, that latter does not work well on EPEL 5, where only the Python
 # static library is searched. In that latter case, the Python dynamic library is
 # searched, and the PYTHON_LIBRARIES variable re-set accordingly.
+# Moreover, on EPEL 5 and 6, only PYTHON_INCLUDE_PATH is defined, where as
+# PYTHON_INCLUDE_DIRS is expected to be set.
+
 #
+if (PYTHON_INCLUDE_PATH AND "${PYTHON_INCLUDE_DIRS}" STREQUAL "")
+  set (PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH} PARENT_SCOPE)
+  set (PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH})
+endif ()

+#
 if ("${PYTHON_LIBRARIES}" MATCHES "libpython[1-9.]*.a")
   # The PythonLibs finder has found only the static library
   message (STATUS "The Python static library has been found by the regular PythonLibs finder: ${PYTHON_LIBRARIES}")


cmake: now version is read from the VERSION file

Now, we manually have to update the VERSION file on new releases

--- cmake/Modules/GetVersion.cmake
+++ cmake/Modules/GetVersion.cmake
@@ -1,30 +1,9 @@
 # This file defines BH_VERSION_STRING, BH_VERSION_MAJOR, BH_VERSION_MINOR, and BH_VERSION_PATCH

-find_package(Git)
-set_package_properties(Git PROPERTIES DESCRIPTION "Distributed Version Control" URL "www.git-scm.com")
-set_package_properties(Git PROPERTIES TYPE OPTIONAL PURPOSE "For extracting the currect version of the Bohrium source")
+# Read version information from the VERSION file
+file(READ ${CMAKE_SOURCE_DIR}/VERSION BH_VERSION_STRING)

-# Let's try to extract the version using git
-if(GIT_FOUND)
-    execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags --match v[0-9]* --abbrev=0 --always
-            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-            OUTPUT_VARIABLE _VERSION_STRING
-            ERROR_QUIET
-            OUTPUT_STRIP_TRAILING_WHITESPACE)
-    if("${_VERSION_STRING}" MATCHES "v[0-9]+")
-        string(REPLACE "v" "" BH_VERSION_STRING ${_VERSION_STRING}) # removing the "v"
-    endif()
-endif()
-
-if (DEFINED BH_VERSION_STRING)
-    # On success, write to the version to file for later use
-    file(WRITE ${CMAKE_SOURCE_DIR}/VERSION ${BH_VERSION_STRING})
-else()
-    # The extraction failed, read the VERSION file
-    file(READ ${CMAKE_SOURCE_DIR}/VERSION BH_VERSION_STRING)
-endif()
-
-# Then we extract the MAJOR, MINOR, and PATCH version
+# Extract the MAJOR, MINOR, and PATCH version
 if("${BH_VERSION_STRING}" MATCHES "([0-9]+)\\.([0-9]+)")
     set(BH_VERSION_MAJOR ${CMAKE_MATCH_1})
     set(BH_VERSION_MINOR ${CMAKE_MATCH_2})
@@ -35,7 +14,7 @@
         set(BH_VERSION_PATCH 0)
     endif()
 else()
-    message(FATAL_ERROR "Extracting MAJOR, MINOR, and PATCH version failed." )
+    message(FATAL_ERROR "Extracting MAJOR, MINOR, and PATCH version failed. Please check the VERSION file." )
 endif()

 message(STATUS "BH_VERSION_STRING: ${BH_VERSION_STRING}")


Fixed typo in OpenCVDetectOpenCL.cmake that resulted in cmake not finding OpenCL on windows.

--- cmake/OpenCVDetectOpenCL.cmake
+++ cmake/OpenCVDetectOpenCL.cmake
@@ -27,7 +27,7 @@
             else()
                 set(OPENCL_LIB_SEARCH_PATH ${OPENCL_LIB_SEARCH_PATH} ${ENV_AMDSTREAMSDKROOT}/lib/x86_64)
             endif()
-        elseif(ENV_CUDAPATH AND WIN32)
+        elseif(ENV_CUDA_PATH AND WIN32)
             set(OPENCL_INCLUDE_SEARCH_PATH ${ENV_CUDA_PATH}/include)
             if(CMAKE_SIZEOF_VOID_P EQUAL 4)
                 set(OPENCL_LIB_SEARCH_PATH ${OPENCL_LIB_SEARCH_PATH} ${ENV_CUDA_PATH}/lib/Win32)


Refactor OSX archs for job config

Refactor OSX archs for job config

--- cmake/modules/DarwinSDKs.cmake
+++ cmake/modules/DarwinSDKs.cmake
@@ -10,7 +10,7 @@
 if(swift_build_osx)
   configure_sdk_darwin(
       OSX "OS X" "${SWIFT_DARWIN_DEPLOYMENT_VERSION_OSX}"
-      macosx macosx macosx "x86_64")
+      macosx macosx macosx "${SUPPORTED_OSX_ARCHS}")
   configure_target_variant(OSX-DA "OS X Debug+Asserts"   OSX DA "Debug+Asserts")
   configure_target_variant(OSX-RA "OS X Release+Asserts" OSX RA "Release+Asserts")
   configure_target_variant(OSX-R  "OS X Release"         OSX R  "Release")


Add an extra hint for assimp.

Add an extra hint for assimp.

If assimp has its own directory, e.g., ASSIMP_DIR=/opt/assimp/, then
this hint is needed.

--- cmake/modules/FindASSIMP.cmake
+++ cmake/modules/FindASSIMP.cmake
@@ -32,6 +32,7 @@

 DEAL_II_FIND_PATH(ASSIMP_INC assimp/defs.h
   HINTS ${ASSIMP_DIR}
+  PATH_SUFFIXES include
   )

 DEAL_II_PACKAGE_HANDLE(ASSIMP


Set OPENCL_FOUND.

Set OPENCL_FOUND.

--- cmake/modules/FindOpenCL.cmake
+++ cmake/modules/FindOpenCL.cmake
@@ -42,8 +42,10 @@
 IF(OPENCL_INCLUDE_DIR AND OPENCL_LIBRARY_DIR)
     MESSAGE(STATUS "OpenCL includes found at: ${OPENCL_INCLUDE_DIR}")
     MESSAGE(STATUS "OpenCL library found at: ${OPENCL_LIBRARY_DIR}")
+    SET(OPENCL_FOUND TRUE)
 ELSE(OPENCL_INCLUDE_DIR AND OPENCL_LIBRARY_DIR)
     MESSAGE(STATUS "Could NOT find OpenCL. Set OPENCL_INC_PATH and OPENCL_LIB_PATH to point to the OpenCL includes and libraries.")
+    SET(OPENCL_FOUND FALSE)
 ENDIF(OPENCL_INCLUDE_DIR AND OPENCL_LIBRARY_DIR)

 IF(OPENCL_CPP_INCLUDE_DIR)
@@ -51,6 +53,7 @@
 ENDIF(OPENCL_CPP_INCLUDE_DIR)

 MARK_AS_ADVANCED(
+    OPENCL_FOUND
     OPENCL_INCLUDE_DIR
     OPENCL_LIBRARY_DIR
     OPENCL_CPP_INCLUDE_DIR


Update ctkMacroBuildQtPlugin to fix CMake warning related to CMP0026

This commit fixes the warnings like the following:

// ----------------------
1>-- Configuring Loadable module: Transforms [qSlicerTransformsModuleExport.h]
1>CMake Warning (dev) at C:/D/P/SonoEQ-0-build/Slicer-build/CTK/CMake/ctkMacroBuildQtPlugin.cmake:168 (get_target_property):
1>  Policy CMP0026 is not set: Disallow use of the LOCATION target property.
1>  Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
1>  command to set the policy and suppress this warning.
1>  The LOCATION property should not be read from target
1>  "qSlicerAnnotationsModuleWidgetsPlugins".  Use the target name directly
1>  with add_custom_command, or use the generator expression $<TARGET_FILE>, as
1>  appropriate.
1>Call Stack (most recent call first):
1>  C:/D/P/SonoEQ-0-build/Slicer-build/CTK/CMake/ctkMacroBuildQtPlugin.cmake:181 (ctkMacroBuildQtPlugin)
1>  Modules/Loadable/Annotations/Widgets/DesignerPlugins/CMakeLists.txt:36 (ctkMacroBuildQtDesignerPlugin)
// ----------------------

--- CMake/ctkMacroBuildQtPlugin.cmake
+++ CMake/ctkMacroBuildQtPlugin.cmake
@@ -165,13 +165,12 @@
   # subdirectory (e.g. 'designer') but not deeper (e.g. designer/Debug), let's copy them.

   if(NOT CMAKE_CFG_INTDIR STREQUAL ".")
-    get_target_property(FILE_PATH ${lib_name} LOCATION)
     get_target_property(DIR_PATH ${lib_name} LIBRARY_OUTPUT_DIRECTORY)

     add_custom_command(
       TARGET ${lib_name}
       POST_BUILD
-      COMMAND ${CMAKE_COMMAND} -E copy ${FILE_PATH} ${DIR_PATH}/../${MY_PLUGIN_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${lib_name}${CMAKE_BUILD_TYPE}${CMAKE_SHARED_LIBRARY_SUFFIX}
+      COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE> ${DIR_PATH}/../${MY_PLUGIN_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${lib_name}${CMAKE_BUILD_TYPE}${CMAKE_SHARED_LIBRARY_SUFFIX}
       )
   endif()


Specify patch source for only MinGW

Specify patch source for only MinGW

A bit more clear.

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


add reference of commands

add reference of commands


Eliminated problem with __cxa_pure_virtual linker error with Arduino Core library (-Wl,--gc-sections was needed) Default C/C++ and linker flags are now persistent, stored in the cache by toolchain file

--- cmake/toolchains/Arduino.cmake
+++ cmake/toolchains/Arduino.cmake
@@ -3,12 +3,53 @@
 set(CMAKE_C_COMPILER   avr-gcc)
 set(CMAKE_CXX_COMPILER avr-g++)

-set(CMAKE_C_FLAGS   "-g -Os -w -ffunction-sections -fdata-sections")
-set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}  -fno-exceptions")
+#=============================================================================#
+#                              C Flags                                        #
+#=============================================================================#
+set(ARDUINO_C_FLAGS "-ffunction-sections -fdata-sections")
+set(CMAKE_C_FLAGS                "-g -Os       ${ARDUINO_C_FLAGS}" CACHE STRING "")
+set(CMAKE_C_FLAGS_DEBUG          "-g           ${ARDUINO_C_FLAGS}" CACHE STRING "")
+set(CMAKE_C_FLAGS_MINSIZEREL     "-Os -DNDEBUG ${ARDUINO_C_FLAGS}" CACHE STRING "")
+set(CMAKE_C_FLAGS_RELEASE        "-0s -DNDEBUG -w ${ARDUINO_C_FLAGS}" CACHE STRING "")
+set(CMAKE_C_FLAGS_RELWITHDEBINFO "-0s -g       -w ${ARDUINO_C_FLAGS}" CACHE STRING "")

-set(CMAKE_EXE_LINKER_FLAGS "-Os -Wl,--gc-sections")
-set(CMAKE_SHARED_LINKER_FLAGS)
-set(CMAKE_MODULE_LINKER_FLAGS)
+#=============================================================================#
+#                             C++ Flags                                       #
+#=============================================================================#
+set(ARDUINO_CXX_FLAGS "${ARDUINO_C_FLAGS} -fno-exceptions")
+set(CMAKE_CXX_FLAGS                "-g -Os       ${ARDUINO_CXX_FLAGS}" CACHE STRING "")
+set(CMAKE_CXX_FLAGS_DEBUG          "-g           ${ARDUINO_CXX_FLAGS}" CACHE STRING "")
+set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG ${ARDUINO_CXX_FLAGS}" CACHE STRING "")
+set(CMAKE_CXX_FLAGS_RELEASE        "-0s -DNDEBUG ${ARDUINO_CXX_FLAGS}" CACHE STRING "")
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-0s -g       ${ARDUINO_CXX_FLAGS}" CACHE STRING "")
+
+#=============================================================================#
+#                       Executable Linker Flags                               #
+#=============================================================================#
+set(ARDUINO_LINKER_FLAGS "-Wl,--gc-sections")
+set(CMAKE_EXE_LINKER_FLAGS                "${ARDUINO_LINKER_FLAGS}" CACHE STRING "")
+set(CMAKE_EXE_LINKER_FLAGS_DEBUG          "${ARDUINO_LINKER_FLAGS}" CACHE STRING "")
+set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL     "${ARDUINO_LINKER_FLAGS}" CACHE STRING "")
+set(CMAKE_EXE_LINKER_FLAGS_RELEASE        "${ARDUINO_LINKER_FLAGS}" CACHE STRING "")
+set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${ARDUINO_LINKER_FLAGS}" CACHE STRING "")
+
+#=============================================================================#
+#                       Shared Lbrary Linker Flags                            #
+#=============================================================================#
+set(CMAKE_SHARED_LINKER_FLAGS                ""                        CACHE STRING "")
+set(CMAKE_SHARED_LINKER_FLAGS_DEBUG          ""                        CACHE STRING "")
+set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL     ""                        CACHE STRING "")
+set(CMAKE_SHARED_LINKER_FLAGS_RELEASE        ""                        CACHE STRING "")
+set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO ""                        CACHE STRING "")
+
+set(CMAKE_MODULE_LINKER_FLAGS                ""                        CACHE STRING "")
+set(CMAKE_MODULE_LINKER_FLAGS_DEBUG          ""                        CACHE STRING "")
+set(CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL     ""                        CACHE STRING "")
+set(CMAKE_MODULE_LINKER_FLAGS_RELEASE        ""                        CACHE STRING "")
+set(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO ""                        CACHE STRING "")
+
+
+

 set(ARDUINO_PATHS)
 foreach(VERSION RANGE 22 1)


DMD windows/dos fix

DMD windows/dos fix

--- cmaked/CMakeDInformation.cmake
+++ cmaked/CMakeDInformation.cmake
@@ -155,8 +155,13 @@
     SET(CMAKE_D_LINK_EXECUTABLE
       "<CMAKE_D_COMPILER> <FLAGS> <CMAKE_D_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> ${CMAKE_OUTPUT_D_FLAG}<TARGET> <LINK_LIBRARIES>")
   ELSE(CMAKE_COMPILER_IS_GDC)
-    SET(CMAKE_D_LINK_EXECUTABLE
-      "gcc <FLAGS> <CMAKE_D_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -lphobos -lpthread -lm")
+    IF(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+      SET(CMAKE_D_LINK_EXECUTABLE
+	"gcc <FLAGS> <CMAKE_D_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -lphobos -lpthread -lm")
+    ELSE(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+      SET(CMAKE_D_LINK_EXECUTABLE
+	"<CMAKE_D_COMPILER> <FLAGS> <CMAKE_D_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> ${CMAKE_OUTPUT_D_FLAG}<TARGET> <LINK_LIBRARIES>")
+    ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
   ENDIF(CMAKE_COMPILER_IS_GDC)
 ENDIF(NOT CMAKE_D_LINK_EXECUTABLE)


Updated FindPython.cmake to make sure matplotlib is possible to use.

--- CMake/Modules/FindPython.cmake
+++ CMake/Modules/FindPython.cmake
@@ -12,15 +12,41 @@
 IF(PYTHON_INCLUDES AND PYTHON_LIBRARIES)
 	SET(CMAKE_REQUIRED_INCLUDES ${PYTHON_INCLUDES})
 	SET(CMAKE_REQUIRED_LIBRARIES ${PYTHON_LIBRARIES})
-	INCLUDE(CheckCXXSourceCompiles)
+	INCLUDE(CheckCXXSourceRuns)
 	UNSET(PYTHON_COMPILED CACHE)
-	CHECK_CXX_SOURCE_COMPILES(
+	CHECK_CXX_SOURCE_RUNS(
 		"
 		#include <Python.h>
 		#include <numpy/arrayobject.h>

+#if PY_MAJOR_VERSION >= 3
+		void* import_numpy(){
+			import_array();
+			return nullptr;
+		}
+#else
+		void import_numpy(){
+			import_array();
+		}
+#endif
+
 		int main(int argc, char **argv){
 			PyTuple_New(0);
+
+			Py_SetProgramName(\"plotting\");
+			Py_Initialize();
+			import_numpy();
+
+			PyObject *matplotlibname = PyString_FromString(\"matplotlib\");
+			PyObject *matplotlib = PyImport_Import(matplotlibname);
+			Py_DECREF(matplotlibname);
+			if(!matplotlib)
+				exit(1);
+
+			PyObject *pyplotname = PyString_FromString(\"matplotlib.pyplot\");
+			PyObject *pymod = PyImport_Import(pyplotname);
+			if(!pymod)
+				exit(1);

 			return 0;
 		}"


CMake: Pass __IOS__ to swig when building for iOS.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -455,6 +455,9 @@
     endif ()

     # Swig
+    if (IOS)
+        list (APPEND GENERATOR_OPTIONS -D__IOS__)
+    endif ()
     set(CMAKE_SWIG_FLAGS
         -namespace ${BIND_NAMESPACE}
         -fastdispatch


From Mathieu Marache, I needed to modify the FindCOLLADA.cmake to enable its compilation under macosx.

--- CMakeModules/FindCOLLADA.cmake
+++ CMakeModules/FindCOLLADA.cmake
@@ -49,6 +49,7 @@
     /usr/local/include
     /usr/local/include/colladadom
     /usr/local/include/collada-dom
+    /opt/local/include/collada-dom
     /usr/include/
     /usr/include/colladadom
     /usr/include/collada-dom
@@ -237,7 +238,7 @@
     )

     FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY
-        NAMES libboost_filesystem boost_filesystem libboost_filesystem-vc90-mt libboost_filesystem-vc100-mt
+        NAMES libboost_filesystem boost_filesystem boost_filesystem-mt libboost_filesystem-vc90-mt libboost_filesystem-vc100-mt
         PATHS
         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
@@ -245,7 +246,7 @@
     )

     FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY_DEBUG
-        NAMES libboost_filesystem-d boost_filesystem-d libboost_filesystem-vc90-mt-gd libboost_filesystem-vc100-mt-gd
+        NAMES libboost_filesystem-d boost_filesystem-d boost_filesystem-mt-d libboost_filesystem-vc90-mt-gd libboost_filesystem-vc100-mt-gd
         PATHS
         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
@@ -253,7 +254,7 @@
     )

     FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY
-        NAMES libboost_system boost_system libboost_system-vc90-mt libboost_system-vc100-mt
+        NAMES libboost_system boost_system boost_system-mt libboost_system-vc90-mt libboost_system-vc100-mt
         PATHS
         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
@@ -261,7 +262,7 @@
     )

     FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY_DEBUG
-        NAMES libboost_system-d boost_system-d libboost_system-vc90-mt-gd libboost_system-vc100-mt-gd
+        NAMES libboost_system-d boost_system-d boost_system-mt-d libboost_system-vc90-mt-gd libboost_system-vc100-mt-gd
         PATHS
         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw


CMake: Dependencies - fixup for static linkage

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -93,6 +93,7 @@
   -G ${CMAKE_GENERATOR}
   -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
   -DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
+  -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE # allow linking into a shared lib
   ${CROSS})

 # Set hardcoded path guesses for various platforms
@@ -167,8 +168,9 @@
             WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
         execute_process(COMMAND ${BUILD_COMMAND_COMMON}
             -DBUILD_SHARED_LIBS=${OGREDEPS_SHARED}
-            -DWITH_PNG=OFF
-            -DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE # tries to use it on iOS otherwise
+            -DCMAKE_DISABLE_FIND_PACKAGE_PNG=TRUE # disable third-party deps
+            -DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE
+            -DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE
             # workaround for broken iOS toolchain in freetype
             -DPROJECT_SOURCE_DIR=${PROJECT_BINARY_DIR}/freetype-2.10.1
             ${PROJECT_BINARY_DIR}/freetype-2.10.1
@@ -208,7 +210,6 @@
           -DASSIMP_NO_EXPORT=TRUE
           -DASSIMP_BUILD_OGRE_IMPORTER=OFF
           -DASSIMP_BUILD_ASSIMP_TOOLS=OFF
-          -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE # this will be linked into a shared lib
           ${PROJECT_BINARY_DIR}/assimp-5.0.1
           WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/assimp-5.0.1)
       execute_process(COMMAND ${CMAKE_COMMAND}


Fixed an error where older Boost versions were no longer found properly.

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -128,7 +128,7 @@
 set(Boost_ADDITIONAL_VERSIONS "1.51" "1.51.0" "1.50" "1.50.0" "1.49" "1.49.0" "1.48" "1.48.0" "1.47" "1.47.0" "1.46" "1.46.0" "1.45" "1.45.0" "1.44" "1.44.0" "1.42" "1.42.0" "1.41.0" "1.41" "1.40.0" "1.40")
 # Components that need linking (NB does not include header-only components like bind)
 set(OGRE_BOOST_COMPONENTS thread date_time)
-find_package(Boost QUIET)
+find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
 if (NOT Boost_FOUND)
         if(Boost_USE_STATIC_LIBS)
                 set(Boost_USE_STATIC_LIBS OFF)


ENH: ExternalData: Partly generalize hash algo/ext handling

Use private global variables _ExternalData_REGEX_(ALGO|EXT) to match the
possible hash algorithm names and extensions in regular expressions.
Note that we cannot yet use "file(<algo>)" instead of "cmake -E md5sum"
to compute hashes because it requires CMake >= 2.8.7.  Therefore we also
cannot yet allow other hash algorithms.  Leave a TODO comment.

Change-Id: I9e569432833fa9b754ba62b192179c783d4a6ebf

--- CMake/ExternalData.cmake
+++ CMake/ExternalData.cmake
@@ -282,18 +282,19 @@
 #-----------------------------------------------------------------------------
 # Private helper interface

+set(_ExternalData_REGEX_ALGO "MD5")
+set(_ExternalData_REGEX_EXT "md5")
 set(_ExternalData_SELF "${CMAKE_CURRENT_LIST_FILE}")
 get_filename_component(_ExternalData_SELF_DIR "${_ExternalData_SELF}" PATH)

 function(_ExternalData_compute_hash var_hash algo file)
-  if("${algo}" STREQUAL "MD5")
-    # TODO: Errors
+  if("${algo}" MATCHES "^${_ExternalData_REGEX_ALGO}$")
+    # TODO: Require CMake 2.8.7 to support other hashes with file(${algo} ...)
     execute_process(COMMAND "${CMAKE_COMMAND}" -E md5sum "${file}"
       OUTPUT_VARIABLE output)
     string(SUBSTRING "${output}" 0 32 hash)
     set("${var_hash}" "${hash}" PARENT_SCOPE)
   else()
-    # TODO: Other hashes.
     message(FATAL_ERROR "Hash algorithm ${algo} unimplemented.")
   endif()
 endfunction()
@@ -322,7 +323,7 @@
 endfunction()

 function(_ExternalData_link_content name var_ext)
-  if("${ExternalData_LINK_CONTENT}" MATCHES "^(MD5)$")
+  if("${ExternalData_LINK_CONTENT}" MATCHES "^(${_ExternalData_REGEX_ALGO})$")
     set(algo "${ExternalData_LINK_CONTENT}")
   else()
     message(FATAL_ERROR
@@ -332,7 +333,7 @@
   _ExternalData_compute_hash(hash "${algo}" "${name}")
   get_filename_component(dir "${name}" PATH)
   set(staged "${dir}/.ExternalData_${algo}_${hash}")
-  set(ext ".md5")
+  string(TOLOWER ".${algo}" ext)
   _ExternalData_atomic_write("${name}${ext}" "${hash}\n")
   file(RENAME "${name}" "${staged}")
   set("${var_ext}" "${ext}" PARENT_SCOPE)
@@ -561,7 +562,7 @@
 function(_ExternalData_arg_find_files pattern regex)
   file(GLOB globbed RELATIVE "${top_src}" "${top_src}/${pattern}*")
   foreach(entry IN LISTS globbed)
-    if("x${entry}" MATCHES "^x(.*)(\\.md5)$")
+    if("x${entry}" MATCHES "^x(.*)(\\.(${_ExternalData_REGEX_EXT}))$")
       set(relname "${CMAKE_MATCH_1}")
       set(alg "${CMAKE_MATCH_2}")
     else()
@@ -748,8 +749,8 @@
   file(READ "${name}${ext}" hash)
   string(STRIP "${hash}" hash)

-  if("${ext}" STREQUAL ".md5")
-    set(algo "MD5")
+  if("${ext}" MATCHES "^\\.(${_ExternalData_REGEX_EXT})$")
+    string(TOUPPER "${CMAKE_MATCH_1}" algo)
   else()
     message(FATAL_ERROR "Unknown hash algorithm extension \"${ext}\"")
   endif()


modules: output kit information in the module tree

Change-Id: I0b5489dcf4f8cc5197b72d53f1fbd569a1f2460e

--- CMake/vtkModuleTop.cmake
+++ CMake/vtkModuleTop.cmake
@@ -226,7 +226,12 @@
         set(_reason ", needed by ${_needed_by}.")
       endif()
     endif()
-    message(STATUS " * ${vtk-module}${_reason}")
+    if(VTK_ENABLE_KITS AND ${vtk-module}_KIT)
+      set(_kit " (kit: ${${vtk-module}_KIT})")
+    else()
+      set(_kit)
+    endif()
+    message(STATUS " * ${vtk-module}${_kit}${_reason}")
   endif()
 endforeach()


Removed option for VTK 5.10. Only on MacOS VTK 5.8 will be used now.

--- CMakeExternals/VTK.cmake
+++ CMakeExternals/VTK.cmake
@@ -46,15 +46,12 @@
      )
   endif()

-  option(MITK_USE_VTK_5_10_IN_SUPERBUILD "Use VTK 5.10 in MITK superbuild" OFF)
-  #use only VTK 5.8 in superbuild until all issues regarding VTK 5.10 are solved
-
-  if(MITK_USE_VTK_5_10_IN_SUPERBUILD)
+  if(APPLE)
+    set(VTK_URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/vtk-5.8.0.tar.gz)
+    set(VTK_URL_MD5 37b7297d02d647cc6ca95b38174cb41f)
+  else()
     set(VTK_URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/vtk-5.10.0.tar.gz)
     set(VTK_URL_MD5 a0363f78910f466ba8f1bd5ab5437cb9)
-  else()
-    set(VTK_URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/vtk-5.8.0.tar.gz)
-    set(VTK_URL_MD5 37b7297d02d647cc6ca95b38174cb41f)
   endif()

   ExternalProject_Add(${proj}


BUG: CMake 3.1 fix

BUG: CMake 3.1 fix

Change-Id: I73f66d0b27e7f6552bf2ed78a0a573fab4f4de5c

--- CMake/CppcheckTargets.cmake
+++ CMake/CppcheckTargets.cmake
@@ -280,6 +280,11 @@

     get_cppcheck_arg( ${_input} )

+    get_target_property(_imported_target "${_name}" IMPORTED)
+    if(_imported_target)
+      return()
+    endif()
+
     get_target_property(_cppcheck_sources "${_name}" SOURCES)
     set(_files)
     foreach(_source ${_cppcheck_sources})


ENH: GDAL needs libkml >= 1.3

ENH: GDAL needs libkml >= 1.3

--- CMake/External_libKML.cmake
+++ CMake/External_libKML.cmake
@@ -35,8 +35,8 @@

   ExternalProject_Add(${proj}
     PREFIX ${proj}
-    URL "https://libkml.googlecode.com/files/libkml-1.2.0.tar.gz"
-    URL_MD5 25d534437f971bf55a945608e39fea79
+    URL "http://ftp.de.debian.org/debian/pool/main/libk/libkml/libkml_1.3.0~r863.orig.tar.gz"
+    URL_MD5 211ed5fdf2dd45aeb9c0abc8e1fe42be
     BINARY_DIR ${LIBKML_SB_BUILD_DIR}
     INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
     CMAKE_CACHE_ARGS


COMP: create a cmake variable aggregating all third party activation option names

--- CMake/OTBModuleMacros.cmake
+++ CMake/OTBModuleMacros.cmake
@@ -68,11 +68,13 @@
   list(SORT OTB_MODULE_${otb-module-test}_DEPENDS) # Deterministic order.
 endmacro()

+set(OTB_MODULE_ACTIVATION_OPTION_LIST "")
 macro(otb_module_activation_option _option_desc _default)
   string(REGEX REPLACE "OTB(.*)" "OTB_USE_\\1" _option_name ${otb-module})
   string(TOUPPER ${_option_name} _option_name)
   option(${_option_name} ${_option_desc} ${_default})
   set(OTB_MODULE_${otb-module}_ACTIVATION_OPTION ${_option_name})
+  list(APPEND OTB_MODULE_ACTIVATION_OPTION_LIST ${_option_name})
 endmacro()

 macro(otb_module_check_name _name)


From Mattias Helsing, "" * Use the CPack ZIP generator on windows (WIN32) * Reformatted according to Philip Lowman's recent submissions"

--- CMakeModules/OsgCPack.cmake
+++ CMakeModules/OsgCPack.cmake
@@ -30,7 +30,6 @@
         SET(SYSTEM_NAME "win32")
     ENDIF()
 ENDIF()
-
 # Guess the compiler (is this desired for other platforms than windows?)
 IF(NOT DEFINED OSG_CPACK_COMPILER)
     INCLUDE(OsgDetermineCompiler)
@@ -40,9 +39,9 @@
 SET(OSG_CPACK_COMPILER "${OSG_COMPILER}" CACHE STRING "This ia short string (vc90, vc80sp1, gcc-4.3, ...) describing your compiler. The string is used for creating package filenames")

 IF(OSG_CPACK_COMPILER)
-    SET(OSG_CPACK_SYSTEM_SPEC_STRING ${SYSTEM_NAME}-${SYSTEM_ARCH}-${OSG_CPACK_COMPILER})
+  SET(OSG_CPACK_SYSTEM_SPEC_STRING ${SYSTEM_NAME}-${SYSTEM_ARCH}-${OSG_CPACK_COMPILER})
 ELSE()
-    SET(OSG_CPACK_SYSTEM_SPEC_STRING ${SYSTEM_NAME}-${SYSTEM_ARCH})
+  SET(OSG_CPACK_SYSTEM_SPEC_STRING ${SYSTEM_NAME}-${SYSTEM_ARCH})
 ENDIF()

@@ -50,7 +49,11 @@
 SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${OPENSCENEGRAPH_VERSION}")

 # these goes for all platforms. Setting these stops the CPack.cmake script from generating options about other package compression formats (.z .tz, etc.)
-SET(CPACK_GENERATOR "TGZ")
+IF(WIN32)
+    SET(CPACK_GENERATOR "ZIP")
+ELSE()
+    SET(CPACK_GENERATOR "TGZ")
+ENDIF()
 SET(CPACK_SOURCE_GENERATOR "TGZ")

@@ -81,10 +84,6 @@
 SET(PACKAGE_ALL_TARGETNAME "${PACKAGE_TARGET_PREFIX}ALL")
 ADD_CUSTOM_TARGET(${PACKAGE_ALL_TARGETNAME})

-#=============================
-# Macro:
-#    GENERATE_PACKAGING_TARGET()
-#
 MACRO(GENERATE_PACKAGING_TARGET package_name)
     SET(CPACK_PACKAGE_NAME ${package_name})

@@ -103,10 +102,17 @@
     SET(PACKAGE_TARGETNAME "${PACKAGE_TARGET_PREFIX}${package_name}")

     # This is naive and will probably need fixing eventually
-    IF(WIN32)
+    IF(MSVC)
         SET(MOVE_COMMAND "move")
     ELSE()
         SET(MOVE_COMMAND "mv")
+    ENDIF()
+
+    # Set in and out archive filenames. Windows = zip, others = tar.gz
+    IF(WIN32)
+        SET(ARCHIVE_EXT "zip")
+    ELSE()
+        SET(ARCHIVE_EXT "tar.gz")
     ENDIF()

     # Create a target that creates the current package
@@ -114,20 +120,18 @@
     ADD_CUSTOM_TARGET(${PACKAGE_TARGETNAME})
     ADD_CUSTOM_COMMAND(TARGET ${PACKAGE_TARGETNAME}
         COMMAND ${CMAKE_CPACK_COMMAND} -C ${OSG_CPACK_CONFIGURATION} --config ${OpenSceneGraph_BINARY_DIR}/CPackConfig-${package_name}.cmake
-        COMMAND "${MOVE_COMMAND}" "${CPACK_PACKAGE_FILE_NAME}.tar.gz" "${OSG_PACKAGE_FILE_NAME}.tar.gz"
-        COMMAND ${CMAKE_COMMAND} -E echo "renamed ${CPACK_PACKAGE_FILE_NAME}.tar.gz -> ${OSG_PACKAGE_FILE_NAME}.tar.gz"
+        COMMAND "${MOVE_COMMAND}" "${CPACK_PACKAGE_FILE_NAME}.${ARCHIVE_EXT}" "${OSG_PACKAGE_FILE_NAME}.${ARCHIVE_EXT}"
+        COMMAND ${CMAKE_COMMAND} -E echo "renamed ${CPACK_PACKAGE_FILE_NAME}.${ARCHIVE_EXT} -> ${OSG_PACKAGE_FILE_NAME}.${ARCHIVE_EXT}"
         COMMENT "Run CPack packaging for ${package_name}..."
     )
     # Add the exact same custom command to the all package generating target.
     # I can't use add_dependencies to do this because it would allow parallell building of packages so am going brute here
     ADD_CUSTOM_COMMAND(TARGET ${PACKAGE_ALL_TARGETNAME}
         COMMAND ${CMAKE_CPACK_COMMAND} -C ${OSG_CPACK_CONFIGURATION} --config ${OpenSceneGraph_BINARY_DIR}/CPackConfig-${package_name}.cmake
-        COMMAND "${MOVE_COMMAND}" "${CPACK_PACKAGE_FILE_NAME}.tar.gz" "${OSG_PACKAGE_FILE_NAME}.tar.gz"
-        COMMAND ${CMAKE_COMMAND} -E echo "renamed ${CPACK_PACKAGE_FILE_NAME}.tar.gz -> ${OSG_PACKAGE_FILE_NAME}.tar.gz"
+        COMMAND "${MOVE_COMMAND}" "${CPACK_PACKAGE_FILE_NAME}.${ARCHIVE_EXT}" "${OSG_PACKAGE_FILE_NAME}.${ARCHIVE_EXT}"
+        COMMAND ${CMAKE_COMMAND} -E echo "renamed ${CPACK_PACKAGE_FILE_NAME}.${ARCHIVE_EXT} -> ${OSG_PACKAGE_FILE_NAME}.${ARCHIVE_EXT}"
     )
 ENDMACRO(GENERATE_PACKAGING_TARGET)
-#
-#=============================

 # Create configs and targets for a package including all components
 SET(OSG_CPACK_COMPONENT ALL)


cmake: added forgot hgid in version string

--- CMakeModules/hgscript.cmake
+++ CMakeModules/hgscript.cmake
@@ -3,7 +3,7 @@
 if (MERCURIAL_FOUND)
   MERCURIAL_HG_INFO(${TOP_SOURCE_DIR} THIS)
   MESSAGE("Current revision is ${THIS_HG_ID}")
-  set (THIS_HG_ID "${THIS_HG_ID}")
+  set (THIS_HG_ID "hgid: ${THIS_HG_ID}")
 else(MERCURIAL_FOUND)
   set (THIS_HG_ID)
 endif(MERCURIAL_FOUND)


Restore vtkWrappingPython for matplotlib.

This module uses vtkPython.h, and thus still depends on
vtkWrappingPython.

Change-Id: I9493e0297f9e88bbd338a4cd7084982e547041ec

--- Rendering/Matplotlib/module.cmake
+++ Rendering/Matplotlib/module.cmake
@@ -4,6 +4,7 @@
   DEPENDS
     vtkImagingCore
     vtkRenderingCore
+    vtkWrappingPython
   TEST_DEPENDS
     vtkCommonColor
     vtkInteractionImage


Add make function to install absolute target symlink.

--- functions.cmake
+++ functions.cmake
@@ -558,8 +558,12 @@
     install(FILES "target/${NAME}-jar-with-dependencies.jar" DESTINATION lib/jars/)
 endfunction()

+function(install_absolute_symlink TARGET LINK)
+    install(CODE "execute_process(COMMAND ln -sf ${TARGET} \$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${LINK})")
+endfunction(install_absolute_symlink)
+
 function(install_symlink TARGET LINK)
-    install(CODE "execute_process(COMMAND ln -sf ${CMAKE_INSTALL_PREFIX}/${TARGET} \$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${LINK})")
+    install_absolute_symlink(${CMAKE_INSTALL_PREFIX}/${TARGET} ${LINK})
 endfunction(install_symlink)

 function(add_extra_projects)


Turn off fuchsia clang-tidy checks.

Turn off fuchsia clang-tidy checks.

--- cmake/Modules/LightStepClangTidy.cmake
+++ cmake/Modules/LightStepClangTidy.cmake
@@ -6,7 +6,7 @@
   message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}")
   set(DO_CLANG_TIDY "${CLANG_TIDY_EXE}"
 "-checks=*,\
--fuchsia-*,
+-fuchsia-*,\
 -clang-analyzer-alpha.*,\
 -llvm-include-order,\
 -google-runtime-references,\


Fixed indentation

Fixed indentation

--- cmake/common/check_configuration.cmake
+++ cmake/common/check_configuration.cmake
@@ -26,7 +26,7 @@
             set(HAVE_CXX11 0)
             check_cxx_compiler_flag(-std=c++0x SUPPORTS_CXX0X)
             if(SUPPORTS_CXX0X)
-            add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-std=c++0x>)
+                add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-std=c++0x>)
                 set(HAVE_CXX0X 1)
             else()
                 set(HAVE_CXX0X 0)


Disable readline requirement on Android/iOS. Only used in the pg binary to show command history whereas we are only interested in the library.

--- cmake/projects/PostgreSQL/hunter.cmake
+++ cmake/projects/PostgreSQL/hunter.cmake
@@ -20,6 +20,14 @@
     b82ddcee4644ef42f3a69ee93916afa448d178c4
 )

+if (ANDROID OR IOS)
+  hunter_cmake_args(
+      PostgreSQL
+      CMAKE_ARGS
+          EXTRA_FLAGS=--without-readline
+  )
+endif()
+
 hunter_configuration_types(PostgreSQL CONFIGURATION_TYPES Release)
 hunter_pick_scheme(DEFAULT url_sha1_autotools)
 hunter_cacheable(PostgreSQL)


ogre.cmake: Search in the right PATH_SUFFIX

This makes it work on ubuntu 14.04

Change-Id: I7df51eca7d86dafdaf379d3379451f44a51e8490
Reviewed-on: http://gerrit.aldebaran.lan/50943
Tested-by: gerrit
Reviewed-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>
Reviewed-by: pdaouadi <fc1eb3334d3fdad315bae23aa166bc70bd434067@aldebaran-robotics.com>
Tested-by: pdaouadi <fc1eb3334d3fdad315bae23aa166bc70bd434067@aldebaran-robotics.com>

--- cmake/qibuild/modules/ogre-tools.cmake
+++ cmake/qibuild/modules/ogre-tools.cmake
@@ -43,7 +43,7 @@
   set(_backup ${CMAKE_FIND_LIBRARY_PREFIXES})
   set(CMAKE_FIND_LIBRARY_PREFIXES "")
   find_library(_ogre_plugin NAMES ${ARG_RENDER_PLUGIN}
-                            PATH_SUFFIXES "OGRE")
+                            PATH_SUFFIXES "OGRE" "OGRE-1.9.0")
   set(CMAKE_FIND_LIBRARY_PREFIXES ${_backup})

   if(NOT _ogre_plugin)


BUG: Don't set VTK_CMAKE_EXTENSIONS_DIR or VTK_BUILD_SETTINGS_FILE for CMake 1.4.

--- vtkGenerateVTKConfig.cmake
+++ vtkGenerateVTKConfig.cmake
@@ -24,7 +24,9 @@
 SET(VTK_USE_FILE ${VTK_BINARY_DIR}/UseVTK.cmake)

 # The build settings file.
-SET(VTK_BUILD_SETTINGS_FILE ${VTK_BINARY_DIR}/VTKBuildSettings.cmake)
+IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
+  SET(VTK_BUILD_SETTINGS_FILE ${VTK_BINARY_DIR}/VTKBuildSettings.cmake)
+ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)

 # Library directory.
 SET(VTK_LIBRARY_DIRS_CONFIG ${VTK_LIBRARY_PATH})
@@ -76,7 +78,9 @@
 ENDIF(VTK_USE_PARALLEL)

 # CMake extension module directory.
-SET(VTK_CMAKE_EXTENSIONS_DIR_CONFIG ${VTK_SOURCE_DIR}/CMake)
+IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
+  SET(VTK_CMAKE_EXTENSIONS_DIR_CONFIG ${VTK_SOURCE_DIR}/CMake)
+ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)

 #-----------------------------------------------------------------------------
 # Configure VTKConfig.cmake for the build tree.


Rephrase warning for missing dependency

Rephrase warning for missing dependency

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -48,7 +48,7 @@
     include_directories(SYSTEM ${GLOG_INCLUDE_DIRS})
     list(APPEND Caffe2_DEPENDENCY_LIBS ${GLOG_LIBRARIES})
   else()
-    message(WARNING "Not compiling with glog. Suppress future warnings with -DUSE_GLOG=OFF")
+    message(WARNING "Not compiling with glog. Suppress this warning with -DUSE_GLOG=OFF")
     set(USE_GLOG OFF)
   endif()
 endif()
@@ -61,7 +61,7 @@
     include_directories(SYSTEM ${GFLAGS_INCLUDE_DIRS})
     list(APPEND Caffe2_DEPENDENCY_LIBS ${GFLAGS_LIBRARIES})
   else()
-    message(WARNING "Not compiling with gflags.  Suppress future warnings with -DUSE_GFLAGS=OFF")
+    message(WARNING "Not compiling with gflags. Suppress this warning with -DUSE_GFLAGS=OFF")
     set(USE_GFLAGS OFF)
   endif()
 endif()
@@ -81,7 +81,7 @@
     include_directories(SYSTEM ${LMDB_INCLUDE_DIR})
     list(APPEND Caffe2_DEPENDENCY_LIBS ${LMDB_LIBRARIES})
   else()
-    message(WARNING "Not compiling with LMDB. Suppress future warnings with -DUSE_LMDB=OFF")
+    message(WARNING "Not compiling with LMDB. Suppress this warning with -DUSE_LMDB=OFF")
     set(USE_LMDB OFF)
   endif()
 endif()
@@ -100,12 +100,12 @@
       include_directories(SYSTEM ${Snappy_INCLUDE_DIR})
       list(APPEND Caffe2_DEPENDENCY_LIBS ${Snappy_LIBRARIES})
     else()
-      message(WARNING "Not compiling with LevelDB. Suppress future warnings with -DUSE_LEVELDB=OFF")
+      message(WARNING "Not compiling with LevelDB. Suppress this warning with -DUSE_LEVELDB=OFF")
       set(USE_LEVELDB OFF)
     endif()

   else()
-    message(WARNING "Not compiling with LevelDB. Suppress future warnings with -DUSE_LEVELDB=OFF")
+    message(WARNING "Not compiling with LevelDB. Suppress this warning with -DUSE_LEVELDB=OFF")
     set(USE_LEVELDB OFF)
   endif()

@@ -124,7 +124,7 @@
     list(APPEND Caffe2_DEPENDENCY_LIBS ${OpenCV_LIBS})
     message(STATUS "OpenCV found (${OpenCV_CONFIG_PATH})")
   else()
-    message(WARNING "Not compiling with OpenCV. Suppress future warnings with -DUSE_OPENCV=OFF")
+    message(WARNING "Not compiling with OpenCV. Suppress this warning with -DUSE_OPENCV=OFF")
     set(USE_OPENCV OFF)
   endif()
 endif()
@@ -156,7 +156,7 @@
     list(APPEND Caffe2_DEPENDENCY_LIBS ${MPI_CXX_LIBRARIES})
     set(CMAKE_EXE_LINKER_FLAGS ${MPI_CXX_LINK_FLAGS})
   else()
-    message(WARNING "Not compiling with MPI. Suppress future warnings with -DUSE_MPI=OFF")
+    message(WARNING "Not compiling with MPI. Suppress this warning with -DUSE_MPI=OFF")
     set(USE_MPI OFF)
   endif()
 endif()
@@ -170,7 +170,7 @@
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
   else()
-    message(WARNING "Not compiling with OpenMP. Suppress future warnings with -DUSE_OPENMP=OFF")
+    message(WARNING "Not compiling with OpenMP. Suppress this warning with -DUSE_OPENMP=OFF")
     set(USE_OPENMP OFF)
   endif()
 endif()
@@ -186,7 +186,7 @@
       list(APPEND Caffe2_DEPENDENCY_LIBS ${CUDNN_LIBRARIES})
     endif()
   else()
-    message(WARNING "Not compiling with CUDA. Suppress future warnings with -DUSE_CUDA=OFF")
+    message(WARNING "Not compiling with CUDA. Suppress this warning with -DUSE_CUDA=OFF")
     set(USE_CUDA OFF)
   endif()
 endif()


Update environment property handling for tests

--- cmake/DevBaseMacro.cmake
+++ cmake/DevBaseMacro.cmake
@@ -236,11 +236,10 @@
         string(REPLACE ";" ":" PATH_STRING "${PATH_STRING}")
     endif()

-    set_property(TEST ${TEST_EXE_NAME}
-        PROPERTY
+    set_tests_properties(${TEST_EXE_NAME}
+        PROPERTIES
             ENVIRONMENT
-                PATH=${PATH_STRING}
-                ${ADD_UNIT_TEST_ENVIRONMENT}
+                "PATH=${PATH_STRING};${ADD_UNIT_TEST_ENVIRONMENT}"
     )
 endmacro()


Removed unnecessary MSVC check.

Removed unnecessary MSVC check.

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -159,9 +159,9 @@
   else(EIGEN_COVERAGE_TESTING)
     set(COVERAGE_FLAGS "")
   endif(EIGEN_COVERAGE_TESTING)
-  if((EIGEN_TEST_RVALUE_REF_SUPPORT OR EIGEN_TEST_C++0x) AND NOT MSVC)
+  if(EIGEN_TEST_RVALUE_REF_SUPPORT OR EIGEN_TEST_C++0x)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
-  endif((EIGEN_TEST_RVALUE_REF_SUPPORT OR EIGEN_TEST_C++0x) AND NOT MSVC)
+  endif(EIGEN_TEST_RVALUE_REF_SUPPORT OR EIGEN_TEST_C++0x)
   if(CMAKE_SYSTEM_NAME MATCHES Linux)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_FLAGS} -g2")
     set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COVERAGE_FLAGS} -O2 -g2")


exclude python plugins from ALL

exclude python plugins from ALL

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -120,9 +120,12 @@
 	augeas
 	journald
 	jni
+	)
+
+set (PLUGINS_PREVIEW
 	python
 	python2
-	)
+    )

 #
 # force all plugins


Fixed Cmake build by using LIBMAGIC_DIR

Fixed Cmake build by using LIBMAGIC_DIR

--- cmake/FindLibMagic.cmake
+++ cmake/FindLibMagic.cmake
@@ -1,6 +1,10 @@
-FIND_PATH(LIBMAGIC_INCLUDE_DIR magic.h)
+FIND_PATH(LIBMAGIC_INCLUDE_DIR magic.h
+    HINTS $ENV{LIBMAGIC_DIR}/include
+)

-FIND_LIBRARY(LIBMAGIC_LIBRARY NAMES magic)
+FIND_LIBRARY(LIBMAGIC_LIBRARY NAMES magic
+    HINTS $ENV{LIBMAGIC_DIR}/lib64 $ENV{LIBMAGIC_DIR}/lib
+)

 IF (LIBMAGIC_INCLUDE_DIR AND LIBMAGIC_LIBRARY)
     SET(LIBMAGIC_FOUND TRUE)
@@ -20,4 +24,3 @@
         MESSAGE(FATAL_ERROR "Could not find libmagic")
     ENDIF (LibMagic_FIND_REQUIRED)
 ENDIF (LIBMAGIC_FOUND)
-


New dev version suffix 0.9.3dev.

New dev version suffix 0.9.3dev.

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -27,10 +27,10 @@
  #
  #################################################################################

-set(IVW_VERSION 0.9.3)
+set(IVW_VERSION 0.9.3dev)
 set(IVW_MAJOR_VERSION 0)
 set(IVW_MINOR_VERSION 9)
-set(IVW_PATCH_VERSION 3)
+set(IVW_PATCH_VERSION 3dev)

 set_property(GLOBAL PROPERTY USE_FOLDERS On)
 set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER cmake)


CMake: /ZI is only available in the compiler targeting x86; this compiler option is not available in the compilers targeting x64 or ARM processors. Does, using /Zi instead.

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -176,9 +176,9 @@
     if(WIN32)
         if(MSVC)
             set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD")
-            set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd /ZI")
+            set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd /Zi")
             set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MD")
-            set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MDd /ZI")
+            set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MDd /Zi")
         endif(MSVC)
     endif()
 else()


CMake: MSVC:  Added better option to set iterator debug level. (Based on martins commit earlier)

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -39,10 +39,6 @@
         message(FATAL_ERROR "Inviwo requires C++11 features. "
                 "You need at least Visual Studio 12 (Microsoft Visual Studio 2013)")
     endif()
-    option(IVW_MSVC_DISABLE_ITERATOR_DEBUGGING "Disable Visual Stuidios Iterator debugging tests. (Requires QT built with the define _ITERATOR_DEBUG_LEVEL=0)" off)
-    if(IVW_MSVC_DISABLE_ITERATOR_DEBUGGING)
-        add_definitions(-D_ITERATOR_DEBUG_LEVEL=0)
-    endif()
 else()
     include(CheckCXXCompilerFlag)
     CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
@@ -224,15 +220,6 @@
 option(IVW_PROFILING "Enable profiling" OFF)

 #--------------------------------------------------------------------
-# Iterator debug level in Visual Studio
-# https://msdn.microsoft.com/en-us/library/hh697468.aspx
-# This does unfortunately _NOT_ work without recompiling Qt every time you change this flag
-#if(WIN32 AND MSVC)
-#    set(IVW_ITERATOR_DEBUG_LEVEL "2" CACHE STRING "Iterator debug level (IDL, default=2). IDL=0: Disables checked iterators and disables iterator debugging. IDL=1: Enables checked iterators and disables iterator debugging. IDL=2: Enables iterator debugging.")
-#    set_property(CACHE IVW_ITERATOR_DEBUG_LEVEL PROPERTY STRINGS 0 1 2)
-#endif()
-
-#--------------------------------------------------------------------
 # Build unittest for all modules
 include(${CMAKE_CURRENT_LIST_DIR}/unittests.cmake)

@@ -294,8 +281,10 @@

     # set iterator debug level (default=2)
     # https://msdn.microsoft.com/en-us/library/hh697468.aspx
-    ## This does unfortunately _NOT_ work without recompiling Qt every time you change this flag
-    #set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_ITERATOR_DEBUG_LEVEL=${IVW_ITERATOR_DEBUG_LEVEL}")
+
+    set(IVW_ITERATOR_DEBUG_LEVEL "2" CACHE STRING "Iterator debug level (IDL, default=2). IDL=0: Disables checked iterators and disables iterator debugging. IDL=1: Enables checked iterators and disables iterator debugging. IDL=2: Enables iterator debugging. Note: QT needs to be built with the same flag")
+    set_property(CACHE IVW_ITERATOR_DEBUG_LEVEL PROPERTY STRINGS 0 1 2)
+    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_ITERATOR_DEBUG_LEVEL=${IVW_ITERATOR_DEBUG_LEVEL}")

     # MSVC Variable checks and include redist in packs


CMake: Set cmake_cxx_standard

CMake: Set cmake_cxx_standard

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -45,7 +45,9 @@
     include(CheckCXXCompilerFlag)
     CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
     if(COMPILER_SUPPORTS_CXX14)
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
+        set(CMAKE_CXX_STANDARD 14)
+        set(CMAKE_CXX_STANDARD_REQUIRED ON)
+        set(CMAKE_CXX_EXTENSIONS OFF)
     else()
         message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++14 support. "
                 "Please use a different C++ compiler.")


copy includes in build directory

copy includes in build directory

--- cmake/libbitcrypto.cmake
+++ cmake/libbitcrypto.cmake
@@ -25,6 +25,17 @@
 endif (WIN32)

+foreach(HEADER ${HEADERS})
+    add_custom_command(
+        TARGET bitcrypto
+        POST_BUILD
+        COMMAND ${CMAKE_COMMAND}
+        ARGS -E copy ${CMAKE_SOURCE_DIR}/src/${HEADER} ${CMAKE_BINARY_DIR}/include/bitcrypto
+)
+endforeach(HEADER )
+
+
+
 file(GLOB SECP256K1_HEADERS
     "${PROJECT_BINARY_DIR}/secp256k1/include/*"
 )


Added additional NDK variables to the Android build options

--- cmake/dev/eprosima_libraries.cmake
+++ cmake/dev/eprosima_libraries.cmake
@@ -30,6 +30,16 @@
                     "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}"
                     "-DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL}"
                     "-DANDROID_TOOLCHAIN=${ANDROID_TOOLCHAIN}"
+                    "-DANDROID_PLATFORM=${ANDROID_PLATFORM}"
+                    "-DANDROID_STL=${ANDROID_STL}"
+                    "-DANDROID_PIE=${ANDROID_PIE}"
+                    "-DANDROID_CPP_FEATURES=${ANDROID_CPP_FEATURES}"
+                    "-DANDROID_ALLOW_UNDEFINED_SYMBOLS=${ANDROID_ALLOW_UNDEFINED_SYMBOLS}"
+                    "-DANDROID_ARM_MODE=${ANDROID_ARM_MODE}"
+                    "-DANDROID_ARM_NEON=${ANDROID_ARM_NEON}"
+                    "-DANDROID_DISABLE_NO_EXECUTE=${ANDROID_DISABLE_NO_EXECUTE}"
+                    "-DANDROID_DISABLE_RELRO=${ANDROID_DISABLE_RELRO}"
+                    "-DANDROID_DISABLE_FORMAT_STRING_CHECKS=${ANDROID_DISABLE_FORMAT_STRING_CHECKS}"
                     )
             endif()


update unity version

update unity version

--- cmake/firebase_unity_version.cmake
+++ cmake/firebase_unity_version.cmake
@@ -14,7 +14,7 @@

 # This file defines the version numbers used by the Firebase Unity SDK.

-set(FIREBASE_UNITY_SDK_VERSION "8.1.0"
+set(FIREBASE_UNITY_SDK_VERSION "8.5.0"
     CACHE STRING "The version of the Unity SDK, used in the names of files.")

 set(FIREBASE_IOS_POD_VERSION "8.3.0"


Improved error message on wrong exit code in test driver

--- cmake/modules/RootTestDriver.cmake
+++ cmake/modules/RootTestDriver.cmake
@@ -181,9 +181,9 @@
     endif()

     if(DEFINED RC AND (NOT "${_rc}" STREQUAL "${RC}"))
-      message(FATAL_ERROR "error code: ${_rc}")
+      message(FATAL_ERROR "got exit code ${_rc} but expected ${RC}")
     elseif(NOT DEFINED RC AND _rc)
-      message(FATAL_ERROR "error code: ${_rc}")
+      message(FATAL_ERROR "got exit code ${_rc} but expected 0")
     endif()

     if(CNVCMD)


mbed: cmake file cleaning

mbed: cmake file cleaning

libtuv-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com

--- cmake/option/option_arm-mbed.cmake
+++ cmake/option/option_arm-mbed.cmake
@@ -42,7 +42,6 @@
           "-mcpu=cortex-m4"
           "-mthumb"
           "-mlittle-endian"
-          "-D__MBED_K64F__"
           )
     if(NOT DEFINED TARGET_SYSTEMROOT)
       set(TARGET_SYSTEMROOT "${CMAKE_SOURCE_DIR}/targets/mbedk64f")


Switch to abs suffix to match codewarrior

--- toolchain/Platform/Generic-chc12.cmake
+++ toolchain/Platform/Generic-chc12.cmake
@@ -55,7 +55,7 @@
 SET (CMAKE_STATIC_LIBRARY_PREFIX                     "")
 SET (CMAKE_STATIC_LIBRARY_SUFFIX                     ".lib")
 SET (CMAKE_LINK_LIBRARY_SUFFIX                        ".lib")
-SET (CMAKE_EXECUTABLE_SUFFIX                         ".elf")
+SET (CMAKE_EXECUTABLE_SUFFIX                         ".abs")

 #
 # Default options applied to all tool invocations


New version: 0.3.0

New version: 0.3.0

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


Updated it to the ubuntu generated file instead of the Mac generated file

--- build/cmake_package_files/CppUTestConfigVersion.cmake
+++ build/cmake_package_files/CppUTestConfigVersion.cmake
@@ -7,42 +7,28 @@
 # PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version,
 # but only if the requested major version is the same as the current one.
 # The variable CVF_VERSION must be set before calling configure_file().
-
-
 set(PACKAGE_VERSION "3.8")
-
 if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
   set(PACKAGE_VERSION_COMPATIBLE FALSE)
 else()
-
   if("3.8" MATCHES "^([0-9]+)\\.")
     set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
   else()
     set(CVF_VERSION_MAJOR "3.8")
   endif()
-
   if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR)
     set(PACKAGE_VERSION_COMPATIBLE TRUE)
   else()
     set(PACKAGE_VERSION_COMPATIBLE FALSE)
   endif()
-
   if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
       set(PACKAGE_VERSION_EXACT TRUE)
   endif()
 endif()
-
-
-# if the installed project requested no architecture check, don't perform the check
-if("FALSE")
-  return()
-endif()
-
 # if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
 if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
-  return()
+   return()
 endif()
-
 # check that the installed version has the same 32/64bit-ness as the one which is currently searching:
 if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8")
   math(EXPR installedBits "8 * 8")


Configure without Stellar and Tetgen.

Configure without Stellar and Tetgen.

--- SlicerVmtk4/SuperBuild/VMTK.cmake
+++ SlicerVmtk4/SuperBuild/VMTK.cmake
@@ -45,7 +45,9 @@
       -DVMTK_WITH_LIBRARY_VERSION:BOOL=OFF
       -DVTK_VMTK_IN_SLICER4:BOOL=ON
       # we do not want tetgen..
-      -DVMTK_BUILD_TETGEN:BOOL=OFF
+      -DVTK_VMTK_BUILD_TETGEN:BOOL=OFF
+      # we not want stellar..
+      -DVTK_VMTK_BUILD_STELLAR:BOOL=OFF
       # we want the vmtk scripts :)
       -DVMTK_SCRIPTS_ENABLED:BOOL=ON
       # we do not want cocoa, go away :)


boards: Run the combined an547 hex in qemu

Zephyr will try to run the `zephyr.elf` file by default. This is
problematic for any `..._ns` target, as they all need to boot through
[mcuboot and] TF-M. They simply hardfault without the rest of their
system image.

This corrects the `west build -t run ...` for the `mps3_an547_ns`
board, as it now has special treatment.

Signed-off-by: Jimmy Brisson <de33656aa60791325e53378be66c520c3736548a@linaro.org>

--- boards/arm/mps3_an547/board.cmake
+++ boards/arm/mps3_an547/board.cmake
@@ -21,6 +21,13 @@
   )
 board_set_debugger_ifnset(qemu)

+if (CONFIG_BUILD_WITH_TFM)
+  # Override the binary used by qemu, to use the combined
+  # TF-M (Secure) & Zephyr (Non Secure) image (when running
+  # in-tree tests).
+  set(QEMU_KERNEL_OPTION "-device;loader,file=${CMAKE_BINARY_DIR}/tfm_merged.hex")
+endif()
+
 # FVP settings
 set(ARMFVP_BIN_NAME FVP_Corstone_SSE-300_Ethos-U55)


Disabling -flto b/c causes compiler errors, will try again around f18.

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -707,16 +707,17 @@
 	#	set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Os")
 	#endif(cxx_Os)

-	if (CMAKE_CXX_COMPILER_VERSION STRGREATER "4.7.0" OR CMAKE_CXX_COMPILER_VERSION STREQUAL "4.7.0")
-
-	  check_cxx_compiler_flag(-flto cxx_lto)
-	  if (cxx_lto)
-		  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto")
-		  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flto")
-	  endif(cxx_lto)
-	else()
-	  dprint("skipping cxx_lto flag check")
-	endif()
+	dprint("TSTCLAIR - DISABLING -flto b/c of gcc failure in koji try again later")
+	#if (CMAKE_CXX_COMPILER_VERSION STRGREATER "4.7.0" OR CMAKE_CXX_COMPILER_VERSION STREQUAL "4.7.0")
+	#
+	#  check_cxx_compiler_flag(-flto cxx_lto)
+	#  if (cxx_lto)
+	#	  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto")
+	#	  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flto")
+	#  endif(cxx_lto)
+	#else()
+	#  dprint("skipping cxx_lto flag check")
+	#endif()

 	check_cxx_compiler_flag(-W cxx_W)
 	if (cxx_W)


[Build] Suppressed wrong end-of-lines.

[Build] Suppressed wrong end-of-lines.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -1280,9 +1280,7 @@

   # Convenient message to the user/developer
   if (NOT CMAKE_INSTALL_RPATH_USE_LINK_PATH)
-    install (CODE "message (\"On Unix-based platforms, run "
-	  "export LD_LIBRARY_PATH=${INSTALL_LIB_DIR}:\$LD_LIBRARY_PATH "
-	  "once per session\")")
+    install (CODE "message (\"On Unix-based platforms, run export LD_LIBRARY_PATH=${INSTALL_LIB_DIR}:\$LD_LIBRARY_PATH once per session\")")
   endif (NOT CMAKE_INSTALL_RPATH_USE_LINK_PATH)

 endmacro (module_library_add_standard)


[Build] Added support to read the version from the CMake cache.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -139,6 +139,8 @@
 macro (store_in_cache)
   # Force some variables that could be defined in the command line to be
   # written to cache
+  set (PACKAGE_VERSION "${PACKAGE_VERSION}" CACHE STRING
+  "Version of the project/package")
   set (BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS}" CACHE BOOL
 	"Set to OFF to build static libraries" FORCE)
   set (CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE PATH


renamed Readme.txt => Readme.md in CPackConfig.txt

--- config/CPackConfig.cmake
+++ config/CPackConfig.cmake
@@ -12,7 +12,7 @@
 SET(CPACK_PACKAGE_INSTALL_DIRECTORY     "${PROJECT_NAME}")
 SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY  "${PROJECT_NAME}")
 SET(CPACK_RESOURCE_FILE_LICENSE         "${PROJECT_SOURCE_DIR}/LICENSE.txt")
-SET(CPACK_RESOURCE_FILE_README          "${PROJECT_SOURCE_DIR}/README.txt")
+SET(CPACK_RESOURCE_FILE_README          "${PROJECT_SOURCE_DIR}/README.md")
 SET(CPACK_STRIP_FILES TRUE)
 SET(CPACK_SOURCE_IGNORE_FILES "${PROJECT_SOURCE_DIR}/.hg" ".#" "#.*~")
 SET(CPACK_PACKAGE_CONTACT "Ullrich Koethe <ullrich.koethe@iwr.uni-heidelberg.de>")


FBX version 2013.3 needed.

FBX version 2013.3 needed.

--- FindFBX.cmake
+++ FindFBX.cmake
@@ -13,7 +13,7 @@
 #               The root directory of the FBX SDK install

 set(FBX_MAC_LOCATIONS
-    /Applications/Autodesk/FBXSDK20131
+    "/Applications/Autodesk/FBX\ SDK/2013.3"
 )

 if(WIN32)
@@ -21,14 +21,14 @@
 endif()

 set(FBX_WIN_LOCATIONS
-    "${WIN_PROGRAM_FILES_X64_DIRECTORY}/Autodesk/FBX/FbxSdk/2013.1"
+    "${WIN_PROGRAM_FILES_X64_DIRECTORY}/Autodesk/FBX/FbxSdk/2013.3"
 )

 set(FBX_SEARCH_LOCATIONS
     $ENV{FBX_ROOT} ${FBX_ROOT} ${FBX_MAC_LOCATIONS} ${FBX_WIN_LOCATIONS}
 )

-set(FBX_VERSION 2013.1)
+set(FBX_VERSION 2013.3)

 function(_fbx_append_debugs _endvar _library)
     if(${_library} AND ${_library}_DEBUG)


- use cmake generator targetnames for copying files

refs #1801

git-svn-id: e0b5bbb11d0e9fdbbfcabba14dc32ad5d6b235bd@980 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/ACGCommon.cmake
+++ cmake/ACGCommon.cmake
@@ -384,22 +384,14 @@
   # set common target properties defined in common.cmake
   acg_set_target_props (${_target})

-  if (WIN32)
-    # copy exe file to "Build" directory
-    # Visual studio will create this file in a subdirectory so we can't use
-    # RUNTIME_OUTPUT_DIRECTORY directly here
+  if (WIN32 OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE))
     add_custom_command (TARGET ${_target} POST_BUILD
                         COMMAND ${CMAKE_COMMAND} -E
                         copy_if_different
-                          ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${_target}.exe
-                          ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_BINDIR}/${_target}.exe)
-  elseif (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE)
-    add_custom_command (TARGET ${_target} POST_BUILD
-                        COMMAND ${CMAKE_COMMAND} -E
-                        copy_if_different
-                          ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${_target}
-                          ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_BINDIR}/${_target})
-  endif ()
+                          $<TARGET_FILE:${_target}>
+                          ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_BINDIR}/$<TARGET_FILE_NAME:${_target}>)
+  endif (WIN32 OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE))
+
   if (NOT ACG_PROJECT_MACOS_BUNDLE OR NOT APPLE)
     install (TARGETS ${_target} DESTINATION ${ACG_PROJECT_BINDIR})
   endif ()
@@ -438,25 +430,18 @@
     endif ()
   endif ()

-  if( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
-    set ( postfix ${CMAKE_DEBUG_POSTFIX} )
-  else ()
-    set ( postfix "" )
-  endif ()
-
-  set( fullname ${_target}${postfix} )
-
-
-  if (WIN32)
-    # copy exe file to "Build" directory
-    # Visual studio will create this file in a subdirectory so we can't use
-    # RUNTIME_OUTPUT_DIRECTORY directly here
+  if (WIN32 OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE))
     if (${_type} STREQUAL SHARED)
       add_custom_command (TARGET ${_target} POST_BUILD
                           COMMAND ${CMAKE_COMMAND} -E
                           copy_if_different
-                            ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${fullname}.dll
-                            ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_BINDIR}/${fullname}.dll)
+                            $<TARGET_FILE:${_target}>
+                            ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/$<TARGET_FILE_NAME:${_target}>)
+	  add_custom_command (TARGET ${_target} POST_BUILD
+                          COMMAND ${CMAKE_COMMAND} -E
+                          copy_if_different
+                            $<TARGET_LINKER_FILE:${_target}>
+                            ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/$<TARGET_LINKER_FILE_NAME:${_target}>)
     elseif (${_type} STREQUAL MODULE)
       if (NOT EXISTS ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_PLUGINDIR})
         file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_PLUGINDIR})
@@ -464,58 +449,34 @@
       add_custom_command (TARGET ${_target} POST_BUILD
                           COMMAND ${CMAKE_COMMAND} -E
                           copy_if_different
-                            ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${fullname}.dll
-                            ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_PLUGINDIR}/${fullname}.dll)
-    endif ()
-    if (${_type} STREQUAL SHARED OR ${_type} STREQUAL STATIC)
-	  if("${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles")
-		SET(OUTPUTNAME "lib${fullname}.a")
-	  else()
-	    SET(OUTPUTNAME "${fullname}.lib")
-	  endif()
+                            $<TARGET_FILE:${_target}>
+                            ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_PLUGINDIR}/$<TARGET_FILE_NAME:${_target}>)
+    elseif (${_type} STREQUAL STATIC)
+	  add_custom_command (TARGET ${_target} POST_BUILD
+                          COMMAND ${CMAKE_COMMAND} -E
+                          copy_if_different
+                            $<TARGET_FILE:${_target}>
+                            ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/$<TARGET_FILE_NAME:${_target}>)
+	endif()
+
+
+	# make an extra copy for windows into the binary directory
+    if (${_type} STREQUAL SHARED AND WIN32)
       add_custom_command (TARGET ${_target} POST_BUILD
                           COMMAND ${CMAKE_COMMAND} -E
-                          copy_if_different
-                            ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${OUTPUTNAME}
-                            ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/${OUTPUTNAME})
-    endif ()
-  elseif (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE)
-    if (${_type} STREQUAL SHARED)
-      add_custom_command (TARGET ${_target} POST_BUILD
-                          COMMAND ${CMAKE_COMMAND} -E
-                          copy_if_different
-                            ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${fullname}.dylib
-                            ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/lib${fullname}.dylib)
-    elseif (${_type} STREQUAL MODULE)
-      if (NOT EXISTS ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_PLUGINDIR})
-        file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_PLUGINDIR})
-      endif ()
-      add_custom_command (TARGET ${_target} POST_BUILD
-                          COMMAND ${CMAKE_COMMAND} -E
-                          copy_if_different
-                            ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${fullname}.so
-                            ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_PLUGINDIR}/lib${fullname}.so)
-    elseif (${_type} STREQUAL STATIC)
-      add_custom_command (TARGET ${_target} POST_BUILD
-                          COMMAND ${CMAKE_COMMAND} -E
-                          copy_if_different
-                            ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${fullname}.a
-                            ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/lib${fullname}.a)
-    endif ()
-    if (_and_static)
+                          copy_if_different
+                            $<TARGET_FILE:${_target}>
+                            ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_BINDIR}/$<TARGET_FILE_NAME:${_target}>)
+	endif ()
+
+  endif(WIN32 OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE))
+
+  if (_and_static)
       add_custom_command (TARGET ${_target}Static POST_BUILD
                           COMMAND ${CMAKE_COMMAND} -E
                           copy_if_different
-                            ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${_target}Static${postfix}.a
-                            ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/lib${fullname}.a)
-    endif ()
-
-  elseif (NOT APPLE AND _and_static)
-      add_custom_command (TARGET ${_target}Static POST_BUILD
-                          COMMAND ${CMAKE_COMMAND} -E
-                          copy_if_different
-                            ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${_target}Static${postfix}.a
-                            ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/lib${fullname}.a)
+                            $<TARGET_FILE:${_target}Static>
+                            ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/$<TARGET_FILE_NAME:${_target}Static>)

   endif ()