COMP: In Superbuild.cmake, use DCMTK_DIR instead of CTK_DCMTK_DIR

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -5,8 +5,8 @@

 #
 # CTK_KWSTYLE_EXECUTABLE
+# DCMTK_DIR
 # QT_QMAKE_EXECUTABLE
-# CTK_DCMTK_DIR
 #

 #-----------------------------------------------------------------------------
@@ -91,7 +91,7 @@
 # Utilities/DCMTK
 #
 SET (DCMTK_DEPENDS)
-IF (NOT DEFINED CTK_DCMTK_DIR)
+IF (NOT DEFINED DCMTK_DIR)
   SET(proj DCMTK)
   SET(DCMTK_DEPENDS ${proj})
   ExternalProject_Add(${proj}
@@ -102,7 +102,7 @@
         ${ep_common_args}
         -DDCMTK_BUILD_APPS:BOOL=ON # Build also dmctk tools (movescu, storescp, ...)
       )
-  SET(CTK_DCMTK_DIR ${ep_install_dir})
+  SET(DCMTK_DIR ${ep_install_dir})
 ENDIF()

 #-----------------------------------------------------------------------------
@@ -258,7 +258,7 @@
     -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
     -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
     -DCTK_KWSTYLE_EXECUTABLE:FILEPATH=${CTK_KWSTYLE_EXECUTABLE}
-    -DDCMTK_DIR=${CTK_DCMTK_DIR} # FindDCMTK expects DCMTK_DIR
+    -DDCMTK_DIR=${DCMTK_DIR} # FindDCMTK expects DCMTK_DIR
   SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
   BINARY_DIR ${CMAKE_BINARY_DIR}/CTK-build
   BUILD_COMMAND ""


Cleaned up comment.

Cleaned up comment.

--- Source/CMake/Modules/FindUrho3D.cmake
+++ Source/CMake/Modules/FindUrho3D.cmake
@@ -36,9 +36,9 @@
 endif ()

 # If the URHO3D_LIB_TYPE build option changes then invalidate the found library cache
-if (NOT URHO3D_LIB_TYPE STREQUAL URHO3D_EXPORTS_LIB_TYPE)
+if (NOT URHO3D_LIB_TYPE STREQUAL URHO3D_FOUND_LIB_TYPE)
     unset (URHO3D_LIBRARIES CACHE)
-    set (URHO3D_EXPORTS_LIB_TYPE ${URHO3D_LIB_TYPE} CACHE INTERNAL "Lib type when Urho3D export header was last generated")
+    set (URHO3D_FOUND_LIB_TYPE ${URHO3D_LIB_TYPE} CACHE INTERNAL "Lib type when Urho3D library was last found")
 endif ()

 set (URHO3D_LIB_NAMES Urho3D)


Fix MySQLConnector++ module

Fix MySQLConnector++ module

It should. Work. I THINK.

--- Build/FindMySQLConnectorCPP.cmake
+++ Build/FindMySQLConnectorCPP.cmake
@@ -66,14 +66,29 @@
             lib)
 endif()

-    mark_as_advanced(MYSQLCONNECTORCPP_INCLUDE_DIR
-            MYSQLCONNECTORCPP_LIBRARY)
+    mark_as_advanced(MYSQLCONNECTORCPP_INCLUDE_DIR)
+
+if (WIN32)
+    mark_as_advanced(MYSQLCONNECTORCPP_LIBRARY_RELEASE MYSQLCONNECTORCPP_LIBRARY_DEBUG)
+else()
+    mark_as_advanced(MYSQLCONNECTORCPP_LIBRARY)
+endif()

 include(FindPackageHandleStandardArgs)
+
+if (WIN32)
+    find_package_handle_standard_args(MysqlConnectorCpp
+            DEFAULT_MSG
+            MYSQLCONNECTORCPP_INCLUDE_DIR
+            MYSQLCONNECTORCPP_LIBRARY_DEBUG
+            MYSQLCONNECTORCPP_LIBRARY_RELEASE)
+else()
     find_package_handle_standard_args(MysqlConnectorCpp
             DEFAULT_MSG
             MYSQLCONNECTORCPP_INCLUDE_DIR
             MYSQLCONNECTORCPP_LIBRARY)
+endif()
+

 if(MYSQLCONNECTORCPP_FOUND)
     set(MYSQLCONNECTORCPP_INCLUDE_DIRS


DOC: update module descr

DOC: update module descr

--- Modules/Wrappers/QGIS/otb-module.cmake
+++ Modules/Wrappers/QGIS/otb-module.cmake
@@ -18,7 +18,7 @@
 # limitations under the License.
 #

-set(DOCUMENTATION "Required to generate descriptor files for QGIS processing plugin.")
+set(DOCUMENTATION "This module allows to generate application descriptor files for QGIS processing plugin.")

 otb_module(OTBQgis
   DEPENDS


Changed version number

Changed version number

--- CMake/CPackOptionsDiffusion.cmake
+++ CMake/CPackOptionsDiffusion.cmake
@@ -4,7 +4,7 @@
 set(CPACK_PACKAGE_NAME "MITK-Diffusion")
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MITK application for processing of MR diffusion imaging data.")
 # Major version is the year of release
-set(CPACK_PACKAGE_VERSION_MAJOR "2011")
+set(CPACK_PACKAGE_VERSION_MAJOR "2012")
 # Minor version is assigned depending on the number of releases that year, order is "", "a", "b"..., "z"
 set(CPACK_PACKAGE_VERSION_MINOR "")
 # Patch versioning is not intended to be done


Refactor VTK_ADD_EXECUTABLE macro to build forwarding executables.

Only if VTK_BUILD_FORWARDING_EXECUTABLES is ON.

Change-Id: Ie21825f6b44a8dc7a4767de941c2ae025f31446b

--- CMake/vtkTargetExportMacros.cmake
+++ CMake/vtkTargetExportMacros.cmake
@@ -3,11 +3,16 @@
 endif()

 MACRO(VTK_ADD_LIBRARY name)
-  ADD_LIBRARY(${name} ${ARGN})
-  SET_PROPERTY(GLOBAL APPEND PROPERTY VTK_TARGETS ${name})
+  add_library(${name} ${ARGN})
+  set_property(GLOBAL APPEND PROPERTY VTK_TARGETS ${name})
 ENDMACRO(VTK_ADD_LIBRARY)

 MACRO(VTK_ADD_EXECUTABLE name)
-  ADD_EXECUTABLE(${name} ${ARGN})
-  SET_PROPERTY(GLOBAL APPEND PROPERTY VTK_TARGETS ${name})
+  if(UNIX AND VTK_BUILD_FORWARDING_EXECUTABLES)
+    add_executable_with_forwarding(VTK_EXE_SUFFIX ${name} ${ARGN})
+    set_property(GLOBAL APPEND PROPERTY VTK_TARGETS ${name})
+  else()
+    add_executable(${name} ${ARGN})
+    set_property(GLOBAL APPEND PROPERTY VTK_TARGETS ${name})
+  endif()
 ENDMACRO(VTK_ADD_EXECUTABLE)


PKG: missing Qt5 cmake files

PKG: missing Qt5 cmake files

--- Packaging/install_cmake_files.cmake
+++ Packaging/install_cmake_files.cmake
@@ -31,4 +31,11 @@
    MATCH_STRING  "${CMAKE_INSTALL_PREFIX}"
    REPLACE_VAR "OTB_INSTALL_PREFIX"
    )
+
+  # install Qt5 cmake files (no patching required)
+  file(GLOB _qt5_cmake_folders "${SUPERBUILD_INSTALL_DIR}/lib/cmake/Qt5*")
+  foreach(_qt5_folder ${_qt5_cmake_folders})
+    install_without_message("${_qt5_folder}" "lib/cmake")
+  endforeach()
+
 endfunction()


remove obsolete CPACK_SET_DESTDIR

remove obsolete CPACK_SET_DESTDIR

--- cmake/ElektraPackaging.cmake
+++ cmake/ElektraPackaging.cmake
@@ -2,9 +2,6 @@
 set (CPACK_PACKAGE_NAME "${PACKAGE_NAME}")
 set (PACKAGE_URL "http://www.libelektra.org/")
 set (PACKAGE_BUGREPORT "http://bugs.libelektra.org/")
-
-#see http://public.kitware.com/Bug/view.php?id=7000
-SET(CPACK_SET_DESTDIR "ON")

 set (PROJECT_VERSION "${KDB_VERSION}")
@@ -87,7 +84,6 @@

 set(CPACK_RPM_SPEC_MORE_DEFINE "%define ignore \#")
-set(CPACK_RPM_PACKAGE_RELOCATABLE FALSE)

 set(CPACK_RPM_USER_FILELIST
 	"%ignore /etc/profile.d"


adding git HEAD info to Doxyfile

adding git HEAD info to Doxyfile

--- cmake/GenerateDoxyfile.cmake
+++ cmake/GenerateDoxyfile.cmake
@@ -30,5 +30,23 @@
     "\\1 ${CMAKE_CURRENT_SOURCE_DIR}/"
     DOXYFILE_AUXVAR ${DOXYFILE_AUXVAR})

+# get HEAD information from git
+execute_process(
+  COMMAND git rev-parse --short HEAD
+  OUTPUT_VARIABLE GIT_COMMIT
+  OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+execute_process(
+  COMMAND git rev-parse --abbrev-ref HEAD
+  OUTPUT_VARIABLE GIT_BRANCH
+  OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+# change project number
+string(REPLACE
+    "master"
+    "${GIT_BRANCH}(${GIT_COMMIT})"
+    DOXYFILE_AUXVAR "${DOXYFILE_AUXVAR}"
+    )
+
 # Save the Doxyfile to its new location.
 file(WRITE "${DESTDIR}/Doxyfile" "${DOXYFILE_AUXVAR}")


cmake: update matlab path

cmake: update matlab path

--- cmake/OpenCVFindMatlab.cmake
+++ cmake/OpenCVFindMatlab.cmake
@@ -62,7 +62,7 @@
     # possible root locations, in order of likelihood
     set(SEARCH_DIRS_ /Applications /usr/local /opt/local /usr /opt)
     foreach (DIR_ ${SEARCH_DIRS_})
-      file(GLOB MATLAB_ROOT_DIR_ ${DIR_}/MATLAB/R*)
+      file(GLOB MATLAB_ROOT_DIR_ ${DIR_}/MATLAB/R* ${DIR_}/MATLAB_R*)
       if (MATLAB_ROOT_DIR_)
         # sort in order from highest to lowest
         # normally it's in the format MATLAB_R[20XX][A/B]


build: use older means of getting the swiftrt object

This seems to be failing for some reason.  Fallback to the older way to
get the path to the object.  This should repair the build.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -821,7 +821,15 @@
               ${SWIFTLIB_SINGLE_XCODE_WORKAROUND_SOURCES})
   if("${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_OBJECT_FORMAT}" STREQUAL "ELF" AND SWIFTLIB_TARGET_LIBRARY)
     if("${libkind}" STREQUAL "SHARED")
-      target_sources(${target} PRIVATE $<TARGET_OBJECTS:swiftImageRegistrationObject-${SWIFT_SDK_${sdk}_LIB_SUBDIR}-${SWIFTLIB_SINGLE_ARCHITECTURE}>)
+      # TODO(compnerd) switch to the generator expression when cmake is upgraded
+      # to a version which supports it.
+      # target_sources(${target} PRIVATE $<TARGET_OBJECTS:swiftImageRegistrationObject-${SWIFT_SDK_${sdk}_LIB_SUBDIR}-${SWIFTLIB_SINGLE_ARCHITECTURE}>)
+      target_sources(${target}
+                     PRIVATE
+                       "${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR}/swiftrt${CMAKE_C_OUTPUT_EXTENSION}")
+      set_source_files_properties("${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR}/swiftrt${CMAKE_C_OUTPUT_EXTENSION}"
+                                  PROPERTIES
+                                    GENERATED 1)
     endif()
   endif()
   _set_target_prefix_and_suffix("${target}" "${libkind}" "${SWIFTLIB_SINGLE_SDK}")


--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -152,6 +152,7 @@
   if("${sdk}" STREQUAL "LINUX")
     list(APPEND result "-lpthread" "-ldl")
   elseif("${sdk}" STREQUAL "FREEBSD")
+    # No extra libraries required.
   else()
     list(APPEND result "-lobjc")
   endif()


Add the vespa http client.

Add the vespa http client.

--- install_java.cmake
+++ install_java.cmake
@@ -22,7 +22,6 @@
 install_fat_java_artifact(clustercontroller-apputil)
 install_fat_java_artifact(clustercontroller-utils)
 install_fat_java_artifact(clustercontroller-core)
-
 install_fat_java_artifact(component)
 install_fat_java_artifact(config-bundle)
 install_fat_java_artifact(config-model-api)
@@ -45,6 +44,7 @@
 install_fat_java_artifact(searchlib)
 install_fat_java_artifact(simplemetrics)
 install_fat_java_artifact(standalone-container)
+install_fat_java_artifact(vespa-http-client)
 install_fat_java_artifact(vespaclient-container-plugin)
 install_fat_java_artifact(zkfacade)


COMP: Updating ITKSimpleITKFilters remote module

88f6dd2 Add wrapping for DICOMOrient and NPaste image filter
e383bad COMP: fix compilation error with SetDesiredCoordinateOrientation
4415840 DOC: tweak NPaste documentation
37ce190 ENH: Add NPasteImageFilter
a7a7f66 BUG: Remove old Azure Pipelines configuration
6a17aa5 ENH: Incorporate GitHub Actions from ITKModuleTemplate
e3dbeea ENH: Update ITK Python Package to 5.1.0.post2 in setup.py
043d96d ENH: CI build against ITK 5.1.0
c0cc6e4 BUG: Safely return INVALID in GetAsString
c8c4243 Initialized arrays in constructor, address valgrind defect

--- Modules/Remote/SimpleITKFilters.remote.cmake
+++ Modules/Remote/SimpleITKFilters.remote.cmake
@@ -49,5 +49,5 @@
   contains a discrete hessian, and a composite filter to compute objectness."
   MODULE_COMPLIANCE_LEVEL 3
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSimpleITKFilters.git
-  GIT_TAG 3344aa9d61dbf6672dbc81dacab7b99fc0cfb7b5
+  GIT_TAG a2101c137d2c99cf32b2d9600b1e4c3e14722a16
   )


idl-config: Remove leftover message().

idl-config: Remove leftover message().

Change-Id: Ife19536ea9f8cc9cfe823b900fe33e14919939cb
Reviewed-on: http://gerrit.aldebaran.lan:8080/18520
Reviewed-by: mnottale <e3ccf1b6558404e921a21fa09cebb1153b50ec36@aldebaran-robotics.com>
Tested-by: mnottale <e3ccf1b6558404e921a21fa09cebb1153b50ec36@aldebaran-robotics.com>

--- codegen/src/idl-config.cmake
+++ codegen/src/idl-config.cmake
@@ -30,7 +30,6 @@
   list(GET split_class 0 class)
   string(TOLOWER ${class} _filename)
   set(_filename "${_filename}_proxy.hpp")
-  message("tgt ${output_dir}/${_filename}")
   set(${_out} ${output_dir}/${_filename} PARENT_SCOPE)
   qi_generate_src(${output_dir}/${_filename}
     SRC ${idl} ${IDL}


do not use -z defs on Solaris, it complains about libc.so implicit dependency

--- configure.cmake
+++ configure.cmake
@@ -164,9 +164,6 @@
   SET(LINK_FLAG_NO_UNDEFINED "--Wl,--no-undefined")
 ENDIF()

-IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
-  SET(LINK_FLAG_NO_UNDEFINED "-z defs")
-ENDIF()

 #Some OS specific hacks
 IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")


Updated the core/command_arguments.

Updated the core/command_arguments.

--- core/command_arguments.cmake
+++ core/command_arguments.cmake
@@ -74,7 +74,7 @@
 # Escape sequence
 message(An\ escape\ sequence\ is\ enabled:\ a\tb)

-# List
-foreach(v The;list;elements Not\;List\;Element)
+# List
+foreach(v The;list;elements Not\;List\;Element [Not;List;Element])
   message(${v})
 endforeach()


Fix CMake search issue when multiple installations happens on a host.

Co-authored-by: Andrew Tang <e3d30992f534cb2b94ea36700dd1ad151cce258c@gmail.com>

--- cmake/AWSSDKConfig.cmake
+++ cmake/AWSSDKConfig.cmake
@@ -71,6 +71,7 @@
             )
 else()
     find_file(AWSSDK_CORE_HEADER_FILE Aws.h
+        "${AWSSDK_DEFAULT_ROOT_DIR}/${AWSSDK_INSTALL_INCLUDEDIR}/aws/core"
         "/usr/${AWSSDK_INSTALL_INCLUDEDIR}/aws/core"
         "/usr/local/${AWSSDK_INSTALL_INCLUDEDIR}/aws/core"
         "C:/Progra~1/AWSSDK/${AWSSDK_INSTALL_INCLUDEDIR}/aws/core"
@@ -78,7 +79,6 @@
         "C:/Program Files/aws-cpp-sdk-all/${AWSSDK_INSTALL_INCLUDEDIR}/aws/core"
         "C:/Program Files (x86)/aws-cpp-sdk-all/${AWSSDK_INSTALL_INCLUDEDIR}/aws/core"
         "C:/AWSSDK/${AWSSDK_INSTALL_INCLUDEDIR}/aws/core"
-        "${AWSSDK_DEFAULT_ROOT_DIR}/${AWSSDK_INSTALL_INCLUDEDIR}/aws/core"
     )
 endif()


Added additional search path suffix for OpenH264.

--- cmake/FindOpenH264.cmake
+++ cmake/FindOpenH264.cmake
@@ -11,8 +11,12 @@
 	set(OPENH264_FIND_QUIETLY TRUE)
 endif (OPENH264_INCLUDE_DIR AND OPENH264_LIBRARY)

-find_path(OPENH264_INCLUDE_DIR NAMES wels/codec_api.h wels/codec_app_def.h wels/codec_def.h HINTS ${OPENH264_ROOT})
-find_library(OPENH264_LIBRARY NAMES openh264 welsdec PATH_SUFFIXES lib HINTS ${OPENH264_ROOT})
+find_path(OPENH264_INCLUDE_DIR NAMES wels/codec_api.h wels/codec_app_def.h wels/codec_def.h
+	PATH_SUFFIXES include
+	HINTS ${OPENH264_ROOT})
+find_library(OPENH264_LIBRARY NAMES openh264 welsdec
+	 PATH_SUFFIXES lib
+	 HINTS ${OPENH264_ROOT})

 include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenH264 DEFAULT_MSG OPENH264_LIBRARY OPENH264_INCLUDE_DIR)


