[CMake] Add configuration dirs as potential locations for llvm-lit and llvm-tblgen in standalone builds

Summary:
If the provided LLVM build-tree used a multi-configuration generator like Xcode, `LLVM_TOOLS_BINARY_DIR` will have a generator-specific placeholder to express `CMAKE_CFG_INTDIR`. Thus `llvm-lit` and `llvm-tblgen` won't be found.
D62878 exports the actual configuration types so we can fix the path and add them to the search paths for `find_program()`.

Reviewers: xiaobai, labath, stella.stamenova

Reviewed By: xiaobai, stella.stamenova

Subscribers: mgorny, lldb-commits

Tags: #lldb

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

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@362589 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -1,3 +1,12 @@
+function(append_configuration_directories input_dir output_dirs)
+  set(dirs_list ${input_dir})
+  foreach(config_type ${LLVM_CONFIGURATION_TYPES})
+    string(REPLACE ${CMAKE_CFG_INTDIR} ${config_type} dir ${input_dir})
+    list(APPEND dirs_list ${dir})
+  endforeach()
+  set(${output_dirs} ${dirs_list} PARENT_SCOPE)
+endfunction()
+
 # If we are not building as a part of LLVM, build LLDB as an
 # standalone project, using LLVM as an external library:
 if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
@@ -30,7 +39,10 @@
   if(CMAKE_HOST_WIN32 AND NOT CYGWIN)
     set(lit_file_name "${lit_file_name}.py")
   endif()
-  set(LLVM_DEFAULT_EXTERNAL_LIT "${LLVM_TOOLS_BINARY_DIR}/${lit_file_name}" CACHE PATH "Path to llvm-lit")
+
+  append_configuration_directories(${LLVM_TOOLS_BINARY_DIR} config_dirs)
+  find_program(lit_full_path ${lit_file_name} ${config_dirs} NO_DEFAULT_PATH)
+  set(LLVM_DEFAULT_EXTERNAL_LIT ${lit_full_path} CACHE PATH "Path to llvm-lit")

   if(CMAKE_CROSSCOMPILING)
     set(LLVM_NATIVE_BUILD "${LLDB_PATH_TO_LLVM_BUILD}/NATIVE")
@@ -54,8 +66,9 @@
         "${LLVM_NATIVE_BUILD}/Release/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
     endif()
   else()
-    find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
-      NO_DEFAULT_PATH)
+    set(tblgen_file_name "llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}")
+    append_configuration_directories(${LLVM_TOOLS_BINARY_DIR} config_dirs)
+    find_program(LLVM_TABLEGEN_EXE ${tblgen_file_name} ${config_dirs} NO_DEFAULT_PATH)
   endif()

   # They are used as destination of target generators.


cmake: fix qi_stage_lib when a subfolder is used.

--- cmake/qibuild/internal/stage.cmake
+++ cmake/qibuild/internal/stage.cmake
@@ -48,10 +48,23 @@

 function(_qi_gen_find_lib_code_redist res target)
   string(TOUPPER ${target} _U_target)
-  set(_res
+  if("${target}_SUBFOLDER" STREQUAL "")
+    set(_res
 "
 find_library(${_U_target}_DEBUG_LIBRARY ${target}_d)
 find_library(${_U_target}_LIBRARY       ${target})
+")
+  else()
+    set(_res
+"
+find_library(${_U_target}_DEBUG_LIBRARY ${target}_d PATH_SUFFIXES ${${target}_SUBFOLDER})
+find_library(${_U_target}_LIBRARY       ${target}   PATH_SUFFIXES ${${target}_SUBFOLDER})
+")
+  endif()
+  set(_res
+"
+${_res}
+
 if (${_U_target}_DEBUG_LIBRARY)
   set(${_U_target}_LIBRARIES optimized;\${${_U_target}_LIBRARY};debug;\${${_U_target}_DEBUG_LIBRARY})
 else()


linking gmp library

linking gmp library

--- cmake/unit-tests.cmake
+++ cmake/unit-tests.cmake
@@ -12,4 +12,4 @@
 add_executable(unit-tests ${TEST_SOURCES})
 add_dependencies(unit-tests bitcrypto)

-target_link_libraries(unit-tests bitcrypto ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} )
+target_link_libraries(unit-tests bitcrypto ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} gmp)


Update ITK version along 4.13.2 release

Update ITK version along 4.13.2 release

$ git log v4.13.2..upstream/release-4.13  --oneline

3213404416 BUG: Update CI scripts from current ITK master
7aac4a6748 BUG: Address bug with small size in output of SliceImageFilter
432dd1b9dc ENH: back-porting #1165 to support Visual Studio 2019
90ad651db4 BUG: Patch missing const qualifier to GDCM dircos_comp comparison
a47c974f64 COMP: a fix for non-system double-conversion build
ac26e1c55f Merge pull request #969 from dzenanz/release-4.13
3ee6f1e5c9 ENH: use double-conversion's CMake targets
a0922944b4 Merge pull request #911 from thewtex/4.13-vxl-gcc-9
9825d546c4 COMP: Add VXL support for GCC 9
c2cfd2b6d1 COMP: VtkGlue module-Provide support for VTK new cmake targets
38c6ca0d76 COMP: Prevent duplicate wrapping ouput file specification

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

-set(ITK_GIT_TAG "4a6e8c84198a741d18a2a39e616c26dda09b6686" CACHE
+set(ITK_GIT_TAG "3213404416666c17dbabc8fb0a07f1d27362f32c" CACHE
   STRING "Tag in ITK git repo") # after 4.13.2 along release-4.13
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")


[Config] Added support for Python 3.10

[Config] Added support for Python 3.10

--- config/FindPython/Support.cmake
+++ config/FindPython/Support.cmake
@@ -25,7 +25,7 @@
   message (FATAL_ERROR "FindPython: INTERNAL ERROR")
 endif()
 if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 3)
-  set(_${_PYTHON_PREFIX}_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+  set(_${_PYTHON_PREFIX}_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
 elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 2)
   set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
 else()


[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}")


try libzstd.dll.a

try libzstd.dll.a

--- cmake/FindZSTD.cmake
+++ cmake/FindZSTD.cmake
@@ -46,7 +46,7 @@
 if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
     set(zstd_lib_dirs ${zstd_lib_dirs} "$ENV{PROGRAMFILES}/zstd/lib")
     set(zstd_lib_dirs ${zstd_lib_dirs} "$ENV{PROGRAMDATA}/chocolatey/lib/zstandard/tools/dll")
-    set(zstd_lib_dirs ${zstd_lib_dirs} "$ENV{PROGRAMDATA}/chocolatey/lib/zstandard/tools/static")
+    # set(zstd_lib_dirs ${zstd_lib_dirs} "$ENV{PROGRAMDATA}/chocolatey/lib/zstandard/tools/static")
 endif()

 if(ZSTD_LIBRARYDIR)
@@ -55,7 +55,7 @@

 find_library(
     ZSTD_LIBRARY
-    NAMES zstd zstdlib libzstd libzstd_static
+    NAMES zstd zstdlib libzstd libzstd.dll.a
     HINTS ${zstd_lib_dirs}
 )


+ Add doxygen macros to top level import for easier access.

--- cmake/RezBuild.cmake
+++ cmake/RezBuild.cmake
@@ -90,6 +90,7 @@
 include(RezInstallCMake)
 include(RezFindPackages)
 include(RezInstallPython)
+include(RezInstallDoxygen)

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


disable broken -Warray-bounds on GCC > 4.5.2 and < 4.6.4

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -202,6 +202,10 @@
          AddCompilerFlag("-Wimplicit")
          AddCompilerFlag("-Wold-style-cast")
          AddCompilerFlag("-Wno-variadic-macros")
+         if(Vc_GCC_VERSION VERSION_GREATER "4.5.2" AND Vc_GCC_VERSION VERSION_LESS "4.6.4")
+            # GCC gives bogus "array subscript is above array bounds" warnings in math.cpp
+            AddCompilerFlag("-Wno-array-bounds")
+         endif()
       endif()
       vc_add_compiler_flag(Vc_DEFINITIONS "-Wabi")
       vc_add_compiler_flag(Vc_DEFINITIONS "-fabi-version=4") # this is required to make __m128 and __m256 appear as different types.


cmake/ICC: ICC wants -march=core-avx2 for AVX2+FMA+BMI2

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

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -471,7 +471,7 @@
    if(NOT Vc_AVX2_INTRINSICS_BROKEN)
       _vc_compile_one_implementation(${_srcs} AVX2 "-xCORE-AVX2"  "-mavx2"    "/arch:AVX2")
       _vc_compile_one_implementation(${_srcs} AVX2+BMI2 "-mavx2 -mbmi2" "" "")
-      _vc_compile_one_implementation(${_srcs} AVX2+FMA+BMI2 "-mavx2 -mfma -mbmi2" "" "")
+      _vc_compile_one_implementation(${_srcs} AVX2+FMA+BMI2 "-mavx2 -mfma -mbmi2" "-march=core-avx2" "")
       _vc_compile_one_implementation(${_srcs} AVX2+FMA "-mavx2 -mfma" "" "")
    endif()
 endmacro()


Update bde_ufid.cmake

Update bde_ufid.cmake

--- cmake/bde_ufid.cmake
+++ cmake/bde_ufid.cmake
@@ -689,7 +689,7 @@
                 Threads::Threads
             >
             $<$<CXX_COMPILER_ID:Clang>:
-                rt
+                $<$<PLATFORM_ID:Linux>:rt>
                 stdc++
                 Threads::Threads
                 $<${bde_ufid_is_fuzz}:  -nostdlib++ -fsanitize=fuzzer>


Reset vesion to 0.1.0

Reset vesion to 0.1.0

--- cmake/packages.cmake
+++ cmake/packages.cmake
@@ -1,6 +1,6 @@
 # ----------------------------------------------------------------------------
 # package information
-# TODO add el7.x86_64
+# add el7.x86_64
 execute_process (
             COMMAND         ${CMAKE_MODULE_PATH}/rpm_kernel_release.sh
             RESULT_VARIABLE RV
@@ -23,7 +23,7 @@
 endif ()

 set (PACKAGE_NAME        "${CMAKE_PROJECT_NAME}")
-set (PACKAGE_VERSION     "1.1.2.${GIT_CHECKIN_COUNT}")
+set (PACKAGE_VERSION     "0.1.0.${GIT_CHECKIN_COUNT}")
 set (PACKAGE_STRING      "${PACKAGE_NAME} ${PACKAGE_VERSION}")
 set (PACKAGE_TARNAME     "${PACKAGE_NAME}-${PACKAGE_VERSION}")
 set (PACKAGE_BUGREPORT   "https://github.com/Qihoo360/evpp/issues")


Removed testing of release build.

Removed testing of release build.

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -138,19 +138,6 @@
 set(CTEST_OUTPUT_ON_FAILURE TRUE)
 set(CTEST_GIT_COMMAND "git")

-set(CTEST_CONFIGURATION_TYPE "Release")
-set(CTEST_BUILD_NAME "${CI_BUILD_NAME}-release")
-ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
-ctest_start(Continuous)
-ctest_update()
-ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-ctest_configure()
-ctest_build()
-if(NOT (CC_NAME STREQUAL "msvc" AND CC_ARCH STREQUAL "arm"))
-    ctest_test()
-endif()
-ctest_submit()
-
 set(CTEST_CONFIGURATION_TYPE "Debug")

 # Coverage


COMP: use 5.2 as the default Cuda architecture

--- itk-module-init.cmake
+++ itk-module-init.cmake
@@ -3,6 +3,16 @@
 #
 list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)

+# Set default Cuda architecture if not provided. The first case allows for
+# backward compatibility with cmake versions before 3.20 which did not handle
+# CUDAARCHS environment variable.
+if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
+  if(DEFINED ENV{CUDAARCHS})
+    set(CMAKE_CUDA_ARCHITECTURES "$ENV{CUDAARCHS}" CACHE STRING "CUDA architectures")
+  else()
+    set(CMAKE_CUDA_ARCHITECTURES "52" CACHE STRING "CUDA architectures")
+  endif()
+endif()
 include(CheckLanguage)
 check_language(CUDA)


[libcxxabi][CMake] Drop unused HandleOutOfTreeLLVM include

This include doesn't seem to be needed for the standalone build (it's
not being used by libc++ build either), but introduces unnecessary
dependency because HandleOutOfTreeLLVM performs checks that require
a working C++ library. We shouldn't require a working C++ library to
build libc++abi or libc++ (it's what we're building after all).

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

git-svn-id: 6a9f6578bdee8d959f0ed58970538b4ab6004734@354284 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/HandleOutOfTreeLLVM.cmake
+++ cmake/Modules/HandleOutOfTreeLLVM.cmake
@@ -93,10 +93,7 @@
     endif()
   endif()
   if (LLVM_FOUND)
-    # Enable warnings, otherwise -w gets added to the cflags by HandleLLVMOptions.
-    set(LLVM_ENABLE_WARNINGS ON)
     include(AddLLVM OPTIONAL)
-    include(HandleLLVMOptions OPTIONAL)
   endif()

   # LLVM Options --------------------------------------------------------------


cmake: dispatcher: add handling of include dirs

from linked targets of base modules

--- cmake/OpenCVCompilerOptimizations.cmake
+++ cmake/OpenCVCompilerOptimizations.cmake
@@ -587,6 +587,7 @@
         ocv_append_dependant_targets(${TARGET_BASE_NAME} ${TARGET_BASE_NAME}_${OPT})
         set_target_properties(${TARGET_BASE_NAME}_${OPT} PROPERTIES COMPILE_DEFINITIONS "${CPU_DISPATCH_DEFINITIONS_${OPT}}")
         set_target_properties(${TARGET_BASE_NAME}_${OPT} PROPERTIES COMPILE_FLAGS "${CPU_DISPATCH_FLAGS_${OPT}}")
+        target_include_directories(${TARGET_BASE_NAME}_${OPT} PRIVATE $<TARGET_PROPERTY:${TARGET_BASE_NAME},INCLUDE_DIRECTORIES>)
         #list(APPEND __result_libs ${TARGET_BASE_NAME}_${OPT})
         list(APPEND __result "$<TARGET_OBJECTS:${TARGET_BASE_NAME}_${OPT}>")
       else()


Move back to parallel builds in general.  I now have more experience
with autotools type builds on MSYS/Wine, and they all seem to pop
several error boxes (probably due to some Wine-1.6 issue) typically
during runs of the enormous libtool bash script configured for each
project and typically run (twice!) for each compilation.  My
hypothesis now is the parallel builds are putting extreme pressure on
bash running those libtool scripts so the number of error boxes that
are popped for MSYS should be reduced if parallel builds are not
allowed for autotools-configured projects.  But I will handle that
with an overall option (see next commit) rather than specifically
turning off parallel builds for each separate autotools project.

svn path=/trunk/; revision=12447

--- cmake/build_projects/wxwidgets/bp.cmake
+++ cmake/build_projects/wxwidgets/bp.cmake
@@ -54,18 +54,13 @@
 endif(MSYS_PLATFORM)
 #message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")

-# Got intermittent failures using ${BP_PARALLEL_MAKE} both
-# historically and recently which are likely due to a parallel make
-# race condition for wxwidgets.  So I have decided to use
-# slow but sure ${BP_MAKE_COMMAND} instead.
-
 ExternalProject_Add(
   build_${BP_PACKAGE}
   URL ${${BP_PACKAGE}_URL}
   URL_MD5 ${${BP_PACKAGE}_URL_MD5}
   CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${${BP_PACKAGE}_SET_CXXFLAGS} ${source_PATH}/${BP_CONFIGURE_COMMAND} --enable-shared --enable-unicode --enable-debug --enable-debug_gdb
-  BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_MAKE_COMMAND}
-  INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_MAKE_COMMAND} install
+  BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND}
+  INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND} install
   )

 list(APPEND build_target_LIST build_${BP_PACKAGE})


