AddExternalDependency update

AddExternalDependency update

--- cmake/UncommonCmakeModules/AddExternalDependency.cmake
+++ cmake/UncommonCmakeModules/AddExternalDependency.cmake
@@ -85,6 +85,8 @@
         get_target_property(_ExtProject_Found_Location ${_ExtProject_NAME}::${_ExtProject_NAME} IMPORTED_LOCATION)
         message(STATUS "[add_external_dependency] Found:${_ExtProject_NAME} Ver:${${_ExtProject_NAME}_VERSION}")
     endif()
+    message(STATUS "FIND_PACKAGE_CONSIDERED_CONFIGS: ${${_ExtProject_NAME}_CONSIDERED_CONFIGS}")
+    message(STATUS "FIND_PACKAGE_CONSIDERED_VERSIONS: ${${_ExtProject_NAME}_CONSIDERED_VERSIONS}")
     set(_Target "${${_ExtProject_NAME}_LIBRARIES}")
     message(STATUS "[add_external_dependency] Main Imported Library Target: ${_Target}")
     get_target_property(_VAR ${_Target} TYPE)


added main target dependency to doc target. So the doc is forcebly regenerated whenever the main target is rebuilt.

--- dist/WkDoc.cmake
+++ dist/WkDoc.cmake
@@ -65,6 +65,7 @@
 endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile" )

   ADD_CUSTOM_TARGET(doc ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile" )
+  add_dependencies( ${PROJECT_NAME} doc )

 ENDIF(DOXYGEN_FOUND)


CMake: Bugfix: Clean up MPI_${_lang}_LIBRARIES if they are set to "-NOTFOUND".

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@29988 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/configure/configure_1_mpi.cmake
+++ deal.II/cmake/configure/configure_1_mpi.cmake
@@ -39,6 +39,7 @@
   #
   SET_IF_EMPTY(MPI_CXX_COMPILER ${CMAKE_CXX_COMPILER})
   SET_IF_EMPTY(MPI_C_COMPILER ${CMAKE_C_COMPILER}) # for good measure
+  SET_IF_EMPTY(MPI_Fortran_COMPILER ${CMAKE_Fortran_COMPILER}) # for good measure
   FIND_PACKAGE(MPI)

   IF(NOT MPI_CXX_FOUND)
@@ -55,9 +56,19 @@
       SET(MPI_FOUND) # clear this value so that FIND_PACKAGE runs again.
       UNSET(MPI_CXX_COMPILER CACHE)
       UNSET(MPI_C_COMPILER CACHE)
+      UNSET(MPI_Fortran_COMPILER CACHE)
       FIND_PACKAGE(MPI)
     ENDIF()
   ENDIF()
+
+  #
+  # Manually clean up variables:
+  #
+  FOREACH(_lang C CXX Fortran)
+    IF(MPI_${_lang}_LIBRARIES MATCHES "-NOTFOUND")
+      SET(MPI_${_lang}_LIBRARIES)
+    ENDIF()
+  ENDFOREACH()

   IF(MPI_CXX_FOUND)
     # Hide some variables:


CMake: Bugfix

CMake: Bugfix

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@28879 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/configure/configure_1_mpi.cmake
+++ deal.II/cmake/configure/configure_1_mpi.cmake
@@ -26,8 +26,8 @@
   # If CMAKE_CXX_COMPILER is already an MPI wrapper, use it to determine
   # the mpi implementation:
   #
-  SET(MPI_C_COMPILER ${CMAKE_C_COMPILER})
-  SET(MPI_CXX_COMPILER ${CMAKE_CXX_COMPILER})
+  SET_IF_EMPTY(MPI_C_COMPILER ${CMAKE_C_COMPILER})
+  SET_IF_EMPTY(MPI_CXX_COMPILER ${CMAKE_CXX_COMPILER})
   FIND_PACKAGE(MPI)

   IF(NOT MPI_CXX_FOUND)


if AutoInstall is used, check whether LLVM_ROOT is defined explicitly

LLVMAUTOInstaller requires users to explicitly specify the path
to install. Directly using LLVM_HOME ENV is risky.

--- scripts/TracerConfig.cmake
+++ scripts/TracerConfig.cmake
@@ -21,20 +21,23 @@

 SET(RECOMMAND_LLVM_PREFIX ${CMAKE_BINARY_DIR}/lib/llvm-${LLVM_RECOMMAND_VERSION})

+if(NOT DEFINED AUTOINSTALL)
+  SET(AUTOINSTALL FALSE)
+endif()
+
 if(DEFINED LLVM_ROOT)
   get_filename_component(LLVM_ROOT ${LLVM_ROOT} ABSOLUTE)
 elseif("$ENV{LLVM_HOME}" STREQUAL "")
   set(LLVM_ROOT ${RECOMMAND_LLVM_PREFIX})
 else()
+  if(${AUTOINSTALL})
+    message(FATAL_ERROR "please specify LLVM_ROOT explicitly if you ready want to autoinstall LLVM")
+  endif()
   set(LLVM_ROOT "$ENV{LLVM_HOME}")
 endif()

 message(STATUS "use LLVM_ROOT : ${LLVM_ROOT}")

-if(NOT DEFINED AUTOINSTALL)
-  SET(AUTOINSTALL FALSE)
-endif()
-
 if(NOT DEFINED GEN_HEADER_DEPENDENCY)
   SET(GEN_HEADER_DEPENDENCY FALSE)
 endif()


NetBSD: Add new target in src/pal/src/configure.cmake for NetBSD

This code is based on FreeBSD, with the following differences:
- At the moment there is no libunwind for NetBSD.
- The is no need for libc.so magic like in GNU, neither on FreeBSD
  someone wrongly assumed it there.
- ptrace(2) uses (void*) instead of (caddr_t)

--- src/pal/src/configure.cmake
+++ src/pal/src/configure.cmake
@@ -943,7 +943,27 @@
   else()
     message(FATAL_ERROR "Cannot find libc on this system.")
   endif()
-
+
+elseif(CMAKE_SYSTEM_NAME STREQUAL NetBSD)
+  if(NOT HAVE_LIBUNWIND_H)
+    unset(HAVE_LIBUNWIND_H CACHE)
+    message(WARNING "Cannot find libunwind. Try installing libunwind8 and libunwind8-dev (or the appropriate packages for your platform)")
+  endif()
+  if(NOT HAVE_BSD_UUID_H)
+    unset(HAVE_BSD_UUID_H CACHE)
+    message(FATAL_ERROR "Cannot find uuid.h")
+  endif()
+  set(DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX 0)
+  set(PAL_PTRACE "ptrace((cmd), (pid), (void*)(addr), (data))")
+  set(PAL_PT_ATTACH PT_ATTACH)
+  set(PAL_PT_DETACH PT_DETACH)
+  set(PAL_PT_READ_D PT_READ_D)
+  set(PAL_PT_WRITE_D PT_WRITE_D)
+  set(JA_JP_LOCALE_NAME ja_JP_LOCALE_NOT_FOUND)
+  set(KO_KR_LOCALE_NAME ko_KR_LOCALE_NOT_FOUND)
+  set(ZH_TW_LOCALE_NAME zh_TW_LOCALE_NOT_FOUND)
+  set(HAS_FTRUNCATE_LENGTH_ISSUE 0)
+
 elseif(CMAKE_SYSTEM_NAME STREQUAL SunOS)
   if(NOT HAVE_LIBUNWIND_H)
     unset(HAVE_LIBUNWIND_H CACHE)
@@ -989,4 +1009,3 @@
 endif(CMAKE_SYSTEM_NAME STREQUAL Darwin)

 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
-


DOC: Fix FFTW warning grammar.

DOC: Fix FFTW warning grammar.

Change-Id: I89d657fe29fc0d94027ea2ae71d461b51dad633c

--- CMake/itkExternal_FFTW.cmake
+++ CMake/itkExternal_FFTW.cmake
@@ -3,11 +3,11 @@
 include(ITK_CheckCCompilerFlag)

-set(msg "ATTENTION: You have enabled the use of fftw,")
-set(msg "${msg} this library is distributed under a GPL license.")
-set(msg "${msg} By enabling this option, the binary of the ITK libraries")
-set(msg "${msg} that you are going to build will be covered by a GPL license,")
-set(msg "${msg} and so it will be any executable that you link against these libraries.")
+set(msg "ATTENTION: You have enabled the use of FFTW.")
+set(msg "${msg} This library is distributed under a GPL license.")
+set(msg "${msg} By enabling this option, the ITK libraries binary")
+set(msg "${msg} that is built will be covered by a GPL license")
+set(msg "${msg} and so will any executable that is linked against these libraries.")
 message("${msg}")

 #--check_c_compiler_flag(-fopenmp C_HAS_fopenmp)


Set up correct 64-bit linux install directory.

--- CMake/itkExternal_FFTW.cmake
+++ CMake/itkExternal_FFTW.cmake
@@ -99,7 +99,15 @@
         )
     endif()
     set(FFTW_INCLUDE_PATH ${ITK_BINARY_DIR}/fftw/include)
-    set(FFTW_LIBDIR ${ITK_BINARY_DIR}/fftw/lib)
+    if(APPLE)
+      set(FFTW_LIBDIR ${ITK_BINARY_DIR}/fftw/lib)
+    else()
+      if(CMAKE_SIZEOF_VOID_P MATCHES 8)
+        set(FFTW_LIBDIR ${ITK_BINARY_DIR}/fftw/lib64)
+      else()
+        set(FFTW_LIBDIR ${ITK_BINARY_DIR}/fftw/lib)
+      endif()
+    endif()
     link_directories(${FFTW_LIBDIR})
     include_directories(${FFTW_INCLUDE_PATH})
     #


Fix POSIX eagle config

Fix POSIX eagle config

--- cmake/configs/posix_eagle_default.cmake
+++ cmake/configs/posix_eagle_default.cmake
@@ -35,9 +35,10 @@

 	lib/mathlib
 	lib/mathlib/math/filter
+	lib/conversion
+	lib/ecl
 	lib/geo
 	lib/geo_lookup
-	lib/conversion
 	lib/terrain_estimation
 	lib/runway_takeoff
 	lib/tailsitter_recovery


cmake: Update android.toolchain.cmake from upstream.

From https://github.com/taka-no-me/android-cmake/commit/61e7c0d2a6e121a88874cfae060da1ce962de155

--- cmake/toolchain/android.toolchain.cmake
+++ cmake/toolchain/android.toolchain.cmake
@@ -29,12 +29,9 @@
 # POSSIBILITY OF SUCH DAMAGE.

 # ------------------------------------------------------------------------------
-#  Android CMake toolchain file, for use with the Android NDK r5-r9
+#  Android CMake toolchain file, for use with the Android NDK r5-r10d
 #  Requires cmake 2.6.3 or newer (2.8.5 or newer is recommended).
 #  See home page: https://github.com/taka-no-me/android-cmake
-#
-#  The file is mantained by the OpenCV project. The latest version can be get at
-#  http://code.opencv.org/projects/opencv/repository/revisions/master/changes/android/android.toolchain.cmake
 #
 #  Usage Linux:
 #   $ export ANDROID_NDK=/absolute/path/to/the/android-ndk
@@ -50,7 +47,7 @@
 #
 #  Usage Windows:
 #     You need native port of make to build your project.
-#     Android NDK r7 (or newer) already has make.exe on board.
+#     Android NDK r7 (and newer) already has make.exe on board.
 #     For older NDK you have to install it separately.
 #     For example, this one: http://gnuwin32.sourceforge.net/packages/make.htm
 #
@@ -76,36 +73,54 @@
 #      used by ndk-build tool from Android NDK.
 #
 #      Possible targets are:
-#        "armeabi" - matches to the NDK ABI with the same name.
-#           See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
-#        "armeabi-v7a" - matches to the NDK ABI with the same name.
-#           See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
+#        "armeabi" - ARMv5TE based CPU with software floating point operations
+#        "armeabi-v7a" - ARMv7 based devices with hardware FPU instructions
+#            this ABI target is used by default
 #        "armeabi-v7a with NEON" - same as armeabi-v7a, but
 #            sets NEON as floating-point unit
 #        "armeabi-v7a with VFPV3" - same as armeabi-v7a, but
-#            sets VFPV3 as floating-point unit (has 32 registers instead of 16).
-#        "armeabi-v6 with VFP" - tuned for ARMv6 processors having VFP.
-#        "x86" - matches to the NDK ABI with the same name.
-#            See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
-#        "mips" - matches to the NDK ABI with the same name.
-#            See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
+#            sets VFPV3 as floating-point unit (has 32 registers instead of 16)
+#        "armeabi-v6 with VFP" - tuned for ARMv6 processors having VFP
+#        "x86" - IA-32 instruction set
+#        "mips" - MIPS32 instruction set
+#
+#      64-bit ABIs for NDK r10 and newer:
+#        "arm64-v8a" - ARMv8 AArch64 instruction set
+#        "x86_64" - Intel64 instruction set (r1)
+#        "mips64" - MIPS64 instruction set (r6)
 #
 #    ANDROID_NATIVE_API_LEVEL=android-8 - level of Android API compile for.
 #      Option is read-only when standalone toolchain is used.
-#
-#    ANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.6 - the name of compiler
+#      Note: building for "android-L" requires explicit configuration.
+#
+#    ANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.9 - the name of compiler
 #      toolchain to be used. The list of possible values depends on the NDK
-#      version. For NDK r8c the possible values are:
-#
-#        * arm-linux-androideabi-4.4.3
+#      version. For NDK r10c the possible values are:
+#
+#        * aarch64-linux-android-4.9
+#        * aarch64-linux-android-clang3.4
+#        * aarch64-linux-android-clang3.5
 #        * arm-linux-androideabi-4.6
-#        * arm-linux-androideabi-clang3.1
-#        * mipsel-linux-android-4.4.3
+#        * arm-linux-androideabi-4.8
+#        * arm-linux-androideabi-4.9 (default)
+#        * arm-linux-androideabi-clang3.4
+#        * arm-linux-androideabi-clang3.5
+#        * mips64el-linux-android-4.9
+#        * mips64el-linux-android-clang3.4
+#        * mips64el-linux-android-clang3.5
 #        * mipsel-linux-android-4.6
-#        * mipsel-linux-android-clang3.1
-#        * x86-4.4.3
+#        * mipsel-linux-android-4.8
+#        * mipsel-linux-android-4.9
+#        * mipsel-linux-android-clang3.4
+#        * mipsel-linux-android-clang3.5
 #        * x86-4.6
-#        * x86-clang3.1
+#        * x86-4.8
+#        * x86-4.9
+#        * x86-clang3.4
+#        * x86-clang3.5
+#        * x86_64-4.9
+#        * x86_64-clang3.4
+#        * x86_64-clang3.5
 #
 #    ANDROID_FORCE_ARM_BUILD=OFF - set ON to generate 32-bit ARM instructions
 #      instead of Thumb. Is not available for "x86" (inapplicable) and
@@ -181,8 +196,9 @@
 #    ANDROID and BUILD_ANDROID will be set to true, you may test any of these
 #    variables to make necessary Android-specific configuration changes.
 #
-#    Also ARMEABI or ARMEABI_V7A or X86 or MIPS will be set true, mutually
-#    exclusive. NEON option will be set true if VFP is set to NEON.
+#    Also ARMEABI or ARMEABI_V7A or X86 or MIPS or ARM64_V8A or X86_64 or MIPS64
+#    will be set true, mutually exclusive. NEON option will be set true
+#    if VFP is set to NEON.
 #
 #    LIBRARY_OUTPUT_PATH_ROOT should be set in cache to determine where Android
 #    libraries will be installed.