Don't override compiler options specified on command line

Change-Id: Id004415afe70c1b4c97ede2da2613edbb9b4e064
Signed-off-by: Matthew Bentham <286076deec2404ae356dd8bc92f2f71e81044bd4@arm.com>

--- cmake/GlobalConfig.cmake
+++ cmake/GlobalConfig.cmake
@@ -62,7 +62,7 @@
 endif()

 # Compiler flags for Release builds
-set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG")
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG")
 if(COMPILER_IS_GNU_LIKE)
     set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
 elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
@@ -71,9 +71,9 @@

 # Compiler flags for Debug builds
 if(COMPILER_IS_GNU_LIKE)
-    set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
+    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0")
 elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
-    set(CMAKE_CXX_FLAGS_DEBUG "/MDd /ZI /Od")
+    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd /ZI /Od")
     # Disable SAFESEH which is necessary for Edit and Continue to work
     set(CMAKE_EXE_LINKER_FLAGS_DEBUG  "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /SAFESEH:NO")
     set(CMAKE_SHARED_LINKER_FLAGS_DEBUG  "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /SAFESEH:NO")


fixed md5sum

fixed md5sum

--- cmake/get-fifechan.cmake
+++ cmake/get-fifechan.cmake
@@ -36,7 +36,7 @@
       DOWNLOAD_DIR        ${DEPENDENCY_DOWNLOAD_DIR}
       #URL                 https://github.com/fifengine/fifechan/releases/tag/${FIFECHAN_VERSION}/fifechan-v${FIFECHAN_VERSION}-VC14.zip
       URL                 https://ci.appveyor.com/api/buildjobs/bucj5vdy8bx4wnr2/artifacts/fifechan-shared-VC14-x86.zip
-      URL_MD5             6269a0f25529b95be5e8b21ec8caa103
+      URL_MD5             9cc0c3210f2b20d995f19d39341be55e
       CONFIGURE_COMMAND   ""
       BUILD_COMMAND       ""
       INSTALL_COMMAND


Fix cmake empty build dir detection when running tests

--- Testing/script/mercury_common.cmake
+++ Testing/script/mercury_common.cmake
@@ -283,8 +283,12 @@
 # Start with a fresh build tree.
 file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
 if(NOT "${CTEST_SOURCE_DIRECTORY}" STREQUAL "${CTEST_BINARY_DIRECTORY}")
-  message("Clearing build tree...")
-  ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
+  file(GLOB CTEST_BINARY_DIRECTORY_LIST ${CTEST_BINARY_DIRECTORY}/*.txt)
+  list(LENGTH CTEST_BINARY_DIRECTORY_LIST CTEST_BINARY_DIRECTORY_LIST_LEN)
+  if(NOT CTEST_BINARY_DIRECTORY_LIST_LEN EQUAL 0)
+    message("Clearing build tree...")
+    ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
+  endif()
 endif()

 set(dashboard_continuous 0)


STYLE: Update IOSTL module for KWStyle test.

Addresses __ in header guards.

Change-Id: Iee45e8a9e3c6a9a019a1a8ba7130633b305c8edd

--- Modules/Remote/IOSTL.remote.cmake
+++ Modules/Remote/IOSTL.remote.cmake
@@ -3,5 +3,5 @@
   "This module contains classes for reading and writing QuadEdgeMeshes using
   the STL (STereoLithography)file format. http://hdl.handle.net/10380/3452"
   GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/ITKSTLMeshIO.git
-  GIT_TAG 933359a5fd1bac792a3c0af5f4e05e291e153677
+  GIT_TAG 300ffffbe07a42182d54b67660eb7058f893ffa2
   )


CI: remove python3 option

CI: remove python3 option

--- CI/configure_option.cmake
+++ CI/configure_option.cmake
@@ -55,8 +55,7 @@

 set (otb_wrap_option
 "OTB_WRAP_JAVA:BOOL=ON
-OTB_WRAP_PYTHON:BOOL=ON
-OTB_WRAP_PYTHON3:BOOL=ON")
+OTB_WRAP_PYTHON:BOOL=ON")

 set (otb_data_option
 "OTB_DATA_USE_LARGEINPUT:BOOL=OFF


DOC:add a comment about the CHECK_CXX_SOURCE_RUNS_ARGS macro parameter

--- CMake/ImportGetText.cmake
+++ CMake/ImportGetText.cmake
@@ -44,7 +44,7 @@
 	SET(CMAKE_REQUIRED_DEFINITIONS ${QT_DEFINITIONS})
 	CHECK_CXX_SOURCE_RUNS_ARGS(
             ${CMAKE_CURRENT_SOURCE_DIR}/CMake/TestQtGettextConflict.cxx
-	    0
+	    0 #This parameter is not used in this case
             CHECK_QT_GETTEXT_CONFLICT
             )
 	IF(NOT CHECK_QT_GETTEXT_CONFLICT)


remove "s" from "includes"

remove "s" from "includes"

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

--- CMakeModules/Sagase.cmake
+++ CMakeModules/Sagase.cmake
@@ -48,7 +48,7 @@
     foreach (prefix ${path_prefixes})

         set (includes ${includes}
-            ${prefix}/includes)
+            ${prefix}/include)

         set (libraries ${libraries}
             ${prefix}/lib


Updates cmake rat configuration so that apache rat is downloaded on demand

--- cmake/celix_project/ApacheRat.cmake
+++ cmake/celix_project/ApacheRat.cmake
@@ -15,16 +15,30 @@
 # specific language governing permissions and limitations
 # under the License.

-find_package(Java COMPONENTS Runtime)

-if(Java_Runtime_FOUND)
-    set(APACHE_RAT "NOT_FOUND" CACHE FILEPATH "Full path to the Apache RAT JAR file")
-
-    add_custom_target(rat
-        COMMAND ${Java_JAVA_EXECUTABLE} -jar ${APACHE_RAT} -E rat-excludes.txt -d .
-
-        WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-    )
-else(Java_Runtime_FOUND)
-    MESSAGE(STATUS "Java not found, cannot execute Apache RAT checks")
-endif(Java_Runtime_FOUND)+#Check if Apache RAT is enabled.
+#Apache RAT can be used to check for missing license text in the project files.
+option(ENABLE_APACHE_RAT "Enables Apache Release Audit tool" FALSE)
+if (ENABLE_APACHE_RAT)
+    find_package(Java COMPONENTS Runtime)
+    if(Java_Runtime_FOUND)
+        include(FetchContent)
+        set(APACHE_RAT_URL "https://dlcdn.apache.org//creadur/apache-rat-0.14/apache-rat-0.14-bin.tar.gz")
+        set(APACHE_RAT_HASH "17119289839dc573dd29039ca09bd86f729f1108308f6681292125418fd7bceeaf7d1a40b83eb01daf7d3dd66fbcc0a68d5431741314e748f7b878e8967459e9") #matching hash for the apache rat download
+
+        FetchContent_Declare(download_apache_rat
+            URL ${APACHE_RAT_URL}
+            URL_HASH SHA512=${APACHE_RAT_HASH}
+        )
+        FetchContent_MakeAvailable(download_apache_rat)
+        set(APACHE_RAT "${download_apache_rat_SOURCE_DIR}/apache-rat-*.jar")
+
+        add_custom_target(rat
+            COMMAND ${Java_JAVA_EXECUTABLE} -jar ${APACHE_RAT} -E rat-excludes.txt -d .
+            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+        )
+
+    else(Java_Runtime_FOUND)
+        MESSAGE(STATUS "Java not found, cannot execute Apache RAT checks")
+    endif(Java_Runtime_FOUND)
+endif ()


[CMake] Simplify handling for SWIFT_INSTALL_EXCLUDE_[component] option, NFC.

--- cmake/modules/SwiftComponents.cmake
+++ cmake/modules/SwiftComponents.cmake
@@ -85,10 +85,7 @@

     string(TOUPPER "${component}" var_name_piece)
     string(REPLACE "-" "_" var_name_piece "${var_name_piece}")
-    if("${SWIFT_INSTALL_EXCLUDE_${var_name_piece}}" STREQUAL "")
-      set(SWIFT_INSTALL_EXCLUDE_${var_name_piece} FALSE)
-    endif()
-    if(NOT ${SWIFT_INSTALL_EXCLUDE_${var_name_piece}})
+    if(NOT SWIFT_INSTALL_EXCLUDE_${var_name_piece})
       set(SWIFT_INSTALL_${var_name_piece} TRUE)
     endif()
   endforeach()


Refactoring for future

Refactoring for future

Move HUNTER_PACKAGE_BASENAME modification before creating temp directories

--- cmake/modules/hunter_download.cmake
+++ cmake/modules/hunter_download.cmake
@@ -75,10 +75,25 @@
     )
   endif()

+  # HUNTER_PACKAGE_BASENAME = <name[-component]-tag>
+  set(HUNTER_PACKAGE_BASENAME "${HUNTER_PACKAGE_NAME}")
+  if(HUNTER_PACKAGE_COMPONENT)
+    set(
+        HUNTER_PACKAGE_BASENAME
+        "${HUNTER_PACKAGE_BASENAME}-${HUNTER_PACKAGE_COMPONENT}"
+    )
+  endif()
+  set(
+      HUNTER_PACKAGE_BASENAME
+      "${HUNTER_PACKAGE_BASENAME}-${HUNTER_INSTALL_TAG}"
+  )
+
+  ### Directory modifications start from here
+  ### Expected that only one process working
   set(h_work_dir "${PROJECT_BINARY_DIR}/_3rdParty/hunter/external")
   file(REMOVE_RECURSE "${h_work_dir}")

-  hunter_get_temp_directory("${h_work_dir}" h_work_dir)
+  hunter_get_temp_directory("${h_work_dir}" h_work_dir) # pure
   hunter_test_string_not_empty("${h_work_dir}")
   set(h_build_dir "${h_work_dir}/_builds")

@@ -142,19 +157,6 @@
     )
   endif()

-  # HUNTER_PACKAGE_BASENAME = <name[-component]-tag>
-  set(HUNTER_PACKAGE_BASENAME "${HUNTER_PACKAGE_NAME}")
-  if(HUNTER_PACKAGE_COMPONENT)
-    set(
-        HUNTER_PACKAGE_BASENAME
-        "${HUNTER_PACKAGE_BASENAME}-${HUNTER_PACKAGE_COMPONENT}"
-    )
-  endif()
-  set(
-      HUNTER_PACKAGE_BASENAME
-      "${HUNTER_PACKAGE_BASENAME}-${HUNTER_INSTALL_TAG}"
-  )
-
   # print info before start generation/run
   hunter_status_debug("Add package: ${HUNTER_PACKAGE_NAME}")
   if(HUNTER_PACKAGE_COMPONENT)
@@ -179,6 +181,7 @@
   # Optimization:
   #     Check run needed. If 'Stamp/<name-...>/<name-...>-install' file
   #     detected, no need to generate/run project
+  # Use: HUNTER_BASE, HUNTER_PACKAGE_BASENAME
   hunter_find_stamps(
       NAME "install"
       VARIANTS ${HUNTER_DOWNLOAD_SCHEME_VARIANTS}


SVN_SILENT made messages (.desktop file) - always resolve ours

In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -1,5 +1,6 @@
 [Desktop Entry]
 Name=Instant Messaging
+Name[ar]=التّراسل المباشر
 Name[bs]=Brze poruke
 Name[ca]=Missatgeria instantània
 Name[ca@valencia]=Missatgeria instantània
@@ -42,6 +43,7 @@
 Name[zh_CN]=即时通讯
 Name[zh_TW]=即時訊息
 Comment=Start a chat with any of your IM contacts or change your IM status
+Comment[ar]=ابدأ محادثة بأيّ من متراسلي ت‌م أو غيّر حالة ت‌م
 Comment[bs]=Pokrenite ćaskanje s bilo kojim od vaših IM kontakta ili promijenite svoj IM status
 Comment[ca]=Inicia un xat amb qualsevol dels vostres contactes de MI o canvia el vostre estat de MI
 Comment[ca@valencia]=Inicia un xat amb qualsevol dels vostres contactes de MI o canvia el vostre estat de MI


cmake: FindCurses.

cmake: FindCurses.

--- extras/buildsystem/cmake/include/config.cmake
+++ extras/buildsystem/cmake/include/config.cmake
@@ -18,10 +18,12 @@
 set(VLC_VERSION_MINOR 9)
 set(VLC_VERSION_PATCH 0)
 set(VLC_VERSION_EXTRA "-svn")
+set(VLC_VERSION ${VLC_VERSION_MAJOR}.${VLC_VERSION_MINOR}.${VLC_VERSION_PATCH}${VLC_VERSION_EXTRA})

 set(PACKAGE "vlc")
+set(PACKAGE_VERSION "${VLC_VERSION}")
 set(PACKAGE_STRING "vlc")
-set(VERSION_MESSAGE "vlc-${VLC_VERSION_MAJOR}.${VLC_VERSION_MINOR}.${VLC_VERSION_PATCH}${VLC_VERSION_EXTRA}")
+set(VERSION_MESSAGE "vlc-${VLC_VERSION}")
 set(COPYRIGHT_MESSAGE "Copyright © the VideoLAN team")
 set(COPYRIGHT_YEARS "2001-2008")

@@ -467,13 +469,19 @@
   vlc_module_add_link_libraries(mkv ${Matroska_LIBRARIES})
 endif(Matroska_FOUND)

-find_package(Live555 0.7.7)
+find_package(Live555)
 if(Live555_FOUND)
   vlc_enable_modules(live555)
   vlc_add_module_compile_flag(live555 ${Live555_CFLAGS})
   vlc_module_add_link_libraries(live555 ${Live555_LIBRARIES})
 endif(Live555_FOUND)

+find_package(Curses)
+if(CURSES_LIBRARIES)
+  vlc_enable_modules(ncurses)
+  vlc_module_add_link_libraries(ncurses ${CURSES_LIBRARIES})
+endif(CURSES_LIBRARIES)
+
 set(CMAKE_REQUIRED_INCLUDES)

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


[UPD] Rewriting manually OCTAVE_ROOT updates the others variables related to Octave.
[FIX] FindOctave.cmake adapted for Octave 3.6.

git-svn-id: ed06c97986a68fa016311908f99ed1538fbb9b5d@987 93be6e1e-6fcc-11de-baec-69240fdc299a

--- CMake/FindOctave.cmake
+++ CMake/FindOctave.cmake
@@ -20,8 +20,17 @@
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.

 IF(OCTAVE_ROOT AND OCTAVE_INCLUDE_DIR AND OCTAVE_LIBRARIES)
-   # in cache already
-   SET(Octave_FIND_QUIETLY TRUE)
+  STRING(COMPARE NOTEQUAL "${OCTAVE_ROOT}" "${OCTAVE_ROOT_LAST}" OCTAVE_CHANGED)
+  IF(OCTAVE_CHANGED)
+    SET(OCTAVE_USE_MINGW32 OCTAVE_USE_MINGW32-NOTFOUND CACHE INTERNAL "")
+    SET(OCTAVE_OCTINTERP_LIBRARY OCTAVE_OCTINTERP_LIBRARY-NOTFOUND CACHE INTERNAL "")
+    SET(OCTAVE_OCTAVE_LIBRARY OCTAVE_OCTAVE_LIBRARY-NOTFOUND CACHE INTERNAL "")
+    SET(OCTAVE_CRUFT_LIBRARY OCTAVE_CRUFT_LIBRARY-NOTFOUND CACHE INTERNAL "")
+    SET(OCTAVE_INCLUDE_DIR OCTAVE_INCLUDE_DIR-NOTFOUND CACHE INTERNAL "")
+  ELSE(OCTAVE_CHANGED)
+    # in cache already
+    SET(Octave_FIND_QUIETLY TRUE)
+  ENDIF(OCTAVE_CHANGED)
 ENDIF(OCTAVE_ROOT AND OCTAVE_INCLUDE_DIR AND OCTAVE_LIBRARIES)

 SET(OCTAVE_MEXFILE_EXT mex)
@@ -59,6 +68,9 @@

   FILE(GLOB OCTAVE_INCLUDE_PATHS "${OCTAVE_ROOT}/include/octave-*/octave")
   FILE(GLOB OCTAVE_LIBRARIES_PATHS "${OCTAVE_ROOT}/lib/octave-*")
+  IF (NOT OCTAVE_LIBRARIES_PATHS)
+    FILE(GLOB OCTAVE_LIBRARIES_PATHS "${OCTAVE_ROOT}/lib/octave/*")
+  ENDIF (NOT OCTAVE_LIBRARIES_PATHS)

   # LIBOCTINTERP, LIBOCTAVE, LIBCRUFT names
   SET(LIBOCTINTERP "liboctinterp")
@@ -116,11 +128,14 @@
     ${OCTAVE_INCLUDE_PATHS} NO_DEFAULT_PATH
     )

