Find DirectX SDK on Windows also in OpenGL mode as SDL depends on files like dsound.h.

--- Source/CMake/Modules/Urho3D-CMake-magic.cmake
+++ Source/CMake/Modules/Urho3D-CMake-magic.cmake
@@ -134,10 +134,10 @@
     add_definitions (-DURHO3D_STATIC_DEFINE)
 endif ()

-# If using Windows and not OpenGL, find DirectX SDK include & library directories
+# If using Windows, find DirectX SDK include & library directories.
 # Note: if a recent Windows SDK is installed instead, it will be possible to compile without;
 # therefore do not log a fatal error in that case
-if (WIN32 AND NOT USE_OPENGL)
+if (WIN32)
     find_package (Direct3D)
     if (DIRECT3D_FOUND)
         include_directories (${DIRECT3D_INCLUDE_DIR})


Change dependencies script to grab directly from source urls.

--- Dependencies.cmake
+++ Dependencies.cmake
@@ -14,7 +14,7 @@
   ExternalProject_Add(sml-lib
     PREFIX ${EXTERNAL_PATH}/SML
     #--Download step--------------
-    URL https://github.com/kartikkumar/sml/archive/master.zip
+    URL https://github.com/astropnp/sml/archive/master.zip
     TIMEOUT 30
     #--Update/Patch step----------
     UPDATE_COMMAND ""
@@ -50,7 +50,7 @@
     DEPENDS sml-lib
     PREFIX ${EXTERNAL_PATH}/Astro
     #--Download step--------------
-    URL https://github.com/kartikkumar/astro/archive/master.zip
+    URL https://github.com/astropnp/astro/archive/master.zip
     TIMEOUT 30
     #--Update/Patch step----------
     UPDATE_COMMAND ""
@@ -85,7 +85,7 @@
   ExternalProject_Add(sgp4-deorbit
     PREFIX ${EXTERNAL_PATH}/SGP4
     #--Download step--------------
-    URL https://github.com/kartikkumar/sgp4deorbit/archive/master.zip
+    URL https://github.com/astropnp/sgp4deorbit/archive/master.zip
     TIMEOUT 30
     #--Update/Patch step----------
     #--Configure step-------------
@@ -156,7 +156,7 @@
     ExternalProject_Add(catch
       PREFIX ${EXTERNAL_PATH}/Catch
       #--Download step--------------
-      URL https://github.com/kartikkumar/Catch/archive/master.zip
+      URL https://github.com/philsquared/Catch/archive/master.zip
       TIMEOUT 30
       #--Update/Patch step----------
       UPDATE_COMMAND ""


Fix BALLFinishedMessage on Windows

Fix BALLFinishedMessage on Windows

--- cmake/BALLFinishedMessage.cmake
+++ cmake/BALLFinishedMessage.cmake
@@ -19,8 +19,8 @@
                     COMMAND ${CMAKE_COMMAND} -E echo ""
                     COMMAND ${CMAKE_COMMAND} -E echo "=========================================================================="
                     COMMAND ${CMAKE_COMMAND} -E echo ""
-                    COMMAND ${CMAKE_COMMAND} -E make_directory "${PROJECT_BINARY_DIR}/source/TEST/bin/$(OutDir)/"
-										COMMAND copy ${DLL_SOURCE} ${DLL_TARGET} /Y
+#                   COMMAND ${CMAKE_COMMAND} -E make_directory "${PROJECT_BINARY_DIR}/source/TEST/bin/$(OutDir)/"
+#                   COMMAND copy ${DLL_SOURCE} ${DLL_TARGET} /Y
                     COMMENT "message after library is built and copy BALL(d).dll to test binary dir"
                     VERBATIM)
 ELSE()


copy qml dependencies of mix to install directory

--- cmake/EthExecutableHelper.cmake
+++ cmake/EthExecutableHelper.cmake
@@ -60,7 +60,11 @@
 	cmake_parse_arguments (ETH_INSTALL_EXECUTABLE "${options}" "${one_value_args}" "${multi_value_args}" "${extra_macro_args}")

 	if (ETH_INSTALL_EXECUTABLE_QMLDIR)
-		set(eth_qml_dir "-qmldir=${ETH_INSTALL_EXECUTABLE_QMLDIR}")
+		if (APPLE)
+			set(eth_qml_dir "-qmldir=${ETH_INSTALL_EXECUTABLE_QMLDIR}")
+		elseif (WIN32)
+			set(eth_qml_dir --qmldir ${ETH_INSTALL_EXECUTABLE_QMLDIR})
+		endif()
 		message(STATUS "${EXECUTABLE} qmldir: ${eth_qml_dir}")
 	endif()

@@ -68,7 +72,8 @@
 		# First have qt5 install plugins and frameworks
 		add_custom_command(TARGET ${EXECUTABLE} POST_BUILD
 			COMMAND ${MACDEPLOYQT_APP} ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${EXECUTABLE}.app ${eth_qml_dir}
-			WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+			WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
+		)

 		# This tool and next will inspect linked libraries in order to determine which dependencies are required
 		if (${CMAKE_CFG_INTDIR} STREQUAL ".")
@@ -108,6 +113,13 @@
 			$<TARGET_FILE_DIR:${EXECUTABLE}>/platforms
 		)

+		# ugly way, improve that
+		add_custom_command(TARGET ${EXECUTABLE} POST_BUILD
+			COMMAND cmake -E copy_directory
+			"${ETH_DEPENDENCY_INSTALL_DIR}/qml"
+			$<TARGET_FILE_DIR:${EXECUTABLE}>
+		)
+
 		install( FILES ${DLLS}
 			DESTINATION bin
 			COMPONENT ${EXECUTABLE}
@@ -117,6 +129,14 @@
 			DESTINATION bin
 			COMPONENT ${EXECUTABLE}
 		)
+
+		file (GLOB QMLS ${ETH_DEPENDENCY_INSTALL_DIR}/qml/*)
+		foreach(QML ${QMLS})
+			install( DIRECTORY ${QML}
+				DESTINATION bin
+				COMPONENT ${EXECUTABLE}
+			)
+		endforeach()

 		install( TARGETS ${EXECUTABLE} RUNTIME
 			DESTINATION bin


FindLuabind: Look for libraries with version suffix first.

--- cmake/Modules/FindLuabind.cmake
+++ cmake/Modules/FindLuabind.cmake
@@ -6,13 +6,13 @@
 )

 FIND_LIBRARY(_LUABIND_LIBRARY_RELEASE
-  NAMES luabind luabind09 luabind-0.9
+  NAMES luabind09 luabind-0.9 luabind
   HINTS $ENV{LUABIND_DIR}
   PATH_SUFFIXES lib64 lib
 )

 FIND_LIBRARY(_LUABIND_LIBRARY_DEBUG
-  NAMES luabind-d luabind09-d luabind-0.9-d
+  NAMES luabind09-d luabind-0.9-d luabind-d
   HINTS $ENV{LUABIND_DIR}
   PATH_SUFFIXES lib64 lib
 )


Add external libs lookup to find module

Add external libs lookup to find module

--- cmake/Modules/FindMetaLic.cmake
+++ cmake/Modules/FindMetaLic.cmake
@@ -3,8 +3,8 @@
 #
 # This module defines the following variables:
 #   MetaLic_INCLUDE_DIRS
-#   MetaLic_GENERATOR_LIBRARY
-#   MetaLic_READER_LIBRARY
+#   MetaLic_GENERATOR_LIBRARIES
+#   MetaLic_READER_LIBRARIES
 #   MetaLic_FOUND
 #
 # You can help it find the required paths/files by pre-setting
@@ -79,6 +79,10 @@
     MetaLic_GENERATOR_LIBRARY
     MetaLic_READER_LIBRARY
 )
+if(NOT WIN32)
+    find_package(OpenSSL REQUIRED)
+    find_package(ZLIB REQUIRED) # Zlib required when openssl version < 1.0.1f
+endif(NOT WIN32)
 set(MetaLic_DIR_old ${MetaLic_DIR})
 set(MetaLic_DIR "MetaLic_DIR-NOTFOUND" CACHE PATH "The directory to the MetaLicensor installation, i.e. where include and lib directories can be found." FORCE)
 find_package_handle_standard_args(MetaLic
@@ -89,6 +93,8 @@
 )
 if(MetaLic_FOUND)
     set(MetaLic_DIR "${MetaLic_DIR_old}" CACHE PATH "The directory to the MetaLicensor installation, i.e. where include and lib directories can be found." FORCE)
-    set(MetaLic_INCLUDE_DIRS ${MetaLic_INCLUDE_DIR})
-    mark_as_advanced(MetaLic_INCLUDE_DIRS)
+    set(MetaLic_INCLUDE_DIRS ${MetaLic_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR})
+    set(MetaLic_GENERATOR_LIBRARIES ${MetaLic_GENERATOR_LIBRARY})
+    set(MetaLic_READER_LIBRARIES ${MetaLic_READER_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} ${ZLIB_LIBRARIES} dl)
+    mark_as_advanced(MetaLic_INCLUDE_DIRS MetaLic_GENERATOR_LIBRARIES MetaLic_READER_LIBRARIES)
 endif()


Add `doxygen` function to distortos-utilities.cmake

--- cmake/distortos-utilities.cmake
+++ cmake/distortos-utilities.cmake
@@ -29,6 +29,31 @@
 			DEPENDS ${elfFilename}
 			USES_TERMINAL)
 	add_custom_target(${elfFilename}-to-${dmpFilename} ALL DEPENDS ${dmpFilename})
+endfunction()
+
+#
+# Adds given folders to doxygen `INPUT`, `INCLUDE_PATH` and/or `EXCLUDE`.
+#
+# `doxygen([INPUT inputFolder ...] [INCLUDE_PATH includePathFolder ...] [EXCLUDE excludeFolder ...])`
+#
+
+function(doxygen)
+	cmake_parse_arguments(PARSE_ARGV 0 DOXYGEN "" "" "EXCLUDE;INCLUDE_PATH;INPUT")
+	if(DOXYGEN_EXCLUDE)
+		set(envDoxygenExclude "$ENV{doxygenExclude}")
+		list(APPEND envDoxygenExclude ${DOXYGEN_EXCLUDE})
+		set(ENV{doxygenExclude} "${envDoxygenExclude}")
+	endif()
+	if(DOXYGEN_INCLUDE_PATH)
+		set(envDoxygenIncludePath "$ENV{doxygenIncludePath}")
+		list(APPEND envDoxygenIncludePath ${DOXYGEN_INCLUDE_PATH})
+		set(ENV{doxygenIncludePath} "${envDoxygenIncludePath}")
+	endif()
+	if(DOXYGEN_INPUT)
+		set(envDoxygenInput "$ENV{doxygenInput}")
+		list(APPEND envDoxygenInput ${DOXYGEN_INPUT})
+		set(ENV{doxygenInput} "${envDoxygenInput}")
+	endif()
 endfunction()

 #


fix install

fix install

--- cmake/ospray_cmake_config.cmake
+++ cmake/ospray_cmake_config.cmake
@@ -50,7 +50,9 @@

 ENDFOREACH(ospray_MODULE_FILENAME ${ospray_MODULE_FILES})

-LIST(APPEND ospray_MODULE_INSTALL_FILES ${CMAKE_SOURCE_DIR}/cmake/FindTBB.cmake)
+LIST(APPEND ospray_MODULE_INSTALL_FILES
+  ${CMAKE_SOURCE_DIR}/components/ospcommon/cmake/FindTBB.cmake
+)

 INSTALL(FILES
   ${ospray_MODULE_INSTALL_FILES}


Update Android toolchain to the latest version supporting NDK r8e

--- android/android.toolchain.cmake
+++ android/android.toolchain.cmake
@@ -1,5 +1,5 @@
 # Copyright (c) 2010-2011, Ethan Rublee
-# Copyright (c) 2011-2012, Andrey Kamaev
+# Copyright (c) 2011-2013, Andrey Kamaev
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -281,8 +281,14 @@
 #     [+] updated for NDK r8c
 #     [+] added support for clang compiler
 #   - December 2012
+#     [+] suppress warning about unused CMAKE_TOOLCHAIN_FILE variable
+#     [+] adjust API level to closest compatible as NDK does
 #     [~] fixed ccache full path search
 #     [+] updated for NDK r8d
+#     [~] compiler options are aligned with NDK r8d
+#   - March 2013
+#     [+] updated for NDK r8e (x86 version)
+#     [+] support x86_64 version of NDK
 # ------------------------------------------------------------------------------

 cmake_minimum_required( VERSION 2.6.3 )
@@ -290,6 +296,10 @@
 if( DEFINED CMAKE_CROSSCOMPILING )
  # subsequent toolchain loading is not really needed
  return()
+endif()
+
+if( CMAKE_TOOLCHAIN_FILE )
+ # touch toolchain variable only to suppress "unused variable" warning
 endif()

 get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
@@ -305,7 +315,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} -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
+set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -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 )
@@ -449,17 +459,30 @@
  endif()
 endif()

+
 # detect current host platform
+if( NOT DEFINED ANDROID_NDK_HOST_X64 AND CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64|x86_64|AMD64")
+ set( ANDROID_NDK_HOST_X64 1 CACHE BOOL "Try to use 64-bit compiler toolchain" )
+ mark_as_advanced( ANDROID_NDK_HOST_X64 )
+endif()
+
 set( TOOL_OS_SUFFIX "" )
 if( CMAKE_HOST_APPLE )
- set( ANDROID_NDK_HOST_SYSTEM_NAME "darwin-x86" )
+ set( ANDROID_NDK_HOST_SYSTEM_NAME "darwin-x86_64" )
+ set( ANDROID_NDK_HOST_SYSTEM_NAME2 "darwin-x86" )
 elseif( CMAKE_HOST_WIN32 )
- set( ANDROID_NDK_HOST_SYSTEM_NAME "windows" )
+ set( ANDROID_NDK_HOST_SYSTEM_NAME "windows-x86_64" )
+ set( ANDROID_NDK_HOST_SYSTEM_NAME2 "windows" )
  set( TOOL_OS_SUFFIX ".exe" )
 elseif( CMAKE_HOST_UNIX )
- set( ANDROID_NDK_HOST_SYSTEM_NAME "linux-x86" )
+ set( ANDROID_NDK_HOST_SYSTEM_NAME "linux-x86_64" )
+ set( ANDROID_NDK_HOST_SYSTEM_NAME2 "linux-x86" )
 else()
  message( FATAL_ERROR "Cross-compilation on your platform is not supported by this cmake toolchain" )
+endif()
+
+if( NOT ANDROID_NDK_HOST_X64 )
+ set( ANDROID_NDK_HOST_SYSTEM_NAME ${ANDROID_NDK_HOST_SYSTEM_NAME2} )
 endif()

 # see if we have path to Android NDK
@@ -509,7 +532,8 @@
  endif()
  set( ANDROID_NDK "${ANDROID_NDK}" CACHE INTERNAL "Path of the Android NDK" FORCE )
  set( BUILD_WITH_ANDROID_NDK True )
- file( STRINGS "${ANDROID_NDK}/RELEASE.TXT" ANDROID_NDK_RELEASE LIMIT_COUNT 1 REGEX r[0-9]+[a-z]? )
+ file( STRINGS "${ANDROID_NDK}/RELEASE.TXT" ANDROID_NDK_RELEASE_FULL LIMIT_COUNT 1 REGEX r[0-9]+[a-z]? )
+ string( REGEX MATCH r[0-9]+[a-z]? ANDROID_NDK_RELEASE "${ANDROID_NDK_RELEASE_FULL}" )
 elseif( ANDROID_STANDALONE_TOOLCHAIN )
  get_filename_component( ANDROID_STANDALONE_TOOLCHAIN "${ANDROID_STANDALONE_TOOLCHAIN}" ABSOLUTE )
  # try to detect change
@@ -563,22 +587,21 @@
  endif()
 endif()

-macro( __GLOB_NDK_TOOLCHAINS __availableToolchainsVar )
- foreach( __toolchain ${${__availableToolchainsVar}} )
+macro( __GLOB_NDK_TOOLCHAINS __availableToolchainsVar __availableToolchainsLst __host_system_name )
+ foreach( __toolchain ${${__availableToolchainsLst}} )
   if( "${__toolchain}" MATCHES "-clang3[.][0-9]$" AND NOT EXISTS "${ANDROID_NDK}/toolchains/${__toolchain}/prebuilt/" )
    string( REGEX REPLACE "-clang3[.][0-9]$" "-4.6" __gcc_toolchain "${__toolchain}" )
   else()
    set( __gcc_toolchain "${__toolchain}" )
   endif()
-  __DETECT_TOOLCHAIN_MACHINE_NAME( __machine "${ANDROID_NDK}/toolchains/${__gcc_toolchain}/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME}" )
+  __DETECT_TOOLCHAIN_MACHINE_NAME( __machine "${ANDROID_NDK}/toolchains/${__gcc_toolchain}/prebuilt/${__host_system_name}" )
   if( __machine )
    string( REGEX MATCH "[0-9]+[.][0-9]+([.][0-9]+)?$" __version "${__gcc_toolchain}" )
    string( REGEX MATCH "^[^-]+" __arch "${__gcc_toolchain}" )
    list( APPEND __availableToolchainMachines "${__machine}" )
    list( APPEND __availableToolchainArchs "${__arch}" )
    list( APPEND __availableToolchainCompilerVersions "${__version}" )
-  else()
-   list( REMOVE_ITEM ${__availableToolchainsVar} "${__toolchain}" )
+   list( APPEND ${__availableToolchainsVar} "${__toolchain}" )
   endif()
   unset( __gcc_toolchain )
  endforeach()
@@ -594,17 +617,29 @@
  set( __availableToolchainCompilerVersions "" )
  if( ANDROID_TOOLCHAIN_NAME AND EXISTS "${ANDROID_NDK}/toolchains/${ANDROID_TOOLCHAIN_NAME}/" )
   # do not go through all toolchains if we know the name
-  set( __availableToolchains "${ANDROID_TOOLCHAIN_NAME}" )
-  __GLOB_NDK_TOOLCHAINS( __availableToolchains )
+  set( __availableToolchainsLst "${ANDROID_TOOLCHAIN_NAME}" )
+  __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst ${ANDROID_NDK_HOST_SYSTEM_NAME} )
+  if( NOT __availableToolchains AND NOT ANDROID_NDK_HOST_SYSTEM_NAME STREQUAL ANDROID_NDK_HOST_SYSTEM_NAME2 )
+   __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst ${ANDROID_NDK_HOST_SYSTEM_NAME2} )
+   if( __availableToolchains )
+    set( ANDROID_NDK_HOST_SYSTEM_NAME ${ANDROID_NDK_HOST_SYSTEM_NAME2} )
+   endif()
+  endif()
  endif()
  if( NOT __availableToolchains )
-  file( GLOB __availableToolchains RELATIVE "${ANDROID_NDK}/toolchains" "${ANDROID_NDK}/toolchains/*" )
+  file( GLOB __availableToolchainsLst RELATIVE "${ANDROID_NDK}/toolchains" "${ANDROID_NDK}/toolchains/*" )
   if( __availableToolchains )
-   list(SORT __availableToolchains) # we need clang to go after gcc
-  endif()
-  __LIST_FILTER( __availableToolchains "^[.]" )
-  __LIST_FILTER( __availableToolchains "llvm" )
-  __GLOB_NDK_TOOLCHAINS( __availableToolchains )
+   list(SORT __availableToolchainsLst) # we need clang to go after gcc
+  endif()
+  __LIST_FILTER( __availableToolchainsLst "^[.]" )
+  __LIST_FILTER( __availableToolchainsLst "llvm" )
+  __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst ${ANDROID_NDK_HOST_SYSTEM_NAME} )
+  if( NOT __availableToolchains AND NOT ANDROID_NDK_HOST_SYSTEM_NAME STREQUAL ANDROID_NDK_HOST_SYSTEM_NAME2 )
+   __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst ${ANDROID_NDK_HOST_SYSTEM_NAME2} )
+   if( __availableToolchains )
+    set( ANDROID_NDK_HOST_SYSTEM_NAME ${ANDROID_NDK_HOST_SYSTEM_NAME2} )
+   endif()
+  endif()
  endif()
  if( NOT __availableToolchains )
   message( FATAL_ERROR "Could not find any working toolchain in the NDK. Probably your Android NDK is broken." )
@@ -617,11 +652,11 @@
 list( REMOVE_DUPLICATES __uniqToolchainArchNames )
 list( SORT __uniqToolchainArchNames )
 foreach( __arch ${__uniqToolchainArchNames} )
-list( APPEND ANDROID_SUPPORTED_ABIS ${ANDROID_SUPPORTED_ABIS_${__arch}} )
+ list( APPEND ANDROID_SUPPORTED_ABIS ${ANDROID_SUPPORTED_ABIS_${__arch}} )
 endforeach()
 unset( __uniqToolchainArchNames )
 if( NOT ANDROID_SUPPORTED_ABIS )
-message( FATAL_ERROR "No one of known Android ABIs is supported by this cmake toolchain." )
+ message( FATAL_ERROR "No one of known Android ABIs is supported by this cmake toolchain." )
 endif()

 # choose target ABI
@@ -760,11 +795,22 @@
 # 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}" )
-# TODO: filter out unsupported levels
+# 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 )
+ 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 )
- message( SEND_ERROR "Specified Android native API level (${ANDROID_NATIVE_API_LEVEL}) is not supported by your NDK/toolchain." )
+ message( SEND_ERROR "Specified Android native API level 'android-${ANDROID_NATIVE_API_LEVEL}' is not supported by your NDK/toolchain." )
 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" )
@@ -926,7 +972,7 @@
  string( REGEX MATCH "3[.][0-9]$" ANDROID_CLANG_VERSION "${ANDROID_TOOLCHAIN_NAME}")
  string( REGEX REPLACE "-clang${ANDROID_CLANG_VERSION}$" "-4.6" ANDROID_GCC_TOOLCHAIN_NAME "${ANDROID_TOOLCHAIN_NAME}" )
  if( NOT EXISTS "${ANDROID_NDK}/toolchains/llvm-${ANDROID_CLANG_VERSION}/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME}/bin/clang${TOOL_OS_SUFFIX}" )
-  message( FATAL_ERROR "Could not find the " )
+  message( FATAL_ERROR "Could not find the Clang compiler driver" )
  endif()
  set( ANDROID_COMPILER_IS_CLANG 1 )
  set( ANDROID_CLANG_TOOLCHAIN_ROOT "${ANDROID_NDK}/toolchains/llvm-${ANDROID_CLANG_VERSION}/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME}" )
@@ -1140,38 +1186,52 @@

 # NDK flags
 if( ARMEABI OR ARMEABI_V7A )
- set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fpic -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__" )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fpic -funwind-tables" )
  if( NOT ANDROID_FORCE_ARM_BUILD AND NOT ARMEABI_V6 )
-  # It is recommended to use the -mthumb compiler flag to force the generation
-  # of 16-bit Thumb-1 instructions (the default being 32-bit ARM ones).
-  set( ANDROID_CXX_FLAGS_RELEASE "-mthumb" )
-  set( ANDROID_CXX_FLAGS_DEBUG   "-marm -finline-limit=64" )
+  set( ANDROID_CXX_FLAGS_RELEASE "-mthumb -fomit-frame-pointer -fno-strict-aliasing" )
+  set( ANDROID_CXX_FLAGS_DEBUG   "-marm -fno-omit-frame-pointer -fno-strict-aliasing" )
+  if( NOT ANDROID_COMPILER_IS_CLANG )
+   set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -finline-limit=64" )
+  endif()
  else()
   # always compile ARMEABI_V6 in arm mode; otherwise there is no difference from ARMEABI
-  # O3 instead of O2/Os in release mode - like cmake sets for desktop gcc
-  set( ANDROID_CXX_FLAGS_RELEASE "-marm" )
-  set( ANDROID_CXX_FLAGS_DEBUG   "-marm -finline-limit=300" )
+  set( ANDROID_CXX_FLAGS_RELEASE "-marm -fomit-frame-pointer -fstrict-aliasing" )
+  set( ANDROID_CXX_FLAGS_DEBUG   "-marm -fno-omit-frame-pointer -fno-strict-aliasing" )
+  if( NOT ANDROID_COMPILER_IS_CLANG )
+   set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funswitch-loops -finline-limit=300" )
+  endif()
  endif()
 elseif( X86 )
- set( ANDROID_CXX_FLAGS         "${ANDROID_CXX_FLAGS} -funwind-tables" )
- set( ANDROID_CXX_FLAGS_RELEASE "" )
- set( ANDROID_CXX_FLAGS_DEBUG   "-finline-limit=300" )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funwind-tables" )
+ if( NOT ANDROID_COMPILER_IS_CLANG )
+  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funswitch-loops -finline-limit=300" )
+ else()
+  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fPIC" )
+ endif()
+ set( ANDROID_CXX_FLAGS_RELEASE "-fomit-frame-pointer -fstrict-aliasing" )
+ set( ANDROID_CXX_FLAGS_DEBUG   "-fno-omit-frame-pointer -fno-strict-aliasing" )
 elseif( MIPS )
- set( ANDROID_CXX_FLAGS         "${ANDROID_CXX_FLAGS} -fpic -funwind-tables -fmessage-length=0 -fno-inline-functions-called-once -frename-registers" )
- set( ANDROID_CXX_FLAGS_RELEASE "-finline-limit=300 -fno-strict-aliasing" )
- set( ANDROID_CXX_FLAGS_DEBUG   "-finline-functions -fgcse-after-reload -frerun-cse-after-loop" )
+ 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" )
+ if( NOT ANDROID_COMPILER_IS_CLANG )
+  set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers" )
+  set( ANDROID_CXX_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE} -funswitch-loops -finline-limit=300" )
+ endif()
 elseif()
  set( ANDROID_CXX_FLAGS_RELEASE "" )
  set( ANDROID_CXX_FLAGS_DEBUG   "" )
 endif()

-if( NOT X86 )
- set( ANDROID_CXX_FLAGS         "-Wno-psabi ${ANDROID_CXX_FLAGS}" )
-endif()
-
 set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fsigned-char" ) # good/necessary when porting desktop libraries
-set( ANDROID_CXX_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE} -fomit-frame-pointer" )
-set( ANDROID_CXX_FLAGS_DEBUG   "${ANDROID_CXX_FLAGS_DEBUG} -fno-strict-aliasing -fno-omit-frame-pointer" )
+
+if( NOT X86 AND NOT ANDROID_COMPILER_IS_CLANG )
+ set( ANDROID_CXX_FLAGS "-Wno-psabi ${ANDROID_CXX_FLAGS}" )
+endif()
+
+if( NOT ANDROID_COMPILER_VERSION VERSION_LESS "4.6" )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -no-canonical-prefixes" ) # see https://android-review.googlesource.com/#/c/47564/
+endif()

 # ABI-specific flags
 if( ARMEABI_V7A )
@@ -1308,9 +1368,6 @@
   set( ANDROID_CXX_FLAGS "-target ${ANDROID_LLVM_TRIPLE} ${ANDROID_CXX_FLAGS}" )
  endif()
  if( BUILD_WITH_ANDROID_NDK )
-  if(ANDROID_ARCH_NAME STREQUAL "arm" )
-   set( ANDROID_CXX_FLAGS "-isystem ${ANDROID_CLANG_TOOLCHAIN_ROOT}/lib/clang/${ANDROID_CLANG_VERSION}/include ${ANDROID_CXX_FLAGS}" )
-  endif()
   set( ANDROID_CXX_FLAGS "-gcc-toolchain ${ANDROID_TOOLCHAIN_ROOT} ${ANDROID_CXX_FLAGS}" )
  endif()
 endif()
@@ -1325,6 +1382,12 @@
 set( CMAKE_SHARED_LINKER_FLAGS ""                        CACHE STRING "shared linker flags" )
 set( CMAKE_MODULE_LINKER_FLAGS ""                        CACHE STRING "module linker flags" )
 set( CMAKE_EXE_LINKER_FLAGS    "-Wl,-z,nocopyreloc"      CACHE STRING "executable linker flags" )
+
+# put flags to cache (for debug purpose only)
+set( ANDROID_CXX_FLAGS         "${ANDROID_CXX_FLAGS}"         CACHE INTERNAL "Android specific c/c++ flags" )
+set( ANDROID_CXX_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE}" CACHE INTERNAL "Android specific c/c++ Release flags" )
+set( ANDROID_CXX_FLAGS_DEBUG   "${ANDROID_CXX_FLAGS_DEBUG}"   CACHE INTERNAL "Android specific c/c++ Debug flags" )
+set( ANDROID_LINKER_FLAGS      "${ANDROID_LINKER_FLAGS}"      CACHE INTERNAL "Android specific c/c++ linker flags" )

 # finish flags
 set( CMAKE_CXX_FLAGS           "${ANDROID_CXX_FLAGS} ${CMAKE_CXX_FLAGS}" )
@@ -1456,6 +1519,7 @@
 if( NOT PROJECT_NAME STREQUAL "CMAKE_TRY_COMPILE" )
  set( __toolchain_config "")
  foreach( __var NDK_CCACHE  LIBRARY_OUTPUT_PATH_ROOT  ANDROID_FORBID_SYGWIN  ANDROID_SET_OBSOLETE_VARIABLES
+                ANDROID_NDK_HOST_X64
                 ANDROID_NDK
                 ANDROID_STANDALONE_TOOLCHAIN
                 ANDROID_TOOLCHAIN_NAME
@@ -1512,6 +1576,7 @@
 #   ANDROID_NDK
 #   ANDROID_STANDALONE_TOOLCHAIN
 #   ANDROID_TOOLCHAIN_NAME : the NDK name of compiler toolchain
+#   ANDROID_NDK_HOST_X64 : try to use x86_64 toolchain (default for x64 host systems)
 #   LIBRARY_OUTPUT_PATH_ROOT : <any valid path>
 #   NDK_CCACHE : <path to your ccache executable>
 # Obsolete:
@@ -1536,7 +1601,7 @@
 #   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; set only for NDK
+#   ANDROID_NDK_RELEASE : one of r5, r5b, r5c, r6, r6b, r7, r7b, r7c, r8, r8b, r8c, r8d, r8e; 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


BUG: update mosaic git tage to include the functorImageFilter fix


Compiler error with GCC when the CMake option BTK_EXTRA_COMPILER_WARNINGS is activated.

--- CMake/btkExtraCompilerFlags.cmake
+++ CMake/btkExtraCompilerFlags.cmake
@@ -7,7 +7,7 @@
   SET(CMAKE_CXX_FLAGS_WARN "-Wnon-virtual-dtor -Wno-long-long -Wcast-align -Wchar-subscripts -Wall -Wextra -Wpointer-arith -Wformat-security -Woverloaded-virtual -Wunused-parameter -fno-common")
   # Addtional warnings for GCC
   IF(CMAKE_COMPILER_IS_GNUCXX)
-    SET(CMAKE_CXX_FLAGS_WARN ${CMAKE_CXX_FLAGS_WARN} "-fno-check-new -ansi")
+    SET(CMAKE_CXX_FLAGS_WARN "${CMAKE_CXX_FLAGS_WARN} -fno-check-new -ansi")
   ENDIF(CMAKE_COMPILER_IS_GNUCXX)

   # This flag is useful as not returning from a non-void function is an error
@@ -41,4 +41,4 @@
       SET(CMAKE_OLD_CXX_FLAGS_DEBUG 0 CACHE STRING "" FORCE)
     ENDIF(CMAKE_OLD_CXX_FLAGS_DEBUG)
   ENDIF(BTK_EXTRA_COMPILER_WARNINGS)
-ENDIF(CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))+ENDIF(CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))


link to googletest's github

link to googletest's github

--- cmake/GTest.cmake
+++ cmake/GTest.cmake
@@ -15,7 +15,7 @@
         set (gtest_url URL ${gtest_local})
         FIND_PACKAGE_MESSAGE(GTest "Trying to build GTest from local ${gtest_local}" "[${gtest_local}]")
     else()
-        set (gtest_web_url "https://googletest.googlecode.com/files/gtest-1.7.0.zip")
+        set (gtest_web_url "https://github.com/google/googletest/archive/release-1.7.0.zip")
         FIND_PACKAGE_MESSAGE(GTest "Trying to build GTest from ${gtest_web_url}" "[${gtest_web_url}]")
         set (gtest_url
             URL ${gtest_web_url}


Bump WSREP_PATCH_VERSION to 17

Bump WSREP_PATCH_VERSION to 17

--- cmake/wsrep.cmake
+++ cmake/wsrep.cmake
@@ -18,7 +18,7 @@
 # so WSREP_VERSION is produced regardless

 # Set the patch version
-SET(WSREP_PATCH_VERSION "16")
+SET(WSREP_PATCH_VERSION "17")

 # MariaDB addition: Revision number of the last revision merged from
 # codership branch visible in @@visible_comment.


[FIX] workflow plugin directory should be buildable with older CMake versions, too.

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@13672 e6417c60-b987-48fd-844e-b20f0fcc1017

--- util/cmake/SeqAnCtdSetup.cmake
+++ util/cmake/SeqAnCtdSetup.cmake
@@ -78,58 +78,60 @@
 set (PAYLOAD_TMP_BIN_PATH ${PAYLOAD_TMP_PATH}/bin)

 # ============================================================================
-# Targets for preparing payload
-# ============================================================================
-
-# ----------------------------------------------------------------------------
-# Targets for creating payload "bin" dir
-# ----------------------------------------------------------------------------
-
-# Target for creating the CTD output directories.  Triggers building of CTD
-# executables through dependency.
-add_custom_target (prepare_ctd_payload_tmp_bin
-                   # These two commands are equivalent to rm -rf.
-                   COMMAND ${CMAKE_COMMAND} -E make_directory ${PAYLOAD_TMP_PATH}
-                   COMMAND ${CMAKE_COMMAND} -E remove_directory ${PAYLOAD_TMP_PATH}
-                   # Create payload directory.
-                   COMMAND ${CMAKE_COMMAND} -E make_directory ${PAYLOAD_TMP_PATH}
-                   COMMAND ${CMAKE_COMMAND} -E make_directory ${PAYLOAD_TMP_BIN_PATH}
-                   # Make sure that all binaries that we want to have CTDs for are built.
-                   DEPENDS ${SEQAN_CTD_EXECUTABLES})
-
-# Add directory for CTD files.
-add_custom_target (target_ctd_mkdir
-                   COMMAND ${CMAKE_COMMAND} -E make_directory ${WORKFLOW_PLUGIN_DIR}
-                   COMMAND ${CMAKE_COMMAND} -E make_directory ${CTD_PATH})
-
-# For each white-listed executable in SEQAN_CTD_EXECUTABLES, get its path and
-# (1) copy it into the temporary payload directory's bin subdirectory, and (2)
-# create a target target_ctd_ctds_${EXECUTABLE} that the CTD creation target
-# below will depend on (through the list PREPARE_CTD_CTDS_TARGETS).
+# Creating directory structure.
+# ============================================================================
+
+# Create directory: workflow_plugin_dir
+add_custom_command (OUTPUT ${WORKFLOW_PLUGIN_DIR}
+                    COMMAND ${CMAKE_COMMAND} -E make_directory ${WORKFLOW_PLUGIN_DIR})
+# Create directory: workflow_plugin_dir/icons
+add_custom_command (OUTPUT ${WORKFLOW_PLUGIN_DIR}/icons
+                    COMMAND ${CMAKE_COMMAND} -E make_directory ${WORKFLOW_PLUGIN_DIR}/icons
+                    DEPENDS ${WORKFLOW_PLUGIN_DIR})
+# Create directory: workflow_plugin_dir/descriptors
+add_custom_command (OUTPUT ${CTD_PATH}
+                    COMMAND ${CMAKE_COMMAND} -E make_directory ${WORKFLOW_PLUGIN_DIR}
+                    DEPENDS ${WORKFLOW_PLUGIN_DIR})
+# Create directory: workflow_plugin_dir/payload
+add_custom_command (OUTPUT ${PAYLOAD_PATH}
+                    COMMAND ${CMAKE_COMMAND} -E make_directory ${PAYLOAD_PATH}
+                    DEPENDS ${WORKFLOW_PLUGIN_DIR})
+
+# Create directory: workflow_plugin_dir/payload.tmp
+add_custom_command (OUTPUT ${PAYLOAD_TMP_PATH}
+                    COMMAND ${CMAKE_COMMAND} -E make_directory ${PAYLOAD_TMP_PATH}
+                    DEPENDS ${WORKFLOW_PLUGIN_DIR})
+# Create directory: workflow_plugin_dir/payload.tmp/bin
+add_custom_command (OUTPUT ${PAYLOAD_TMP_BIN_PATH}
+                    COMMAND ${CMAKE_COMMAND} -E make_directory ${PAYLOAD_TMP_BIN_PATH}
+                    DEPENDS ${PAYLOAD_TMP_PATH})
+
+# ============================================================================
+# Creating payload data.
+# ============================================================================
+
+# Binaries.
 foreach (_BINARY ${SEQAN_CTD_EXECUTABLES})
-  # Get platform-dependent executable path.
+  set (_TARGET ${_BINARY})
   set (_BINARY_PATH "${SEQAN_BIN_DIR}/${_BINARY}")
   if (WIN32)
+    set (_BINARY "${_BINARY}.exe")
     set (_BINARY_PATH "${_BINARY_PATH}.exe")
   endif ()
-  add_custom_command (TARGET prepare_ctd_payload_tmp_bin POST_BUILD
-                      COMMAND ${CMAKE_COMMAND} -E copy "${_BINARY_PATH}" "${PAYLOAD_TMP_BIN_PATH}")
-  add_custom_target (target_ctd_ctds_${_BINARY}
-                     COMMAND ${_BINARY_PATH} --write-ctd "${CTD_PATH}/${_BINARY}.ctd"
-                     DEPENDS target_ctd_mkdir ${_BINARY})
-  list (APPEND PREPARE_CTD_CTDS_TARGETS target_ctd_ctds_${_BINARY})
-endforeach ()
-
-# NOTE: When adding lib, share, etc. directories to payload, add targets
-# following the pattern for the binary files and register as dependency
-# everywhere below.
-
-# ----------------------------------------------------------------------------
-# Targets for creating payload archive
-# ----------------------------------------------------------------------------
-
-# Get system name and word size for the payload archive name.
-
+
+  list (APPEND TMP_PAYLOAD_FILES "${PAYLOAD_TMP_BIN_PATH}/${_BINARY}")
+  add_custom_command (OUTPUT ${PAYLOAD_TMP_BIN_PATH}/${_BINARY}
+                      COMMAND ${CMAKE_COMMAND} -E copy "${_BINARY_PATH}" "${PAYLOAD_TMP_BIN_PATH}/${_BINARY}"
+                      DEPENDS ${_TARGET}
+                              ${PAYLOAD_TMP_BIN_PATH})
+endforeach ()
+
+# binaries.ini file.
+add_custom_command (OUTPUT "${PAYLOAD_TMP_PATH}/binaries.ini"
+                    COMMAND ${CMAKE_COMMAND} -E touch ${PAYLOAD_TMP_PATH}/binaries.ini
+                    DEPENDS ${PAYLOAD_TMP_PATH})
+
+# Create the payload binary ZIP file.
 if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
   set (SEQAN_PLATFORM "lnx")
 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
@@ -146,80 +148,71 @@
   set (SEQAN_SYSTEM_WORDSIZE "32")
 endif ()

-# We use the jar command for creating the payload files in a platform independent manner.
-
 set (_ZIP_NAME "binaries_${SEQAN_PLATFORM}_${SEQAN_SYSTEM_WORDSIZE}.zip")
 set (_ZIP_PATH "${PAYLOAD_PATH}")
-add_custom_target (prepare_ctd_payload
-                   # rm -rf
-                   COMMAND ${CMAKE_COMMAND} -E make_directory "${_ZIP_PATH}"
-                   COMMAND ${CMAKE_COMMAND} -E remove_directory "${_ZIP_PATH}"
-                   # mkdir
-                   COMMAND ${CMAKE_COMMAND} -E make_directory "${_ZIP_PATH}"
-                   # create empty binaries.ini
-                   COMMAND ${CMAKE_COMMAND} -E touch "${PAYLOAD_TMP_PATH}/binaries.ini"
-                   # compress
-                   COMMAND ${Java_JAR_EXECUTABLE} cfvM "${_ZIP_PATH}/${_ZIP_NAME}" -C "${PAYLOAD_TMP_PATH}" .
-                   # remove temporary files
-                   COMMAND ${CMAKE_COMMAND} -E remove_directory "${PAYLOAD_TMP_PATH}"
-                   DEPENDS prepare_ctd_payload_tmp_bin)
-
-# ============================================================================
-# Targets for creating Eclipse plugin files.
-# ============================================================================
-
-# ----------------------------------------------------------------------------
-# Copy static files (LICENSE etc.)
-# ----------------------------------------------------------------------------
-
-add_custom_target (prepare_ctd_static_files
-                   COMMAND ${CMAKE_COMMAND} -E make_directory ${WORKFLOW_PLUGIN_DIR}
-                   COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/util/cmake/ctd/COPYRIGHT" "${WORKFLOW_PLUGIN_DIR}"
-                   COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/util/cmake/ctd/DESCRIPTION" "${WORKFLOW_PLUGIN_DIR}"
-                   COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/util/cmake/ctd/LICENSE" "${WORKFLOW_PLUGIN_DIR}"
-                   COMMAND ${CMAKE_COMMAND} -E make_directory ${CTD_PATH}
-                   COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/util/cmake/ctd/mimetypes.xml" "${CTD_PATH}")
-
-add_custom_target (prepare_ctd_icons
-                   COMMAND ${CMAKE_COMMAND} -E make_directory "${WORKFLOW_PLUGIN_DIR}/icons"
-                   COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_SOURCE_DIR}/util/cmake/ctd/icons" "${WORKFLOW_PLUGIN_DIR}/icons")
-
-# ----------------------------------------------------------------------------
-# Configure plugin.properties.
-# ----------------------------------------------------------------------------
-
-# If possible, get latest change date from SeqAn SVN.
-find_package(Subversion)
-if (Subversion_FOUND)
-  file (TO_CMAKE_PATH "${CMAKE_SOURCE_DIR}" _SEQAN_SOURCE_DIR)
-  Subversion_WC_INFO (${_SEQAN_SOURCE_DIR} SEQAN)
-  string(REGEX REPLACE "^([0-9]+)-([0-9]+)-([0-9]+) ([0-9]+):([0-9]+).*"
-    "\\1\\2\\3\\4\\5" SEQAN_LAST_CHANGE_DATE "${SEQAN_WC_LAST_CHANGED_DATE}")
-  set (CF_SEQAN_VERSION ${SEQAN_VERSION_STRING}.${SEQAN_LAST_CHANGE_DATE})
-else ()
-  set (CF_SEQAN_VERSION "${SEQAN_VERSION_STRING}")
-endif ()
-
-# Configure the file.
-add_custom_target (prepare_ctd_properties
-                   COMMAND ${CMAKE_COMMAND} -E make_directory ${CTD_PATH}
-                   COMMAND ${CMAKE_COMMAND} "-DSEQAN_SOURCE_DIR=${CMAKE_SOURCE_DIR}" "-DWORKFLOW_PLUGIN_DIR=${WORKFLOW_PLUGIN_DIR}"
-                                            "-DCF_SEQAN_VERSION=${CF_SEQAN_VERSION}"
-                                            -P "${CMAKE_SOURCE_DIR}/util/cmake/ctd/configure_profile_properties.cmake")
-
-# ----------------------------------------------------------------------------
-# Create *.ctd files.
-# ----------------------------------------------------------------------------
-
-add_custom_target (prepare_ctd_ctds
-                   DEPENDS ${PREPARE_CTD_CTDS_TARGETS})
-
-# ============================================================================
-# Top-level target
-# ============================================================================
-
-# Depends on all targets for preparing the workflow plugin.
+add_custom_command (OUTPUT ${_ZIP_PATH}/${_ZIP_NAME}
+                    COMMAND ${Java_JAR_EXECUTABLE} cfvM ${_ZIP_PATH}/${_ZIP_NAME} -C ${PAYLOAD_TMP_PATH} .
+                    DEPENDS ${PAYLOAD_PATH}
+                            ${TMP_PAYLOAD_FILES}
+                            ${PAYLOAD_TMP_PATH}/binaries.ini)
+
+# ============================================================================
+# CTDs and other descriptors contents.
+# ============================================================================
+
+# descriptors/mimetypes.xml
+add_custom_command (OUTPUT ${CTD_PATH}/mimetypes.xml
+                    COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/util/cmake/ctd/mimetypes.xml"
+                                                     "${CTD_PATH}/mimetypes.xml"
+                    DEPENDS ${CTD_PATH}
+                            ${CMAKE_SOURCE_DIR}/util/cmake/ctd/mimetypes.xml)
+list (APPEND DESCRIPTOR_FILES ${CTD_PATH}/mimetypes.xml)
+
+# *.ctd
+foreach (_BINARY ${SEQAN_CTD_EXECUTABLES})
+  set (_BINARY_PATH "${SEQAN_BIN_DIR}/${_BINARY}")
+  if (WIN32)
+    set (_BINARY_PATH "${_BINARY_PATH}.exe")
+  endif ()
+
+  add_custom_command (OUTPUT ${CTD_PATH}/${_BINARY}.ctd
+                      COMMAND ${_BINARY_PATH} --write-ctd "${CTD_PATH}/${_BINARY}.ctd"
+                      DEPENDS ${_CTD_PATH}
+                              ${_BINARY})
+  list (APPEND DESCRIPTOR_FILES ${CTD_PATH}/${_BINARY}.ctd)
+endforeach ()
+
+# ============================================================================
+# Static Files.
+# ============================================================================
+
+# Static files in plugin root.
+foreach (_FILE COPYRIGHT DESCRIPTION LICENSE)
+  add_custom_command (OUTPUT ${WORKFLOW_PLUGIN_DIR}/${_FILE}
+                      COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/util/cmake/ctd/${_FILE}"
+                                                       "${WORKFLOW_PLUGIN_DIR}/${_FILE}"
+                      DEPENDS ${WORKFLOW_PLUGIN_DIR}
+                              ${CMAKE_SOURCE_DIR}/util/cmake/ctd/${_FILE})
+  list (APPEND STATIC_FILES ${WORKFLOW_PLUGIN_DIR}/${_FILE})
+endforeach ()
+
+# Icon files.
+foreach (_FILE category.png splash.png)
+  add_custom_command (OUTPUT ${WORKFLOW_PLUGIN_DIR}/icons/${_FILE}
+                      COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/util/cmake/ctd/icons/${FILE}
+                                                       ${WORKFLOW_PLUGIN_DIR}/icons/${_FILE}
+                      DEPENDS ${WORKFLOW_PLUGIN_DIR}/icons
+                              ${CMAKE_SOURCE_DIR}/util/cmake/ctd/icons/${FILE})
+  list (APPEND ICON_FILES ${WORKFLOW_PLUGIN_DIR}/icons/${_FILE})
+endforeach ()
+
+# ============================================================================
+# Master target.
+# ============================================================================

 add_custom_target (prepare_workflow_plugin
-                   DEPENDS prepare_ctd_payload prepare_ctd_static_files
-                           prepare_ctd_properties prepare_ctd_ctds prepare_ctd_icons)
+                   DEPENDS ${DESCRIPTOR_FILES}
+                           ${STATIC_FILES}
+                           ${ICON_FILES}
+                           ${_ZIP_PATH}/${_ZIP_NAME})
+


Updates for mingw support. Make sure CXXFLAGS are checked if exported to environment before build.

--- cmake/EthCompilerSettings.cmake
+++ cmake/EthCompilerSettings.cmake
@@ -3,7 +3,7 @@
 # C++11 check and activation
 if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")

-	set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra -Werror -DSHAREDLIB -fPIC")
+	set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra -Werror -DSHAREDLIB -fPIC ${CMAKE_CXX_FLAGS}")
 	set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g -DETH_DEBUG")
 	set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG -DETH_RELEASE")
 	set(CMAKE_CXX_FLAGS_RELEASE        "-O3 -DNDEBUG -DETH_RELEASE")


Remove -c option from svnversion command.  https://tracker.physiomeproject.org/show_bug.cgi?id=3439

--- cmake/FunctionDefinitions.cmake
+++ cmake/FunctionDefinitions.cmake
@@ -8,7 +8,7 @@
 			DOC "Tortiose SVN Working Copy client" )
 	ENDIF( NOT SVNVERSION_EXECUTABLE )
 	IF( SVNVERSION_EXECUTABLE )
-		EXECUTE_PROCESS(COMMAND ${SVNVERSION_EXECUTABLE} -c ${DIR}
+		EXECUTE_PROCESS(COMMAND ${SVNVERSION_EXECUTABLE} ${DIR}
 			OUTPUT_VARIABLE VARIABLE
 			OUTPUT_STRIP_TRAILING_WHITESPACE)
 		STRING( REPLACE ":" "-" VARIABLE ${VARIABLE} )


Update the CMake library dependencies. These shifts are the result of
Evan's recent refactorings (I believe). Specifically, MCDisassembler no
longer depends on Target, and ARMDisassembler no longer depends on
CodeGen. The added dependencies from ARMAsmParser to ARMDesc looks
correct based on header file inclusion.

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

--- cmake/modules/LLVMLibDeps.cmake
+++ cmake/modules/LLVMLibDeps.cmake
@@ -1,8 +1,8 @@
-set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMCodeGen LLVMARMInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMCodeGen LLVMARMDesc LLVMARMInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMAsmPrinter LLVMARMDesc LLVMARMInfo LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMARMDesc LLVMARMInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMARMDisassembler LLVMARMCodeGen LLVMARMDesc LLVMARMInfo LLVMMC LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMARMDisassembler LLVMARMDesc LLVMARMInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMARMInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMAlphaCodeGen LLVMAlphaDesc LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMAlphaDesc LLVMAlphaInfo LLVMMC)
@@ -38,7 +38,7 @@
 set(MSVC_LIB_DEPS_LLVMMBlazeDisassembler LLVMMBlazeCodeGen LLVMMBlazeDesc LLVMMBlazeInfo LLVMMC)
 set(MSVC_LIB_DEPS_LLVMMBlazeInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMMCDisassembler LLVMARMAsmParser LLVMARMCodeGen LLVMARMDesc LLVMARMDisassembler LLVMARMInfo LLVMAlphaCodeGen LLVMAlphaDesc LLVMAlphaInfo LLVMBlackfinCodeGen LLVMBlackfinDesc LLVMBlackfinInfo LLVMCBackend LLVMCBackendInfo LLVMCellSPUCodeGen LLVMCellSPUDesc LLVMCellSPUInfo LLVMCppBackend LLVMCppBackendInfo LLVMMBlazeAsmParser LLVMMBlazeCodeGen LLVMMBlazeDesc LLVMMBlazeDisassembler LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMMSP430CodeGen LLVMMSP430Desc LLVMMSP430Info LLVMMipsCodeGen LLVMMipsDesc LLVMMipsInfo LLVMPTXCodeGen LLVMPTXDesc LLVMPTXInfo LLVMPowerPCCodeGen LLVMPowerPCDesc LLVMPowerPCInfo LLVMSparcCodeGen LLVMSparcDesc LLVMSparcInfo LLVMSupport LLVMSystemZCodeGen LLVMSystemZDesc LLVMSystemZInfo LLVMTarget LLVMX86AsmParser LLVMX86CodeGen LLVMX86Desc LLVMX86Disassembler LLVMX86Info LLVMXCoreCodeGen LLVMXCoreDesc LLVMXCoreInfo)
+set(MSVC_LIB_DEPS_LLVMMCDisassembler LLVMARMAsmParser LLVMARMCodeGen LLVMARMDesc LLVMARMDisassembler LLVMARMInfo LLVMAlphaCodeGen LLVMAlphaDesc LLVMAlphaInfo LLVMBlackfinCodeGen LLVMBlackfinDesc LLVMBlackfinInfo LLVMCBackend LLVMCBackendInfo LLVMCellSPUCodeGen LLVMCellSPUDesc LLVMCellSPUInfo LLVMCppBackend LLVMCppBackendInfo LLVMMBlazeAsmParser LLVMMBlazeCodeGen LLVMMBlazeDesc LLVMMBlazeDisassembler LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMMSP430CodeGen LLVMMSP430Desc LLVMMSP430Info LLVMMipsCodeGen LLVMMipsDesc LLVMMipsInfo LLVMPTXCodeGen LLVMPTXDesc LLVMPTXInfo LLVMPowerPCCodeGen LLVMPowerPCDesc LLVMPowerPCInfo LLVMSparcCodeGen LLVMSparcDesc LLVMSparcInfo LLVMSupport LLVMSystemZCodeGen LLVMSystemZDesc LLVMSystemZInfo LLVMX86AsmParser LLVMX86CodeGen LLVMX86Desc LLVMX86Disassembler LLVMX86Info LLVMXCoreCodeGen LLVMXCoreDesc LLVMXCoreInfo)
 set(MSVC_LIB_DEPS_LLVMMCJIT LLVMCore LLVMExecutionEngine LLVMRuntimeDyld LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMCParser LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMMC LLVMSupport)


Compile all standard library as Swift 3 mode.

--- cmake/modules/SwiftSource.cmake
+++ cmake/modules/SwiftSource.cmake
@@ -269,7 +269,7 @@
   endif()

   # Force swift 3 compatibility mode for Standard Library and overlay.
-  if (SWIFTFILE_IS_STDLIB_CORE OR SWIFTFILE_IS_SDK_OVERLAY)
+  if (SWIFTFILE_IS_STDLIB OR SWIFTFILE_IS_SDK_OVERLAY)
     list(APPEND swift_flags "-swift-version" "3")
   endif()


updated shell env set to use registry under windows

--- cmake/shell/shell_env_set.cmake
+++ cmake/shell/shell_env_set.cmake
@@ -3,14 +3,21 @@
 # sets a system wide environment variable
 # the variable will not be available until a new console is started
 function(shell_env_set key value)
+  if(WIN32)
+    reg_write_value("HKCU/Environment" "${key}" "${value}")
+    message("environment variable '${key}' was written, it will be available as soon as you restart your shell")
+    return()
+  endif()
+
+
   shell_get()
   ans(shell)
-  if("${shell}" STREQUAL "cmd")
-    shell("SETX ${key} ${value}")
-  elseif("${shell}" STREQUAL "bash")
+
+  if("${shell}" STREQUAL "bash")
     home_path(.bashrc)
     ans(path)
     fappend("${path}" "\nexport ${key}=${value}")
+    message("environment variable '${key}' was exported in .bashrc it will be available as soon as your restart your shell")
   else()
     message(WARNING "shell_set_env not implemented")
   endif()


Appended the policy stack structure to the core/policy.

--- core/policy.cmake
+++ core/policy.cmake
@@ -25,3 +25,17 @@
   list: a;b;;c
   length: 4
 ]]
+
+# Policy stack structure
+cmake_policy(SET CMP0007 NEW)
+cmake_policy(GET CMP0007 current_behavior)
+message("CMP0007: ${current_behavior}") # CMP0007: NEW
+
+cmake_policy(PUSH) # Push the current policy settings
+  cmake_policy(SET CMP0007 OLD)
+  cmake_policy(GET CMP0007 current_behavior)
+  message("CMP0007: ${current_behavior}") # CMP0007: OLD
+cmake_policy(POP) # Pop the previous policy settings
+
+cmake_policy(GET CMP0007 current_behavior)
+message("CMP0007: ${current_behavior}") # CMP0007: NEW


Fix install of dependencies (including Boost) into sdk area on OS X

--HG--
branch : v1-7

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -10,20 +10,9 @@
 #####################################################
 # Install dependencies
 #####################################################
-
-if (UNIX)
+if ((NOT APPLE) AND (NOT WIN32))
   return()
 endif()
-
-# determine if we have a common dependencies folder to install from.
-# this is not a fool-proof test, but it should be good enough.
-get_filename_component(OGRE_DEP1_DIR ${FREETYPE_INCLUDE_DIR}/../ ABSOLUTE)
-get_filename_component(OGRE_DEP2_DIR ${ZLIB_INCLUDE_DIR}/../ ABSOLUTE)
-if (OGRE_DEP1_DIR STREQUAL OGRE_DEP2_DIR)
-  set(OGRE_DEP_DIR ${OGRE_DEP1_DIR})
-else ()
-  return()
-endif ()

 option(OGRE_INSTALL_DEPENDENCIES "Install dependency libs needed for samples" TRUE)
 option(OGRE_COPY_DEPENDENCIES "Copy dependency libs to the build directory" TRUE)


Enable testing on new projects

Enable testing on new projects

--- CMakeTools/ModuleBuildApp.cmake
+++ CMakeTools/ModuleBuildApp.cmake
@@ -16,6 +16,10 @@
 ELSE ( APPLE )
 	SET( CMAKE_CXX_FLAGS "-std=c++11 -static-libgcc -static-libstdc++ -static -U__STRICT_ANSI__" )
 ENDIF ( APPLE )
+
+IF ( CRIMILD_ENABLE_TESTS )
+	ENABLE_TESTING()
+ENDIF ( CRIMILD_ENABLE_TESTS )

 FOREACH( ITR ${CRIMILD_APP_SOURCE_DIRECTORIES} )
 	FILE( GLOB_RECURSE TMP_FILES "${ITR}/*.hpp" )


Bundle assets for emscripten

Bundle assets for emscripten

--- CMakeTools/ModuleBuildApp.cmake
+++ CMakeTools/ModuleBuildApp.cmake
@@ -5,6 +5,8 @@
 # - CRIMILD_APP_SOURCE_DIRECTORIES: (Required) Base directory for sources
 # - CRIMILD_APP_INCLUDE_DIRECTORIES: (Required) Base directory for includes
 # - CRIMILD_APP_TARGET_PROPERTIES: (Optional) Additional properties for the app
+# - CRIMILD_APP_ASSETS_DIRECTORY: (Optional) Name of the assets directory, relative to source path
+# - CRIMILD_APP_INDEX_FILE: (Optional) For Emscripten. Path to the index.html file

 MESSAGE( "Configuring ${CRIMILD_APP_NAME} app" )

@@ -234,6 +236,12 @@
 	${CRIMILD_APP_SOURCE_FILES}
 	${CRIMILD_APP_HEADER_FILES} )

+IF ( NOT CRIMILD_APP_ASSETS_DIRECTORY )
+   IF ( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/assets )
+   	  SET ( CRIMILD_APP_ASSETS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/assets )
+   ENDIF ()
+ENDIF ()
+
 IF ( CRIMILD_BUNDLE_APPS )
 	IF ( APPLE )
 	   INCLUDE( MacroBundleAppOSX )
@@ -257,3 +265,25 @@

 ADD_DEPENDENCIES( ${CRIMILD_APP_NAME} ${CRIMILD_APP_DEPENDENCIES} )

+IF ( ${CMAKE_SYSTEM_NAME} MATCHES "Emscripten" )
+    IF ( NOT CRIMILD_APP_INDEX_FILE )
+   	  IF ( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${CRIMILD_APP_SOURCE_DIRECTORY}/index.html )
+   	  	 SET ( CRIMILD_APP_INDEX_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${CRIMILD_APP_SOURCE_DIRECTORY}/index.html )
+   	  ENDIF ()
+    ENDIF ()
+
+	MESSAGE( "Assets: ${CRIMILD_APP_ASSETS_DIRECTORY}" )
+	MESSAGE( "Index: ${CRIMILD_APP_INDEX_FILE}" )
+
+    IF ( CRIMILD_APP_ASSETS_DIRECTORY )
+	    SET_TARGET_PROPERTIES( ${CRIMILD_APP_NAME} PROPERTIES LINK_FLAGS "-s DEMANGLE_SUPPORT=1 -s ALLOW_MEMORY_GROWTH=1 -s --preload-file ${CRIMILD_APP_ASSETS_DIRECTORY}" )
+		FILE ( INSTALL ${CRIMILD_APP_ASSETS_DIRECTORY} DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+	ELSE ()
+	    SET_TARGET_PROPERTIES( ${CRIMILD_APP_NAME} PROPERTIES LINK_FLAGS "-s DEMANGLE_SUPPORT=1 -s ALLOW_MEMORY_GROWTH=1" )
+	ENDIF ()
+
+	IF ( CRIMILD_APP_INDEX_FILE )
+       CONFIGURE_FILE( ${CRIMILD_APP_INDEX_FILE} ${CMAKE_CURRENT_BINARY_DIR} COPYONLY )
+	ENDIF ()
+ENDIF ()
+


Fixed syntax for cmake Setup.cmake

Fixed syntax for cmake Setup.cmake

--- Jackal/Source/CMake/Setup.cmake
+++ Jackal/Source/CMake/Setup.cmake
@@ -3,4 +3,4 @@

 set(JACKAL_ENGINE_DIRECTORY "JackalEngineDirectory")

-add_subdirectory(core)
+add_subdirectory(Core)


[Config] Added support for Python 3.10

[Config] Added support for Python 3.10

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


cmake utils improved

cmake utils improved

--- cmake/DuneUtils.cmake
+++ cmake/DuneUtils.cmake
@@ -1,6 +1,8 @@
 MACRO(ADD_CXX_FLAGS)
-	ADD_DEFINITIONS(${ARGN})
-	LIST(APPEND MY_CXX_FLAGS ${ARGN} )
+	FOREACH( ARG ${ARGN} )
+		ADD_DEFINITIONS(${ARG})
+		LIST(APPEND MY_CXX_FLAGS ${ARG} )
+	ENDFOREACH( ARG )
 ENDMACRO(ADD_CXX_FLAGS)

 MACRO(INCLUDE_DIR)
@@ -34,6 +36,11 @@
 	ADD_EXECUTABLE(${target} ${sources} ${headers} ${DUNE_HEADERS} )
 	#for some $@#&& reason these targets DO NOT inherit flags added via TARGET_LINK_LIBRARIES nor INCLUDE_DIRECTORIES
 	#so we need some magic to readd them
+	get_target_property(tmp_flags ${target} COMPILE_FLAGS  )
+	if( NOT ${tmp_flags} )
+		set( tmp_flags "" )
+	endif( NOT ${tmp_flags} )
+	LIST(APPEND MY_CXX_FLAGS ${tmp_flags} )
 	foreach(arg ${MY_CXX_FLAGS} )
 		set(bar "${bar} ${arg}")
 	endforeach(arg ${MY_CXX_FLAGS} )
@@ -42,9 +49,10 @@
 # 	if( NOT ${tmp_flags} )
 # 		set( tmp_flags "" )
 # 	endif( NOT ${tmp_flags} )
-# 	message(STATUS ${tmp_flags} )
+# # 	message(STATUS ${tmp_flags} )
 # 	set( tmp_flags "${bar} ${tmp_flags}" )
 # 	set_target_properties( ${target} PROPERTIES LINK_FLAGS  ${tmp_flags} )
+	TARGET_LINK_LIBRARIES(${target} ${libs} )

 	add_dependencies( ${target} config_refresh )
 ENDMACRO( ADD_DUNE_EXECUTABLE )


* Fix build on Arch-Linux

* Fix build on Arch-Linux

--- cmake/add_boost.cmake
+++ cmake/add_boost.cmake
@@ -148,7 +148,8 @@
 elseif(UNIX)
   list(APPEND b2Args variant=release cxxflags=-fPIC cxxflags=-std=c++11 -sNO_BZIP2=1 --layout=tagged)
   # Need to configure the toolset based on whatever version CMAKE_CXX_COMPILER is
-  string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]" ToolsetVer "${CMAKE_CXX_COMPILER_VERSION}")
+  string(REGEX MATCH "([0-9]+\\.)?(\\*|[0-9]+)" ToolsetVer "${CMAKE_CXX_COMPILER_VERSION}")
+  #message(FATAL_ERROR "ToolsetVer: ${ToolsetVer}")
   if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
     list(APPEND b2Args toolset=clang-${ToolsetVer})
     if(HAVE_LIBC++)


iOS doesn't have histedit.h available. We should gate use of libedit on whether or not this headers exists.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -79,6 +79,7 @@

 check_include_file(mach/mach.h HAVE_MACH_MACH_H)
 check_include_file(mach-o/dyld.h HAVE_MACH_O_DYLD_H)
+check_include_file(histedit.h HAVE_HISTEDIT_H)

 # size_t must be defined before including cxxabi.h on FreeBSD 10.0.
 check_cxx_source_compiles("
@@ -110,7 +111,9 @@
   else()
     set(HAVE_LIBZ 0)
   endif()
-  check_library_exists(edit el_init "" HAVE_LIBEDIT)
+  if (HAVE_HISTEDIT_H)
+    check_library_exists(edit el_init "" HAVE_LIBEDIT)
+  endif()
   if(LLVM_ENABLE_TERMINFO)
     set(HAVE_TERMINFO 0)
     foreach(library tinfo terminfo curses ncurses ncursesw)


Fixed cmake script

Fixed cmake script

--- cmake/dev/gtest.cmake
+++ cmake/dev/gtest.cmake
@@ -14,7 +14,7 @@
                 # Add environment
                 if(WIN32)
                     set_tests_properties(${GTEST_GROUP_NAME}.${GTEST_NAME} PROPERTIES ENVIRONMENT
-                        "PATH=${PROJECT_BINARY_DIR}/lib\\;${fastcdr_LIB_DIR}\\;${Boost_LIBRARY_DIR_RELEASE}\\;$ENV{PATH}")
+                        "PATH=${PROJECT_BINARY_DIR}/lib\\;${fastcdr_LIB_DIR}\\;${BOOST_LIBRARYDIR}\\;$ENV{PATH}")
                 endif()
             endforeach()
         endforeach()
@@ -23,7 +23,7 @@
         # Add environment
         if(WIN32)
             set_tests_properties(${test} PROPERTIES ENVIRONMENT
-                "PATH=${PROJECT_BINARY_DIR}/lib\\;${fastcdr_LIB_DIR}\\;${Boost_LIBRARY_DIR}\\;$ENV{PATH}")
+                "PATH=${PROJECT_BINARY_DIR}/lib\\;${fastcdr_LIB_DIR}\\;${BOOST_LIBRARYDIR}\\;$ENV{PATH}")
         endif()
     endif()
 endmacro()


Convert toolchain prefix to CMake-style path, and quote usages.

Fixes space-including paths, such as the default install path for
the GCC ARM toolset on Windows.

--- cmake/gcc_stm32.cmake
+++ cmake/gcc_stm32.cmake
@@ -6,6 +6,8 @@
 IF(NOT TOOLCHAIN_PREFIX)
      SET(TOOLCHAIN_PREFIX "/usr")
      MESSAGE(STATUS "No TOOLCHAIN_PREFIX specified, using default: " ${TOOLCHAIN_PREFIX})
+ELSE()
+     FILE(TO_CMAKE_PATH "${TOOLCHAIN_PREFIX}" TOOLCHAIN_PREFIX)
 ENDIF()

 IF(NOT TARGET_TRIPLET)
@@ -25,15 +27,15 @@
     ENDIF()
 ENDIF()

-STRING(TOUPPER ${STM32_FAMILY} STM32_FAMILY)
-LIST(FIND STM32_SUPPORTED_FAMILIES ${STM32_FAMILY} FAMILY_INDEX)
+STRING(TOUPPER "${STM32_FAMILY}" STM32_FAMILY)
+LIST(FIND STM32_SUPPORTED_FAMILIES "${STM32_FAMILY}" FAMILY_INDEX)
 IF(FAMILY_INDEX EQUAL -1)
     MESSAGE(FATAL_ERROR "Invalid/unsupported STM32 family: ${STM32_FAMILY}")
 ENDIF()

-SET(TOOLCHAIN_BIN_DIR ${TOOLCHAIN_PREFIX}/bin)
-SET(TOOLCHAIN_INC_DIR ${TOOLCHAIN_PREFIX}/${TARGET_TRIPLET}/include)
-SET(TOOLCHAIN_LIB_DIR ${TOOLCHAIN_PREFIX}/${TARGET_TRIPLET}/lib)
+SET(TOOLCHAIN_BIN_DIR "${TOOLCHAIN_PREFIX}/bin")
+SET(TOOLCHAIN_INC_DIR "${TOOLCHAIN_PREFIX}/${TARGET_TRIPLET}/include")
+SET(TOOLCHAIN_LIB_DIR "${TOOLCHAIN_PREFIX}/${TARGET_TRIPLET}/lib")

 SET(CMAKE_SYSTEM_NAME Generic)
 SET(CMAKE_SYSTEM_PROCESSOR arm)
@@ -46,20 +48,20 @@

 IF(${CMAKE_VERSION} VERSION_LESS 3.6.0)
     INCLUDE(CMakeForceCompiler)
-    CMAKE_FORCE_C_COMPILER(${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-gcc${TOOL_EXECUTABLE_SUFFIX} GNU)
-    CMAKE_FORCE_CXX_COMPILER(${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-g++${TOOL_EXECUTABLE_SUFFIX} GNU)
+    CMAKE_FORCE_C_COMPILER("${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-gcc${TOOL_EXECUTABLE_SUFFIX}" GNU)
+    CMAKE_FORCE_CXX_COMPILER("${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-g++${TOOL_EXECUTABLE_SUFFIX}" GNU)
 ELSE()
     SET(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
-    SET(CMAKE_C_COMPILER ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-gcc${TOOL_EXECUTABLE_SUFFIX})
-    SET(CMAKE_CXX_COMPILER ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-g++${TOOL_EXECUTABLE_SUFFIX})
-ENDIF()
-SET(CMAKE_ASM_COMPILER ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-gcc${TOOL_EXECUTABLE_SUFFIX})
-
-SET(CMAKE_OBJCOPY ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-objcopy${TOOL_EXECUTABLE_SUFFIX} CACHE INTERNAL "objcopy tool")
-SET(CMAKE_OBJDUMP ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-objdump${TOOL_EXECUTABLE_SUFFIX} CACHE INTERNAL "objdump tool")
-SET(CMAKE_SIZE ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-size${TOOL_EXECUTABLE_SUFFIX} CACHE INTERNAL "size tool")
-SET(CMAKE_DEBUGER ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-gdb${TOOL_EXECUTABLE_SUFFIX} CACHE INTERNAL "debuger")
-SET(CMAKE_CPPFILT ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-c++filt${TOOL_EXECUTABLE_SUFFIX} CACHE INTERNAL "C++filt")
+    SET(CMAKE_C_COMPILER "${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-gcc${TOOL_EXECUTABLE_SUFFIX}")
+    SET(CMAKE_CXX_COMPILER "${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-g++${TOOL_EXECUTABLE_SUFFIX}")
+ENDIF()
+SET(CMAKE_ASM_COMPILER "${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-gcc${TOOL_EXECUTABLE_SUFFIX}")
+
+SET(CMAKE_OBJCOPY "${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-objcopy${TOOL_EXECUTABLE_SUFFIX}" CACHE INTERNAL "objcopy tool")
+SET(CMAKE_OBJDUMP "${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-objdump${TOOL_EXECUTABLE_SUFFIX}" CACHE INTERNAL "objdump tool")
+SET(CMAKE_SIZE "${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-size${TOOL_EXECUTABLE_SUFFIX}" CACHE INTERNAL "size tool")
+SET(CMAKE_DEBUGER "${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-gdb${TOOL_EXECUTABLE_SUFFIX}" CACHE INTERNAL "debuger")
+SET(CMAKE_CPPFILT "${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-c++filt${TOOL_EXECUTABLE_SUFFIX}" CACHE INTERNAL "C++filt")

 SET(CMAKE_C_FLAGS_DEBUG "-Og -g" CACHE INTERNAL "c compiler flags debug")
 SET(CMAKE_CXX_FLAGS_DEBUG "-Og -g" CACHE INTERNAL "cxx compiler flags debug")
@@ -71,7 +73,7 @@
 SET(CMAKE_ASM_FLAGS_RELEASE "" CACHE INTERNAL "asm compiler flags release")
 SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "-flto" CACHE INTERNAL "linker flags release")

-SET(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN_PREFIX}/${TARGET_TRIPLET} ${EXTRA_FIND_PATH})
+SET(CMAKE_FIND_ROOT_PATH "${TOOLCHAIN_PREFIX}/${TARGET_TRIPLET}" ${EXTRA_FIND_PATH})
 SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
 SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
 SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)


Added do not modify warning to header.

Added do not modify warning to header.

--- modules/tests/tests_config.hpp.cmake
+++ modules/tests/tests_config.hpp.cmake
@@ -1,6 +1,10 @@
 #pragma once
 #include <string>

-// Root data directory for test datasets
+/// This header is automatically generated.  Do not modify.
+/// Contains information about datasets for running tests.
+
+
+/// Root data directory for test datasets
 const static std::string s_test_data_dir = "@CMAKE_SOURCE_DIR@/data/";


Make title identical to corresponding C example (even though a differently
named wrapper for plsfci is used for the thick interface).  The point here
is to get identical PostScript file results.

svn path=/trunk/; revision=8496

--- examples/ada/xthick23a.adb.cmake
+++ examples/ada/xthick23a.adb.cmake
@@ -379,7 +379,7 @@
         if page = 11 then
             Write_Text_Viewport("t", 1.5, 0.5, 0.5,
             "#<0x10>PLplot Example 23 - " &
-            "Set Font with Set_Font_Characterization_Integer");
+            "Set Font with plsfci");
         elsif page = 12 then
             Write_Text_Viewport("t", 1.5, 0.5, 0.5,
             "#<0x10>PLplot Example 23 - " &


WIP: try v5 commit

WIP: try v5 commit

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -148,7 +148,7 @@

   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITK.git)
-  set(${proj}_GIT_TAG c5138560409c75408ff76bccff938f21e5dcafc6) ##
+  set(${proj}_GIT_TAG 902c9d0e0a2d8349796b1b2b805fd94648e8a197) ##
   set(ITK_VERSION_ID ITK-4.12) ### NOTE: When updating GIT_TAG, also update ITK_VERSION_ID

   ExternalProject_Add(${proj}


CMake: updated copy_required_dlls to take D3Dcompiler_47.dll from Win SDK

--- BuildUtils.cmake
+++ BuildUtils.cmake
@@ -27,14 +27,15 @@
         # Copy D3Dcompiler_47.dll and dxcompiler.dll
         if(MSVC)
             if (${CMAKE_SIZEOF_VOID_P} EQUAL 8)
-                set(D3D_COMPILER_PATH "\"$(VC_ExecutablePath_x64_x64)\\D3Dcompiler_47.dll\"")
-                set(DXC_COMPILER_PATH "\"$(WindowsSdkDir)\\bin\\${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}\\x64\\dxcompiler.dll\"")
-                set(DXIL_SIGNER_PATH  "\"$(WindowsSdkDir)\\bin\\${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}\\x64\\dxil.dll\"")
+                set(WIN_SDK_BIN_PATH "$(WindowsSdkDir)\\bin\\${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}\\x64")
             else()
-                set(D3D_COMPILER_PATH "\"$(VC_ExecutablePath_x86_x86)\\D3Dcompiler_47.dll\"")
-                set(DXC_COMPILER_PATH "\"$(WindowsSdkDir)\\bin\\${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}\\x86\\dxcompiler.dll\"")
-                set(DXIL_SIGNER_PATH  "\"$(WindowsSdkDir)\\bin\\${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}\\x86\\dxil.dll\"")
+                set(WIN_SDK_BIN_PATH "$(WindowsSdkDir)\\bin\\${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}\\x86")
             endif()
+
+            set(D3D_COMPILER_PATH "\"${WIN_SDK_BIN_PATH}\\D3Dcompiler_47.dll\"")
+            set(DXC_COMPILER_PATH "\"${WIN_SDK_BIN_PATH}\\dxcompiler.dll\"")
+            set(DXIL_SIGNER_PATH  "\"${WIN_SDK_BIN_PATH}\\dxil.dll\"")
+
             add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
                 COMMAND ${CMAKE_COMMAND} -E copy_if_different
                     ${D3D_COMPILER_PATH}


ENH: Dashboard submission mechanism has been changed to HTTP instead of FTP.

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -4,7 +4,7 @@

 # Dart server to submit results (used by client)
 IF(NOT DROP_METHOD)
-  SET (DROP_METHOD "ftp")
+  SET (DROP_METHOD "http")
 ENDIF(NOT DROP_METHOD)
 IF(DROP_METHOD MATCHES http)
   SET (DROP_SITE "public.kitware.com")


OSX: silence the GL depreciation warning

--- cmake-toolchains/osx.cmake
+++ cmake-toolchains/osx.cmake
@@ -18,6 +18,9 @@

 # FIXME: define standard frame works that are always linked
 set(FIPS_OSX_STANDARD_FRAMEWORKS Foundation IOKit)
+
+# globally silence the GL depreciation warning
+add_definitions(-DGL_SILENCE_DEPRECATION)

 # compiler flags
 set(CMAKE_CXX_FLAGS "-std=c++11 -fstrict-aliasing -Wno-expansion-to-defined -Wno-multichar -Wall -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-unused-volatile-lvalue -Wno-deprecated-writable-strings")


Don't silence standard out for brew --prefix

--- cmake/FindQScintilla.cmake
+++ cmake/FindQScintilla.cmake
@@ -39,7 +39,6 @@
         COMMAND "${BREW_EXECUTABLE}" "--prefix" "qscintilla2"
         RESULT_VARIABLE BREW_PREFIX_RESULT
         OUTPUT_VARIABLE BREW_PREFIX_OUTPUT
-        OUTPUT_QUIET
         ERROR_QUIET
       )


Simplify and improve WindowsSDK finder.

Simplify and improve WindowsSDK finder.

--- cmake/FindWindowsSDK.cmake
+++ cmake/FindWindowsSDK.cmake
@@ -39,11 +39,23 @@
 # (See accompanying file LICENSE_1_0.txt or copy at
 # http://www.boost.org/LICENSE_1_0.txt)

-set(_preferred_sdk_dirs)
-set(_win_sdk_dirs)
-set(_win_sdk_versanddirs)
-if(MSVC_VERSION GREATER 1310) # Newer than VS .NET/VS Toolkit 2003
-
+set(_preferred_sdk_dirs) # pre-output
+set(_win_sdk_dirs) # pre-output
+set(_win_sdk_versanddirs) # pre-output
+set(_winsdk_vistaonly) # search parameters
+set(_winsdk_kits) # search parameters
+
+# Appends to the two main pre-output lists used only if the path exists
+macro(_winsdk_conditional_append _vername _path)
+	if(EXISTS "${_path}")
+		list(APPEND _win_sdk_dirs "${_path}")
+		list(APPEND
+			_win_sdk_versanddirs
+			"${_vername}"
+			"${_path}")
+	endif()
+endmacro()
+if(MSVC AND MSVC_VERSION GREATER 1310) # Newer than VS .NET/VS Toolkit 2003
 	# Environment variable for SDK dir
 	if(EXISTS "$ENV{WindowsSDKDir}" AND (NOT "$ENV{WindowsSDKDir}" STREQUAL ""))
 		message(STATUS "Got $ENV{WindowsSDKDir} - Windows/Platform SDK directories: ${_win_sdk_dirs}")
@@ -68,42 +80,59 @@
 		endif()
 	endif()

+	# VC 10 and older has broad target support
 	if(MSVC_VERSION LESS 1700)
-		# VC 10 and older has broad target support
-		set(_winsdk_vistaonly)
+		# VC 11 by default targets Vista and later only, so we can add a few more SDKs that (might?) only work on vista+
+	elseif("${CMAKE_VS_PLATFORM_TOOLSET}" MATCHES "_xp")
+		# This is the XP-compatible v110+ toolset
+	elseif("${CMAKE_VS_PLATFORM_TOOLSET}" STREQUAL "v100" OR "${CMAKE_VS_PLATFORM_TOOLSET}" STREQUAL "v90")
+		# This is the VS2010/VS2008 toolset
 	else()
-		# VC 11 by default targets Vista and later only, so we can add a few more SDKs that (might?) only work on vista+
-		if("${CMAKE_VS_PLATFORM_TOOLSET}" MATCHES "_xp")
-			# This is the XP-compatible v110 toolset
-		elseif("${CMAKE_VS_PLATFORM_TOOLSET}" STREQUAL "v100")
-			# This is the VS2010 toolset
-		else()
-			if((NOT WINDOWSSDK_FOUND) AND (NOT WindowsSDK_FIND_QUIETLY))
-				message(STATUS "FindWindowsSDK: Detected Visual Studio 2012 or newer, not using the _xp toolset variant: including SDK versions that drop XP support in search!")
-			endif()
-			# These versions have no XP (and possibly Vista pre-SP1) support
-			set(_winsdk_vistaonly)
-			if(NOT MSVC_VERSION LESS 1800)
-				list(APPEND _winsdk_vistaonly
-					# Windows Software Development Kit (SDK) for Windows 8.1
-					# http://msdn.microsoft.com/en-gb/windows/desktop/bg162891
-					v8.1)
-			endif()
+		# OK, we're VC11 or newer and not using a backlevel or XP-compatible toolset.
+		# These versions have no XP (and possibly Vista pre-SP1) support
+		if((NOT WINDOWSSDK_FOUND) AND (NOT WindowsSDK_FIND_QUIETLY))
+			message(STATUS "FindWindowsSDK: Detected Visual Studio 2012 or newer, not using the _xp toolset variant: including SDK versions that drop XP support in search!")
+		endif()
+		if(NOT MSVC_VERSION LESS 1800)
+			# These require at least Visual Studio 2013 (VC12)
 			list(APPEND _winsdk_vistaonly
-				# Included in Visual Studio 2012
-				v8.0A
-
-				# Microsoft Windows SDK for Windows 8 and .NET Framework 4.5
-				# This is the first version to also include the DirectX SDK
-				# http://msdn.microsoft.com/en-US/windows/desktop/hh852363.aspx
-				v8.0
-
-				# Microsoft Windows SDK for Windows 7 and .NET Framework 4
-				# http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b
-				v7.1
-				)
-		endif()
-	endif()
+				v10.0A
+
+				# Windows Software Development Kit (SDK) for Windows 10
+				v10.0
+
+				# Windows Software Development Kit (SDK) for Windows 8.1
+				# http://msdn.microsoft.com/en-gb/windows/desktop/bg162891
+				v8.1)
+			list(APPEND _winsdk_kits
+				"Windows Kits 10:KitsRoot10"
+				"Windows Kits 8.1:KitsRoot81")
+		endif()
+		list(APPEND _winsdk_kits
+			"Windows Kits 8.0:KitsRoot")
+		list(APPEND _winsdk_vistaonly
+
+			# Included in Visual Studio 2012
+			v8.0A
+
+			# Microsoft Windows SDK for Windows 8 and .NET Framework 4.5
+			# This is the first version to also include the DirectX SDK
+			# http://msdn.microsoft.com/en-US/windows/desktop/hh852363.aspx
+			v8.0
+
+			# Microsoft Windows SDK for Windows 7 and .NET Framework 4
+			# http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b
+			v7.1
+			)
+	endif()
+	foreach(_winkit ${_winsdk_kits})
+		string(REGEX REPLACE "[^:]*:" "" _winkit_key "${_winkit}")
+		string(REGEX REPLACE ":[^:]*" "" _winkit_name "${_winkit}")
+		get_filename_component(_sdkdir
+			"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;${_winkit_key}]"
+			ABSOLUTE)
+		_winsdk_conditional_append("${_winkit_name}" "${_sdkdir}")
+	endforeach()
 	foreach(_winsdkver
 		${_winsdk_vistaonly}

@@ -144,16 +173,10 @@
 		get_filename_component(_sdkdir
 			"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\${_winsdkver};InstallationFolder]"
 			ABSOLUTE)
-		if(EXISTS "${_sdkdir}")
-			list(APPEND _win_sdk_dirs "${_sdkdir}")
-			list(APPEND
-				_win_sdk_versanddirs
-				"Windows SDK ${_winsdkver}"
-				"${_sdkdir}")
-		endif()
+		_winsdk_conditional_append("Windows SDK ${_winsdkver}" "${_sdkdir}")
 	endforeach()
 endif()
-if(MSVC_VERSION GREATER 1200)
+if(MSVC AND MSVC_VERSION GREATER 1200)
 	foreach(_platformsdkinfo
 		"D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1_Microsoft Platform SDK for Windows Server 2003 R2"
 		"8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3_Microsoft Platform SDK for Windows Server 2003 SP1")
@@ -163,10 +186,7 @@
 			get_filename_component(_sdkdir
 				"[${HIVE}\\SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\${_platformsdkguid};Install Dir]"
 				ABSOLUTE)
-			if(EXISTS "${_sdkdir}")
-				list(APPEND _win_sdk_dirs "${_sdkdir}")
-				list(APPEND _win_sdk_versanddirs "${_platformsdkname}" "${_sdkdir}")
-			endif()
+			_winsdk_conditional_append("${_platformsdkname}" "${_sdkdir}")
 		endforeach()
 	endforeach()
 endif()


Version information marked as advanced

Version information marked as advanced

--- cmake/MyPackageStart.cmake
+++ cmake/MyPackageStart.cmake
@@ -9,6 +9,12 @@
   SET (${_PROJECTNAME}_VERSION_MINOR ${versionMinor})
   SET (${_PROJECTNAME}_VERSION_PATCH ${versionPatch})
   SET (${_PROJECTNAME}_VERSION "${${_PROJECTNAME}_VERSION_MAJOR}.${${_PROJECTNAME}_VERSION_MINOR}.${${_PROJECTNAME}_VERSION_PATCH}")
+  MARK_AS_ADVANCED(
+    ${_PROJECTNAME}_VERSION_MAJOR
+    ${_PROJECTNAME}_VERSION_MINOR
+    ${_PROJECTNAME}_VERSION_PATH
+    ${_PROJECTNAME}_VERSION
+    )
   #
   # Options
   #


Includes *.hpp for install candidates

Includes *.hpp for install candidates

--- cmake/MyPackageStart.cmake
+++ cmake/MyPackageStart.cmake
@@ -143,7 +143,7 @@
   # We consider that every .h file in the include directory is to be installed
   # unless it is starting with an '_'.
   #
-  FILE (GLOB_RECURSE _include include/*.h)
+  FILE (GLOB_RECURSE _include include/*.h include/*.hpp)
   FOREACH (_file ${_include} )
     GET_FILENAME_COMPONENT(_basename ${_file} NAME)
     STRING (REGEX MATCH "^_" _hiden ${_basename})


CMake: opt-out of -fsanitize=unsigned-shift-base

--- cmake/compiler-flags.cmake
+++ cmake/compiler-flags.cmake
@@ -137,7 +137,7 @@

 set(ubsan "-fsanitize=undefined -fno-sanitize-recover=undefined")
 if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
-  set(ubsan "${ubsan} -fsanitize=integer -fno-sanitize-recover=integer")
+  set(ubsan "${ubsan} -fsanitize=integer -fno-sanitize-recover=integer -fno-sanitize=unsigned-shift-base")
 endif()

 SET(CMAKE_CXX_FLAGS_SANITIZE


Fix to create the doc directory on first build

--- cmake/doxygen_catkin.cmake
+++ cmake/doxygen_catkin.cmake
@@ -32,7 +32,8 @@
 ")
   endif()

-  set(doxygen_catkin_DOC_PATH "${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/doc")
+  set(doxygen_catkin_DOC_DIR "${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/doc")
+  file(MAKE_DIRECTORY ${doxygen_catkin_DOC_DIR})

   configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)

@@ -43,19 +44,19 @@
       # add a target to generate API documentation with Doxygen
       add_custom_target(doc
         ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
-        WORKING_DIRECTORY ${doxygen_catkin_DOC_PATH}
+        WORKING_DIRECTORY ${doxygen_catkin_DOC_DIR}
         COMMENT "Generating API documentation with Doxygen" VERBATIM
         )
     else()
       # add a target to generate API documentation with Doxygen
       add_custom_target(doc ALL
         ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
-        WORKING_DIRECTORY ${doxygen_catkin_DOC_PATH}
+        WORKING_DIRECTORY ${doxygen_catkin_DOC_DIR}
         COMMENT "Generating API documentation with Doxygen" VERBATIM
         )
     endif()

-    install(DIRECTORY ${doxygen_catkin_DOC_PATH} DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
+    install(DIRECTORY ${doxygen_catkin_DOC_DIR} DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
   else()
     message("Unable to find Doxygen. API Documentation will not be generated")
   endif()


CMake: Restore conditional specification of BUILD_BYPRODUCTS when using an older CMake

This was removed because the previous eigen CMake spec forced a new CMake version
but that was taken out in a previous commit

--- cmake/external_eigen.cmake
+++ cmake/external_eigen.cmake
@@ -21,14 +21,24 @@
 #----------------------------------------------------------------------------------------------------------

 # The 'BUILD_BYPRODUCTS' argument was introduced in CMake 3.2.
-ExternalProject_Add(
-    eigen
-    URL http://bitbucket.org/eigen/eigen/get/3.3.3.zip
-    # PREFIX ${CMAKE_CURRENT_BINARY_DIR}/eigen
-    UPDATE_COMMAND ""
-    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION}
-    BUILD_BYPRODUCTS "${EXTERNAL_INSTALL_LOCATION}/include/eigen3"
-    )
+if (${CMAKE_VERSION} VERSION_LESS 3.2)
+    ExternalProject_Add(
+        eigen
+        URL http://bitbucket.org/eigen/eigen/get/3.3.3.zip
+        # PREFIX ${CMAKE_CURRENT_BINARY_DIR}/eigen
+        UPDATE_COMMAND ""
+        CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION}
+        )
+else()
+    ExternalProject_Add(
+        eigen
+        URL http://bitbucket.org/eigen/eigen/get/3.3.3.zip
+        # PREFIX ${CMAKE_CURRENT_BINARY_DIR}/eigen
+        UPDATE_COMMAND ""
+        CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION}
+        BUILD_BYPRODUCTS "${EXTERNAL_INSTALL_LOCATION}/include/eigen3"
+        )
+endif()

 #----------------------------------------------------------------------------------------------------------


PKG: extra tools for windows XDK package

--- SuperBuild/CMake/External_pkgtools.cmake
+++ SuperBuild/CMake/External_pkgtools.cmake
@@ -1,15 +1,24 @@
-if(WIN32 OR CMAKE_CROSSCOMPILING)
-  add_custom_target(PACKAGE-TOOLS)
-  return()
-endif()
-
-include(ExternalProject)
 if(NOT __EXTERNAL_PACKAGE_TOOLS__)
 set(__EXTERNAL_PACKAGE_TOOLS__ 1)

 set(PKGTOOLS_SB_PREFIX_DIR "${CMAKE_BINARY_DIR}/PACKAGE-TOOLS")

-if(UNIX)
+include(ExternalProject)
+
+if(WIN32)
+  ExternalProject_Add(PACKAGE-TOOLS
+    PREFIX "${PKGTOOLS_SB_PREFIX_DIR}"
+    URL "https://www.orfeo-toolbox.org/packages/qt4-native-tools-win64.zip"
+    URL_MD5 0e4bfd5677eb63ae691f4615a4338490
+    DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
+    CONFIGURE_COMMAND  ""
+    BUILD_COMMAND      ""
+    INSTALL_COMMAND    ""
+    )
+endif()
+
+
+if(UNIX AND NOT WIN32)
   if(APPLE)
     add_custom_target(PATCHELF)
   else()
@@ -29,31 +38,32 @@
       INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${PKGTOOLS_SB_PREFIX_DIR}/src-patchelf/src/patchelf ${CMAKE_INSTALL_PREFIX}/tools
       )
   endif(APPLE)
-endif(UNIX)

-ExternalProject_Add(MAKESELF
-  PREFIX "${PKGTOOLS_SB_PREFIX_DIR}"
-  URL "https://www.orfeo-toolbox.org/packages/makeself-2.2.0.tar.gz"
-  URL_MD5 3c61df934b0c61ddcd7bd63b391e951d
-  DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
-  SOURCE_DIR "${PKGTOOLS_SB_PREFIX_DIR}/src-makeself"
-  BINARY_DIR "${PKGTOOLS_SB_PREFIX_DIR}/build-makeself"
-  TMP_DIR  "${PKGTOOLS_SB_PREFIX_DIR}/tmp-makeself"
-  STAMP_DIR "${PKGTOOLS_SB_PREFIX_DIR}/stamp-makeself"
-  CONFIGURE_COMMAND ""
-  BUILD_COMMAND ${CMAKE_COMMAND}
-  -E copy
-  ${PKGTOOLS_SB_PREFIX_DIR}/src-makeself/makeself-header.sh
-  ${PKGTOOLS_SB_PREFIX_DIR}/makeself-header.sh
-  INSTALL_COMMAND ${CMAKE_COMMAND}
-  -E copy
-  ${PKGTOOLS_SB_PREFIX_DIR}/src-makeself/makeself.sh
-  ${PKGTOOLS_SB_PREFIX_DIR}/makeself.sh
-  DEPENDS PATCHELF
-  )
+  ExternalProject_Add(MAKESELF
+    PREFIX "${PKGTOOLS_SB_PREFIX_DIR}"
+    URL "https://www.orfeo-toolbox.org/packages/makeself-2.2.0.tar.gz"
+    URL_MD5 3c61df934b0c61ddcd7bd63b391e951d
+    DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
+    SOURCE_DIR "${PKGTOOLS_SB_PREFIX_DIR}/src-makeself"
+    BINARY_DIR "${PKGTOOLS_SB_PREFIX_DIR}/build-makeself"
+    TMP_DIR  "${PKGTOOLS_SB_PREFIX_DIR}/tmp-makeself"
+    STAMP_DIR "${PKGTOOLS_SB_PREFIX_DIR}/stamp-makeself"
+    CONFIGURE_COMMAND ""
+    BUILD_COMMAND ${CMAKE_COMMAND}
+    -E copy
+    ${PKGTOOLS_SB_PREFIX_DIR}/src-makeself/makeself-header.sh
+    ${PKGTOOLS_SB_PREFIX_DIR}/makeself-header.sh
+    INSTALL_COMMAND ${CMAKE_COMMAND}
+    -E copy
+    ${PKGTOOLS_SB_PREFIX_DIR}/src-makeself/makeself.sh
+    ${PKGTOOLS_SB_PREFIX_DIR}/makeself.sh
+    DEPENDS PATCHELF
+    )

-set(MAKESELF_SCRIPT ${PKGTOOLS_SB_PREFIX_DIR}/makeself.sh)
+  set(MAKESELF_SCRIPT ${PKGTOOLS_SB_PREFIX_DIR}/makeself.sh)

-add_custom_target(PACKAGE-TOOLS DEPENDS MAKESELF)
+  add_custom_target(PACKAGE-TOOLS DEPENDS MAKESELF)

-endif()
+endif(UNIX AND NOT WIN32)
+
+endif() #idef guard


Update ParaView to v5.5.0-RC2

Update ParaView to v5.5.0-RC2

--- versions.cmake
+++ versions.cmake
@@ -80,7 +80,7 @@
   set(_paraview_revision "master")
 else()
   # Test the revision locally before proposing a move
-  set(_paraview_revision "f700a4d7f32ccb7e31f1da6e6fd1c6188dac2feb")
+  set(_paraview_revision "v5.5.0-RC2")
 endif()
 add_revision(paraview
   GIT_REPOSITORY "https://gitlab.kitware.com/paraview/paraview.git"


Corrects test binary paths in the CMake build script.

--- cmake/internal_utils.cmake
+++ cmake/internal_utils.cmake
@@ -184,7 +184,7 @@
     # only at ctest runtime (by calling ctest -c <Configuration>), so
     # we have to escape $ to delay variable substitution here.
     add_test(${name}
-      ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/test/${name}.py
-          --build_dir=${CMAKE_BINARY_DIR}/\${CTEST_CONFIGURATION_TYPE})
+      ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.py
+          --build_dir=${CMAKE_CURRENT_BINARY_DIR}/\${CTEST_CONFIGURATION_TYPE})
   endif()
 endfunction()


Bump version

Bump version

--- cmake/ospray_options.cmake
+++ cmake/ospray_options.cmake
@@ -19,8 +19,8 @@
 ##############################################################

 SET(OSPRAY_VERSION_MAJOR 1)
-SET(OSPRAY_VERSION_MINOR 1)
-SET(OSPRAY_VERSION_PATCH 1)
+SET(OSPRAY_VERSION_MINOR 2)
+SET(OSPRAY_VERSION_PATCH 0)
 SET(OSPRAY_VERSION_GITHASH 0)
 IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
   FIND_PACKAGE(Git)


added boost 1.48 and 1.49 to the mix

added boost 1.48 and 1.49 to the mix

git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@5050 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -8,7 +8,7 @@
 if(${CMAKE_VERSION} VERSION_LESS 2.8.5)
   SET(Boost_ADDITIONAL_VERSIONS "1.43" "1.43.0" "1.44" "1.44.0" "1.45" "1.45.0" "1.46.1" "1.46.0" "1.46" "1.47" "1.47.0")
 else(${CMAKE_VERSION} VERSION_LESS 2.8.5)
-  SET(Boost_ADDITIONAL_VERSIONS "1.47" "1.47.0")
+  SET(Boost_ADDITIONAL_VERSIONS "1.47" "1.47.0" "1.48" "1.48.0" "1.49" "1.49.0")
 endif(${CMAKE_VERSION} VERSION_LESS 2.8.5)

 # Disable the config mode of find_package(Boost)


target: use globbing too

target: use globbing too

--- cmake/qibuild/target.cmake
+++ cmake/qibuild/target.cmake
@@ -69,8 +69,9 @@
     set(ARG_SRC     ${ARG_SRC}     ${SUBMODULE_${_upper_submodule}_SRC})
     set(ARG_DEPENDS ${ARG_DEPENDS} ${SUBMODULE_${_upper_submodule}_DEPENDS})
   endforeach()
-
-  add_executable("${name}" ${ARG_SRC})
+  file(GLOB _SRC           ${ARG_SRC})
+
+  add_executable("${name}" ${_SRC})

   message(STATUS "${name} Adding deps: ${ARG_DEP}")
   qi_use_lib("${name}" ${ARG_DEPENDS})
@@ -159,6 +160,7 @@
   qi_set_global("${name}_SUBFOLDER" "${ARG_SUBFOLDER}")
   qi_set_global("${name}_NO_INSTALL" ${ARG_NO_INSTALL})

+
   foreach(submodule ${ARG_SUBMODULE})
     string(TOUPPER "${submodule}" _upper_submodule)
     #message(STATUS "SUBMODULE: ${_upper_submodule}: ${SUBMODULE_${_upper_submodule}_SRC}")
@@ -166,9 +168,11 @@
     set(ARG_SRC     ${ARG_SRC}     ${SUBMODULE_${_upper_submodule}_SRC})
     set(ARG_DEPENDS ${ARG_DEPENDS} ${SUBMODULE_${_upper_submodule}_DEPENDS})
   endforeach()
+  file(GLOB _SRC           ${ARG_SRC})
+  file(GLOB _PUBLIC_HEADER ${ARG_PUBLIC_HEADER})

   #message("SOURCES: ${ARG_SRC}")
-  add_library("${name}" ${ARG_SRC})
+  add_library("${name}" ${_SRC})

   qi_use_lib("${name}" ${ARG_DEPENDS})

@@ -177,7 +181,7 @@
   endif()

   if (ARG_PUBLIC_HEADER)
-    set_target_properties("${name}" PROPERTIES PUBLIC_HEADER "${ARG_PUBLIC_HEADER}")
+    set_target_properties("${name}" PROPERTIES PUBLIC_HEADER "${_PUBLIC_HEADER}")
   endif()

   #set(_binlib ${QI_SDK_LIB})


remove Toolchain for raspberrypi.

remove Toolchain for raspberrypi.

--- Toolchain-raspberrypi-arm-raspbian.cmake
+++ Toolchain-raspberrypi-arm-raspbian.cmake
@@ -1,28 +0,0 @@
-# this one is important
-SET (CMAKE_SYSTEM_NAME Linux)
-# this one not so much
-SET (CMAKE_SYSTEM_VERSION 1)
-
-# Check for Raspberry Pi Tools and bail out if they don't have it
-if(DEFINED ENV{PI_TOOLS_HOME})
-  message("Using Raspberry Pi Tools found in $ENV{PI_TOOLS_HOME}")
-else()
-  message("PI_TOOLS_HOME is not set; You must tell CMake where to find Raspberry Pi Tools (cross-compiler)")
-  return()
-endif()
-
-SET (PiToolsDir arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian)
-
-# specify the cross compiler
-SET (CMAKE_C_COMPILER $ENV{PI_TOOLS_HOME}/${PiToolsDir}/bin/arm-linux-gnueabihf-gcc)
-SET (CMAKE_CXX_COMPILER $ENV{PI_TOOLS_HOME}/${PiToolsDir}/bin/arm-linux-gnueabihf-g++)
-
-# where is the target environment
-SET (CMAKE_FIND_ROOT_PATH $ENV{PI_TOOLS_HOME}/${PiToolsDir})
-
-# search for programs in the build host directories
-SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-
-# for libraries and headers in the target directories
-SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)


COMP: Pass CMAKE_LIBRARY_PATH and CMAKE_INCLUDE_PATH from superbuild to MITK build.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -369,6 +369,8 @@
     -DMITK_BUILD_CONFIGURATION:STRING=${MITK_BUILD_CONFIGURATION}
     -DCTEST_USE_LAUNCHERS:BOOL=${CTEST_USE_LAUNCHERS}
     # ----------------- Miscellaneous ---------------
+    -DCMAKE_LIBRARY_PATH:PATH=${CMAKE_LIBRARY_PATH}
+    -DCMAKE_INCLUDE_PATH:PATH=${CMAKE_INCLUDE_PATH}
     -DMITK_CTEST_SCRIPT_MODE:STRING=${MITK_CTEST_SCRIPT_MODE}
     -DMITK_SUPERBUILD_BINARY_DIR:PATH=${MITK_BINARY_DIR}
     -DMITK_MODULES_TO_BUILD:INTERNAL=${MITK_MODULES_TO_BUILD}


Assume workaround for pie linking only needed for Android Since we've only seen the issue on Android.

--- flags/fpic.cmake
+++ flags/fpic.cmake
@@ -20,10 +20,9 @@
   polly_add_cache_flag(CMAKE_C_FLAGS_INIT "-fPIC")
   polly_add_cache_flag(CMAKE_CXX_FLAGS_INIT "-fPIC")
   polly_add_cache_flag(CMAKE_Fortran_FLAGS_INIT "-fPIC")
+  # CMake doesn't add "-pie" by default for executables (CMake issue #14983)
+  polly_add_cache_flag(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
 endif()
-# CMake doesn't add "-pie" by default for executables (CMake issue #14983)
-polly_add_cache_flag(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
-
 set(
     CMAKE_POSITION_INDEPENDENT_CODE
     TRUE


build: Append build number for cpack packages

add_vpp_packaging maccro was circumventing scripts/version causing:
1. build number not being appended to the package
2. invalid package name format (due to cmake cpack module)

Change-Id: I2b9a985357a3f3bd501be6db6ca638d4430f4bbb
Type: make
Fixes: def35a2352c9a54f748d301ffa47a446d25a83e0
Signed-off-by: YohanPipereau <d1c8beb7c5abfbe517d3a763eb4d2e95e7e3949d@cisco.com>

--- src/cmake/pack.cmake
+++ src/cmake/pack.cmake
@@ -11,14 +11,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.

-##############################################################################
-# DEB Packaging
-##############################################################################
-
-macro(add_vpp_packaging name)
+# name, vendor, description are macros, arguments are in ${ARGN}
+macro(add_vpp_packaging)
   cmake_parse_arguments(ARG
     ""
-    "NAME;DESCRIPION;VENDOR"
+    "NAME;DESCRIPTION;VENDOR"
     ""
     ${ARGN}
   )
@@ -42,7 +39,6 @@
   )
   string(REGEX REPLACE "v(.*)-([0-9]+)-(g[0-9a-f]+)" "\\1;\\2;\\3" VER ${VER})
   list(GET VER 0 tag)
-  string(REPLACE "-" "~" tag ${tag})
   list(GET VER 1 commit_num)
   list(GET VER 2 commit_name)

@@ -51,45 +47,50 @@
     set(deb_ver "${tag}")
     set(rpm_ver "${tag}")
   else()
-    set(deb_ver "${tag}~${commit_num}~${commit_name}")
-    set(rpm_ver "${tag}~${commit_num}_${commit_name}")
+    if (DEFINED ENV{BUILD_NUMBER})
+      set(deb_ver "${tag}~${commit_num}-${commit_name}~b$ENV{BUILD_NUMBER}")
+      set(rpm_ver "${tag}~${commit_num}_${commit_name}~b$ENV{BUILD_NUMBER}")
+    else()
+      set(deb_ver "${tag}~${commit_num}-${commit_name}")
+      set(rpm_ver "${tag}~${commit_num}_${commit_name}")
+    endif()
   endif()

-  get_cmake_property(components COMPONENTS)
+  set(CPACK_PACKAGE_NAME ${ARG_NAME})
+  set(CPACK_STRIP_FILES OFF)
+  set(CPACK_PACKAGE_VENDOR "${ARG_VENDOR}")
+  set(CPACK_COMPONENTS_IGNORE_GROUPS 1)
+  set(CPACK_${CPACK_GENERATOR}_COMPONENT_INSTALL ON)
+  set(CPACK_${type}_PACKAGE_DESCRIPTION "${ARG_DESCRIPTION}")
+  set(CPACK_${type}_PACKAGE_RELEASE 1)

   if(OS_ID_LIKE MATCHES "debian")
     set(CPACK_GENERATOR "DEB")
     set(type "DEBIAN")
     set(CPACK_PACKAGE_VERSION "${deb_ver}")
     set(CPACK_DEBIAN_PACKAGE_MAINTAINER "VPP Team")
-    set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
-    foreach(lc ${components})
-      string(TOUPPER ${lc} uc)
-      set(CPACK_DEBIAN_${uc}_PACKAGE_NAME "${lc}")
-    endforeach()
+    execute_process(
+      COMMAND dpkg --print-architecture
+      OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+      OUTPUT_STRIP_TRAILING_WHITESPACE
+    )
+    set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE})
   elseif(OS_ID_LIKE MATCHES "rhel")
     set(CPACK_GENERATOR "RPM")
     set(type "RPM")
     set(CPACK_PACKAGE_VERSION "${rpm_ver}")
-    set(CPACK_RPM_FILE_NAME RPM-DEFAULT)
-    foreach(lc ${components})
-      string(TOUPPER ${lc} uc)
-      if(${lc} MATCHES ".*-dev")
-	set(CPACK_RPM_${uc}_DEBUGINFO_PACKAGE ON)
-	set(lc ${lc}el)
-      endif()
-      set(CPACK_RPM_${uc}_PACKAGE_NAME "${lc}")
-    endforeach()
+    execute_process(
+      COMMAND uname -m
+      OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+      OUTPUT_STRIP_TRAILING_WHITESPACE
+    )
+    set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.${CPACK_RPM_PACKAGE_ARCHITECTURE})
   endif()

   if(CPACK_GENERATOR)
-    set(CPACK_PACKAGE_NAME ${ARG_NAME})
-    set(CPACK_STRIP_FILES OFF)
-    set(CPACK_PACKAGE_VENDOR "${ARG_VENDOR}")
-    set(CPACK_COMPONENTS_IGNORE_GROUPS 1)
-    set(CPACK_${CPACK_GENERATOR}_COMPONENT_INSTALL ON)
-    set(CPACK_${type}_PACKAGE_DESCRIPTION "${ARG_DESCRIPTION}")
-    set(CPACK_${type}_PACKAGE_RELEASE 1)
     include(CPack)
+  else()
+    message(ERROR "CPACK_GENERATOR must be set")
   endif()
+
 endmacro()


OpenCV Extra: Add 3.4.3

OpenCV Extra: Add 3.4.3

--- cmake/projects/OpenCV-Extra/hunter.cmake
+++ cmake/projects/OpenCV-Extra/hunter.cmake
@@ -6,6 +6,17 @@
 include(hunter_add_version)
 include(hunter_download)
 include(hunter_pick_scheme)
+
+hunter_add_version(
+    PACKAGE_NAME
+    OpenCV-Extra
+    VERSION
+    "3.4.3"
+    URL
+    "https://github.com/opencv/opencv_contrib/archive/3.4.3.tar.gz"
+    SHA1
+    2c70868a9c2accae23e8f382885d3e4f97030978
+)

 hunter_add_version(
     PACKAGE_NAME


Update RealmCore.cmake (#523)

Update RealmCore.cmake (#523)

Core now follows the correct Android ABI naming convention for armeabi-v7a

--- CMake/RealmCore.cmake
+++ CMake/RealmCore.cmake
@@ -190,11 +190,7 @@
         elseif(REALM_PLATFORM STREQUAL "Android")
             set(basename "realm-core-android")
             set(compression "tar.gz")
-            if(ANDROID_ABI STREQUAL "armeabi-v7a")
-                set(platform "-android-arm-v7a")
-            else()
-                set(platform "-android-${ANDROID_ABI}")
-            endif()
+            set(platform "-android-${ANDROID_ABI}")
         endif()
         if(REALM_CORE_PACKAGING STREQUAL "1")
             set(vprefix "")


Explicitly specify compilation database in all cases.

We can't always rely on the command invocation to find the default
compilation database because it depends on the location of the first
source file. Explicitly specify it to avoid any ambiguity.

--- ClangTidy.cmake
+++ ClangTidy.cmake
@@ -71,7 +71,7 @@
 endfunction ()

 function (_psq_make_compilation_db TARGET
-                                   COMPILATION_DB_DIR_RETURN)
+                                   CUSTOM_COMPILATION_DB_DIR_RETURN)

     set (MAKE_COMP_DB_OPTIONS)
     set (MAKE_COMP_DB_SINGLEVAR_OPTIONS
@@ -88,10 +88,10 @@
                            "${MAKE_COMP_DB_MULTIVAR_OPTIONS}"
                            ${ARGN})

-    set (COMPILATION_DB_DIR
+    set (CUSTOM_COMPILATION_DB_DIR
          ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_compile_commands/)
     set (COMPILATION_DB_FILE
-         ${COMPILATION_DB_DIR}/compile_commands.json)
+         ${CUSTOM_COMPILATION_DB_DIR}/compile_commands.json)

     set (COMPILATION_DB_FILE_CONTENTS
          "[")
@@ -198,8 +198,8 @@
     file (WRITE ${COMPILATION_DB_FILE}
           ${COMPILATION_DB_FILE_CONTENTS})

-    set (${COMPILATION_DB_DIR_RETURN}
-         ${COMPILATION_DB_DIR} PARENT_SCOPE)
+    set (${CUSTOM_COMPILATION_DB_DIR_RETURN}
+         ${CUSTOM_COMPILATION_DB_DIR} PARENT_SCOPE)

 endfunction (_psq_make_compilation_db)

@@ -299,7 +299,7 @@
     # to generate a fake compilation database as CMake won't do it
     # for us in this instance.
     _psq_make_compilation_db (${TARGET}
-                              COMPILATION_DB_DIR
+                              CUSTOM_COMPILATION_DB_DIR
                               ${FORCE_LANGUAGE_OPTION}
                               SOURCES
                               ${CUSTOM_COMPILATION_DB_SOURCES}
@@ -310,10 +310,6 @@
                               DEFINES
                               ${CHECK_SOURCES_DEFINES})

-    # Set the CUSTOM_COMPILATION_DB switch option
-    set (CUSTOM_COMPILATION_DB_OPTION
-         "-DCUSTOM_COMPILATION_DB_DIR=${COMPILATION_DB_DIR}")
-

     foreach (SOURCE ${FILES_TO_CHECK})

@@ -325,13 +321,11 @@

         if (NOT SOURCE_INDEX EQUAL -1)

-            set (SOURCE_CUSTOM_COMPILATION_DB_OPTION
-                 ${CUSTOM_COMPILATION_DB_OPTION})
+            set (SOURCE_COMP_DB ${CUSTOM_COMPILATION_DB_DIR})

         else (NOT SOURCE_INDEX EQUAL -1)

-            set (SOURCE_CUSTOM_COMPILATION_DB_OPTION
-                 "")
+            set (SOURCE_COMP_DB ${CMAKE_BINARY_DIR})

         endif (NOT SOURCE_INDEX EQUAL -1)

@@ -345,7 +339,7 @@
                             -DENABLE_CHECKS=${CHECK_SOURCES_ENABLE_CHECKS}
                             -DDISABLE_CHECKS=${CHECK_SOURCES_DISABLE_CHECKS}
                             -DSOURCE=${SOURCE}
-                            ${SOURCE_CUSTOM_COMPILATION_DB_OPTION}
+                            -DCUSTOM_COMPILATION_DB_DIR=${SOURCE_COMP_DB}
                             -P
                             ${CLANG_TIDY_EXIT_STATUS_WRAPPER_LOCATION})
     endforeach ()


Refs #1974. Fixed compilation error on Windows

--- cmake/dev/eprosima_libraries.cmake
+++ cmake/dev/eprosima_libraries.cmake
@@ -41,8 +41,8 @@
             set(${package}_CMAKE_ARGS
                 "\${SOURCE_DIR_}"
                 "\${GENERATOR_}"
-                "-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}"
-                "-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}"
+                "\${CMAKE_C_COMPILER_}"
+                "\${CMAKE_CXX_COMPILER_}"
                 "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS_}"
                 "-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS_}"
                 ${BUILD_OPTION}
@@ -67,6 +67,8 @@
                 "set(GENERATOR_ -G \"${CMAKE_GENERATOR}\")\n"
                 "set(CMAKE_INSTALL_PREFIX_ \"-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX_}\")\n"
                 "set(CMAKE_PREFIX_PATH_ -DCMAKE_PREFIX_PATH=\"${CMAKE_PREFIX_PATH_}\")\n"
+                "set(CMAKE_C_COMPILER_ \"-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}\")\n"
+                "set(CMAKE_CXX_COMPILER_ \"-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}\")\n"
                 "ExternalProject_Add(${package}\n"
                 "CONFIGURE_COMMAND \"${CMAKE_COMMAND}\"\n"
                 "${${package}_CMAKE_ARGS}\n"


Extend the RN Application.cmake file to support Android autolinking (#34082)

Summary:
This is the companion PR of https://github.com/react-native-community/cli/pull/1630
It extends the `ReactNative-application.cmake` file with instructions to pickup the autolinked libraries.

## Changelog

[Internal] [Changed] - Extend the RN Application.cmake file to support Android autolinking

Pull Request resolved: https://github.com/facebook/react-native/pull/34082

Test Plan: Tested locally as we don't have a way to test autolinking on CI.

Reviewed By: cipolleschi

Differential Revision: D37463203

Pulled By: cortinico

fbshipit-source-id: 0b28e7f214c265ebfec4ccc59ae321f682299cf8

--- ReactAndroid/cmake-utils/ReactNative-application.cmake
+++ ReactAndroid/cmake-utils/ReactNative-application.cmake
@@ -11,16 +11,23 @@
 # - Take care of setting the correct compile options
 # - Include all the pre-built libraries in your build graph
 # - Link your library against those prebuilt libraries so you can access JSI, Fabric, etc.
+# - Link your library against any autolinked library.

 cmake_minimum_required(VERSION 3.13)
 set(CMAKE_VERBOSE_MAKEFILE on)

 include(${REACT_ANDROID_DIR}/cmake-utils/Android-prebuilt.cmake)

-file(GLOB input_SRC CONFIGURE_DEPENDS *.cpp)
+file(GLOB input_SRC CONFIGURE_DEPENDS
+        *.cpp
+        ${PROJECT_BUILD_DIR}/generated/rncli/src/main/jni/*.cpp)
+
 add_library(${CMAKE_PROJECT_NAME} SHARED ${input_SRC})

-target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
+target_include_directories(${CMAKE_PROJECT_NAME}
+        PUBLIC
+                ${CMAKE_CURRENT_SOURCE_DIR}
+                ${PROJECT_BUILD_DIR}/generated/rncli/src/main/jni)

 target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -Wall -Werror -fexceptions -frtti -std=c++17 -DWITH_INSPECTOR=1 -DLOG_TAG=\"ReactNative\")

@@ -41,3 +48,9 @@
         runtimeexecutor
         turbomodulejsijni
         yoga)
+
+# If project is on RN CLI v9, then we can use the following lines to link against the autolinked 3rd party libraries.
+if(EXISTS ${PROJECT_BUILD_DIR}/generated/rncli/src/main/jni/Android-rncli.cmake)
+        include(${PROJECT_BUILD_DIR}/generated/rncli/src/main/jni/Android-rncli.cmake)
+        target_link_libraries(${CMAKE_PROJECT_NAME} ${AUTOLINKED_LIBRARIES})
+endif()


cmake-modules:
* modified the Find_ThirdPartyPython cmake script to search the default python installation path (more paths will need to be added)

git-svn-id: ed1ce8e5c168003d808aec37bc6fda77b178f7bb@3201 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- trunk/cmake-modules/FindThirdPartyPython.cmake
+++ trunk/cmake-modules/FindThirdPartyPython.cmake
@@ -5,7 +5,9 @@
 # ---------------------------------

 IF(WIN32)
-FIND_PATH(PATH_PYTHON include/Python.h PATHS $ENV{OV_DEP_PYTHON} $ENV{OpenViBE_dependencies} NO_DEFAULT_PATH)
+FIND_PATH(PATH_PYTHON include/Python.h PATHS
+		"C:\Python27"
+		$ENV{OpenViBE_dependencies} NO_DEFAULT_PATH)
 	IF(PATH_PYTHON)
 		MESSAGE(STATUS "  Found Python...")
 		INCLUDE_DIRECTORIES(${PATH_PYTHON}/include)
@@ -46,4 +48,4 @@
 	ELSE(PYTHONLIBS_FOUND)
 		MESSAGE(STATUS "  FAILED to find Python")
 	ENDIF(PYTHONLIBS_FOUND)
-ENDIF(UNIX)+ENDIF(UNIX)


Split off 7.6.12

Split off 7.6.12

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

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 6 )
-set ( HPCC_POINT 11 )
+set ( HPCC_POINT 13 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


CI: allow larger test timeout with coverage

--- CI/main_qa.cmake
+++ CI/main_qa.cmake
@@ -23,5 +23,6 @@

 set( CMAKE_EXPORT_COMPILE_COMMANDS ON )
 set( ci_build_type "Debug" )
+set( CTEST_TEST_TIMEOUT 1500)

 include( "${CMAKE_CURRENT_LIST_DIR}/main_superbuild.cmake" )


ERR: Fix bug reporting link

ERR: Fix bug reporting link

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -17,7 +17,7 @@
        "http://${DROP_SITE}/cgi-bin/Submit-vtk-TestingResults.pl")

 # Project Home Page
-SET (PROJECT_URL "http://www.vtk.org/")
+SET (PROJECT_URL "http://www.vtk.org")

 # Dart server configuration
 SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/vtk-rollup-dashboard.sh")


Update Ubuntu releases for launchpad

Update Ubuntu releases for launchpad

--- UploadPPA.cmake
+++ UploadPPA.cmake
@@ -223,5 +223,6 @@
   upload_ppa(precise)
   upload_ppa(quantal)
   upload_ppa(raring)
+  upload_ppa(saucy)
   add_custom_target(dput DEPENDS ${DPUT_TARGETS})
 endfunction()


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -58,7 +58,8 @@
 ENDIF()

 execute_process(
-	COMMAND cmake -P $ENV{CMAKI_INSTALL}/cmaki_identifier.cmake
+	COMMAND bash cmaki_identifier.sh
+	WORKING_DIRECTORY $ENV{CMAKI_INSTALL}
 	OUTPUT_VARIABLE RESULT_VERSION
 	OUTPUT_STRIP_TRAILING_WHITESPACE)
 set(CMAKI_PLATFORM "${RESULT_VERSION}")


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


[cmake/win] install ffmpeg dlls to bin

[cmake/win] install ffmpeg dlls to bin

--- plugins/ndio-ffmpeg/cmake/FindFFMPEG.cmake
+++ plugins/ndio-ffmpeg/cmake/FindFFMPEG.cmake
@@ -39,7 +39,9 @@
   foreach(type ${CMAKE_CONFIGURATION_TYPES})
     file(COPY ${FFMPEG_DLLS} DESTINATION ${PROJECT_BINARY_DIR}/${type})
   endforeach()
-  # \todo Should install the dll's next to the plugin dll
+  ### INSTALL
+  install(FILES ${FFMPEG_DLLS} DESTINATION bin)
+
 else()
   GenerateFFMPEG(https://github.com/FFmpeg/FFmpeg.git n0.11.1)
 endif()