@@ -190,119 +206,6 @@
 #    under the ${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME}
 #    (depending on the target ABI). This is convenient for Android packaging.
 #
-#  Change Log:
-#   - initial version December 2010
-#   - April 2011
-#     [+] added possibility to build with NDK (without standalone toolchain)
-#     [+] support cross-compilation on Windows (native, no cygwin support)
-#     [+] added compiler option to force "char" type to be signed
-#     [+] added toolchain option to compile to 32-bit ARM instructions
-#     [+] added toolchain option to disable SWIG search
-#     [+] added platform "armeabi-v7a with VFPV3"
-#     [~] ARM_TARGETS renamed to ARM_TARGET
-#     [+] EXECUTABLE_OUTPUT_PATH is set by toolchain (required on Windows)
-#     [~] Fixed bug with ANDROID_API_LEVEL variable
-#     [~] turn off SWIG search if it is not found first time
-#   - May 2011
-#     [~] ANDROID_LEVEL is renamed to ANDROID_API_LEVEL
-#     [+] ANDROID_API_LEVEL is detected by toolchain if not specified
-#     [~] added guard to prevent changing of output directories on the first
-#         cmake pass
-#     [~] toolchain exits with error if ARM_TARGET is not recognized
-#   - June 2011
-#     [~] default NDK path is updated for version r5c
-#     [+] variable CMAKE_SYSTEM_PROCESSOR is set based on ARM_TARGET
-#     [~] toolchain install directory is added to linker paths
-#     [-] removed SWIG-related stuff from toolchain
-#     [+] added macro find_host_package, find_host_program to search
-#         packages/programs on the host system
-#     [~] fixed path to STL library
-#   - July 2011
-#     [~] fixed options caching
-#     [~] search for all supported NDK versions
-#     [~] allowed spaces in NDK path
-#   - September 2011
-#     [~] updated for NDK r6b
-#   - November 2011
-#     [*] rewritten for NDK r7
-#     [+] x86 toolchain support (experimental)
-#     [+] added "armeabi-v6 with VFP" ABI for ARMv6 processors.
-#     [~] improved compiler and linker flags management
-#     [+] support different build flags for Release and Debug configurations
-#     [~] by default compiler flags the same as used by ndk-build (but only
-#         where reasonable)
-#     [~] ANDROID_NDK_TOOLCHAIN_ROOT is splitted to ANDROID_STANDALONE_TOOLCHAIN
-#         and ANDROID_TOOLCHAIN_ROOT
-#     [~] ARM_TARGET is renamed to ANDROID_ABI
-#     [~] ARMEABI_NDK_NAME is renamed to ANDROID_NDK_ABI_NAME
-#     [~] ANDROID_API_LEVEL is renamed to ANDROID_NATIVE_API_LEVEL
-#   - January 2012
-#     [+] added stlport_static support (experimental)
-#     [+] added special check for cygwin
-#     [+] filtered out hidden files (starting with .) while globbing inside NDK
-#     [+] automatically applied GLESv2 linkage fix for NDK revisions 5-6
-#     [+] added ANDROID_GET_ABI_RAWNAME to get NDK ABI names by CMake flags
-#   - February 2012
-#     [+] updated for NDK r7b
-#     [~] fixed cmake try_compile() command
-#     [~] Fix for missing install_name_tool on OS X
-#   - March 2012
-#     [~] fixed incorrect C compiler flags
-#     [~] fixed CMAKE_SYSTEM_PROCESSOR change on ANDROID_ABI change
-#     [+] improved toolchain loading speed
-#     [+] added assembler language support (.S)
-#     [+] allowed preset search paths and extra search suffixes
-#   - April 2012
-#     [+] updated for NDK r7c
-#     [~] fixed most of problems with compiler/linker flags and caching
-#     [+] added option ANDROID_FUNCTION_LEVEL_LINKING
-#   - May 2012
-#     [+] updated for NDK r8
-#     [+] added mips architecture support
-#   - August 2012
-#     [+] updated for NDK r8b
-#     [~] all intermediate files generated by toolchain are moved to CMakeFiles
-#     [~] libstdc++ and libsupc are removed from explicit link libraries
-#     [+] added CCache support (via NDK_CCACHE environment or cmake variable)
-#     [+] added gold linker support for NDK r8b
-#     [~] fixed mips linker flags for NDK r8b
-#   - September 2012
-#     [+] added NDK release name detection (see ANDROID_NDK_RELEASE)
-#     [+] added support for all C++ runtimes from NDK
-#         (system, gabi++, stlport, gnustl)
-#     [+] improved warnings on known issues of NDKs
-#     [~] use gold linker as default if available (NDK r8b)
-#     [~] globally turned off rpath
-#     [~] compiler options are aligned with NDK r8b
-#   - October 2012
-#     [~] fixed C++ linking: explicitly link with math library (OpenCV #2426)
-#   - November 2012
-#     [+] updated for NDK r8c
-#     [+] added support for clang compiler
-#   - December 2012
-#     [+] suppress warning about unused CMAKE_TOOLCHAIN_FILE variable
-#     [+] adjust API level to closest compatible as NDK does
-#     [~] fixed ccache full path search
-#     [+] updated for NDK r8d
-#     [~] compiler options are aligned with NDK r8d
-#   - March 2013
-#     [+] updated for NDK r8e (x86 version)
-#     [+] support x86_64 version of NDK
-#   - April 2013
-#     [+] support non-release NDK layouts (from Linaro git and Android git)
-#     [~] automatically detect if explicit link to crtbegin_*.o is needed
-#   - June 2013
-#     [~] fixed stl include path for standalone toolchain made by NDK >= r8c
-#   - July 2013
-#     [+] updated for NDK r9
-#   - November 2013
-#     [+] updated for NDK r9b
-#   - December 2013
-#     [+] updated for NDK r9c
-#   - January 2014
-#     [~] fix copying of shared STL
-#   - April 2014
-#     [+] updated for NDK r9d
 # ------------------------------------------------------------------------------

 cmake_minimum_required( VERSION 2.6.3 )
@@ -313,23 +216,31 @@
 endif()

 if( CMAKE_TOOLCHAIN_FILE )
- # touch toolchain variable only to suppress "unused variable" warning
-endif()
-
+ # touch toolchain variable to suppress "unused variable" warning
+endif()
+
+# inherit settings in recursive loads
 get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
 if( _CMAKE_IN_TRY_COMPILE )
  include( "${CMAKE_CURRENT_SOURCE_DIR}/../android.toolchain.config.cmake" OPTIONAL )
 endif()

 # this one is important
-set( CMAKE_SYSTEM_NAME Linux )
+if( CMAKE_VERSION VERSION_GREATER "3.0.99" )
+ set( CMAKE_SYSTEM_NAME Android )
+else()
+ set( CMAKE_SYSTEM_NAME Linux )
+endif()
+
 # this one not so much
 set( CMAKE_SYSTEM_VERSION 1 )

 # rpath makes low sence for Android
+set( CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "" )
 set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." )

-set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
+# NDK search paths
+set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r10d -r10c -r10b -r10 -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
 if(NOT DEFINED ANDROID_NDK_SEARCH_PATHS)
  if( CMAKE_HOST_WIN32 )
   file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS )
@@ -343,13 +254,21 @@
  set( ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH /opt/android-toolchain )
 endif()

+# known ABIs
 set( ANDROID_SUPPORTED_ABIS_arm "armeabi-v7a;armeabi;armeabi-v7a with NEON;armeabi-v7a with VFPV3;armeabi-v6 with VFP" )
+set( ANDROID_SUPPORTED_ABIS_arm64 "arm64-v8a" )
 set( ANDROID_SUPPORTED_ABIS_x86 "x86" )
-set( ANDROID_SUPPORTED_ABIS_mipsel "mips" )
-
+set( ANDROID_SUPPORTED_ABIS_x86_64 "x86_64" )
+set( ANDROID_SUPPORTED_ABIS_mips "mips" )
+set( ANDROID_SUPPORTED_ABIS_mips64 "mips64" )
+
+# API level defaults
 set( ANDROID_DEFAULT_NDK_API_LEVEL 8 )
+set( ANDROID_DEFAULT_NDK_API_LEVEL_arm64 21 )
 set( ANDROID_DEFAULT_NDK_API_LEVEL_x86 9 )
+set( ANDROID_DEFAULT_NDK_API_LEVEL_x86_64 21 )
 set( ANDROID_DEFAULT_NDK_API_LEVEL_mips 9 )
+set( ANDROID_DEFAULT_NDK_API_LEVEL_mips64 21 )

 macro( __LIST_FILTER listvar regex )
@@ -425,7 +344,7 @@
 endmacro()

 macro( __DETECT_NATIVE_API_LEVEL _var _path )
- SET( __ndkApiLevelRegex "^[\t ]*#define[\t ]+__ANDROID_API__[\t ]+([0-9]+)[\t ]*$" )
+ SET( __ndkApiLevelRegex "^[\t ]*#define[\t ]+__ANDROID_API__[\t ]+([0-9]+)[\t ]*.*$" )
  FILE( STRINGS ${_path} __apiFileContent REGEX "${__ndkApiLevelRegex}" )
  if( NOT __apiFileContent )
   message( SEND_ERROR "Could not get Android native API level. Probably you have specified invalid level value, or your copy of NDK/toolchain is broken." )
@@ -537,12 +456,15 @@
  set( ANDROID_NDK "${ANDROID_NDK}" CACHE INTERNAL "Path of the Android NDK" FORCE )
  set( BUILD_WITH_ANDROID_NDK True )
  if( EXISTS "${ANDROID_NDK}/RELEASE.TXT" )
-  file( STRINGS "${ANDROID_NDK}/RELEASE.TXT" ANDROID_NDK_RELEASE_FULL LIMIT_COUNT 1 REGEX r[0-9]+[a-z]? )
-  string( REGEX MATCH r[0-9]+[a-z]? ANDROID_NDK_RELEASE "${ANDROID_NDK_RELEASE_FULL}" )
+  file( STRINGS "${ANDROID_NDK}/RELEASE.TXT" ANDROID_NDK_RELEASE_FULL LIMIT_COUNT 1 REGEX "r[0-9]+[a-z]?" )
+  string( REGEX MATCH "r([0-9]+)([a-z]?)" ANDROID_NDK_RELEASE "${ANDROID_NDK_RELEASE_FULL}" )
  else()
   set( ANDROID_NDK_RELEASE "r1x" )
   set( ANDROID_NDK_RELEASE_FULL "unreleased" )
  endif()
+ string( REGEX REPLACE "r([0-9]+)([a-z]?)" "\\1*1000" ANDROID_NDK_RELEASE_NUM "${ANDROID_NDK_RELEASE}" )
+ string( FIND " abcdefghijklmnopqastuvwxyz" "${CMAKE_MATCH_2}" __ndkReleaseLetterNum )
+ math( EXPR ANDROID_NDK_RELEASE_NUM "${ANDROID_NDK_RELEASE_NUM}+${__ndkReleaseLetterNum}" )
 elseif( ANDROID_STANDALONE_TOOLCHAIN )
  get_filename_component( ANDROID_STANDALONE_TOOLCHAIN "${ANDROID_STANDALONE_TOOLCHAIN}" ABSOLUTE )
  # try to detect change
@@ -623,12 +545,18 @@
  if( NOT __availableToolchainMachines )
   message( FATAL_ERROR "Could not determine machine name of your toolchain. Probably your Android standalone toolchain is broken." )
  endif()
- if( __availableToolchainMachines MATCHES i686 )
+ if( __availableToolchainMachines MATCHES x86_64 )
+  set( __availableToolchainArchs "x86_64" )
+ elseif( __availableToolchainMachines MATCHES i686 )
   set( __availableToolchainArchs "x86" )
+ elseif( __availableToolchainMachines MATCHES aarch64 )
+  set( __availableToolchainArchs "arm64" )
  elseif( __availableToolchainMachines MATCHES arm )
   set( __availableToolchainArchs "arm" )
+ elseif( __availableToolchainMachines MATCHES mips64el )
+  set( __availableToolchainArchs "mips64" )
  elseif( __availableToolchainMachines MATCHES mipsel )
-  set( __availableToolchainArchs "mipsel" )
+  set( __availableToolchainArchs "mips" )
  endif()
  execute_process( COMMAND "${ANDROID_STANDALONE_TOOLCHAIN}/bin/${__availableToolchainMachines}-gcc${TOOL_OS_SUFFIX}" -dumpversion
                   OUTPUT_VARIABLE __availableToolchainCompilerVersions OUTPUT_STRIP_TRAILING_WHITESPACE )
