[CMake] [Darwin] [builtins] Fix building builtins for Darwin simulator platforms.

For Darwin simulator platforms we shouldn't build the cc_kext builtins at all because they aren't applicable, and we should includ the simulator builtins as slices inside the main platform builtin library.

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@248751 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/CompilerRTDarwinUtils.cmake
+++ cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -251,16 +251,7 @@
                       ../profile/InstrProfilingPlatformDarwin)
   foreach (os ${ARGN})
     list_union(DARWIN_BUILTIN_ARCHS DARWIN_${os}_ARCHS BUILTIN_SUPPORTED_ARCH)
-    foreach (arch ${DARWIN_BUILTIN_ARCHS})
-      # In addition to the builtins cc_kext includes some profile sources
-      darwin_add_builtin_library(clang_rt cc_kext
-                              OS ${os}
-                              ARCH ${arch}
-                              SOURCES ${${arch}_SOURCES} ${PROFILE_SOURCES}
-                              CFLAGS -arch ${arch} -mkernel
-                              DEFS KERNEL_USE
-                              PARENT_TARGET builtins)
-
+    foreach (arch ${DARWIN_BUILTIN_ARCHS} ${DARWIN_BUILTIN_SIM_ARCHS})
       darwin_find_excluded_builtins_list(${arch}_${os}_EXCLUDED_BUILTINS
                               OS ${os}
                               ARCH ${arch}
@@ -278,16 +269,35 @@
                               PARENT_TARGET builtins)
     endforeach()

-    darwin_lipo_libs(clang_rt.cc_kext_${os}
-                    PARENT_TARGET builtins
-                    LIPO_FLAGS ${${os}_cc_kext_lipo_flags}
-                    DEPENDS ${${os}_cc_kext_libs}
-                    OUTPUT_DIR ${COMPILER_RT_LIBRARY_OUTPUT_DIR})
-    darwin_lipo_libs(clang_rt.${os}
-                    PARENT_TARGET builtins
-                    LIPO_FLAGS ${${os}_builtins_lipo_flags}
-                    DEPENDS ${${os}_builtins_libs}
-                    OUTPUT_DIR ${COMPILER_RT_LIBRARY_OUTPUT_DIR})
+    # Don't build cc_kext libraries for simulator platforms
+    if(NOT ${os} MATCHES ".*sim$")
+      foreach (arch ${DARWIN_BUILTIN_ARCHS})
+        # In addition to the builtins cc_kext includes some profile sources
+        darwin_add_builtin_library(clang_rt cc_kext
+                                OS ${os}
+                                ARCH ${arch}
+                                SOURCES ${${arch}_SOURCES} ${PROFILE_SOURCES}
+                                CFLAGS -arch ${arch} -mkernel
+                                DEFS KERNEL_USE
+                                PARENT_TARGET builtins)
+      endforeach()
+      darwin_lipo_libs(clang_rt.cc_kext_${os}
+                      PARENT_TARGET builtins
+                      LIPO_FLAGS ${${os}_cc_kext_lipo_flags}
+                      DEPENDS ${${os}_cc_kext_libs}
+                      OUTPUT_DIR ${COMPILER_RT_LIBRARY_OUTPUT_DIR})
+    endif()
+  endforeach()
+
+  # We put the x86 sim slices into the archives for their base OS
+  foreach (os ${ARGN})
+    if(NOT ${os} MATCHES ".*sim$")
+      darwin_lipo_libs(clang_rt.${os}
+                        PARENT_TARGET builtins
+                        LIPO_FLAGS ${${os}_builtins_lipo_flags} ${${os}sim_builtins_lipo_flags}
+                        DEPENDS ${${os}_builtins_libs} ${${os}sim_builtins_libs}
+                        OUTPUT_DIR ${COMPILER_RT_LIBRARY_OUTPUT_DIR})
+    endif()
   endforeach()
 endmacro()


Support iOS 32bit CPU archiecture

Support iOS 32bit CPU archiecture

--- cmake-toolchains/ios.toolchain.cmake
+++ cmake-toolchains/ios.toolchain.cmake
@@ -18,7 +18,7 @@
 set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")

 set(CMAKE_SYSTEM_NAME Darwin)
-set(CMAKE_OSX_ARCHITECTURES "arm64")
+set(CMAKE_OSX_ARCHITECTURES "armv7 arm64")
 set(CMAKE_OSX_SYSROOT "iphoneos")
 set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator")


ENH (#6517): support for GDCM in superbuild

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -144,6 +144,25 @@
 ENDIF()
 ENDIF(MITK_USE_CTK)

+## -----------------------------------------
+# GDCM
+#
+IF(NOT DEFINED GDCM_DIR)
+  SET(proj GDCM)
+  ExternalProject_Add(${proj}
+     URL http://mitk.org/download/thirdparty/gdcm-2.0.14.tar.gz
+     INSTALL_COMMAND ""
+     CMAKE_GENERATOR ${gen}
+     CMAKE_ARGS
+       ${ep_common_args}
+       -DBUILD_SHARED_LIBS:BOOL=ON
+       -DBUILD_TESTING:BOOL=OFF
+       -DBUILD_EXAMPLES:BOOL=OFF
+     )
+  SET(GDCM_DIR ${ep_build_dir}/${proj})
+
+ENDIF(NOT DEFINED GDCM_DIR)
+
 ## -----------------------------------------
 # ITK
 #
@@ -157,6 +176,9 @@
        ${ep_common_args}
        -DBUILD_TESTING:BOOL=OFF
        -DBUILD_EXAMPLES:BOOL=OFF
+       -DITK_USE_SYSTEM_GDCM:BOOL=ON
+       -DGDCM_DIR:PATH=${GDCM_DIR}
+     DEPENDS GDCM
      )

   SET(ITK_DIR ${ep_build_dir}/${proj})


Fix wrong char on Interop cmake module

Fix wrong char on Interop cmake module

--- CMake/Modules/NF_NativeAssemblies.cmake
+++ CMake/Modules/NF_NativeAssemblies.cmake
@@ -188,7 +188,7 @@
     list(APPEND CLR_RT_NativeAssemblyDataTableEntriesList "&g_CLR_AssemblyNative_${interopAssemblyNameWithoutDots},")

     # find the module
-    find_package("INTEROP_${interopAssemblyName}" REQUIRED)
+    find_package("INTEROP-${interopAssemblyName}" REQUIRED)

     #########
     # because Interop assemblies are considered and treated as like any CLR assembly we add them to the same lists


Better CMake error message when compiler not able to handle the flags. With the precompiled header support now properly enabled for GCC (including all other cross-compiling toolchains based on GCC) and Clang, any incompabitility between the C++ compiler and the compiler flags required by Urho3D will be thrown out earlier at the time when CMake is about to generate the build tree, which is a good thing. Previously user would probably only know this much later when trying to build the project.

--- CMake/Modules/Urho3D-CMake-common.cmake
+++ CMake/Modules/Urho3D-CMake-common.cmake
@@ -314,7 +314,7 @@
     if (NOT URHO3D_64BIT)
         set (CMAKE_OSX_ARCHITECTURES $(ARCHS_STANDARD_32_BIT))
     endif ()