support for using GCC on Apple platform

support for using GCC on Apple platform

--- toolchains/apple.cmake
+++ toolchains/apple.cmake
@@ -19,9 +19,13 @@
 set( CMAKE_XCODE_ATTRIBUTE_GCC_C++_LANGUAGE_STANDARD   gnu++14 )
 set( CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD gnu++14 )

-include( "${CMAKE_CURRENT_LIST_DIR}/clang.cmake" )
-
-add_compile_options( -fconstant-cfstrings -fobjc-call-cxx-cdtors )
+if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
+    include( "${CMAKE_CURRENT_LIST_DIR}/clang.cmake" )
+    add_compile_options( -fconstant-cfstrings -fobjc-call-cxx-cdtors )
+else()
+    include( "${CMAKE_CURRENT_LIST_DIR}/gcc_compatibles.cmake" )
+    add_compile_options( -mconstant-cfstrings )
+endif()

 # Implementation note: Unfortunately Apple Clang does not seem to support
 # sanitizer options other than the old/deprecated


Updating superbuild version of Swig to 2.0.8

--- SuperBuild/External_Swig.cmake
+++ SuperBuild/External_Swig.cmake
@@ -1,10 +1,10 @@
-set( TARGET_SWIG_VERSION 2.0.6 )
+set( TARGET_SWIG_VERSION 2.0.8 )
 if(NOT SWIG_DIR)
   if(WIN32)
     # swig.exe available as pre-built binary on Windows:
     ExternalProject_Add(Swig
       URL http://prdownloads.sourceforge.net/swig/swigwin-${TARGET_SWIG_VERSION}.zip
-      URL_MD5 85927815b4c1903c307599f46e36c380
+      URL_MD5 b33724aaa42a736816d7f095e7d93e4f
       SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/swigwin-${TARGET_SWIG_VERSION}
       CONFIGURE_COMMAND ""
       BUILD_COMMAND ""
@@ -58,7 +58,7 @@

     ExternalProject_add(Swig
       URL http://prdownloads.sourceforge.net/swig/swig-${TARGET_SWIG_VERSION}.tar.gz
-      URL_MD5 86bc02218774ca75bdf7766db74a62c6
+      URL_MD5 69f917e870efc0712c06ab53217b28d1
       CONFIGURE_COMMAND ${swig_CONFIGURE_COMMAND}
       DEPENDS PCRE
       )


Point back to cv-utils mainline

Point back to cv-utils mainline

--- distro/superbuild/cmake/externals.cmake
+++ distro/superbuild/cmake/externals.cmake
@@ -539,8 +539,8 @@
 if(USE_PERCEPTION)

   ExternalProject_Add(cv-utils
-    GIT_REPOSITORY https://github.com/gizatt/cv-utils.git
-    GIT_TAG 3ea4eb1b1b34bb9c9c08ad6627228c04ab6e2f2c
+    GIT_REPOSITORY https://github.com/patmarion/cv-utils.git
+    GIT_TAG c4939fedf66c767de15607adde3aff44ab2b503b
     CMAKE_CACHE_ARGS
       ${default_cmake_args}
     DEPENDS


clean up CUDA_NVCC_FLAGS

clean up CUDA_NVCC_FLAGS

--- alpakaConfig.cmake
+++ alpakaConfig.cmake
@@ -321,6 +321,9 @@
                 ENDIF()

             ELSE()
+                # Clean up the flags. Else, multiple find calls would result in duplicate flags. Furthermore, other modules may have set different settings.
+                SET(CUDA_NVCC_FLAGS)
+
                 IF(${ALPAKA_DEBUG} GREATER 1)
                     SET(CUDA_VERBOSE_BUILD ON)
                 ENDIF()


Correctly set HAVE_BSD_REGS_T flag during configure.

Fix BSD-regs detection. Struct name is 'reg' not 'regs'.

This fixes a bunch of issues when trying to build on FreeBSD.

--- src/pal/src/configure.cmake
+++ src/pal/src/configure.cmake
@@ -67,7 +67,7 @@
 check_struct_has_member ("ucontext_t" uc_mcontext.gregs[0] ucontext.h HAVE_GREGSET_T)

 set(CMAKE_EXTRA_INCLUDE_FILES machine/reg.h)
-check_type_size("struct regs" BSD_REGS_T)
+check_type_size("struct reg" BSD_REGS_T)
 set(CMAKE_EXTRA_INCLUDE_FILES)
 set(CMAKE_EXTRA_INCLUDE_FILES asm/ptrace.h)
 check_type_size("struct pt_regs" PT_REGS)


make addLibrary almost identical to addExecutable

--- alpakaConfig.cmake
+++ alpakaConfig.cmake
@@ -49,6 +49,7 @@
 UNSET(_ALPAKA_LINK_FLAGS_PUBLIC)
 UNSET(_ALPAKA_COMMON_FILE)
 UNSET(_ALPAKA_ADD_EXECUTABLE_FILE)
+UNSET(_ALPAKA_ADD_LIBRRAY_FILE)
 UNSET(_ALPAKA_FILES_HEADER)
 UNSET(_ALPAKA_FILES_SOURCE)
 UNSET(_ALPAKA_FILES_OTHER)
@@ -364,7 +365,7 @@
 SET_SOURCE_FILES_PROPERTIES(${_ALPAKA_FILES_TRAVIS} PROPERTIES HEADER_FILE_ONLY TRUE)

 append_recursive_files_add_to_src_group("${_ALPAKA_ROOT_DIR}/cmake" "${_ALPAKA_ROOT_DIR}" "cmake" _ALPAKA_FILES_CMAKE)
-LIST(APPEND _ALPAKA_FILES_CMAKE "${_ALPAKA_ROOT_DIR}/alpakaConfig.cmake" "${_ALPAKA_ROOT_DIR}/Findalpaka.cmake" "${_ALPAKA_ROOT_DIR}/CMakeLists.txt" "${_ALPAKA_ROOT_DIR}/cmake/dev.cmake" "${_ALPAKA_ROOT_DIR}/cmake/common.cmake" "${_ALPAKA_ROOT_DIR}/cmake/addExecutable.cmake")
+LIST(APPEND _ALPAKA_FILES_CMAKE "${_ALPAKA_ROOT_DIR}/alpakaConfig.cmake" "${_ALPAKA_ROOT_DIR}/Findalpaka.cmake" "${_ALPAKA_ROOT_DIR}/CMakeLists.txt" "${_ALPAKA_ROOT_DIR}/cmake/dev.cmake" "${_ALPAKA_ROOT_DIR}/cmake/common.cmake" "${_ALPAKA_ROOT_DIR}/cmake/addExecutable.cmake" "${_ALPAKA_ADD_LIBRRAY_FILE}")
 SET_SOURCE_FILES_PROPERTIES(${_ALPAKA_FILES_CMAKE} PROPERTIES HEADER_FILE_ONLY TRUE)

 SET(_ALPAKA_FILES_OTHER "${_ALPAKA_ROOT_DIR}/.gitignore" "${_ALPAKA_ROOT_DIR}/.travis.yml" "${_ALPAKA_ROOT_DIR}/appveyor.yml" "${_ALPAKA_ROOT_DIR}/COPYING" "${_ALPAKA_ROOT_DIR}/COPYING.LESSER" "${_ALPAKA_ROOT_DIR}/README.md")
@@ -501,6 +502,7 @@
     UNSET(_ALPAKA_LINK_FLAGS_PUBLIC)
     UNSET(_ALPAKA_COMMON_FILE)
     UNSET(_ALPAKA_ADD_EXECUTABLE_FILE)
+    UNSET(_ALPAKA_ADD_LIBRARY_FILE)
     UNSET(_ALPAKA_FILES_HEADER)
     UNSET(_ALPAKA_FILES_SOURCE)
     UNSET(_ALPAKA_FILES_OTHER)
@@ -523,6 +525,7 @@
         _ALPAKA_LINK_FLAGS_PUBLIC
         _ALPAKA_COMMON_FILE
         _ALPAKA_ADD_EXECUTABLE_FILE
+        _ALPAKA_ADD_LIBRARY_FILE
         _ALPAKA_FILES_HEADER
         _ALPAKA_FILES_SOURCE
         _ALPAKA_FILES_OTHER


Fix by Josh Levenberg for cmake build (#7233)

* Fix by Josh Levenberg for cmake build.

* Cmake fix, take 2.

--- tensorflow/contrib/cmake/tf_cc_ops.cmake
+++ tensorflow/contrib/cmake/tf_cc_ops.cmake
@@ -66,13 +66,17 @@
     add_custom_command(
         OUTPUT ${cc_ops_target_dir}/${tf_cc_op_lib_name}.h
                ${cc_ops_target_dir}/${tf_cc_op_lib_name}.cc
-        COMMAND ${tf_cc_op_lib_name}_gen_cc ${cc_ops_target_dir}/${tf_cc_op_lib_name}.h ${cc_ops_target_dir}/${tf_cc_op_lib_name}.cc ${cc_ops_include_internal}
+	       ${cc_ops_target_dir}/${tf_cc_op_lib_name}_internal.h
+	       ${cc_ops_target_dir}/${tf_cc_op_lib_name}_internal.cc
+        COMMAND ${tf_cc_op_lib_name}_gen_cc ${cc_ops_target_dir}/${tf_cc_op_lib_name}.h ${cc_ops_target_dir}/${tf_cc_op_lib_name}.cc ${tensorflow_source_dir}/tensorflow/cc/ops/op_gen_overrides.pbtxt ${cc_ops_include_internal}
         DEPENDS ${tf_cc_op_lib_name}_gen_cc create_cc_ops_header_dir
     )
-
+
     list(APPEND tf_cc_ops_generated_files ${cc_ops_target_dir}/${tf_cc_op_lib_name}.h)
     list(APPEND tf_cc_ops_generated_files ${cc_ops_target_dir}/${tf_cc_op_lib_name}.cc)
-endforeach()
+    list(APPEND tf_cc_ops_generated_files ${cc_ops_target_dir}/${tf_cc_op_lib_name}_internal.h)
+    list(APPEND tf_cc_ops_generated_files ${cc_ops_target_dir}/${tf_cc_op_lib_name}_internal.cc)
+  endforeach()

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


ENH: Made even more robust by putting explicit instantiation in a library before linking.

--- CMake/vtkTestExplicitInstantiation.cmake
+++ CMake/vtkTestExplicitInstantiation.cmake
@@ -11,7 +11,9 @@
   WRITE_FILE(
     ${VTK_BINARY_DIR}/CMakeTmp/TestExplicitInstantiation/CMakeLists.txt
     "PROJECT(EXPLICIT)\n"
-    "ADD_EXECUTABLE(A A.cxx B.cxx)\n"
+    "ADD_LIBRARY(A A.cxx)\n"
+    "ADD_EXECUTABLE(B B.cxx)\n"
+    "TARGET_LINK_LIBRARIES(B A)\n"
     )
   WRITE_FILE(
     ${VTK_BINARY_DIR}/CMakeTmp/TestExplicitInstantiation/A.h


fix the debug flag for nvcc

fix the debug flag for nvcc

--- cmake/cuda.cmake
+++ cmake/cuda.cmake
@@ -167,12 +167,8 @@
 list(APPEND CUDA_NVCC_FLAGS ${NVCC_FLAGS_EXTRA})
 message(STATUS "Added CUDA NVCC flags for: ${NVCC_FLAGS_EXTRA_readable}")

-if (WIN32)
-  set(CUDA_PROPAGATE_HOST_FLAGS ON)
-else (WIN32)
-  # Set C++11 support
-  set(CUDA_PROPAGATE_HOST_FLAGS OFF)
-endif (WIN32)
+# Set C++11 support
+set(CUDA_PROPAGATE_HOST_FLAGS OFF)

 # Release/Debug flags set by cmake. Such as -O3 -g -DNDEBUG etc.
 # So, don't set these flags here.
@@ -203,10 +199,12 @@
     list(APPEND CUDA_NVCC_FLAGS  ${CMAKE_CXX_FLAGS_RELEASE})
 endif()
 else(NOT WIN32)
-if(CMAKE_BUILD_TYPE STREQUAL "Release")
+if(CMAKE_BUILD_TYPE  STREQUAL "Debug")
+    list(APPEND CUDA_NVCC_FLAGS  "-g -lineinfo -G")
+elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
   list(APPEND CUDA_NVCC_FLAGS "-O3 -DNDEBUG")
 else()
-  message(FATAL "Windows only support Release build now. Please set visual studio build type to Release, x64 build.")
+  message(FATAL "Windows only support Release or Debug build now. Please set visual studio build type to Release/Debug, x64 build.")
 endif()
 endif(NOT WIN32)


Remove default cmake INSTALL and EXPORT commands from common.cmake

--- common.cmake
+++ common.cmake
@@ -106,14 +106,4 @@
    endforeach(item)
 endif()

-INSTALL(TARGETS ${PROJECT} DESTINATION "lib" EXPORT ${PROJECT}-exports.cmake )

-EXPORT(TARGETS ${PROJECT} FILE ${PROJECT}-exports.cmake )
-
-INSTALL(FILES
-   ${PROJECT_INCLUDES}
-   DESTINATION include
-)
-
-install(EXPORT ${PROJECT}-exports.cmake DESTINATION "lib"  )
-


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

 if(TODO MATCHES "ON")
@@ -78,14 +106,4 @@
    endforeach(item)
 endif()

-INSTALL(TARGETS ${PROJECT} DESTINATION "lib" EXPORT ${PROJECT}-exports.cmake )

-EXPORT(TARGETS ${PROJECT} FILE ${PROJECT}-exports.cmake )
-
-INSTALL(FILES
-   ${PROJECT_INCLUDES}
-   DESTINATION include
-)
-
-install(EXPORT ${PROJECT}-exports.cmake DESTINATION "lib"  )
-


update

update

--- modules/HdrHistogram.cmake
+++ modules/HdrHistogram.cmake
@@ -16,8 +16,8 @@
   elseif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC)
     set(CMAKE_OLD_C_FLAGS ${CMAKE_C_FLAGS})
     set(CMAKE_OLD_CXX_FLAGS ${CMAKE_CXX_FLAGS})
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_INIT} -Wall -Werror")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT} -Wall -Werror")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_INIT} -Wall -Werror" FORCE)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT} -Wall -Werror" FORCE)
   endif()

   # Add module library