@@ -644,24 +572,44 @@
 macro( __GLOB_NDK_TOOLCHAINS __availableToolchainsVar __availableToolchainsLst __toolchain_subpath )
  foreach( __toolchain ${${__availableToolchainsLst}} )
   if( "${__toolchain}" MATCHES "-clang3[.][0-9]$" AND NOT EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/${__toolchain}${__toolchain_subpath}" )
-   string( REGEX REPLACE "-clang3[.][0-9]$" "-4.6" __gcc_toolchain "${__toolchain}" )
+   SET( __toolchainVersionRegex "^TOOLCHAIN_VERSION[\t ]+:=[\t ]+(.*)$" )
+   FILE( STRINGS "${ANDROID_NDK_TOOLCHAINS_PATH}/${__toolchain}/setup.mk" __toolchainVersionStr REGEX "${__toolchainVersionRegex}" )
+   if( __toolchainVersionStr )
+    string( REGEX REPLACE "${__toolchainVersionRegex}" "\\1" __toolchainVersionStr "${__toolchainVersionStr}" )
+    string( REGEX REPLACE "-clang3[.][0-9]$" "-${__toolchainVersionStr}" __gcc_toolchain "${__toolchain}" )
+   else()
+    string( REGEX REPLACE "-clang3[.][0-9]$" "-4.6" __gcc_toolchain "${__toolchain}" )
+   endif()
+   unset( __toolchainVersionStr )
+   unset( __toolchainVersionRegex )
   else()
    set( __gcc_toolchain "${__toolchain}" )
   endif()
   __DETECT_TOOLCHAIN_MACHINE_NAME( __machine "${ANDROID_NDK_TOOLCHAINS_PATH}/${__gcc_toolchain}${__toolchain_subpath}" )
   if( __machine )
    string( REGEX MATCH "[0-9]+[.][0-9]+([.][0-9x]+)?$" __version "${__gcc_toolchain}" )
-   if( __machine MATCHES i686 )
+   if( __machine MATCHES x86_64 )
+    set( __arch "x86_64" )
+   elseif( __machine MATCHES i686 )
     set( __arch "x86" )
+   elseif( __machine MATCHES aarch64 )
+    set( __arch "arm64" )
    elseif( __machine MATCHES arm )
     set( __arch "arm" )
+   elseif( __machine MATCHES mips64el )
+    set( __arch "mips64" )
    elseif( __machine MATCHES mipsel )
-    set( __arch "mipsel" )
+    set( __arch "mips" )
+   else()
+    set( __arch "" )
    endif()
-   list( APPEND __availableToolchainMachines "${__machine}" )
-   list( APPEND __availableToolchainArchs "${__arch}" )
-   list( APPEND __availableToolchainCompilerVersions "${__version}" )
-   list( APPEND ${__availableToolchainsVar} "${__toolchain}" )
+   #message("machine: !${__machine}!\narch: !${__arch}!\nversion: !${__version}!\ntoolchain: !${__toolchain}!\n")
+   if (__arch)
+    list( APPEND __availableToolchainMachines "${__machine}" )
+    list( APPEND __availableToolchainArchs "${__arch}" )
+    list( APPEND __availableToolchainCompilerVersions "${__version}" )
+    list( APPEND ${__availableToolchainsVar} "${__toolchain}" )
+   endif()
   endif()
   unset( __gcc_toolchain )
  endforeach()
@@ -737,28 +685,45 @@
  set( X86 true )
  set( ANDROID_NDK_ABI_NAME "x86" )
  set( ANDROID_ARCH_NAME "x86" )
- set( ANDROID_ARCH_FULLNAME "x86" )
  set( ANDROID_LLVM_TRIPLE "i686-none-linux-android" )
  set( CMAKE_SYSTEM_PROCESSOR "i686" )
+elseif( ANDROID_ABI STREQUAL "x86_64" )
+ set( X86 true )
+ set( X86_64 true )
+ set( ANDROID_NDK_ABI_NAME "x86_64" )
+ set( ANDROID_ARCH_NAME "x86_64" )
+ set( CMAKE_SYSTEM_PROCESSOR "x86_64" )
+ set( ANDROID_LLVM_TRIPLE "x86_64-none-linux-android" )
+elseif( ANDROID_ABI STREQUAL "mips64" )
+ set( MIPS64 true )
+ set( ANDROID_NDK_ABI_NAME "mips64" )
+ set( ANDROID_ARCH_NAME "mips64" )
+ set( ANDROID_LLVM_TRIPLE "mips64el-none-linux-android" )
+ set( CMAKE_SYSTEM_PROCESSOR "mips64" )
 elseif( ANDROID_ABI STREQUAL "mips" )
  set( MIPS true )
  set( ANDROID_NDK_ABI_NAME "mips" )
  set( ANDROID_ARCH_NAME "mips" )
- set( ANDROID_ARCH_FULLNAME "mipsel" )
  set( ANDROID_LLVM_TRIPLE "mipsel-none-linux-android" )
  set( CMAKE_SYSTEM_PROCESSOR "mips" )
+elseif( ANDROID_ABI STREQUAL "arm64-v8a" )
+ set( ARM64_V8A true )
+ set( ANDROID_NDK_ABI_NAME "arm64-v8a" )
+ set( ANDROID_ARCH_NAME "arm64" )
+ set( ANDROID_LLVM_TRIPLE "aarch64-none-linux-android" )
+ set( CMAKE_SYSTEM_PROCESSOR "aarch64" )
+ set( VFPV3 true )
+ set( NEON true )
 elseif( ANDROID_ABI STREQUAL "armeabi" )
  set( ARMEABI true )
  set( ANDROID_NDK_ABI_NAME "armeabi" )
  set( ANDROID_ARCH_NAME "arm" )
- set( ANDROID_ARCH_FULLNAME "arm" )
  set( ANDROID_LLVM_TRIPLE "armv5te-none-linux-androideabi" )
  set( CMAKE_SYSTEM_PROCESSOR "armv5te" )
 elseif( ANDROID_ABI STREQUAL "armeabi-v6 with VFP" )
  set( ARMEABI_V6 true )
  set( ANDROID_NDK_ABI_NAME "armeabi" )
  set( ANDROID_ARCH_NAME "arm" )
- set( ANDROID_ARCH_FULLNAME "arm" )
  set( ANDROID_LLVM_TRIPLE "armv5te-none-linux-androideabi" )
  set( CMAKE_SYSTEM_PROCESSOR "armv6" )
  # need always fallback to older platform
@@ -767,14 +732,12 @@
  set( ARMEABI_V7A true )
  set( ANDROID_NDK_ABI_NAME "armeabi-v7a" )
  set( ANDROID_ARCH_NAME "arm" )
- set( ANDROID_ARCH_FULLNAME "arm" )
  set( ANDROID_LLVM_TRIPLE "armv7-none-linux-androideabi" )
  set( CMAKE_SYSTEM_PROCESSOR "armv7-a" )
 elseif( ANDROID_ABI STREQUAL "armeabi-v7a with VFPV3" )
  set( ARMEABI_V7A true )
  set( ANDROID_NDK_ABI_NAME "armeabi-v7a" )
  set( ANDROID_ARCH_NAME "arm" )
- set( ANDROID_ARCH_FULLNAME "arm" )
  set( ANDROID_LLVM_TRIPLE "armv7-none-linux-androideabi" )
  set( CMAKE_SYSTEM_PROCESSOR "armv7-a" )
  set( VFPV3 true )
@@ -782,7 +745,6 @@
  set( ARMEABI_V7A true )
  set( ANDROID_NDK_ABI_NAME "armeabi-v7a" )
  set( ANDROID_ARCH_NAME "arm" )
- set( ANDROID_ARCH_FULLNAME "arm" )
  set( ANDROID_LLVM_TRIPLE "armv7-none-linux-androideabi" )
  set( CMAKE_SYSTEM_PROCESSOR "armv7-a" )
  set( VFPV3 true )
@@ -816,7 +778,7 @@
 To configure the toolchain set CMake variable ANDROID_TOOLCHAIN_NAME to one of the following values:\n${toolchains_list}\n" )
  endif()
  list( GET __availableToolchainArchs ${__toolchainIdx} __toolchainArch )
- if( NOT __toolchainArch STREQUAL ANDROID_ARCH_FULLNAME )
+ if( NOT __toolchainArch STREQUAL ANDROID_ARCH_NAME )
   message( SEND_ERROR "Selected toolchain \"${ANDROID_TOOLCHAIN_NAME}\" is not able to compile binaries for the \"${ANDROID_ARCH_NAME}\" platform." )
  endif()
 else()
@@ -827,7 +789,7 @@
  math( EXPR __availableToolchainsCount "${__availableToolchainsCount}-1" )
  foreach( __idx RANGE ${__availableToolchainsCount} )
   list( GET __availableToolchainArchs ${__idx} __toolchainArch )
-  if( __toolchainArch STREQUAL ANDROID_ARCH_FULLNAME )
+  if( __toolchainArch STREQUAL ANDROID_ARCH_NAME )
    list( GET __availableToolchainCompilerVersions ${__idx} __toolchainVersion )
    string( REPLACE "x" "99" __toolchainVersion "${__toolchainVersion}")
    if( __toolchainVersion VERSION_GREATER __toolchainMaxVersion )
@@ -856,15 +818,16 @@

 # choose native API level
 __INIT_VARIABLE( ANDROID_NATIVE_API_LEVEL ENV_ANDROID_NATIVE_API_LEVEL ANDROID_API_LEVEL ENV_ANDROID_API_LEVEL ANDROID_STANDALONE_TOOLCHAIN_API_LEVEL ANDROID_DEFAULT_NDK_API_LEVEL_${ANDROID_ARCH_NAME} ANDROID_DEFAULT_NDK_API_LEVEL )
-string( REGEX MATCH "[0-9]+" ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" )
+string( REPLACE "android-" "" ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" )
+string( STRIP "${ANDROID_NATIVE_API_LEVEL}" ANDROID_NATIVE_API_LEVEL )
 # adjust API level
 set( __real_api_level ${ANDROID_DEFAULT_NDK_API_LEVEL_${ANDROID_ARCH_NAME}} )
 foreach( __level ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} )
- if( NOT __level GREATER ANDROID_NATIVE_API_LEVEL AND NOT __level LESS __real_api_level )
+ if( (__level LESS ANDROID_NATIVE_API_LEVEL OR __level STREQUAL ANDROID_NATIVE_API_LEVEL) AND NOT __level LESS __real_api_level )
   set( __real_api_level ${__level} )
  endif()
 endforeach()
-if( __real_api_level AND NOT ANDROID_NATIVE_API_LEVEL EQUAL __real_api_level )
+if( __real_api_level AND NOT ANDROID_NATIVE_API_LEVEL STREQUAL __real_api_level )
  message( STATUS "Adjusting Android API level 'android-${ANDROID_NATIVE_API_LEVEL}' to 'android-${__real_api_level}'")
  set( ANDROID_NATIVE_API_LEVEL ${__real_api_level} )
 endif()
@@ -876,7 +839,7 @@
 else()
  if( BUILD_WITH_ANDROID_NDK )
   __DETECT_NATIVE_API_LEVEL( __realApiLevel "${ANDROID_NDK}/platforms/android-${ANDROID_NATIVE_API_LEVEL}/arch-${ANDROID_ARCH_NAME}/usr/include/android/api-level.h" )
-  if( NOT __realApiLevel EQUAL ANDROID_NATIVE_API_LEVEL )
+  if( NOT __realApiLevel EQUAL ANDROID_NATIVE_API_LEVEL AND NOT __realApiLevel GREATER 9000 )
    message( SEND_ERROR "Specified Android API level (${ANDROID_NATIVE_API_LEVEL}) does not match to the level found (${__realApiLevel}). Probably your copy of NDK is broken." )
   endif()
   unset( __realApiLevel )
@@ -893,8 +856,8 @@
 # remember target ABI
 set( ANDROID_ABI "${ANDROID_ABI}" CACHE STRING "The target ABI for Android. If arm, then armeabi-v7a is recommended for hardware floating point." FORCE )
 if( CMAKE_VERSION VERSION_GREATER "2.8" )
- list( SORT ANDROID_SUPPORTED_ABIS_${ANDROID_ARCH_FULLNAME} )
- set_property( CACHE ANDROID_ABI PROPERTY STRINGS ${ANDROID_SUPPORTED_ABIS_${ANDROID_ARCH_FULLNAME}} )
+ list( SORT ANDROID_SUPPORTED_ABIS_${ANDROID_ARCH_NAME} )
+ set_property( CACHE ANDROID_ABI PROPERTY STRINGS ${ANDROID_SUPPORTED_ABIS_${ANDROID_ARCH_NAME}} )
 endif()

@@ -1036,7 +999,7 @@
  string( REGEX MATCH "[0-9]+[.][0-9]+" ANDROID_CLANG_VERSION "${ANDROID_CLANG_VERSION}")
 elseif( "${ANDROID_TOOLCHAIN_NAME}" MATCHES "-clang3[.][0-9]?$" )
  string( REGEX MATCH "3[.][0-9]$" ANDROID_CLANG_VERSION "${ANDROID_TOOLCHAIN_NAME}")
- string( REGEX REPLACE "-clang${ANDROID_CLANG_VERSION}$" "-4.6" ANDROID_GCC_TOOLCHAIN_NAME "${ANDROID_TOOLCHAIN_NAME}" )
+ string( REGEX REPLACE "-clang${ANDROID_CLANG_VERSION}$" "-${ANDROID_COMPILER_VERSION}" ANDROID_GCC_TOOLCHAIN_NAME "${ANDROID_TOOLCHAIN_NAME}" )
  if( NOT EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/llvm-${ANDROID_CLANG_VERSION}${ANDROID_NDK_TOOLCHAINS_SUBPATH}/bin/clang${TOOL_OS_SUFFIX}" )
   message( FATAL_ERROR "Could not find the Clang compiler driver" )
  endif()
@@ -1069,7 +1032,7 @@
   set( ANDROID_EXCEPTIONS       ON )
   set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/system/include" )
  elseif( ANDROID_STL MATCHES "gabi" )
-  if( ANDROID_NDK_RELEASE STRLESS "r7" )
+  if( ANDROID_NDK_RELEASE_NUM LESS 7000 ) # before r7
    message( FATAL_ERROR "gabi++ is not awailable in your NDK. You have to upgrade to NDK r7 or newer to use gabi++.")
   endif()
   set( ANDROID_RTTI             ON )
@@ -1077,12 +1040,12 @@
   set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/gabi++/include" )
   set( __libstl                 "${ANDROID_NDK}/sources/cxx-stl/gabi++/libs/${ANDROID_NDK_ABI_NAME}/libgabi++_static.a" )
  elseif( ANDROID_STL MATCHES "stlport" )
-  if( NOT ANDROID_NDK_RELEASE STRLESS "r8d" )
+  if( NOT ANDROID_NDK_RELEASE_NUM LESS 8004 ) # before r8d
    set( ANDROID_EXCEPTIONS       ON )
   else()
    set( ANDROID_EXCEPTIONS       OFF )
   endif()
-  if( ANDROID_NDK_RELEASE STRLESS "r7" )
+  if( ANDROID_NDK_RELEASE_NUM LESS 7000 ) # before r7
    set( ANDROID_RTTI            OFF )
   else()
    set( ANDROID_RTTI            ON )
@@ -1103,7 +1066,7 @@
   else()
    set( __libstl                "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++" )
   endif()
-  set( ANDROID_STL_INCLUDE_DIRS "${__libstl}/include" "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/include" )
+  set( ANDROID_STL_INCLUDE_DIRS "${__libstl}/include" "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/include" "${__libstl}/include/backward" )
   if( EXISTS "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/libgnustl_static.a" )
    set( __libstl                "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/libgnustl_static.a" )
   else()
@@ -1205,10 +1168,14 @@
 include( CMakeForceCompiler )
 CMAKE_FORCE_C_COMPILER( "${CMAKE_C_COMPILER}" GNU )
 if( ANDROID_COMPILER_IS_CLANG )
- set( CMAKE_C_COMPILER_ID Clang)
+ set( CMAKE_C_COMPILER_ID Clang )
 endif()
 set( CMAKE_C_PLATFORM_ID Linux )
-set( CMAKE_C_SIZEOF_DATA_PTR 4 )
+if( X86_64 OR MIPS64 OR ARM64_V8A )
+ set( CMAKE_C_SIZEOF_DATA_PTR 8 )
+else()
+ set( CMAKE_C_SIZEOF_DATA_PTR 4 )
+endif()
 set( CMAKE_C_HAS_ISYSROOT 1 )
 set( CMAKE_C_COMPILER_ABI ELF )
 CMAKE_FORCE_CXX_COMPILER( "${CMAKE_CXX_COMPILER}" GNU )
@@ -1216,7 +1183,7 @@
  set( CMAKE_CXX_COMPILER_ID Clang)
 endif()
 set( CMAKE_CXX_PLATFORM_ID Linux )
-set( CMAKE_CXX_SIZEOF_DATA_PTR 4 )
+set( CMAKE_CXX_SIZEOF_DATA_PTR ${CMAKE_C_SIZEOF_DATA_PTR} )
 set( CMAKE_CXX_HAS_ISYSROOT 1 )
 set( CMAKE_CXX_COMPILER_ABI ELF )
 set( CMAKE_CXX_SOURCE_FILE_EXTENSIONS cc cp cxx cpp CPP c++ C )
@@ -1227,6 +1194,14 @@
 set( CMAKE_ASM_COMPILER_FORCED TRUE )
 set( CMAKE_COMPILER_IS_GNUASM 1)
 set( CMAKE_ASM_SOURCE_FILE_EXTENSIONS s S asm )
+
+foreach( lang C CXX ASM )
+ if( ANDROID_COMPILER_IS_CLANG )
+  set( CMAKE_${lang}_COMPILER_VERSION ${ANDROID_CLANG_VERSION} )
+ else()
+  set( CMAKE_${lang}_COMPILER_VERSION ${ANDROID_COMPILER_VERSION} )
+ endif()
+endforeach()

 # flags and definitions
 remove_definitions( -DANDROID )
@@ -1257,8 +1232,15 @@
 endif()

 # NDK flags
-if( ARMEABI OR ARMEABI_V7A )
- set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fpic -funwind-tables" )
+if (ARM64_V8A )
+ set( ANDROID_CXX_FLAGS         "${ANDROID_CXX_FLAGS} -ffunction-sections -funwind-tables" )
+ set( ANDROID_CXX_FLAGS_RELEASE "-fomit-frame-pointer -fstrict-aliasing" )
+ set( ANDROID_CXX_FLAGS_DEBUG   "-fno-omit-frame-pointer -fno-strict-aliasing" )
+ if( NOT ANDROID_COMPILER_IS_CLANG )
+  set( ANDROID_CXX_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE} -funswitch-loops -finline-limit=300" )
+ endif()
+elseif( ARMEABI OR ARMEABI_V7A)
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funwind-tables" )
  if( NOT ANDROID_FORCE_ARM_BUILD AND NOT ARMEABI_V6 )
   set( ANDROID_CXX_FLAGS_RELEASE "-mthumb -fomit-frame-pointer -fno-strict-aliasing" )
   set( ANDROID_CXX_FLAGS_DEBUG   "-marm -fno-omit-frame-pointer -fno-strict-aliasing" )
@@ -1273,17 +1255,15 @@
    set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funswitch-loops -finline-limit=300" )
   endif()
  endif()
-elseif( X86 )
+elseif( X86 OR X86_64 )
  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funwind-tables" )
  if( NOT ANDROID_COMPILER_IS_CLANG )
   set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funswitch-loops -finline-limit=300" )
- else()
-  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fPIC" )
  endif()
  set( ANDROID_CXX_FLAGS_RELEASE "-fomit-frame-pointer -fstrict-aliasing" )
  set( ANDROID_CXX_FLAGS_DEBUG   "-fno-omit-frame-pointer -fno-strict-aliasing" )
-elseif( MIPS )
- set( ANDROID_CXX_FLAGS         "${ANDROID_CXX_FLAGS} -fpic -fno-strict-aliasing -finline-functions -ffunction-sections -funwind-tables -fmessage-length=0" )
+elseif( MIPS OR MIPS64 )
+ set( ANDROID_CXX_FLAGS         "${ANDROID_CXX_FLAGS} -fno-strict-aliasing -finline-functions -ffunction-sections -funwind-tables -fmessage-length=0" )
  set( ANDROID_CXX_FLAGS_RELEASE "-fomit-frame-pointer" )
  set( ANDROID_CXX_FLAGS_DEBUG   "-fno-omit-frame-pointer" )
  if( NOT ANDROID_COMPILER_IS_CLANG )
@@ -1361,7 +1341,7 @@
 endif()

 # variables controlling optional build flags
-if (ANDROID_NDK_RELEASE STRLESS "r7")
+if( ANDROID_NDK_RELEASE_NUM LESS 7000 ) # before r7
  # libGLESv2.so in NDK's prior to r7 refers to missing external symbols.
  # So this flag option is required for all projects using OpenGL from native.
  __INIT_VARIABLE( ANDROID_SO_UNDEFINED                      VALUES ON )
@@ -1377,7 +1357,7 @@
 set( ANDROID_NO_UNDEFINED           ${ANDROID_NO_UNDEFINED}           CACHE BOOL "Show all undefined symbols as linker errors" )
 set( ANDROID_SO_UNDEFINED           ${ANDROID_SO_UNDEFINED}           CACHE BOOL "Allows or disallows undefined symbols in shared libraries" )
 set( ANDROID_FUNCTION_LEVEL_LINKING ${ANDROID_FUNCTION_LEVEL_LINKING} CACHE BOOL "Allows or disallows undefined symbols in shared libraries" )
-set( ANDROID_GOLD_LINKER            ${ANDROID_GOLD_LINKER}            CACHE BOOL "Enables gold linker (only avaialble for NDK r8b for ARM and x86 architectures on linux-86 and darwin-x86 hosts)" )
+set( ANDROID_GOLD_LINKER            ${ANDROID_GOLD_LINKER}            CACHE BOOL "Enables gold linker" )
 set( ANDROID_NOEXECSTACK            ${ANDROID_NOEXECSTACK}            CACHE BOOL "Allows or disallows undefined symbols in shared libraries" )
 set( ANDROID_RELRO                  ${ANDROID_RELRO}                  CACHE BOOL "Enables RELRO - a memory corruption mitigation technique" )
 mark_as_advanced( ANDROID_NO_UNDEFINED ANDROID_SO_UNDEFINED ANDROID_FUNCTION_LEVEL_LINKING ANDROID_GOLD_LINKER ANDROID_NOEXECSTACK ANDROID_RELRO )
@@ -1412,9 +1392,9 @@
 endif()

 if( ANDROID_COMPILER_VERSION VERSION_EQUAL "4.6" )
- if( ANDROID_GOLD_LINKER AND (CMAKE_HOST_UNIX OR ANDROID_NDK_RELEASE STRGREATER "r8b") AND (ARMEABI OR ARMEABI_V7A OR X86) )
+ if( ANDROID_GOLD_LINKER AND (CMAKE_HOST_UNIX OR ANDROID_NDK_RELEASE_NUM GREATER 8002) AND (ARMEABI OR ARMEABI_V7A OR X86) )
   set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -fuse-ld=gold" )
- elseif( ANDROID_NDK_RELEASE STRGREATER "r8b")
+ elseif( ANDROID_NDK_RELEASE_NUM GREATER 8002 ) # after r8b
   set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -fuse-ld=bfd" )
  elseif( ANDROID_NDK_RELEASE STREQUAL "r8b" AND ARMEABI AND NOT _CMAKE_IN_TRY_COMPILE )
   message( WARNING "The default bfd linker from arm GCC 4.6 toolchain can fail with 'unresolvable R_ARM_THM_CALL relocation' error message. See https://code.google.com/p/android/issues/detail?id=35342
@@ -1438,13 +1418,7 @@
 endif()

 if( ANDROID_COMPILER_IS_CLANG )
- set( ANDROID_CXX_FLAGS "-Qunused-arguments ${ANDROID_CXX_FLAGS}" )
- if( ARMEABI_V7A AND NOT ANDROID_FORCE_ARM_BUILD )
-  set( ANDROID_CXX_FLAGS_RELEASE "-target thumbv7-none-linux-androideabi ${ANDROID_CXX_FLAGS_RELEASE}" )
-  set( ANDROID_CXX_FLAGS_DEBUG   "-target ${ANDROID_LLVM_TRIPLE} ${ANDROID_CXX_FLAGS_DEBUG}" )
- else()
-  set( ANDROID_CXX_FLAGS "-target ${ANDROID_LLVM_TRIPLE} ${ANDROID_CXX_FLAGS}" )
- endif()
+ set( ANDROID_CXX_FLAGS "-target ${ANDROID_LLVM_TRIPLE} -Qunused-arguments ${ANDROID_CXX_FLAGS}" )
  if( BUILD_WITH_ANDROID_NDK )
   set( ANDROID_CXX_FLAGS "-gcc-toolchain ${ANDROID_TOOLCHAIN_ROOT} ${ANDROID_CXX_FLAGS}" )
  endif()
@@ -1482,6 +1456,16 @@
  set( CMAKE_SHARED_LINKER_FLAGS "-Wl,-T,${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_GCC_TOOLCHAIN_NAME}/mipself.xsc ${CMAKE_SHARED_LINKER_FLAGS}" )
  set( CMAKE_MODULE_LINKER_FLAGS "-Wl,-T,${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_GCC_TOOLCHAIN_NAME}/mipself.xsc ${CMAKE_MODULE_LINKER_FLAGS}" )
  set( CMAKE_EXE_LINKER_FLAGS    "-Wl,-T,${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_GCC_TOOLCHAIN_NAME}/mipself.x ${CMAKE_EXE_LINKER_FLAGS}" )
+endif()
+
+# pie/pic
+if( NOT (ANDROID_NATIVE_API_LEVEL LESS 16) AND (NOT DEFINED ANDROID_APP_PIE OR ANDROID_APP_PIE) AND (CMAKE_VERSION VERSION_GREATER 2.8.8) )
+ set( CMAKE_POSITION_INDEPENDENT_CODE TRUE )
+ set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIE -pie")
+else()
+ set( CMAKE_POSITION_INDEPENDENT_CODE FALSE )
+ set( CMAKE_CXX_FLAGS "-fpic ${CMAKE_CXX_FLAGS}" )
+ set( CMAKE_C_FLAGS   "-fpic ${CMAKE_C_FLAGS}" )
 endif()

 # configure rtti
@@ -1665,6 +1649,7 @@
                 ANDROID_RELRO
                 ANDROID_LIBM_PATH
                 ANDROID_EXPLICIT_CRT_LINK
+                ANDROID_APP_PIE
                 )
   if( DEFINED ${__var} )
    if( "${__var}" MATCHES " ")
@@ -1703,8 +1688,8 @@

 # Variables controlling behavior or set by cmake toolchain:
-#   ANDROID_ABI : "armeabi-v7a" (default), "armeabi", "armeabi-v7a with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP", "x86", "mips"
-#   ANDROID_NATIVE_API_LEVEL : 3,4,5,8,9,14 (depends on NDK version)
+#   ANDROID_ABI : "armeabi-v7a" (default), "armeabi", "armeabi-v7a with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP", "x86", "mips", "arm64-v8a", "x86_64", "mips64"
+#   ANDROID_NATIVE_API_LEVEL : 3,4,5,8,9,14,15,16,17,18,19,21 (depends on NDK version)
 #   ANDROID_STL : gnustl_static/gnustl_shared/stlport_static/stlport_shared/gabi++_static/gabi++_shared/system_re/system/none
 #   ANDROID_FORBID_SYGWIN : ON/OFF
 #   ANDROID_NO_UNDEFINED : ON/OFF
@@ -1737,17 +1722,21 @@
 #   ARMEABI : TRUE for arm v6 and older devices
 #   ARMEABI_V6 : TRUE for arm v6
 #   ARMEABI_V7A : TRUE for arm v7a
+#   ARM64_V8A : TRUE for arm64-v8a
 #   NEON : TRUE if NEON unit is enabled
 #   VFPV3 : TRUE if VFP version 3 is enabled
 #   X86 : TRUE if configured for x86
+#   X86_64 : TRUE if configured for x86_64
 #   MIPS : TRUE if configured for mips
+#   MIPS64 : TRUE if configured for mips64
 #   BUILD_ANDROID : always TRUE
 #   BUILD_WITH_ANDROID_NDK : TRUE if NDK is used
 #   BUILD_WITH_STANDALONE_TOOLCHAIN : TRUE if standalone toolchain is used
 #   ANDROID_NDK_HOST_SYSTEM_NAME : "windows", "linux-x86" or "darwin-x86" depending on host platform
-#   ANDROID_NDK_ABI_NAME : "armeabi", "armeabi-v7a", "x86" or "mips" depending on ANDROID_ABI
-#   ANDROID_NDK_RELEASE : one of r5, r5b, r5c, r6, r6b, r7, r7b, r7c, r8, r8b, r8c, r8d, r8e, r9, r9b, r9c, r9d; set only for NDK
-#   ANDROID_ARCH_NAME : "arm" or "x86" or "mips" depending on ANDROID_ABI
+#   ANDROID_NDK_ABI_NAME : "armeabi", "armeabi-v7a", "x86", "mips", "arm64-v8a", "x86_64", "mips64" depending on ANDROID_ABI
+#   ANDROID_NDK_RELEASE : from r5 to r10d; set only for NDK
+#   ANDROID_NDK_RELEASE_NUM : numeric ANDROID_NDK_RELEASE version (1000*major+minor)
+#   ANDROID_ARCH_NAME : "arm", "x86", "mips", "arm64", "x86_64", "mips64" depending on ANDROID_ABI
 #   ANDROID_SYSROOT : path to the compiler sysroot
 #   TOOL_OS_SUFFIX : "" or ".exe" depending on host platform
 #   ANDROID_COMPILER_IS_CLANG : TRUE if clang compiler is used
@@ -1755,7 +1744,8 @@
 #   ARMEABI_NDK_NAME : superseded by ANDROID_NDK_ABI_NAME
 #
 # Secondary (less stable) read-only variables:
-#   ANDROID_COMPILER_VERSION : GCC version used
+#   ANDROID_COMPILER_VERSION : GCC version used (not Clang version)
+#   ANDROID_CLANG_VERSION : version of clang compiler if clang is used
 #   ANDROID_CXX_FLAGS : C/C++ compiler flags required by Android platform
 #   ANDROID_SUPPORTED_ABIS : list of currently allowed values for ANDROID_ABI
 #   ANDROID_TOOLCHAIN_MACHINE_NAME : "arm-linux-androideabi", "arm-eabi" or "i686-android-linux"
@@ -1766,7 +1756,6 @@
 #   ANDROID_RTTI : if rtti is enabled by the runtime
 #   ANDROID_EXCEPTIONS : if exceptions are enabled by the runtime
 #   ANDROID_GCC_TOOLCHAIN_NAME : read-only, differs from ANDROID_TOOLCHAIN_NAME only if clang is used
-#   ANDROID_CLANG_VERSION : version of clang compiler if clang is used
 #   ANDROID_LIBM_PATH : path to libm.so (set to something like $(TOP)/out/target/product/<product_name>/obj/lib/libm.so) to workaround unresolved `sincos`
 #
 # Defaults:


PARQUET-881: Update Arrow hash to 0.2.0-rc2

Author: Uwe L. Korn <uwe@apache.org>

Closes #247 from xhochy/PARQUET-881 and squashes the following commits:

2ca6037 [Uwe L. Korn] PARQUET-881: Update Arrow hash to 0.2.0-rc2

--- cmake_modules/ThirdpartyToolchain.cmake
+++ cmake_modules/ThirdpartyToolchain.cmake
@@ -22,7 +22,7 @@

 # Brotli 0.5.2 does not install headers/libraries yet, but 0.6.0.dev does
 set(BROTLI_VERSION "5db62dcc9d386579609540cdf8869e95ad334bbd")
-set(ARROW_VERSION "66f650cd359e13f3d5c3d4ef78d89f389d6bcecc")
+set(ARROW_VERSION "fa8d27f314b7c21c611d1c5caaa9b32ae0cb2b06")

 # find boost headers and libs
 set(Boost_DEBUG TRUE)


omnibusf4sd: disable landing_target_estimator

to reduce FLASH size

--- boards/omnibus/f4sd/default.cmake
+++ boards/omnibus/f4sd/default.cmake
@@ -53,7 +53,7 @@
 		#fw_att_control
 		#fw_pos_control_l1
 		land_detector
-		landing_target_estimator
+		#landing_target_estimator
 		load_mon
 		#local_position_estimator
 		logger


Ticket #2062: remove extra OS/ARCH from /scratch path per gthain

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -425,8 +425,8 @@
 	#if ( EXISTS /p/condor/workspaces/externals  )
 	#	set (EXTERNAL_STAGE /p/condor/workspaces/externals/cmake/${OS_NAME}/${SYS_ARCH})
 	#else()
-		# just in case someone tries something funky still insert OS & ARCH in path
-		set (EXTERNAL_STAGE /scratch/condor/externals/${OS_NAME}/${SYS_ARCH})
+		# in case someone tries something funky insert OS & ARCH in path
+		set (EXTERNAL_STAGE /scratch/condor/externals) #${OS_NAME}/${SYS_ARCH})
 	#endif()
 endif(WINDOWS)


Nagios Monitoring 6.4.6-1 Gold

Nagios Monitoring 6.4.6-1 Gold

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

--- version.cmake
+++ version.cmake
@@ -4,7 +4,7 @@
 set ( HPCC_PROJECT "community" )
 set ( HPCC_MAJOR 6 )
 set ( HPCC_MINOR 4 )
-set ( HPCC_POINT 2 )
+set ( HPCC_POINT 6 )
 set ( HPCC_MATURITY "release")
 set ( HPCC_SEQUENCE 1 )
 ###


Nagios Monitoring 5.2.0-rc5 Release Candidate 5

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

--- version.cmake
+++ version.cmake
@@ -6,5 +6,5 @@
 set ( HPCC_MINOR 2 )
 set ( HPCC_POINT 0 )
 set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 3 )
+set ( HPCC_SEQUENCE 5 )
 ###


Split off 8.4.22

Split off 8.4.22

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

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


[CMake] Don't build tests for RE2 (#14696)

* [CMake] Don't build tests for RE2

Issue #14691 shows a build error on Windows in the RE2 tests. Since we do not run these tests, and they seem to be causing problems on some platforms, do not build them as part of the TensorFlow build.

* replace tab with spaces

--- tensorflow/contrib/cmake/external/re2.cmake
+++ tensorflow/contrib/cmake/external/re2.cmake
@@ -45,4 +45,5 @@
 		endif()
         -DCMAKE_BUILD_TYPE:STRING=Release
         -DCMAKE_INSTALL_PREFIX:STRING=${re2_INSTALL}
+        -DRE2_BUILD_TESTING:BOOL=OFF
 )


Increment version to 3.4.1

Increment version to 3.4.1

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

 SET(AF_VERSION_MAJOR "3")
 SET(AF_VERSION_MINOR "4")
-SET(AF_VERSION_PATCH "0")
+SET(AF_VERSION_PATCH "1")

 SET(AF_VERSION "${AF_VERSION_MAJOR}.${AF_VERSION_MINOR}.${AF_VERSION_PATCH}")
 SET(AF_API_VERSION_CURRENT ${AF_VERSION_MAJOR}${AF_VERSION_MINOR})


cmake: Enable auhal audio output on Mac OS X.

--- extras/buildsystem/cmake/include/config.cmake
+++ extras/buildsystem/cmake/include/config.cmake
@@ -213,7 +213,7 @@

     set(SYS_DARWIN 1)
     add_definitions(-std=gnu99) # Hack for obj-c files to be compiled with gnu99
-    vlc_enable_modules(macosx minimal_macosx access_eyetv quartztext)
+    vlc_enable_modules(macosx minimal_macosx access_eyetv quartztext auhal)

     # On Pre-10.5
     vlc_module_add_link_flags (ffmpeg "-read_only_relocs warning")
@@ -226,7 +226,8 @@
    # check_symbol_exists (CFPreferencesCopyAppValue "CoreFoundation/CoreFoundation.h" "" HAVE_CFPREFERENCESCOPYAPPVALUE)

     vlc_find_frameworks(Cocoa Carbon OpenGL AGL IOKit Quicktime
-                        WebKit QuartzCore Foundation ApplicationServices)
+                        WebKit QuartzCore Foundation ApplicationServices
+                        CoreAudio AudioUnit AudioToolbox)
     vlc_module_add_link_libraries(macosx
         ${Cocoa_FRAMEWORKS}
         ${IOKit_FRAMEWORKS}
@@ -248,6 +249,11 @@
     vlc_module_add_link_libraries(quartztext
          ${Carbon_FRAMEWORKS}
          ${ApplicationServices_FRAMEWORKS} )
+    vlc_module_add_link_libraries(auhal
+         ${Carbon_FRAMEWORKS}
+         ${CoreAudio_FRAMEWORKS}
+         ${AudioUnit_FRAMEWORKS}
+         ${AudioToolbox_FRAMEWORKS} )
     vlc_module_add_link_libraries(mp4 ${IOKit_FRAMEWORKS} )
     vlc_module_add_link_libraries(mkv ${IOKit_FRAMEWORKS} )

@@ -473,4 +479,3 @@
 # Final configuration
 ###########################################################
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/include/config.h)
-