+SET(OCTAVE_ROOT_LAST "${OCTAVE_ROOT}" CACHE INTERNAL "" FORCE)
+
 # This is common to UNIX and Win32:
 SET(OCTAVE_LIBRARIES
   ${OCTAVE_OCTINTERP_LIBRARY}
   ${OCTAVE_OCTAVE_LIBRARY}
-  ${OCTAVE_CRUFT_LIBRARY}
+  ${OCTAVE_CRUFT_LIBRARY}
+  CACHE INTERNAL "Octave libraries" FORCE
 )

 # Macros for building MEX-files


ENH: Remove Hippo Experimental

ENH: Remove Hippo Experimental

--- Hippo_Kitware_TubeTK_Experimental.cmake
+++ Hippo_Kitware_TubeTK_Experimental.cmake
@@ -1,170 +0,0 @@
-##############################################################################
-#
-# Library:   TubeTK
-#
-# Copyright 2010 Kitware Inc. 28 Corporate Drive,
-# Clifton Park, NY, 12065, USA.
-#
-# All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 ( the "License" );
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-##############################################################################
-
-##############################################################################
-#
-# Configure the following variables and move this file to the directory above
-#   the TubeTK source directory.
-#
-set( SITE_NAME "Hippo.Kitware" )
-set( SITE_PLATFORM "apple-darwin12.3.0-clang-x86_64" )
-set( SITE_BUILD_TYPE "RelWithDebInfo" )
-set( SITE_CTEST_MODE "Experimental" )
-set( SITE_CMAKE_GENERATOR "Unix Makefiles" )
-
-set( TUBETK_GIT_REPOSITORY "http://tubetk.org/TubeTK.git" )
-set( TUBETK_ROOT_DIR "/Users/snape/Development/TubeTK" )
-set( TUBETK_DASHBOARDS_DIR "${TUBETK_ROOT_DIR}/TubeTK-Dashboards" )
-set( TUBETK_SOURCE_DIR "${TUBETK_ROOT_DIR}/TubeTK-${SITE_CTEST_MODE}" )
-set( TUBETK_BINARY_DIR "${TUBETK_ROOT_DIR}/TubeTK-${SITE_CTEST_MODE}-${SITE_BUILD_TYPE}" )
-
-set( ENV{DISPLAY} ":0" )
-
-set( SITE_MAKE_COMMAND "/usr/bin/make" )
-set( SITE_CMAKE_COMMAND "/usr/local/bin/cmake" )
-set( SITE_QMAKE_COMMAND "/usr/local/bin/qmake" )
-set( SITE_CTEST_COMMAND "/usr/local/bin/ctest" )
-
-set( SITE_MEMORYCHECK_COMMAND "/usr/local/bin/valgrind" )
-set( SITE_COVERAGE_COMMAND "/usr/bin/gcov" )
-set( SITE_KWSTYLE_DIR "/usr/local/bin" )
-
-set( SITE_GIT_COMMAND "/usr/bin/git" )
-set( SITE_SVN_COMMAND "/usr/bin/svn" )
-
-set( SITE_EXPERIMENTAL_BUILD ON )
-set( SITE_EXPERIMENTAL_TEST ON )
-set( SITE_EXPERIMENTAL_COVERAGE OFF )
-set( SITE_EXPERIMENTAL_MEMORY OFF )
-set( SITE_EXPERIMENTAL_PACKAGE OFF )
-set( SITE_EXPERIMENTAL_UPLOAD OFF )
-set( SITE_EXPERIMENTAL_DOCUMENTATION OFF )
-set( SITE_EXPERIMENTAL_STYLE OFF )
-set( SITE_EXPERIMENTAL_CPPCHECK OFF )
-
-set( SITE_CONTINUOUS_BUILD ON )
-set( SITE_CONTINUOUS_TEST ON )
-set( SITE_CONTINUOUS_COVERAGE OFF )
-set( SITE_CONTINUOUS_MEMORY OFF )
-set( SITE_CONTINUOUS_PACKAGE OFF )
-set( SITE_CONTINUOUS_UPLOAD OFF )
-set( SITE_CONTINUOUS_DOCUMENTATION OFF )
-set( SITE_CONTINUOUS_STYLE OFF )
-set( SITE_CONTINUOUS_CPPCHECK OFF )
-
-set( SITE_NIGHTLY_BUILD ON )
-set( SITE_NIGHTLY_TEST ON )
-set( SITE_NIGHTLY_COVERAGE OFF )
-set( SITE_NIGHTLY_MEMORY OFF )
-set( SITE_NIGHTLY_PACKAGE ON )
-set( SITE_NIGHTLY_UPLOAD ON )
-set( SITE_NIGHTLY_DOCUMENTATION OFF )
-set( SITE_NIGHTLY_STYLE OFF )
-set( SITE_NIGHTLY_CPPCHECK OFF )
-
-##############################################################################
-
-##############################################################################
-#
-# The following advanced variables should only be changed by experts
-#
-set( TUBETK_SCRIPT_DIR "${TUBETK_SOURCE_DIR}/CMake" )
-
-set( SITE_BUILD_NAME "${SITE_PLATFORM}-${SITE_BUILD_TYPE}" )
-
-set( SITE_UPDATE_COMMAND "${SITE_GIT_COMMAND}" )
-
-set( CTEST_SITE "${SITE_NAME}" )
-
-set( CTEST_BUILD_CONFIGURATION "${SITE_BUILD_TYPE}" )
-set( CTEST_BUILD_COMMAND "${SITE_MAKE_COMMAND}" )
-
-set( CTEST_SOURCE_DIRECTORY "${TUBETK_SOURCE_DIR}" )
-set( CTEST_BINARY_DIRECTORY "${TUBETK_BINARY_DIR}/TubeTK-Build" )
-
-set( CTEST_CMAKE_GENERATOR "${SITE_CMAKE_GENERATOR}" )
-set( CTEST_TEST_TIMEOUT 1500 )
-
-set( CTEST_CMAKE_COMMAND "${SITE_CMAKE_COMMAND}" )
-set( CTEST_CTEST_COMMAND "${SITE_CTEST_COMMAND}" )
-set( CTEST_UPDATE_COMMAND "${SITE_UPDATE_COMMAND}" )
-set( CTEST_COVERAGE_COMMAND "${SITE_COVERAGE_COMMAND}" )
-set( CTEST_MEMORYCHECK_COMMAND "${SITE_MEMORYCHECK_COMMAND}" )
-set( CTEST_MEMORYCHECK_COMMAND_OPTIONS "${SITE_MEMORYCHECK_COMMAND_OPTIONS}" )
-set( CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "${SITE_MEMORYCHECK_SUPPRESSIONS_FILE}" )
-set( CTEST_COMMAND "${SITE_CTEST_COMMAND}" )
-
-set( SITE_EXECUTABLE_DIRS "${SITE_KWSTYLE_DIR}" )
-set( ENV{PATH} "${SITE_EXECUTABLE_DIRS}:$ENV{PATH}" )
-
-set( SITE_C_FLAGS "-fPIC -fdiagnostics-show-option -W -Wall -Wextra -Wshadow -Wno-system-headers -Wwrite-strings -Wno-deprecated -Wno-deprecated-declarations -Wno-incompatible-pointer-types -Wno-invalid-source-encoding -Wno-sometimes-uninitialized" )
-set( SITE_CXX_FLAGS "-fPIC -fdiagnostics-show-option -W -Wall -Wextra -Wshadow -Wno-system-headers -Wwrite-strings -Wno-deprecated -Wno-deprecated-declarations -Wno-incompatible-pointer-types -Wno-invalid-source-encoding -Wno-sometimes-uninitialized -Woverloaded-virtual -Wno-unused-private-field" )
-set( SITE_EXE_LINKER_FLAGS "" )
-set( SITE_SHARED_LINKER_FLAGS "${SITE_EXE_LINKER_FLAGS}" )
-
-set( COVERAGE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage" )
-set( COVERAGE_CXX_FLAGS "${COVERAGE_C_FLAGS}" )
-set( COVERAGE_EXE_LINKER_FLAGS "" )
-set( COVERAGE_SHARED_LINKER_FLAGS "${COVERAGE_EXE_LINKER_FLAGS}" )
-
-if( SITE_NIGHTLY_COVERAGE OR SITE_CONTINUOUS_COVERAGE OR SITE_EXPERIMENTAL_COVERAGE )
-  set( SITE_C_FLAGS "${SITE_C_FLAGS} ${COVERAGE_C_FLAGS}" )
-  set( SITE_CXX_FLAGS "${SITE_CXX_FLAGS} ${COVERAGE_CXX_FLAGS}" )
-  set( SITE_EXE_LINKER_FLAGS "${SITE_EXE_LINKER_FLAGS} ${COVERAGE_EXE_LINKER_FLAGS}" )
-  set( SITE_SHARED_LINKER_FLAGS "${SITE_SHARED_LINKER_FLAGS} ${COVERAGE_SHARED_LINKER_FLAGS}" )
-endif( SITE_NIGHTLY_COVERAGE OR SITE_CONTINUOUS_COVERAGE OR SITE_EXPERIMENTAL_COVERAGE )
-
-set( SITE_MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=all --trace-children=yes -q --leak-check=yes --show-reachable=yes --num-callers=50" )
-set( SITE_MEMORYCHECK_SUPPRESSIONS_FILE "${TUBETK_SCRIPT_DIR}/valgrind_suppressions.txt" )
-
-set( MEMORYCHECK_C_FLAGS "-g -O0 -ggdb" )
-set( MEMORYCHECK_CXX_FLAGS "${MEMORYCHECK_C_FLAGS}" )
-
-if( SITE_NIGHTLY_MEMORY OR SITE_CONTINUOUS_MEMORY OR SITE_EXPERIMENTAL_MEMORY )
-  set( SITE_C_FLAGS "${SITE_C_FLAGS} ${MEMORYCHECK_C_FLAGS}" )
-  set( SITE_CXX_FLAGS "${SITE_CXX_FLAGS} ${MEMORYCHECK_CXX_FLAGS}" )
-endif( SITE_NIGHTLY_MEMORY OR SITE_CONTINUOUS_MEMORY OR SITE_EXPERIMENTAL_MEMORY )
-
-set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SITE_C_FLAGS}" )
-set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SITE_CXX_FLAGS}" )
-set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${SITE_EXE_LINKER_FLAGS}" )
-set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${SITE_SHARED_LINKER_FLAGS}" )
-
-set( GITCOMMAND "${SITE_GIT_COMMAND}" )
-set( GIT_EXECUTABLE "${SITE_GIT_COMMAND}" )
-set( SVNCOMMAND "${SITE_SVN_COMMAND}" )
-set( CMAKE_GENERATOR "${SITE_CMAKE_GENERATOR}" )
-set( QT_QMAKE_EXECUTABLE "${SITE_QMAKE_COMMAND}" )
-
-if( NOT EXISTS "${TUBETK_SOURCE_DIR}/CMakeLists.txt" )
-  execute_process( COMMAND "${SITE_GIT_COMMAND}" clone "${TUBETK_GIT_REPOSITORY}" "${TUBETK_SOURCE_DIR}" )
-  ctest_run_script()
-endif( NOT EXISTS "${TUBETK_SOURCE_DIR}/CMakeLists.txt" )
-
-if( "${SITE_CTEST_MODE}" STREQUAL "Experimental" )
-  include( "${TUBETK_DASHBOARDS_DIR}/run_experimental.cmake" )
-elseif( "${SITE_CTEST_MODE}" STREQUAL "Continuous" )
-  include( "${TUBETK_DASHBOARDS_DIR}/run_continuous.cmake" )
-elseif( "${SITE_CTEST_MODE}" STREQUAL "Nightly" )
-  include( "${TUBETK_DASHBOARDS_DIR}/run_nightly.cmake" )
-endif()