-    set (CMAKE_OSX_SYSROOT macosx)	# Set Base SDK to "Latest OS X"
+    set (CMAKE_OSX_SYSROOT macosx)    # Set Base SDK to "Latest OS X"
     if (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
         # If not set, set to current running build system OS version by default
         execute_process (COMMAND sw_vers -productVersion OUTPUT_VARIABLE CURRENT_OSX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -534,7 +534,12 @@
                 execute_process (COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp.new ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp)
                 file (REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp.new)
                 # Determine the dependency list
-                execute_process (COMMAND ${CMAKE_CXX_COMPILER} @${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp -MTdeps -MM -o ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.deps ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER_PATHNAME})
+                execute_process (COMMAND ${CMAKE_CXX_COMPILER} @${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp -MTdeps -MM -o ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.deps ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER_PATHNAME} RESULT_VARIABLE CXX_COMPILER_EXIT_CODE)
+                if (NOT CXX_COMPILER_EXIT_CODE EQUAL 0)
+                    message (FATAL_ERROR "The configured compiler toolchain in the build tree is not able to handle all the compiler flags required to build the project. "
+                        "Please kindly update your compiler toolchain to its latest version. If you are using MinGW then make sure it is MinGW-W64 instead of MinGW-W32 or TDM-GCC (Code::Blocks default). "
+                        "However, if you think there is something wrong with the compiler flags being used then please file a bug report to the project devs.")
+                endif ()
                 file (STRINGS ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.deps DEPS)
                 string (REGEX REPLACE "^deps: *| *\\; +" ";" DEPS ${DEPS})
                 # Create the rule that depends on the included headers
@@ -657,7 +662,7 @@
         define_dependency_libs (Urho3D)
     endif ()
     setup_target ()
-
+
     if (URHO3D_SCP_TO_TARGET)
         add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND scp $<TARGET_FILE:${TARGET_NAME}> ${URHO3D_SCP_TO_TARGET} || exit 0
             COMMENT "Scp-ing ${TARGET_NAME} executable to target system")
@@ -767,7 +772,7 @@
             set_target_properties (${TARGET_NAME} PROPERTIES ${TARGET_PROPERTIES})
         endif ()
     endif ()
-
+
     if (IOS)
         # Define a custom target to check for resource modification
         get_target_property (TARGET_LOC ${TARGET_NAME} LOCATION)
@@ -936,12 +941,12 @@
     list (APPEND CPP_FILES ${ARG_EXTRA_CPP_FILES})
     list (APPEND H_FILES ${ARG_EXTRA_H_FILES})
     set (SOURCE_FILES ${CPP_FILES} ${H_FILES})
-
+
     # Optionally enable PCH
     if (ARG_PCH)
         enable_pch (${ARG_PCH})
     endif ()
-
+
     # Optionally accumulate source files at parent scope
     if (ARG_PARENT_SCOPE)
         get_filename_component (NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)


From Terry Welsh, "I downloaded the Android 3rdparty deps from here
http://www.openscenegraph.org/index.php/download-section/dependencies
but was not able to use them for a while. Attached are changes to
OsgAndroidMacroUtils.cmake that allow the deps to be found by cmake.

Specifically, all FIND_PATH commands require the
NO_CMAKE_FIND_ROOT_PATH option to actually find paths. This is odd
because if you inspect CMAKE_FIND_ROOT_PATH it appears to be empty. I
would expect it to have no effect at all.

I also needed to remove quotes from this line in order for headers to be found:

set(FREETYPE_INCLUDE_DIRS "${FREETYPE_DIR}/include
${FREETYPE_DIR}/include/freetype/config")

Assuming this script worked in the past, it seems like cmake behavior
may have changed at some point. I'm using cmake version 2.8.12.2."

git-svn-id: aa838dfc23441284dd616281de4245daec5d2135@15036 16af8721-9629-0410-8352-f15c8da7e697

--- CMakeModules/OsgAndroidMacroUtils.cmake
+++ CMakeModules/OsgAndroidMacroUtils.cmake
@@ -67,7 +67,7 @@
     #JPEG
     ################################################
     FIND_PATH(JPEG_INCLUDE_DIR Android.mk
-        ${CMAKE_SOURCE_DIR}/3rdparty/libjpeg
+        ${CMAKE_SOURCE_DIR}/3rdparty/libjpeg NO_CMAKE_FIND_ROOT_PATH
     )
     #set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libjpeg")
     #set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${JPEG_INCLUDE_DIR}/Android.mk \n")
@@ -82,7 +82,7 @@
     #PNG
     ################################################
     FIND_PATH(PNG_INCLUDE_DIR Android.mk
-        ${CMAKE_SOURCE_DIR}/3rdparty/libpng
+        ${CMAKE_SOURCE_DIR}/3rdparty/libpng NO_CMAKE_FIND_ROOT_PATH
     )
     #set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libpng")
     #set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${PNG_INCLUDE_DIR}/Android.mk \n")
@@ -97,7 +97,7 @@
     #GIF
     ################################################
     FIND_PATH(GIFLIB_INCLUDE_DIR Android.mk
-        ${CMAKE_SOURCE_DIR}/3rdparty/giflib
+        ${CMAKE_SOURCE_DIR}/3rdparty/giflib NO_CMAKE_FIND_ROOT_PATH
     )
     #set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libgif")
     #set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${GIFLIB_INCLUDE_DIR}/Android.mk \n")
@@ -112,7 +112,7 @@
     #TIF
     ################################################
     FIND_PATH(TIFF_INCLUDE_DIR Android.mk
-        ${CMAKE_SOURCE_DIR}/3rdparty/libtiff
+        ${CMAKE_SOURCE_DIR}/3rdparty/libtiff NO_CMAKE_FIND_ROOT_PATH
     )
     #set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libtiff")
     #set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${TIFF_INCLUDE_DIR}/Android.mk \n")
@@ -142,7 +142,7 @@
     #CURL
     ################################################
     FIND_PATH(CURL_DIR Android.mk
-        ${CMAKE_SOURCE_DIR}/3rdparty/curl
+        ${CMAKE_SOURCE_DIR}/3rdparty/curl NO_CMAKE_FIND_ROOT_PATH
     )
     #set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libcurl")
     #set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${CURL_DIR}/Android.mk \n")
@@ -159,11 +159,11 @@
     #FREETYPE
     ################################################
     FIND_PATH(FREETYPE_DIR Android.mk
-        ${CMAKE_SOURCE_DIR}/3rdparty/freetype
+        ${CMAKE_SOURCE_DIR}/3rdparty/freetype NO_CMAKE_FIND_ROOT_PATH
     )
     #set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libft2")
     #set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${FREETYPE_DIR}/Android.mk \n")
-    set(FREETYPE_INCLUDE_DIRS "${FREETYPE_DIR}/include ${FREETYPE_DIR}/include/freetype/config")
+    set(FREETYPE_INCLUDE_DIRS ${FREETYPE_DIR}/include ${FREETYPE_DIR}/include/freetype/config)
     if(FREETYPE_DIR)
         message(STATUS "FREETYPE found ${FREETYPE_DIR}" )
         set(FREETYPE_FOUND "Yes")
@@ -175,7 +175,7 @@
     #GDAL
     ################################################
     FIND_PATH(GDAL_DIR gdal.h
-        ${CMAKE_SOURCE_DIR}/3rdparty/gdal/include
+        ${CMAKE_SOURCE_DIR}/3rdparty/gdal/include NO_CMAKE_FIND_ROOT_PATH
     )
     set(GDAL_INCLUDE_DIR "${GDAL_DIR}")
     if(GDAL_DIR)


ENH: Conditionally add testing for External Modules

Adds a check on the BUILD_TESTING variable before adding
the test subdirectory when building external modules against
an ITK build tree.
The include of Ctest before the 'if' statement ensures that
BUILD_TESTING is set.

Change-Id: Ib56d7e0586eb24a2377c520503ad633f22af9b8e

--- CMake/ITKModuleExternal.cmake
+++ CMake/ITKModuleExternal.cmake
@@ -81,7 +81,7 @@
 endif()

 set(ITK_TEST_OUTPUT_DIR "${CMAKE_BINARY_DIR}/Testing/Temporary")
-if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
+if(${BUILD_TESTING} AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
   add_subdirectory(test)
 endif()


COMP: externally built remote module libs went in /lib or C:/lib

--- CMake/ITKModuleExternal.cmake
+++ CMake/ITKModuleExternal.cmake
@@ -39,7 +39,10 @@
 # Setup build locations for shared libraries ----START
 #     ITK/CMakeLists.txt -- use ITK_BINARY_DIR as root
 #     ITK/CMake/ITKModuleExternal.cmake -- use ITK_DIR as root
-#
+if(NOT ITK_BINARY_DIR)
+  set(ITK_BINARY_DIR ${ITK_DIR})
+endif()
+
 # The default path when not wrapping.  Restore standard build location
 # if python wrapping is turned on, and then turned off.
 if(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)


added poco mongodb to cmake, fixes #3

added poco mongodb to cmake, fixes #3

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -27,7 +27,7 @@

 find_package(Boost COMPONENTS system filesystem REQUIRED)
 find_package(OpenCV REQUIRED)
-find_package(Poco COMPONENTS Foundation Util Data Net DataSQLite DataMySQL REQUIRED)
+find_package(Poco COMPONENTS Foundation Util Data Net DataSQLite DataMySQL MongoDB REQUIRED)

 #
 # Include directories


Renamed cmake parameter for parallel test execution.

The Jenkins setup (which uses `support/docker-build.sh` under the
covers) is parameterized with the  `CONFIGURATION` environment variable.
While in we pass configure-style flags for both autotools and cmake
builds to it in the Jenkins
configuration, the script performs transformations so that
configure-style flags are transformed to cmake-style (replace `_` with
`-`, uppercase flags, replace `--` with `-D`).

We disable parallel test execution in Jenkins by passing
`--disable-parallel-test-execution` which with the transformations in
`support/docker-build.sh` leads to a cmake arg
`-DDISABLE_PARALLEL_TEST_EXECUTION=1`. This patch renames the cmake arg
from a default enabled `ENABLE_PARALLEL_TEST_EXECUTION` to a default
disabled `DISABLE_PARALLEL_TEST_EXECUTION` to support this workflow.

Review: https://reviews.apache.org/r/71232/

--- cmake/MesosConfigure.cmake
+++ cmake/MesosConfigure.cmake
@@ -46,14 +46,14 @@
 ################################
 enable_testing()

-option(ENABLE_PARALLEL_TEST_EXECUTION "Execute tests in parallel" ON)
-if (ENABLE_PARALLEL_TEST_EXECUTION)
+option(DISABLE_PARALLEL_TEST_EXECUTION "Do not execute tests in parallel" OFF)
+if (DISABLE_PARALLEL_TEST_EXECUTION)
+  unset(TEST_DRIVER CACHE)
+else ()
   set(TEST_DRIVER
     "${PROJECT_SOURCE_DIR}/support/mesos-gtest-runner.py" CACHE STRING
     "GTest driver to use")
   mark_as_advanced(TEST_DRIVER)
-else ()
-  unset(TEST_DRIVER CACHE)
 endif ()

 # CONFIGURE COMPILER.


draco: Fix add_cxx_preproc_definition() behavior/usage to support setting multiple opts

- Prev, only last option would take/be appended ... results in needing to
  run build bunches of times and exploding the CMAKE_CXX_FLAGS variable
- We also no longer cache those definitions, keeping them localized
- Ref: https://github.com/google/draco/issues/306 for related discussion
   - Linked fix uses CMake add_definitions() function, but this applies to
     both C and C++-based compilation

--- cmake/compiler_flags.cmake
+++ cmake/compiler_flags.cmake
@@ -152,8 +152,7 @@
   string(FIND "${CMAKE_CXX_FLAGS}" "${preproc_def}" PREPROC_DEF_FOUND)

   if (${PREPROC_DEF_FOUND} EQUAL -1)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D${preproc_def}" CACHE STRING ""
-        FORCE)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D${preproc_def}" PARENT_SCOPE)
   endif ()
 endfunction ()


Get openal-soft for appveyor working again.

--- cmake/get-openalsoft.cmake
+++ cmake/get-openalsoft.cmake
@@ -10,7 +10,7 @@

 INCLUDE(ExternalProject)

-set(OPENALSOFT_VERSION "1.18.2")
+set(OPENALSOFT_VERSION "1.22.2")

 # For win32 it's faster to download the pre-compiled development binaries.
 if (WIN32)
@@ -19,8 +19,8 @@
         openalsoft
         PREFIX ${DEPENDENCY_EXTRACT_DIR}
         DOWNLOAD_DIR ${DEPENDENCY_DOWNLOAD_DIR}
-        URL http://kcat.strangesoft.net/openal-binaries/openal-soft-${OPENALSOFT_VERSION}-bin.zip
-        URL_MD5 03cf7160ca84c36c2e6560fb278308fc
+        URL https://openal-soft.org/openal-binaries/openal-soft-${OPENALSOFT_VERSION}-bin.zip
+        URL_MD5 6604e8e44ae9b5718ae833fc60e11ae9
         INSTALL_DIR ${DEPENDENCY_INSTALL_DIR}
         CONFIGURE_COMMAND ""
         BUILD_COMMAND ""
@@ -52,8 +52,8 @@
         openalsoft
         PREFIX ${DEPENDENCY_EXTRACT_DIR}
         DOWNLOAD_DIR ${DEPENDENCY_DOWNLOAD_DIR}
-        URL http://kcat.strangesoft.net/openal-releases/openal-soft-${OPENALSOFT_VERSION}.tar.bz2
-        URL_MD5 d4eeb0889812e2fdeaa1843523d76190
+        URL https://openal-soft.org/openal-releases/openal-soft-${OPENALSOFT_VERSION}.tar.bz2
+        URL_MD5 525cb1b825c72c143dcdf2bf8e04110f
         INSTALL_DIR ${DEPENDENCY_INSTALL_DIR}
         CMAKE_ARGS ${OPENALSOFT_CMAKE_ARGS}
     )


Removed gismo_dev from JIT configuration file.

git-svn-id: 6b1c4fe79111c0bc0cce83313250759594f8984b@8908 e128ff1e-fa79-4151-a8cb-522299a2c450

--- cmake/gsJITConfigXml.cmake
+++ cmake/gsJITConfigXml.cmake
@@ -70,13 +70,13 @@
   endif()

   # Set includes
-  string(REPLACE ";" " -I" JIT_INCLUDES "-I${GISMO_DEV_INCLUDE_DIRS} -I${GISMO_INCLUDE_DIRS} -I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_CURRENT_SOURCE_DIR}/src")
+  string(REPLACE ";" " -I" JIT_INCLUDES "-I${GISMO_INCLUDE_DIRS} -I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_CURRENT_SOURCE_DIR}/src")

   # Set library directories
-  string(REPLACE ";" " -L" JIT_LIBRARIES "-L${GISMO_LIBRARY_DIR} -L${GISMO_DEV_LIBRARY_DIR}")
+  string(REPLACE ";" " -L" JIT_LIBRARIES "-L${GISMO_LIBRARY_DIR}")

   # Set libraries
-  string(REPLACE ";" " -l" JIT_LIBRARIES "${JIT_LIBRARIES} -l${GISMO_LIBRARIES} -l${GISMO_DEV_LIBRARIES}")
+  string(REPLACE ";" " -l" JIT_LIBRARIES "${JIT_LIBRARIES} -l${GISMO_LIBRARIES}")

   # Set extra libraries
   if (DEFINED gismo_LINKER)


remove 'alpha' qualifier in version

remove 'alpha' qualifier in version

--- cmake/ospray_version.cmake
+++ cmake/ospray_version.cmake
@@ -19,7 +19,7 @@
 set(OSPRAY_VERSION_PATCH 0)
 set(OSPRAY_SOVERSION 2)
 set(OSPRAY_VERSION_GITHASH 0)
-set(OSPRAY_VERSION_NOTE "alpha")
+set(OSPRAY_VERSION_NOTE "")

 if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git AND
    IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/.git)


fix libc++ handling for 10.4+

fix libc++ handling for 10.4+

--- CMake/Mathematica/FindMathematica.cmake
+++ CMake/Mathematica/FindMathematica.cmake
@@ -804,9 +804,13 @@
 			set (${_outFlavor} "mldev32")
 		endif()
 	elseif (APPLE)
+		set (${_outFlavor} "")
 		if (Mathematica_VERSION)
-			if (NOT "${Mathematica_VERSION}" VERSION_LESS "10.0" AND Mathematica_USE_LIBCXX_LIBRARIES)
-				# Mathematica 10 added libc++ compiled version in AlternativeLibraries directory
+			if (Mathematica_USE_LIBCXX_LIBRARIES AND
+				NOT "${Mathematica_VERSION}" VERSION_LESS "10.0" AND
+				"${Mathematica_VERSION}" VERSION_LESS "10.4")
+				# Mathematica 10 added LLVM libc++ compiled version in AlternativeLibraries directory
+				# Mathematica 10.4 and later only ship with LLVM libc++ compiled version
 				set (${_outFlavor} "AlternativeLibraries")
 			endif()
 		endif()
@@ -834,9 +838,13 @@
 			endif()
 		endif()
 	elseif (CMAKE_HOST_APPLE)
+		set (${_outFlavor} "")
 		if (Mathematica_VERSION)
-			if (NOT "${Mathematica_VERSION}" VERSION_LESS "10.0" AND Mathematica_USE_LIBCXX_LIBRARIES)
-				# Mathematica 10 added libc++ compiled version in AlternativeLibraries directory
+			if (Mathematica_USE_LIBCXX_LIBRARIES AND
+				NOT "${Mathematica_VERSION}" VERSION_LESS "10.0" AND
+				"${Mathematica_VERSION}" VERSION_LESS "10.4")
+				# Mathematica 10 added LLVM libc++ compiled version in AlternativeLibraries directory
+				# Mathematica 10.4 and later only ship with LLVM libc++ compiled version
 				set (${_outFlavor} "AlternativeLibraries")
 			endif()
 		endif()
@@ -1037,7 +1045,7 @@
 	if (APPLE)
 		if (DEFINED Mathematica_MathLink_VERSION_MINOR)
 			if ("${Mathematica_MathLink_VERSION_MINOR}" GREATER 18)
-				# Apple MathLink API revision >= 19 has dependency on C++ standard library
+				# OS X MathLink API revision >= 19 has dependency on C++ standard library
 				if (Mathematica_USE_LIBCXX_LIBRARIES)
 					# LLVM libc++
 					list (APPEND ${_outLibraries} c++ )
@@ -1095,10 +1103,12 @@
 	if (APPLE)
 		if (DEFINED Mathematica_WSTP_VERSION_MINOR)
 			if ("${Mathematica_WSTP_VERSION_MINOR}" GREATER 18)
-				# Apple WSTP API revision >= 19 has dependency on c++ standard library
+				# OS X WSTP API revision >= 19 has dependency on C++ standard library
 				if (Mathematica_USE_LIBCXX_LIBRARIES)
+					# LLVM libc++
 					list (APPEND ${_outLibraries} c++ )
 				else()
+					# GNU libstdc++
 					list (APPEND ${_outLibraries} stdc++ )
 				endif()
 			endif()


Fix Cleaver nan coordinates

Fix Cleaver nan coordinates

--- CMake/Superbuild/External_Cleaver.cmake
+++ CMake/Superbuild/External_Cleaver.cmake
@@ -68,7 +68,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "git://public.kitware.com/Bender/Cleaver.git"
-    GIT_TAG "fdd780995cf9b3b250572648f7faad37dea71e95"
+    GIT_TAG "09af87b1c9c07e8241c524572d2b38381bf6ce6f"
     UPDATE_COMMAND ""
     INSTALL_COMMAND ""
     CMAKE_GENERATOR ${gen}


Minor code clean up on setting up the RPI supported ABIs. [ci skip]

--- CMake/Modules/Urho3D-CMake-common.cmake
+++ CMake/Modules/Urho3D-CMake-common.cmake
@@ -163,11 +163,12 @@
             # We have no way to know for sure so just give all the available options to user
             list (APPEND RPI_SUPPORTED_ABIS armeabi-v7a "armeabi-v7a with NEON" "armeabi-v7a with VFPV4")
         else ()