[cmake] LLDBFramework: Copy in the clang resource dir from the swift build

This module attempted to copy in a clang resource dir into the LLDB
framework from a non-existent directory (at least, this is the case when
building & testing with build-script --lldb-build-with-cmake --test).

Copy in an actual clang resource directory which is known to live within
the swift build.

This makes it possible to run tests that do anything interesting with
the clang resource dir (e.g importing C modules).

--- cmake/modules/LLDBFramework.cmake
+++ cmake/modules/LLDBFramework.cmake
@@ -24,7 +24,7 @@
     COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders $<TARGET_FILE_DIR:liblldb>/Headers
     COMMAND ${CMAKE_COMMAND} -E create_symlink Versions/Current/Headers ${LLDB_FRAMEWORK_DIR}/LLDB.framework/Headers
     COMMAND ${CMAKE_COMMAND} -E create_symlink ${LLDB_FRAMEWORK_VERSION} ${LLDB_FRAMEWORK_DIR}/LLDB.framework/Versions/Current
-    COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/clang/${LLDB_VERSION} $<TARGET_FILE_DIR:liblldb>/Resources/Clang
+    COMMAND ${CMAKE_COMMAND} -E copy_directory ${LLDB_PATH_TO_SWIFT_BUILD}/lib/swift/clang/ $<TARGET_FILE_DIR:liblldb>/Resources/Clang
     COMMAND ${CMAKE_COMMAND} -E copy_directory ${LLDB_PATH_TO_SWIFT_BUILD}/lib/swift $<TARGET_FILE_DIR:liblldb>/Resources/Swift
   )
 else()