fix Wolfram Engine support for OS X

fix Wolfram Engine support for OS X

--- CMake/Mathematica/FindMathematica.cmake
+++ CMake/Mathematica/FindMathematica.cmake
@@ -1510,6 +1510,7 @@
 		HINTS
 			"${Mathematica_ROOT_DIR}/SystemFiles/IncludeFiles"
 			"${Mathematica_ROOT_DIR}/Contents/SystemFiles/IncludeFiles"
+			"${Mathematica_ROOT_DIR}/Contents/Resources/Wolfram Player.app/Contents/SystemFiles/IncludeFiles"
 		PATH_SUFFIXES "C"
 		DOC "Mathematica C language definitions include directory."
 		NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
@@ -1576,6 +1577,7 @@
 		HINTS
 			"${Mathematica_ROOT_DIR}/SystemFiles/Libraries"
 			"${Mathematica_ROOT_DIR}/Contents/SystemFiles/Libraries"
+			"${Mathematica_ROOT_DIR}/Contents/Resources/Wolfram Player.app/Contents/SystemFiles/Libraries"
 		PATH_SUFFIXES ${_SystemIDs}
 		DOC "Mathematica Wolfram Runtime Library."
 		NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
@@ -1585,6 +1587,7 @@
 		HINTS
 			"${Mathematica_ROOT_DIR}/SystemFiles/IncludeFiles"
 			"${Mathematica_ROOT_DIR}/Contents/SystemFiles/IncludeFiles"
+			"${Mathematica_ROOT_DIR}/Contents/Resources/Wolfram Player.app/Contents/SystemFiles/IncludeFiles"
 		PATH_SUFFIXES "C"
 		DOC "Mathematica WolframLibrary include directory."
 		NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
@@ -1617,6 +1620,7 @@
 		HINTS
 			"${Mathematica_ROOT_DIR}/SystemFiles/Links/MathLink/DeveloperKit"
 			"${Mathematica_ROOT_DIR}/Contents/SystemFiles/Links/MathLink/DeveloperKit"
+			"${Mathematica_ROOT_DIR}/Contents/Resources/Wolfram Player.app/Contents/SystemFiles/Links/MathLink/DeveloperKit"
 			"${Mathematica_ROOT_DIR}/AddOns/MathLink/DeveloperKit"
 		PATH_SUFFIXES ${_SystemIDs}
 		DOC "MathLink target SDK root directory."
@@ -1634,6 +1638,7 @@
 		HINTS
 			"${Mathematica_HOST_ROOT_DIR}/SystemFiles/Links/MathLink/DeveloperKit"
 			"${Mathematica_HOST_ROOT_DIR}/Contents/SystemFiles/Links/MathLink/DeveloperKit"
+			"${Mathematica_HOST_ROOT_DIR}/Contents/Resources/Wolfram Player.app/Contents/SystemFiles/Links/MathLink/DeveloperKit"
 			"${Mathematica_HOST_ROOT_DIR}/AddOns/MathLink/DeveloperKit"
 		PATH_SUFFIXES ${_HostSystemIDs}
 		DOC "MathLink host SDK root directory."
@@ -1732,6 +1737,7 @@
 		HINTS
 			"${Mathematica_ROOT_DIR}/SystemFiles/Links/WSTP/DeveloperKit"
 			"${Mathematica_ROOT_DIR}/Contents/SystemFiles/Links/WSTP/DeveloperKit"
+			"${Mathematica_ROOT_DIR}/Contents/Resources/Wolfram Player.app/Contents/SystemFiles/Links/WSTP/DeveloperKit"
 		PATH_SUFFIXES ${_SystemIDs}
 		DOC "WSTP target SDK root directory."
 		NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
@@ -1748,6 +1754,7 @@
 		HINTS
 			"${Mathematica_HOST_ROOT_DIR}/SystemFiles/Links/WSTP/DeveloperKit"
 			"${Mathematica_HOST_ROOT_DIR}/Contents/SystemFiles/Links/WSTP/DeveloperKit"
+			"${Mathematica_HOST_ROOT_DIR}/Contents/Resources/Wolfram Player.app/Contents/SystemFiles/Links/WSTP/DeveloperKit"
 		PATH_SUFFIXES ${_HostSystemIDs}
 		DOC "WSTP host SDK root directory."
 		NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
@@ -1842,6 +1849,7 @@
 		HINTS
 			"${Mathematica_ROOT_DIR}/SystemFiles/Links/JLink"
 			"${Mathematica_ROOT_DIR}/Contents/SystemFiles/Links/JLink"
+			"${Mathematica_ROOT_DIR}/Contents/Resources/Wolfram Player.app/Contents/SystemFiles/Links/JLink"
 			"${Mathematica_ROOT_DIR}/AddOns/JLink"
 		DOC "J/Link SDK root directory."
 		NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
@@ -1873,6 +1881,8 @@
 	if (CMAKE_HOST_APPLE)
 		if (EXISTS "${Mathematica_HOST_ROOT_DIR}/Contents/SystemFiles/Java")
 			set (_mmaJavaHome "${Mathematica_HOST_ROOT_DIR}/Contents/SystemFiles/Java")
+		elseif (EXISTS "${Mathematica_HOST_ROOT_DIR}/Contents/Resources/Wolfram Player.app/Contents/SystemFiles/Java")
+			set (_mmaJavaHome "${Mathematica_HOST_ROOT_DIR}/Contents/Resources/Wolfram Player.app/Contents/SystemFiles/Java")
 		else()
 			# OS X versions of Mathematica earlier than 10 did not have a JVM bundled
 			# but used the Java JVM pre-installed on system


Update android toolchain with r10d support

--- CMake/toolchain/android.toolchain.cmake
+++ CMake/toolchain/android.toolchain.cmake
@@ -85,9 +85,15 @@
 #        "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.
+#        "arm64-v8a" - matches to the NDK ABI with the same name.
+#            See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
 #        "x86" - matches to the NDK ABI with the same name.
 #            See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
+#        "x86_64" - 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.
+#        "mips64" - matches to the NDK ABI with the same name.
 #            See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
 #
 #    ANDROID_NATIVE_API_LEVEL=android-8 - level of Android API compile for.
@@ -181,13 +187,13 @@
 #    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
+#    Also ARMEABI or ARMEABI_V7A or ARM64_V8A or X86 or X86_64 or MIPS 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.
 #    Default is ${CMAKE_SOURCE_DIR}, and the android libs will always be
-#    under the ${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME}
+#    under the ${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_OUTPUT_ABI_NAME}
 #    (depending on the target ABI). This is convenient for Android packaging.
 #
 #  Change Log:
@@ -303,6 +309,9 @@
 #     [~] fix copying of shared STL
 #   - April 2014
 #     [+] updated for NDK r9d
+#   - July 2014
+#     [+] updated for NDK r10c
+#     [+] arm64_v8a, x86_64, mips64 toolchain support (experimental)
 # ------------------------------------------------------------------------------

 cmake_minimum_required( VERSION 2.6.3 )
@@ -329,7 +338,7 @@
 # rpath makes low sence for Android
 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 "" )
+set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r10c -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 )
@@ -344,13 +353,18 @@
 endif()

 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_x86_64 "x86_64" )
 set( ANDROID_SUPPORTED_ABIS_mipsel "mips" )
+set( ANDROID_SUPPORTED_ABIS_mips64el "mips64" )

 set( ANDROID_DEFAULT_NDK_API_LEVEL 8 )
 set( ANDROID_DEFAULT_NDK_API_LEVEL_x86 9 )
 set( ANDROID_DEFAULT_NDK_API_LEVEL_mips 9 )
-
+set( ANDROID_DEFAULT_NDK_API_LEVEL_arm64 "L" )
+set( ANDROID_DEFAULT_NDK_API_LEVEL_x86_64 "L" )
+set( ANDROID_DEFAULT_NDK_API_LEVEL_mips64 "L" )

 macro( __LIST_FILTER listvar regex )
  if( ${listvar} )
@@ -653,10 +667,16 @@
    string( REGEX MATCH "[0-9]+[.][0-9]+([.][0-9x]+)?$" __version "${__gcc_toolchain}" )
    if( __machine MATCHES i686 )
     set( __arch "x86" )
+   elseif( __machine MATCHES x86_64 )
+    set( __arch "x86_64" )
    elseif( __machine MATCHES arm )
     set( __arch "arm" )
+   elseif( __machine MATCHES aarch64 )
+    set( __arch "arm64" )
    elseif( __machine MATCHES mipsel )
     set( __arch "mipsel" )
+   elseif( __machine MATCHES mips64el )
+    set( __arch "mips64el" )
    endif()
    list( APPEND __availableToolchainMachines "${__machine}" )
    list( APPEND __availableToolchainArchs "${__arch}" )
@@ -740,6 +760,13 @@
  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_64 true )
+ set( ANDROID_NDK_ABI_NAME "x86_64" )
+ set( ANDROID_ARCH_NAME "x86_64" )
+ set( ANDROID_ARCH_FULLNAME "x86_64" )
+ set( ANDROID_LLVM_TRIPLE "x86_64-none-linux-android" )
+ set( CMAKE_SYSTEM_PROCESSOR "x86_64" )
 elseif( ANDROID_ABI STREQUAL "mips" )
  set( MIPS true )
  set( ANDROID_NDK_ABI_NAME "mips" )
@@ -747,6 +774,13 @@
  set( ANDROID_ARCH_FULLNAME "mipsel" )
  set( ANDROID_LLVM_TRIPLE "mipsel-none-linux-android" )
  set( CMAKE_SYSTEM_PROCESSOR "mips" )
+elseif( ANDROID_ABI STREQUAL "mips64" )
+ set( MIPS64 true )
+ set( ANDROID_NDK_ABI_NAME "mips64" )
+ set( ANDROID_ARCH_NAME "mips64" )
+ set( ANDROID_ARCH_FULLNAME "mips64el" )
+ set( ANDROID_LLVM_TRIPLE "mips64el-none-linux-android" )
+ set( CMAKE_SYSTEM_PROCESSOR "mips64" )
 elseif( ANDROID_ABI STREQUAL "armeabi" )
  set( ARMEABI true )
  set( ANDROID_NDK_ABI_NAME "armeabi" )
@@ -787,8 +821,23 @@
  set( CMAKE_SYSTEM_PROCESSOR "armv7-a" )
  set( VFPV3 true )
  set( NEON true )
+elseif( ANDROID_ABI STREQUAL "arm64-v8a" )
+ set( ARM64_V8A true )
+ set( ANDROID_NDK_ABI_NAME "arm64-v8a" )
+ set( ANDROID_ARCH_NAME "arm64" )
+ set( ANDROID_ARCH_FULLNAME "arm64" )
+ set( ANDROID_LLVM_TRIPLE "armv8-none-linux-androideabi" )
+ set( CMAKE_SYSTEM_PROCESSOR "aarch64" )
+ set( VFPV3 true )
+ set( NEON true )
 else()
  message( SEND_ERROR "Unknown ANDROID_ABI=\"${ANDROID_ABI}\" is specified." )
+endif()
+
+if( X86_64 )
+ set( ANDROID_NDK_OUTPUT_ABI_NAME "x86-64" )
+else()
+ set( ANDROID_NDK_OUTPUT_ABI_NAME ${ANDROID_NDK_ABI_NAME} )
 endif()

 if( CMAKE_BINARY_DIR AND EXISTS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake" )
@@ -854,40 +903,40 @@
 unset( __availableToolchainArchs )
 unset( __availableToolchainCompilerVersions )

-# 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}" )
-# adjust API level
-set( __real_api_level ${ANDROID_DEFAULT_NDK_API_LEVEL_${ANDROID_ARCH_NAME}} )
-foreach( __level ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} )
+if( NOT ANDROID_NATIVE_API_LEVEL STREQUAL "L" )
+ string( REGEX MATCH "[0-9]+" 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 )
-  set( __real_api_level ${__level} )
- endif()
-endforeach()
-if( __real_api_level AND NOT ANDROID_NATIVE_API_LEVEL EQUAL __real_api_level )
+ set( __real_api_level ${__level} )
+ endif()
+ endforeach()
+ if( __real_api_level AND NOT ANDROID_NATIVE_API_LEVEL EQUAL __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()
-unset(__real_api_level)
-# validate
-list( FIND ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_NATIVE_API_LEVEL}" __levelIdx )
-if( __levelIdx EQUAL -1 )
+ endif()
+ unset(__real_api_level)
+ # validate
+ list( FIND ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_NATIVE_API_LEVEL}" __levelIdx )
+ if( __levelIdx EQUAL -1 )
  message( SEND_ERROR "Specified Android native API level 'android-${ANDROID_NATIVE_API_LEVEL}' is not supported by your NDK/toolchain." )
-else()
+ 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 )
-   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 )
+ __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 )
+ 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 )
  endif()
  set( ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" CACHE STRING "Android API level for native code" FORCE )
  if( CMAKE_VERSION VERSION_GREATER "2.8" )
-  list( SORT ANDROID_SUPPORTED_NATIVE_API_LEVELS )
-  set_property( CACHE ANDROID_NATIVE_API_LEVEL PROPERTY STRINGS ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} )
- endif()
-endif()
+ list( SORT ANDROID_SUPPORTED_NATIVE_API_LEVELS )
+ set_property( CACHE ANDROID_NATIVE_API_LEVEL PROPERTY STRINGS ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} )
+ endif()
+  endif()
 unset( __levelIdx )
+endif()

 # remember target ABI
@@ -1208,7 +1257,13 @@
  set( CMAKE_C_COMPILER_ID Clang)
 endif()
 set( CMAKE_C_PLATFORM_ID Linux )
-set( CMAKE_C_SIZEOF_DATA_PTR 4 )
+
+if( ARM64_V8A OR X86_64 OR MIPS64 )
+ 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 +1271,13 @@
  set( CMAKE_CXX_COMPILER_ID Clang)
 endif()
 set( CMAKE_CXX_PLATFORM_ID Linux )
-set( CMAKE_CXX_SIZEOF_DATA_PTR 4 )
+
+if( ARM64_V8A OR X86_64 OR MIPS64 )
+ set( CMAKE_C_SIZEOF_DATA_PTR 8 )
+else()
+ set( CMAKE_C_SIZEOF_DATA_PTR 4 )
+endif()
+
 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 )
@@ -1273,7 +1334,7 @@
    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" )
@@ -1282,7 +1343,7 @@
  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 )
+elseif( MIPS OR MIPS64)
  set( ANDROID_CXX_FLAGS         "${ANDROID_CXX_FLAGS} -fpic -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" )
@@ -1319,6 +1380,8 @@
  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv6 -mfloat-abi=softfp -mfpu=vfp" ) # vfp == vfpv2
 elseif( ARMEABI )
  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv5te -mtune=xscale -msoft-float" )