@@ -29,8 +29,8 @@

   # Restore default warnings
   if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC)
-    set(CMAKE_C_FLAGS ${CMAKE_OLD_C_FLAGS})
-    set(CMAKE_CXX_FLAGS ${CMAKE_OLD_CXX_FLAGS})
+    set(CMAKE_C_FLAGS ${CMAKE_OLD_C_FLAGS} FORCE)
+    set(CMAKE_CXX_FLAGS ${CMAKE_OLD_CXX_FLAGS} FORCE)
   endif()

 endif()


Revert CMake CBSE stuff. Not ready yet.

Revert CMake CBSE stuff. Not ready yet.

--- cmake/DaemonCBSE.cmake
+++ cmake/DaemonCBSE.cmake
@@ -1,62 +0,0 @@
-# Daemon BSD Source Code
-# Copyright (c) 2013-2014, Daemon Developers
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#  * Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-#  * Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-#  * Neither the name of the <organization> nor the
-#    names of its contributors may be used to endorse or promote products
-#    derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-find_package(PythonInterp REQUIRED)
-
-function(maybe_add_dep target dep)
-    if (TARGET ${target})
-        add_dependencies(${target} ${dep})
-    endif()
-endfunction()
-
-function(CBSE target definition output)
-    set(GENERATED_CBSE ${output}/CBSEBackend.cpp
-                       ${output}/CBSEBackend.h
-                       ${output}/CBSEComponents.cpp
-                       ${output}/CBSEComponents.h)
-    add_custom_command(
-        OUTPUT ${GENERATED_CBSE}
-
-
-
-        COMMENT "Generating CBSE entities for ${definition}"
-        DEPENDS ${definition}
-        WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/utils/cbse
-        COMMAND
-                ${PYTHON_EXECUTABLE}
-                ${CMAKE_SOURCE_DIR}/src/utils/cbse/CBSE.py
-                -s -o
-                "${output}"
-                "${definition}"
-    )
-    string(REPLACE "/" "-" new_target ${definition})
-    add_custom_target(${new_target} ALL
-        DEPENDS ${GENERATED_CBSE}
-    )
-    maybe_add_dep(${target}-native-dll ${new_target})
-    maybe_add_dep(${target}-native-exe ${new_target})
-    maybe_add_dep(${target}-nacl ${new_target})
-endfunction()


Fix CMake to work with Python 3

Fix CMake to work with Python 3

--- cmake/FindPython.cmake
+++ cmake/FindPython.cmake
@@ -1,5 +1,5 @@
 execute_process(
-	COMMAND python -c "from distutils.sysconfig import get_python_inc; print get_python_inc()"
+	COMMAND python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())"
 	OUTPUT_VARIABLE PYTHON_SYS_PATH
 	)
 string(STRIP ${PYTHON_SYS_PATH} PYTHON_SYS_PATH)
@@ -10,13 +10,13 @@
     )

 execute_process(
-	COMMAND python -c "from distutils.sysconfig import get_config_var; print get_config_var('LIBDIR')"
+	COMMAND python -c "from distutils.sysconfig import get_config_var; print(get_config_var('LIBDIR'))"
 	OUTPUT_VARIABLE PYTHON_LIB_PATH
 	)
 string(STRIP ${PYTHON_LIB_PATH} PYTHON_LIB_PATH)

 execute_process(
-	COMMAND python -c "import sys; print '%s.%s' % sys.version_info[:2]"
+	COMMAND python -c "import sys; print('%s.%s' % sys.version_info[:2])"
     OUTPUT_VARIABLE PYTHON_VERSION
 	)
 string(STRIP ${PYTHON_VERSION} PYTHON_VERSION)
@@ -29,7 +29,7 @@
     )

 execute_process(
-	COMMAND python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
+	COMMAND python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
 	OUTPUT_VARIABLE PYTHON_INSTALL_PATH_tmp
 	)
 string(STRIP ${PYTHON_INSTALL_PATH_tmp} PYTHON_INSTALL_PATH_tmp)


cmake: CMake devicetree related linker functions implemented

This commit introduces zephyr_linker_dts CMake functions for creation of
linker scripts based on devicetree nodes.

The linker devicetree functions supports the following features:
- Configuration of memory sections based on devicetree nodes

Overview of functions introduced with this commit:
- zephyr_linker_dts_memory

Signed-off-by: Torsten Rasmussen <a7c5b1d5a1f41fce6edfa3f7c2392ae0c59deafe@nordicsemi.no>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -2978,6 +2978,77 @@
     zephyr_linker_memory(${ARGN})
   endif()
 endmacro()
+
+# Usage:
+#   zephyr_linker_dts_memory(NAME <name> PATH <path> FLAGS <flags>)
+#   zephyr_linker_dts_memory(NAME <name> NODELABEL <nodelabel> FLAGS <flags>)
+#   zephyr_linker_dts_memory(NAME <name> CHOSEN <prop> FLAGS <flags>)
+#
+# Zephyr linker devicetree memory.
+# This function specifies a memory region for the platform in use based on its
+# devicetree configuration.
+#
+# The memory will only be defined if the devicetree node or a devicetree node
+# matching the nodelabel exists and has status okay.
+#
+# Only one of PATH, NODELABEL, and CHOSEN parameters may be given.
+#
+# NAME <name>      : Name of the memory region, for example FLASH.
+# PATH <path>      : Devicetree node identifier.
+# NODELABEL <label>: Node label
+# CHOSEN <prop>    : Chosen property, add memory section described by the
+#                    /chosen property if it exists.
+# FLAGS <flags>  : Flags describing properties of the memory region.
+#                  Currently supported:
+#                  r: Read-only region
+#                  w: Read-write region
+#                  x: Executable region
+#                  The flags r and x, or w and x may be combined like: rx, wx.
+#
+function(zephyr_linker_dts_memory)
+  set(single_args "CHOSEN;FLAGS;NAME;PATH;NODELABEL")
+  cmake_parse_arguments(DTS_MEMORY "" "${single_args}" "" ${ARGN})
+
+  if(DTS_MEMORY_UNPARSED_ARGUMENTS)
+    message(FATAL_ERROR "zephyr_linker_dts_memory(${ARGV0} ...) given unknown "
+                        "arguments: ${DTS_MEMORY_UNPARSED_ARGUMENTS}"
+    )
+  endif()
+
+  if((DEFINED DTS_MEMORY_PATH AND (DEFINED DTS_MEMORY_NODELABEL OR DEFINED DTS_MEMORY_CHOSEN))
+     OR (DEFINED DTS_MEMORY_NODELABEL AND DEFINED DTS_MEMORY_CHOSEN))
+    message(FATAL_ERROR "zephyr_linker_dts_memory(${ARGV0} ...), only one of "
+                        "PATH, NODELABEL, and CHOSEN is allowed."
+    )
+  endif()
+
+  if(DEFINED DTS_MEMORY_NODELABEL)
+    dt_nodelabel(DTS_MEMORY_PATH NODELABEL ${DTS_MEMORY_NODELABEL})
+  endif()
+
+  if(DEFINED DTS_MEMORY_CHOSEN)
+    dt_chosen(DTS_MEMORY_PATH PROPERTY ${DTS_MEMORY_CHOSEN})
+  endif()
+
+  if(NOT DEFINED DTS_MEMORY_PATH)
+    return()
+  endif()
+
+  dt_node_exists(exists PATH ${DTS_MEMORY_PATH})
+  if(NOT ${exists})
+    return()
+  endif()
+
+  dt_reg_addr(addr PATH ${DTS_MEMORY_PATH})
+  dt_reg_size(size PATH ${DTS_MEMORY_PATH})
+
+  zephyr_linker_memory(
+    NAME  ${DTS_MEMORY_NAME}
+    START ${addr}
+    SIZE  ${size}
+    FLAGS ${DTS_MEMORY_FLAGS}
+  )
+endfunction()

 # Usage:
 #   zephyr_linker_group(NAME <name> [VMA <region|group>] [LMA <region|group>])


cmake: host-tools cosmetics

cmake: host-tools cosmetics

Align the comment styles for each tool.

Signed-off-by: Martí Bolívar <9d90ac4c7bf6a305f6bfd81a23c7859bc883380e@nordicsemi.no>

--- cmake/host-tools.cmake
+++ cmake/host-tools.cmake
@@ -2,7 +2,7 @@

 include(${ZEPHYR_BASE}/cmake/toolchain/zephyr/host-tools.cmake)

-# west is optional
+# west is an optional dependency
 find_program(
   WEST
   west
@@ -46,10 +46,7 @@
       )
 endif()

-# dtc is an optional dependency. Search for it on PATH and in
-# TOOLCHAIN_HOME. Usually DTC will be provided by an SDK, but for
-# SDK-less projects like gnuarmemb, it is up to the user to install
-# dtc.
+# dtc is an optional dependency
 find_program(
   DTC
   dtc


Quote parameters containing ;

Quote parameters containing ;

--- CMake/MITKDashboardScript.TEMPLATE.cmake
+++ CMake/MITKDashboardScript.TEMPLATE.cmake
@@ -104,7 +104,7 @@
 # Convenient macro allowing to download a file
 #
 MACRO(downloadFile url dest)
-  FILE(DOWNLOAD ${url} ${dest} STATUS status)
+  FILE(DOWNLOAD "${url}" "${dest}" STATUS status)
   LIST(GET status 0 error_code)
   LIST(GET status 1 error_msg)
   IF(error_code)
@@ -122,7 +122,7 @@
 endif()
 set(url "http://mbits/git/?p=MITK.git;a=blob_plain;f=CMake/MITKDashboardDriverScript.cmake;hb=${hb}")
 set(dest ${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}.driver)
-downloadFile(${url} ${dest})
+downloadFile("${url}" "${dest}")
 INCLUDE(${dest})


Remove some imt tutorials from the test batteries for classic builds

on ubuntus, despite the usage of -pthread, the executable root.exe
is not linked to libpthread: the -Wl,--as-needed flag is being specified.
As a result, the usage of any thread in a macro results in a crash.

--- tutorials/CTestCustom.cmake
+++ tutorials/CTestCustom.cmake
@@ -2,8 +2,14 @@

 set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE} tutorial-pyroot-zdemo)

-if("$ENV{COMPILER}" STREQUAL "classic") #  TTreeProcessorM{T,P} are not available
+if("$ENV{COMPILER}" STREQUAL "classic")
+  #  TTreeProcessorM{T,P} are not available
   list(APPEND CTEST_CUSTOM_TESTS_IGNORE tutorial-multicore-mp102_readNtuplesFillHistosAndFit)
+  #  pthread is not retained on ubuntus when building root.exe
+  list(APPEND CTEST_CUSTOM_TESTS_IGNORE
+       tutorial-multicore-mt101_fillNtuples
+       tutorial-multicore-mt001_fillHistos
+       tutorial-multicore-mt201_parallelHistoFill)
 endif()

 if (CTEST_BUILD_NAME MATCHES aarch64 AND CTEST_BUILD_NAME MATCHES dbg)


BUG: Regenerate HeaderTests' after .hxx files are removed.

The HeaderTests were not regenerated appropriately when only .hxx files
were moved around because the .hxx files were not included in the MD5 hash used
to keep track of module header contents.

Suggested-by: Bill Hoffman <bill.hoffman@kitware.com>

Change-Id: I1593cbedd1d221e191ee9c7d1df7085d6b5b78c7

--- CMake/ITKModuleHeaderTest.cmake
+++ CMake/ITKModuleHeaderTest.cmake
@@ -28,8 +28,13 @@

     # Count how many tests we are going to get, and put the source files in
     # the list _outputs.