Add the EXTERNAL_DATA argument

Add the EXTERNAL_DATA argument

--- tests/JavascriptTests.cmake
+++ tests/JavascriptTests.cmake
@@ -107,7 +107,7 @@

   set(_options NOCOVERAGE)
   set(_args PLUGIN ASSETSTORE WEBSECURITY BASEURL PLUGIN_DIR TIMEOUT TEST_MODULE REQUIRED_FILES
-            SETUP_MODULES ENVIRONMENT)
+            SETUP_MODULES ENVIRONMENT EXTERNAL_DATA)
   set(_multival_args RESOURCE_LOCKS ENABLEDPLUGINS)
   cmake_parse_arguments(fn "${_options}" "${_args}" "${_multival_args}" ${ARGN})


Return a nonzero value if the quick tests fail.

Previously 'make test' would return 0 regardless of whether or not any
quick tests failed.

--- tests/quick_tests/run.cmake
+++ tests/quick_tests/run.cmake
@@ -1,6 +1,6 @@
 ## ---------------------------------------------------------------------
 ##
-## Copyright (C) 2013 by the deal.II authors
+## Copyright (C) 2013 - 2016 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -61,4 +61,11 @@

   ENDFOREACH()

+  # The CMake command MESSAGE(SEND_ERROR ...) is, to the best of the authors'
+  # knowledge, the only way to set the exit status of CMake to a nonzero value.
+  # If we used MESSAGE(SEND_ERROR ...) at the top (with the actual error
+  # message) then subsequent messages (i.e., the test specific help) would not
+  # be printed. Hence, do it down here.
+  MESSAGE(SEND_ERROR "")
+
 ENDIF()


Added external modules to example paths to support snippets

--- tools/doxygen/doxygen.cmake
+++ tools/doxygen/doxygen.cmake
@@ -135,6 +135,8 @@

     string(TOLOWER ${ARG_NAME} name_lower)

+    string(JOIN " \\ \n" example_paths ${IVW_EXTERNAL_MODULES} )
+
     set(doxyfile "\
 PROJECT_NAME           = \"${ARG_NAME}\"
 PROJECT_NUMBER         = \"${IVW_VERSION}\"
@@ -208,7 +210,8 @@

 HTML_EXTRA_FILES       = ${ivw_doxy_dir}/style/img_downArrow.png

-EXAMPLE_PATH           = ${IVW_ROOT_DIR}
+EXAMPLE_PATH           = ${IVW_ROOT_DIR} \\
+                         ${example_paths}

 HTML_COLORSTYLE_HUE    = 240
 HTML_COLORSTYLE_SAT    = 6


Remove dependencies include dirs in the tester project.

--- tester/project.cmake
+++ tester/project.cmake
@@ -1,10 +1,6 @@
 ## Tbag CMake project setting.

 tbag_modules__include_project (Default)
-
-## TODO Remove this code.
-list (APPEND TBAG_PROJECT_INCLUDE_DIRS  ${TBAG_DEP_UV_INCLUDE_DIRS})
-list (APPEND TBAG_PROJECT_INCLUDE_DIRS  ${TBAG_DEP_SPDLOG_INCLUDE_DIRS})

 ## libtbag-gtest
 include (${PROJECT_SOURCE_DIR}/dep/gtest.cmake)


COMP: remove completely unused cmake var

--- CMake/otbIncludeDirectories.cmake
+++ CMake/otbIncludeDirectories.cmake
@@ -232,7 +232,7 @@
 #-----------------------------------------------------------------------------
 # Include directories from the install tree.
 # Alls install dirs must been RELATIVE PATH, except for the external libraries, specify by the ABSOLUE PATH
-SET(OTB_INSTALL_INCLUDE_PATH "${CMAKE_INSTALL_PREFIX}${OTB_INSTALL_INCLUDE_DIR}")
+# SET(OTB_INSTALL_INCLUDE_PATH "${CMAKE_INSTALL_PREFIX}${OTB_INSTALL_INCLUDE_DIR}")
 #           SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS} )

 #           SET(OTB_INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib/otb")


They released a new version of Boost. Add it to the list.

--HG--
branch : v1-8


CMake: Dependencies - specify --config to get right build_type on MSVC

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -95,6 +95,8 @@
         set(OGREDEPS_SHARED FALSE)
     endif()

+    set(BUILD_COMMAND_OPTS --target install --config ${CMAKE_BUILD_TYPE})
+
     if(MSVC OR EMSCRIPTEN) # other platforms ship zlib
         message(STATUS "Building zlib")
         file(DOWNLOAD
@@ -110,7 +112,7 @@
             ${CROSS}
             ${CMAKE_BINARY_DIR}/zlib-1.2.11
             WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/zlib-1.2.11)
-        execute_process(COMMAND cmake --build ${CMAKE_BINARY_DIR}/zlib-1.2.11 --target install)
+        execute_process(COMMAND cmake --build ${CMAKE_BINARY_DIR}/zlib-1.2.11 ${BUILD_COMMAND_OPTS})
     endif()

     message(STATUS "Building ZZIPlib")
@@ -127,7 +129,7 @@
         ${CROSS}
         ${CMAKE_BINARY_DIR}/ZZIPlib-master
         WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/ZZIPlib-master)
-    execute_process(COMMAND cmake --build ${CMAKE_BINARY_DIR}/ZZIPlib-master --target install)
+    execute_process(COMMAND cmake --build ${CMAKE_BINARY_DIR}/ZZIPlib-master ${BUILD_COMMAND_OPTS})

     message(STATUS "Building freetype")
     file(DOWNLOAD
@@ -150,7 +152,7 @@
         -G ${CMAKE_GENERATOR}
         ${CMAKE_BINARY_DIR}/freetype-2.6.5
         WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/freetype-2.6.5/objs)
-    execute_process(COMMAND cmake --build ${CMAKE_BINARY_DIR}/freetype-2.6.5/objs --target install)
+    execute_process(COMMAND cmake --build ${CMAKE_BINARY_DIR}/freetype-2.6.5/objs ${BUILD_COMMAND_OPTS})

     if(MSVC) # other platforms dont need this
         message(STATUS "Building SDL2")
@@ -167,7 +169,7 @@
             ${CROSS}
             ${OGRE_BINARY_DIR}/SDL2-2.0.5
             WORKING_DIRECTORY ${OGRE_BINARY_DIR}/SDL2-build)
-        execute_process(COMMAND cmake --build ${OGRE_BINARY_DIR}/SDL2-build --target install)
+        execute_process(COMMAND cmake --build ${OGRE_BINARY_DIR}/SDL2-build ${BUILD_COMMAND_OPTS})
     endif()
 endif()


cmake configl for libkml library

cmake configl for libkml library

--- CMake/External_OTB.cmake
+++ CMake/External_OTB.cmake
@@ -80,8 +80,8 @@
 if(USE_SYSTEM_LIBKML)
   set(OTB_SB_LIBKML_CONFIG)
 else()
+  # TODO : split LIBKML build into 7 libraries
   set(OTB_SB_LIBKML_CONFIG
-    # TODO : split LIBKML build into 7 libraries
     -DLIBKML_INCLUDE_DIR:PATH=${CMAKE_INSTALL_PREFIX}/include
     -DLIBKML_BASE_LIBRARY:PATH=${CMAKE_INSTALL_PREFIX}/lib/libkmlbase.so
     -DLIBKML_CONVENIENCE_LIBRARY:PATH=${CMAKE_INSTALL_PREFIX}/lib/libkmlconvenience.so
@@ -91,6 +91,20 @@
     -DLIBKML_XSD_LIBRARY:PATH=${CMAKE_INSTALL_PREFIX}/lib/libkmlxsd.so
     -DLIBKML_MINIZIP_LIBRARY:PATH=${CMAKE_INSTALL_PREFIX}/lib/libminizip.so
     )
+
+  if(MSVC)
+    # expat is a dependency for kmlbase
+    set(OTB_SB_LIBKML_CONFIG
+    -DLIBKML_INCLUDE_DIR:FILEPATH=${CMAKE_INSTALL_PREFIX}/include
+    -DLIBKML_BASE_LIBRARY:FILEPATH=${CMAKE_INSTALL_PREFIX}/lib/kmlbase.lib;${CMAKE_INSTALL_PREFIX}/lib/expat.lib
+    -DLIBKML_CONVENIENCE_LIBRARY:FILEPATH=${CMAKE_INSTALL_PREFIX}/lib/kmlconvenience.lib
+    -DLIBKML_DOM_LIBRARY:FILEPATH=${CMAKE_INSTALL_PREFIX}/lib/kmldom.lib
+    -DLIBKML_ENGINE_LIBRARY:FILEPATH=${CMAKE_INSTALL_PREFIX}/lib/kmlengine.lib
+    -DLIBKML_REGIONATOR_LIBRARY:FILEPATH=${CMAKE_INSTALL_PREFIX}/lib/kmlregionator.lib
+    -DLIBKML_XSD_LIBRARY:FILEPATH=${CMAKE_INSTALL_PREFIX}/lib/kmlxsd.lib
+    -DLIBKML_MINIZIP_LIBRARY:FILEPATH=${CMAKE_INSTALL_PREFIX}/lib/minizip.lib
+    )
+  endif()
   list(APPEND ${proj}_DEPENDENCIES LIBKML)
 endif()

@@ -120,7 +134,6 @@
   set(OTB_SB_MUPARSER_CONFIG)
   set(OTB_SB_MUPARSERX_CONFIG)
   set(OTB_SB_TINYXML_CONFIG)
-  set(OTB_SB_LIBKML_CONFIG)
   set(OTB_SB_OPENCV_CONFIG)
   #doesn't matter to use cmake variable with JPEG prefix. all are empty for windows
   #GDAL is built with internal JPEG due to static link conflict.


Update PythonQt

Update PythonQt

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -84,7 +84,7 @@
         -DCTK_PLUGIN_org.commontk.configadmin:BOOL=ON
         -DCTK_USE_GIT_PROTOCOL:BOOL=OFF
         -DDCMTK_DIR:PATH=${DCMTK_DIR}
-        -DPythonQt_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/PythonQt_e39be131.tar.gz # From https://github.com/kislinsk/PythonQt.git
+        -DPythonQt_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/PythonQt_fae23012.tar.gz # From https://github.com/kislinsk/PythonQt.git
         ${${proj}_CUSTOM_CMAKE_ARGS}
       CMAKE_CACHE_ARGS
         ${ep_common_cache_args}


updates head for libdvid

updates head for libdvid

--- libdvidcpp.cmake
+++ libdvidcpp.cmake
@@ -12,7 +12,7 @@
 include (cppnetlib)