+            # If not cross-compiling then we should be on the host system (device) itself, so below command is safe to be executed
             execute_process (COMMAND uname -m OUTPUT_VARIABLE HOST_MACHINE ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
             if (HOST_MACHINE MATCHES ^armv7)
-                set (RPI_SUPPORTED_ABIS armeabi-v6 armeabi-v7a "armeabi-v7a with NEON" "armeabi-v7a with VFPV4")
+                list (APPEND RPI_SUPPORTED_ABIS armeabi-v7a "armeabi-v7a with NEON" "armeabi-v7a with VFPV4")
                 if (NOT RPI_ABI)
-                    set (RPI_ABI armeabi-v7a)
+                    set (RPI_ABI armeabi-v7a)   # Set default to this specific target device
                 endif ()
             endif ()
         endif ()


cmake: remove -mf16c flag for android build (#17523)

Co-authored-by: Leonard Lausen <1828f72b2bad7e3ece38a8c55b121b66ea999efd@lausen.nl>

--- 3rdparty/mshadow/cmake/AutoDetectF16C.cmake
+++ 3rdparty/mshadow/cmake/AutoDetectF16C.cmake
@@ -25,8 +25,11 @@
   return()
 endif()
 set(AUTO_DETECT_F16_CMAKE_INCLUDED True)
-
 set(SUPPORT_F16C False)
+if(ANDROID)
+    message("F16C instruction set is not yet supported for Andriod")
+    return()
+endif()
 if(MSVC)
     message("F16C instruction set is not yet supported for MSVC")
     return()


haskell-build-fixes: some structural improvements in LibAddHaskellPlugin

--- cmake/Modules/LibAddHaskellPlugin.cmake
+++ cmake/Modules/LibAddHaskellPlugin.cmake
@@ -162,10 +162,14 @@
 	set (GHC_PRIM_PATH "${GHC_LIB_DIR}/${GHC_PRIM_NAME}")
 	find_library (GHC_PRIM_LIB "HS${GHC_PRIM_NAME}${GHC_DYNAMIC_SUFFIX}" PATHS ${GHC_PRIM_PATH})

+	set (PLUGIN_HASKELL_NAME "${CMAKE_CURRENT_BINARY_DIR}/libHS${target}${GHC_DYNAMIC_SUFFIX}${GHC_DYNAMIC_ENDING}")
+	set (GHC_LIBS ${GHC_RTS_LIB} ${GHC_BASE_LIB} ${GHC_GMP_LIB} gmp ${GHC_PRIM_LIB} ${PLUGIN_HASKELL_NAME})
+
 	# GHC's structure differs between OSX and Linux
 	# On OSX we need to link iconv and Cffi additionally
 	if (APPLE)
 		find_library (GHC_FFI_LIB Cffi PATHS "${GHC_LIB_DIR}/rts")
+		set (GHC_LIBS ${GHC_LIBS} ${GHC_FFI_LIB} iconv)
 	endif (APPLE)

 	set (HASKELL_RPATH
@@ -176,27 +180,20 @@
 	     "${CMAKE_INSTALL_RPATH}"
 	     "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/elektra/haskell")

-	set (PLUGIN_HASKELL_NAME "${CMAKE_CURRENT_BINARY_DIR}/libHS${target}${GHC_DYNAMIC_SUFFIX}${GHC_DYNAMIC_ENDING}")
 	if (GHC_RTS_LIB)
 		if (GHC_BASE_LIB)
 			if (GHC_GMP_LIB)
 				if (GHC_PRIM_LIB)
-					if (GHC_FFI_LIB)
+					if (GHC_FFI_LIB OR NOT APPLE)
 						compile_haskell_plugin (${target}
 									${PLUGIN_HASKELL_NAME}
-									${GHC_RTS_LIB}
-									${GHC_BASE_LIB}
-									${GHC_GMP_LIB}
-									${GHC_PRIM_LIB}
-									GHC_FFI_LIB
-									${GHC_FFI_LIB}
 									SANDBOX_ADD_SOURCES
 									${ARG_SANDBOX_ADD_SOURCES}
 									ADDITIONAL_SOURCES
 									${ARG_ADDITIONAL_SOURCES})
-					else (GHC_FFI_LIB)
+					else (GHC_FFI_LIB OR NOT APPLE)
 						remove_plugin (${target} "GHC_FFI_LIB not found")
-					endif (GHC_FFI_LIB)
+					endif (GHC_FFI_LIB OR NOT APPLE)
 				else (GHC_PRIM_LIB)
 					remove_plugin (${target} "GHC_PRIM_LIB not found")
 				endif (GHC_PRIM_LIB)
@@ -211,13 +208,8 @@
 	endif (GHC_RTS_LIB)
 endmacro (prepare_and_compile_haskell_plugin)

-macro (compile_haskell_plugin target PLUGIN_HASKELL_NAME GHC_RTS_LIB GHC_BASE_LIB GHC_GMP_LIB GHC_PRIM_LIB)
-	cmake_parse_arguments (ARG "GHC_FFI_LIB" "" "SANDBOX_ADD_SOURCES ADDITIONAL_SOURCES" ${ARGN})
-
-	set (GHC_LIBS ${GHC_RTS_LIB} ${GHC_BASE_LIB} ${GHC_GMP_LIB} gmp ${GHC_PRIM_LIB} ${PLUGIN_HASKELL_NAME})
-	if (APPLE)
-		set (GHC_LIBS ${GHC_LIBS} ${GHC_FFI_LIB} iconv)
-	endif (APPLE)
+macro (compile_haskell_plugin target PLUGIN_HASKELL_NAME)
+	cmake_parse_arguments (ARG "" "" "SANDBOX_ADD_SOURCES ADDITIONAL_SOURCES" ${ARGN})

 	# configure include paths
 	configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/${target}.cabal.in" "${CMAKE_CURRENT_BINARY_DIR}/${target}.cabal" @ONLY)


Updated NO_POSTFIX_BUILD_TYPES to a list to be able to specify RelWithDebInfo and Release

--- cmake/cmake_celix/BundlePackaging.cmake
+++ cmake/cmake_celix/BundlePackaging.cmake
@@ -17,7 +17,7 @@
 # under the License.

-set(CELIX_NO_POSTFIX_BUILD_TYPE "RelWithDebInfo" CACHE STRING "The build type used for creating bundle without a build type postfix.")
+set(CELIX_NO_POSTFIX_BUILD_TYPES RelWithDebInfo Release CACHE STRING "The build type used for creating bundle without a build type postfix.")

 find_program(JAR_COMMAND jar NO_CMAKE_FIND_ROOT_PATH)

@@ -198,7 +198,7 @@
         set(BUNDLE_FILENAME ${BUNDLE_TARGET_NAME})
     endif ()

-    if ("${CMAKE_BUILD_TYPE}" STREQUAL "${CELIX_NO_POSTFIX_BUILD_TYPE}")
+    if (${CMAKE_BUILD_TYPE} IN_LIST CELIX_NO_POSTFIX_BUILD_TYPES)
         set(BUNDLE_FILENAME ${BUNDLE_FILENAME}.zip)
     else ()
         set(BUNDLE_FILENAME ${BUNDLE_FILENAME}-${CMAKE_BUILD_TYPE}.zip)


Fix breakpad module if condition

Fix breakpad module if condition

--- cmake/modules/BuildGoogleBreakpad.cmake
+++ cmake/modules/BuildGoogleBreakpad.cmake
@@ -2,7 +2,7 @@

 if(WIN32 AND NOT MINGW)
   set(_byproducts)
-  if(NOT MSVC)
+  if(NOT MSBUILD)
     set(_byproducts
       ${BREAKPAD_EXCEPTION_HANDLER_INSTALL_DIR}/lib/breakpad/client/windows/lib/common.lib
       ${BREAKPAD_EXCEPTION_HANDLER_INSTALL_DIR}/lib/breakpad/client/windows/handler/lib/exception_handler.lib


fix whitespace

fix whitespace

--- test.cmake
+++ test.cmake
@@ -19,7 +19,7 @@
    string(TOLOWER "$ENV{TARGET_PLATFORM}" arch)
    if(arch)
       if("$ENV{WindowsSDKVersionOverride}")
-	 set(arch "${arch} SDK $ENV{WindowsSDKVersionOverride}")
+         set(arch "${arch} SDK $ENV{WindowsSDKVersionOverride}")
       endif()
    else()
       string(TOLOWER "${CMAKE_SYSTEM_NAME}" arch)
@@ -50,8 +50,8 @@
    set(number_of_processors "$ENV{NUMBER_OF_PROCESSORS}")
    if(NOT number_of_processors)
       execute_process(COMMAND
-	 reg query "HKLM\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor"
-	 OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE number_of_processors)
+         reg query "HKLM\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor"
+         OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE number_of_processors)
       string(REGEX REPLACE "[^0-9]+" "," number_of_processors "${number_of_processors}")
       string(REGEX REPLACE "^.*," "" number_of_processors "${number_of_processors}")
       math(EXPR number_of_processors "1 + ${number_of_processors}")


feat: Ignore warnings in generated code. (#2948)

We want to ignore any warnings in headers generated by the protobuf
compiler (or the gRPC plugin) because (a) they generate a lot of
warnings, and (b) we cannot easily fix those warnings.

--- cmake/CompileProtos.cmake
+++ cmake/CompileProtos.cmake
@@ -259,8 +259,10 @@
                  PROPERTY PROTO_SOURCES ${_opt_UNPARSED_ARGUMENTS})
     target_link_libraries(${libname}
                           PUBLIC gRPC::grpc++ gRPC::grpc protobuf::libprotobuf)
+    # We want to treat the generated code as "system" headers so they get
+    # ignored by the more aggressive warnings.
     target_include_directories(
-        ${libname}
+        ${libname} SYSTEM
         PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
                $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
                $<INSTALL_INTERFACE:include>)


Do not generate flags with c++ inside for cmake

Cmake try to use them as REGEX match, and the "++" confuses it

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -69,13 +69,14 @@
 endif()

 macro(add_warning_flag _flag_)
-    CHECK_CXX_COMPILER_FLAG("${_flag_}" CXX_SUPPORTS${_flag_})
-    CHECK_C_COMPILER_FLAG("${_flag_}" CC_SUPPORTS${_flag_})
-    if(CXX_SUPPORTS${_flag_})
+    string(REPLACE "++" "xx" _cleaned_flag_ ${_flag_})
+    CHECK_CXX_COMPILER_FLAG("${_flag_}" CXX_SUPPORTS${_cleaned_flag_})
+    CHECK_C_COMPILER_FLAG("${_flag_}" CC_SUPPORTS${_cleaned_flag_})
+    if(CXX_SUPPORTS${_cleaned_flag_})
         set(CHEMFILES_CXX_WARNINGS "${CHEMFILES_CXX_WARNINGS} ${_flag_}")
     endif()

-    if(CC_SUPPORTS${_flag_})
+    if(CC_SUPPORTS${_cleaned_flag_})
         set(CHEMFILES_C_WARNINGS "${CHEMFILES_C_WARNINGS} ${_flag_}")
     endif()
 endmacro()
@@ -159,7 +160,7 @@

     # Disable some warning implied by -Weverything
     # -Weverything is not activated by default, but adding these flags help
-    # when adding it manually to check for new warnings
+    # when adding it manually to check for new warnings
     add_warning_flag("-Wno-c++98-compat")
     add_warning_flag("-Wno-c++98-compat-pedantic")
     add_warning_flag("-Wno-weak-vtables")


Define FREEIMAGE_LIBRARIES.

Define FREEIMAGE_LIBRARIES.

git-svn-id: bd2008fbba0f7d30fd6598b54f2cd88503fdd2e4@559 95f4ed2b-212e-0410-8b90-d31948207fce

--- cmake/FindFreeImage.cmake
+++ cmake/FindFreeImage.cmake
@@ -38,10 +38,17 @@
 		DOC "The FreeImage library")
 ENDIF (WIN32)

+SET(FREEIMAGE_LIBRARIES ${FREEIMAGE_LIBRARY})
+
 IF (FREEIMAGE_INCLUDE_PATH)
 	SET( FREEIMAGE_FOUND TRUE CACHE BOOL "Set to TRUE if GLEW is found, FALSE otherwise")
 ELSE (FREEIMAGE_INCLUDE_PATH)
 	SET( FREEIMAGE_FOUND FALSE CACHE BOOL "Set to TRUE if GLEW is found, FALSE otherwise")
 ENDIF (FREEIMAGE_INCLUDE_PATH)

-MARK_AS_ADVANCED( FREEIMAGE_FOUND )
+MARK_AS_ADVANCED(
+	FREEIMAGE_FOUND
+	FREEIMAGE_LIBRARY
+	FREEIMAGE_LIBRARIES
+	FREEIMAGE_INCLUDE_PATH)
+


Fix if(not target) guards in FindXaptumTPM.cmake.

--- cmake/FindXaptumTPM.cmake
+++ cmake/FindXaptumTPM.cmake
@@ -12,7 +12,7 @@
 #    See the License for the specific language governing permissions and
 #    limitations under the License

-if (NOT TARGET xaptum-tpm)
+if (NOT TARGET xaptumtpm)
         if (NOT XAPTUM_TPM_LOCAL_DIR)
                 set(XAPTUM_TPM_LOCAL_DIR "${CMAKE_CURRENT_LIST_DIR}/../xaptum-tpm")
         endif (NOT XAPTUM_TPM_LOCAL_DIR)
@@ -28,4 +28,4 @@
         set(XAPTUM_TPM_LIBRARIES ${XAPTUM_TPM_LIBRARY})

         set(XAPTUM_TPM_FOUND TRUE)
-endif (NOT TARGET xaptum-tpm)
+endif (NOT TARGET xaptumtpm)


Fix include dir

Fix include dir

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -102,6 +102,7 @@
 	${HALLEY_PATH}/engine/utils/include
 	${HALLEY_PATH}/engine/entity/include
 	${HALLEY_PATH}/engine/audio/include
+	${Boost_INCLUDE_DIR}
 	)

 set(HALLEY_PROJECT_LIB_DIRS


Removed pack_source

Removed pack_source

--- cmake/MyPackagePack.cmake
+++ cmake/MyPackagePack.cmake
@@ -136,12 +136,6 @@
   # We use a custom target for package generation.
   # In addition documentation is generated using the INSTALL(CODE xxx) hack.
   #
-  ADD_CUSTOM_TARGET(pack_source
-    COMMAND ${CMAKE_MAKE_PROGRAM} package_source
-    COMMENT "Packaging Source files"
-    DEPENDS man
-    VERBATIM
-    )
   ADD_CUSTOM_TARGET(pack
     COMMAND ${CMAKE_MAKE_PROGRAM} package
     COMMENT "Packaging Source files"


Fix the missing flags

Fix the missing flags

--- cmake/arm-toolchain.cmake
+++ cmake/arm-toolchain.cmake
@@ -34,7 +34,6 @@

   set(CXX_COMPILE_FLAGS "-fno-rtti -fno-exceptions")

-  set(CMAKE_CXX_FLAGS "${MCU_FLAGS} ${ABI_FLAGS} ${CXX_COMPILE_FLAGS}")
-  set(CMAKE_C_FLAGS "${MCU_FLAGS} ${ABI_FLAGS}")
-
+  set(CMAKE_CXX_FLAGS "${MCU_FLAGS} ${ABI_FLAGS} ${CXX_COMPILE_FLAGS}" CACHE STRING "cxx flags" FORCE)
+  set(CMAKE_C_FLAGS "${MCU_FLAGS} ${ABI_FLAGS}" CACHE STRING "c flags" FORCE)
 endif()


add code to store things to our symbol server.

--- cmake/packages/nsis.cmake
+++ cmake/packages/nsis.cmake
@@ -111,3 +111,10 @@

 list(APPEND CLEAN_PACKAGES_LIST remove_packages)

+if (NOT ${ENV{SYMSRV}} STREQUAL "")
+  message("Storing symbols:")
+  add_custom_command(TARGET ${BIN_ARANGOD} POST_BUILD
+    WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+    COMMAND "find -name \*pdb |grep -v Release |grep -v Debug |grep -v 3rdParty |grep -v vc120.pdb  > pdbfiles_list.txt"
+    COMMAND "symstore.exe add /f '@${PROJECT_BINARY_DIR}/pdbfiles_list.txt' /s '${ENV{SYMSRV}}' /t ArangoDB /compress")
+endif()


Issue #21: Ensure C++11 flag is passed to OpenCV

--- CMake/ExternalProjects/OpenCV.cmake
+++ CMake/ExternalProjects/OpenCV.cmake
@@ -92,7 +92,7 @@
       -DWITH_OPENMP:BOOL=${MYPROJECT_USE_OPENMP}
       ${_vtk_options}
       ${_cuda_options}
-      "-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} -DVTK_MAJOR_VERSION=6" # Doesn't matter what version, as long as > 5.
+      "-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} ${MYPROJECT_CXX11_FLAG} -DVTK_MAJOR_VERSION=6" # Doesn't matter what version, as long as > 5.
       ${additional_cmake_args}
     CMAKE_CACHE_ARGS
       ${EP_COMMON_CACHE_ARGS}


Fix fileno compilation warning in ctkErrorLogFDMessageHandler

Closes #9

--- CMake/SuperBuild/External_CTK.cmake
+++ CMake/SuperBuild/External_CTK.cmake
@@ -61,7 +61,7 @@
     BINARY_DIR ${CMAKE_BINARY_DIR}/${proj}-build
     PREFIX ${proj}${ep_suffix}
     GIT_REPOSITORY "${git_protocol}://github.com/commontk/CTK.git"
-    GIT_TAG "2ace7a3a58f1fe00fa47494c73966afce2d81ea0"
+    GIT_TAG "01f1a76fe7366de8caaf0eb349614b4a9978150f"
     UPDATE_COMMAND ""
     INSTALL_COMMAND ""
     CMAKE_GENERATOR ${gen}


Fixed a bug causing cross-compilers to fail (#101)

(The edited line eliminated the original CXXFLAGS variable, removing the sysroots parameter, which is needed for cross compiling)

--- Build.cmake
+++ Build.cmake
@@ -52,7 +52,7 @@
        set(CMAKE_CXX_FLAGS "-Wall -Wunused -std=c++11  -pthread -D_GLIBCXX_USE_NANOSLEEP -D_GLIBCXX_USE_SCHED_YIELD")
    ELSE()
        set(PLATFORM_LINK_LIBRIES rt)
-       set(CMAKE_CXX_FLAGS "-Wall -rdynamic -Wunused -std=c++11 -pthread -D_GLIBCXX_USE_NANOSLEEP -D_GLIBCXX_USE_SCHED_YIELD")
+       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -rdynamic -Wunused -std=c++11 -pthread -D_GLIBCXX_USE_NANOSLEEP -D_GLIBCXX_USE_SCHED_YIELD")
    ENDIF()
 ENDIF()


Disable extra inclusion glob for now

Disable extra inclusion glob for now

git-svn-id: 59f82343654cec32357d3b049d399063e4e4cfc7@31312 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/CTestConfig.cmake
+++ deal.II/CTestConfig.cmake
@@ -39,8 +39,7 @@

 SET(CTEST_EXTRA_COVERAGE_GLOB
   # These files should have executable lines and therefore coverage:
-  include/**/*.h
-  source/**/*.cc
+  # source/**/*.cc
   )

 SET(CTEST_CUSTOM_COVERAGE_EXCLUDE


exclude some tests that are failing or not compiling yet.

--- tensorflow/contrib/cmake/tf_tests.cmake
+++ tensorflow/contrib/cmake/tf_tests.cmake
@@ -122,7 +122,8 @@
   set(tf_test_src_py_exclude
     # generally not working
     "${tensorflow_source_dir}/tensorflow/python/kernel_tests/__init__.py"
-	"${tensorflow_source_dir}//tensorflow/python/kernel_tests/benchmark_test.py"
+	"${tensorflow_source_dir}/tensorflow/python/kernel_tests/benchmark_test.py"
+    "${tensorflow_source_dir}/tensorflow/python/kernel_tests/resource_variable_ops_test.py"
   )
   if (WIN32)
     set(tf_test_src_py_exclude
@@ -135,28 +136,28 @@
       # The failing list is grouped by failure source
       # stl on windows handles overflows different
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/as_string_op_test.py"
-	  "${tensorflow_source_dir}/tensorflow/python/kernel_tests/cast_op_test.py"
-	  "${tensorflow_source_dir}/tensorflow/python/kernel_tests/string_to_number_op_test.py"
-	  "${tensorflow_source_dir}/tensorflow/python/kernel_tests/clip_ops_test.py"
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/cast_op_test.py"
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/string_to_number_op_test.py"
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/clip_ops_test.py"
       # misc
-	  "${tensorflow_source_dir}/tensorflow/python/kernel_tests/cwise_ops_test.py"
-	  "${tensorflow_source_dir}/tensorflow/python/kernel_tests/variable_scope_test.py"
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/cwise_ops_test.py"
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/variable_scope_test.py"
       # int32/int64 mixup
-	  "${tensorflow_source_dir}/tensorflow/python/kernel_tests/functional_ops_test.py"
-	  "${tensorflow_source_dir}/tensorflow/python/kernel_tests/py_func_test.py"
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/functional_ops_test.py"
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/py_func_test.py"
       # issues related to windows fs
-	  "${tensorflow_source_dir}/tensorflow/python/kernel_tests/io_ops_test.py"
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/io_ops_test.py"
       # missing kernel
-	  "${tensorflow_source_dir}/tensorflow/python/kernel_tests/pooling_ops_test.py"
-	  "${tensorflow_source_dir}/tensorflow/python/kernel_tests/conv_ops_test.py"
-	  "${tensorflow_source_dir}/tensorflow/python/kernel_tests/depthwise_conv_op_test.py"
-	  "${tensorflow_source_dir}/tensorflow/python/kernel_tests/fractional_avg_pool_op_test.py"
-	  "${tensorflow_source_dir}/tensorflow/python/kernel_tests/pool_test.py"
-	  "${tensorflow_source_dir}/tensorflow/python/kernel_tests/svd_op_test.py"
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/pooling_ops_test.py"
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/conv_ops_test.py"
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/depthwise_conv_op_test.py"
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/fractional_avg_pool_op_test.py"
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/pool_test.py"
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/svd_op_test.py"
       # cuda launch failed
-	  "${tensorflow_source_dir}/tensorflow/python/kernel_tests/diag_op_test.py"
-	  "${tensorflow_source_dir}/tensorflow/python/kernel_tests/trace_op_test.py"
-	  "${tensorflow_source_dir}/tensorflow/python/kernel_tests/one_hot_op_test.py" # gpu, T=uint8
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/diag_op_test.py"
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/trace_op_test.py"
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/one_hot_op_test.py" # gpu, T=uint8
     )
   endif()
   list(REMOVE_ITEM tf_test_src_py ${tf_test_src_py_exclude})
@@ -188,12 +189,20 @@
     "${tensorflow_source_dir}/tensorflow/core/platform/test.cc"
     "${tensorflow_source_dir}/tensorflow/core/platform/test_main.cc"
     "${tensorflow_source_dir}/tensorflow/core/platform/default/test_benchmark.cc"
+    "${tensorflow_source_dir}/tensorflow/c/c_api.cc"
+    "${tensorflow_source_dir}/tensorflow/c/checkpoint_reader.cc"
+    "${tensorflow_source_dir}/tensorflow/c/tf_status_helper.cc"
   )

   # include all test
   file(GLOB_RECURSE tf_test_src_simple
-    "${tensorflow_source_dir}/tensorflow/*_test.cc"
-  )
+    "${tensorflow_source_dir}/tensorflow/cc/*_test.cc"
+    "${tensorflow_source_dir}/tensorflow/python/*_test.cc"
+    "${tensorflow_source_dir}/tensorflow/core/*_test.cc"
+    "${tensorflow_source_dir}/tensorflow/user_ops/*_test.cc"
+    "${tensorflow_source_dir}/tensorflow/contrib/rnn/*_test.cc"
+  )
+
   if (NOT tensorflow_ENABLE_GPU)
     # exclude gpu tests if we are not buildig for gpu
     set(tf_test_src_simple_exclude
@@ -214,18 +223,114 @@
     "${tensorflow_source_dir}/tensorflow/cc/framework/gradients_test.cc"
     "${tensorflow_source_dir}/tensorflow/core/distributed_runtime/call_options_test.cc"
     "${tensorflow_source_dir}/tensorflow/core/distributed_runtime/tensor_coding_test.cc"
-    "${tensorflow_source_dir}/tensorflow/core/distributed_runtime/rpc/rpc_rendezvous_mgr_test.cc"
   )

   if (WIN32)
     set(tf_test_src_simple_exclude
       ${tf_test_src_simple_exclude}
       # generally excluded
-      "${tensorflow_source_dir}/tensorflow/cc/client/client_session_test.cc"
-
+      "${tensorflow_source_dir}/tensorflow/contrib/ffmpeg/default/ffmpeg_lib_test.cc"
+      "${tensorflow_source_dir}/tensorflow/cc/framework/cc_ops_test.cc" # test_op.h missing
+
+      # TODO: test failing
+      "${tensorflow_source_dir}/tensorflow/core/common_runtime/simple_placer_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/distributed_runtime/executor_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/quantized_reshape_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/requantization_range_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/requantize_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/restore_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/restore_v2_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/save_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/sparse_reduce_sum_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/restore_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/lib/core/status_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/lib/strings/str_util_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/lib/strings/numbers_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/lib/monitoring/collection_registry_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/util/tensor_slice_reader_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/platform/file_system_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/platform/logging_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/platform/env_test.cc"
+      "${tensorflow_source_dir}/tensorflow/ops/math_grad_test.cc"
+      "${tensorflow_source_dir}/tensorflow/contrib/cudnn_rnn/cudnn_rnn_ops_test.cc"
+      "${tensorflow_source_dir}/tensorflow/contrib/rnn/ops/gru_ops_test.cc" # status 5
+      "${tensorflow_source_dir}/tensorflow/contrib/rnn/ops/lstm_ops_test.cc" # status 5
+
       # TODO: not compiling
-
-      # TODO: test failing
+      "${tensorflow_source_dir}/tensorflow/cc/framework/gradient_checker_test.cc"
+      "${tensorflow_source_dir}/tensorflow/cc/gradients/math_grad_test.cc"
+      "${tensorflow_source_dir}/tensorflow/cc/saved_model/loader_test.cc"
+      "${tensorflow_source_dir}/tensorflow/cc/training/queue_runner_test.cc"
+      "${tensorflow_source_dir}/tensorflow/cc/gradients/math_grad_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/nn_ops_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/quantization_utils_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/activation_ops_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/batch_norm_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/bias_add_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/concat_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/conv_ops_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/matmul_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/pooling_ops_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/quantize_and_dequantize_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/quantize_down_and_shrink_range_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/parameterized_truncated_normal_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/non_max_suppression_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/fused_batch_norm_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/eigen_backward_spatial_convolutions_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/hexagon/quantized_matmul_op_for_hexagon_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/adjust_contrast_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/batch_norm_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/cast_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/colorspace_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/control_flow_ops_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/conv_ops_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/debug_ops_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/resize_bilinear_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/resize_nearest_neighbor_op_benchmark_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/spacetobatch_benchmark_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/sparse_add_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/sparse_dense_binary_op_shared_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/sparse_tensor_dense_matmul_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/summary_image_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/summary_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/platform/cloud/gcs_file_system_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/platform/cloud/google_auth_provider_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/platform/cloud/http_request_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/platform/cloud/oauth_client_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/platform/cloud/retrying_file_system_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/platform/cloud/time_util_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/platform/hadoop/hadoop_file_system_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/platform/port_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/platform/profile_utils/utils_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/common_runtime/direct_session_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/common_runtime/direct_session_with_tracking_alloc_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/common_runtime/gpu/gpu_allocator_retry_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/common_runtime/gpu/gpu_debug_allocator_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/distributed_runtime/master_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/distributed_runtime/remote_device_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/distributed_runtime/rpc/grpc_channel_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/distributed_runtime/rpc/grpc_session_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/distributed_runtime/rpc/grpc_tensor_coding_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/distributed_runtime/rpc/rpc_rendezvous_mgr_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/distributed_runtime/master_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/framework/partial_tensor_shape_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/lib/core/notification_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/lib/gtl/cleanup_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/lib/gtl/edit_distance_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/lib/strings/strcat_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/ops/array_grad_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/ops/nn_ops_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/example/*_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/util/*_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/debug/*_test.cc"
+      "${tensorflow_source_dir}/tensorflow/contrib/factorization/kernels/clustering_ops_test.cc"
+      "${tensorflow_source_dir}/tensorflow/contrib/session_bundle/bundle_shim_test.cc"
+      "${tensorflow_source_dir}/tensorflow/contrib/session_bundle/bundle_test.cc"
+      "${tensorflow_source_dir}/tensorflow/contrib/session_bundle/signature_test.cc"
+      "${tensorflow_source_dir}/tensorflow/contrib/tensor_forest/core/ops/training_ops_test.cc"
+      "${tensorflow_source_dir}/tensorflow/contrib/tensor_forest/core/ops/tree_utils_test.cc"
+      "${tensorflow_source_dir}/tensorflow/contrib/tensor_forest/core/data/sparse_values_to_indices_test.cc"
+      "${tensorflow_source_dir}/tensorflow/contrib/util/*_test.cc"
     )
   endif()

@@ -235,7 +340,7 @@
   add_library(${tf_test_lib} STATIC ${tf_src_testlib})

   # this is giving to much objects and libraries to the linker but
-  # it makes this script much easier to read
+  # it makes this script much easier. So for now we do it this way.
   set(tf_obj_test
     $<TARGET_OBJECTS:tf_core_lib>
     $<TARGET_OBJECTS:tf_core_cpu>
@@ -260,5 +365,6 @@
     SOURCES ${tf_test_src_simple}
     OBJECTS ${tf_obj_test}
     LIBS ${tf_test_libs}
+    DEPENDS googletest
   )
 endif(tensorflow_BUILD_CC_TESTS)


after clean jenkins build some tweaks to the exclusion list

--- tensorflow/contrib/cmake/tf_tests.cmake
+++ tensorflow/contrib/cmake/tf_tests.cmake
@@ -142,6 +142,7 @@
       # misc
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/cwise_ops_test.py"
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/variable_scope_test.py"
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/reshape_op_test.py"
       # int32/int64 mixup
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/functional_ops_test.py"
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/py_func_test.py"
@@ -243,6 +244,7 @@
       "${tensorflow_source_dir}/tensorflow/core/kernels/save_op_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/kernels/sparse_reduce_sum_op_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/kernels/restore_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/quantize_op_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/lib/core/status_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/lib/strings/str_util_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/lib/strings/numbers_test.cc"
@@ -251,7 +253,7 @@
       "${tensorflow_source_dir}/tensorflow/core/platform/file_system_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/platform/logging_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/platform/env_test.cc"
-      "${tensorflow_source_dir}/tensorflow/ops/math_grad_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/ops/math_grad_test.cc"
       "${tensorflow_source_dir}/tensorflow/contrib/cudnn_rnn/cudnn_rnn_ops_test.cc"
       "${tensorflow_source_dir}/tensorflow/contrib/rnn/ops/gru_ops_test.cc" # status 5
       "${tensorflow_source_dir}/tensorflow/contrib/rnn/ops/lstm_ops_test.cc" # status 5
@@ -259,9 +261,10 @@
       # TODO: not compiling
       "${tensorflow_source_dir}/tensorflow/cc/framework/gradient_checker_test.cc"
       "${tensorflow_source_dir}/tensorflow/cc/gradients/math_grad_test.cc"
+      "${tensorflow_source_dir}/tensorflow/cc/gradients/array_grad_test.cc"
       "${tensorflow_source_dir}/tensorflow/cc/saved_model/loader_test.cc"
       "${tensorflow_source_dir}/tensorflow/cc/training/queue_runner_test.cc"
-      "${tensorflow_source_dir}/tensorflow/cc/gradients/math_grad_test.cc"
+      "${tensorflow_source_dir}/tensorflow/cc/training/coordinator_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/kernels/nn_ops_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/kernels/quantization_utils_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/kernels/activation_ops_test.cc"
@@ -278,6 +281,7 @@
       "${tensorflow_source_dir}/tensorflow/core/kernels/fused_batch_norm_op_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/kernels/eigen_backward_spatial_convolutions_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/kernels/hexagon/quantized_matmul_op_for_hexagon_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/hexagon/hexagon_graph_transferer_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/kernels/adjust_contrast_op_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/kernels/batch_norm_op_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/kernels/cast_op_test.cc"
@@ -293,6 +297,13 @@
       "${tensorflow_source_dir}/tensorflow/core/kernels/sparse_tensor_dense_matmul_op_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/kernels/summary_image_op_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/kernels/summary_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/quantized_activation_ops_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/quantized_bias_add_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/quantized_concat_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/quantized_conv_ops_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/quantized_matmul_op_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/quantized_pooling_ops_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/kernels/quantized_batch_norm_op_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/platform/cloud/gcs_file_system_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/platform/cloud/google_auth_provider_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/platform/cloud/http_request_test.cc"
@@ -301,7 +312,7 @@
       "${tensorflow_source_dir}/tensorflow/core/platform/cloud/time_util_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/platform/hadoop/hadoop_file_system_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/platform/port_test.cc"
-      "${tensorflow_source_dir}/tensorflow/core/platform/profile_utils/utils_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/platform/profile_utils/cpu_utils_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/common_runtime/direct_session_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/common_runtime/direct_session_with_tracking_alloc_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/common_runtime/gpu/gpu_allocator_retry_test.cc"
@@ -320,9 +331,13 @@
       "${tensorflow_source_dir}/tensorflow/core/lib/strings/strcat_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/ops/array_grad_test.cc"
       "${tensorflow_source_dir}/tensorflow/core/ops/nn_ops_test.cc"
-      "${tensorflow_source_dir}/tensorflow/core/example/*_test.cc"
-      "${tensorflow_source_dir}/tensorflow/core/util/*_test.cc"
-      "${tensorflow_source_dir}/tensorflow/core/debug/*_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/example/example_parser_configuration_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/example/feature_util_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/util/reporter_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/util/memmapped_file_system_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/util/sparse_sparse_tensor_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/debug/debug_gateway_test.cc"
+      "${tensorflow_source_dir}/tensorflow/core/debug/debug_io_utils_test.cc"
       "${tensorflow_source_dir}/tensorflow/contrib/factorization/kernels/clustering_ops_test.cc"
       "${tensorflow_source_dir}/tensorflow/contrib/session_bundle/bundle_shim_test.cc"
       "${tensorflow_source_dir}/tensorflow/contrib/session_bundle/bundle_test.cc"
@@ -330,7 +345,6 @@
       "${tensorflow_source_dir}/tensorflow/contrib/tensor_forest/core/ops/training_ops_test.cc"
       "${tensorflow_source_dir}/tensorflow/contrib/tensor_forest/core/ops/tree_utils_test.cc"
       "${tensorflow_source_dir}/tensorflow/contrib/tensor_forest/core/data/sparse_values_to_indices_test.cc"
-      "${tensorflow_source_dir}/tensorflow/contrib/util/*_test.cc"
     )
   endif()


rename xpSetFlags<Compiler> macros

rename xpSetFlags<Compiler> macros

* was xpSetMsvcFlags and xpSetGccFlags - now xpSetFlagsMsvc and xpSetFlagsGcc
* easier to search for xpSetFlags and see all the variations

issue https://github.com/smanders/externpro/issues/180

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -1837,7 +1837,7 @@
   endif()
 endmacro()

-macro(xpSetMsvcFlags)
+macro(xpSetFlagsMsvc)
   add_definitions(
     -D_CRT_NONSTDC_NO_DEPRECATE
     -D_CRT_SECURE_NO_WARNINGS
@@ -1877,7 +1877,7 @@
   xpStringAppendIfDne(CMAKE_CXX_FLAGS "/wd4351") # new behavior: elements of array will be default initialized
 endmacro()

-macro(xpSetGccFlags)
+macro(xpSetFlagsGcc)
   include(CheckCCompilerFlag)
   include(CheckCXXCompilerFlag)
   option(XP_USE_ASAN "use address sanitizer" OFF)
@@ -1945,9 +1945,9 @@
     set(XP_CMAKE_REPO_INSYNC ON) # cmake error if repo and cmake are not in sync
   endif()
   if(MSVC)
-    xpSetMsvcFlags()
+    xpSetFlagsMsvc()
   elseif(CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
-    xpSetGccFlags()
+    xpSetFlagsGcc()
   endif()
 endmacro()


Clang exits with 1 when asked about its version.

--- cmake/Modules/Platform/WebAssembly.cmake
+++ cmake/Modules/Platform/WebAssembly.cmake
@@ -104,7 +104,7 @@
 		                RESULT_VARIABLE _cmake_compiler_result
 		                OUTPUT_VARIABLE _cmake_compiler_output
 		                ERROR_VARIABLE _cmake_compiler_output)
-		if (NOT _cmake_compiler_result EQUAL 0)
+		if (NOT _cmake_compiler_result EQUAL 1)
 			message(FATAL_ERROR "Failed to fetch compiler version information with command \"'${CMAKE_C_COMPILER}' -v\"! Process returned with error code ${_cmake_compiler_result}.")
 		endif()
 		string(REGEX MATCH "clang version ([0-9\.]+)"


Fix install of headerfiles when src/vespa/name does not match modulename.

--- functions.cmake
+++ functions.cmake
@@ -182,7 +182,7 @@

     if(ARG_INSTALL)
         install(TARGETS ${TARGET} DESTINATION ${ARG_INSTALL})
-        __install_header_files(${TARGET})
+        __install_header_files()
     endif()

     if(ARG_OUTPUT_NAME)
@@ -193,15 +193,23 @@
     __export_include_directories(${TARGET})
 endfunction()

-function(__install_header_files TARGET)
-    # Only install header files for main libraries (that does not contain underscore).
-    # Currently all header files are installed as they are not explicitly listed for each library.
-    if (NOT ${TARGET} MATCHES "_")
-      file(GLOB_RECURSE HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.h")
-      foreach(HEADER ${HEADERS})
-          get_filename_component(RELDIR ${HEADER} DIRECTORY)
-          install(FILES ${HEADER} DESTINATION include/vespa/${TARGET}/${RELDIR})
-      endforeach()
+function(__install_header_files)
+    # Currently all header files are installed as they are not explicitly listed for each library. The
+    # proper way would be for each module to list its header files to install.
+
+    # Only install header for targets in */src/vespa/*.
+    string(REPLACE "/" ";" PATH_COMPONENTS ${CMAKE_CURRENT_SOURCE_DIR})
+    list(REVERSE PATH_COMPONENTS)
+    list(GET PATH_COMPONENTS 1 SECOND_ELEMENT)
+    list(GET PATH_COMPONENTS 2 THIRD_ELEMENT)
+    if (${SECOND_ELEMENT} STREQUAL "vespa" AND ${THIRD_ELEMENT} STREQUAL "src")
+        # Preserve the name */src/vespa/<name> as not every module has <name>=module name (e.g. vespalog)
+        get_filename_component(RELATIVE_TO ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
+        file(GLOB_RECURSE HEADERS RELATIVE ${RELATIVE_TO} "*.h")
+        foreach(HEADER ${HEADERS})
+            get_filename_component(RELDIR ${HEADER} DIRECTORY)
+            install(FILES ${RELATIVE_TO}/${HEADER} DESTINATION include/vespa/${RELDIR})
+        endforeach()
    endif()
 endfunction()


Correct valgrind arguments for nightly testing

--- cdash/nightly.cmake
+++ cdash/nightly.cmake
@@ -141,7 +141,7 @@
   "-DMESHES=/lore/diamog/cdash/repos/EnGPar/pumi-meshes/"
   "-DGRAPHS=/lore/diamog/cdash/repos/EnGPar/EnGPar-graphs/"
   "-DVALGRIND=valgrind"
-  "-DVALGRIND_ARGS=--log-file=vg.%p;--leak-check=full;--error-exitcode=1;--suppressions=/lore/diamog/cdash/repos/EnGPar/mpich3.supp"
+  "-DVALGRIND_ARGS=--log-file=vg.%p\;--leak-check=full\;--error-exitcode=1\;--suppressions=/lore/diamog/cdash/repos/EnGPar/mpich3.supp"
   )
 message(STATUS "configure options ${CONFIGURE_VALGRIND}")
 build_subproject(memcheck "${CONFIGURE_VALGRIND}")


cmake: FindPHP: set PHP_VERSION

cmake: FindPHP: set PHP_VERSION

--- cmake/FindPHP.cmake
+++ cmake/FindPHP.cmake
@@ -14,6 +14,9 @@
     OUTPUT_VARIABLE PHP_INCLUDE_DIRS)
   STRING(REPLACE "\n" "" PHP_INCLUDE_DIRS "${PHP_INCLUDE_DIRS}")
   STRING(REPLACE "-I" ";" PHP_INCLUDE_DIRS "${PHP_INCLUDE_DIRS}")
+  EXECUTE_PROCESS(
+    COMMAND ${PHP_CONFIG} "--version"
+    OUTPUT_VARIABLE PHP_VERSION)
 ENDIF(PHP_CONFIG)

 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Php DEFAULT_MSG PHP_INCLUDE_DIRS)


Delete cmake_install.cmake

Delete cmake_install.cmake

--- cmake_install.cmake
+++ cmake_install.cmake
@@ -1,44 +0,0 @@
-# Install script for directory: /home/opcua/Downloads/AcpltDevelopmentKit/acplt/dev/iec62541/open62541
-
-# Set the install prefix
-IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
-  SET(CMAKE_INSTALL_PREFIX "/usr/local")
-ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
-STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
-
-# Set the install configuration name.
-IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
-  IF(BUILD_TYPE)
-    STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
-           CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
-  ELSE(BUILD_TYPE)
-    SET(CMAKE_INSTALL_CONFIG_NAME "debug")
-  ENDIF(BUILD_TYPE)
-  MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
-ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
-
-# Set the component getting installed.
-IF(NOT CMAKE_INSTALL_COMPONENT)
-  IF(COMPONENT)
-    MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
-    SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
-  ELSE(COMPONENT)
-    SET(CMAKE_INSTALL_COMPONENT)
-  ENDIF(COMPONENT)
-ENDIF(NOT CMAKE_INSTALL_COMPONENT)
-
-# Install shared libraries without execute permission?
-IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
-  SET(CMAKE_INSTALL_SO_NO_EXE "1")
-ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
-
-IF(CMAKE_INSTALL_COMPONENT)
-  SET(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
-ELSE(CMAKE_INSTALL_COMPONENT)
-  SET(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
-ENDIF(CMAKE_INSTALL_COMPONENT)
-
-FILE(WRITE "/home/opcua/Downloads/AcpltDevelopmentKit/acplt/dev/iec62541/open62541/${CMAKE_INSTALL_MANIFEST}" "")
-FOREACH(file ${CMAKE_INSTALL_MANIFEST_FILES})
-  FILE(APPEND "/home/opcua/Downloads/AcpltDevelopmentKit/acplt/dev/iec62541/open62541/${CMAKE_INSTALL_MANIFEST}" "${file}\n")
-ENDFOREACH(file)


Use our own fork of Slicer for VesselView

--- CMake/Superbuild/External_Slicer.cmake
+++ CMake/Superbuild/External_Slicer.cmake
@@ -79,7 +79,7 @@
   else()
     set(${proj}_SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj})
     list(APPEND ${proj}_EP_ARGS
-      GIT_REPOSITORY "${git_protocol}://github.com/Slicer/Slicer.git"
+      GIT_REPOSITORY "${git_protocol}://github.com/KitwareMedical/Slicer.git"
       GIT_TAG "22262b98d43d5f68546eab686fa41fb117632fa4"
       )
   endif()


updated info message

updated info message


[cmake] cleaning macos<10.9 hack for c++11

--- SofaKernel/cmake/CompilerOptions.cmake
+++ SofaKernel/cmake/CompilerOptions.cmake
@@ -1,7 +1,7 @@
 #### Compiler options

 ## GCC-specific
-if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
+if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
     ## Find out the version of g++ (and save it in GCXX_VERSION)
     if(CMAKE_CXX_COMPILER_ARG1) # CXX="ccache g++"
         string(STRIP ${CMAKE_CXX_COMPILER_ARG1} CMAKE_CXX_COMPILER_ARG1_stripped)
@@ -28,7 +28,7 @@
 endif()

 ## GCC/Clang-specific
-if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
+if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU" OR ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
     # Warnings
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -W")
 endif()
@@ -80,9 +80,11 @@
 # TODO how to propagate such properties to dependents?
 set(CMAKE_CXX_STANDARD 11)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
-if(APPLE)  # only for macos versions < 10.9
-     # libstdc++ is used by default on old macos plateform
-     # and at that date it did not contain every c++11 implementations
+
+# hack for clang on old macosx (version < 10.9, such as the dashboard servers)
+# that is using, by default at that time, a libstdc++ that did not fully implement c++11
+if(APPLE AND ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND CMAKE_SYSTEM_VERSION VERSION_LESS "10.9" AND ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" )
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
-endif(APPLE)
+#    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi")
+endif()


Added automagic flash addressing, will need to be changed with new softdevice locations

--- lib/components/softdevice/softdevice.cmake
+++ lib/components/softdevice/softdevice.cmake
@@ -5,6 +5,15 @@
 include_directories(${CMAKE_CURRENT_LIST_DIR}/common/softdevice_handler)

 string(TOLOWER ${SOFTDEVICE} SOFTDEVICE_L)
+
+if(NOT FLASH_START)
+if(SOFTDEVICE STREQUAL "S132")
+	set(FLASH_START 0x1f000)
+elseif(SOFTDEVICE STREQUAL "S212")
+	set(FLASH_START 0x12000)
+endif()
+message("Automatically selected flash start address: ${FLASH_START}")
+endif(NOT FLASH_START)

 set(SOFTDEVICE_VERSION "1.0.0-3.alpha")


ENH: update netcdf version in Superbuild

--- SuperBuild/CMake/External_netcdf.cmake
+++ SuperBuild/CMake/External_netcdf.cmake
@@ -36,8 +36,8 @@

 ExternalProject_Add(NETCDF
   PREFIX NETCDF
-  URL "https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-4.4.1.1.tar.gz"
-  URL_MD5 503a2d6b6035d116ed53b1d80c811bda
+  URL "https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-c-4.7.3.tar.gz"
+  URL_MD5 9e1d7f13c2aef921c854d87037bcbd96
   SOURCE_DIR ${NETCDF_SB_SRC}
   BINARY_DIR ${NETCDF_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}


update snopt submodule

update snopt submodule

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -109,7 +109,7 @@
 set(spotless_depends)

 set(snopt_url ssh://git@github.com/RobotLocomotion/snopt.git)
-set(snopt_revision 063b048229a85d50b9d08e39da72a39ffc4c3a25)
+set(snopt_revision 4ab2fd0e4d57ef906bf2a655093824056e2831ba)
 set(snopt_depends)

 set(gurobi_url ssh://git@github.com/RobotLocomotion/gurobi.git)


Fix the bugfix :-(

Fix the bugfix :-(

git-svn-id: fbbf69ba8011aca0e74e1c67904b11cccbdbe66b@27670 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/modules/FindUMFPACK.cmake
+++ deal.II/cmake/modules/FindUMFPACK.cmake
@@ -84,8 +84,8 @@
   PATH_SUFFIXES
     lib${LIB_SUFFIX} lib64 lib Lib UMFPACK/Lib
   )
-IF(NOT CHOLMOD_LIBRARY MATCHES "-NOTFOUND")
-  SET(CHOLMOD_LIBRARY)
+IF(CHOLMOD_LIBRARY MATCHES "-NOTFOUND")
+  SET(CHOLMOD_LIBRARY "")
 ENDIF()


Don't use link time optimization.

Don't use link time optimization.

This failes at least for the tests.

--- clang.cmake
+++ clang.cmake
@@ -1,7 +1,8 @@
 SET (CMAKE_C_COMPILER        "clang")
 SET (CMAKE_CXX_COMPILER      "clang++")

-SET(CMAKE_C_FLAGS "-pipe -Wall -Wextra -Wwrite-strings -pedantic -O2 -flto -fomit-frame-pointer" CACHE STRING "" FORCE)
+SET(CMAKE_C_FLAGS "-pipe -Wall -Wextra -Wwrite-strings -pedantic -O2 -fomit-frame-pointer" CACHE STRING "" FORCE)
+# SET(CMAKE_C_FLAGS "-pipe -Wall -Wextra -Wwrite-strings -pedantic -O2 -flto -use-gold-plugin -fomit-frame-pointer" CACHE STRING "" FORCE)

 MESSAGE (STATUS "Found CLANG toolchain")


cmake config fixes

cmake config fixes

--- libunistd-config.cmake
+++ libunistd-config.cmake
@@ -8,8 +8,8 @@
 #	PATHS ${LIBUNISTD_PATH} NO_DEFAULT_PATH
 # )

-message("--- Found libunistd! ---")
-message("  CMAKE_CURRENT_LIST_DIR = ${CMAKE_CURRENT_LIST_DIR}")
+message("*** libunistd-config.cmake ***")
+message("Found libunistd:  CMAKE_CURRENT_LIST_DIR = ${CMAKE_CURRENT_LIST_DIR}")

 #if (NOT DEFINED CMAKE_STATIC_LIBRARY_SUFFIX)
     if (WIN32)


Trivial commit.

Trivial commit.

--- cmake/TbagScript/TbagData2String.cmake
+++ cmake/TbagScript/TbagData2String.cmake
@@ -11,9 +11,13 @@
     file (READ "${SOURCE_PATH}" __content)
 endif ()

+# MSVC Specific:
+# The maximum length of a string literal is 16,384 (16K) bytes.
+# http://msdn.microsoft.com/en-us/library/69ze775t%28v=vs.110%29.aspx
+set (__substring_size 16384)
+set (__index 0)
+
 string (LENGTH "${__content}" __content_length)
-set (__index 0)
-set (__substring_size 16384) # MSVC Specific: The maximum length of a string literal is 16,384 (16K) bytes.

 set (__header_prefix
         "\n#ifndef __INCLUDE__DATA_TO_STRING__${NAME}_H__"


[Config] (hopefully) better detection of Boost.Python across platforms

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -504,7 +504,7 @@
 	  set (PY_MINOR_VERSION "${CMAKE_MATCH_2}")
 	  set (PY_PATCH_VERSION "${CMAKE_MATCH_3}")
 	endif (${PYTHONLIBS_VERSION_STRING} MATCHES "([0-9]).([0-9]).([0-9])")
-
+
 	message (STATUS "Found PythonLibs ${PYTHONLIBS_VERSION} (${PYTHONLIBS_VERSION_STRING} / ${PY_MAJOR_VERSION}.${PY_MINOR_VERSION}.${PY_PATCH_VERSION})")

 	# Set the Python installation directory
@@ -585,15 +585,15 @@
 macro (register_boost_lib _boost_lib_list_name _boost_lib_list)
   # Update the list of library dependencies for the project
   foreach (_lib_cpt ${_boost_lib_list})
-	string (TOUPPER ${_lib_cpt} _lib_cpt_up)
-
-	if (Boost_${_lib_cpt_up}_LIBRARY)
-	  # Update the list of dependencies for the project
-	  list (APPEND ${_boost_lib_list_name} ${Boost_${_lib_cpt_up}_LIBRARY})
-
-	  # Update the list of libraries to be displayed
-	  list (APPEND BOOST_REQUIRED_LIBS ${Boost_${_lib_cpt_up}_LIBRARY})
-	endif (Boost_${_lib_cpt_up}_LIBRARY)
+    string (TOUPPER ${_lib_cpt} _lib_cpt_up)
+
+    if (Boost_${_lib_cpt_up}_LIBRARY)
+      # Update the list of dependencies for the project
+      list (APPEND ${_boost_lib_list_name} ${Boost_${_lib_cpt_up}_LIBRARY})
+
+      # Update the list of libraries to be displayed
+      list (APPEND BOOST_REQUIRED_LIBS ${Boost_${_lib_cpt_up}_LIBRARY})
+    endif (Boost_${_lib_cpt_up}_LIBRARY)
   endforeach (_lib_cpt ${_boost_lib_list})
 endmacro (register_boost_lib _boost_lib_list_name _boost_lib_list)

@@ -606,18 +606,26 @@
   else (${ARGC} GREATER 0)
     message (STATUS "Requires Boost without specifying any version")
   endif (${ARGC} GREATER 0)
-
+
   #
-  # Note: ${Boost_DATE_TIME_LIBRARY} and ${Boost_PROGRAM_OPTIONS_LIBRARY}
-  # are already set by ${SOCIMYSQL_LIBRARIES} and/or ${SOCI_LIBRARIES}.
-  #
-  set (python_component_name "python${PY_MAJOR_VERSION}${PY_MINOR_VERSION}")
+  # Note 1: ${Boost_DATE_TIME_LIBRARY} and ${Boost_PROGRAM_OPTIONS_LIBRARY}
+  #         are already set by ${SOCIMYSQL_LIBRARIES} and/or ${SOCI_LIBRARIES}.
+  # Note 2: Boost libraries are not installed in a consistent way across the
+  #         the different platforms and versions of Boost.
+  #         For a while, the Boost.Python library component was just called
+  #         'python'. It is now suffixed with the version of Python, and
+  #         on some Linux distributions, there is even a '-py' suffix.
+  #         On some platform/Boost version combinations, the Python version
+  #         may be just the major version (2 or 3 as of 2019) or the major
+  #         and minor versions (e.g., 27, 28, 34, 36, 37 as of 2019)
+  set (python_cpt_name1 "python${PY_MAJOR_VERSION}")
+  set (python_cpt_name2 "python${PY_MAJOR_VERSION}${PY_MINOR_VERSION}")
   set (Boost_USE_STATIC_LIBS OFF)
   set (Boost_USE_MULTITHREADED ON)
   set (Boost_USE_STATIC_RUNTIME OFF)
   set (BOOST_REQUIRED_COMPONENTS_FOR_LIB
     date_time random iostreams serialization filesystem system
-	locale ${python_component_name} regex)
+    locale ${python_cpt_name1} ${python_cpt_name2} regex)
   set (BOOST_REQUIRED_COMPONENTS_FOR_BIN program_options)
   set (BOOST_REQUIRED_COMPONENTS_FOR_TST unit_test_framework)
   set (BOOST_REQUIRED_COMPONENTS ${BOOST_REQUIRED_COMPONENTS_FOR_LIB}
@@ -637,23 +645,28 @@
   find_package (BoostWrapper ${_required_version} REQUIRED)

   if (Boost_FOUND)
+    # Boost.Python library
+    message (STATUS "  + Boost_PYTHON_LIBRARY: ${Boost_PYTHON_LIBRARY}")
+    message (STATUS "  + Boost_PYTHON3_LIBRARY: ${Boost_PYTHON3_LIBRARY}")
+    message (STATUS "  + Boost_PYTHON37_LIBRARY: ${Boost_PYTHON37_LIBRARY}")
+
     # Update the list of include directories for the project
     include_directories (${Boost_INCLUDE_DIRS})

-	# For display purposes
+    # For display purposes
     set (BOOST_REQUIRED_LIBS "")

     # Update the list of library dependencies for the project
-	register_boost_lib ("PROJ_DEP_LIBS_FOR_LIB"
-	  "${BOOST_REQUIRED_COMPONENTS_FOR_LIB}")
+    register_boost_lib ("PROJ_DEP_LIBS_FOR_LIB"
+      "${BOOST_REQUIRED_COMPONENTS_FOR_LIB}")

     # Update the list of binary dependencies for the project
-	register_boost_lib ("PROJ_DEP_LIBS_FOR_BIN"
-	  "${BOOST_REQUIRED_COMPONENTS_FOR_BIN}")
+    register_boost_lib ("PROJ_DEP_LIBS_FOR_BIN"
+      "${BOOST_REQUIRED_COMPONENTS_FOR_BIN}")

     # Update the list of test dependencies for the project
-	register_boost_lib ("PROJ_DEP_LIBS_FOR_TST"
-	  "${BOOST_REQUIRED_COMPONENTS_FOR_TST}")
+    register_boost_lib ("PROJ_DEP_LIBS_FOR_TST"
+      "${BOOST_REQUIRED_COMPONENTS_FOR_TST}")

   endif (Boost_FOUND)


cmake: Bump min SDK version to 0.10.0

cmake: Bump min SDK version to 0.10.0

We need the 0.10.0 release for new support for the ARM-v8m SoCs and
RISC-V.

Signed-off-by: Kumar Gala <a5e5248af4cd4f0ed8c515f61d40a6e2db46a66e@linaro.org>

--- cmake/toolchain/zephyr/host-tools.cmake
+++ cmake/toolchain/zephyr/host-tools.cmake
@@ -15,7 +15,7 @@
   return()
 endif()

-set(REQUIRED_SDK_VER 0.9.5)
+set(REQUIRED_SDK_VER 0.10.0)
 set(TOOLCHAIN_VENDOR zephyr)
 set(TOOLCHAIN_ARCH x86_64)


BUG: wrong cmake syntax

BUG: wrong cmake syntax

--- Packaging/install_python_bindings.cmake
+++ Packaging/install_python_bindings.cmake
@@ -40,7 +40,7 @@
   endforeach()
   file(GLOB gdal_python_wrappings "${SUPERBUILD_INSTALL_DIR}/lib/python[2|3]*")
   foreach(_wrap ${gdal_python_wrappings})
-    if (IS_DIRECTORY _wrap)
+    if (IS_DIRECTORY "${_wrap}")
       install(DIRECTORY ${_wrap}
         DESTINATION ${PKG_STAGE_DIR}/lib
         PATTERN "*.pyc" EXCLUDE


Use relative path for smooth_idf_component.

--- lib/smooth/idf_utils.cmake
+++ lib/smooth/idf_utils.cmake
@@ -1,3 +1,4 @@
+include_guard(GLOBAL)
 include($ENV{IDF_PATH}/tools/cmake/idf.cmake)

 function(smooth_verify_idf_path)
@@ -38,7 +39,7 @@
     if(${CMAKE_CXX_COMPILER} MATCHES "xtensa")
         target_compile_definitions(${target} PUBLIC ESP_PLATFORM)

-        idf_build_component("${CMAKE_SOURCE_DIR}/lib/smooth/smooth_idf_component")
+        idf_build_component(smooth_idf_component)

         idf_build_process(esp32
                 COMPONENTS ${smooth_req_comps} smooth_idf_component


BUG: Exclude ITKReview when ITK_USE_REVIEW if off.

Exclude ITKReview mododule from building when ITK_USE_REVIEW
is turned OFF.

Change-Id: I6108492926b27b62af543c584d9202aa6cbb5ec3

--- Modules/Nonunit/Review/itk-module.cmake
+++ Modules/Nonunit/Review/itk-module.cmake
@@ -90,4 +90,5 @@
     ITKIOMesh
   DESCRIPTION
     "${DOCUMENTATION}"
-)
+  EXCLUDE_FROM_ALL
+ )


add root .cmake files for XP_CMAKE_REPO_INSYNC

* internpro has Findexternpro.cmake reported in notincmake.txt

--- modules/macpro.cmake
+++ modules/macpro.cmake
@@ -155,7 +155,7 @@
     xpMarkdownReadmeAppend(${pro})
   endforeach()
   file(GLOB xpfiles
-    ${PROJECT_SOURCE_DIR}/README* ${PROJECT_SOURCE_DIR}/LICENSE*
+    ${PROJECT_SOURCE_DIR}/README* ${PROJECT_SOURCE_DIR}/LICENSE* ${PROJECT_SOURCE_DIR}/*.cmake
     ${PRO_DIR}/README*
     ${CMAKE_BINARY_DIR}/xpbase/pro/*.cmake
     ${MODULES_DIR}/*.cmake ${MODULES_DIR}/*.in


Updating ITK Superbuild version to 4.10

Updating ITK Superbuild version to 4.10

Change-Id: I9733fe674df169274579d9c3c5bb32a8ab029b9f

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -35,7 +35,7 @@
 set(ITK_REPOSITORY "${git_protocol}://itk.org/ITK.git")

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG  c29756e1dbb0afbb991ad2f399658d754035d225 )
+set(ITK_TAG_COMMAND GIT_TAG  v4.10.0 )

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )


Add paths to examples FindOpenCL.cmake file

--- examples/CMakeModules/FindOpenCL.cmake
+++ examples/CMakeModules/FindOpenCL.cmake
@@ -34,23 +34,23 @@
 # Copyright 2000-2014 Kitware, Inc.
 # Copyright 2000-2011 Insight Software Consortium
 # 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 names of Kitware, Inc., the Insight Software Consortium,
 # nor the names of their 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
@@ -149,7 +149,29 @@
   endif()
 else()
   find_library(OpenCL_LIBRARY
-    NAMES OpenCL)
+    NAMES OpenCL
+    PATHS
+        ENV LD_LIBRARY_PATH
+        ENV AMDAPPSDKROOT
+        ENV INTELOCLSDKROOT
+        ENV CUDA_PATH
+        ENV NVSDKCOMPUTE_ROOT
+        ENV ATISTREAMSDKROOT
+        /usr/lib64
+        /usr/lib
+        /usr/local/lib64
+        /usr/local/lib
+        /sw/lib
+        /opt/local/lib
+    PATH_SUFFIXES
+        "AMD APP/lib/x86_64"
+        lib/x86_64
+        lib/x64
+        lib/
+        lib64/
+        x86_64-linux-gnu
+        arm-linux-gnueabihf
+    )
 endif()

 set(OpenCL_LIBRARIES ${OpenCL_LIBRARY})


enable HDF5 in Custom-vs.cmake

enable HDF5 in Custom-vs.cmake

--- msvc/Custom-vs.cmake
+++ msvc/Custom-vs.cmake
@@ -17,7 +17,7 @@
 set(BUILD_FAUST_OPCODES OFF)
 set(BUILD_FLUID_OPCODES ON)
 set(BUILD_FRAMEBUFFER_OPCODES ON)
-set(BUILD_HDF5_OPCODES OFF)
+set(BUILD_HDF5_OPCODES ON)
 set(BUILD_IMAGE_OPCODES ON)
 set(BUILD_INSTALLER ON)
 set(BUILD_JACK_OPCODES OFF)


ENH: CI: PKG: Forced CTEST_BUILD_CONFIGURATION to Release.

--- CI/main_packages.cmake
+++ CI/main_packages.cmake
@@ -30,7 +30,7 @@

 set ( DEBUG "1" )

-# set ( CTEST_BUILD_CONFIGURATION "Release" )
+set ( CTEST_BUILD_CONFIGURATION "Release" )
 set ( CTEST_CMAKE_GENERATOR "Unix Makefiles" )
 set ( CTEST_BUILD_FLAGS "-j1" )
 set ( CTEST_BUILD_NAME "Packages" )


remove condition for copy_directory in xpPostBuildCopy

issue https://github.com/smanders/externpro/issues/238

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -1495,11 +1495,9 @@
     else()
       if(IS_DIRECTORY ${_item})
         get_filename_component(dir ${_item} NAME)
-        if(NOT EXISTS ${dest}/${dir})
-          add_custom_command(TARGET ${theTarget} POST_BUILD
-            COMMAND ${CMAKE_COMMAND} -E copy_directory ${_item} ${dest}/${dir}
-            )
-        endif()
+        add_custom_command(TARGET ${theTarget} POST_BUILD
+          COMMAND ${CMAKE_COMMAND} -E copy_directory ${_item} ${dest}/${dir}
+          )
       else()
         if(NOT IS_ABSOLUTE ${_item})
           if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_item})


Make Gloo depend on Caffe2 NCCL build

Make Gloo depend on Caffe2 NCCL build

Summary:
If Caffe2 used the packaged NCCL version then the Gloo build will try
to use it as well. To make sure the NCCL build has completed we need
to add an explicit dependency between the two.

Another subtle change here is that we add the PROJECT_BINARY_DIR to
the include path, since that is where the generated <gloo/config.h>
resides. Without this path Caffe2 includes the empty config.h from the
source tree.
Closes https://github.com/caffe2/caffe2/pull/1170

Differential Revision: D5779002

Pulled By: pietern

fbshipit-source-id: 9bc0d41f01a9b0f023d71bc4dee128a77eec1712

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -357,8 +357,16 @@
       set(BUILD_BENCHMARK OFF)
       add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/gloo)
       caffe2_include_directories(${PROJECT_SOURCE_DIR}/third_party/gloo)
+      caffe2_include_directories(${PROJECT_BINARY_DIR}/third_party/gloo)
       set(BUILD_TEST ${__BUILD_TEST})
       set(BUILD_BENCHMARK ${__BUILD_BENCHMARK})
+
+      # Add explicit dependency if NCCL is built from third_party.
+      # Without dependency, make -jN with N>1 can fail if the NCCL build
+      # hasn't finished when CUDA targets are linked.
+      if(NCCL_EXTERNAL)
+        add_dependencies(gloo_cuda nccl_external)
+      endif()
     endif()
     # Pick the right dependency depending on USE_CUDA
     if(NOT USE_CUDA)


cmake: cleanup

cmake: cleanup

--- cmake/DetectOpenCV.cmake
+++ cmake/DetectOpenCV.cmake
@@ -61,17 +61,15 @@
     # Define OpenCV_LIBRARY_DIR if missing
     if(NOT DEFINED OpenCV_LIBRARY_DIR)

-        message(STATUS "a")
         if(DEFINED OpenCV_LIBDIR AND NOT "${OpenCV_LIBDIR}" STREQUAL "")

-            message(STATUS "b")
             set(OpenCV_LIBRARY_DIR ${OpenCV_LIBDIR})
+
         else(DEFINED OpenCV_LIBDIR  AND NOT "${OpenCV_LIBDIR}" STREQUAL "")

-    message(STATUS "c")
             # Append lib to prefix
             file(TO_CMAKE_PATH ${OpenCV_PREFIX}/lib OpenCV_LIBRARY_DIR)
-    message(STATUS "OpenCV_LIBRARY_DIR=${OpenCV_LIBRARY_DIR}")
+
         endif(DEFINED OpenCV_LIBDIR AND NOT "${OpenCV_LIBDIR}" STREQUAL "")

     endif(NOT DEFINED OpenCV_LIBRARY_DIR)


Remove superfluous testing files (as changeset 5c4d6666125a but more complete)

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -68,11 +68,7 @@
     endif()
   endif()

-  if(EIGEN_BIN_BASH_EXISTS)
-    add_test(${testname_with_suffix} "${Eigen_SOURCE_DIR}/test/runtest.sh" "${testname_with_suffix}")
-  else()
-    add_test(${testname_with_suffix} "${targetname}")
-  endif()
+  add_test(${testname_with_suffix} "${targetname}")

   # Specify target and test labels accoirding to EIGEN_CURRENT_SUBPROJECT
   get_property(current_subproject GLOBAL PROPERTY EIGEN_CURRENT_SUBPROJECT)


add optional compile flags to enable coverage testing

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -153,11 +153,17 @@
 endmacro(ei_init_testing)

 if(CMAKE_COMPILER_IS_GNUCXX)
+  option(EIGEN_COVERAGE_TESTING "Enable/disable gcov" OFF)
+  if(EIGEN_COVERAGE_TESTING)
+    set(COVERAGE_FLAGS "-fprofile-arcs -ftest-coverage")
+  else(EIGEN_COVERAGE_TESTING)
+    set(COVERAGE_FLAGS "")
+  endif(EIGEN_ENABLE_COVERAGE_TESTING)
   if(CMAKE_SYSTEM_NAME MATCHES Linux)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g2")
-    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g2")
-    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-inline-functions")
-    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g2")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_FLAGS} -g2")
+    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COVERAGE_FLAGS} -O2 -g2")
+    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${COVERAGE_FLAGS} -fno-inline-functions")
+    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COVERAGE_FLAGS} -O0 -g2")
   endif(CMAKE_SYSTEM_NAME MATCHES Linux)
   set(EI_OFLAG "-O2")
 elseif(MSVC)


Fix RPM package installation conflict with vulkan-loader

--- cmake/XglPackaging.cmake
+++ cmake/XglPackaging.cmake
@@ -186,6 +186,7 @@
     set(CPACK_RPM_PACKAGE_DESCRIPTION "${PACKAGE_DESCRIPTION}")
     set(CPACK_RPM_PACKAGE_GROUP "System Environment/Libraries")
     set(CPACK_RPM_PACKAGE_LICENSE "MIT")
+    set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/etc/vulkan;/etc/vulkan/icd.d;/etc/vulkan/implicit_layer.d")
     execute_process(COMMAND ${lsb_release_exec} -rs
                    OUTPUT_VARIABLE lsb_release_number
                    OUTPUT_STRIP_TRAILING_WHITESPACE)


Turn off -Wsign-conversion for development

--- cmake/add_warnings.cmake
+++ cmake/add_warnings.cmake
@@ -8,22 +8,28 @@
         -Wno-gnu-zero-variadic-macro-arguments
         -Wno-global-constructors
         -Wno-c++98-compat
-        -Wno-c++98-compat-pedantic)
+        -Wno-c++98-compat-pedantic
+    )
     else()
     set(extra_warn
         -Wno-variadic-macros
         -Wno-unknown-pragmas
-        -Wno-unused-variable)
+        -Wno-unused-variable
+    )
     endif()

     set(all_warn
-    ${extra_warn}
-    -Wall
-    -Wextra
-    -Wpedantic
-    -Wno-padded
-    -Wno-format-nonliteral
-    -Wno-unused-parameter)
+        ${extra_warn}
+        -Wall
+        -Wextra
+        -Wpedantic
+        -Wno-padded
+        -Wno-format-nonliteral
+        -Wno-unused-parameter
+    )
+
+    # FIXME: Temporarily silenced during development
+    list(APPEND all_warn -Wno-sign-conversion)

     # FIXME: Temporarily silence warnings during development
     if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")


cmake/find.cmake: cosmetic changes

cmake/find.cmake: cosmetic changes

--- cmake/qibuild/find.cmake
+++ cmake/qibuild/find.cmake
@@ -77,13 +77,18 @@
 #
 # \arg:prefix  The prefix of the variables to clean
 function(clean prefix)
-  set(${prefix}_INCLUDE_DIRS ""           CACHE STRING   "Cleared." FORCE)
+  set(${prefix}_INCLUDE_DIRS ""          CACHE STRING   "Cleared." FORCE)
   set(${prefix}_LIBRARIES   ""           CACHE STRING   "Cleared." FORCE)
   set(${prefix}_DEFINITIONS ""           CACHE STRING   "Cleared." FORCE)
   set(${prefix}_EXECUTABLE  ""           CACHE STRING   "Cleared." FORCE)
   set(${prefix}_EXECUTABLE_DEBUG  ""     CACHE STRING   "Cleared." FORCE)
   set(${prefix}_SEARCHED    FALSE        CACHE INTERNAL "Cleared." FORCE)
-  mark_as_advanced(${prefix}_DEFINITIONS ${prefix}_INCLUDE_DIR ${prefix}_LIBRARIES ${prefix}_TARGET ${prefix}_EXECUTABLE ${prefix}_EXECUTABLE_DEBUG)
+  mark_as_advanced(
+    ${prefix}_DEFINITIONS
+    ${prefix}_INCLUDE_DIR
+    ${prefix}_LIBRARIES
+    ${prefix}_EXECUTABLE
+    ${prefix}_EXECUTABLE_DEBUG)
 endfunction()


fixup intersphinx

fixup intersphinx

--- cmake/tools/sphinx.cmake
+++ cmake/tools/sphinx.cmake
@@ -81,7 +81,7 @@
     if (CATKIN_DOCS_DEPLOY_DESTINATION)
       add_custom_target(${PROJECT_NAME}-sphinx-deploy)
       add_custom_command(TARGET ${PROJECT_NAME}-sphinx-deploy
-        COMMAND rsync --perms --chmod=a+rX -va ${BUILD_DIR}/ ${CATKIN_DOCS_DEPLOY_DESTINATION}/${PROJECT_NAME})
+        COMMAND rsync --perms --chmod=a+rX -va ${CMAKE_BINARY_DIR}/doc/html/${PROJECT_NAME}/ ${CATKIN_DOCS_DEPLOY_DESTINATION}/${PROJECT_NAME})
       add_dependencies(sphinx-deploy ${PROJECT_NAME}-sphinx-deploy)
     endif()
   endif()


update: gli version requirement

update: gli version requirement

--- cmake/HUGH_SUPPORT_SetupVariables.cmake
+++ cmake/HUGH_SUPPORT_SetupVariables.cmake
@@ -13,7 +13,7 @@
 include(CMakeAddons_SetupVariables)

 # GL[I|M]
-set(GLI_MINIMUM_VERSION "0.8.0")
+set(GLI_MINIMUM_VERSION "0.8.1")
 set(GLM_MINIMUM_VERSION "0.9.7")
 if(CMAKE_HOST_WIN32)
   set(GLI_ROOT_DIR "C:/Tools/gli/gli-git")


Allow to pass LUA_PATH through the environment

Help LuaJIT to find the jit.* modules in build systems like Buildroot where
LUA_PATH has to be passed through the build environment, else building luvi
will fail with:

```
luajit: unknown luaJIT command or jit.* modules not installed
```

Signed-off-by: Jörg Krause <a3c6a141b7ae4e670c91aa105ccadae5e33bda16@embedded.rocks>

--- cmake/Modules/LuaJITAddExecutable.cmake
+++ cmake/Modules/LuaJITAddExecutable.cmake
@@ -9,6 +9,7 @@

 MACRO(LUAJIT_add_custom_commands luajit_target)
   SET(TARGET_ARCH $ENV{TARGET_ARCH})
+  SET(LUA_PATH $ENV{LUA_PATH})
   SET(target_srcs "")
   FOREACH(file ${ARGN})
     IF(${file} MATCHES ".*\\.lua$")
@@ -25,7 +26,7 @@
       add_custom_command(
         OUTPUT ${generated_file}
         MAIN_DEPENDENCY ${source_file}
-        COMMAND luajit
+        COMMAND "LUA_PATH=${LUA_PATH}" luajit
         ARGS -b -a ${TARGET_ARCH}
           ${source_file}
           ${generated_file}


Changed paths for breakpad

Changed paths for breakpad

--- cmake/modules/BuildGoogleBreakpad.cmake
+++ cmake/modules/BuildGoogleBreakpad.cmake
@@ -112,9 +112,9 @@
 if(WIN32 AND NOT MINGW)
   set(BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR ${BREAKPAD_EXCEPTION_HANDLER_INSTALL_DIR}/include/breakpad)

-  set(BREAKPAD_COMMON_LIBRARY_DIR "${BREAKPAD_EXCEPTION_HANDLER_INSTALL_DIR}/lib/breakpad/client/windows/$<CONFIG>/lib")
-  set(BREAKPAD_CRASH_CLIENT_LIBRARY_DIR "${BREAKPAD_EXCEPTION_HANDLER_INSTALL_DIR}/lib/breakpad/client/windows/crash_generation/$<CONFIG>/lib")
-  set(BREAKPAD_EXCEPTION_HANDLER_LIBRARY_DIR "${BREAKPAD_EXCEPTION_HANDLER_INSTALL_DIR}/lib/breakpad/client/windows/handler/$<CONFIG>/lib")
+  set(BREAKPAD_COMMON_LIBRARY_DIR "${BREAKPAD_EXCEPTION_HANDLER_INSTALL_DIR}/lib/breakpad/client/windows/${BUILD_TYPE}/lib")
+  set(BREAKPAD_CRASH_CLIENT_LIBRARY_DIR "${BREAKPAD_EXCEPTION_HANDLER_INSTALL_DIR}/lib/breakpad/client/windows/crash_generation/${BUILD_TYPE}/lib")
+  set(BREAKPAD_EXCEPTION_HANDLER_LIBRARY_DIR "${BREAKPAD_EXCEPTION_HANDLER_INSTALL_DIR}/lib/breakpad/client/windows/handler/${BUILD_TYPE}/lib")
   set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES
     "${BREAKPAD_COMMON_LIBRARY_DIR}/common.lib"
     "${BREAKPAD_EXCEPTION_HANDLER_LIBRARY_DIR}/exception_handler.lib"


Force the CMAKE_INSTALL_LIBDIR be lib always for LZ4

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -260,6 +260,7 @@
               -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}
               -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
               -DBUILD_SHARED_LIBS=OFF
+              -DCMAKE_INSTALL_LIBDIR=lib
     LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1 BUILD_IN_SOURCE 1
     BUILD_BYPRODUCTS ${LZ4_LIBRARIES})
   set(LZ4_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include)


Do not enable builtin_lzma if fail-on-missing=ON

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -187,12 +187,17 @@
 #---Check for LZMA-------------------------------------------------------------------
 if(NOT builtin_lzma)
   message(STATUS "Looking for LZMA")
-  find_package(LZMA)
-  if(NOT LZMA_FOUND)
-    message(STATUS "LZMA not found. Switching on builtin_lzma option")
-    set(builtin_lzma ON CACHE BOOL "" FORCE)
-  endif()
-endif()
+  if(fail-on-missing)
+    find_package(LZMA REQUIRED)
+  else()
+    find_package(LZMA)
+    if(NOT LZMA_FOUND)
+      message(STATUS "LZMA not found. Switching on builtin_lzma option")
+      set(builtin_lzma ON CACHE BOOL "" FORCE)
+    endif()
+  endif()
+endif()
+
 if(builtin_lzma)
   set(lzma_version 5.2.1)
   set(LZMA_TARGET LZMA)


Fail to configure if fail-on-missing=ON and PCRE is not found

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -144,10 +144,14 @@
   foreach(suffix FOUND INCLUDE_DIR PCRE_LIBRARY)
     unset(PCRE_${suffix} CACHE)
   endforeach()
-  find_package(PCRE)
-  if(NOT PCRE_FOUND)
-    message(STATUS "PCRE not found. Switching on builtin_pcre option")
-    set(builtin_pcre ON CACHE BOOL "Enabled because PCRE not found (${builtin_pcre_description})" FORCE)
+  if(fail-on-missing)
+    find_package(PCRE REQUIRED)
+  else()
+    find_package(PCRE)
+    if(NOT PCRE_FOUND)
+      message(STATUS "PCRE not found. Switching on builtin_pcre option")
+      set(builtin_pcre ON CACHE BOOL "Enabled because PCRE not found (${builtin_pcre_description})" FORCE)
+    endif()
   endif()
 endif()


Use system CUB with CUDA 11

Use system CUB with CUDA 11

--- CMake/hoomd/HOOMDHIPSetup.cmake
+++ CMake/hoomd/HOOMDHIPSetup.cmake
@@ -89,19 +89,27 @@
         list(APPEND HIP_INCLUDE_DIR ${ROCm_hsa_INCLUDE_DIR})
     else()
         # here we go if hipcc is not available, fall back on internal HIP->CUDA headers
+        ENABLE_LANGUAGE(CUDA)
+
         set(HIP_INCLUDE_DIR "$<IF:$<STREQUAL:${CMAKE_PROJECT_NAME},HOOMD>,${CMAKE_CURRENT_SOURCE_DIR},${HOOMD_INSTALL_PREFIX}/${PYTHON_SITE_INSTALL_DIR}/include>/hoomd/extern/HIP/include/")

         # use CUDA runtime version
-        set(HIP_VERSION_MAJOR "(CUDART_VERSION/1000)")
-        set(HIP_VERSION_MINOR "(CUDART_VERSION - (CUDART_VERSION/1000)*1000)/10")
-        set(HIP_VERSION_PATCH "0")
+        string(REGEX MATCH "([0-9]*).([0-9]*).([0-9]*).*" _hip_version_match "${CMAKE_CUDA_COMPILER_VERSION}")
+        set(HIP_VERSION_MAJOR "${CMAKE_MATCH_1}")
+        set(HIP_VERSION_MINOR "${CMAKE_MATCH_2}")
+        set(HIP_VERSION_PATCH "${CMAKE_MATCH_3}")
         set(HIP_PLATFORM "nvcc")
         set(CUB_INCLUDE_DIR "$<IF:$<STREQUAL:${CMAKE_PROJECT_NAME},HOOMD>,${CMAKE_CURRENT_SOURCE_DIR},${HOOMD_INSTALL_PREFIX}/${PYTHON_SITE_INSTALL_DIR}/include>/hoomd/extern/cub/")

         # hipCUB
         # funny enough, we require this only on NVIDA platforms due to issues with hipCUB's cmake build system
         # on AMD platforms, it is an external dependency
-        set(HIPCUB_INCLUDE_DIR "$<IF:$<STREQUAL:${CMAKE_PROJECT_NAME},HOOMD>,${CMAKE_CURRENT_SOURCE_DIR},${HOOMD_INSTALL_PREFIX}/${PYTHON_SITE_INSTALL_DIR}/include>/hoomd/extern/hipCUB/hipcub/include/;${CUB_INCLUDE_DIR}")
+        if (CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 11)
+            set(HIPCUB_INCLUDE_DIR "$<IF:$<STREQUAL:${CMAKE_PROJECT_NAME},HOOMD>,${CMAKE_CURRENT_SOURCE_DIR},${HOOMD_INSTALL_PREFIX}/${PYTHON_SITE_INSTALL_DIR}/include>/hoomd/extern/hipCUB/hipcub/include/;${CUB_INCLUDE_DIR}")
+        else()
+            # Use system provided CUB for CUDA 11 and newer
+            set(HIPCUB_INCLUDE_DIR "$<IF:$<STREQUAL:${CMAKE_PROJECT_NAME},HOOMD>,${CMAKE_CURRENT_SOURCE_DIR},${HOOMD_INSTALL_PREFIX}/${PYTHON_SITE_INSTALL_DIR}/include>/hoomd/extern/hipCUB/hipcub/include/")
+        endif()
     endif()

     ENABLE_LANGUAGE(CUDA)


try fixing MPI cmake

try fixing MPI cmake

--- CMake/hoomd/HOOMDMPISetup.cmake
+++ CMake/hoomd/HOOMDMPISetup.cmake
@@ -67,22 +67,14 @@
 # https://gitlab.kitware.com/cmake/cmake/merge_requests/2529/diffs

 if (CMAKE_VERSION VERSION_LESS 3.12.0 AND ENABLE_HIP)
-    if(HIP_PLATFORM EQUALS "nvcc")
     string(replace "-pthread" "$<$<AND:$<COMPILE_LANGUAGE:CUDA>,$<HIP_PLATFORM:nvcc>>:-Xcompiler>;-pthread"
-      _mpi_c_compile_options "${mpi_c_compile_options}")
-    set_property(target mpi::mpi_c property interface_compile_options "${_mpi_c_compile_options}")
-    else()
-    set_property(target mpi::mpi_c property interface_compile_options "${mpi_c_compile_options}")
-    endif()
-    unset(_mpi_c_compile_options)
+      _MPI_C_COMPILE_OPTIONS "${MPI_C_COMPILE_OPTIONS}")
+    set_property(target mpi::mpi_c property INTERFACE_COMPILE_OPTIONS "${_MPI_C_COMPILE_OPTIONS}")
+    unset(_MPI_C_COMPILE_OPTIONS)

-    if(HIP_PLATFORM EQUALS "nvcc")
     string(REPLACE "-pthread" "$<$<AND:$<COMPILE_LANGUAGE:CUDA><$<HIP_PLATFORM:nvcc>>:-Xcompiler>;-pthread"
       _MPI_CXX_COMPILE_OPTIONS "${MPI_CXX_COMPILE_OPTIONS}")
     set_property(TARGET MPI::MPI_CXX PROPERTY INTERFACE_COMPILE_OPTIONS "${_MPI_CXX_COMPILE_OPTIONS}")
-    else()
-    set_property(TARGET MPI::MPI_CXX PROPERTY INTERFACE_COMPILE_OPTIONS "${MPI_CXX_COMPILE_OPTIONS}")
-    endif()
     message(STATUS "_MPI_CXX_COMPILE_OPTIONS: ${_MPI_CXX_COMPILE_OPTIONS}")
     unset(_MPI_CXX_COMPILE_OPTIONS)
 endif()