+    # WARNING: This code is highly coupled with the BuildHeaderTest.py file
+    # below.  Before making any logic changes here, make sure that script is not
+    # effected.
     set( _include ${${_name}_SOURCE_DIR}/include )
     file( GLOB _h_files ${_include}/*.h )
+    file( GLOB _hxx_files ${_include}/*.hxx )
+    set( _header_files ${_h_files} ${_hxx_files} )
     list( LENGTH _h_files _num_headers )
     set( _outputs ${${_name}_BINARY_DIR}/test/${_name}HeaderTest1.cxx )
     set( _test_num 1 )
@@ -49,8 +54,8 @@
     # source files so they are regenerated.
     if( ${CMAKE_VERSION} VERSION_GREATER 2.8.6 ) # for string( MD5
       set( _headers_list_md5 "${${_name}_BINARY_DIR}/test/CMakeFiles/HeadersList.md5" )
-      list( SORT _h_files )
-      string( MD5 _new_md5 "${_h_files}" )
+      list( SORT _header_files )
+      string( MD5 _new_md5 "${_header_files}" )
       set( _regenerate_sources FALSE )
       if( NOT EXISTS "${_headers_list_md5}" )
         set( _regenerate_sources TRUE )


CMake: Export some variables to be available to parent projects.

--- CMake/Modules/UrhoOptions.cmake
+++ CMake/Modules/UrhoOptions.cmake
@@ -39,25 +39,24 @@

 # Set platform variables
 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
-    set (LINUX ON)
+    set (LINUX ON CACHE BOOL "" FORCE)
 endif ()

 if (ANDROID OR IOS)
-    set (MOBILE ON)
+    set (MOBILE ON CACHE BOOL "" FORCE)
 elseif (APPLE OR "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
-    set (APPLE ON)
+    set (APPLE ON CACHE BOOL "" FORCE)
 endif ()

 if (APPLE AND NOT IOS)
-    set (MACOS ON)
+    set (MACOS ON CACHE BOOL "" FORCE)
 endif ()

 if ((WIN32 OR LINUX OR MACOS) AND NOT WEB AND NOT MOBILE)
-    set (DESKTOP ON)
+    set (DESKTOP ON CACHE BOOL "" FORCE)
 endif ()

 option(URHO3D_ENABLE_ALL "Enables all optional subsystems by default" OFF)
-

 # Threads are still experimental on emscripten.
 if (NOT EMSCRIPTEN OR URHO3D_ENABLE_ALL)


Change cl2hpp external project github url

--- CMakeModules/build_cl2hpp.cmake
+++ CMakeModules/build_cl2hpp.cmake
@@ -4,7 +4,7 @@

 ExternalProject_Add(
     cl2hpp-ext
-    GIT_REPOSITORY https://github.com/9prady9/OpenCL-CLHPP.git
+    GIT_REPOSITORY https://github.com/arrayfire/OpenCL-CLHPP.git
     GIT_TAG install_targets
     PREFIX "${prefix}"
     INSTALL_DIR "${prefix}/package"


Refactored path detection into a macro

Refactored path detection into a macro

--- build/macros.cmake
+++ build/macros.cmake
@@ -60,15 +60,20 @@
 endmacro()

+macro(detect_path _var _val1 _val2)
+	if(EXISTS "${_val1}")
+		set_as_internal(${_var} "${_val1}")
+	elseif(EXISTS "${_val2}")
+		set_as_internal(${_var} "${_val2}")
+	else()
+		message(FATAL_ERROR "Cannot find path ${_val1} or ${_val2}")
+	endif()
+endmacro()
+
+
 macro(find_3p_path _build _var _val1 _val2)
 	if(${_build})
-		if(EXISTS "${ORK_3P_SOURCE_DIR}/${_val1}")
-			set_as_internal(${_var} "${ORK_3P_SOURCE_DIR}/${_val1}")
-		elseif(EXISTS "${ORK_3P_SOURCE_DIR}/${_val2}")
-			set_as_internal(${_var} "${ORK_3P_SOURCE_DIR}/${_val2}")
-		else()
-			message(FATAL_ERROR "Cannot find third-party directory ${_val1} or ${_val2}")
-		endif()
+		detect_path(${_var} "${ORK_3P_SOURCE_DIR}/${_val1}" "${ORK_3P_SOURCE_DIR}/${_val2}")
 	endif()
 endmacro()


Fixed two dummy flags

Fixed two dummy flags

--- build/macros.cmake
+++ build/macros.cmake
@@ -518,8 +518,8 @@
 	append_debug_flag("-D_DEBUG -DDEBUG")
 	append_release_flag("-D_NDEBUG -DNDEBUG")
 	replace_or_append_release_flag_compilers("/O([0-4]|x)" "-O[0-3]" "/Ox" "-O3")
-	replace_or_append_release_flag_compilers("/Z(7|i|l)" "IMPOSSIBLE" "/Zi" "")
-	replace_or_append_release_flag_compilers("/Ob[0-2]" "IMPOSSIBLE" "/Ob2" "")
+	replace_or_append_release_flag_compilers("/Z(7|i|l)" "IMPOSSIBLE" "/Zi" "-DUMMY")
+	replace_or_append_release_flag_compilers("/Ob[0-2]" "IMPOSSIBLE" "/Ob2" "-DUMMY")

 	#Fast behavior is bad for CAD kernels
 	detect_option_flag(ORK_FAST_FLOAT "Use fast floating point operations (Do not use in CAD applications)" OFF)


QuickDraw.PaintCircle, QuickDraw.FrameCircle1 now expected to pass

--- tests/test-properties.cmake
+++ tests/test-properties.cmake
@@ -6,6 +6,4 @@
         FileTest.SetFInfo_CrDat
         FileTest.SetFLock
         FileTest.MakeFSSpec
-        QuickDraw.PaintCircle
-        QuickDraw.FrameCircle1
     APPEND PROPERTIES LABELS xfail)


retain libapr-1 for older ubuntu versions

--- cmake/FindAPR.cmake
+++ cmake/FindAPR.cmake
@@ -38,7 +38,7 @@
     /usr/local/apr/include/apr-1
 )

-SET(APR_NAMES ${APR_NAMES} apr-1.0 apr-1)
+SET(APR_NAMES ${APR_NAMES} apr-1.0 libapr-1 apr-1)
 FIND_LIBRARY(APR_LIBRARY
   NAMES ${APR_NAMES}
   PATHS


Fix Warning: D9002: ignoring unknown option '-m64'

--- cmake/FindMKL.cmake
+++ cmake/FindMKL.cmake
@@ -99,7 +99,8 @@
     if (NOT DEFINED ENV{CRAY_PRGENVPGI} AND
         NOT DEFINED ENV{CRAY_PRGENVGNU} AND
         NOT DEFINED ENV{CRAY_PRGENVCRAY} AND
-        NOT DEFINED ENV{CRAY_PRGENVINTEL})
+        NOT DEFINED ENV{CRAY_PRGENVINTEL} AND
+        NOT MSVC)
       set(ABI "-m64")
     endif()


fix cmake to find qwt-qt5 on recent fedora

--- cmake/FindQwt.cmake
+++ cmake/FindQwt.cmake
@@ -7,7 +7,7 @@

 set(QWT_FOUND "NO")

-set(QWT_NAMES ${QWT_NAMES} qwt libqwt)
+set(QWT_NAMES ${QWT_NAMES} qwt libqwt qwt-qt5)

 if(QWT_DIR)
   find_path(QWT_INCLUDE_DIR
@@ -41,6 +41,7 @@
   /usr/local/include
   /opt/qwt/include
   /usr/include/qwt
+  /usr/include/qt5/qwt
   /usr/include)

 find_library(QWT_LIBRARY


scripts: Make toolchain options clearer.

--- scripts/toolchain.cmake
+++ scripts/toolchain.cmake
@@ -9,7 +9,12 @@
         set(CMAKE_RANLIB "arm-none-eabi-ranlib")
         set(CMAKE_AR "arm-none-eabi-ar")

-        set(COMMON_FLAGS "-mcpu=cortex-a8 -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -fno-common -ffunction-sections -fdata-sections -static -Wall -Wextra -nostartfiles -nostdinc")
+        set(COMMON_FLAGS "${COMMON_FLAGS} -march=armv7-a -mcpu=cortex-a8")              # Optimize code for ARM Cortex-A8.
+        set(COMMON_FLAGS "${COMMON_FLAGS} -mthumb")                                     # Use Thumb instruction set.
+        #set(COMMON_FLAGS "${COMMON_FLAGS} -mfloat-abi=hard")                            # Don't emulate floating point operations, use CPU instructions instead.
+        set(COMMON_FLAGS "${COMMON_FLAGS} -static")                                     # Prevent linking with shared libraries.
+        set(COMMON_FLAGS "${COMMON_FLAGS} -Wall -Wextra")                               # Enable all possible warnings.
+        set(COMMON_FLAGS "${COMMON_FLAGS} -nostartfiles")                               # Don't use standard startup files when linking.
         set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
         set(CMAKE_EXECUTABLE_SUFFIX ".elf")

@@ -19,7 +24,7 @@
         set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2 -Werror")

         # Set C++ compilation flags.
-        set(CMAKE_CXX_FLAGS "${COMMON_FLAGS} -std=c++14")
+        set(CMAKE_CXX_FLAGS "${COMMON_FLAGS} -std=c++14")                               # Enable C++14 standard.
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-unwind-tables")    # Disable C++ exceptions support, because it requires libc.
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")                             # Disable C++ run time information, because it requires libc.
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-threadsafe-statics")               # Do not produce code to initialize statics in thread-safe way.


Only cat .hf files when generating hardfork.hpp

--- programs/build_helpers/cat-parts.cmake
+++ programs/build_helpers/cat-parts.cmake
@@ -10,7 +10,7 @@

 set( HARDFORK_REGENERATE TRUE )

-file( GLOB HARDFORKS "${CMAKE_CURRENT_SOURCE_DIR}/hardfork.d/*" )
+file( GLOB HARDFORKS "${CMAKE_CURRENT_SOURCE_DIR}/hardfork.d/*.hf" )
 foreach( HF ${HARDFORKS} )
   file( READ "${HF}" INCL )
   string( CONCAT HARDFORK_CONTENT ${HARDFORK_CONTENT} ${INCL} )


ffmpeg use script: lib dependency order, take 2

* last commit changed the order for Windows only (didn't fix linux/gcc)
* make sure that won't happen again - consolidated lists
* issue https://github.com/smanders/externpro/issues/17#issuecomment-353437620

--- projects/use/usexp-ffmpeg-config.cmake
+++ projects/use/usexp-ffmpeg-config.cmake
@@ -14,17 +14,18 @@
 find_path(${PRJ}_INCLUDE_DIR ffmpeg/libavcodec/avcodec.h PATHS ${XP_ROOTDIR}/include${verDir} NO_DEFAULT_PATH)
 list(APPEND ${PRJ}_INCLUDE_DIR ${XP_ROOTDIR}/include${verDir}/ffmpeg) # for internal header includes
 set(reqVars ${PRJ}_INCLUDE_DIR)
+set(${PRJ}_LIBRARIES
+  avdevice${ver}
+  avformat${ver}
+  avfilter${ver}
+  avcodec${ver}
+  swresample${ver}
+  swscale${ver}
+  avutil${ver}
+  )
+list(APPEND reqVars ${PRJ}_LIBRARIES)
+link_directories(${XP_ROOTDIR}/lib)
 if(WIN32)
-  set(${PRJ}_LIBRARIES
-    avdevice${ver}.lib
-    avformat${ver}.lib
-    avfilter${ver}.lib
-    avcodec${ver}.lib
-    swresample${ver}.lib
-    swscale${ver}.lib
-    avutil${ver}.lib
-    )
-  link_directories(${XP_ROOTDIR}/lib)
   set(${PRJ}_DLLS
     ${XP_ROOTDIR}/bin${verDir}/avcodec-56.dll
     ${XP_ROOTDIR}/bin${verDir}/avdevice-56.dll
@@ -34,20 +35,9 @@
     ${XP_ROOTDIR}/bin${verDir}/swresample-1.dll
     ${XP_ROOTDIR}/bin${verDir}/swscale-3.dll
     )
-  list(APPEND reqVars ${PRJ}_LIBRARIES ${PRJ}_DLLS)
+  list(APPEND reqVars ${PRJ}_DLLS)
 else()
-  set(${PRJ}_LIBRARIES
-    avcodec${ver}
-    avdevice${ver}
-    avfilter${ver}
-    avformat${ver}
-    avutil${ver}
-    swresample${ver}
-    swscale${ver}
-    ${OPENH264_LIBRARIES}
-    )
-  link_directories(${XP_ROOTDIR}/lib)
-  list(APPEND reqVars ${PRJ}_LIBRARIES)
+  list(APPEND ${PRJ}_LIBRARIES ${OPENH264_LIBRARIES})
 endif()
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(${prj} REQUIRED_VARS ${reqVars})


Minor issue related to #100.

Minor issue related to #100.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -508,9 +508,12 @@
         ENDFOREACH()
     ENDIF()

-    # Package the plugin itself
-
-    INSTALL(FILES ${PLUGIN_BUILD_DIR}/${PLUGIN_FILENAME} DESTINATION plugins/${MAIN_PROJECT_NAME})
+    # Package the plugin itself, but only if we are not on Mac OS X since it
+    # will have already been copied
+
+    IF(NOT APPLE)
+        INSTALL(FILES ${PLUGIN_BUILD_DIR}/${PLUGIN_FILENAME} DESTINATION plugins/${MAIN_PROJECT_NAME})
+    ENDIF()

     # Create some tests, if any and if required


libgit2: some work towards upgrading to version 0.24.1 (#936).

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -396,19 +396,20 @@

     FOREACH(PARAMETER ${ARGN})
         IF("${PARAMETER}" STREQUAL "THIRD_PARTY")
-            # We are dealing with a third-party plugin, so disable all warnings
-            # since it may generate some and this is not something we have
-            # control over
-            # Note: for some reasons, MSVC eventually uses /W1, so we can't
-            #       replace /W3 /WX with /w since this would conflict with
-            #       /W1 and generate a warning...
+            # Disable all C/C++ warnings since building a third-party plugin may
+            # generate some and this has nothing to do with us
+            # Note: on Windows, we can't simply add /w since it will otherwise
+            #       result in MSVC complaining about /W3 having been overridden
+            #       by /w...

             IF(WIN32)
-                STRING(REPLACE "/W3 /WX" ""
+                STRING(REPLACE "/W3" "/w"
+                       CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+                STRING(REPLACE "/W3" "/w"
                        CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
             ELSE()
-                STRING(REPLACE "-Wall -W -Werror" "-w"
-                       CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+                SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
+                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
             ENDIF()

             # Add a definition in case of compilation from within Qt Creator


BUG: update expat version in Superbuild (security issue)

--- SuperBuild/CMake/External_expat.cmake
+++ SuperBuild/CMake/External_expat.cmake
@@ -24,8 +24,8 @@

 ExternalProject_Add(EXPAT
   PREFIX EXPAT
-  URL "http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz"
-  URL_MD5 dd7dab7a5fea97d2a6a43f511449b7cd
+  URL "http://downloads.sourceforge.net/project/expat/expat/2.3.0/expat-2.3.0.tar.gz"
+  URL_MD5 fb89c9a3dcc1e00e0fe0d0200af692dc
   BINARY_DIR ${EXPAT_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}


COMP: use nmake generator rather than VS for OSSIM

--- SuperBuild/CMake/External_ossim.cmake
+++ SuperBuild/CMake/External_ossim.cmake
@@ -42,6 +42,7 @@

   if(MSVC)
     set(OSSIM_CXX_FLAGS /EHsc)
+    list(APPEND OSSIM_SB_CONFIG "-GNMake\ Makefiles")
   endif()

   # archive version


Restore ASCIIbetical order.

Restore ASCIIbetical order.

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

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -21,9 +21,6 @@

 /* Define to 1 if you have the `backtrace' function. */
 #cmakedefine HAVE_BACKTRACE ${HAVE_BACKTRACE}
-
-/* Define to 1 if you have the `_Unwind_Backtrace' function. */
-#cmakedefine HAVE_UNWIND_BACKTRACE ${HAVE_UNWIND_BACKTRACE}

 /* Define to 1 if you have the `bcopy' function. */
 #undef HAVE_BCOPY
@@ -330,6 +327,9 @@

 /* Define to 1 if you have the <unistd.h> header file. */
 #cmakedefine HAVE_UNISTD_H ${HAVE_UNISTD_H}
+
+/* Define to 1 if you have the `_Unwind_Backtrace' function. */
+#cmakedefine HAVE_UNWIND_BACKTRACE ${HAVE_UNWIND_BACKTRACE}

 /* Define to 1 if you have the <utime.h> header file. */
 #cmakedefine HAVE_UTIME_H ${HAVE_UTIME_H}


Make/CMake build fixes after adding a new Thrift generated file

Summary:
Make/CMake build fixes after adding a new Thrift generated file.

A previous change added the following generated files:
```lang=bash
gen-cpp/${module}_data.h
gen-cpp/${module}_data.cpp
gen-cpp2/${module}_data.h
gen-cpp2/${module}_data.cpp
```

The new generated files are essentially empty, and other pre-existing generated files do not yet include or otherwise reference the new generated files.

So, add them to the Make/CMake builds.

Reviewed By: juchem

Differential Revision: D4169472

fbshipit-source-id: 779934964a20f9b88811f295885efc6be04dbf34

--- fblualib/cmake/FindThrift.cmake
+++ fblualib/cmake/FindThrift.cmake
@@ -34,10 +34,12 @@
     SET(absroot "${MLI_INCLUDE_OUTPUT_DIR}/${dir}")
     SET(abspath "${absroot}/gen-cpp2")
     FILE(MAKE_DIRECTORY "${absroot}")
-    SET(h_files "${abspath}/${bnwe}_types.h"
+    SET(h_files "${abspath}/${bnwe}_data.h"
+                "${abspath}/${bnwe}_types.h"
                 "${abspath}/${bnwe}_types.tcc"
                 "${abspath}/${bnwe}_constants.h")
-    SET(src_files "${abspath}/${bnwe}_types.cpp"
+    SET(src_files "${abspath}/${bnwe}_data.cpp"
+                  "${abspath}/${bnwe}_types.cpp"
                   "${abspath}/${bnwe}_constants.cpp")
     GET_DIRECTORY_PROPERTY(includes INCLUDE_DIRECTORIES)
     FOREACH(d ${includes})


add back cuda auto arch detection

add back cuda auto arch detection

Summary:
This was removed in an earlier version. Anyway, I suspect this will make jenkins a bit unhappy (do we use gpu instances for building as well?) so firing a PR to test.
Closes https://github.com/caffe2/caffe2/pull/1833

Differential Revision: D6834889

Pulled By: Yangqing

fbshipit-source-id: bc501cdb9d83a32ad38d24e972c2bfec5242d767

--- cmake/Cuda.cmake
+++ cmake/Cuda.cmake
@@ -8,6 +8,50 @@
 set(Caffe2_known_gpu_archs "30 35 50 52 60 61 70") # for CUDA 9.x
 set(Caffe2_known_gpu_archs8 "20 21(20) 30 35 50 52 60 61") # for CUDA 8.x
 set(Caffe2_known_gpu_archs7 "20 21(20) 30 35 50 52") # for CUDA 7.x
+
+################################################################################################
+# A function for automatic detection of GPUs installed  (if autodetection is enabled)
+# Usage:
+#   caffe2_detect_installed_gpus(out_variable)
+function(caffe2_detect_installed_gpus out_variable)
+  if(NOT CUDA_gpu_detect_output)
+    set(__cufile ${PROJECT_BINARY_DIR}/detect_cuda_archs.cu)
+
+    file(WRITE ${__cufile} ""
+      "#include <cstdio>\n"
+      "int main()\n"
+      "{\n"
+      "  int count = 0;\n"
+      "  if (cudaSuccess != cudaGetDeviceCount(&count)) return -1;\n"
+      "  if (count == 0) return -1;\n"
+      "  for (int device = 0; device < count; ++device)\n"
+      "  {\n"
+      "    cudaDeviceProp prop;\n"
+      "    if (cudaSuccess == cudaGetDeviceProperties(&prop, device))\n"
+      "      std::printf(\"%d.%d \", prop.major, prop.minor);\n"
+      "  }\n"
+      "  return 0;\n"
+      "}\n")
+
+    execute_process(COMMAND "${CUDA_NVCC_EXECUTABLE}" "-ccbin=${CUDA_HOST_COMPILER}" ${CUDA_NVCC_FLAGS} "--run" "${__cufile}"
+                    WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/CMakeFiles/"
+                    RESULT_VARIABLE __nvcc_res OUTPUT_VARIABLE __nvcc_out
+                    ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+    if(__nvcc_res EQUAL 0)
+      string(REPLACE "2.1" "2.1(2.0)" __nvcc_out "${__nvcc_out}")
+      set(CUDA_gpu_detect_output ${__nvcc_out} CACHE INTERNAL "Returned GPU architetures from caffe2_detect_installed_gpus tool" FORCE)
+    endif()
+  endif()
+
+  if(NOT CUDA_gpu_detect_output)
+    message(STATUS "Automatic GPU detection failed. Building for all known architectures.")
+    set(${out_variable} ${Caffe2_known_gpu_archs} PARENT_SCOPE)
+  else()
+    message(STATUS "Automatic GPU detection returned ${CUDA_gpu_detect_output}.")
+    set(${out_variable} ${CUDA_gpu_detect_output} PARENT_SCOPE)
+  endif()
+endfunction()

 ################################################################################################
@@ -18,16 +62,20 @@
   # List of arch names
   set(__archs_names "Kepler" "Maxwell" "Pascal" "Volta" "All" "Manual")
   set(__archs_name_default "All")
+  if(NOT CMAKE_CROSSCOMPILING)
+    list(APPEND __archs_names "Auto")
+    set(__archs_name_default "Auto")
+  endif()

   # Set CUDA_ARCH_NAME strings (so it will be seen as dropbox in the CMake GUI)
-  set(CUDA_ARCH_NAME ${__archs_name_default} CACHE STRING "Select target NVIDIA GPU architecture")
+  set(CUDA_ARCH_NAME ${__archs_name_default} CACHE STRING "Select target NVIDIA GPU architecture.")
   set_property(CACHE CUDA_ARCH_NAME PROPERTY STRINGS "" ${__archs_names})
   mark_as_advanced(CUDA_ARCH_NAME)

   # Verify CUDA_ARCH_NAME value
   if(NOT ";${__archs_names};" MATCHES ";${CUDA_ARCH_NAME};")
     string(REPLACE ";" ", " __archs_names "${__archs_names}")
-    message(FATAL_ERROR "Invalid CUDA_ARCH_NAME, supported values: ${__archs_names}. Got ${CUDA_ARCH_NAME}")
+    message(FATAL_ERROR "Invalid CUDA_ARCH_NAME, supported values: ${__archs_names}. Got ${CUDA_ARCH_NAME}.")
   endif()

   if(${CUDA_ARCH_NAME} STREQUAL "Manual")
@@ -54,6 +102,8 @@
   elseif(${CUDA_ARCH_NAME} STREQUAL "Manual")
     set(__cuda_arch_bin ${CUDA_ARCH_BIN})
     set(__cuda_arch_ptx ${CUDA_ARCH_PTX})
+  elseif(${CUDA_ARCH_NAME} STREQUAL "Auto")
+    caffe2_detect_installed_gpus(__cuda_arch_bin)
   else()
     message(FATAL_ERROR "Invalid CUDA_ARCH_NAME")
   endif()
@@ -93,34 +143,6 @@
   set(${out_variable}_readable ${__nvcc_archs_readable} PARENT_SCOPE)
 endfunction()

-
-################################################################################################
-# Short command for cuda compilation
-# Usage:
-#   caffe_cuda_compile(<objlist_variable> <cuda_files>)
-macro(caffe2_cuda_compile objlist_variable)
-  foreach(var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG)
-    set(${var}_backup_in_cuda_compile_ "${${var}}")
-
-    # we remove /EHa as it generates warnings under windows
-    string(REPLACE "/EHa" "" ${var} "${${var}}")
-
-  endforeach()
-
-  if(APPLE)
-    list(APPEND CUDA_NVCC_FLAGS -Xcompiler -Wno-unused-function)
-  endif()
-
-  cuda_compile(cuda_objcs ${ARGN})
-
-  foreach(var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG)
-    set(${var} "${${var}_backup_in_cuda_compile_}")
-    unset(${var}_backup_in_cuda_compile_)
-  endforeach()
-
-  set(${objlist_variable} ${cuda_objcs})
-endmacro()
-
 ################################################################################################
 ###  Non macro section
 ################################################################################################
@@ -136,7 +158,6 @@
 endif()

 find_package(CUDA 7.0 QUIET)
-find_cuda_helper_libs(curand)  # cmake 2.8.7 compartibility which doesn't search for curand

 if(NOT CUDA_FOUND)
   return()


fix glop only build for cmake

fix glop only build for cmake


Forgot to add default build updates.

Forgot to add default build updates.

--- cmake/sdks.cmake
+++ cmake/sdks.cmake
@@ -133,6 +133,7 @@
 list(APPEND TEST_DEPENDENCY_LIST "sqs:access-management,cognito-identity,iam,core")
 list(APPEND TEST_DEPENDENCY_LIST "transfer:s3,core")
 list(APPEND TEST_DEPENDENCY_LIST "s3-encryption:s3,kms,core")
+list(APPEND TEST_DEPENDENCY_LIST "text-to-speech:polly,core")

 # make a list of the generated clients
 set(GENERATED_SERVICE_LIST "")
@@ -234,6 +235,7 @@
     list(APPEND TEMP_SDK_BUILD_LIST "transfer")
     list(APPEND TEMP_SDK_BUILD_LIST "s3-encryption")
     list(APPEND TEMP_SDK_BUILD_LIST "core")
+    list(APPEND TEMP_SDK_BUILD_LIST "text-to-speech")

     set(SDK_BUILD_LIST ${TEMP_SDK_BUILD_LIST})


cmake: remove unused simple_c_test() function

Signed-off-by: Josef 'Jeff' Sipek <a620f141433c70aa9e43778305a6c68cbfadfb25@josefsipek.net>

--- cmake/test.cmake
+++ cmake/test.cmake
@@ -19,16 +19,6 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 #
-
-function(simple_c_test type section bin data)
-	add_test(NAME "${type}:${section}:${data}"
-		 COMMAND "${CMAKE_BINARY_DIR}/tests/test_${bin}"
-			 "${CMAKE_CURRENT_SOURCE_DIR}/${data}"
-	)
-	set_tests_properties("${type}:${section}:${data}" PROPERTIES
-		ENVIRONMENT "UMEM_DEBUG=default,verbose"
-	)
-endfunction()

 macro(build_test_bin name)
 	add_executable("test_${name}"


Removed incorrect capitalization, reduce verbosity

--- projects/win32/tomviz.bundle.cmake
+++ projects/win32/tomviz.bundle.cmake
@@ -63,15 +63,15 @@
 include(InstallRequiredSystemLibraries)
 include(CPack)

-add_test(GenerateTomVizPackage-NSIS
-        ${CMAKE_CPACK_COMMAND} -G NSIS -V
+add_test(GenerateTomvizPackage-NSIS
+        ${CMAKE_CPACK_COMMAND} -G NSIS
         WORKING_DIRECTORY ${Superbuild_BINARY_DIR})

-add_test(GenerateTomVizPackage-ZIP
+add_test(GenerateTomvizPackage-ZIP
         ${CMAKE_CPACK_COMMAND} -G ZIP -V
         WORKING_DIRECTORY ${Superbuild_BINARY_DIR})

-set_tests_properties(GenerateTomVizPackage-NSIS
-                     GenerateTomVizPackage-ZIP
+set_tests_properties(GenerateTomvizPackage-NSIS
+                     GenerateTomvizPackage-ZIP
                      PROPERTIES
                      TIMEOUT 1200)


fix doc list

fix doc list

--- Build/CMake/Modules/AtomicDocList.cmake
+++ Build/CMake/Modules/AtomicDocList.cmake
@@ -1,7 +1,7 @@
 # create target to generate docs with clang based doc tool
-# NB: pretty brute force ATM
-if(EXISTS "/usr/local/bin/cldoc")
-   add_custom_target(AtomicEngineDocs
+find_program(CLDOC cldoc)
+if(CLDOC)
+   add_custom_target(AtomicEngineDocs
     DEPENDS AtomicEditorDocs AtomicDocs
     )
-endif()+endif()


COMP: avoid setting required link flags globally for OpticalCalibration

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

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


ENH: update sertitobject git tag to fix failing test

--- Modules/Remote/SertitObject.remote.cmake
+++ Modules/Remote/SertitObject.remote.cmake
@@ -26,5 +26,5 @@
 object-oriented image analysis.
 "
   GIT_REPOSITORY https://github.com/sertit/SertitObject.git
-  GIT_TAG 90c369e9a197b3f83cb18e1d7bc594313fef63d5
+  GIT_TAG d228e0d65de58496e2410ae8944e715b3970760a
 )


BUG: Do not install python wrapper modules with an RPATH pointing at the build tree.

--- CMake/KitCommonPythonWrapBlock.cmake
+++ CMake/KitCommonPythonWrapBlock.cmake
@@ -43,6 +43,13 @@
   IF(WIN32 AND NOT CYGWIN)
     SET_TARGET_PROPERTIES(vtk${KIT}Python PROPERTIES SUFFIX ".pyd")
   ENDIF(WIN32 AND NOT CYGWIN)
+
+  # The python modules are installed by a setup.py script which does
+  # not know how to adjust the RPATH field of the binary.  Therefore
+  # we must simply build the modules with no RPATH at all.  The
+  # vtkpython executable in the build tree should have the needed
+  # RPATH anyway.
+  SET_TARGET_PROPERTIES(vtk${KIT}Python PROPERTIES SKIP_BUILD_RPATH 1)

   IF(WIN32 OR APPLE)
     TARGET_LINK_LIBRARIES (vtk${KIT}Python ${VTK_PYTHON_LIBRARIES})


forget from commit.

forget from commit.

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

--- CMakeModules/PoCo.cmake
+++ CMakeModules/PoCo.cmake
@@ -19,6 +19,7 @@
     /usr/lib
     /usr/lib/PoCo
     /usr/lib/Poco
+    /usr/local/include/Poco
     /usr/local/Poco
     $ENV{HOME}/PoCo
     $ENV{HOME}/Poco


BUG: didn't remove old perl dependency for for doxygen

--- Utilities/Doxygen/Doxygen.cmake
+++ Utilities/Doxygen/Doxygen.cmake
@@ -17,7 +17,6 @@
   add_custom_target(Documentation ALL
     COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Utilities/Doxygen/doxygen.config
     MAIN_DEPENDENCY ${PROJECT_BINARY_DIR}/Utilities/Doxygen/doxygen.config
-    DEPENDS         ${PROJECT_BINARY_DIR}/Utilities/Doxygen/itkdoxygen.pl
     WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/Utilities/Doxygen
     )


fixed a possible mexMTF bug in Examples.cmake;

--- Examples/Examples.cmake
+++ Examples/Examples.cmake
@@ -168,7 +168,10 @@
 		SRC Examples/cpp/mexMTF.cc
 		LINK_TO mtf ${MTF_LIBS} ${Matlab_LIBRARIES}
 	)
-	install(TARGETS mexMTF RUNTIME DESTINATION ${Matlab_ROOT_DIR}/toolbox/local COMPONENT mex)
+	install(TARGETS mexMTF
+	RUNTIME DESTINATION ${Matlab_ROOT_DIR}/toolbox/local
+	LIBRARY DESTINATION ${Matlab_ROOT_DIR}/toolbox/local
+	COMPONENT mex)
 	add_custom_target(mex DEPENDS mexMTF)
 	if(NOT WIN32)
 		add_custom_target(install_mex


Fix functional tests, remove broken servers

--- test/functional/ctest_functional.cmake
+++ test/functional/ctest_functional.cmake
@@ -1,4 +1,4 @@
-## ctest script file for automated functional tests for davix
+# ctest script file for automated functional tests for davix
 #

 message (" Setup tests parameters... ")
@@ -6,35 +6,42 @@
 set(BASIC_LOGIN "test")
 set(BASIC_PASSWD "tester")

-set(http_desy_base "https://vm-dcache-deploy6.desy.de:2880/dteam/davix-tests" CACHE STRING "dCache test instance to use")
-set(http_desy_mv "https://vm-dcache-deploy6.desy.de:2880/dteam" CACHE STRING "dCache test instance to use for rename")
-set(http_lcgdm_base "https://lxfsra04a04.cern.ch/dpm/cern.ch/home/dteam" CACHE STRING "DPM test instance to use" )
-set(dav_lcgdm_base "davs://lxfsra04a04.cern.ch/dpm/cern.ch/home/dteam" CACHE STRING "DPM test instance to use, Webdav protocol" )
+set(http_dcache "http://sligo.desy.de:2880/pnfs/desy.de/data/dteam/davix-tests/" CACHE STRING "dCache test instance to use")
+
+set(https_dpm "https://dpmhead-trunk.cern.ch/dpm/cern.ch/home/dteam" CACHE STRING "DPM test instance to use")
+set(https_dpm_file "${https_dpm}/davix-tests/testread0011")
+set(dav_dpm "davs://dpmhead-trunk.cern.ch/dpm/cern.ch/home/dteam" CACHE STRING "DPM test instance to use throught WebDAV protocol")
+
+set(http_dynaFed_base "http://federation.desy.de/fed/dynafeds_demo/everywhere/")
+set(http_dynaFed_file "${http_dynaFed_base}/file_1005.txt")
+
+# set(http_desy_base "http://sligo.desy.de:2880/pnfs/desy.de/data/dteam/davix-tests/" CACHE STRING "dCache test instance to use")
+# set(http_desy_mv "http://sligo.desy.de:2880/pnfs/desy.de/data/dteam/" CACHE STRING "dCache test instance to use for rename")
+# set(http_lcgdm_base "https://lxfsra04a04.cern.ch/dpm/cern.ch/home/dteam" CACHE STRING "DPM test instance to use" )
+# set(dav_lcgdm_base "davs://lxfsra04a04.cern.ch/dpm/cern.ch/home/dteam" CACHE STRING "DPM test instance to use, Webdav protocol" )
 #set(http_lcgdm_base "https://lxfsra10a01.cern.ch/dpm/cern.ch/home/dteam" CACHE STRING "DPM test instance to use" )

-set(http_storm_base "https://gridhttps-storm-atlas.cr.cnaf.infn.it:8443/webdav/dteam/davix-tests/" CACHE STRING "Storm test instance to use")
-set(http_dynaFed_base "http://federation.desy.de/fed/dynafeds_demo/everywhere/")
-set(http_lcgdm_file "${http_lcgdm_base}/davix-tests/testread0011")
-set(http_dynaFed_file "${http_dynaFed_base}/file_1005.txt")
+#set(http_storm_base "https://gridhttps-storm-atlas.cr.cnaf.infn.it:8443/webdav/dteam/davix-tests/" CACHE STRING "Storm test instance to use")

-set(metalink_url "http://download.documentfoundation.org/libreoffice/stable/4.3.4/deb/x86_64/LibreOffice_4.3.4_Linux_x86-64_deb.tar.gz")
-set(metalink3_url "http://download.documentfoundation.org/libreoffice/stable/4.3.4/deb/x86_64/LibreOffice_4.3.4_Linux_x86-64_deb_helppack_en-US.tar.gz.metalink")
-set(metalink_url_direct "http://download.documentfoundation.org/libreoffice/stable/4.3.4/deb/x86_64/LibreOffice_4.3.4_Linux_x86-64_deb_helppack_en-US.tar.gz.meta4")
+# set(metalink_url "http://download.documentfoundation.org/libreoffice/stable/4.3.4/deb/x86_64/LibreOffice_4.3.4_Linux_x86-64_deb.tar.gz")
+# set(metalink3_url "http://download.documentfoundation.org/libreoffice/stable/4.3.4/deb/x86_64/LibreOffice_4.3.4_Linux_x86-64_deb_helppack_en-US.tar.gz.metalink")
+# set(metalink_url_direct "http://download.documentfoundation.org/libreoffice/stable/4.3.4/deb/x86_64/LibreOffice_4.3.4_Linux_x86-64_deb_helppack_en-US.tar.gz.meta4")

-test_dav_endpoint_ronly( ${http_desy_base} "proxy")
-test_valid_write_read_generic("${http_desy_base}" "proxy")

-test_rename("${http_desy_mv}" "proxy")
-test_rename("${http_lcgdm_base}" "proxy")
+# dCache tests
+test_dav_endpoint_ronly( "${http_dcache}" "proxy")
+

 # DPM tests
-test_dav_endpoint_rw( "${http_lcgdm_base}" "proxy")
-test_valid_delete_all("${http_lcgdm_base}"  "proxy")
-test_valid_read_generic("${http_lcgdm_base}" "proxy")
-test_valid_write_read_generic("${http_lcgdm_base}" "proxy")
+test_valid_write_read_generic("${https_dpm}" "proxy")
+test_rename("${https_dpm}" "proxy")
+test_dav_endpoint_rw( "${https_dpm}" "proxy")
+test_valid_delete_all("${https_dpm}"  "proxy")
+test_valid_read_generic("${https_dpm}" "proxy")
+test_valid_write_read_generic("${https_dpm}" "proxy")

 # DPM Webdav
-test_collection("${dav_lcgdm_base}" "proxy")
+test_collection("${dav_dpm}" "proxy")

 # Storm tests
 ## Disable storm test no valid gate !
@@ -50,8 +57,6 @@
 # ex : "davserver -u test -p tester -P 8009 -D /tmp"
 test_dav_endpoint_rw("http://localhost:8009" "${BASIC_LOGIN}:${BASIC_PASSWD}")
 test_valid_delete_all("http://localhost:8009"  "${BASIC_LOGIN}:${BASIC_PASSWD}")
-
-
 test_valid_delete_all("http://localhost:8008"  "${CMAKE_SOURCE_DIR}/test.p12")

 ## generic http query test
@@ -62,14 +67,16 @@
 test_valid_read_generic("http://cern.ch" "")

 # testwith common SE
-test_valid_read_generic("${http_desy_base}" "proxy")
+test_valid_read_generic("${https_dpm}" "proxy")
+test_valid_delete_all("${https_dpm}"  "proxy")
+
+# dynaFed
 test_valid_read_generic("${http_dynaFed_base}" "proxy")
-test_valid_delete_all("${http_desy_base}"  "proxy")
-

 # test replicas listing
-test_replica_listing_existing("${http_lcgdm_file}" "proxy")
+test_replica_listing_existing("${https_dpm_file}" "proxy")
 test_replica_listing_existing("${http_dynaFed_file}" "proxy")
-test_replica_listing_existing("${metalink_url}" "proxy")
-test_replica_listing_existing("${metalink3_url}" "proxy")
-test_replica_listing_existing("${metalink_url_direct}" "proxy")
+
+# test_replica_listing_existing("${metalink_url}" "proxy")
+# test_replica_listing_existing("${metalink3_url}" "proxy")
+# test_replica_listing_existing("${metalink_url_direct}" "proxy")


nxphlite-v3:Update to master rename trone to teraranger

--- cmake/configs/nuttx_nxphlite-v3_default.cmake
+++ cmake/configs/nuttx_nxphlite-v3_default.cmake
@@ -55,7 +55,7 @@
 	drivers/snapdragon_rc_pwm
 	drivers/srf02
 	drivers/tap_esc
-	drivers/trone
+	drivers/teraranger
 	drivers/vmount
 	modules/sensors


CMake: respect OGRE_BIN_DIRECTORY for plugins on Windows

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -32,8 +32,8 @@

 if (NOT OGRE_PLUGINS_PATH)
   if (WIN32)
-    set(OGRE_PLUGINS_PATH "bin")
-    set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/bin")
+    set(OGRE_PLUGINS_PATH "${OGRE_BIN_DIRECTORY}")
+    set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_BIN_DIRECTORY}")
   else ()
     set(OGRE_PLUGINS_PATH "${OGRE_LIB_DIRECTORY}/OGRE")
     set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}/OGRE")
@@ -44,7 +44,7 @@

 if (NOT OGRE_CFG_INSTALL_PATH)
   if (WIN32 OR APPLE)
-    set(OGRE_CFG_INSTALL_PATH "bin")
+    set(OGRE_CFG_INSTALL_PATH "${OGRE_BIN_DIRECTORY}")
   elseif (UNIX)
     set(OGRE_CFG_INSTALL_PATH "share/OGRE")
   endif()


Fix flag name.

Fix flag name.

--- CMake/Modules/FindGLFW.cmake
+++ CMake/Modules/FindGLFW.cmake
@@ -74,7 +74,7 @@
 	    )
 	ENDIF(WIN32)

-ENDIF(NOT GLFW_LIBRARY OR HORDE3D_FORCE_DOWNLOAD_GLFW)
+ENDIF(NOT GLFW_LIBRARY OR FORCE_DOWNLOAD_GLFW)

 #MESSAGE("GLFW_LIBRARY is ${GLFW_LIBRARY}")


ENH: update test after -- suppression

ENH: update test after -- suppression

--- CMake/OTBWrapperMacros.cmake
+++ CMake/OTBWrapperMacros.cmake
@@ -81,7 +81,7 @@
               ${TESTAPPLICATION_APP}
               $<TARGET_FILE_DIR:otbapp_${TESTAPPLICATION_APP}>
               ${TESTAPPLICATION_OPTIONS}
-              --testenv)
+              -testenv)
    else (NOT TESTAPPLICATION_TESTENVOPTIONS)
      add_test(NAME ${TESTAPPLICATION_NAME}
               COMMAND otbTestDriver
@@ -90,7 +90,7 @@
               ${TESTAPPLICATION_APP}
               $<TARGET_FILE_DIR:otbapp_${TESTAPPLICATION_APP}>
               ${TESTAPPLICATION_OPTIONS}
-              --testenv ${TESTAPPLICATION_TESTENVOPTIONS})
+              -testenv ${TESTAPPLICATION_TESTENVOPTIONS})
    endif (NOT TESTAPPLICATION_TESTENVOPTIONS)

 endmacro(OTB_TEST_APPLICATION)


COMP: Fixing -fPIC flag passing with Ninja build system

Change-Id: I8b45aa02a17ea9e65389eeb261f9b9fc8e27c8d9

--- CMake/itkExternal_FFTW.cmake
+++ CMake/itkExternal_FFTW.cmake
@@ -95,7 +95,7 @@
         CONFIGURE_COMMAND
           env
             "CC=${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}"
-            "CFLAGS=${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}"
+            "CFLAGS=${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE} ${GCC_POSITION_INDEPENDENT_CODE_FLAG}"
             "LDFLAGS=$ENV{LDFLAGS}"
             "LIBS=$ENV{LIBS}"
             "CPP=$ENV{CPP}"
@@ -123,7 +123,7 @@
         CONFIGURE_COMMAND
           env
            "CC=${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}"
-           "CFLAGS=${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}"
+           "CFLAGS=${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE} ${GCC_POSITION_INDEPENDENT_CODE_FLAG}"
            "LDFLAGS=$ENV{LDFLAGS}"
            "LIBS=$ENV{LIBS}"
            "CPP=$ENV{CPP}"


Prevent a wrapper related compilation bug that happens on some systems.

On some systems, the wrapping step in compilation would hang on vtkOpenGLState.
Apparently its include of gl.h was the problem, as the version of that file on
some systems exposed the wrapper bug.

Change-Id: I30db194f97c331bcb01bbfdd1c40c2d85bd8662d

--- CMake/vtkWrapHierarchy.cmake
+++ CMake/vtkWrapHierarchy.cmake
@@ -69,7 +69,8 @@
       ENDIF (TMP_FILEPATH)

       IF(NOT "${KIT}" STREQUAL "Rendering" OR
-         NOT "${TMP_FILENAME}" STREQUAL "vtkgl")
+         (NOT "${TMP_FILENAME}" STREQUAL "vtkgl" AND
+          NOT "${TMP_FILENAME}" STREQUAL "vtkOpenGLState"))
       IF(NOT "${KIT}" STREQUAL "Filtering" OR
          NOT "${TMP_FILENAME}" STREQUAL "vtkInformation")

@@ -97,7 +98,8 @@
       ENDIF(NOT "${KIT}" STREQUAL "Filtering" OR
             NOT "${TMP_FILENAME}" STREQUAL "vtkInformation")
       ENDIF(NOT "${KIT}" STREQUAL "Rendering" OR
-            NOT "${TMP_FILENAME}" STREQUAL "vtkgl")
+            (NOT "${TMP_FILENAME}" STREQUAL "vtkgl" AND
+             NOT "${TMP_FILENAME}" STREQUAL "vtkOpenGLState"))
     ENDIF (IGNORE_WRAP_EXCLUDE OR TMP_WRAP_SPECIAL OR NOT TMP_WRAP_EXCLUDE)
   ENDFOREACH(FILE)