-set(LIBDVID_VERSION 8a2b915ca472d8e9858297bc98010812a70ba4fe) # 2014-07-25
+set(LIBDVID_VERSION 22546622581408d595de689519812cd8d9c97244) # 2014-08-06

 external_git_repo (libdvidcpp
     ${LIBDVID_VERSION}


Ignoring test in 'classic' using TTreeProcessorM{T,P}


ENH (#3463): removed QmitkTextOverlay from files to be mocced to remove build-warning

--- CoreUI/Qmitk/files.cmake
+++ CoreUI/Qmitk/files.cmake
@@ -49,7 +49,6 @@
 QmitkRenderWindow.h
 QmitkSliderLevelWindowWidget.h
 QmitkStdMultiWidget.h
-QmitkTextOverlay.h
 )
 SET(UI_FILES
 QmitkLevelWindowPresetDefinition.ui


Remove old target option

Remove old target option

--- test/base_test.cmake
+++ test/base_test.cmake
@@ -23,7 +23,7 @@
 if(${TEST_DEBUG}) # with debug option
   add_custom_command(
     OUTPUT  ${OUTPUT_FILE}
-    COMMAND ${CLAWFC} ${OPTIONAL_FLAGS} --target=openacc --debug -J ${XMOD_DIR} -o ${OUTPUT_FILE} ${ORIGINAL_FILE}
+    COMMAND ${CLAWFC} ${OPTIONAL_FLAGS} --debug -J ${XMOD_DIR} -o ${OUTPUT_FILE} ${ORIGINAL_FILE}
     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
     DEPENDS ${ORIGINAL_FILE}
     COMMENT "Translating CLAW directive with ${CLAWFC}"
@@ -31,7 +31,7 @@
 else() # without debug option
   add_custom_command(
     OUTPUT  ${OUTPUT_FILE}
-    COMMAND ${CLAWFC} ${OPTIONAL_FLAGS} --target=openacc -J ${XMOD_DIR} -o ${OUTPUT_FILE} ${ORIGINAL_FILE}
+    COMMAND ${CLAWFC} ${OPTIONAL_FLAGS} -J ${XMOD_DIR} -o ${OUTPUT_FILE} ${ORIGINAL_FILE}
     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
     DEPENDS ${ORIGINAL_FILE}
     COMMENT "Translating CLAW directive with ${CLAWFC}"


ENH: Bump External_VTK to the current Slicer version.

Closes issue #30.

Change-Id: I9914e95da58e3e566710f879dbaf5bd54553d984

--- CMake/Superbuild/External_VTK.cmake
+++ CMake/Superbuild/External_VTK.cmake
@@ -58,7 +58,7 @@
   set( proj VTK )
   ExternalProject_Add( VTK
     GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/Slicer/VTK.git"
-    GIT_TAG "03ddda8cd503b957268fee138c7b57465e5842a4"
+    GIT_TAG "66376810ecd7aa5705272f3d694fd5daa27f3a6b"
     SOURCE_DIR "${CMAKE_BINARY_DIR}/${proj}"
     BINARY_DIR ${${proj}_DIR}
     CMAKE_GENERATOR ${gen}


fix issue where generated xcodeproject added all headers as public except the last one in the list.

this bug would cause the resulting xcodeproject to fail to install last header file to the .framework bundles, making them unusable

this issue resulted in broken frameworks, all which missed at least one header file when installed.
this issue was caused by a misuse of set_target_properties , which was receiving an argument that
incorrectly separated source files.

--HG--
branch : v1-9

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -259,7 +259,7 @@
          PROPERTIES BUILD_WITH_INSTALL_RPATH 1
          INSTALL_NAME_DIR "@executable_path/../Frameworks"
       )
-      set_target_properties(${LIBNAME} PROPERTIES PUBLIC_HEADER "${HEADER_FILES} ${PLATFORM_HEADERS}")
+      set_target_properties(${LIBNAME} PROPERTIES PUBLIC_HEADER "${HEADER_FILES};${PLATFORM_HEADERS};" )
       set_target_properties(${LIBNAME} PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "YES")
       set_target_properties(${LIBNAME} PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${OGRE_SOURCE_DIR}/OgreMain/include/OgreStableHeaders.h")
       set_target_properties(${LIBNAME} PROPERTIES RESOURCE "${RESOURCE_FILES}")


Don't apply visibility settings to statically built samples. Fixes linking problems with Xcode 4 and iOS. (Backporting to 1.7)

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -282,14 +282,16 @@
       endif()
     endif(NOT OGRE_BUILD_PLATFORM_IPHONE)
   endif (APPLE)
-  if (CMAKE_COMPILER_IS_GNUCXX)
-    # add GCC visibility flags to shared library build
-    set_target_properties(${SAMPLENAME} PROPERTIES COMPILE_FLAGS "${OGRE_GCC_VISIBILITY_FLAGS}")
-    set_target_properties(${SAMPLENAME} PROPERTIES XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN "${XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN}")
-    set_target_properties(${SAMPLENAME} PROPERTIES XCODE_ATTRIBUTE_GCC_INLINES_ARE_PRIVATE_EXTERN "${XCODE_ATTRIBUTE_GCC_INLINES_ARE_PRIVATE_EXTERN}")
-    # disable "lib" prefix on Unix
-    set_target_properties(${SAMPLENAME} PROPERTIES PREFIX "")
-  endif (CMAKE_COMPILER_IS_GNUCXX)
+  if(NOT OGRE_STATIC)
+    if (CMAKE_COMPILER_IS_GNUCXX)
+      # add GCC visibility flags to shared library build
+      set_target_properties(${SAMPLENAME} PROPERTIES COMPILE_FLAGS "${OGRE_GCC_VISIBILITY_FLAGS}")
+      set_target_properties(${SAMPLENAME} PROPERTIES XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN "${XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN}")
+      set_target_properties(${SAMPLENAME} PROPERTIES XCODE_ATTRIBUTE_GCC_INLINES_ARE_PRIVATE_EXTERN "${XCODE_ATTRIBUTE_GCC_INLINES_ARE_PRIVATE_EXTERN}")
+      # disable "lib" prefix on Unix
+      set_target_properties(${SAMPLENAME} PROPERTIES PREFIX "")
+    endif (CMAKE_COMPILER_IS_GNUCXX)
+  endif()
   if (OGRE_INSTALL_SAMPLES)
 	ogre_install_target(${SAMPLENAME} ${OGRE_SAMPLE_PATH} FALSE)
   endif()


Fix defined check on CMake

Fix defined check on CMake

***NO_CI***

--- CMake/toolchain.arm-none-eabi.cmake
+++ CMake/toolchain.arm-none-eabi.cmake
@@ -18,7 +18,7 @@

 find_program(COMPILER_ON_PATH "${TARGET_TRIPLET}gcc${TOOLCHAIN_EXT}" CMAKE_FIND_ROOT_PATH_BOTH)

-if(DEFINED $ENV{ARM_GCC_PATH})
+if(DEFINED ENV{ARM_GCC_PATH})
     # try to find GCC using the environment variable first
     file(TO_CMAKE_PATH $ENV{ARM_GCC_PATH} ARM_TOOLCHAIN_PATH)
     message(STATUS "Using ENV variable ARM_GCC_PATH = '${ARM_TOOLCHAIN_PATH}'")


add dependency to tsc

add dependency to tsc

--- CMake/Packages/ZilliansCompilerUtility.cmake
+++ CMake/Packages/ZilliansCompilerUtility.cmake
@@ -39,14 +39,16 @@
     cmake_parse_arguments(zillians_thorscript_create_bundle "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

     add_custom_target(${zillians_thorscript_create_bundle_TARGET})
+    add_dependencies(${zillians_thorscript_create_bundle_TARGET} tsc)

     # create temporary directory for creating bundle
     set(__ts_create_bundle_temporary_dir ${CMAKE_CURRENT_SOURCE_DIR}/create_bundle_temporary_dir)
-    file(MAKE_DIRECTORY ${__ts_create_bundle_temporary_dir})

     add_custom_command(
         TARGET ${zillians_thorscript_create_bundle_TARGET} PRE_BUILD
-        # remove existing build folder
+        # create the temporary directory for creaing bundle
+        COMMAND ${CMAKE_COMMAND} -E make_directory ${__ts_create_bundle_temporary_dir}
+        # remove existing build folder (if any)
         COMMAND ${CMAKE_COMMAND} -E remove_directory ${__ts_create_bundle_temporary_dir}/${zillians_thorscript_create_bundle_BUNDLE_NAME}
         # use tsc to generate project file
         COMMAND ${ThorScriptDriver} project create ${zillians_thorscript_create_bundle_BUNDLE_NAME}


added testing logo

added testing logo

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -13,4 +13,4 @@
 SET (GNATS_WEB_URL "http://${DROP_SITE}/")

 # copy over the testing logo
-CONFIGURE_FILE(TestingLogo.gif ${VTK_BINARY_DIR}/Testing/HTML/TestingResults/Icons/Logo.gif COPYONLY)
+CONFIGURE_FILE(${VTK_SOURCE_DIR}/TestingLogo.gif ${VTK_BINARY_DIR}/Testing/HTML/TestingResults/Icons/Logo.gif COPYONLY)


Essais dart.

Essais dart.

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -18,7 +18,7 @@
 SET (PROJECT_URL "http://smsc.cnes.fr/PLEIADES/")

 # Dart server configuration
-SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/OrfeotoolboxRollup.cgi}
+SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/OrfeotoolboxRollup.cgi)

 #SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/insight-rollup-dashboard.sh")
 #SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/orfeotoolbox-rollup-dashboard.sh")


remove CLSquare specific folder in findscript

--- FindEigen3.cmake
+++ FindEigen3.cmake
@@ -63,7 +63,6 @@

   find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
       PATHS
-      ${CMAKE_CURRENT_SOURCE_DIR}/../ThirdParty/Eigen3
       ${CMAKE_INSTALL_PREFIX}/include
       ${KDE4_INCLUDE_DIR}
       $ENV{HOME}/local/include


cmake: dts: Allow DTS_SOURCE to be defined anywhere

Allow for DTS_SOURCE to be defined in other locations (ie by board
directory code).  Thus allow the board to set any location to find the
dts source file.

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

--- dts/dts.cmake
+++ dts/dts.cmake
@@ -10,7 +10,7 @@
 # See ~/zephyr/doc/dts
 set(GENERATED_DTS_BOARD_H    ${PROJECT_BINARY_DIR}/include/generated/generated_dts_board.h)
 set(GENERATED_DTS_BOARD_CONF ${PROJECT_BINARY_DIR}/include/generated/generated_dts_board.conf)
-set(DTS_SOURCE ${PROJECT_SOURCE_DIR}/dts/${ARCH}/${BOARD_FAMILY}.dts)
+set_ifndef(DTS_SOURCE ${PROJECT_SOURCE_DIR}/dts/${ARCH}/${BOARD_FAMILY}.dts)

 message(STATUS "Generating zephyr/include/generated/generated_dts_board.h")


Removed obsolete fix for former ITK and VTK versions

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -186,18 +186,6 @@
 if(MSVC_VERSION)
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /bigobj /MP")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj /MP")
-endif()
-
-# With the current toolkits like VTK and ITK Mac OSX 10.9
-# does not compile with if stdlib=libc++is used
-# For more information see bug 16803 and 16776
-# This could probably be remove if ITK 4.5.1 and VTK 6.1 is integrated
-if (APPLE)
-  exec_program(sw_vers ARGS -productVersion OUTPUT_VARIABLE osx_version)
-  if (osx_version VERSION_EQUAL "10.9" OR osx_version VERSION_GREATER "10.9")
-    message("Detected OS X version is ${osx_version}...setting C++ library to libstdc++")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++")
-  endif()
 endif()

 set(ep_common_args


Minor cleanup: sort and comment on external projects

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -50,6 +50,7 @@
 # ExternalProjects
 #-----------------------------------------------------------------------------

+# These are ordered by dependencies
 set(external_projects
   ZLIB
   Python
@@ -242,19 +243,20 @@
   MITK_BUILD_ALL_APPS
   MITK_BUILD_TUTORIAL # Deprecated. Use MITK_BUILD_EXAMPLES instead
   MITK_BUILD_EXAMPLES
+
   MITK_USE_ACVD
+  MITK_USE_BLUEBERRY
+  MITK_USE_Boost
   MITK_USE_CppUnit
-  MITK_USE_GLEW
-  MITK_USE_Boost
-  MITK_USE_SYSTEM_Boost
-  MITK_USE_BLUEBERRY
   MITK_USE_CTK
   MITK_USE_DCMTK
+  MITK_USE_GLEW
+  MITK_USE_OpenCL
   MITK_USE_OpenCV
   MITK_USE_Poco
+  MITK_USE_Python
   MITK_USE_SOFA
-  MITK_USE_Python
-  MITK_USE_OpenCL
+  MITK_USE_SYSTEM_Boost

   MITK_ENABLE_PIC_READER
   )


[changed] way header-only libraries are handled #58 to work for Moonraker

--- cmake/BOTG.cmake
+++ cmake/BOTG.cmake
@@ -203,7 +203,6 @@
         ELSE()
             MESSAGE( FATAL_ERROR "[BootsOnTheGround] botgLibrary LANGUAGE ${libraryLanguage} is unknown (Fortran|C|CXX)")
         ENDIF()
-        SET_TARGET_PROPERTIES( "${name}" PROPERTIES LINKER_LANGUAGE "${library_LANGUAGE}" )
     ENDIF()

     IF( enabled )
@@ -239,14 +238,29 @@
         ENDFOREACH()

         #call TriBITS to add a library
-        TRIBITS_ADD_LIBRARY( ${name}
-            SOURCES
-                "${sources}"
-            HEADERS
-                "${headers}"
-            NOINSTALLHEADERS
-                "${headers}"
-        )
+        IF( "${sources}" STREQUAL "" )
+            MESSAGE(STATUS "[BootsOnTheGround] configuring header-only library=${name}")
+            #header-only
+            ADD_LIBRARY( ${name}
+                INTERFACE
+            )
+        ELSE()
+            #traditional source
+            TRIBITS_ADD_LIBRARY( ${name}
+                SOURCES
+                    "${sources}"
+                HEADERS
+                    "${headers}"
+                NOINSTALLHEADERS
+                    "${headers}"
+            )
+
+            #set properties on target
+            IF( NOT "${library_LANGUAGE}" STREQUAL "")
+                SET_TARGET_PROPERTIES( ${name} PROPERTIES LINKER_LANGUAGE ${library_LANGUAGE} )
+            ENDIF()
+
+        ENDIF()

         #do linking
         FOREACH( link_to ${library_LINK_TO} )


Removed libc dependency from sizeof and alignment tests.

If we need libc for something in pocl, we might need to try if clang could use libc from Visual Studio.

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -234,17 +234,19 @@
 endmacro()

 # clang try-compile-run macro, running via native executable
-macro(custom_try_run_exe SOURCE1 SOURCE2 OUTPUT_VAR)
+macro(custom_try_run_exe SOURCE1 SOURCE2 OUTPUT_VAR RES_VAR)
   set(OUTF "${CMAKE_BINARY_DIR}/try_run${CMAKE_EXECUTABLE_SUFFIX}")
   if(EXISTS "${OUTF}")
     file(REMOVE "${OUTF}")
   endif()
   custom_try_compile_c_cxx("${CLANG}" "c" "${SOURCE1}" "${SOURCE2}" RESV "-o" "${OUTF}" "-x" "c")
   set(${OUTPUT_VAR} "")
+  set(${RES_VAR} "")
   if(RESV OR (NOT EXISTS "${OUTF}"))
     message(STATUS " ########## Compilation failed")
   else()
     execute_process(COMMAND "${OUTF}" RESULT_VARIABLE RESV OUTPUT_VARIABLE ${OUTPUT_VAR} ERROR_VARIABLE EV)
+    set(${RES_VAR} ${RESV})
     file(REMOVE "${OUTF}")
     if(${RESV})
       message(STATUS " ########## Running ${OUTF}")
@@ -339,7 +341,7 @@
   setup_cache_var_name(SIZEOF "${TYPE}-${TRIPLE}-${CLANG}")

   if(NOT DEFINED ${CACHE_VAR_NAME})
-    custom_try_run_exe("#include <stddef.h>\n #include <stdio.h>" "printf(\"%i\",(int)sizeof(${TYPE})); return 0;" ${RES_VAR} "${CLANG_TARGET_OPTION}${TRIPLE}")
+    custom_try_run_exe("" "return sizeof(${TYPE});" SIZEOF_STDOUT ${RES_VAR} "${CLANG_TARGET_OPTION}${TRIPLE}")
     if(NOT ${RES_VAR})
       message(SEND_ERROR "Could not determine sizeof(${TYPE})")
     endif()
@@ -354,17 +356,13 @@
   if(NOT DEFINED ${CACHE_VAR_NAME})

     custom_try_run_exe("
-#include <stddef.h>
-#include <stdio.h>
-
 #ifndef offsetof
 #define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
 #endif

-${TYPEDEF}"  "typedef struct { char x; ${TYPE} y; } ac__type_alignof_;
+${TYPEDEF}" "typedef struct { char x; ${TYPE} y; } ac__type_alignof_;
     int r = offsetof(ac__type_alignof_, y);
-    printf(\"%i\",r);
-    return 0;" ${RES_VAR} "${CLANG_TARGET_OPTION}${TRIPLE}")
+    return r;" SIZEOF_STDOUT ${RES_VAR} "${CLANG_TARGET_OPTION}${TRIPLE}")

     if(NOT ${RES_VAR})
       message(SEND_ERROR "Could not determine align of(${TYPE})")


Added some Qt dep paths.

Added some Qt dep paths.

--- cmake/deps.cmake
+++ cmake/deps.cmake
@@ -5,6 +5,8 @@
     ${CMAKE_PREFIX_PATH}
     "/usr/local/opt"
     "/usr/local/opt/qt5"
+    "/usr/local/Qt-5.4.0"
+    "/usr/local/Qt-5.3.2"
     "/usr/local/Qt-5.3.1"
     "/usr/local/Qt-5.3.0"
     "/usr/local/Qt-5.2.1"


Add clouddirectory service entry

Add clouddirectory service entry

--- cmake/sdks.cmake
+++ cmake/sdks.cmake
@@ -19,6 +19,7 @@
 list(APPEND C2J_LIST "autoscaling:2011-01-01")
 list(APPEND C2J_LIST "appstream:2016-12-01")
 list(APPEND C2J_LIST "budgets:2016-10-20")
+list(APPEND C2J_LIST "clouddirectory:2016-05-10")
 list(APPEND C2J_LIST "cloudformation:2010-05-15")
 list(APPEND C2J_LIST "cloudfront:2016-01-28")
 list(APPEND C2J_LIST "cloudhsm:2014-05-30")


blacklisted 'tracking' due to some linking problem

--- modules/python/common.cmake
+++ modules/python/common.cmake
@@ -17,6 +17,7 @@
 ocv_list_filterout(candidate_deps "^opencv_matlab$")
 ocv_list_filterout(candidate_deps "^opencv_ts$")
 ocv_list_filterout(candidate_deps "^opencv_adas$")
+ocv_list_filterout(candidate_deps "^opencv_tracking$")

 ocv_add_module(${MODULE_NAME} BINDINGS OPTIONAL ${candidate_deps})


fixed a typo

fixed a typo

-Thomas

--- Modules/USUI/files.cmake
+++ Modules/USUI/files.cmake
@@ -20,7 +20,7 @@
   Qmitk/QmitkUSControlsProbesWidget.ui
   Qmitk/QmitkUSControlsCustomVideoDeviceWidget.ui
   Qmitk/QmitkUSControlsCustomDiPhASDeviceWidget.ui
-}
+)
 set(MOC_H_FILES
   Qmitk/QmitkUSDeviceManagerWidget.h
   Qmitk/QmitkUSNewVideoDeviceWidget.h


CMake: Adjust MPI error message

CMake: Adjust MPI error message

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@30174 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/configure/configure_1_mpi.cmake
+++ deal.II/cmake/configure/configure_1_mpi.cmake
@@ -107,10 +107,15 @@
   MESSAGE(FATAL_ERROR "\n"
     "Could not find any suitable mpi library!\n"
     "Please ensure that an mpi library is installed on your computer\n"
-    "and set CMAKE_CXX_COMPILER and CMAKE_C_COMPILER to the appropriate mpi\n"
-    "wrappers:\n"
-    "    $ CC=\".../mpicc\" CXX=\".../mpicxx\" cmake <...>\n"
-    "    $ cmake -DCMAKE_C_COMPILER=\".../mpicc\" -DCMAKE_CXX_COMPIER=\".../mpicxx\" <...>\n"
+    "and set CMAKE_CXX_COMPILER to the appropriate mpi wrappers:\n"
+    "    $ CXX=\".../mpicxx\" cmake <...>\n"
+    "    $ cmake -DCMAKE_CXX_COMPILER=\".../mpicxx\" <...>\n"
+    "Or with additional C and Fortran wrappers (recommended!):\n"
+    "    $ CC=\".../mpicc\" CXX=\".../mpicxx\" F90=\".../mpif90\" cmake <...>\n"
+    "    $ cmake -DCMAKE_C_COMPILER=\".../mpicc\"\\\n"
+    "            -DCMAKE_CXX_COMPILER=\".../mpicxx\"\\\n"
+    "            -DCMAKE_Fortran_COMPILER=\".../mpif90\"\\\n"
+    "            <...>\n"
     )
 ENDMACRO()


[cmake] missing )

[cmake] missing )

--- CMakeModules/installer.cmake
+++ CMakeModules/installer.cmake
@@ -1,6 +1,6 @@
 include(InstallRequiredSystemLibraries)

-set(CPACK_PACKAGE_CONTACT "someone@eos.org"
+set(CPACK_PACKAGE_CONTACT "someone@eos.org")
 set(CPACK_OUTPUT_FILE_PREFIX ${CMAKE_BINARY_DIR}/packages)
 set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install)


Add _FILE_OFFSET_BITS to build stuff

Add _FILE_OFFSET_BITS to build stuff

Former-commit-id: d09d604e01f5e05335d412aad82aa655dd2c248c

--- src/gop/cmake/LStoreCommon.cmake
+++ src/gop/cmake/LStoreCommon.cmake
@@ -28,25 +28,31 @@
 include(${CMAKE_SOURCE_DIR}/cmake/CompilerFlags.cmake)

 # Accept config options
-set(PROJECT_VERSION "local" CACHE STRING "Version string for build")
-set(PROJECT_REVISION "1" CACHE STRING "Revision number for packaging")
+set(LSTORE_PROJECT_VERSION "local" CACHE STRING "Version string for build")
+set(LSTORE_PROJECT_REVISION "1" CACHE STRING "Revision number for packaging")
 option(WANT_PACKAGE "Set options for package building, overriding all others"
                     OFF)
 cmake_dependent_option(WANT_STATIC "Attempt to build and link statically" TRUE
                                    "NOT WANT_PACKAGE" FALSE)
-if(WANT_PACKAGE)
+cmake_dependent_option(WANT_DEBUG "Build with debug flags" TRUE
+                                   "NOT WANT_PACKAGE" FALSE)
+if(WANT_DEBUG)
+    set(CMAKE_BUILD_TYPE "Debug")
+else()
     set(CMAKE_BUILD_TYPE "Release")
-endif(WANT_PACKAGE)
+endif(WANT_DEBUG)

 # Set preprocessor flags. TODO: This should be moved to config.h
 # TODO: This should be probably modified if we build on something different
 # http://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html
 # _REENTRANT - tells the std library to enable reentrant functions
 # _GNU_SOURCE - uses GNU (not POSIX) functions
-# _LARGEFILE64_SOURCE - this should probably be changed to _FILE_OFFSET_BITS
+# _LARGEFILE64_SOURCE - Along with...
+# _FILE_OFFSET_BITS - Tell gcc that we want 64 bit offsets
 # TODO: Is this truely needed?
 # LINUX=2 - APR seems to want it
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE")
+
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64")
 set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0")

 # Find and link universal deps
@@ -65,7 +71,7 @@
 endif(NOT APPLE)

 # Make the version file.
-set(LSTORE_INC_VERSION_STRING "${LSTORE_PROJECT_NAME}: ${PROJECT_VERSION}")
+set(LSTORE_INC_VERSION_STRING "${LSTORE_PROJECT_NAME}: ${LSTORE_PROJECT_VERSION}")
 site_name(BUILD_HOST)
 Date(BUILD_DATE)
 CompilerVersion(COMPILER_VERSION)
@@ -114,10 +120,10 @@

 # Below is used for building packages
 set(CPACK_PACKAGE_NAME "accre-${LSTORE_PROJECT_NAME}")
-set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
+set(CPACK_PACKAGE_VERSION "${LSTORE_PROJECT_VERSION}")
 set(CPACK_GENERATOR "RPM;DEB")
 set(CPACK_SOURCE_GENERATOR "RPM;DEB")
-set(CPACK_PACKAGE_RELEASE ${PROJECT_REVISION})
+set(CPACK_PACKAGE_RELEASE ${LSTORE_PROJECT_REVISION})
 set(CPACK_PACKAGE_CONTACT "Andrew Melo or Alan Tackett")
 set(CPACK_PACKAGE_VENDOR "Advanced Computing Center for Research and Education, Vanderbilt University")
 set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}")


Update FW

Update FW

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "40370309f2f5ad2fab1d76811ea9b2a55d0be64b")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "303d323e4c63ea6881530e19af79450540df46c7")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Update FW: some cleanup

Update FW: some cleanup

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "4549a0e785f7e3a5d79481c05112e5f78ceb5e4e")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "5e4974e930f4ecbe1bf718463f6a5da664e68788")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