+elseif( ARM64_V8A )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv8-a" )
 endif()

 if( ANDROID_STL MATCHES "gnustl" AND (EXISTS "${__libstl}" OR EXISTS "${__libsupcxx}") )
@@ -1552,11 +1615,11 @@

 if(NOT _CMAKE_IN_TRY_COMPILE)
  if( EXISTS "${CMAKE_SOURCE_DIR}/jni/CMakeLists.txt" )
-  set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin/${ANDROID_NDK_ABI_NAME}" CACHE PATH "Output directory for applications" )
+   set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin/${ANDROID_NDK_OUTPUT_ABI_NAME}" CACHE PATH "Output directory for applications" )
  else()
   set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin" CACHE PATH "Output directory for applications" )
  endif()
- set( LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME}" CACHE PATH "path for android libs" )
+  set( LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_OUTPUT_ABI_NAME}" CACHE PATH "path for android libs" )
 endif()

 # copy shaed stl library to build directory
@@ -1633,10 +1696,16 @@
   set( ${VAR} "armeabi" )
  elseif( "${TOOLCHAIN_FLAG}" STREQUAL "ARMEABI_V7A" )
   set( ${VAR} "armeabi-v7a" )
+ elseif( "${TOOLCHAIN_FLAG}" STREQUAL "ARM64_V8A" )
+  set( ${VAR} "arm64-v8a" )
  elseif( "${TOOLCHAIN_FLAG}" STREQUAL "X86" )
   set( ${VAR} "x86" )
+ elseif( "${TOOLCHAIN_FLAG}" STREQUAL "X86_64" )
+  set( ${VAR} "x86_64" )
  elseif( "${TOOLCHAIN_FLAG}" STREQUAL "MIPS" )
   set( ${VAR} "mips" )
+ elseif( "${TOOLCHAIN_FLAG}" STREQUAL "MIPS64" )
+  set( ${VAR} "mips64" )
  else()
   set( ${VAR} "unknown" )
  endif()
@@ -1703,7 +1772,7 @@

 # 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_ABI : "armeabi-v7a" (default), "armeabi", "armeabi-v7a with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP", "arm64-v8a", "x86", "x86_64", "mips", "mips64"
 #   ANDROID_NATIVE_API_LEVEL : 3,4,5,8,9,14 (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
@@ -1737,16 +1806,19 @@
 #   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
+#   MIPS64 : TRUE if configured for mips64
 #   MIPS : TRUE if configured for mips
 #   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_NDK_RELEASE : one of r5, r5b, r5c, r6, r6b, r7, r7b, r7c, r8, r8b, r8c, r8d, r8e, r9, r9b, r9c, r9d, r10d; set only for NDK
 #   ANDROID_ARCH_NAME : "arm" or "x86" or "mips" depending on ANDROID_ABI
 #   ANDROID_SYSROOT : path to the compiler sysroot
 #   TOOL_OS_SUFFIX : "" or ".exe" depending on host platform


ENH: Update elastix to revision 5186

ENH: Update elastix to revision 5186

--- SuperBuild/External_Elastix.cmake
+++ SuperBuild/External_Elastix.cmake
@@ -2,7 +2,7 @@

 file( WRITE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt" "${ep_common_cache}" )
 set( ELASTIX_REPOSITORY https://svn.bigr.nl/elastix/trunkpublic/ )
-set( ELASTIX_REVISION 5184 )
+set( ELASTIX_REVISION 5186 )

 ExternalProject_Add( ${proj}
   SVN_REPOSITORY ${ELASTIX_REPOSITORY}


ENH: make it submit to cdash

ENH: make it submit to cdash

--- Utilities/kwsys/CTestConfig.cmake
+++ Utilities/kwsys/CTestConfig.cmake
@@ -1,3 +1,7 @@
-SET (CTEST_PROJECT_NAME "kwsys")
-SET (CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
-SET (CTEST_DART_SERVER_VERSION "2")
+set (CTEST_PROJECT_NAME "kwsys")
+set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
+set (CTEST_DART_SERVER_VERSION "2")
+set(CTEST_DROP_METHOD "http")
+set(CTEST_DROP_SITE "www.cdash.org")
+set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard")
+set(CTEST_DROP_SITE_CDASH TRUE)


Avoid duplicate detection of build byproducts

It seems that CMake is somehow automatically picking up the existence
of lib/libz4.a from the ExternalProject definition (perhaps because
LZ4 is also using cmake?) and explicitly declaring it as a build
byproduct is also creating a rule for building lib/liblz4.a.  The
result is there are two build rules for this particular build output,
which is not allowed according to the ninja generator.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -158,7 +158,7 @@
     BUILD_COMMAND /bin/sh -c "PREFIX=<INSTALL_DIR> MOREFLAGS=-fPIC make"
     INSTALL_COMMAND /bin/sh -c "PREFIX=<INSTALL_DIR> make install"
     LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1 BUILD_IN_SOURCE 1
-    BUILD_BYPRODUCTS ${LZ4_LIBRARIES})
+  )
   set(LZ4_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include)
 endif()
 endif()


Some cosmetic changes to ensure uniformity among all built-ins

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -82,6 +82,7 @@
 if(builtin_freetype)
   set(freetype_version 2.6.1)
   message(STATUS "Building freetype version ${freetype_version} included in ROOT itself")
+  set(FREETYPE_LIBRARY ${CMAKE_BINARY_DIR}/FREETYPE-prefix/src/FREETYPE/objs/.libs/${CMAKE_STATIC_LIBRARY_PREFIX}freetype${CMAKE_STATIC_LIBRARY_SUFFIX})
   if(WIN32)
     if(winrtdebug)
       set(freetypeliba objs/freetype261MT_D.lib)
@@ -99,7 +100,7 @@
                     nmake -nologo -f freetype.mak CFG=${freetypebuild} NMAKECXXFLAGS=-D_CRT_SECURE_NO_DEPRECATE
       INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_if_different ${freetypeliba} ./libs/freetype.lib
       LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1 BUILD_IN_SOURCE 1
-      BUILD_BYPRODUCTS FREETYPE-prefix/src/FREETYPE/objs/.libs/${CMAKE_STATIC_LIBRARY_PREFIX}freetype${CMAKE_STATIC_LIBRARY_SUFFIX})
+      BUILD_BYPRODUCTS ${FREETYPE_LIBRARY})
   else()
     set(_freetype_cflags -O)
     if(ROOT_ARCHITECTURE MATCHES aix)
@@ -114,12 +115,10 @@
                           CC=${CMAKE_C_COMPILER} CFLAGS=${_freetype_cflags}
       INSTALL_COMMAND ""
       LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1 BUILD_IN_SOURCE 1
-      BUILD_BYPRODUCTS FREETYPE-prefix/src/FREETYPE/objs/.libs/${CMAKE_STATIC_LIBRARY_PREFIX}freetype${CMAKE_STATIC_LIBRARY_SUFFIX})
-  endif()
-  ExternalProject_Get_Property(FREETYPE SOURCE_DIR)
-  set(FREETYPE_INCLUDE_DIR ${SOURCE_DIR}/include)
+      BUILD_BYPRODUCTS ${FREETYPE_LIBRARY})
+  endif()
+  set(FREETYPE_INCLUDE_DIR ${CMAKE_BINARY_DIR}/FREETYPE-prefix/src/FREETYPE/include)
   set(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIR})
-  set(FREETYPE_LIBRARY ${SOURCE_DIR}/objs/.libs/${CMAKE_STATIC_LIBRARY_PREFIX}freetype${CMAKE_STATIC_LIBRARY_SUFFIX})
   set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY})
   set(FREETYPE_TARGET FREETYPE)
 endif()
@@ -315,6 +314,7 @@
   endif()
 endif()
 if(builtin_afterimage)
+  set(AFTERIMAGE_LIBRARIES ${CMAKE_BINARY_DIR}/lib/libAfterImage${CMAKE_STATIC_LIBRARY_SUFFIX})
   if(WIN32)
     if(winrtdebug)
       set(astepbld "libAfterImage - Win32 Debug")
@@ -329,7 +329,7 @@
                     CFG=${astepbld} NMAKECXXFLAGS="${CMAKE_CXX_FLAGS} /wd4244"
       INSTALL_COMMAND  ${CMAKE_COMMAND} -E copy_if_different libAfterImage.lib <INSTALL_DIR>/lib/.
       LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1 BUILD_IN_SOURCE 1
-      BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/lib/libAfterImage${CMAKE_STATIC_LIBRARY_SUFFIX})
+      BUILD_BYPRODUCTS ${AFTERIMAGE_LIBRARIES})
   else()
     message(STATUS "Building AfterImage library included in ROOT itself")
     if(JPEG_FOUND)
@@ -368,15 +368,12 @@
                         --with-png ${_pnginclude} ${_tiffinclude}
                         CC=${CMAKE_C_COMPILER} CFLAGS=${_after_cflags}
       LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1 BUILD_IN_SOURCE 1
-      BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/lib/libAfterImage${CMAKE_STATIC_LIBRARY_SUFFIX})
+      BUILD_BYPRODUCTS ${AFTERIMAGE_LIBRARIES})
   endif()
   if(builtin_freetype)
     add_dependencies(AFTERIMAGE FREETYPE)
   endif()
-
-  ExternalProject_Get_Property(AFTERIMAGE INSTALL_DIR)
-  set(AFTERIMAGE_INCLUDE_DIR ${INSTALL_DIR}/include/libAfterImage)
-  set(AFTERIMAGE_LIBRARIES ${INSTALL_DIR}/lib/libAfterImage${CMAKE_STATIC_LIBRARY_SUFFIX})
+  set(AFTERIMAGE_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include/libAfterImage)
   set(AFTERIMAGE_TARGET AFTERIMAGE)
 endif()

@@ -411,7 +408,6 @@
       LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
       BUILD_BYPRODUCTS ${GSL_LIBRARIES}
     )
-    set(GSL_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include)
     set(GSL_TARGET GSL)
     set(mathmore ON CACHE BOOL "" FORCE)
   endif()
@@ -593,6 +589,7 @@
     else()
       set(openssl_config_cmd ./config)
     endif()
+    set(OPENSSL_LIBRARIES ${CMAKE_BINARY_DIR}/OPENSSL-prefix/lib/libssl.a ${CMAKE_BINARY_DIR}/OPENSSL-prefix/lib/libcrypto.a)
     ExternalProject_Add(
       OPENSSL
       URL ${repository_tarfiles}/openssl-${openssl_version}.tar.gz
@@ -601,12 +598,10 @@
       INSTALL_COMMAND make install_sw
       BUILD_IN_SOURCE 1
       LOG_BUILD 1 LOG_CONFIGURE 1 LOG_DOWNLOAD 1 LOG_INSTALL 1
-      BUILD_BYPRODUCTS OPENSSL-prefix/lib/libssl.a OPENSSL-prefix/lib/libcrypto.a
+      BUILD_BYPRODUCTS ${OPENSSL_LIBRARIES}
     )
-    ExternalProject_Get_Property(OPENSSL INSTALL_DIR)
-    set(OPENSSL_INCLUDE_DIR ${INSTALL_DIR}/include)
-    set(OPENSSL_LIBRARIES ${INSTALL_DIR}/lib/libssl.a ${INSTALL_DIR}/lib/libcrypto.a)
-    set(OPENSSL_PREFIX ${INSTALL_DIR})
+    set(OPENSSL_INCLUDE_DIR ${CMAKE_BINARY_DIR}/OPENSSL-prefix/include)
+    set(OPENSSL_PREFIX ${CMAKE_BINARY_DIR}/OPENSSL-prefix)
     set(OPENSSL_TARGET OPENSSL)
     set(ssl ON CACHE BOOL "" FORCE)
   else()
@@ -1084,6 +1079,9 @@
     ROOT_ADD_CXX_FLAG(__cxxflags -Wno-unused-const-variable)
     ROOT_ADD_C_FLAG(__cflags -Wno-format)
     ROOT_ADD_C_FLAG(__cflags -Wno-implicit-function-declaration)
+    foreach(l davix neon boost_static_internal)
+      list(APPEND DAVIX_LIBRARIES ${CMAKE_BINARY_DIR}/DAVIX-prefix/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${l}${CMAKE_STATIC_LIBRARY_SUFFIX})
+    endforeach()
     ExternalProject_Add(
       DAVIX
       # http://grid-deployment.web.cern.ch/grid-deployment/dms/lcgutil/tar/davix/davix-embedded-${DAVIX_VERSION}.tar.gz
@@ -1104,23 +1102,15 @@
                  -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
                  -DLIB_SUFFIX=
       LOG_BUILD 1 LOG_CONFIGURE 1 LOG_DOWNLOAD 1 LOG_INSTALL 1
-      BUILD_BYPRODUCTS DAVIX-prefix/lib/${CMAKE_STATIC_LIBRARY_PREFIX}davix${CMAKE_STATIC_LIBRARY_SUFFIX}
-                       DAVIX-prefix/lib/${CMAKE_STATIC_LIBRARY_PREFIX}neon${CMAKE_STATIC_LIBRARY_SUFFIX}
-                       DAVIX-prefix/lib/${CMAKE_STATIC_LIBRARY_PREFIX}boost_static_internal${CMAKE_STATIC_LIBRARY_SUFFIX}
-                       DAVIX-prefix/include/davix/davix.hpp
+      BUILD_BYPRODUCTS ${DAVIX_LIBRARIES}
     )
-    ExternalProject_Get_Property(DAVIX INSTALL_DIR)
-    set(DAVIX_INCLUDE_DIR ${INSTALL_DIR}/include/davix)
-    set(DAVIX_LIBRARY ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}davix${CMAKE_STATIC_LIBRARY_SUFFIX})
+    set(DAVIX_INCLUDE_DIR ${CMAKE_BINARY_DIR}/DAVIX-prefix/include/davix)
+    set(DAVIX_LIBRARY ${CMAKE_BINARY_DIR}/DAVIX-prefix/lib/${CMAKE_STATIC_LIBRARY_PREFIX}davix${CMAKE_STATIC_LIBRARY_SUFFIX})
     set(DAVIX_INCLUDE_DIRS ${DAVIX_INCLUDE_DIR})
     set(DAVIX_TARGET DAVIX)
-    foreach(l davix neon boost_static_internal)
-      list(APPEND DAVIX_LIBRARIES ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${l}${CMAKE_STATIC_LIBRARY_SUFFIX})
-    endforeach()
     if(builtin_openssl)
       add_dependencies(DAVIX OPENSSL)  # Build first OpenSSL
     endif()
-    set(DAVIX_TARGET DAVIX)
   else()
     message(STATUS "Looking for DAVIX")
     find_package(Davix)
@@ -1219,7 +1209,6 @@
     BUILD_BYPRODUCTS ${TBB_LIBRARIES}
   )
   set(TBB_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/include)
-  set(TBB_LIBRARIES ${CMAKE_BINARY_DIR}/lib/libtbb${CMAKE_SHARED_LIBRARY_SUFFIX})
   install(DIRECTORY ${CMAKE_BINARY_DIR}/lib/ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries FILES_MATCHING PATTERN "libtbb*")
   set(TBB_TARGET TBB)
 endif()


Disable asimage if neither 'cocoa' nor 'x11' are enabled - Fix for ROOT-7030

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -173,6 +173,12 @@
 endif()

 #---Check for all kind of graphics includes needed by libAfterImage--------------------