install examples to examples dir

install examples to examples dir

--- config/cmake/modules/MfemCmakeUtilities.cmake
+++ config/cmake/modules/MfemCmakeUtilities.cmake
@@ -101,7 +101,7 @@
     string(REPLACE ".cpp" "" EXE_NAME "${EXE_PREFIX}${SRC_FILENAME}")
     mfem_add_executable(${EXE_NAME} ${SRC_FILE})
     install(TARGETS ${EXE_NAME}
-            RUNTIME DESTINATION bin)
+            RUNTIME DESTINATION examples)
     add_dependencies(${MFEM_ALL_EXAMPLES_TARGET_NAME} ${EXE_NAME})
     if (EXE_NEEDED_BY)
       add_dependencies(${EXE_NEEDED_BY} ${EXE_NAME})


doc update

doc update

--- cmake/oskar_build_macros.cmake
+++ cmake/oskar_build_macros.cmake
@@ -56,7 +56,7 @@
 # Macro to build and install apps that depend on Qt.
 #
 # Usage:
-#   oskar_app(name
+#   qt_app(name
 #         [NO_INSTALL]
 #         source1 source2 ...
 #         [QT_MOC_SRC source1 source2 ...]


fixed install_matching_to_share

fixed install_matching_to_share

--- cmake/install_matching_to_share.cmake
+++ cmake/install_matching_to_share.cmake
@@ -5,15 +5,15 @@

   foreach(file ${globbed})
     get_filename_component(pathonly ${file} PATH)