[cmake] Spelling, syntax.

[cmake] Spelling, syntax.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -24,9 +24,9 @@
 #---If -Dshared=Off, prefer static libraries-----------------------------------------
 if(NOT shared)
   if(WINDOWS)
-    message(FATAL "Option \"shared=Off\" not supported on Windows!")
-  else()
-    message("Prefering static libraries.")
+    message(FATAL_ERROR "Option \"shared=Off\" not supported on Windows!")
+  else()
+    message("Preferring static libraries.")
     set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;${CMAKE_FIND_LIBRARY_SUFFIXES}")
   endif()
 endif()


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

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -354,12 +354,17 @@
 #---Check for AfterImage---------------------------------------------------------------
 if(asimage AND NOT builtin_afterimage)
   message(STATUS "Looking for AfterImage")
-  find_package(AfterImage)
-  if(NOT AFTERIMAGE_FOUND)
-    message(STATUS "AfterImage not found. Switching on builtin_afterimage option")
-    set(builtin_afterimage ON CACHE BOOL "" FORCE)
-  endif()
-endif()
+  if(fail-on-missing)
+    find_package(AfterImage REQUIRED)
+  else()
+    find_package(AfterImage)
+    if(NOT AFTERIMAGE_FOUND)
+      message(STATUS "AfterImage not found. Switching on builtin_afterimage option")
+      set(builtin_afterimage ON CACHE BOOL "" FORCE)
+    endif()
+  endif()
+endif()
+
 if(builtin_afterimage)
   set(AFTERIMAGE_LIBRARIES ${CMAKE_BINARY_DIR}/lib/libAfterImage${CMAKE_STATIC_LIBRARY_SUFFIX})
   if(WIN32)


NUP-2316 Add error check and message to debug build failure on windows.

--- src/CombineUnixArchives.cmake
+++ src/CombineUnixArchives.cmake
@@ -75,7 +75,21 @@
     endif()

     # Accumulate objects
-    file(GLOB_RECURSE objects "${working_dir}/*.o")
+    if(UNIX)
+      set(globbing_ext "o")
+    else()
+      # i.e., Windows
+      set(globbing_ext "obj")
+    endif()
+
+    file(GLOB_RECURSE objects "${working_dir}/*.${globbing_ext}")
+    if (NOT objects)
+      file(GLOB_RECURSE working_dir_listing "${working_dir}/*")
+      message(FATAL_ERROR
+              "COMBINE_UNIX_ARCHIVES: no extracted obj files from ${lib} "
+              "found in ${working_dir} using globbing_ext=${globbing_ext}, "
+              "but the following entries were found: ${working_dir_listing}.")
+    endif()
     list(APPEND all_object_locations ${objects})
   endforeach()


mapfile: export xdr_free_null_stream

mapfile: export xdr_free_null_stream

Used in Ganesha FSAL_PROXY.

Signed-off-by: Matt Benjamin <b5ea062884a8f3dc969ff57d1008615447c56296@redhat.com>

--- src/libntirpc.map.in.cmake
+++ src/libntirpc.map.in.cmake
@@ -217,6 +217,7 @@
     xdr_dplx_msg;
     xdr_enum;
     xdr_float;
+    xdr_free_null_stream;
     xdr_hyper;
     xdr_inrec_cksum;
     xdr_inrec_create;


documentation fix

documentation fix

--- src/docbook/index.xml.cmake
+++ src/docbook/index.xml.cmake
@@ -386,7 +386,7 @@
 <programlisting><![CDATA[
 $ mkdir tmpbuild
 $ cd tmpbuild
-$ cmake path/to/the/fastphylo/source/code && make win32installer
+$ cmake path/to/the/fastphylo/source/code  -DSTATIC=ON && make win32installer
 ]]></programlisting>

 The source code for gengetopt, libz and libxml will be automatically downloaded and built statically.
@@ -438,6 +438,46 @@
 # mkdir /tmp/build
 # cd /tmp/build
 # cmake -DCMAKE_INSTALL_PREFIX=/ -DBUILD_DOCBOOK=ON /tmp/source && make package
+]]></programlisting>
+
+      </para>
+    </sect5>
+
+
+    <sect5 id="building_install_package_for_macosx">
+      <title>Building install package for MacOS X</title>
+<para>
+To build the fastphylo install package for MacOS X
+you need to have this installed
+        <itemizedlist mark="bullet">
+          <listitem>
+            <para>
+              <ulink url="http://www.cmake.org">cmake</ulink>
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              <ulink url="http://www.gnu.org/software/wget/">wget</ulink>
+            </para>
+          </listitem>
+        </itemizedlist>
+on your MacOS X computer.
+      </para>
+
+
+      <para>
+
+Check that cmake is version 2.6 or later
+<programlisting><![CDATA[
+$ cmake --version
+cmake version 2.6-patch 0
+]]></programlisting>
+
+
+<programlisting><![CDATA[
+$ mkdir /tmp/build
+$ cd /tmp/build
+$ cmake -DSTATIC -DCPACK_GENERATOR="TGZ" /tmp/source && make package
 ]]></programlisting>

       </para>


[cmake] bundle: package system libs using the AppImage blacklist

--- src/cmake/MakeBundle.cmake
+++ src/cmake/MakeBundle.cmake
@@ -1,3 +1,4 @@
+cmake_minimum_required(VERSION 3.3)
 # Perform bundle fixup on all executables of an install directory
 # and generates a standalone bundle with all required runtime dependencies.
 #