+if(asimage)
+  if(NOT x11 AND NOT cocoa)
+    message(STATUS "Switching off 'asimage' because neither 'x11' nor 'cocoa' are enabled")
+    set(asimage OFF CACHE BOOL "" FORCE)
+  endif()
+endif()
 if(asimage)
   set(ASEXTRA_LIBRARIES)
   find_Package(GIF)


Fix logging in debug build (#213)

Fix logging in debug build (#213)

Enable debug logs in debug build.
It was set to 'info' which was not more helpful.

--- cmake/Config.cmake
+++ cmake/Config.cmake
@@ -88,7 +88,7 @@
 set(CXX_STANDARD_REQUIRED ON)
 add_definitions(-DTARGET_OS_${TARGET_OS})
 if (CMAKE_BUILD_TYPE STREQUAL "Debug")
-    add_definitions(-DLOG_LEVEL=3)
+  add_definitions(-DLOG_LEVEL=LOG_LEVEL_VERBOSE)
 endif()

 if(MSVC)


Add function that will get the system name in a nice way.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -197,3 +197,55 @@
     )
   endif()
 endfunction()
+
+function(GET_SYSTEM_NAME RETURN_SYSTEM_NAME)
+  if(WIN32)
+    set(SYSTEM_NAME "Windows" )
+  elseif(APPLE)
+    execute_process(COMMAND sw_vers -productName RESULT_VARIABLE COMMAND_RESULT OUTPUT_VARIABLE PRODUCT_NAME )
+    string(STRIP ${PRODUCT_NAME} PRODUCT_NAME )
+    execute_process(COMMAND sw_vers -productVersion RESULT_VARIABLE COMMAND_RESULT OUTPUT_VARIABLE PRODUCT_VERSION )
+    string(STRIP ${PRODUCT_VERSION} PRODUCT_VERSION )
+    string(REPLACE " " "-" SYSTEM_NAME "${PRODUCT_NAME} ${PRODUCT_VERSION}" )
+  elseif(UNIX)
+    find_program(LSB lsb_release DOC "Distribution information tool")
+    mark_as_advanced(LSB)
+    if(LSB)
+      execute_process(COMMAND ${LSB} -i
+        RESULT_VARIABLE RETFLAG
+        OUTPUT_VARIABLE DISTINFO
+        ERROR_VARIABLE ERRDISTINFO
+        OUTPUT_STRIP_TRAILING_WHITESPACE
+      )
+      if (NOT RETFLAG)
+        string(SUBSTRING ${DISTINFO} 16 -1 SYSTEM_NAME)
+      endif()
+    endif()
+    if (NOT SYSTEM_NAME)
+      execute_process(COMMAND cat /etc/issue RESULT_VARIABLE COMMAND_RESULT OUTPUT_VARIABLE COMMAND_OUTPUT ERROR_VARIABLE ERROR_OUTPUT)
+      if (COMMAND_RESULT EQUAL 0)
+        if (NOT COMMAND_OUTPUT MATCHES "^\\\\")
+          string(REGEX MATCH "^[^\\]*" COMMAND_OUTPUT ${COMMAND_OUTPUT} )
+          string(STRIP ${COMMAND_OUTPUT} COMMAND_OUTPUT )
+          string(REPLACE " " "-" SYSTEM_NAME ${COMMAND_OUTPUT} )
+        endif()
+      endif()
+    endif()
+    if(NOT SYSTEM_NAME)
+      execute_process(COMMAND cat /etc/os-release RESULT_VARIABLE COMMAND_RESULT OUTPUT_VARIABLE COMMAND_OUTPUT ERROR_VARIABLE ERROR_OUTPUT)
+      if (COMMAND_RESULT EQUAL 0)
+        string(REGEX MATCH "^NAME=\\\"([^\\\"]*)" NAME_OUTPUT ${COMMAND_OUTPUT})
+        string(REPLACE " " "-" SYSTEM_NAME ${CMAKE_MATCH_1})
+      endif()
+    endif()
+    if (NOT SYSTEM_NAME)
+      set(SYSTEM_NAME Unix-Based)
+    endif()
+  else()
+      message( FATAL_ERROR "Don't yet know this system." )
+  endif()
+
+  string(REPLACE "\n" "_" SYSTEM_NAME ${SYSTEM_NAME})
+
+  set(${RETURN_SYSTEM_NAME} ${SYSTEM_NAME} PARENT_SCOPE)
+endfunction()


disable posix deprecated error

disable posix deprecated error

--- cmake/shared.cmake
+++ cmake/shared.cmake
@@ -63,18 +63,16 @@

 if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")

-	set(CMAKE_CXX_STANDARD 14)
-    set(CMAKE_CXX_STANDARD_REQUIRED on)
-    set(CMAKE_CXX_EXTENSIONS ON)
+

     if(MSVC)
         message("Using clang-cl")
         set(CLANG_CL 1)

 		if(CMAKE_GENERATOR MATCHES "Visual Studio")
-			set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++14 /GX")
+			set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++14 /GX /wd4996")
 		else()
-			set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xclang -std=c++14 -Xclang -Wno-missing-braces -Xclang -Wmissing-field-initializers")#	-Xclang -fsanitize=alignment")
+			set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xclang -std=c++14 -Xclang -Wno-missing-braces -Xclang -Wmissing-field-initializers -Xclang -Wno-deprecated-declarations")#	-Xclang -fsanitize=alignment")
 		endif()

         if(BUILD_SANITIZE_MEMORY)
@@ -83,6 +81,10 @@
         add_definitions(-DNOMINMAX -D_USE_MATH_DEFINES)
     else()
         message("Using clang")
+
+		set(CMAKE_CXX_STANDARD 14)
+		set(CMAKE_CXX_STANDARD_REQUIRED on)
+		set(CMAKE_CXX_EXTENSIONS OFF)

         if(BUILD_SANITIZE_MEMORY)
             set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=alignment")


set env for tests

set env for tests

git-svn-id: de9bbed4c30e0eb58fe8e7d66f5c80b71699a07c@3532 bf01a9d7-0df3-0310-8ad4-b1c94d9ae2d5

--- Numerics/cmake/CMakeListsForTests.cmake
+++ Numerics/cmake/CMakeListsForTests.cmake
@@ -27,7 +27,7 @@

 # For some environment variables (LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, Path)
 GET_FILENAME_COMPONENT(SiconosNumerics_PATH "${SiconosNumerics_FOUND}" PATH)
-#SET(SiconosNumerics_PATH "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
+set(LIBFORTests ${SiconosNumerics_PATH}:${CMAKE_BINARY_DIR}/src/plugin/test)

 FOREACH(_EXE ${_EXE_LIST_${_CURRENT_TEST_DIRECTORY}})
   MESSAGE(STATUS "Adding test suite ${_CURRENT_TEST_DIRECTORY}/${_EXE}")
@@ -122,11 +122,11 @@
     FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/SiconosTestConfig.cmake "  ADD_TEST(\${ARGV})\n")
     FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/SiconosTestConfig.cmake "  SET(_EXE \${ARGV0})\n")
     IF(APPLE)
-      FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/SiconosTestConfig.cmake "  SET_TESTS_PROPERTIES(\${_EXE} PROPERTIES ENVIRONMENT \"DYLD_LIBRARY_PATH=$ENV{DYLD_LIBRARY_PATH}:@LD_LIBRARY_PATH@:@SICONOS_LIB_PATH@\")\n")
+      FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/SiconosTestConfig.cmake "  SET_TESTS_PROPERTIES(\${_EXE} PROPERTIES ENVIRONMENT \"DYLD_LIBRARY_PATH=$ENV{DYLD_LIBRARY_PATH}:${LIBFORTests}\")\n")
     ELSEIF(CROSSCOMPILING_LINUX_TO_WINDOWS OR WINDOWS)
-      FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/SiconosTestConfig.cmake "  SET_TESTS_PROPERTIES(\${_EXE} PROPERTIES ENVIRONMENT \"Path=@PATH_FOR_PLUGIN@\;@CMAKE_BINARY_DIR@/src\;@SICONOS_LIB_PATH@\")\n")
+      FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/SiconosTestConfig.cmake "  SET_TESTS_PROPERTIES(\${_EXE} PROPERTIES ENVIRONMENT \"Path=@PATH_FOR_PLUGIN@\;@CMAKE_BINARY_DIR@/src\;\")\n")
     ELSE() # unix
-      FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/SiconosTestConfig.cmake "  SET_TESTS_PROPERTIES(\${_EXE} PROPERTIES ENVIRONMENT \"LD_LIBRARY_PATH=@LD_LIBRARY_PATH@:@SICONOS_LIB_PATH@\")\n")
+      FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/SiconosTestConfig.cmake "  SET_TESTS_PROPERTIES(\${_EXE} PROPERTIES ENVIRONMENT \"LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${LIBFORTests}\")\n")
     ENDIF()

     FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/SiconosTestConfig.cmake "ENDMACRO(ADD_CPPUNIT_TEST)\n")
@@ -152,12 +152,12 @@

     SET_TESTS_PROPERTIES(${_EXE} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILURE;Exception;failed;ERROR;test unsucceeded")

-    set_tests_properties(${_EXE} PROPERTIES ENVIRONMENT LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:@SICONOS_LIB_PATH@)
+    set_tests_properties(${_EXE} PROPERTIES ENVIRONMENT LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${LIBFORTests})
     if(CROSSCOMPILING_LINUX_TO_WINDOWS)
       set_tests_properties(${_EXE} PROPERTIES ENVIRONMENT "Path=@CMAKE_BINARY_DIR@/src;@SICONOS_LIB_PATH@")
     endif()
     if(APPLE)
-      set_tests_properties(${_EXE} PROPERTIES ENVIRONMENT DYLD_LIBRARY_PATH=$ENV{DYLD_LIBRARY_PATH}:@SICONOS_LIB_PATH@)
+      set_tests_properties(${_EXE} PROPERTIES ENVIRONMENT DYLD_LIBRARY_PATH=$ENV{DYLD_LIBRARY_PATH}:${LIBFORTests})
     endif()

     IF(${_EXE}_PROPERTIES)


[CMake][Exp PyROOT] Add useful config-time message regarding versions of Python used to build

--- cmake/modules/SearchRootCoreDeps.cmake
+++ cmake/modules/SearchRootCoreDeps.cmake
@@ -73,6 +73,15 @@
     message(FATAL_ERROR "No Python 2 or 3 were found")
   endif()

+  # Print message saying with which versions of Python are used to build
+  if(pyroot_experimental)
+    if(NOT Python3_Development_FOUND OR NOT Python2_Development_FOUND)
+      message(STATUS "Main Python used to build: ${PYTHON_VERSION_MAJOR}; PyROOT built for version ${PYTHON_VERSION_MAJOR} ")
+    elseif(Python3_Development_FOUND AND Python2_Development_FOUND)
+      message(STATUS "Main Python used to build: ${PYTHON_VERSION_MAJOR}; PyROOT built for versions ${PYTHON_VERSION_MAJOR} and ${OTHER_PYTHON_VERSION_MAJOR}")
+    endif()
+  endif()
+
 else()

   find_package(PythonInterp ${python_version} REQUIRED)


update(build): allow using local libs source dir

Signed-off-by: Jason Dellaluce <20c6928ffe03623fc951bdff750fdd62eb23ea4d@gmail.com>
Co-authored-by: Federico Di Pierro <6c3e26470d5343bb7a522873746c21bb7fcc0d20@gmail.com>
Co-authored-by: Leonardo Grasso <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@leonardograsso.com>

--- cmake/modules/falcosecurity-libs.cmake
+++ cmake/modules/falcosecurity-libs.cmake
@@ -16,25 +16,30 @@

 file(MAKE_DIRECTORY ${FALCOSECURITY_LIBS_CMAKE_WORKING_DIR})

-# The falcosecurity/libs git reference (branch name, commit hash, or tag) To update falcosecurity/libs version for the next release, change the
-# default below In case you want to test against another falcosecurity/libs version just pass the variable - ie., `cmake
-# -DFALCOSECURITY_LIBS_VERSION=dev ..`
-if(NOT FALCOSECURITY_LIBS_VERSION)
-  set(FALCOSECURITY_LIBS_VERSION "a743aa4ab28e4bd82c73f74be4f866911a4be0fa")
-  set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=d7d5ddffa985fb2314ac2a0841bb51c7c7cc9f3c56ef7b89adf22278d73fa810")
+if(FALCOSECURITY_LIBS_SOURCE_DIR)
+  set(FALCOSECURITY_LIBS_VERSION "local")
+  message(STATUS "Using local falcosecurity/libs in '${FALCOSECURITY_LIBS_SOURCE_DIR}'")
+else()
+  # The falcosecurity/libs git reference (branch name, commit hash, or tag) To update falcosecurity/libs version for the next release, change the
+  # default below In case you want to test against another falcosecurity/libs version just pass the variable - ie., `cmake
+  # -DFALCOSECURITY_LIBS_VERSION=dev ..`
+  if(NOT FALCOSECURITY_LIBS_VERSION)
+    set(FALCOSECURITY_LIBS_VERSION "a743aa4ab28e4bd82c73f74be4f866911a4be0fa")
+    set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=d7d5ddffa985fb2314ac2a0841bb51c7c7cc9f3c56ef7b89adf22278d73fa810")
+  endif()
+
+  # cd /path/to/build && cmake /path/to/source
+  execute_process(COMMAND "${CMAKE_COMMAND}" -DFALCOSECURITY_LIBS_VERSION=${FALCOSECURITY_LIBS_VERSION} -DFALCOSECURITY_LIBS_CHECKSUM=${FALCOSECURITY_LIBS_CHECKSUM}
+                          ${FALCOSECURITY_LIBS_CMAKE_SOURCE_DIR} WORKING_DIRECTORY ${FALCOSECURITY_LIBS_CMAKE_WORKING_DIR})
+
+  # todo(leodido, fntlnz) > use the following one when CMake version will be >= 3.13
+
+  # execute_process(COMMAND "${CMAKE_COMMAND}" -B ${FALCOSECURITY_LIBS_CMAKE_WORKING_DIR} WORKING_DIRECTORY
+  # "${FALCOSECURITY_LIBS_CMAKE_SOURCE_DIR}")
+
+  execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${FALCOSECURITY_LIBS_CMAKE_WORKING_DIR}")
+  set(FALCOSECURITY_LIBS_SOURCE_DIR "${FALCOSECURITY_LIBS_CMAKE_WORKING_DIR}/falcosecurity-libs-prefix/src/falcosecurity-libs")
 endif()
-
-# cd /path/to/build && cmake /path/to/source
-execute_process(COMMAND "${CMAKE_COMMAND}" -DFALCOSECURITY_LIBS_VERSION=${FALCOSECURITY_LIBS_VERSION} -DFALCOSECURITY_LIBS_CHECKSUM=${FALCOSECURITY_LIBS_CHECKSUM}
-                        ${FALCOSECURITY_LIBS_CMAKE_SOURCE_DIR} WORKING_DIRECTORY ${FALCOSECURITY_LIBS_CMAKE_WORKING_DIR})
-
-# todo(leodido, fntlnz) > use the following one when CMake version will be >= 3.13
-
-# execute_process(COMMAND "${CMAKE_COMMAND}" -B ${FALCOSECURITY_LIBS_CMAKE_WORKING_DIR} WORKING_DIRECTORY
-# "${FALCOSECURITY_LIBS_CMAKE_SOURCE_DIR}")
-
-execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${FALCOSECURITY_LIBS_CMAKE_WORKING_DIR}")
-set(FALCOSECURITY_LIBS_SOURCE_DIR "${FALCOSECURITY_LIBS_CMAKE_WORKING_DIR}/falcosecurity-libs-prefix/src/falcosecurity-libs")

 add_definitions(-D_GNU_SOURCE)
 add_definitions(-DHAS_CAPTURE)


Switch back to staging repo for CDash

Switch back to staging repo for CDash

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -13,5 +13,5 @@

 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "my.cdash.org")