-    if(${pathonly})
+    if(pathonly)
       get_filename_component(package ${pathonly} NAME)
       install(FILES ${file}
-	DESTINATION share/${package}
-	)
+        DESTINATION share/${package}
+        )
     else()
       install(FILES ${file}
-	DESTINATION share/${CATKIN_CURRENT_STACK}
-	)
+        DESTINATION share/${CATKIN_CURRENT_STACK}
+        )
     endif()
   endforeach()
 endfunction()


Reverted HinnantDate back to an older version due to macro error in latest

--- cmake/modules/Build-HinnantDate.cmake
+++ cmake/modules/Build-HinnantDate.cmake
@@ -3,7 +3,7 @@
 ExternalProject_Add(
   date
   GIT_REPOSITORY https://github.com/HowardHinnant/date.git
-  GIT_TAG 3e82a52d665cdaaa51027f15906bf503b6896142
+  GIT_TAG 6a4d93a0bd8b56db68821067322c09ec37d0d8a9
   CMAKE_ARGS -G ${CMAKE_GENERATOR} -DCURL_LIBRARY=${CURL_LIBRARY} -DCURL_INCLUDE_DIR=${CURL_INCLUDE_DIR} -DCMAKE_INSTALL_PREFIX=${DATE_INSTALL_DIR} -DENABLE_DATE_TESTING=OFF
   INSTALL_DIR ${DATE_INSTALL_DIR}
   DEPENDS CURL::libcurl


[CMake] Correctly return real (safe) install paths at runtime

Currently, when installed with `-Dgnuinstall=ON`,
`ROOTConfig.cmake` ends up exporting relative paths
from the `${CMAKE_INSTALL_CMAKEDIR}` directory to the
relevant binary, include and library directories.
This can be a problem, especially when these paths
may be evaluated from a different system folder
assumed by CMake (e.g. when `CMAKE_INTSTALL_CMAKEDIR`
is not the same for ROOT and CMake) as well as
in other cases, when relative paths are not appropriate.

Thus, it is safer in the general case to have these
relative paths resolved to absolute system paths
immediately before being passed to a caller.

This merge request tries to accomplish just that
with complete transparency and zero side-effects.
It uses a double-expansion method where intermediate
variables are used to construct the relevant runtime
paths and a second (final) set is used to evaluate
them to fully qualified system paths. The final
variables retain the same names as before in order
to preserve the current interface.

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -678,22 +678,30 @@
 file(RELATIVE_PATH ROOT_CMAKE_TO_LIB_DIR "${CMAKE_INSTALL_FULL_CMAKEDIR}" "${CMAKE_INSTALL_FULL_LIBDIR}")
 file(RELATIVE_PATH ROOT_CMAKE_TO_BIN_DIR "${CMAKE_INSTALL_FULL_CMAKEDIR}" "${CMAKE_INSTALL_FULL_BINDIR}")

+# '_' prefixed variables are used to construct the paths,
+# while the normal variants evaluate to full paths at runtime
 set(ROOT_INCLUDE_DIR_SETUP "
 # ROOT configured for the install with relative paths, so use these
-get_filename_component(ROOT_INCLUDE_DIRS \"\${_thisdir}/${ROOT_CMAKE_TO_INCLUDE_DIR}\" ABSOLUTE)
+get_filename_component(_ROOT_INCLUDE_DIRS \"\${_thisdir}/${ROOT_CMAKE_TO_INCLUDE_DIR}\" REALPATH)
+# resolve relative paths to absolute system paths
+get_filename_component(ROOT_INCLUDE_DIRS \"\${_ROOT_INCLUDE_DIRS}\" REALPATH)
 ")
 set(ROOT_LIBRARY_DIR_SETUP "
 # ROOT configured for the install with relative paths, so use these
-get_filename_component(ROOT_LIBRARY_DIR \"\${_thisdir}/${ROOT_CMAKE_TO_LIB_DIR}\" ABSOLUTE)
+get_filename_component(_ROOT_LIBRARY_DIR \"\${_thisdir}/${ROOT_CMAKE_TO_LIB_DIR}\" REALPATH)
+# resolve relative paths to absolute system paths
+get_filename_component(ROOT_LIBRARY_DIR \"\${_ROOT_LIBRARY_DIR}\" REALPATH)
 ")
 set(ROOT_BINDIR_SETUP "
 # ROOT configured for the install with relative paths, so use these
-get_filename_component(ROOT_BINDIR \"\${_thisdir}/${ROOT_CMAKE_TO_BIN_DIR}\" ABSOLUTE)
+get_filename_component(_ROOT_BINDIR \"\${_thisdir}/${ROOT_CMAKE_TO_BIN_DIR}\" REALPATH)
+# resolve relative paths to absolute system paths
+get_filename_component(ROOT_BINDIR \"\${_ROOT_BINDIR}\" REALPATH)
 ")
 # Deprecated value ROOT_BINARY_DIR
 set(ROOT_BINARY_DIR_SETUP "
 # Deprecated value, please don't use it and use ROOT_BINDIR instead.
-get_filename_component(ROOT_BINARY_DIR \"\${ROOT_BINDIR}\" ABSOLUTE)
+get_filename_component(ROOT_BINARY_DIR \"\${ROOT_BINDIR}\" REALPATH)
 ")

 # used by ROOTConfig.cmake from the build directory


build: do not create WinSDK symlinks when unneeded

When building on case insensitive filesystems, there is no need to
create the library symlink forest as the paths will be resolved properly
due to the insensitivity.  This avoids a bit of work and spew on
Windows.

--- cmake/modules/SwiftConfigureSDK.cmake
+++ cmake/modules/SwiftConfigureSDK.cmake
@@ -277,19 +277,21 @@
     set(WinSDK${arch}UMDir "$ENV{UniversalCRTSdkDir}/Lib/$ENV{UCRTVersion}/um/${WinSDKArchitecture}")
     set(OverlayDirectory "${CMAKE_BINARY_DIR}/winsdk_lib_${arch}_symlinks")

-    file(MAKE_DIRECTORY ${OverlayDirectory})
-
-    file(GLOB libraries RELATIVE "${WinSDK${arch}UMDir}" "${WinSDK${arch}UMDir}/*")
-    foreach(library ${libraries})
-      get_filename_component(name_we "${library}" NAME_WE)
-      get_filename_component(ext "${library}" EXT)
-      string(TOLOWER "${ext}" lowercase_ext)
-      set(lowercase_ext_symlink_name "${name_we}${lowercase_ext}")
-      if(NOT library STREQUAL lowercase_ext_symlink_name)
-        execute_process(COMMAND
-                        "${CMAKE_COMMAND}" -E create_symlink "${WinSDK${arch}UMDir}/${library}" "${OverlayDirectory}/${lowercase_ext_symlink_name}")
-      endif()
-    endforeach()
+    if(NOT EXISTS "$ENV{UniversalCRTSdkDir}/Include/$ENV{UCRTVersion}/um/WINDOWS.H")
+      file(MAKE_DIRECTORY ${OverlayDirectory})
+
+      file(GLOB libraries RELATIVE "${WinSDK${arch}UMDir}" "${WinSDK${arch}UMDir}/*")
+      foreach(library ${libraries})
+        get_filename_component(name_we "${library}" NAME_WE)
+        get_filename_component(ext "${library}" EXT)
+        string(TOLOWER "${ext}" lowercase_ext)
+        set(lowercase_ext_symlink_name "${name_we}${lowercase_ext}")
+        if(NOT library STREQUAL lowercase_ext_symlink_name)
+          execute_process(COMMAND
+                          "${CMAKE_COMMAND}" -E create_symlink "${WinSDK${arch}UMDir}/${library}" "${OverlayDirectory}/${lowercase_ext_symlink_name}")
+        endif()
+      endforeach()
+    endif()
   endforeach()

   # Add this to the list of known SDKs.


Add sonoma raceway world

Add sonoma raceway world

--- platforms/posix/cmake/sitl_target.cmake
+++ platforms/posix/cmake/sitl_target.cmake
@@ -66,7 +66,7 @@
 	standard_vtol tailsitter tiltrotor
 	rover boat
 	uuv_hippocampus)
-set(worlds none empty warehouse)
+set(worlds none empty warehouse sonoma_raceway)
 set(all_posix_vmd_make_targets)
 foreach(viewer ${viewers})
 	foreach(debugger ${debuggers})


BUG: disable zlib for geotiff

BUG: disable zlib for geotiff

--- CMake/External_geotiff.cmake
+++ CMake/External_geotiff.cmake
@@ -32,8 +32,11 @@
   if(USE_SYSTEM_ZLIB)
     set(GEOTIFF_SB_ZLIB_CONFIG)
   else()
-    set(GEOTIFF_SB_ZLIB_CONFIG --with-zlib=${CMAKE_INSTALL_PREFIX})
-    list(APPEND ${proj}_DEPENDENCIES ZLIB)
+    # geotiff configure script doesn't use the given path for zlib
+    # so this feature is not enabled
+    set(GEOTIFF_SB_ZLIB_CONFIG)
+    #set(GEOTIFF_SB_ZLIB_CONFIG --with-zlib=${CMAKE_INSTALL_PREFIX})
+    #list(APPEND ${proj}_DEPENDENCIES ZLIB)
   endif()

   if(USE_SYSTEM_JPEG)


little cmake fix

little cmake fix

--- bench/btl/cmake/FindEigen2.cmake
+++ bench/btl/cmake/FindEigen2.cmake
@@ -17,15 +17,15 @@

 else (EIGEN2_INCLUDE_DIR)

-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Eigen2 DEFAULT_MSG EIGEN2_INCLUDE_DIR)
-
 find_path(EIGEN2_INCLUDE_DIR NAMES Eigen/Core
      PATHS
      ${Eigen_SOURCE_DIR}/
      ${INCLUDE_INSTALL_DIR}
    )

+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Eigen2 DEFAULT_MSG EIGEN2_INCLUDE_DIR)
+
 mark_as_advanced(EIGEN2_INCLUDE_DIR)

 endif(EIGEN2_INCLUDE_DIR)


Update FW/mdk - Optimizing the confidence map alignment


added new things

added new things

git-svn-id: 9e9401559e51101c165cdce4d49b411eb20436ed@3748 3d70eeeb-363e-0410-a505-8a46323a89f2

--- src/ten/sources.cmake
+++ src/ten/sources.cmake
@@ -55,6 +55,9 @@
   tendUnmf.c
   tendLog.c
   tendExp.c
+  tendTriple.c
+  tendTconv.c
+  tendAvg.c
   )

 ADD_TEEM_LIBRARY(ten ${TEN_SOURCES})


fix hardcoded variable names and include CMakeParseArguments

--- FindICU.cmake
+++ FindICU.cmake
@@ -207,8 +207,8 @@
         foreach(${ICU_PRIVATE_VAR_NS}_BASE_NAME ${${ICU_PRIVATE_VAR_NS}_COMPONENTS_${${ICU_PRIVATE_VAR_NS}_COMPONENT}})
             list(APPEND ${ICU_PRIVATE_VAR_NS}_POSSIBLE_RELEASE_NAMES "${${ICU_PRIVATE_VAR_NS}_BASE_NAME}")
             list(APPEND ${ICU_PRIVATE_VAR_NS}_POSSIBLE_DEBUG_NAMES "${${ICU_PRIVATE_VAR_NS}_BASE_NAME}d")
-            list(APPEND ${ICU_PRIVATE_VAR_NS}_POSSIBLE_RELEASE_NAMES "${${ICU_PRIVATE_VAR_NS}_BASE_NAME}${ICU_VERSION_MAJOR}${ICU_VERSION_MINOR}")
-            list(APPEND ${ICU_PRIVATE_VAR_NS}_POSSIBLE_DEBUG_NAMES "${${ICU_PRIVATE_VAR_NS}_BASE_NAME}${ICU_VERSION_MAJOR}${ICU_VERSION_MINOR}d")
+            list(APPEND ${ICU_PRIVATE_VAR_NS}_POSSIBLE_RELEASE_NAMES "${${ICU_PRIVATE_VAR_NS}_BASE_NAME}${${ICU_PUBLIC_VAR_NS}_VERSION_MAJOR}${${ICU_PUBLIC_VAR_NS}_VERSION_MINOR}")
+            list(APPEND ${ICU_PRIVATE_VAR_NS}_POSSIBLE_DEBUG_NAMES "${${ICU_PRIVATE_VAR_NS}_BASE_NAME}${${ICU_PUBLIC_VAR_NS}_VERSION_MAJOR}${${ICU_PUBLIC_VAR_NS}_VERSION_MINOR}d")
         endforeach(${ICU_PRIVATE_VAR_NS}_BASE_NAME)

         find_library(
@@ -414,6 +414,7 @@
     set(PKGDATA_LIBRARY_LIBRARY_TYPE SHARED)
     ##### </hash constants> #####

+    include(CMakeParseArguments)
     cmake_parse_arguments(
         PARSED_ARGS # output variable name
         # options (true/false) (default value: false)


ENH: update openjpeg

ENH: update openjpeg

--- SuperBuild/CMake/External_openjpeg.cmake
+++ SuperBuild/CMake/External_openjpeg.cmake
@@ -34,12 +34,12 @@
 ADD_SUPERBUILD_CMAKE_VAR(OPENJPEG PNG_LIBRARY)

 #GIT_REPOSITORY "https://github.com/uclouvain/openjpeg.git"
-#GIT_TAG d0babeb6f6cdd1887308137df37bb2b4724a6592
+#GIT_TAG 081de4b15f54cb4482035b7bf5e3fb443e4bc84b

 ExternalProject_Add(OPENJPEG
   PREFIX OPENJPEG
-  URL "https://github.com/uclouvain/openjpeg/archive/v2.2.0.tar.gz"
-  URL_MD5 269bb0b175476f3addcc0d03bd9a97b6
+  URL "https://github.com/uclouvain/openjpeg/archive/v2.3.0.tar.gz"
+  URL_MD5 6a1f8aaa1fe55d2088e3a9c942e0f698
   BINARY_DIR ${OPENJPEG_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}


Update android.toolchain.cmake

Update android.toolchain.cmake

--- os/android.toolchain.cmake
+++ os/android.toolchain.cmake
@@ -195,6 +195,8 @@
  # touch toolchain variable to suppress "unused variable" warning
 endif()

+option(ANDROID_FORCE_COMPILERS "Force C/C++ compiler" ON)
+
 # inherit settings in recursive loads
 get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
 if( _CMAKE_IN_TRY_COMPILE )
@@ -336,11 +338,11 @@

 # fight against cygwin
-set( ANDROID_FORBID_SYGWIN TRUE CACHE BOOL "Prevent cmake from working under cygwin and using cygwin tools")
-mark_as_advanced( ANDROID_FORBID_SYGWIN )
-if( ANDROID_FORBID_SYGWIN )
+set( ANDROID_FORBID_CYGWIN TRUE CACHE BOOL "Prevent cmake from working under cygwin and using cygwin tools")
+mark_as_advanced( ANDROID_FORBID_CYGWIN )
+if( ANDROID_FORBID_CYGWIN )
  if( CYGWIN )
-  message( FATAL_ERROR "Android NDK and android-cmake toolchain are not welcome Cygwin. It is unlikely that this cmake toolchain will work under cygwin. But if you want to try then you can set cmake variable ANDROID_FORBID_SYGWIN to FALSE and rerun cmake." )
+  message( FATAL_ERROR "Android NDK and android-cmake toolchain are not welcome Cygwin. It is unlikely that this cmake toolchain will work under cygwin. But if you want to try then you can set cmake variable ANDROID_FORBID_CYGWIN to FALSE and rerun cmake." )
  endif()

  if( CMAKE_HOST_WIN32 )
@@ -1123,9 +1125,13 @@
  mark_as_advanced( CMAKE_INSTALL_NAME_TOOL )
 endif()

-# Force set compilers because standard identification works badly for us
-include( CMakeForceCompiler )
-CMAKE_FORCE_C_COMPILER( "${CMAKE_C_COMPILER}" GNU )
+if(ANDROID_FORCE_COMPILERS)
+  # Force set compilers because standard identification works badly for us
+  include( CMakeForceCompiler )
+  CMAKE_FORCE_C_COMPILER( "${CMAKE_C_COMPILER}" GNU )
+  CMAKE_FORCE_CXX_COMPILER( "${CMAKE_CXX_COMPILER}" GNU )
+endif()
+
 if( ANDROID_COMPILER_IS_CLANG )
  set( CMAKE_C_COMPILER_ID Clang )
 endif()
@@ -1137,7 +1143,6 @@
 endif()
 set( CMAKE_C_HAS_ISYSROOT 1 )
 set( CMAKE_C_COMPILER_ABI ELF )
-CMAKE_FORCE_CXX_COMPILER( "${CMAKE_CXX_COMPILER}" GNU )
 if( ANDROID_COMPILER_IS_CLANG )
  set( CMAKE_CXX_COMPILER_ID Clang)
 endif()
@@ -1578,7 +1583,7 @@
 # export toolchain settings for the try_compile() command
 if( NOT _CMAKE_IN_TRY_COMPILE )
  set( __toolchain_config "")
- foreach( __var NDK_CCACHE  LIBRARY_OUTPUT_PATH_ROOT  ANDROID_FORBID_SYGWIN
+ foreach( __var NDK_CCACHE  LIBRARY_OUTPUT_PATH_ROOT  ANDROID_FORBID_CYGWIN
                 ANDROID_NDK_HOST_X64
                 ANDROID_NDK
                 ANDROID_NDK_LAYOUT
@@ -1629,7 +1634,7 @@
 #   ANDROID_ABI : "armeabi-v7a" (default), "armeabi", "armeabi-v7a with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP", "x86", "mips", "arm64-v8a", "x86_64", "mips64"
 #   ANDROID_NATIVE_API_LEVEL : 3,4,5,8,9,14,15,16,17,18,19,21 (depends on NDK version)
 #   ANDROID_STL : gnustl_static/gnustl_shared/stlport_static/stlport_shared/gabi++_static/gabi++_shared/system_re/system/none
-#   ANDROID_FORBID_SYGWIN : ON/OFF
+#   ANDROID_FORBID_CYGWIN : ON/OFF
 #   ANDROID_NO_UNDEFINED : ON/OFF
 #   ANDROID_SO_UNDEFINED : OFF/ON  (default depends on NDK version)
 #   ANDROID_FUNCTION_LEVEL_LINKING : ON/OFF


Corrects typo.

Corrects typo.

--- dep/xz.cmake
+++ dep/xz.cmake
@@ -3,7 +3,7 @@

 execute_process(COMMAND ./configure --prefix=${CMAKE_INSTALL_PREFIX} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})

-add_custom_target(xz ALL COMMAND make WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Builing xz ...")
+add_custom_target(xz ALL COMMAND make WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Building xz ...")

 install(DIRECTORY src/liblzma/api/ DESTINATION include FILES_MATCHING PATTERN "*.h")


SVN_SILENT made messages (.desktop file)

--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -65,7 +65,7 @@
 Comment[es]=Motor VLC para Phonon
 Comment[et]=Phononi VLC taustaprogramm
 Comment[fi]=Phonon VLC -taustaohjelma
-Comment[fr]=Module VLC de Phonon
+Comment[fr]=Module VLC pour Phonon
 Comment[ga]=Inneall VLC Phonon
 Comment[gl]=Infraestrutura de VLC para Phonon
 Comment[hu]=Phonon VLC-backend


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


SuperBuild: new macro to update cmake variables

--- SuperBuild/CMake/SuperBuild_Macro.cmake
+++ SuperBuild/CMake/SuperBuild_Macro.cmake
@@ -132,7 +132,7 @@
   endif()
 endmacro(ADD_SUPERBUILD_CONFIGURE_VAR)

-macro(SUPERBUILD_PATCH_SOURCE project external_project_step_name)
+macro(SUPERBUILD_PATCH_SOURCE project)
   set(${project}_PATCH_DIR ${CMAKE_SOURCE_DIR}/patches/${project})
   string(TOLOWER ${project} project_)
   if(WIN32)
@@ -160,3 +160,34 @@
   endif()

 endmacro(SUPERBUILD_PATCH_SOURCE)
+
+macro(SUPERBUILD_UPDATE_CMAKE_VARIABLES PROJECT with_prefix)
+
+  if("${ARGV3}" STREQUAL "")
+    string(TOLOWER ${PROJECT} lib_file_we)
+  else()
+    set(lib_file_we "${ARGV3}")
+  endif()
+
+  if("${ARGV4}" STREQUAL "")
+    set(include_dir "include")
+  else()
+    set(include_dir "include/${ARGV4}")
+  endif()
+
+  if(WIN32)
+    if(${with_prefix})
+      set(lib_file lib${lib_file_we}${CMAKE_LINK_LIBRARY_SUFFIX})
+    else()
+      set(lib_file ${lib_file_we}${CMAKE_LINK_LIBRARY_SUFFIX})
+    endif()
+  else()
+    set(lib_file "lib${lib_file_we}${CMAKE_SHARED_LIBRARY_SUFFIX}")
+  endif()
+
+  set(_SB_${PROJECT}_INCLUDE_DIR ${SB_INSTALL_PREFIX}/${include_dir})
+  set(_SB_${PROJECT}_LIBRARY ${SB_INSTALL_PREFIX}/lib/${lib_file})
+
+  message( "lib/${lib_file}  '${include_dir}'")
+
+endmacro()


Trying my own Eigen fork to fix SVD segfault

Former-commit-id: 17a30c1b8fa1c92e82768f57015e966bc74f9fc5

--- cmake-modules/Fetch_Eigen3.cmake
+++ cmake-modules/Fetch_Eigen3.cmake
@@ -48,7 +48,7 @@
     ExternalProject_Add(external_EIGEN3
             GIT_REPOSITORY https://github.com/DavidAce/eigen-git-mirror.git
             #GIT_REPOSITORY https://github.com/eigenteam/eigen-git-mirror.git
-            GIT_TAG master
+            GIT_TAG 3.3.7-fix-svd-segfault
             GIT_PROGRESS 1
             PREFIX      ${BUILD_DIRECTORY}/Eigen3
             INSTALL_DIR ${INSTALL_DIRECTORY}/Eigen3


only install if its catkin.

only install if its catkin.

--- cmake/catkin_add_env_hooks.cmake
+++ cmake/catkin_add_env_hooks.cmake
@@ -51,23 +51,30 @@
     configure_file(${catkin_EXTRAS_DIR}/templates/env.sh.installable.in
       ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/env.sh)

-    install(FILES
-      ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/setup.${shell}
-      DESTINATION ${CMAKE_INSTALL_PREFIX}
-      )
+    if(catkin_SOURCE_DIR) #TODO FIXME these should only be installed if this is catkin?
+      install(FILES
+        ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/setup.${shell}
+        DESTINATION ${CMAKE_INSTALL_PREFIX}
+        )
+    endif()
   endforeach()

   configure_file(${catkin_EXTRAS_DIR}/templates/env.sh.buildspace.in
     ${CMAKE_BINARY_DIR}/env.sh)
-  install(PROGRAMS
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/env.sh
-    DESTINATION ${CMAKE_INSTALL_PREFIX}
+
+  if(catkin_SOURCE_DIR) #TODO FIXME these should only be installed if this is catkin?
+    install(PROGRAMS
+      ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/env.sh
+      DESTINATION ${CMAKE_INSTALL_PREFIX}
     )
+  endif()

   configure_file(${catkin_EXTRAS_DIR}/templates/rosinstall.installable.in
     ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/.rosinstall)
-  install(FILES
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/.rosinstall
-    DESTINATION ${CMAKE_INSTALL_PREFIX})

+  if(catkin_SOURCE_DIR) #TODO FIXME these should only be installed if this is catkin?
+    install(FILES
+      ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/.rosinstall
+      DESTINATION ${CMAKE_INSTALL_PREFIX})
+  endif()
 endfunction()


line endings

line endings

--- cmake/mysql_add_executable.cmake
+++ cmake/mysql_add_executable.cmake
@@ -43,14 +43,14 @@
   IF(NOT ARG_EXCLUDE_FROM_ALL)
     IF(NOT ARG_DESTINATION)
       SET(ARG_DESTINATION ${INSTALL_BINDIR})
-    ENDIF()
-    IF(ARG_COMPONENT)
-      SET(COMP COMPONENT ${ARG_COMPONENT})
-    ELSEIF(MYSQL_INSTALL_COMPONENT)
-      SET(COMP COMPONENT ${MYSQL_INSTALL_COMPONENT})
-    ELSE()
-      SET(COMP COMPONENT Client)
+    ENDIF()
+    IF(ARG_COMPONENT)
+      SET(COMP COMPONENT ${ARG_COMPONENT})
+    ELSEIF(MYSQL_INSTALL_COMPONENT)
+      SET(COMP COMPONENT ${MYSQL_INSTALL_COMPONENT})
+    ELSE()
+      SET(COMP COMPONENT Client)
     ENDIF()
     MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} ${COMP})
   ENDIF()
-ENDFUNCTION()
+ENDFUNCTION()