@@ -5,6 +6,63 @@
 #   - CMAKE_INSTALL_PREFIX: install target path
 #   - BUNDLE_INSTALL_PREFIX: bundle installation path
 #   - BUNDLE_LIBS_PATHS: additional paths (colon separated) to look for runtime dependencies
+
+# Blacklist from AppImage: https://github.com/AppImage/AppImages/blob/master/excludelist
+set(LINUX_OS_LIB_BLACKLIST
+ld-linux
+ld-linux-x86-64
+libanl
+libBrokenLocale
+libcidn
+libcrypt
+libc
+libdl
+libm
+libmvec
+libnsl
+libnss_compat
+libnss_db
+libnss_dns
+libnss_files
+libnss_hesiod
+libnss_nisplus
+libnss_nis
+libpthread
+libresolv
+librt
+libthread_db
+libutil
+libstdc++
+libGL
+libdrm
+libglapi
+libX11
+libgio-2.0
+libasound
+libgdk_pixbuf-2.0
+libfontconfig
+libthai
+libfreetype
+libharfbuzz
+libcom_err
+libexpat
+libgcc_s
+libglib-2.0
+libgpg-error
+libICE
+libkeyutils
+libp11-kit
+libSM
+libusb-1.0
+libuuid
+libz
+libgobject-2.0
+libpangoft2-1.0
+libpangocairo-1.0
+libpango-1.0
+libgpg-error
+libjack
+    )

 function(gp_resolve_item_override context item exepath dirs resolved_item_var resolved_var)
   # avoid log flood for those system libraries with non-absolute path
@@ -17,6 +75,21 @@
     set(${resolved_var} TRUE PARENT_SCOPE)
   endif()
 endfunction()
+
+if(UNIX)
+  function(gp_resolved_file_type_override resolved_file type_var)
+    # We would like to embed all non-blacklisted "system" libs,
+    # based on the AppImage blacklist.
+    if("${${type_var}}" STREQUAL "system")
+      get_filename_component(basename ${resolved_file} NAME_WE)
+      # message(STATUS "SYSTEM LIB: ${resolved_file} [${basename}]")
+      if(NOT basename IN_LIST LINUX_OS_LIB_BLACKLIST)
+        # message(STATUS "${resolved_file} [${basename}]: SYSTEM => EMBEDDED")
+        set(${type_var} "embedded" PARENT_SCOPE)
+      endif()
+    endif()
+  endfunction()
+endif()

 include(BundleUtilities)
 include(GNUInstallDirs)


Do not use _POSIX_C_SOURCE on Darwin

Do not use _POSIX_C_SOURCE on Darwin

--- src/pal/src/configure.cmake
+++ src/pal/src/configure.cmake
@@ -6,7 +6,9 @@
 include(CheckStructHasMember)
 include(CheckTypeSize)

-set(CMAKE_REQUIRED_DEFINITIONS "-D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L")
+if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
+  set(CMAKE_REQUIRED_DEFINITIONS "-D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L")
+endif()
 check_include_files(ieeefp.h HAVE_IEEEFP_H)
 check_include_files(alloca.h HAVE_ALLOCA_H)
 check_include_files(sys/vmparam.h HAVE_SYS_VMPARAM_H)


Fix missing directory removal

Fix missing directory removal

--- CMake/Utilities.cmake
+++ CMake/Utilities.cmake
@@ -191,3 +191,7 @@
 else()
   message(FATAL_ERROR "Compiler '${CMAKE_CXX_COMPILER_ID}' not recognized")
 endif()
+
+INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/3rdParty/gsl/include/gsl ${PROJECT_SOURCE_DIR}/3rdParty/eigen/Eigen
+  DESTINATION ${CMAKE_INSTALL_PREFIX}/include
+  )


Removed the Qt-cxx14 workaround now that CMake (3.8) supports cxx17 and a workaround is available for older CMake versions (https://gitlab.kitware.com/cmake/cmake/issues/16468).

--- toolchains/gcc_compatibles.cmake
+++ toolchains/gcc_compatibles.cmake
@@ -34,20 +34,14 @@
 # + 'COMPILE_LANGUAGE' isn't supported by VS generators:
 # https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#logical-expressions

-## Implementation note:
-# set( CMAKE_CXX_STANDARD 14 ) appends '-std=gnu++14' option on all targets after all compile flags have been processed.
-# This means that '-std=gnu++14' is given to compiler *after* '-std=gnu++1z', which basically disables C++1z support.
-# Correct way of enabling C++1z would be by uncommenting line below and commenting out line 'set( CMAKE_CXX_STANDARD 14 )'.
-# However, such decision can cause problems with some 3rd party libraries (Qt for instance) which have their own CMake
-# packages which enfore usage of this variable.
-#                                                     ( 04.09.2016. Nenad Miksa )
-
-# add_compile_options( $<$<COMPILE_LANGUAGE:CXX>:-std=gnu++1z> )
-# add_compile_options( $<$<NOT:$<COMPILE_LANGUAGE:CXX>>:-std=gnu11> )
-
+add_compile_options( $<$<COMPILE_LANGUAGE:CXX>:-std=gnu++1z> )
+add_compile_options( $<$<NOT:$<COMPILE_LANGUAGE:CXX>>:-std=gnu11> )

 set( CMAKE_C_STANDARD   11 )
 set( CMAKE_CXX_STANDARD 14 )
+if ( CMAKE_VERSION VERSION_GREATER 3.7 )
+    set( CMAKE_CXX_STANDARD 17 )
+endif()

 # https://cmake.org/cmake/help/v3.3/policy/CMP0063.html
 cmake_policy( SET CMP0063 NEW )


DOC: Update PhaseSymmetry for Doxygen configuration

Changes:

 Matt McCormick (1):
   BUG: Disable the module examples since they require SEM

To fix the Doxygen build.

--- Modules/Remote/PhaseSymmetry.remote.cmake
+++ Modules/Remote/PhaseSymmetry.remote.cmake
@@ -11,5 +11,5 @@
 http://www.insight-journal.org/browse/publication/846
 "
   GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/ITKPhaseSymmetry.git
-  GIT_TAG 7eb2fa43a7d4d1b36307633aa4a4799b5313bedb
+  GIT_TAG 91041964bb798b16c1caa5cfef0d91f32ada8332
   )


ARROW-8280: [C++] Use c-ares_INCLUDE_DIR

Instead of c-ares::cares's INTERFACE_INCLUDE_DIRECTORIES. Because it
may not be set. c-ares_INCLUDE_DIR is always set.

Closes #6778 from kou/ci-mingw-fix-cares

Authored-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>
Signed-off-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -1952,17 +1952,19 @@
 if(ARROW_WITH_GRPC)
   if(c-ares_SOURCE STREQUAL "AUTO")
     find_package(c-ares QUIET CONFIG)
-    if(NOT c-ares_FOUND)
+    if(c-ares_FOUND)
+      set(CARES_INCLUDE_DIR ${c-ares_INCLUDE_DIR})
+    else()
       build_cares()
     endif()
   elseif(c-ares_SOURCE STREQUAL "BUNDLED")
     build_cares()
   elseif(c-ares_SOURCE STREQUAL "SYSTEM")
     find_package(c-ares REQUIRED CONFIG)
+    set(CARES_INCLUDE_DIR ${c-ares_INCLUDE_DIR})
   endif()

   # TODO: Don't use global includes but rather target_include_directories
-  get_target_property(CARES_INCLUDE_DIR c-ares::cares INTERFACE_INCLUDE_DIRECTORIES)
   include_directories(SYSTEM ${CARES_INCLUDE_DIR})
 endif()


Improve header checks on windows.

Improve header checks on windows.

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -28,8 +28,12 @@
   if (NOT HAVE_WSPIAPI_H)
     message(STATUS "WARNING: Without wspiapi.h, this build will only work on Windows XP and newer versions")
   endif (NOT HAVE_WSPIAPI_H)
-  set(HAVE_GETADDRINFO TRUE)
-  set(HAVE_GETHOSTBYNAME TRUE)
+  check_include_file(ws2tcpip.h HAVE_WS2TCPIP_H)
+  if (HAVE_WSPIAPI_H OR HAVE_WS2TCPIP_H)
+    set(HAVE_GETADDRINFO TRUE)
+    set(HAVE_GETHOSTBYNAME TRUE)
+  endif (HAVE_WSPIAPI_H OR HAVE_WS2TCPIP_H)
+
   set(HAVE_SELECT TRUE)
 endif (WIN32)


build tiff without jbig compression

build tiff without jbig compression

--- libtiff.cmake
+++ libtiff.cmake
@@ -38,6 +38,7 @@
         --prefix=${BUILDEM_DIR}
         LDFLAGS=${BUILDEM_LDFLAGS}
         CPPFLAGS=-I${BUILDEM_DIR}/include
+        --disable-jbig
     BUILD_COMMAND       ${BUILDEM_ENV_STRING} make
     BUILD_IN_SOURCE     1
     INSTALL_COMMAND     ${BUILDEM_ENV_STRING} make install
@@ -45,4 +46,4 @@

 set_target_properties(${libtiff_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)

-endif (NOT libtiff_NAME)+endif (NOT libtiff_NAME)


CMake: Fix escaping of quotes in response file

We put macros in a response file compile_time_defs.txt and pass it
to the compiler. Adding a pair of single quotes around each -D flag
ensures macro values are quoted correctly.

For example,
* String
  * target_compile_definitions(): either FOO="BAR" or FOO=\"BAR\"
  * response file: '-DFOO="BAR"'
  * actual definition: #define FOO "BAR"
* Array of integers
  * target_compile_definitions(): FOO={1, 2, 3}
  * response file: '-DFOO={1, 2, 3}'
  * actual definition: #define FOO {1, 2, 3}

--- tools/cmake/mbed_toolchain.cmake
+++ tools/cmake/mbed_toolchain.cmake
@@ -7,17 +7,9 @@
         "$<TARGET_PROPERTY:${target},INTERFACE_COMPILE_DEFINITIONS>"
     )

-    # Remove macro definitions that contain spaces as the lack of escape sequences and quotation marks
-    # in the macro when retrieved using generator expressions causes linker errors.
-    # This includes string macros, array macros, and macros with operations.
-    # TODO CMake: Add escape sequences and quotation marks where necessary instead of removing these macros.
+    # Append -D to all macros and quote them as we pass these as response file to cxx compiler
     set(_compile_definitions
-       "$<FILTER:${_compile_definitions},EXCLUDE, +>"
-    )
-
-    # Append -D to all macros as we pass these as response file to cxx compiler
-    set(_compile_definitions
-        "$<$<BOOL:${_compile_definitions}>:-D$<JOIN:${_compile_definitions}, -D>>"
+        "$<$<BOOL:${_compile_definitions}>:'-D$<JOIN:${_compile_definitions},' '-D>'>"
     )
     file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/compile_time_defs.txt" CONTENT "${_compile_definitions}\n")
     set(${output_response_file_path} @${CMAKE_CURRENT_BINARY_DIR}/compile_time_defs.txt PARENT_SCOPE)


Adjusts logic for definingi TORQUE_DEBUG and TORQUE_RELEASE to be consistent across platforms

--- Tools/CMake/torque3d.cmake
+++ Tools/CMake/torque3d.cmake
@@ -161,14 +161,6 @@
 ###############################################################################
 # options
 ###############################################################################
-if(NOT MSVC AND NOT APPLE) # handle single-configuration generator
-    set(TORQUE_BUILD_TYPE "Debug" CACHE STRING "Select one of Debug, Release and RelWithDebInfo")
-    set_property(CACHE TORQUE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "RelWithDebInfo")
-
-    set(TORQUE_ADDITIONAL_LINKER_FLAGS "" CACHE STRING "Additional linker flags")
-    mark_as_advanced(TORQUE_ADDITIONAL_LINKER_FLAGS)
-endif()
-
 option(TORQUE_SECURE_VFS "Secure VFS configuration. Arbitrary script access to file system will be heavily restricted." OFF)
 mark_as_advanced(TORQUE_SECURE_VFS)

@@ -248,20 +240,6 @@
 		else()
 			link_directories($ENV{DXSDK_DIR}/Lib/x86)
 		endif()
-	endif()
-endif()
-
-# build types
-if(NOT MSVC AND NOT APPLE) # handle single-configuration generator
-	set(CMAKE_BUILD_TYPE ${TORQUE_BUILD_TYPE})
-	if(CMAKE_BUILD_TYPE STREQUAL "Debug")
-        set(TORQUE_DEBUG TRUE)
-    elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
-        set(TORQUE_RELEASE TRUE)
-    elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
-        set(TORQUE_RELEASE TRUE)
-    else()
-		message(FATAL_ERROR "Please select Debug, Release or RelWithDebInfo for TORQUE_BUILD_TYPE")
 	endif()
 endif()

@@ -786,6 +764,7 @@
 # Always enabled Definitions
 ###############################################################################
 addDef(TORQUE_DEBUG Debug)
+addDef(TORQUE_RELEASE "RelWithDebInfo;Release")
 addDef(TORQUE_ENABLE_ASSERTS "Debug;RelWithDebInfo")
 addDef(TORQUE_DEBUG_GFX_MODE "RelWithDebInfo")
 addDef(TORQUE_SHADERGEN)


[FIX] since cmake is ridiculous variables cannot be reused

--- util/cmake/FindSeqAn.cmake
+++ util/cmake/FindSeqAn.cmake
@@ -183,11 +183,11 @@
     #error NOCXX14
     #endif
     int main() {}")
-    check_cxx_source_compiles("${CXXSTD_TEST_SOURCE}" CXX14_DETECTED)
-    if (NOT CXX14_DETECTED)
+    check_cxx_source_compiles("${CXXSTD_TEST_SOURCE}" CXX14_BUILTIN)
+    if (NOT CXX14_BUILTIN)
         set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
-        check_cxx_source_compiles("${CXXSTD_TEST_SOURCE}" CXX14_DETECTED)
-        if (NOT CXX14_DETECTED)
+        check_cxx_source_compiles("${CXXSTD_TEST_SOURCE}" CXX14_FLAG)
+        if (NOT CXX14_FLAG)
             message (FATAL_ERROR "SeqAn requires C++14 since v2.2.0, but your compiler does not support it.")
             return ()
         endif ()


OpenSSL: ++PACKAGE_INTERNAL_DEPS_ID

OpenSSL: ++PACKAGE_INTERNAL_DEPS_ID

--- cmake/projects/OpenSSL/hunter.cmake
+++ cmake/projects/OpenSSL/hunter.cmake
@@ -285,4 +285,4 @@
 endif()

 hunter_cacheable(OpenSSL)
-hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID "9")
+hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID "10")


[doctest] updating to version 1.2.0

[doctest] updating to version 1.2.0

also using the original repository instead of a fork

--- cmake/projects/doctest/hunter.cmake
+++ cmake/projects/doctest/hunter.cmake
@@ -14,16 +14,15 @@
     PACKAGE_NAME
     doctest
     VERSION
-    "1.1.4-hunter-1"
+    "1.2.0"
     URL
-    "https://github.com/piribes/doctest/archive/1.1.4-hunter-1.tar.gz"
+    "https://github.com/onqtam/doctest/archive/1.2.0.tar.gz"
     SHA1
-    684580f4cf1f40ca7750bea90facc4564a807c2a
+    53f87a422c7cc842d9b3e06d5a7eb7e35307e6ac
 )

 hunter_cmake_args(doctest CMAKE_ARGS
-    DOCTEST_SKIP_EXAMPLES=ON
-    DOCTEST_SKIP_COVERAGE=ON
+    DOCTEST_WITH_TESTS=OFF
 )

 # Pick a download scheme