-set(CTEST_DROP_LOCATION "/submit.php?project=netcdf-c")
+set(CTEST_DROP_LOCATION "/submit.php?project=netcdf-stagic")
 set(CTEST_DROP_SITE_CDASH TRUE)


Add support to switch between library extensions on Windows

--- cmake/Modules/FindHoudiniEngine.cmake
+++ cmake/Modules/FindHoudiniEngine.cmake
@@ -78,10 +78,12 @@
     )
 list( APPEND _houdiniengine_required_vars HoudiniEngine_INCLUDE_DIRS )

-# Houdini libraries on Windows are lib<name>.a
+# Houdini libraries on Windows are lib<name>.a or lib<name>.lib
 if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" )
     set(CMAKE_FIND_LIBRARY_PREFIXES "lib")
-    set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+    if ( DEFINED HoudiniEngine_OLD_LIBRARY_EXTENSION )
+        set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+    endif ()
 endif ()
 find_library(
     HoudiniEngine_${_houdiniengine_lib}


Revert "Enable -Wdeprecated in the cmake build now that LLVM (& Clang, Polly, and LLD) are -Wdeprecated clean"

This reverts commit r248963.

Seems there's some standard libraries (and libcxxabi implementations)
that aren't -Wdeprecated clean... hrm.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -364,7 +364,7 @@

 elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
   if (LLVM_ENABLE_WARNINGS)
-    append("-Wall -W -Wno-unused-parameter -Wwrite-strings -Wdeprecated" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+    append("-Wall -W -Wno-unused-parameter -Wwrite-strings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
     append("-Wcast-qual" CMAKE_CXX_FLAGS)

     # Turn off missing field initializer warnings for gcc to avoid noise from


Qt4Macros.cmake: fix trailing whitespace

Change-Id: I92dfca177386db8e627a9f5af4496f919cc75def
Reviewed-on: http://gerrit.aldebaran.lan/66997
Tested-by: gerrit
Reviewed-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>

--- cmake/qibuild/modules/Qt4Macros.cmake
+++ cmake/qibuild/modules/Qt4Macros.cmake
@@ -29,13 +29,13 @@
     IF ("${_currentArg}" STREQUAL "OPTIONS")
       SET(_QT4_DOING_OPTIONS TRUE)
     ELSE ("${_currentArg}" STREQUAL "OPTIONS")
-      IF(_QT4_DOING_OPTIONS)
+      IF(_QT4_DOING_OPTIONS)
         LIST(APPEND ${_qt4_options} "${_currentArg}")
       ELSE(_QT4_DOING_OPTIONS)
         LIST(APPEND ${_qt4_files} "${_currentArg}")
       ENDIF(_QT4_DOING_OPTIONS)
     ENDIF ("${_currentArg}" STREQUAL "OPTIONS")
-  ENDFOREACH(_currentArg)
+  ENDFOREACH(_currentArg)
 ENDMACRO (QT4_EXTRACT_OPTIONS)

@@ -54,9 +54,9 @@
   ELSE(_infileLength GREATER _binlength)
     FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
   ENDIF(_infileLength GREATER _binlength)
-  IF(WIN32 AND rel MATCHES "^[a-zA-Z]:") # absolute path
+  IF(WIN32 AND rel MATCHES "^[a-zA-Z]:") # absolute path
     STRING(REGEX REPLACE "^([a-zA-Z]):(.*)$" "\\1_\\2" rel "${rel}")
-  ENDIF(WIN32 AND rel MATCHES "^[a-zA-Z]:")
+  ENDIF(WIN32 AND rel MATCHES "^[a-zA-Z]:")
   SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
   STRING(REPLACE ".." "__" _outfile ${_outfile})
   GET_FILENAME_COMPONENT(outpath ${_outfile} PATH)
@@ -182,7 +182,7 @@
     GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
     GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
     SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
-    #  parse file for dependencies
+    #  parse file for dependencies
     #  all files are absolute paths or relative to the location of the qrc file
     FILE(READ "${infile}" _RC_FILE_CONTENTS)
     STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")


[t:4814] never ever pass -DNDEBUG

[t:4814] never ever pass -DNDEBUG

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@43406 c7de825b-a66e-492c-adef-691d508d4ae1

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -79,8 +79,8 @@
 set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g3 -ggdb -O0")
 set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG FORTIFY_SOURCE=2)

-## set extra release flags
-set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3")
+## set extra release flags, we overwrite this because the default passes -DNDEBUG and we don't want that
+set(CMAKE_C_FLAGS_RELEASE "-O3")

 ## check how to do inter-procedural optimization
 check_c_compiler_flag(-flto HAVE_CC_FLAG_FLTO)


pkgconfig will work much better if we don't use AKONADI_VERSION_STRING

svn path=/trunk/kdesupport/akonadi/; revision=1002569

--- akonadi.pc.cmake
+++ akonadi.pc.cmake
@@ -5,7 +5,7 @@

 Name: Akonadi
 Description: Akonadi server and infrastructure needed to build client libraries and applications
-Version: @AKONADI_VERSION_STRING@
+Version: @AKONADI_VERSION@
 Requires: QtCore QtSql QtDBus
 Libs: -L${libdir} -lakonadiprotocolinternals
 Cflags: -I${includedir}


add missing flags and update docs

add missing flags and update docs

--- contrib/cmake/build_from_scratch.cmake
+++ contrib/cmake/build_from_scratch.cmake
@@ -1,7 +1,7 @@
 #[[
     Run this file from its current folder in script mode, with triplet as a defined parameter:

-        cmake -DTRIPLET=<triplet> [-DEXTRA_ARGS=<>] [-DTARGET=<target>[;<targets>...] ] -P build_from_scratch.cmake
+        cmake -DTRIPLET=<triplet> [-DPLATFORM=<platform>] [-DEXTRA_ARGS=<-DVAR=VALUE>[;<-DVAR=VALUE...>] ] [-DTARGET=<target>[;<targets>...] ] -P build_from_scratch.cmake

 	eg, for getting started on windows:

@@ -10,6 +10,11 @@
     It will set up and build 3rdparty dependencies in a folder next to the SDK folder, and also
     set up the project (Visual Studio on Windows) and bulid it in an SDK subfolder "build-<triplet>"

+    The parameter PLATFORM is optional. If specified, its argument will be used to set the target platform
+    for a cross-compile build. Valid platforms are given in the platform enumerator
+    in build3rdparty/build3rdparty.cpp. Passing a PLATFORM arg that disagrees with that in the TRIPLET is
+    undefined behavior. If PLATFORM is not specified, a build for the host platform is assumed.
+
     The parameters EXTRA_ARGS and TARGET are both optional parameters. You may pass a single argument
     in the normal way, but lists of arguments must be semicolon-delimited to conform with CMake's list syntax.
     Please note in the examples below the use of quotes when a list is passed: this is needed to prevent your
@@ -53,10 +58,9 @@
 endif()

 if(NOT EXTRA_ARGS)
-	message(STATUS "No extra args")
+    set(_extra_cmake_args "")
 else()
     set(_extra_cmake_args ${EXTRA_ARGS})
-	message(STATUS "Applying extra args: ${EXTRA_ARGS}")
 endif()

 set(_triplet ${TRIPLET})
@@ -113,8 +117,11 @@
     --ports "${_script_cwd}/preferred-ports-sdk.txt"
     --triplet ${_triplet}
     --sdkroot ${_sdk_dir}
-    --platform ios
-)
+)
+
+if(PLATFORM)
+    list(APPEND _3rdparty_tool_common_args --platform ${PLATFORM})
+endif()

 execute_checked_command(
     COMMAND ${_3rdparty_tool_exe}
@@ -210,7 +217,7 @@
     endforeach()
 else()
     if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "iOS")
-        set(_extra_cmake_args -DHAVE_FFMPEG=0)
+        LIST(APPEND _extra_cmake_args -DHAVE_FFMPEG=0 -DENABLE_SYNC=0)
         include(${_3rdparty_vcpkg_dir}/scripts/toolchains/ios.cmake)
         if(NOT CMAKE_OSX_SYSROOT)
             # Probably should figure out why vcpkg doesn't set this var for arm64 ios,


Cosmetics

Cosmetics

--- GitExternal.cmake
+++ GitExternal.cmake
@@ -13,7 +13,7 @@
 # [optional] Flags which control behaviour
 #  NO_UPDATE
 #    When set, GitExternal will not change a repo that has already
-#    been checked out.  The purpose of this is to allow one to set a
+#    been checked out. The purpose of this is to allow one to set a
 #    default branch to be checked out, but stop GitExternal from
 #    changing back to that branch if the user has checked out and is
 #    working on another.


VC MDD: add CMAKE_GDBSERVER variable

VC MDD: add CMAKE_GDBSERVER variable

[skip ci]

--- os/vc-mdd-android.cmake
+++ os/vc-mdd-android.cmake
@@ -151,6 +151,17 @@
     INTERNAL
     "Path to ant"
 )
+
+set(
+    CMAKE_GDBSERVER
+    "${ANDROID_NDK}/prebuilt/android-${ANDROID_ARCH_NAME}/gdbserver/gdbserver"
+    CACHE
+    INTERNAL
+    "Path to 'gdbserver'"
+)
+if(NOT EXISTS "${CMAKE_GDBSERVER}")
+  polly_fatal_error("File not found: ${CMAKE_GDBSERVER}")
+endif()

 set(ANDROID_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}")


Android MDD: support for AndroidApk.cmake

--- os/vc-mdd-android.cmake
+++ os/vc-mdd-android.cmake
@@ -7,15 +7,15 @@
   set(POLLY_OS_VC_MDD_ANDROID_CMAKE_ 1)
 endif()

+cmake_minimum_required(VERSION 3.4)
+
 include(polly_fatal_error)

-string(COMPARE EQUAL "${ANDROID_NDK_VERSION}" "r10e" _is_good)
-if(NOT _is_good)
-  polly_fatal_error("Only r10e supported")
-endif()
-
-string(COMPARE EQUAL "${ANDROID_NATIVE_API_LEVEL}" "" _is_empty)
-if(_is_empty)
+if("${ANDROID_NDK_VERSION}" STREQUAL "")
+  polly_fatal_error("ANDROID_NDK_VERSION not set")
+endif()
+
+if("${ANDROID_NATIVE_API_LEVEL}" STREQUAL "")
   polly_fatal_error("ANDROID_NATIVE_API_LEVEL not set")
 endif()

@@ -27,23 +27,9 @@
     "Android API"
 )

-string(COMPARE EQUAL "${ANDROID_ABI}" "" _is_empty)
-if(NOT _is_empty)
-  polly_fatal_error("ANDROID_ABI should be empty")
-endif()
-
-string(COMPARE EQUAL "${ANDROID_TOOLCHAIN_NAME}" "" _is_empty)
-if(_is_empty)
-  polly_fatal_error("ANDROID_TOOLCHAIN_NAME not set")
-endif()
-
-set(
-    CMAKE_VC_MDD_ANDROID_PLATFORM_TOOLSET
-    "${ANDROID_TOOLCHAIN_NAME}"
-    CACHE
-    INTERNAL
-    "Android toolset"
-)
+if("${ANDROID_ABI}" STREQUAL "")
+  polly_fatal_error("ANDROID_ABI not set")
+endif()

 set(
     CMAKE_VC_MDD_ANDROID_USE_OF_STL
@@ -70,3 +56,149 @@
       "See http://cgold.readthedocs.io/en/latest/platforms/android/windows.html#experimental-cmake for fix."
   )
 endif()
+
+set(ANDROID "TRUE" CACHE STRING "Is platform Android?")
+
+get_filename_component(
+    ANDROID_NDK
+    "[HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\VisualStudio\\14.0_Config\\Setup\\vs\\SecondaryInstaller\\AndroidNDK64;NDK_HOME]"
+    ABSOLUTE
+    CACHE
+)
+
+if(EXISTS "${ANDROID_NDK}")
+  polly_status_debug("Android NDK: ${ANDROID_NDK}")
+else()
+  polly_fatal_error("Directory not found: ${ANDROID_NDK}")
+endif()
+
+get_filename_component(_android_dirname "${ANDROID_NDK}" NAME)
+if(NOT "${_android_dirname}" STREQUAL "android-ndk-${ANDROID_NDK_VERSION}")
+  polly_fatal_error(
+      "Inconsistent ANDROID_NDK_VERSION/ANDROID_NDK:"
+      "  ${ANDROID_NDK_VERSION}/${ANDROID_NDK}"
+  )
+endif()
+
+get_filename_component(
+    ANDROID_ANT_HOME
+    "[HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\VisualStudio\\14.0_Config\\Setup\\vs\\SecondaryInstaller\\Ant;ANT_HOME]"
+    ABSOLUTE
+    CACHE
+)
+
+if(EXISTS "${ANDROID_ANT_HOME}")
+  polly_status_debug("Ant HOME: ${ANDROID_ANT_HOME}")
+else()
+  polly_fatal_error("Directory not found: ${ANDROID_ANT_HOME}")
+endif()
+
+if("${ANDROID_ABI}" STREQUAL "armeabi")
+  set(ANDROID_ARCH_NAME "arm")
+elseif("${ANDROID_ABI}" STREQUAL "mips")
+  set(ANDROID_ARCH_NAME "mips")
+elseif("${ANDROID_ABI}" STREQUAL "x86")
+  set(ANDROID_ARCH_NAME "x86")
+else()
+  polly_fatal_error("Unexpected ANDROID_ABI: ${ANDROID_ABI}")
+endif()
+
+if("${ANDROID_ARCH_NAME}" STREQUAL "x86")
+  set(ANDROID_TOOLCHAIN_NAME "x86-4.9")
+  set(ANDROID_TOOLCHAIN_MACHINE_NAME "i686-linux-android")
+elseif("${ANDROID_ARCH_NAME}" STREQUAL "arm")
+  set(ANDROID_TOOLCHAIN_NAME "arm-linux-androideabi-4.9")
+  set(ANDROID_TOOLCHAIN_MACHINE_NAME "arm-linux-androideabi")
+else()
+  polly_fatal_error("Unexpected ANDROID_ARCH_NAME: ${ANDROID_ARCH_NAME}")
+endif()
+
+set(ANDROID_TOOLCHAIN_ROOT "${ANDROID_NDK}/toolchains/${ANDROID_TOOLCHAIN_NAME}/prebuilt/windows-x86_64")
+if(NOT EXISTS "${ANDROID_TOOLCHAIN_ROOT}")
+  polly_fatal_error("Directory not found: ${ANDROID_TOOLCHAIN_ROOT}")
+endif()
+
+set(
+    ANDROID_SYSROOT
+    "${ANDROID_NDK}/platforms/android-${ANDROID_NATIVE_API_LEVEL}/arch-${ANDROID_ARCH_NAME}"
+    CACHE
+    INTERNAL
+    "Android system root"
+)
+
+if(NOT EXISTS "${ANDROID_SYSROOT}")
+  polly_fatal_error("Directory not found: ${ANDROID_SYSROOT}")
+endif()
+
+set(_dir1 "${ANDROID_TOOLCHAIN_ROOT}/bin")
+if(NOT EXISTS "${_dir1}")
+  polly_fatal_error("Directory not found: ${_dir1}")
+endif()
+
+set(_dir2 "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}")
+if(NOT EXISTS "${_dir2}")
+  polly_fatal_error("Directory not found: ${_dir2}")
+endif()
+
+set(CMAKE_FIND_ROOT_PATH "${_dir1}" "${_dir2}" "${ANDROID_SYSROOT}")
+
+# Support AndroidApk.cmake (https://github.com/hunter-packages/android-apk) {
+
+set(
+    ANDROID_ANT_COMMAND
+    "${ANDROID_ANT_HOME}/bin/ant.bat"
+    CACHE
+    INTERNAL
+    "Path to ant"
+)
+
+set(ANDROID_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}")
+
+# only search for libraries and includes in the ndk toolchain
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+
+# macro to find packages on the host OS
+macro(find_host_package)
+ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
+ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
+ if(CMAKE_HOST_WIN32)
+  set(WIN32 1)
+  set(UNIX)
+ elseif(CMAKE_HOST_APPLE)
+  set(APPLE 1)
+  set(UNIX)
+ endif()
+ find_package(${ARGN})
+ set(WIN32)
+ set(APPLE)
+ set(UNIX 1)
+ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
+ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+endmacro()
+
+# macro to find programs on the host OS
+macro(find_host_program)
+ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
+ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
+ if(CMAKE_HOST_WIN32)
+  set(WIN32 1)
+  set(UNIX)
+ elseif(CMAKE_HOST_APPLE)
+  set(APPLE 1)
+  set(UNIX)
+ endif()
+ find_program(${ARGN})
+ set(WIN32)
+ set(APPLE)
+ set(UNIX 1)
+ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
+ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+endmacro()
+
+# }


fixed link dir

fixed link dir

--- common.cmake
+++ common.cmake
@@ -33,3 +33,4 @@

 include(${LIBNREC}/boost_util.cmake)
+link_directories(${LIBNREC}/lib)


Use proper find_program command.

Use proper find_program command.

--- CMake/MITKDashboardSetup.cmake
+++ CMake/MITKDashboardSetup.cmake
@@ -33,15 +33,8 @@

 if(MITK_USE_QT)
   if(NOT QT_QMAKE_EXECUTABLE)
-    if(QT_BINARY_DIR)
-      if(EXISTS "${QT_BINARY_DIR}/qmake")
-        set(QT_QMAKE_EXECUTABLE "${QT_BINARY_DIR}/qmake")
-      elseif(EXISTS "${QT_BINARY_DIR}/qmake-qt4")
-        set(QT_QMAKE_EXECUTABLE "${QT_BINARY_DIR}/qmake-qt4")
-      endif()
-    else()
-      set(QT_QMAKE_EXECUTABLE "qmake")
-    endif()
+    find_program(QT_QMAKE_EXECUTABLE NAMES qmake qmake-qt4
+                 HINTS ${QT_BINARY_DIR})
   endif()

   execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} --version


Removed unneeded CMake variables.

Removed unneeded CMake variables.

--- CMake/mitkSetupBlueBerry.cmake
+++ CMake/mitkSetupBlueBerry.cmake
@@ -7,8 +7,6 @@
 # Clear the cache variables containing plugin base directories
 set(MITK_MODULES_PLUGIN_SOURCE_DIRS "" CACHE INTERNAL "List of base plugin source directories" FORCE)
 set(MITK_MODULES_PLUGIN_OUTPUT_DIRS "" CACHE INTERNAL "List of base plugin output directories" FORCE)
-set(MITK_CORE_PLUGIN_OUTPUT_DIRS "" CACHE INTERNAL "List of base plugin output directories" FORCE)
-set(MITK_CORE_PLUGIN_SOURCE_DIRS "" CACHE INTERNAL "List of base plugin source directories" FORCE)

 set(mbilog_DIR "${mbilog_BINARY_DIR}")


Updated version number to 2012.06.99

Updated version number to 2012.06.99

--- CMake/mitkSetupVariables.cmake
+++ CMake/mitkSetupVariables.cmake
@@ -7,7 +7,7 @@
 # MITK_VERSION
 set(MITK_VERSION_MAJOR "2012")
 set(MITK_VERSION_MINOR "06")
-set(MITK_VERSION_PATCH "00")
+set(MITK_VERSION_PATCH "99")
 set(MITK_VERSION_STRING "${MITK_VERSION_MAJOR}.${MITK_VERSION_MINOR}.${MITK_VERSION_PATCH}")
 if(MITK_VERSION_PATCH STREQUAL "99")
   set(MITK_VERSION_STRING "${MITK_VERSION_STRING}-${MITK_REVISION_SHORTID}")


finish migration to new build macros -- check before linking debug libs

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

--- CMakeModules/ModuleSetup.cmake
+++ CMakeModules/ModuleSetup.cmake
@@ -207,8 +207,10 @@
     # FindPythonLibs.cmake
     if (PYTHONLIBS_FOUND)
         set (PYTHON_LIBRARIES ${PYTHON_LIBRARY})
-        set (PYTHON_DEBUG_LIBRARIES ${PYTHON_DEBUG_LIBRARY})
         set (PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH})
+        if (PYTHON_DEBUG_LIBRARY)
+            set (PYTHON_DEBUG_LIBRARIES ${PYTHON_DEBUG_LIBRARY})
+        endif ()
     endif ()

 endmacro (configure_python)


Formatting.

Formatting.

--- cmake/ClangFormat.cmake
+++ cmake/ClangFormat.cmake
@@ -2,7 +2,6 @@
 find_program(CLANG_FORMAT clang-format DOC "Clang Format executable")

 if( CLANG_FORMAT )
-
     file(GLOB_RECURSE FORMAT_SRC_FILES
             "${PROJECT_SOURCE_DIR}/include/**.h"
             "${PROJECT_SOURCE_DIR}/src/**.h"


Support LLVM 7.x

Support LLVM 7.x

--- cmake/ClangFormat.cmake
+++ cmake/ClangFormat.cmake
@@ -23,7 +23,7 @@
     string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" CLANG_FORMAT_VERSION ${CLANG_FORMAT_VERSION})
   endif()

-  set(CLANG_FORMAT_VERSION_PATTERN "6.[0-9]+.[0-9]+")
+  set(CLANG_FORMAT_VERSION_PATTERN "[67].[0-9]+.[0-9]+")

   if(CLANG_FORMAT AND CLANG_FORMAT_VERSION MATCHES ${CLANG_FORMAT_VERSION_PATTERN})
     add_custom_target("${TARGET}_clangformat"


Add homebrew Qt5 path for macOS

Add homebrew Qt5 path for macOS

--- cmake/FindEasyQt5.cmake
+++ cmake/FindEasyQt5.cmake
@@ -50,7 +50,8 @@
         find_package(Qt5 REQUIRED
             COMPONENTS Widgets Network PrintSupport
             HINTS "${CMAKE_SOURCE_DIR}/lib/qt5/${HOST}"
-                  "${CMAKE_SOURCE_DIR}/qt5/${HOST}")
+                  "${CMAKE_SOURCE_DIR}/qt5/${HOST}"
+		  "/usr/local/opt/qt5")
     endif()
 endif()


Fix FindOpenEXR cmake script. Fixes issue 97.

--- cmake/FindOpenEXR.cmake
+++ cmake/FindOpenEXR.cmake
@@ -53,11 +53,7 @@
 IF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY)
 	SET(OPENEXR_FOUND TRUE)
 	SET(OPENEXR_INCLUDE_PATHS ${OPENEXR_INCLUDE_PATH} CACHE STRING "The include paths needed to use OpenEXR")
-	SET(OPENEXR_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${ZLIB_LIBRARY} CACHE STRING "The libraries needed to use OpenEXR")
-
-	IF(OPENEXR_ILMTHREAD_LIBRARY)
-		SET(OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES} ${OPENEXR_ILMTHREAD_LIBRARY})
-	ENDIF(OPENEXR_ILMTHREAD_LIBRARY)
+	SET(OPENEXR_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ZLIB_LIBRARY} CACHE STRING "The libraries needed to use OpenEXR")
 ENDIF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY)

 IF(OPENEXR_FOUND)


Removed file matching pattern for qt plugins

--- cmake/InstallFAST.cmake
+++ cmake/InstallFAST.cmake
@@ -28,7 +28,6 @@
 # Install Qt plugins
 install(DIRECTORY ${PROJECT_BINARY_DIR}/plugins/
     DESTINATION fast/QtPlugins/
-    FILES_MATCHING PATTERN "*.so"
 )

 # Install qt.conf


Fix install target.

Fix install target.

--- cmake/ectoInstall.cmake
+++ cmake/ectoInstall.cmake
@@ -47,7 +47,7 @@
   )

 #generated headers
-install(DIRECTORY ${CMAKE_BINARY_DIR}/include/ecto
+install(DIRECTORY ${PROJECT_BINARY_DIR}/include/ecto
   DESTINATION ${include_prefix}
   COMPONENT main
   )


Fixes typos in exported CMake symbols.

Fixes typos in exported CMake symbols.

--- cnetstring-config.cmake
+++ cnetstring-config.cmake
@@ -4,14 +4,14 @@
 if(NOT DEFINED cnetstring_FOUND)

   # Locate library headers.
-  find_path(cnetstring_include_dir
+  find_path(cnetstring_include_dirs
     NAMES netstring.h
     PATHS ${cnetstring_DIR}/code
   )

   # Export library targets.
   set(cnetstring_libraries
-    cnetstring
+    netstring
     CACHE INTERNAL "cnetstring library" FORCE
   )


OCCT dev version porting (6.7.2)

OCCT dev version porting (6.7.2)

--- salome_adm/cmake_files/FindCAS.cmake
+++ salome_adm/cmake_files/FindCAS.cmake
@@ -84,7 +84,6 @@
 FIND_LIBRARY(CAS_PTKernel PTKernel )
 #FIND_LIBRARY(CAS_StdLPlugin StdLPlugin )
 #FIND_LIBRARY(CAS_StdPlugin StdPlugin )
-FIND_LIBRARY(CAS_TKAdvTools TKAdvTools )
 FIND_LIBRARY(CAS_TKBin TKBin )
 FIND_LIBRARY(CAS_TKBinL TKBinL )
 FIND_LIBRARY(CAS_TKBinTObj TKBinTObj )
@@ -172,7 +171,6 @@
       REQUIRED_VARS CAS_INCLUDE_DIRS
         CAS_FWOSPlugin
         CAS_PTKernel
-        CAS_TKAdvTools
         CAS_TKBin
         CAS_TKBinL
         CAS_TKBinTObj


cplex-shared.cmake: Use different linker flag for mac/linux

--- cplex-shared.cmake
+++ cplex-shared.cmake
@@ -6,9 +6,9 @@

 # From the command-line, this can be achieved with something like:
 # (Linux)
-# g++ -fpic -shared -Wl,-all_load libcplex.a -Wl,-noall_load -o libcplex.dylib
-# g++ -fpic -shared -Wl,-all_load libilocplex.a -Wl,-noall_load -o libilocplex.dylib
-# g++ -fpic -shared -Wl,-all_load libconcert.a -Wl,-noall_load -o libconcert.dylib
+# g++ -fpic -shared -Wl,-whole-archive libcplex.a -Wl,-no-whole-archive -o libcplex.so
+# g++ -fpic -shared -Wl,-whole-archive libilocplex.a -Wl,-no-whole-archive -o libilocplex.so
+# g++ -fpic -shared -Wl,-whole-archive libconcert.a -Wl,-no-whole-archive -o libconcert.so

 # (Mac OS X)
 # g++ -fpic -shared -Wl,-all_load libcplex.a -Wl,-noall_load -o libcplex.dylib
@@ -17,6 +17,12 @@

 # Find the CPLEX static libraries (must already be installed somewhere)
 find_package( Cplex REQUIRED )
+
+if (APPLE)
+    set(SHARED_CPLEX_LINK_FLAGS "-all_load")
+else()
+    set(SHARED_CPLEX_LINK_FLAGS "-whole-archive")
+endif()

 ##
 ## -- Create a shared library from libcplex.a
@@ -31,7 +37,7 @@
 add_library( cplex-shared SHARED ${EMPTY_CPP} )
 target_link_libraries( cplex-shared ${CPLEX_LIBRARY_STATIC} )
 set_target_properties( cplex-shared PROPERTIES
-                       LINK_FLAGS -all_load
+                       LINK_FLAGS ${SHARED_CPLEX_LINK_FLAGS}
                        COMPILE_FLAGS -fpic
                        OUTPUT_NAME cplex
                        LIBRARY_OUTPUT_DIRECTORY ${CPLEX_LIB_DIR} )
@@ -48,7 +54,7 @@
 add_library( concert-shared SHARED ${EMPTY_CPP} )
 target_link_libraries( concert-shared ${CONCERT_LIBRARY_STATIC} )
 set_target_properties( concert-shared PROPERTIES
-                       LINK_FLAGS -all_load
+                       LINK_FLAGS ${SHARED_CPLEX_LINK_FLAGS}
                        COMPILE_FLAGS -fpic
                        OUTPUT_NAME concert
                        LIBRARY_OUTPUT_DIRECTORY ${CONCERT_LIB_DIR} )
@@ -65,7 +71,7 @@
 add_dependencies( ilocplex-shared cplex-shared concert-shared )
 target_link_libraries( ilocplex-shared ${ILOCPLEX_LIBRARY_STATIC} ${CPLEX_LIB_LOCATION} ${CONCERT_LIB_LOCATION} )
 set_target_properties( ilocplex-shared PROPERTIES
-                       LINK_FLAGS -all_load
+                       LINK_FLAGS ${SHARED_CPLEX_LINK_FLAGS}
                        COMPILE_FLAGS -fpic
                        OUTPUT_NAME ilocplex
                        LIBRARY_OUTPUT_DIRECTORY ${ILOCPLEX_LIB_DIR} )


Disable local builds if HUNTER_USE_CACHE_SERVERS=ONLY

--- cmake/modules/hunter_download.cmake
+++ cmake/modules/hunter_download.cmake
@@ -385,7 +385,16 @@
   endif()
   hunter_status_print("${build_message}")

-  if(HUNTER_DISABLE_BUILDS AND HUNTER_PACKAGE_SCHEME_INSTALL)
+  set(allow_builds TRUE)
+  if(HUNTER_DISABLE_BUILDS)
+    set(allow_builds FALSE)
+  endif()
+  string(COMPARE EQUAL "${HUNTER_USE_CACHE_SERVERS}" "ONLY" only_server)
+  if(only_server)
+    set(allow_builds FALSE)
+  endif()
+
+  if(NOT allow_builds AND HUNTER_PACKAGE_SCHEME_INSTALL)
     hunter_fatal_error(
         "Building package from source is disabled (dir: ${HUNTER_PACKAGE_HOME_DIR})"
         WIKI "error.build.disabled"


Update cvmatio to v1.0.27-p1

Update cvmatio to v1.0.27-p1

--- cmake/projects/cvmatio/hunter.cmake
+++ cmake/projects/cvmatio/hunter.cmake
@@ -14,11 +14,11 @@
     PACKAGE_NAME
     cvmatio
     VERSION
-    "1.0.27"
-     URL
-     https://github.com/hunter-packages/cvmatio/archive/v1.0.27.tar.gz
-     SHA1
-     e163bd2dd4c1e8ed061c46910076eafc38c9183c
+    "1.0.27-p1"
+    URL
+    https://github.com/hunter-packages/cvmatio/archive/v1.0.27-p1.tar.gz
+    SHA1
+    95b6cf1ea06e11e3790fb370e94ccdd6351dcc41
 )

 hunter_add_version(