no message

no message

--- cmake/FindDSound.cmake
+++ cmake/FindDSound.cmake
@@ -16,25 +16,25 @@

 find_path(DSOUND_INCLUDE_DIR
           NAMES dsound.h
+          NO_DEFAULT_PATH
           PATHS
-          "${DXSDK_DIR}"
-          "$ENV{DXSDK_DIR}"
-          "$ENV{PROGRAMFILES}/Microsoft DirectX SDK"
-          "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)"
-          "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)"
-          PATH_SUFFIXES include
+          "${DXSDK_DIR}/include"
+          "$ENV{DXSDK_DIR}/include"
+          "$ENV{PROGRAMFILES}/Microsoft DirectX SDK/include"
+          "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/include"
+          "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/include"
           DOC "The DirectSound include directory"
 )

 find_library(DSOUND_LIBRARY
              NAMES dsound
+             NO_DEFAULT_PATH
              PATHS
-             "${DXSDK_DIR}"
-             "$ENV{DXSDK_DIR}"
-             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK"
-             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)"
-             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)"
-             PATH_SUFFIXES lib/${DIRECTX_ARCH}
+             "${DXSDK_DIR}/Lib/${DIRECTX_ARCH}"
+             "$ENV{DXSDK_DIR}Lib/${DIRECTX_ARCH}"
+             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK/Lib/${DIRECTX_ARCH}"
+             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Lib/${DIRECTX_ARCH}"
+             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Lib/${DIRECTX_ARCH}"
              DOC "The DirectSound library"
 )


Removed cmake/ directory with FindEigen3 script

As we now include Eigen as submodule, we're using the one (identical) under 3rdparty/eigen/cmake.

--- cmake/FindEigen3.cmake
+++ cmake/FindEigen3.cmake
@@ -1,97 +0,0 @@
-# - Try to find Eigen3 lib
-#
-# This module supports requiring a minimum version, e.g. you can do
-#   find_package(Eigen3 3.1.2)
-# to require version 3.1.2 or newer of Eigen3.
-#
-# Once done this will define
-#
-#  EIGEN3_FOUND - system has eigen lib with correct version
-#  EIGEN3_INCLUDE_DIR - the eigen include directory
-#  EIGEN3_VERSION - eigen version
-#
-# This module reads hints about search locations from
-# the following enviroment variables:
-#
-# EIGEN3_ROOT
-# EIGEN3_ROOT_DIR
-
-# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
-# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
-# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
-# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
-
-if(NOT Eigen3_FIND_VERSION)
-  if(NOT Eigen3_FIND_VERSION_MAJOR)
-    set(Eigen3_FIND_VERSION_MAJOR 2)
-  endif(NOT Eigen3_FIND_VERSION_MAJOR)
-  if(NOT Eigen3_FIND_VERSION_MINOR)
-    set(Eigen3_FIND_VERSION_MINOR 91)
-  endif(NOT Eigen3_FIND_VERSION_MINOR)
-  if(NOT Eigen3_FIND_VERSION_PATCH)
-    set(Eigen3_FIND_VERSION_PATCH 0)
-  endif(NOT Eigen3_FIND_VERSION_PATCH)
-
-  set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
-endif(NOT Eigen3_FIND_VERSION)
-
-macro(_eigen3_check_version)
-  file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
-
-  string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
-  set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
-  string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
-  set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
-  string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
-  set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
-
-  set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
-  if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
-    set(EIGEN3_VERSION_OK FALSE)
-  else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
-    set(EIGEN3_VERSION_OK TRUE)
-  endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
-
-  if(NOT EIGEN3_VERSION_OK)
-
-    message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
-                   "but at least version ${Eigen3_FIND_VERSION} is required")
-  endif(NOT EIGEN3_VERSION_OK)
-endmacro(_eigen3_check_version)
-
-if (EIGEN3_INCLUDE_DIR)
-
-  # in cache already
-  _eigen3_check_version()
-  set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
-
-else (EIGEN3_INCLUDE_DIR)
-
-  # search first if an Eigen3Config.cmake is available in the system,
-  # if successful this would set EIGEN3_INCLUDE_DIR and the rest of
-  # the script will work as usual
-  find_package(Eigen3 ${Eigen3_FIND_VERSION} NO_MODULE QUIET)
-
-  if(NOT EIGEN3_INCLUDE_DIR)
-    find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
-        HINTS
-        ENV EIGEN3_ROOT
-        ENV EIGEN3_ROOT_DIR
-        PATHS
-        ${CMAKE_INSTALL_PREFIX}/include
-        ${KDE4_INCLUDE_DIR}
-        PATH_SUFFIXES eigen3 eigen
-      )
-  endif(NOT EIGEN3_INCLUDE_DIR)
-
-  if(EIGEN3_INCLUDE_DIR)
-    _eigen3_check_version()
-  endif(EIGEN3_INCLUDE_DIR)
-
-  include(FindPackageHandleStandardArgs)
-  find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
-
-  mark_as_advanced(EIGEN3_INCLUDE_DIR)
-
-endif(EIGEN3_INCLUDE_DIR)
-


MAINT: fix pkg-config requirements for FFMPEG libraries.

--- cmake/FindFFMPEG.cmake
+++ cmake/FindFFMPEG.cmake
@@ -12,7 +12,7 @@
   # in the FIND_PATH() and FIND_LIBRARY() calls
   find_package(PkgConfig)
   if (PKG_CONFIG_FOUND)
-    pkg_check_modules(_FFMPEG_AVCODEC libavcodec)
+    pkg_check_modules(_FFMPEG_AVCODEC REQUIRED libavcodec>=55.28.1)
     pkg_check_modules(_FFMPEG_AVFORMAT libavformat)
     pkg_check_modules(_FFMPEG_AVUTIL libavutil)
   endif (PKG_CONFIG_FOUND)


fix GTKDOC_SCANGOBJ_WRAPPER with gtk-doc 1.25

--- cmake/FindGtkDoc.cmake
+++ cmake/FindGtkDoc.cmake
@@ -52,7 +52,7 @@
 find_program(GTKDOC_FIXXREF_EXE gtkdoc-fixxref PATH "${GLIB_PREFIX}/bin")

 find_package_handle_standard_args(GtkDoc
-    REQUIRED_VARS GTKDOC_SCAN_EXE GTKDOC_SCANGOBJ_EXE GTKDOC_SCANGOBJ_WRAPPER GTKDOC_MKDB_EXE GTKDOC_MKHTML_EXE GTKDOC_FIXXREF_EXE
+    REQUIRED_VARS GTKDOC_SCAN_EXE GTKDOC_SCANGOBJ_EXE GTKDOC_MKDB_EXE GTKDOC_MKHTML_EXE GTKDOC_FIXXREF_EXE
     VERSION_VAR GtkDoc_VERSION)

 # ::


add inc dir in find radium

add inc dir in find radium

--- cmake/FindRadium.cmake
+++ cmake/FindRadium.cmake
@@ -60,8 +60,13 @@
         FIND_LIBRARY ( ASSIMP_LIBRARIES
             NAMES assimp assimpd
             PATHS ${RADIUM_ROOT_DIR}/${CMAKE_BUILD_TYPE}/3rdPartyLibraries/lib
-            )
+            )
     ENDIF (NOT ASSIMP_LIBRARIES)
+
+    IF(NOT ASSIMP_INCLUDE_DIR)
+        set(ASSIMP_INCLUDE_DIR ${RADIUM_ROOT_DIR}/${CMAKE_BUILD_TYPE}/3rdPartyLibraries/include)
+    ENDIF(NOT ASSIMP_INCLUDE_DIR)
+

     IF (NOT GLBINDING_LIBRARIES)
         FIND_LIBRARY ( GLBINDING_LIBRARIES
@@ -69,6 +74,10 @@
             PATHS ${RADIUM_ROOT_DIR}/${CMAKE_BUILD_TYPE}/3rdPartyLibraries/lib
             )
     ENDIF (NOT GLBINDING_LIBRARIES)
+
+    IF(NOT GLBINDING_INCLUDE_DIR)
+        set(GLBINDING_INCLUDE_DIR ${RADIUM_ROOT_DIR}/${CMAKE_BUILD_TYPE}/3rdPartyLibraries/include)
+    ENDIF(NOT GLBINDING_INCLUDE_DIR)

     # TODO (Mathias) : verify if cmake recommand this (append the include dir of module dependencis in the include dir of the module header)
     # TODO (Nico) : this is unconsistent with the lib behavior: deps *.so are not added in RADIUM_LIBRARIES


cmake: warn the user if a Zephyr library is created in app-mode

Fixes: #19582

When `find_package(Zephyr)` completes then all boilerplate code has been
processed and all Zephyr libraries has been placed inside the
whole archive flags.

Also all libs dependencies has been processed.

This is indicated by the presence of the zephyr_prebuilt target.

Thus, warn the user if `zephyr_library()` / `zephyr_library_named()`
is called in app-mode.

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

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -514,6 +514,15 @@
 # constructor but must called explicitly on CMake libraries that do
 # not use a zephyr library constructor.
 function(zephyr_append_cmake_library library)
+  if(TARGET zephyr_prebuilt)
+    message(WARNING
+      "zephyr_library() or zephyr_library_named() called in Zephyr CMake "
+      "application mode. `${library}` will not be treated as a Zephyr library."
+      "To create a Zephyr library in Zephyr CMake kernel mode consider "
+      "creating a Zephyr module. See more here: "
+      "https://docs.zephyrproject.org/latest/guides/modules.html"
+    )
+  endif()
   set_property(GLOBAL APPEND PROPERTY ZEPHYR_LIBS ${library})
 endfunction()


cmake: Fix cache directory detection

cmake: Fix cache directory detection

To detect where the cache directory has been located we have been
checking if $HOME is writable, and if it is assuming that $HOME/.cache
must be writable as well.

This is broken in environments where $HOME is owned by users and
$HOME/.cache is owned by admin. To fix this we check $HOME/.cache for
write-ability instead.

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -1518,10 +1518,12 @@
     if(DEFINED ENV{${env_var}})
       set(env_dir $ENV{${env_var}})

-      check_if_directory_is_writeable(${env_dir} ok)
+      set(test_user_dir ${env_dir}/${env_suffix_${env_var}})
+
+      check_if_directory_is_writeable(${test_user_dir} ok)
       if(${ok})
         # The directory is write-able
-        set(user_dir ${env_dir}/${env_suffix_${env_var}})
+        set(user_dir ${test_user_dir})
         break()
       else()
         # The directory was not writeable, keep looking for a suitable


better HINT for joedbc.cmake

better HINT for joedbc.cmake

--- compcmake/joedbc.cmake
+++ compcmake/joedbc.cmake
@@ -6,8 +6,7 @@

 find_program(JOEDBC joedbc
  HINTS
-  ${CMAKE_CURRENT_SOURCE_DIR}/../../../compcmake/${JOEDB_BUILD_PATH}
-  ${CMAKE_CURRENT_SOURCE_DIR}/../../../../repos/joedb/compcmake/${JOEDB_BUILD_PATH}
+  ${CMAKE_CURRENT_LIST_DIR}/${JOEDB_BUILD_PATH}
   ../../../../../usr/local/bin
   ../../../../../../usr/local/bin
   ../../../../../../../usr/local/bin
@@ -15,8 +14,7 @@

 find_library(JOEDB_LIB joedb
  HINTS
-  ${CMAKE_CURRENT_SOURCE_DIR}/../../../compcmake/${JOEDB_BUILD_PATH}
-  ${CMAKE_CURRENT_SOURCE_DIR}/../../../../repos/joedb/compcmake/${JOEDB_BUILD_PATH}
+  ${CMAKE_CURRENT_LIST_DIR}/${JOEDB_BUILD_PATH}
   ../../../../../usr/local/lib
   ../../../../../../usr/local/lib
   ../../../../../../../usr/local/lib


Refactoring external/External.cmake file.

--- external/External.cmake
+++ external/External.cmake
@@ -1,6 +1,24 @@
 ## CMake build script.

 include (ExternalProject)
+
+#/// Check exists libraries.
+#///
+#/// @param __result  [out] value name of output result.
+#/// @param __libs    [in]  Libraries.
+function (exists_libraries __result __libs)
+    set (${__result} ON)
+
+    foreach (__lib_cursor ${__libs})
+        if (NOT EXISTS "${__lib_cursor}")
+            set (${__result} OFF)
+            break ()
+        endif ()
+    endforeach ()
+
+    # update result.
+    set (${__result} ${${__result}} PARENT_SCOPE)
+endfunction ()

 set (EXT_PREFIX_DIR  "${CMAKE_BINARY_DIR}/external/prefix")
 set (EXT_INSTALL_DIR "${CMAKE_BINARY_DIR}/external/local")
@@ -15,27 +33,27 @@
     set (EXT_C_FLAGS   "-w -fPIC")
 endif ()

-
 ##########
 ## ZLIB ##
 ##########

-set (ressl_tls_EXT_DEBUG_NAME)
-set (ressl_tls_EXT_STATIC_LIB_NAME z)
+set (zlib_EXT_DEBUG_NAME)
+set (zlib_EXT_STATIC_LIB_NAME z)

 if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
-    set (ressl_tls_EXT_STATIC_LIB_NAME zlibstatic)
+    set (zlib_EXT_STATIC_LIB_NAME zlibstatic)
     if (NOT CMAKE_BUILD_TYPE_LOWER STREQUAL "release")
-        set (ressl_tls_EXT_DEBUG_NAME d)
+        set (zlib_EXT_DEBUG_NAME d)
     endif ()
 endif ()

 set (zlib_EXT_SOURCE_DIR  "${CMAKE_SOURCE_DIR}/external/zlib")
 set (zlib_EXT_INCLUDE_DIR "${EXT_INSTALL_DIR}/include")
-set (zlib_EXT_STATIC_LIB  "${EXT_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${ressl_tls_EXT_STATIC_LIB_NAME}${ressl_tls_EXT_DEBUG_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}")
+set (zlib_EXT_STATIC_LIB  "${EXT_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${zlib_EXT_STATIC_LIB_NAME}${zlib_EXT_DEBUG_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}")
 set (zlib_EXT_LIBRARIES   "${zlib_EXT_STATIC_LIB}")
+exists_libraries (zlib_EXT_EXISTS "${zlib_EXT_LIBRARIES}")

-if (EXISTS "${zlib_EXT_STATIC_LIB}")
+if (zlib_EXT_EXISTS)
     add_custom_target (zlib)
     message (STATUS "Skip external/zlib (Exists: ${zlib_EXT_STATIC_LIB})")
 else ()
@@ -71,8 +89,9 @@
 set (capnp_EXT_STATIC_LIB    "${EXT_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}capnp${CMAKE_STATIC_LIBRARY_SUFFIX}")
 set (capnp_kj_EXT_STATIC_LIB "${EXT_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}kj${CMAKE_STATIC_LIBRARY_SUFFIX}")
 set (capnp_EXT_LIBRARIES     "${capnp_EXT_STATIC_LIB}")
+exists_libraries (capnp_EXT_EXISTS "${capnp_EXT_LIBRARIES}")

-if (EXISTS "${capnp_EXT_STATIC_LIB}" AND EXISTS "${capnp_kj_EXT_STATIC_LIB}")
+if (capnp_EXT_EXISTS)
     add_custom_target (capnp)
     message (STATUS "Skip external/capnp (Exists: ${capnp_EXT_STATIC_LIB})")
     message (STATUS "Skip external/kj (Exists: ${capnp_kj_EXT_STATIC_LIB})")
@@ -102,7 +121,6 @@
             LOG_INSTALL   1)
 endif ()

-
 ##############
 ## LIBRESSL ##
 ##############
@@ -115,12 +133,13 @@
 set (ressl_EXT_LIBRARIES         "${ressl_crypto_EXT_STATIC_LIB}"
                                  "${ressl_ssl_EXT_STATIC_LIB}"
                                  "${ressl_tls_EXT_STATIC_LIB}")
+exists_libraries (ressl_EXT_EXISTS "${ressl_EXT_LIBRARIES}")

-if (EXISTS "${ressl_crypto_EXT_STATIC_LIB}" AND EXISTS "${ressl_ssl_EXT_STATIC_LIB}" AND EXISTS "${ressl_EXT_LIBRARIES}")
+if (ressl_EXT_EXISTS)
     add_custom_target (ressl)
     message (STATUS "Skip external/ressl_crypto (Exists: ${ressl_crypto_EXT_STATIC_LIB})")
     message (STATUS "Skip external/ressl_ssl (Exists: ${ressl_ssl_EXT_STATIC_LIB})")
-    message (STATUS "Skip external/ressl_tls (Exists: ${ressl_EXT_LIBRARIES})")
+    message (STATUS "Skip external/ressl_tls (Exists: ${ressl_tls_EXT_STATIC_LIB})")
 else ()
     message (STATUS "Add external/ressl")
     ExternalProject_Add (ressl


[Conf] Takes into account CMake version for CMP0093

--- config/FindBoost.cmake
+++ config/FindBoost.cmake
@@ -247,7 +247,9 @@

 # Save project's policies
 cmake_policy(PUSH)
-cmake_policy(SET CMP0057 NEW) # if IN_LIST
+if (${CMAKE_VERSION} VERSION_GREATER 3.15)
+  cmake_policy(SET CMP0057 NEW) # if IN_LIST
+endif (${CMAKE_VERSION} VERSION_GREATER 3.15)

 function(_boost_get_existing_target component target_var)
   set(names "${component}")


for finding QtLocation, try pkg-config first, then fall back to manual mode

* fixes finding QtLocation on Harmattan

--- FindQtLocation.cmake
+++ FindQtLocation.cmake
@@ -3,12 +3,27 @@
 # This module determines whether QtLocation is installed.
 #
 # Copyright (c) 2011, Daniel Marth, <danielmarth@gmx.at>
+# Copyright (c) 2011, Bernhard Beschow, <bbeschow@cs.tu-berlin.de>
 #

-FIND_PACKAGE( QtMobility )
-IF( QTMOBILITY_FOUND )
-  FIND_PATH( QTLOCATION_INCLUDE_DIR NAMES QGeoPositionInfoSource PATH_SUFFIXES QtLocation )
-  FIND_LIBRARY( QTLOCATION_LIBRARIES NAMES QtLocation )
-ENDIF( QTMOBILITY_FOUND )
+# try using pkg-config first
+include(FindPkgConfig)

-FIND_PACKAGE_HANDLE_STANDARD_ARGS( QtLocation DEFAULT_MSG QTLOCATION_INCLUDE_DIR QTLOCATION_LIBRARIES )+pkg_check_modules(QtLocation QtLocation>=1.0.1)
+
+IF(QtLocation_FOUND)
+  SET(QTLOCATION_FOUND ${QtLocation_FOUND})
+  SET(QTLOCATION_INCLUDE_DIR ${QtLocation_INCLUDE_DIRS})
+  SET(QTLOCATION_LIBRARIES ${QtLocation_LIBRARIES})
+ENDIF(QtLocation_FOUND)
+
+# no success using pkg-config, try manually
+IF(NOT QTLOCATION_FOUND)
+  FIND_PACKAGE(QtMobility)
+  IF(QTMOBILITY_FOUND)
+    FIND_PATH(QTLOCATION_INCLUDE_DIR NAMES QGeoPositionInfoSource PATH_SUFFIXES QtLocation)
+    FIND_LIBRARY(QTLOCATION_LIBRARIES NAMES QtLocation)
+  ENDIF(QTMOBILITY_FOUND)
+
+  FIND_PACKAGE_HANDLE_STANDARD_ARGS( QtLocation DEFAULT_MSG QTLOCATION_INCLUDE_DIR QTLOCATION_LIBRARIES )
+ENDIF(NOT QTLOCATION_FOUND)


MDEV-11965 -Werror should not appear in released tarballs

--- storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake
+++ storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake
@@ -196,9 +196,9 @@
   set_cflags_if_supported(-Wcast-align)
 endif ()

-## always want these
-set(CMAKE_C_FLAGS "-Wall -Werror ${CMAKE_C_FLAGS}")
-set(CMAKE_CXX_FLAGS "-Wall -Werror ${CMAKE_CXX_FLAGS}")
+## always want these in debug builds
+set(CMAKE_C_FLAGS_DEBUG "-Wall -Werror ${CMAKE_C_FLAGS_DEBUG}")
+set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Werror ${CMAKE_CXX_FLAGS_DEBUG}")

 # pick language dialect
 set(CMAKE_C_FLAGS "-std=c99 ${CMAKE_C_FLAGS}")


BUMP: Bump TubeTK to use SegmentTubes fixes

--- CMake/Superbuild/External_TubeTK.cmake
+++ CMake/Superbuild/External_TubeTK.cmake
@@ -45,7 +45,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "https://github.com/KitwareMedical/TubeTK.git"
-    GIT_TAG "9991aa672c990ff76b028a3afdcc5325c328ba71"
+    GIT_TAG "09c9f66c67b02bef46f20ae4f50d0da46bdb0a23"
     CMAKE_CACHE_ARGS
       -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}


Bug fix: include correct directory for OpenCV.

--- tests/Makefile_test_opencv.cmake
+++ tests/Makefile_test_opencv.cmake
@@ -6,7 +6,7 @@
 MYFLAGS      ?= -D WIDTH=2048 -D HEIGHT=2048 -D SIZE_X=5 -D SIZE_Y=5 -D OpenCV
 CFLAGS        = $(MYFLAGS) -Wall -Wunused \
                 -I@DSL_INCLUDES@ \
-                -I$(OPENCV_DIR)/include/opencv
+                -I$(OPENCV_DIR)/include
 LDFLAGS       = -lm \
                 -L$(OPENCV_DIR)/lib -lopencv_core -lopencv_gpu -lopencv_imgproc
 OFLAGS        = -O3


Use stronger hint for 64bit Debian-based distro for finding 32bit lib.

--- CMake/Modules/FindReadline.cmake
+++ CMake/Modules/FindReadline.cmake
@@ -33,10 +33,10 @@
     execute_process (COMMAND find /usr/local/Cellar/readline -type d -name lib OUTPUT_VARIABLE LIB_HINTS ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
 elseif (URHO3D_DEFAULT_64BIT AND NOT URHO3D_64BIT)
     # To cater for 32-bit build on 64-bit host system using Debian-based distros; no special handling required for Redhat-based distros but no harm done in doing below
-    set (LIB_PATHS PATHS /usr/lib32)
+    set (LIB_HINTS /usr/lib32)
 endif ()
 find_path (READLINE_INCLUDE_DIRS NAMES readline.h HINTS ${INC_HINTS} PATH_SUFFIXES readline DOC "Readline include directory")
-find_library (READLINE_LIBRARIES NAMES readline HINTS ${LIB_HINTS} ${LIB_PATHS} DOC "Readline library")
+find_library (READLINE_LIBRARIES NAMES readline HINTS ${LIB_HINTS} DOC "Readline library")
 if (NOT APPLE AND URHO3D_DEFAULT_64BIT AND NOT URHO3D_64BIT AND READLINE_LIBRARIES MATCHES 64)
     unset (READLINE_LIBRARIES CACHE)    # Nullify the search result if the ABI is not matched
     unset (READLINE_LIBRARIES)


Fixed OgreJNIDummy dependencies (since Android.mk needs those libraries, they have to be compiled before OgreJNIDummy)

--- CMake/toolchain/AndroidJNI.cmake
+++ CMake/toolchain/AndroidJNI.cmake
@@ -16,6 +16,8 @@
 	else()
 		add_dependencies(OgreJNIDummy OgreMain RenderSystem_GLES)
 	endif()
+
+	add_dependencies(OgreJNIDummy OgreTerrain OgreRTShaderSystem OgreOverlay OgrePaging OgreVolume Plugin_ParticleFX Plugin_OctreeSceneManager)

     if(APPLE OR WIN32)
       SET(ANDROID_EXECUTABLE "android")


Tweak plugin loading (again)

Tweak plugin loading (again)

[ ] May break build
[ ] May break existing applications (see CHANGES.txt)
[x] Bugfix
[ ] New Feature
[ ] Cleanup
[ ] Optimization
[ ] Documentation

--- PurpleAddAmalgamation.cmake
+++ PurpleAddAmalgamation.cmake
@@ -15,7 +15,7 @@

   set(THIS_SOURCES)
   set(THIS_LIBRARIES)
-  if(MSVC)
+  if(MSVC OR XCODE_VERSION)
     set(THIS_DEFINITIONS EQ_DSO_NAME=\"${CMAKE_SHARED_LIBRARY_PREFIX}${NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}\")
   else()
     if(APPLE)


CMake: Remove ANTLR find module

CMake: Remove ANTLR find module

--- scripts/cmake/Modules/FindANTLR4CPP.cmake
+++ scripts/cmake/Modules/FindANTLR4CPP.cmake
@@ -1,32 +0,0 @@
-# Try to find the C++ runtime of ANTLR
-# ====================================
-
-# Once done this will define
-#
-# - ANTLR4CPP_FOUND: Tells us if the script was able to find the C++ runtime of ANTLR
-# - ANTLR4CPP_INCLUDE_DIRS: The ANTLR C++ runtime include directories
-# - ANTLR4CPP_LIBRARIES: The libraries needed to use the ANTLR C++ runtime
-#
-# This script is a modified version of the code available here: https://cmake.org/Wiki/CMake:How_To_Find_Libraries#Writing_find_modules
-
-# The handwritten code includes `antlr4-runtime/antlr4-runtime.h`
-find_path (
-	ANTLR4CPP_INCLUDE_DIR
-	NAMES antlr4-runtime/antlr4-runtime.h
-	PATH_SUFFIXES antlr4-runtime)
-# The generated code includes `antlr4-runtime.h` directly
-find_path (
-	ANTLR4CPP_INCLUDE_DIR_WITHOUT_PREFIX
-	NAMES antlr4-runtime.h
-	PATH_SUFFIXES antlr4-runtime)
-set (ANTLR4CPP_INCLUDE_DIR ${ANTLR4CPP_INCLUDE_DIR} ${ANTLR4CPP_INCLUDE_DIR_WITHOUT_PREFIX})
-
-find_library (ANTLR4CPP_LIBRARY NAMES antlr4-runtime)
-
-include (FindPackageHandleStandardArgs)
-find_package_handle_standard_args (ANTLR4CPP DEFAULT_MSG ANTLR4CPP_LIBRARY ANTLR4CPP_INCLUDE_DIR)
-
-mark_as_advanced (ANTLR4CPP_INCLUDE_DIR ANTLR4CPP_LIBRARY)
-
-set (ANTLR4CPP_LIBRARIES ${ANTLR4CPP_LIBRARY})
-set (ANTLR4CPP_INCLUDE_DIRS ${ANTLR4CPP_INCLUDE_DIR})


CMake: Recognize FreeType version 2.3.11

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -31,7 +31,7 @@
   FREETYPE_INCLUDE_DIR
 )

-set(FREETYPE_LIBRARY_NAMES freetype freetype219 freetype235 freetype238 freetype239)
+set(FREETYPE_LIBRARY_NAMES freetype freetype219 freetype235 freetype238 freetype239 freetype2311)
 get_debug_names(FREETYPE_LIBRARY_NAMES)

 use_pkgconfig(FREETYPE_PKGC freetype2)


Use arrayfire fork of freetype

Use arrayfire fork of freetype

Upstream git server is causing HTTP 503 occasionally which is causing
our build jobs to hang.

--- CMakeModules/build_freetype.cmake
+++ CMakeModules/build_freetype.cmake
@@ -26,7 +26,7 @@

 ExternalProject_Add(
     ft-ext
-    GIT_REPOSITORY http://git.sv.nongnu.org/r/freetype/freetype2.git
+    GIT_REPOSITORY https://github.com/arrayfire/freetype2.git
     GIT_TAG VER-2-7-1
     PREFIX "${prefix}"
     INSTALL_DIR "${prefix}"


changed FindTIXI.cmake to look only for the right windows architecture

--- contrib/FindTIXI.cmake
+++ contrib/FindTIXI.cmake
@@ -24,8 +24,8 @@
 FIND_PATH(TIXI_INCLUDE_DIR
 	NAMES tixi.h
 	PATHS
-	"[HKEY_LOCAL_MACHINE\\SOFTWARE\\www.dlr.de/sc\\TIXI]/include"
-    "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\www.dlr.de/sc\\TIXI]/include")
+	"[HKEY_LOCAL_MACHINE\\SOFTWARE\\www.dlr.de/sc\\TIXI]/include"
+)

 # MARK_AS_ADVANCED(TIXI_INCLUDE_DIR)

@@ -34,7 +34,6 @@
 	TIXI
 	PATHS
 	"[HKEY_LOCAL_MACHINE\\SOFTWARE\\www.dlr.de/sc\\TIXI]/lib"
-	"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\www.dlr.de/sc\\TIXI]/lib"
 )
 # MARK_AS_ADVANCED(TIXI_LIBRARY)

@@ -43,7 +42,7 @@
 	NAMES TIXI.dll
 	PATHS
 	"[HKEY_LOCAL_MACHINE\\SOFTWARE\\www.dlr.de/sc\\TIXI]/bin"
-    "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\www.dlr.de/sc\\TIXI]/bin")
+)
 endif(WIN32)

 # handle the QUIETLY and REQUIRED arguments and set TIXI_FOUND to TRUE if


Revert "Configure without Stellar and Tetgen."

This reverts commit e9ffc8d9c4cf1b513425e38749e6c6a7e3a691e6.

--- SlicerVmtk4/SuperBuild/VMTK.cmake
+++ SlicerVmtk4/SuperBuild/VMTK.cmake
@@ -45,9 +45,7 @@
       -DVMTK_WITH_LIBRARY_VERSION:BOOL=OFF
       -DVTK_VMTK_IN_SLICER4:BOOL=ON
       # we do not want tetgen..
-      -DVTK_VMTK_BUILD_TETGEN:BOOL=OFF
-      # we not want stellar..
-      -DVTK_VMTK_BUILD_STELLAR:BOOL=OFF
+      -DVMTK_BUILD_TETGEN:BOOL=OFF
       # we want the vmtk scripts :)
       -DVMTK_SCRIPTS_ENABLED:BOOL=ON
       # we do not want cocoa, go away :)


boards: nrf5340: modify the hex file when flashing the merged binary

When instructed to flash the combined Secure and Non-Secure
binary, we need to modify the hex file used in west flash.
The combined binary is named tfm_merged.hex, regardless of
building with or without BL2.

Signed-off-by: Ioannis Glaropoulos <5921cc8bab7e1d4329f52fd8f6268f9692e3de80@nordicsemi.no>

--- boards/arm/nrf5340dk_nrf5340/board.cmake
+++ boards/arm/nrf5340dk_nrf5340/board.cmake
@@ -8,6 +8,10 @@
 board_runner_args(jlink "--device=nrf5340_xxaa_app" "--speed=4000")
 endif()

+if(CONFIG_TFM_FLASH_MERGED_BINARY)
+  set_property(TARGET runners_yaml_props_target PROPERTY hex_file "${CMAKE_BINARY_DIR}/tfm_merged.hex")
+endif()
+
 if(CONFIG_BOARD_NRF5340DK_NRF5340_CPUNET)
 board_runner_args(jlink "--device=nrf5340_xxaa_net" "--speed=4000")
 endif()


[stdlib] Only emit lexical markers.

[stdlib] Only emit lexical markers.

Don't use lexical lifetimes fully in the stdlib for now.

--- stdlib/cmake/modules/AddSwiftStdlib.cmake
+++ stdlib/cmake/modules/AddSwiftStdlib.cmake
@@ -1713,6 +1713,7 @@
   if (SWIFTLIB_IS_STDLIB)
     list(APPEND SWIFTLIB_SWIFT_COMPILE_FLAGS "-warn-implicit-overrides")
     list(APPEND SWIFTLIB_SWIFT_COMPILE_FLAGS "-Xfrontend;-enable-ossa-modules")
+    list(APPEND SWIFTLIB_SWIFT_COMPILE_FLAGS "-Xfrontend;-enable-lexical-lifetimes=false")
   endif()

   if(NOT SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER AND NOT BUILD_STANDALONE AND


Specify Range v3 version to fetch

Specify Range v3 version to fetch

--- cmake/modules/jegp_find_dependencies.cmake
+++ cmake/modules/jegp_find_dependencies.cmake
@@ -2,6 +2,7 @@

 FetchContent_Declare(range-v3
     GIT_REPOSITORY https://github.com/ericniebler/range-v3.git
+    GIT_TAG 0.4.0
     GIT_SHALLOW True)

 FetchContent_GetProperties(range-v3)


Fixes #1080

Fixes #1080

--- cmakemodules/script_install_commands.cmake
+++ cmakemodules/script_install_commands.cmake
@@ -59,7 +59,6 @@

 else(WIN32)
 	if (NOT IS_DEBIAN_DBG_PKG)
-		install(DIRECTORY "${MRPT_SOURCE_DIR}/doc/html" DESTINATION ${mrpt_doc_INSTALL_PREFIX}share/doc/mrpt-doc/  )
 		install(DIRECTORY "${MRPT_SOURCE_DIR}/samples" DESTINATION ${mrpt_doc_INSTALL_PREFIX}share/doc/mrpt-doc/  )
 		if(EXISTS "${MRPT_SOURCE_DIR}/doc/mrpt-book.ps.gz")
 			install(FILES "${MRPT_SOURCE_DIR}/doc/mrpt-book.ps.gz" DESTINATION ${mrpt_doc_INSTALL_PREFIX}share/doc/mrpt-doc/ )


Updated include guards to reflect NEON ABI

--- android-ndk-r10e-api-21-armeabi-v7a-neon.cmake
+++ android-ndk-r10e-api-21-armeabi-v7a-neon.cmake
@@ -2,10 +2,10 @@
 # Copyright (c) 2015, David Hirvonen
 # All rights reserved.

-if(DEFINED POLLY_ANDROID_NDK_R10E_API_21_ARMEABI_V7A_CMAKE_)
+if(DEFINED POLLY_ANDROID_NDK_R10E_API_21_ARMEABI_V7A_NEON_CMAKE_)
   return()
 else()
-  set(POLLY_ANDROID_NDK_R10E_API_21_ARMEABI_V7A_CMAKE_ 1)
+  set(POLLY_ANDROID_NDK_R10E_API_21_ARMEABI_V7A_NEON_CMAKE_ 1)
 endif()

 include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_clear_environment_variables.cmake")


cmake: check_c_compieler_flag_ssp should be a macro

Signed-off-by: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@cryptomilk.org>

--- cmake/Modules/CheckCCompilerFlagSSP.cmake
+++ cmake/Modules/CheckCCompilerFlagSSP.cmake
@@ -15,12 +15,15 @@
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.

-
+# Requires cmake 3.10
+#include_guard(GLOBAL)
 include(CheckCSourceCompiles)

-function(CHECK_C_COMPILER_FLAG_SSP _FLAG _RESULT)
-   set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
-   set(CMAKE_REQUIRED_FLAGS "${_FLAG}")
+macro(CHECK_C_COMPILER_FLAG_SSP _FLAG _RESULT)
+   set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
+   set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
+
    check_c_source_compiles("int main(int argc, char **argv) { char buffer[256]; return buffer[argc]=0;}" ${_RESULT})
-   set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
-endfunction(CHECK_C_COMPILER_FLAG_SSP)
+
+   set(CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
+endmacro(CHECK_C_COMPILER_FLAG_SSP)


Revert "SuperBuild: boost: 1.50 -> 1.57.0 (might be the reason for massive dl_close error)"

This reverts commit ea8ddce85eedb5645f0c129acfa0cafcdb493d5c.

--- SuperBuild/CMake/External_opencv.cmake
+++ SuperBuild/CMake/External_opencv.cmake
@@ -14,7 +14,7 @@

 ExternalProject_Add(OPENCV
   PREFIX OPENCV
-  URL "http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.11/opencv-2.4.11.zip"
+  URL "http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.11/opencv-2.4.11.zip/download"
   URL_MD5 32f498451bff1817a60e1aabc2939575
   BINARY_DIR ${OPENCV_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
@@ -37,6 +37,25 @@
   -DBUILD_TESTS:BOOL=OFF
   -DBUILD_TIFF:BOOL=OFF
   -DBUILD_ZLIB:BOOL=OFF
+  -DWITH_CUDA:BOOL=OFF
+  -DWITH_OPENCL:BOOL=OFF
+  -DWITH_CUDA:BOOL=OFF
+  -DWITH_OPENCL:BOOL=OFF
+  -DWITH_CUFFT:BOOL=OFF
+  -DWITH_GIGEAPI:BOOL=OFF
+  -DWITH_GSTREAMER:BOOL=OFF
+  -DWITH_GTK:BOOL=OFF
+  -DWITH_OPENCLAMDBLAS:BOOL=OFF
+  -DWITH_OPENCLAMDFFT:BOOL=OFF
+  -DWITH_OPENEXR:BOOL=OFF
+  -DWITH_PVAPI:BOOL=OFF
+  -DWITH_QT:BOOL=OFF
+  -DWITH_UNICAP:BOOL=OFF
+  -DWITH_LIBV4L:BOOL=OFF
+  -DWITH_V4L:BOOL=OFF
+  -DWITH_VTK:BOOL=OFF
+  -DWITH_XIMEA:BOOL=OFF
+  -DWITH_XINE:BOOL=OFF
   -DBUILD_opencv_apps:BOOL=OFF
   -DBUILD_opencv_calib3d:BOOL=OFF
   -DBUILD_opencv_contrib:BOOL=OFF
@@ -60,8 +79,6 @@
   -DBUILD_opencv_video:BOOL=OFF
   -DBUILD_opencv_videostab:BOOL=OFF
   -DBUILD_opencv_world:BOOL=OFF
-  -DWITH_CUDA:BOOL=OFF
-  -DWITH_OPENCL:BOOL=OFF
   ${OPENCV_SB_CONFIG}
   DEPENDS ${OPENCV_DEPENDENCIES}
   CMAKE_COMMAND ${SB_CMAKE_COMMAND}


Build both .bin and .dfu files every time

--- firmware/cmake/greatfet-common.cmake
+++ firmware/cmake/greatfet-common.cmake
@@ -3,6 +3,7 @@
 # Copyright 2012 Michael Ossmann <mike@ossmann.com>
 # Copyright 2012 Benjamin Vernoux <titanmkd@gmail.com>
 # Copyright 2012 Jared Boone <jared@sharebrained.com>
+# Copyright 2016 Dominic Spill <dominicgs@gmail.com>
 #
 # This file is part of GreatFET.
 #
@@ -51,10 +52,6 @@
 	set(BOARD GREATFET_AZALEA)
 endif()

-if(NOT DEFINED RUN_FROM)
-	set(RUN_FROM SPIFI)
-endif()
-
 if(BOARD STREQUAL "GREATFET_AZALEA")
 	set(MCU_PARTNO LPC4330)
 endif()
@@ -65,13 +62,9 @@

 SET(GREATFET_OPTS "-D${BOARD} -DLPC43XX -D${MCU_PARTNO} -DTX_ENABLE -D'VERSION_STRING=\"git-${VERSION}\"' -DRUN_FROM=${RUN_FROM}")

-SET(LDSCRIPT_M4 "-T${PATH_GREATFET_FIRMWARE_COMMON}/${MCU_PARTNO}_M4_memory.ld")
-if( RUN_FROM STREQUAL "RAM")
-	SET(LDSCRIPT_M4 "${LDSCRIPT_M4} -Tlibopencm3_lpc43xx.ld")
-else()
-	SET(LDSCRIPT_M4 "${LDSCRIPT_M4} -Tlibopencm3_lpc43xx_rom_to_ram.ld")
-endif()
-SET(LDSCRIPT_M4 "${LDSCRIPT_M4} -T${PATH_GREATFET_FIRMWARE_COMMON}/LPC43xx_M4_M0_image_from_text.ld")
+SET(LDSCRIPT_M4 "-T${PATH_GREATFET_FIRMWARE_COMMON}/${MCU_PARTNO}_M4_memory.ld -Tlibopencm3_lpc43xx_rom_to_ram.ld -T${PATH_GREATFET_FIRMWARE_COMMON}/LPC43xx_M4_M0_image_from_text.ld")
+
+SET(LDSCRIPT_M4_DFU "-T${PATH_GREATFET_FIRMWARE_COMMON}/${MCU_PARTNO}_M4_memory.ld -Tlibopencm3_lpc43xx.ld -T${PATH_GREATFET_FIRMWARE_COMMON}/LPC43xx_M4_M0_image_from_text.ld")

 SET(LDSCRIPT_M0 "-T${PATH_GREATFET_FIRMWARE_COMMON}/LPC43xx_M0_memory.ld -Tlibopencm3_lpc43xx_m0.ld")

@@ -91,6 +84,7 @@
 SET(CFLAGS_M4 "-std=gnu99 ${CFLAGS_COMMON} ${CPUFLAGS_M4} -DLPC43XX_M4")
 SET(CXXFLAGS_M4 "-std=gnu++0x ${CFLAGS_COMMON} ${CPUFLAGS_M4} -DLPC43XX_M4")
 SET(LDFLAGS_M4 "${LDFLAGS_COMMON} ${CPUFLAGS_M4} ${LDSCRIPT_M4} -Xlinker -Map=m4.map")
+SET(LDFLAGS_M4_DFU "${LDFLAGS_COMMON} ${CPUFLAGS_M4} ${LDSCRIPT_M4_DFU} -Xlinker -Map=m4.map")

 set(BUILD_SHARED_LIBS OFF)

@@ -98,37 +92,7 @@
 include_directories("${PATH_GREATFET_FIRMWARE_COMMON}")

 macro(DeclareTargets)
-	configure_file(
-		../cmake/m0_bin.s.cmake
-		m0_bin.s
-	)
-
-	link_directories(
-		"${PATH_GREATFET_FIRMWARE_COMMON}"
-		"${LIBOPENCM3}/lib"
-		"${LIBOPENCM3}/lib/lpc43xx"
-		"${CMAKE_INSTALL_PREFIX}/lib/armv7e-m/fpu"
-	)
-
-	add_executable(${PROJECT_NAME}_m0.elf ${SRC_M0})
-
-	target_link_libraries(
-		${PROJECT_NAME}_m0.elf
-		c
-		nosys
-		opencm3_lpc43xx_m0
-	)
-
-	set_target_properties(${PROJECT_NAME}_m0.elf PROPERTIES COMPILE_FLAGS "${CFLAGS_M0}")
-	set_target_properties(${PROJECT_NAME}_m0.elf PROPERTIES LINK_FLAGS "${LDFLAGS_M0}")
-
-	add_custom_target(
-		${PROJECT_NAME}_m0.bin
-		DEPENDS ${PROJECT_NAME}_m0.elf
-		COMMAND ${CMAKE_OBJCOPY} -Obinary ${PROJECT_NAME}_m0.elf ${PROJECT_NAME}_m0.bin
-	)
-
-	add_executable(${PROJECT_NAME}.elf
+	SET(SRC_M4
 		${SRC_M4}
 		${PATH_GREATFET_FIRMWARE_COMMON}/greatfet_core.c
 		${PATH_GREATFET_FIRMWARE_COMMON}/spiflash_target.c
@@ -137,9 +101,39 @@
 		${PATH_GREATFET_FIRMWARE_COMMON}/i2c_bus.c
 		${PATH_GREATFET_FIRMWARE_COMMON}/i2c_lpc.c
 		${PATH_GREATFET_FIRMWARE_COMMON}/gpio_lpc.c
+	)
+
+	configure_file(
+		../cmake/m0_bin.s.cmake
 		m0_bin.s
 	)

+	link_directories(
+		"${PATH_GREATFET_FIRMWARE_COMMON}"
+		"${LIBOPENCM3}/lib"
+		"${LIBOPENCM3}/lib/lpc43xx"
+		"${CMAKE_INSTALL_PREFIX}/lib/armv7e-m/fpu"
+	)
+
+	add_executable(${PROJECT_NAME}_m0.elf ${SRC_M0})
+
+	target_link_libraries(
+		${PROJECT_NAME}_m0.elf
+		c
+		nosys
+		opencm3_lpc43xx_m0
+	)
+
+	set_target_properties(${PROJECT_NAME}_m0.elf PROPERTIES COMPILE_FLAGS "${CFLAGS_M0}")
+	set_target_properties(${PROJECT_NAME}_m0.elf PROPERTIES LINK_FLAGS "${LDFLAGS_M0}")
+
+	add_custom_target(
+		${PROJECT_NAME}_m0.bin
+		DEPENDS ${PROJECT_NAME}_m0.elf
+		COMMAND ${CMAKE_OBJCOPY} -Obinary ${PROJECT_NAME}_m0.elf ${PROJECT_NAME}_m0.bin
+	)
+
+	add_executable(${PROJECT_NAME}.elf ${SRC_M4} m0_bin.s)
 	add_dependencies(${PROJECT_NAME}.elf ${PROJECT_NAME}_m0.bin)

 	target_link_libraries(
@@ -159,15 +153,44 @@
 		COMMAND ${CMAKE_OBJCOPY} -Obinary ${PROJECT_NAME}.elf ${PROJECT_NAME}.bin
 	)

-    add_custom_target(
+	# DFU - using a differnet LD script to run directly from RAM
+	add_executable(${PROJECT_NAME}_dfu.elf ${SRC_M4} m0_bin.s)
+	add_dependencies(${PROJECT_NAME}_dfu.elf ${PROJECT_NAME}_m0.bin)
+
+	target_link_libraries(
+		${PROJECT_NAME}_dfu.elf
+		c
+		nosys
+		opencm3_lpc43xx
+		m
+	)
+
+	set_target_properties(${PROJECT_NAME}_dfu.elf PROPERTIES COMPILE_FLAGS "${CFLAGS_M4}")
+	set_target_properties(${PROJECT_NAME}_dfu.elf PROPERTIES LINK_FLAGS "${LDFLAGS_M4_DFU}")
+
+	add_custom_target(
+		${PROJECT_NAME}_dfu.bin
+		DEPENDS ${PROJECT_NAME}_dfu.elf
+		COMMAND ${CMAKE_OBJCOPY} -Obinary ${PROJECT_NAME}_dfu.elf ${PROJECT_NAME}_dfu.bin
+	)
+
+	add_custom_target(
 		${PROJECT_NAME}.dfu ${DFU_ALL}
-		DEPENDS ${PROJECT_NAME}.bin
+		DEPENDS ${PROJECT_NAME}_dfu.bin ${PROJECT_NAME}.bin
 		COMMAND rm -f _tmp.dfu _header.bin
-		COMMAND cp ${PROJECT_NAME}.bin _tmp.dfu
+		COMMAND cp ${PROJECT_NAME}_dfu.bin _tmp.dfu
 		COMMAND ${DFU_COMMAND}
-		COMMAND python -c \"import os.path\; import struct\; print\('0000000: da ff ' + ' '.join\(map\(lambda s: '%02x' % ord\(s\), struct.pack\('<H', os.path.getsize\('${PROJECT_NAME}.bin'\) / 512 + 1\)\)\) + ' ff ff ff ff'\)\" | xxd -g1 -r > _header.bin
+		COMMAND python -c \"import os.path\; import struct\; print\('0000000: da ff ' + ' '.join\(map\(lambda s: '%02x' % ord\(s\), struct.pack\('<H', os.path.getsize\('${PROJECT_NAME}_dfu.bin'\) / 512 + 1\)\)\) + ' ff ff ff ff'\)\" | xxd -g1 -r > _header.bin
 		COMMAND cat _header.bin _tmp.dfu >${PROJECT_NAME}.dfu
 		COMMAND rm -f _tmp.dfu _header.bin
+	)
+
+	# Program / flash targets
+	# Make programming easier but also force build of both .dfu and .bin files
+	add_custom_target(
+		${PROJECT_NAME}-flash
+		DEPENDS ${PROJECT_NAME}.bin
+		COMMAND greatfet_firmware -w ${PROJECT_NAME}.bin
 	)

 	add_custom_target(


px4_fmu-v5x:Add Serial test

px4_fmu-v5x:Add Serial test

--- boards/px4/fmu-v5x/p2_base_phy_LAN8742Ai.cmake
+++ boards/px4/fmu-v5x/p2_base_phy_LAN8742Ai.cmake
@@ -114,6 +114,7 @@
 		usb_connected
 		ver
 		work_queue
+		serial_test
 	EXAMPLES
 		bottle_drop # OBC challenge
 		fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control


Add lua variables to cache

Add lua variables to cache

--- cmake-modules/FindLua.cmake
+++ cmake-modules/FindLua.cmake
@@ -3,11 +3,11 @@
 IF(PKG_CONFIG_FOUND)
         pkg_check_modules (LUA lua>=5.1)
         if (LUA_VERSION VERSION_LESS "5.2")
-                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLUA51")
-		SET(LUA_SHORT_VERSION "5.1")
+                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLUA51" CACHE STRING "Lua version compiler flag")
+		SET(LUA_SHORT_VERSION "5.1" CACHE STRING "Lua short version string")
         else()
-                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLUA52")
-		SET(LUA_SHORT_VERSION "5.2")
+                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLUA52" CACHE STRING "Lua version compiler flag")
+		SET(LUA_SHORT_VERSION "5.2" CACHE STRING "Lua short version string")
         endif()

         FIND_LIBRARY(LUA_LIBRARY NAMES lua)
@@ -24,18 +24,18 @@

                 execute_process(COMMAND ${LuaInterp} -v ERROR_VARIABLE LUA_OUTPUT OUTPUT_VARIABLE LUA_OUTPUT)
                 STRING(REGEX MATCH "Lua ([0-9]+.[0-9]+).*" DUMMY "${LUA_OUTPUT}" )
-		SET(LUA_VERSION ${CMAKE_MATCH_1})
+		SET(LUA_VERSION ${CMAKE_MATCH_1} CACHE STRING "Lua version string")

                 IF (LUA_VERSION VERSION_LESS "5.1")
 			MESSAGE(FATAL_ERROR "Lua reports unsupported version ${LUA_VERSION}")
                 ELSE ()
 			MESSAGE(STATUS "Found Lua version = ${LUA_VERSION}")
                         if (LUA_VERSION VERSION_LESS "5.2")
-                                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLUA51")
-				SET(LUA_SHORT_VERSION "5.1")
+                                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLUA51" CACHE STRING "Lua version compiler flag")
+				SET(LUA_SHORT_VERSION "5.1" CACHE STRING "Lua short version string")
                         else()
-                                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLUA52")
-				SET(LUA_SHORT_VERSION "5.2")
+                                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLUA52" CACHE STRING "Lua version compiler flag")
+				SET(LUA_SHORT_VERSION "5.2" CACHE STRING "Lua short version string")
                         endif()
                 ENDIF ()


fixed some problems with coverage package

--- cmake/CoverageReports.cmake
+++ cmake/CoverageReports.cmake
@@ -61,23 +61,17 @@
   else ()
     message(WARNING "Cannot enable coverage reporting. Unsupported compiler: (${CMAKE_CXX_COMPILER_ID}).")
     set(COVERAGE_ENABLED OFF)
-    return()
   endif ()

-  if (NOT ${COVERAGE_ENABLED})
-    return()
-  endif()
-
-  if (NOT CMAKE_BUILD_TYPE)
+  if (${COVERAGE_ENABLED})
+    if (NOT CMAKE_BUILD_TYPE)
       message(STATUS "Coverage requested but build type was not set. Using Debug mode.")
       set(CMAKE_BUILD_TYPE "Debug")
-  endif()
-
-  if (CMAKE_BUILD_TYPE STREQUAL "Release")
+    elseif (CMAKE_BUILD_TYPE STREQUAL "Release")
       message(WARNING "Cannot provide coverage reporting with Release build. Disabling coverage.")
       set(COVERAGE_ENABLED OFF)
-      return()
-  endif()
+    endif ()
+  endif ()

 endif ()


Fix comment and cmake variables and search paths in FindMKL.cmake (#19152)

--- cmake/Modules/FindMKL.cmake
+++ cmake/Modules/FindMKL.cmake
@@ -28,7 +28,7 @@
 # This module defines the following variables:
 #
 #   MKL_FOUND            : True mkl is found
-#   MKL_INCLUDE_DIR      : unclude directory
+#   MKL_INCLUDE_DIR      : include directory
 #   MKL_LIBRARIES        : the libraries to link against.
 #
 # cjolivier01: Changed to also look for MKLDNN library (subset of mkl) instead of standard MKL package
@@ -39,7 +39,8 @@
 endif()

 # ---[ Root folders
-set(INTEL_ROOT "/opt/intel" CACHE PATH "Folder contains intel libs")
+set(INTEL_HOME_ROOT "$ENV{HOME}/intel" CACHE PATH "Folder contains user-installed intel libs")
+set(INTEL_OPT_ROOT "/opt/intel" CACHE PATH "Folder contains root-installed intel libs")

   # ---[ Options
@@ -55,7 +56,7 @@
   option(MKL_USE_ILP64 "Use ilp64 data model" OFF)
   cmake_dependent_option(MKL_USE_CLUSTER "Use cluster functions" OFF "CMAKE_SIZEOF_VOID_P EQUAL 4" OFF)

-  find_path(MKL_ROOT include/mkl.h PATHS $ENV{MKL_ROOT} ${INTEL_ROOT}/mkl
+  find_path(MKL_ROOT include/mkl.h PATHS $ENV{MKLROOT} ${INTEL_HOME_ROOT}/mkl ${INTEL_OPT_ROOT}/mkl
     DOC "Folder contains MKL")

   # ---[ Find include dir
@@ -134,12 +135,12 @@
     endif()

     if(WIN32)
-      find_path(INTEL_INCLUDE_DIR omp.h PATHS ${INTEL_ROOT} PATH_SUFFIXES include)
+      find_path(INTEL_INCLUDE_DIR omp.h PATHS ${MKL_ROOT} PATH_SUFFIXES include)
       list(APPEND __looked_for INTEL_INCLUDE_DIR)
     endif()

     find_library(IOMP_LIBRARY ${__iomp5_libs}
-      PATHS ${INTEL_RTL_ROOT} ${INTEL_ROOT}/compiler ${MKL_ROOT}/.. ${MKL_ROOT}/../compiler
+      PATHS ${MKL_ROOT} ${MKL_ROOT}/compiler ${MKL_ROOT}/.. ${MKL_ROOT}/../compiler
       PATH_SUFFIXES ${__path_suffixes}
       DOC "Path to Path to OpenMP runtime library")


eagle: fix DSP build

eagle: fix DSP build

The hexagon-clang is clang-3.5 and does not support -fcheck-new.

--- cmake/common/px4_base.cmake
+++ cmake/common/px4_base.cmake
@@ -643,13 +643,20 @@
 	set(cxx_compile_flags
 		-g
 		-fno-exceptions
-		-fcheck-new
 		-fno-rtti
 		-std=gnu++0x
 		-fno-threadsafe-statics
 		-DCONFIG_WCHAR_BUILTIN
 		-D__CUSTOM_FILE_IO__
 		)
+
+	if (NOT "${OS}" STREQUAL "qurt")
+		# -fcheck-new is not supported by clang-3.5 from
+		# HEXAGON_Tools/7.2.10/Tools/bin/hexagon-clang.
+		list(APPEND cxx_compile_flags
+			-fcheck-new
+		)
+	endif()

 	set(visibility_flags
 		-fvisibility=hidden
@@ -708,7 +715,7 @@
 		set(added_exe_linker_flags
 			-Wl,--warn-common
 			-Wl,--gc-sections
-			#,--print-gc-sections
+			#,--print-gc-sections
 			)
 	endif()


Missing library.

Missing library.

--- cmake/dtkDependencies.cmake
+++ cmake/dtkDependencies.cmake
@@ -29,6 +29,7 @@
 set(QT_USE_QTTEST        TRUE)
 set(QT_USE_QTWEBKIT      TRUE)
 set(QT_USE_QTTEST        TRUE)
+set(QT_USE_QTDECLARATIVE TRUE)

 if(WIN32)
   set(QT_USE_QTMAIN TRUE)


Minor refactoring

Minor refactoring

--- cmake/external/nanopb.cmake
+++ cmake/external/nanopb.cmake
@@ -17,6 +17,11 @@
   NANOPB_GIT
   GIT_REPOSITORY "https://github.com/nanopb/nanopb.git"
   GIT_TAG "0.3.8"
+)
+
+set(
+  NANOPB_PROTOC_BIN
+  ${FIREBASE_INSTALL_DIR}/external/protobuf/src/protobuf-build/src/protoc
 )

 ExternalProject_Add(
@@ -50,7 +55,9 @@
   # nanopb relies on $PATH for the location of protoc. cmake makes it difficult
   # to adjust the path, so we'll just patch the build files with the exact
   # location of protoc.
-  PATCH_COMMAND perl -i -pe s,protoc,${FIREBASE_INSTALL_DIR}/external/protobuf/src/protobuf-build/src/protoc,g ./CMakeLists.txt ./generator/proto/Makefile
+  PATCH_COMMAND
+    perl -i -pe s,protoc,${NANOPB_PROTOC_BIN},g
+        ./CMakeLists.txt ./generator/proto/Makefile

   UPDATE_COMMAND ""
   INSTALL_COMMAND ""


[CMake] Introduce llvm_add_library().

[CMake] Introduce llvm_add_library().

  - MODULE;SHARED;STATIC
      STATIC by default w/o BUILD_SHARED_LIBS.
      SHARED by default w/  BUILD_SHARED_LIBS.
  - OUTPUT_NAME name
      Corresponds to OUTPUT_NAME in target properties.
  - DEPENDS targets...
      Same semantics as add_dependencies().
  - LINK_COMPONENTS components...
      Same as the variable LLVM_LINK_COMPONENTS.
  - LINK_LIBS lib_targets...
      Same semantics as target_link_libraries().
  - ADDITIONAL_HEADERS (implemented in LLVMProcessSources)
      May specify header files for IDE generators.

I suggest llvm_add_library() may be used for inter-project add_library stuff
and also suggest add_***_library() may be used project-specific.

Please be patient that llvm_add_library might be ambiguous against add_llvm_library.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -162,33 +162,98 @@
   endif()
 endfunction()

-macro(add_llvm_library name)
-  llvm_process_sources( ALL_FILES ${ARGN} )
-  add_library( ${name} ${ALL_FILES} )
+# llvm_add_library(name sources...
+#   MODULE;SHARED;STATIC
+#     STATIC by default w/o BUILD_SHARED_LIBS.
+#     SHARED by default w/  BUILD_SHARED_LIBS.
+#   OUTPUT_NAME name
+#     Corresponds to OUTPUT_NAME in target properties.
+#   DEPENDS targets...
+#     Same semantics as add_dependencies().
+#   LINK_COMPONENTS components...
+#     Same as the variable LLVM_LINK_COMPONENTS.
+#   LINK_LIBS lib_targets...
+#     Same semantics as target_link_libraries().
+#   ADDITIONAL_HEADERS (implemented in LLVMProcessSources)
+#     May specify header files for IDE generators.
+#   )
+function(llvm_add_library name)
+  cmake_parse_arguments(ARG
+    "MODULE;SHARED;STATIC"
+    "OUTPUT_NAME"
+    "DEPENDS;LINK_COMPONENTS;LINK_LIBS"
+    ${ARGN})
+  list(APPEND LLVM_COMMON_DEPENDS ${ARG_DEPENDS})
+  llvm_process_sources(ALL_FILES ${ARG_UNPARSED_ARGUMENTS})
+
+  if(ARG_MODULE)
+    if(ARG_SHARED OR ARG_STATIC)
+      message(WARNING "MODULE with SHARED|STATIC doesn't make sense.")
+    endif()
+  else()
+    if(BUILD_SHARED_LIBS AND NOT ARG_STATIC)
+      set(ARG_SHARED TRUE)
+    endif()
+    if(NOT ARG_SHARED)
+      set(ARG_STATIC TRUE)
+    endif()
+  endif()
+
+  if(ARG_MODULE)
+    add_library(${name} MODULE ${ALL_FILES})
+  elseif(ARG_SHARED)
+    add_library(${name} SHARED ${ALL_FILES})
+  else()
+    add_library(${name} STATIC ${ALL_FILES})
+  endif()
   set_output_directory(${name} ${LLVM_RUNTIME_OUTPUT_INTDIR} ${LLVM_LIBRARY_OUTPUT_INTDIR})
-  set_property( GLOBAL APPEND PROPERTY LLVM_LIBS ${name} )
   llvm_update_compile_flags(${name})
   add_dead_strip( ${name} )
-  if( LLVM_COMMON_DEPENDS )
-    add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
-  endif( LLVM_COMMON_DEPENDS )
-
-  if( BUILD_SHARED_LIBS )
-    llvm_config( ${name} ${LLVM_LINK_COMPONENTS} )
+  if(ARG_OUTPUT_NAME)
+    set_target_properties(${name}
+      PROPERTIES
+      OUTPUT_NAME ${ARG_OUTPUT_NAME}
+      )
+  endif()
+
+  if(ARG_MODULE)
+    set_property(TARGET ${name} PROPERTY SUFFIX ${LLVM_PLUGIN_EXT})
+  endif()
+
+  if(ARG_SHARED)
     if (MSVC)
       set_target_properties(${name}
         PROPERTIES
         IMPORT_SUFFIX ".imp")
     endif ()
-
+  endif()
+
+  if(ARG_MODULE OR ARG_SHARED)
     if (LLVM_EXPORTED_SYMBOL_FILE)
       add_llvm_symbol_exports( ${name} ${LLVM_EXPORTED_SYMBOL_FILE} )
     endif()
   endif()
+
+  target_link_libraries(${name} ${ARG_LINK_LIBS})
+
+  llvm_config(${name} ${ARG_LINK_COMPONENTS} ${LLVM_LINK_COMPONENTS})

   # Ensure that the system libraries always comes last on the
   # list. Without this, linking the unit tests on MinGW fails.
   link_system_libs( ${name} )
+
+  if(LLVM_COMMON_DEPENDS)
+    add_dependencies(${name} ${LLVM_COMMON_DEPENDS})
+  endif()
+endfunction()
+
+macro(add_llvm_library name)
+  if( BUILD_SHARED_LIBS )
+    llvm_add_library(${name} SHARED ${ARGN})
+  else()
+    llvm_add_library(${name} ${ARGN})
+  endif()
+  set_property( GLOBAL APPEND PROPERTY LLVM_LIBS ${name} )

   if( EXCLUDE_FROM_ALL )
     set_target_properties( ${name} PROPERTIES EXCLUDE_FROM_ALL ON)
@@ -219,29 +284,14 @@
     # Add empty "phony" target
     add_custom_target(${name})
   else()
-    llvm_process_sources( ALL_FILES ${ARGN} )
-    add_library(${name} MODULE ${ALL_FILES})
-    set_output_directory(${name} ${LLVM_RUNTIME_OUTPUT_INTDIR} ${LLVM_LIBRARY_OUTPUT_INTDIR})
+    llvm_add_library(${name} MODULE ${ARGN})
     set_target_properties( ${name} PROPERTIES PREFIX "" )
-    llvm_update_compile_flags(${name})
-    add_dead_strip( ${name} )
-
-    if (LLVM_EXPORTED_SYMBOL_FILE)
-      add_llvm_symbol_exports( ${name} ${LLVM_EXPORTED_SYMBOL_FILE} )
-    endif(LLVM_EXPORTED_SYMBOL_FILE)
-
-    llvm_config( ${name} ${LLVM_LINK_COMPONENTS} )
-    link_system_libs( ${name} )

     if (APPLE)
       # Darwin-specific linker flags for loadable modules.
       set_property(TARGET ${name} APPEND_STRING PROPERTY
         LINK_FLAGS " -Wl,-flat_namespace -Wl,-undefined -Wl,suppress")
     endif()
-
-    if (MODULE)
-      set_property(TARGET ${name} PROPERTY SUFFIX ${LLVM_PLUGIN_EXT})
-    endif ()

     if( EXCLUDE_FROM_ALL )
       set_target_properties( ${name} PROPERTIES EXCLUDE_FROM_ALL ON)


[CMake] Ignore externalizing debuginfo for unit tests

If you externalize debug info for unit tests the test runner finds the mach-o inside the dsym bundle and tries to execute it as a test.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -599,7 +599,7 @@

 macro(add_llvm_executable name)
-  cmake_parse_arguments(ARG "DISABLE_LLVM_LINK_LLVM_DYLIB" "" "" ${ARGN})
+  cmake_parse_arguments(ARG "DISABLE_LLVM_LINK_LLVM_DYLIB;IGNORE_EXTERNALIZE_DEBUGINFO" "" "" ${ARGN})
   llvm_process_sources( ALL_FILES ${ARG_UNPARSED_ARGUMENTS} )

   # Generate objlib
@@ -660,7 +660,9 @@
     add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
   endif( LLVM_COMMON_DEPENDS )

-  llvm_externalize_debuginfo(${name})
+  if(NOT ARG_IGNORE_EXTERNALIZE_DEBUGINFO)
+    llvm_externalize_debuginfo(${name})
+  endif()
 endmacro(add_llvm_executable name)

 function(export_executable_symbols target)
@@ -876,7 +878,7 @@

   set(LLVM_REQUIRES_RTTI OFF)

-  add_llvm_executable(${test_name} ${ARGN})
+  add_llvm_executable(${test_name} IGNORE_EXTERNALIZE_DEBUGINFO ${ARGN})
   set(outdir ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR})
   set_output_directory(${test_name} BINARY_DIR ${outdir} LIBRARY_DIR ${outdir})
   target_link_libraries(${test_name}


update(build): updated plugins to latest versions adding platform name to artifact url.

Signed-off-by: Federico Di Pierro <6c3e26470d5343bb7a522873746c21bb7fcc0d20@gmail.com>

--- cmake/modules/plugins.cmake
+++ cmake/modules/plugins.cmake
@@ -13,10 +13,12 @@

 include(ExternalProject)

+string(TOLOWER ${CMAKE_HOST_SYSTEM_NAME} PLUGINS_SYSTEM_NAME)
+
 ExternalProject_Add(
   cloudtrail-plugin
-  URL "https://download.falco.org/plugins/stable/cloudtrail-0.2.0-${CMAKE_HOST_SYSTEM_PROCESSOR}.tar.gz"
-  URL_HASH "SHA256=917ebc5c3b1ad78d959372baa73ac2e9b18b38f51e1e42bd0974166dc04a964c"
+  URL "https://download.falco.org/plugins/stable/cloudtrail-0.2.1-${PLUGINS_SYSTEM_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR}.tar.gz"
+  URL_HASH "SHA256=7c2ffc5179baf5f624e766a108c7a1f5d6bd649df3ffdaa5497a836342d164b3"
   CONFIGURE_COMMAND ""
   BUILD_COMMAND ""
   INSTALL_COMMAND "")
@@ -25,8 +27,8 @@

 ExternalProject_Add(
   json-plugin
-  URL "https://download.falco.org/plugins/stable/json-0.2.0-${CMAKE_HOST_SYSTEM_PROCESSOR}.tar.gz"
-  URL_HASH "SHA256=250f0b04db7ab08f3bfa5ecd90cc9b39a6992fc2e96b887ed6f319a6ba156fd7"
+  URL "https://download.falco.org/plugins/stable/json-0.2.1-${PLUGINS_SYSTEM_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR}.tar.gz"
+  URL_HASH "SHA256=14d1cf4c3c651af0daec7a45162ef91172d6f0baba787f0eff0227b3cf2ca39c"
   CONFIGURE_COMMAND ""
   BUILD_COMMAND ""
   INSTALL_COMMAND "")


Fix vulkan build with homebrew install of vulkan-sdk (#1802)

--- cmake/util/FindVulkan.cmake
+++ cmake/util/FindVulkan.cmake
@@ -45,11 +45,11 @@
   if(Vulkan_FOUND)
     get_filename_component(VULKAN_LIBRARY_PATH ${Vulkan_LIBRARY} DIRECTORY)
     find_library(Vulkan_SPIRV_TOOLS_LIBRARY SPIRV-Tools
-      ${VULKAN_LIBRARY_PATH}/spirv-tools)
+        HINTS ${VULKAN_LIBRARY_PATH} ${VULKAN_LIBRARY_PATH}/spirv-tools)

     find_path(_libspirv libspirv.h HINTS ${Vulkan_INCLUDE_DIRS} PATH_SUFFIXES vulkan spirv-tools)
-    find_path(_spirv spirv.hpp HINTS ${Vulkan_INCLUDE_DIRS} PATH_SUFFIXES vulkan spirv/unified1)
-    find_path(_glsl_std GLSL.std.450.h HINTS ${Vulkan_INCLUDE_DIRS} PATH_SUFFIXES vulkan spirv/unified1)
+    find_path(_spirv spirv.hpp HINTS ${Vulkan_INCLUDE_DIRS} PATH_SUFFIXES vulkan SPIRV spirv/unified1)
+    find_path(_glsl_std GLSL.std.450.h HINTS ${Vulkan_INCLUDE_DIRS} PATH_SUFFIXES vulkan SPIRV spirv/unified1)
     list(APPEND Vulkan_INCLUDE_DIRS ${_libspirv} ${_spirv} ${_glsl_std})
     message(STATUS "Vulkan_INCLUDE_DIRS=" ${Vulkan_INCLUDE_DIRS})
     message(STATUS "Vulkan_LIBRARY=" ${Vulkan_LIBRARY})


Fix cmake Ada support so it works correctly with cmake 2.8.9 release candidate 1.
CMake support for position independent code has been altered and these changes reflect this.

svn path=/trunk/; revision=12200


prettyfying cmake

prettyfying cmake

Former-commit-id: bc69dd1367de08c873c0a15d58887aa08b1d577e

--- cmake-modules/Find_dont_install_INTELMKL.cmake
+++ cmake-modules/Find_dont_install_INTELMKL.cmake
@@ -91,7 +91,7 @@
     include(FindLAPACKE)

     message("")
-    message("======MKL SUMMARY ======")
+    message("============================ MKL SUMMARY ===================================")
     message("MKL_LIBRARIES                             : ${MKL_LIBRARIES}" )
     message("MKL_RT_LIBRARY                            : ${MKL_RT_LIBRARY}" )
     message("MKL_INCLUDE_DIR                           : ${MKL_INCLUDE_DIR}" )
@@ -101,7 +101,7 @@
     message("BLAS_LIBRARIES                            : ${BLAS_LIBRARIES}" )
     message("LAPACK_LIBRARIES                          : ${LAPACK_LIBRARIES}" )
     message("LAPACKE                                   : ${LAPACKE_INCLUDE_DIRS}" )
-    message("========================")
+    message("=============================================================================")
     message("")


Search for some required boost components.

--- salome_adm/cmake_files/FindSalomeBoost.cmake
+++ salome_adm/cmake_files/FindSalomeBoost.cmake
@@ -24,9 +24,10 @@
 #  !! Please read the generic detection procedure in SalomeMacros.cmake !!
 #
 SET(Boost_USE_STATIC_LIBS        OFF)
-SET(Boost_USE_MULTITHREADED      ON )
+SET(Boost_USE_MULTITHREADED      ON)
 SET(Boost_USE_STATIC_RUNTIME     OFF)
 SET(Boost_NO_BOOST_CMAKE         ON)
+SET(SalomeBoost_FIND_COMPONENTS  filesystem regex signals system thread)

 IF(WIN32)
   # Under windows, one extra sub-directory in the boost installation hierarchy:


Unwind also needs _DEFAULT_SOURCE, in fact most everything does.  Lets move it to toplevel

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

+set(CMAKE_REQUIRED_DEFINITIONS "-D_DEFAULT_SOURCE")
 check_include_files(ieeefp.h HAVE_IEEEFP_H)
 check_include_files(alloca.h HAVE_ALLOCA_H)
 check_include_files(sys/vmparam.h HAVE_SYS_VMPARAM_H)
@@ -52,7 +53,6 @@
 check_function_exists(pthread_mutex_init HAS_PTHREAD_MUTEXES)
 check_function_exists(ttrace HAVE_TTRACE)

-set(CMAKE_REQUIRED_DEFINITIONS "-D_DEFAULT_SOURCE")
 check_struct_has_member ("struct stat" st_atimespec "sys/types.h;sys/stat.h" HAVE_STAT_TIMESPEC)
 check_struct_has_member ("struct stat" st_atimensec "sys/types.h;sys/stat.h" HAVE_STAT_NSEC)
 check_struct_has_member ("struct tm" tm_gmtoff time.h HAVE_TM_GMTOFF)
@@ -77,7 +77,6 @@
 check_type_size(prwatch_t PRWATCH_T)
 set(CMAKE_EXTRA_INCLUDE_FILE)
 check_type_size(off_t SIZEOF_OFF_T)
-set(CMAKE_REQUIRED_DEFINITIONS)

 check_cxx_symbol_exists(tzname "time.h" HAVE_TZNAME)
 check_cxx_symbol_exists(timezone "time.h" HAVE_TIMEZONE_VAR)
@@ -835,6 +834,7 @@

   return 1;
 }" FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL)
+set(CMAKE_REQUIRED_DEFINITIONS)

 if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
   set(HAVE_COREFOUNDATION 1)


cmake: Removed Woverloaded-virtual from WARNING_C_FLAGS.

Because it is flag only for c++.

--- cmake/Modules/CppUTestWarningFlags.cmake
+++ cmake/Modules/CppUTestWarningFlags.cmake
@@ -32,7 +32,6 @@
         Wswitch-enum
         Wconversion
         Wsign-conversion
-        Woverloaded-virtual
         Wno-padded
         Wno-disabled-macro-expansion
         )
@@ -47,6 +46,7 @@

     set(WARNING_CXX_FLAGS
         ${WARNING_C_FLAGS}
+        Woverloaded-virtual
         Wno-global-constructors
         Wno-exit-time-destructors
         Wno-weak-vtables


Fix compiler options for MSVC

Fix compiler options for MSVC

Change-Id: I4d819781814b363f14f94444e499ccfdf72ed9a3
Reviewed-on: http://review.couchbase.org/118764
Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Sergey Avseyev <87f6d5e4fd3644c3c20800cde7fd3ad1569370b3@gmail.com>

--- cmake/Modules/GetLibcouchbaseFlags.cmake
+++ cmake/Modules/GetLibcouchbaseFlags.cmake
@@ -97,7 +97,7 @@
     ADD_DEFINITIONS(-D_VARIADIC_MAX=10)
     SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /TC ${LCB_CL_CPPFLAGS}")
     # We do not support anything below VS 2015
-    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++11 ${LCB_CL_CPPFLAGS}")
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${LCB_CL_CPPFLAGS}")
     SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${LCB_CL_CPPFLAGS_DEBUG}")
     SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${LCB_CL_CPPFLAGS_DEBUG}")
     SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${LCB_CL_CPPFLAGS_REL}")


Change from a test that does virtually nothing to a simple Ada compiler test
which now works (at least on Linux) with the other changes I have done
to CMake Ada support.

svn path=/trunk/; revision=7448

--- cmake/modules/CMakeTestAdaCompiler.cmake
+++ cmake/modules/CMakeTestAdaCompiler.cmake
@@ -19,12 +19,8 @@
   "
 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
 set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL \"\" FORCE)
-add_custom_target(temporary ALL
-COMMAND ${CMAKE_COMMAND} -E echo
-\"This is a no-op rather than a real Ada build test\"
-)
-#project(test Ada)
-#add_executable(testadacompiler testadacompiler.adb)
+project(test Ada)
+add_executable(testadacompiler testadacompiler.adb)
   "
   )


Fix error preventing normal configuration with direct specifying of product directory via cmake option.

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -503,7 +503,7 @@

   # Override the variable - don't append to it, as it would give precedence
   # to what was stored there before!
-  IF(DEFINED ENV{${pkg_UC}_ROOT_DIR})
+  IF(DEFINED ${pkg_UC}_ROOT_DIR)
     SET(CMAKE_PREFIX_PATH "${${pkg_UC}_ROOT_DIR}")
   ENDIF()


FIX: BINARY_DIR - BUILD_IN_SOURCE conflict (Thanks David Barnes)

--- external/UseGDAL.cmake
+++ external/UseGDAL.cmake
@@ -86,7 +86,8 @@
             STAMP_DIR ${CMAKE_BINARY_DIR}/3rdparty/stamp
             DOWNLOAD_DIR ${PROJ4_BASE_DIR}
             SOURCE_DIR ${PROJ4_BASE_DIR}/source
-            BINARY_DIR ${PROJ4_BASE_DIR}/build
+            # Do not use this, since we are using BUILD_IN_SOURCE
+            #BINARY_DIR ${PROJ4_BASE_DIR}/build
             INSTALL_DIR ${PROJ4_BASE_DIR}/install
         )

@@ -134,7 +135,8 @@
         STAMP_DIR ${CMAKE_BINARY_DIR}/3rdparty/stamp
         DOWNLOAD_DIR ${GDAL_BASE_DIR}
         SOURCE_DIR ${GDAL_BASE_DIR}/source
-        BINARY_DIR ${GDAL_BASE_DIR}/build
+        # Do not use this, since we are using BUILD_IN_SOURCE
+        #BINARY_DIR ${GDAL_BASE_DIR}/build
         INSTALL_DIR ${GDAL_BASE_DIR}/install
     )
     #ExternalProject_Get_Property(gdal DOWNLOAD_DIR)


boards: arm: lpcxpresso55s16: reset soc after loading via jlink

Reset the LPC55S16 after loading data to the flash via Segger J-Link
(previously, the new firmware was not booted until the reset button on
the board was pressed).

Signed-off-by: Henrik Brix Andersen <a076b11c2cc63ccdc903dbe182e1eecc3cbbc094@brixandersen.dk>

--- boards/arm/lpcxpresso55s16/board.cmake
+++ boards/arm/lpcxpresso55s16/board.cmake
@@ -4,6 +4,6 @@
 # SPDX-License-Identifier: Apache-2.0
 #

-board_runner_args(jlink "--device=LPC55S16")
+board_runner_args(jlink "--device=LPC55S16" "--reset-after-load")

 include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)


Add the Harmattan player component to the CPack rules

--- cmake/CPack.cmake
+++ cmake/CPack.cmake
@@ -103,6 +103,16 @@
 set(CPACK_COMPONENT_GLUONPLAYERFREMANTLE_DEPENDS gluonplayer)
 set(CPACK_COMPONENT_GLUONPLAYERFREMANTLE_GROUP "GLUONPLAYERS")
 set(CPACK_COMPONENT_GLUONPLAYERFREMANTLE_INSTALL_TYPES Full)
+
+# Fremantle Player
+set(CPACK_COMPONENT_GLUONPLAYERHARMATTAN_DISPLAY_NAME "Gluon Player Application for Harmattan")
+set(CPACK_COMPONENT_GLUONPLAYERHARMATTAN_DESCRIPTION
+    "Gluon Player Application mostly meant for Maemo6/Harmattan using plain QML
+    solution",
+)
+set(CPACK_COMPONENT_GLUONPLAYERHARMATTAN_DEPENDS gluonplayer)
+set(CPACK_COMPONENT_GLUONPLAYERHARMATTAN_GROUP "GLUONPLAYERS")
+set(CPACK_COMPONENT_GLUONPLAYERHARMATTAN_INSTALL_TYPES Full)

 # KDE Player
 set(CPACK_COMPONENT_GLUONKDEPLAYER_DISPLAY_NAME "Gluon KDE Player Application")


display the build-type during cmake run

display the build-type during cmake run

--- cmake/oryol.cmake
+++ cmake/oryol.cmake
@@ -28,6 +28,8 @@
 #	at the start of the root CMakeLists.txt file.
 #
 macro(oryol_setup)
+
+    message("CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")

     if (ORYOL_ROOT_DIR)
         message("ORYOL_ROOT_DIR: ${ORYOL_ROOT_DIR}")


Pass FINDPACKAGE_LLVM_HINTS to parent scope (#296)

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -8,6 +8,7 @@
   if(DEFINED LLVM_INSTALL_PREFIX)
     list(APPEND FINDPACKAGE_LLVM_HINTS "${LLVM_INSTALL_PREFIX}/lib/cmake/llvm/")
     list(APPEND FINDPACKAGE_LLVM_HINTS "${LLVM_INSTALL_PREFIX}/share/llvm/cmake/")
+    set(FINDPACKAGE_LLVM_HINTS ${FINDPACKAGE_LLVM_HINTS} PARENT_SCOPE)

     message(STATUS "Using LLVM_INSTALL_PREFIX hints for find_package(LLVM): ${FINDPACKAGE_LLVM_HINTS}")
   endif()


Copy Findtcmalloc.cmake to share/cmake

Copy Findtcmalloc.cmake to share/cmake

Enables out-of-source builds with tcmalloc

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -202,6 +202,7 @@
             ${CMAKE_SOURCE_DIR}/cmake/FindOpenCL.cmake
             ${CMAKE_SOURCE_DIR}/cmake/FindNuma.cmake
             ${CMAKE_SOURCE_DIR}/cmake/FindClangTools.cmake
+            ${CMAKE_SOURCE_DIR}/cmake/Findtcmalloc.cmake
             ${CMAKE_SOURCE_DIR}/cmake/RootUseFile.cmake
             ${CMAKE_SOURCE_DIR}/cmake/CppStyleGuideChecks.cmake
             ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/UseBioDynaMo.cmake


fix TASKLIB_INTERFACE_LIBRARIES in Tasklib.cmake

the generated code was always LIBNAME_TASKLIB_TASKLIB, which is wrong

--- lib/orogen/templates/config/TaskLib.cmake
+++ lib/orogen/templates/config/TaskLib.cmake
@@ -20,6 +20,10 @@
 #  <PROJECT>_TASKLIB_DEPENDENT_LIBRARIES
 #     the list of libraries to which the task library should be linked.
 #
+#  <PROJECT>_TASKLIB_INTERFACE_LIBRARIES
+#     the list of libraries to which users of the task library should be linked
+#     as well
+#
 # These variables are used in tasks/CMakeLists.txt to actually build the shared
 # object.

@@ -37,7 +41,7 @@
    next if !dep_def.in_context?('link') %>
 list(APPEND <%= component.name.upcase %>_TASKLIB_DEPENDENT_LIBRARIES ${<%= dep_def.var_name %>_LIBRARIES})
 <% if dep_def.var_name =~ /TASKLIB/ %>
-list(APPEND <%= component.name.upcase %>_TASKLIB_INTERFACE_LIBRARIES ${<%= dep_def.var_name %>_TASKLIB_LIBRARIES})
+list(APPEND <%= component.name.upcase %>_TASKLIB_INTERFACE_LIBRARIES ${<%= dep_def.var_name %>_LIBRARIES})
 <% end %>
 <% end %>


[CMAKE] Minor improvements to the install_shared_library function

Summary:
This diff makes a couple chages to the `install_shared_library()`
function:
 - The `set_target_properties()` function only allows to set key/pair
properties, and does not support lists. Since `PUBLIC_HEADER` can
contain multiple files using this function to set the property is a bug,
and `set_property()` should be used instead.
 - The version number now uses `CMAKE_PROJECT_VERSION` instead of
`bitcoin_abc_VERSION`, so it can be used with another top-level project
(e.g. secp256k1).

Test Plan:
  mkdir install
  cmake -GNinja .. -DCMAKE_INSTALL_PREFIX=install
  ninja check
  ninja install
Check the `libbitcoinconsensus` shared library and its header are
correcly installed to the just created `install` directory.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5098

--- cmake/modules/InstallationHelper.cmake
+++ cmake/modules/InstallationHelper.cmake
@@ -32,7 +32,7 @@
 	endif()

 	if(ARG_PUBLIC_HEADER)
-		list(APPEND _properties PUBLIC_HEADER ${ARG_PUBLIC_HEADER})
+		set_property(TARGET ${_shared_name} PROPERTY PUBLIC_HEADER ${ARG_PUBLIC_HEADER})
 	endif()

 	if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
@@ -42,22 +42,22 @@
 		# On platforms other than linux, only the major version (0) is used.
 		# Replace the VERSION line with the statement below to set the
 		# correct version:
-		# set(_properties VERSION "${bitcoin-abc_VERSION}")
-		list(APPEND _properties VERSION "${bitcoin-abc_VERSION_MAJOR}.0.0")
+		# set(_properties VERSION "${CMAKE_PROJECT_VERSION}")
+		list(APPEND _properties VERSION "${CMAKE_PROJECT_VERSION_MAJOR}.0.0")
 	else()
-		list(APPEND _properties VERSION "${bitcoin-abc_VERSION_MAJOR}")
+		list(APPEND _properties VERSION "${CMAKE_PROJECT_VERSION_MAJOR}")
 	endif()

 	# For autotools compatibility, rename the library to ${OUTPUT_NAME}-0.dll
 	if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
-		list(APPEND _properties OUTPUT_NAME "${NAME}-${bitcoin-abc_VERSION_MAJOR}")
+		list(APPEND _properties OUTPUT_NAME "${NAME}-${CMAKE_PROJECT_VERSION_MAJOR}")
 		# DLL_EXPORT is defined by libtool, and is expected by some sources.
 		target_compile_definitions(${_shared_name} PRIVATE DLL_EXPORT)
 	else()
 		list(APPEND _properties OUTPUT_NAME "${NAME}")
 	endif()

-	list(APPEND _properties SOVERSION "${bitcoin-abc_VERSION_MAJOR}")
+	list(APPEND _properties SOVERSION "${CMAKE_PROJECT_VERSION_MAJOR}")

 	set_target_properties(${_shared_name} PROPERTIES ${_properties})


MAINT: exclude directories in RPM packaging.

--- cmake/sara_installation_settings.cmake
+++ cmake/sara_installation_settings.cmake
@@ -89,6 +89,26 @@
 set(CPACK_RPM_PACKAGE_LICENSE "MPL v2")
 set(CPACK_RPM_PACKAGE_GROUP "Applications/Multimedia")

+execute_process(COMMAND python -c
+  "from distutils.sysconfig import get_python_lib; print get_python_lib()"
+  OUTPUT_VARIABLE PYTHON_SITE_PACKAGES_DIR
+  OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST
+  /usr
+  /usr/include
+  /usr/lib
+  /usr/local
+  /usr/local/share
+  /usr/share
+  $ENV{WORKON_HOME}
+  $ENV{VIRTUAL_ENV}
+  $ENV{VIRTUAL_ENV}/lib
+  $ENV{VIRTUAL_ENV}/lib/python2
+  $ENV{VIRTUAL_ENV}/lib/python2.7
+  ${PYTHON_SITE_PACKAGES_DIR}
+  ${PYTHON_SITE_PACKAGES_DIR}/do)
+

 # ============================================================================ #
 # Special configuration for Windows installer using NSIS.


[CMake] [darwin] [builtins] Should be reading the OS variable that is passed in, not the bleed through from the function above. NFC.

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

--- cmake/Modules/CompilerRTDarwinUtils.cmake
+++ cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -175,8 +175,8 @@
     add_dependencies(${LIB_PARENT_TARGET} ${libname})
   endif()

-  list(APPEND ${os}_${suffix}_libs ${libname})
-  list(APPEND ${os}_${suffix}_lipo_flags -arch ${arch} $<TARGET_FILE:${libname}>)
+  list(APPEND ${LIB_OS}_${suffix}_libs ${libname})
+  list(APPEND ${LIB_OS}_${suffix}_lipo_flags -arch ${arch} $<TARGET_FILE:${libname}>)
 endmacro()

 function(darwin_lipo_libs name)


format

format

--- cmake/vcpkg_ports/mmpld-io/portfile.cmake
+++ cmake/vcpkg_ports/mmpld-io/portfile.cmake
@@ -13,4 +13,4 @@

 file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")

-file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)


CMake: Removed special case for `BUILD_DIR` on Windows.

Currently in the test harness, we pass the flags `-DSOURCE_DIR` and
`-DBUILD_DIR` to the compiler. These are used to do things like
determine where the containerizer binary is to launch it for tests.

On Windows, these paths should be Windows-style, with '\' characters
separating path components. Unfortunately, CMake does not escape these
slashes in path strings, so when we pass them as preprocessor flags,
a string like `C:\src` will look to the standard Windows API like a
string with an escaped '\s' character.

On the other hand, Windows APIs are happy to take Unix-style paths as
arguments. So, to unblock making the agent tests work, we simply use
Unix paths here.

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

--- src/tests/cmake/MesosTestsConfigure.cmake
+++ src/tests/cmake/MesosTestsConfigure.cmake
@@ -26,13 +26,17 @@

 # COMPILER CONFIGURATION.
 #########################
-if (WIN32)
-  STRING(REGEX REPLACE "/" "\\\\" CURRENT_CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR})
-  STRING(REGEX REPLACE "/" "\\\\" CURRENT_CMAKE_BUILD_DIR ${CMAKE_BINARY_DIR})
-else (WIN32)
-  set(CURRENT_CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR})
-  set(CURRENT_CMAKE_BUILD_DIR ${CMAKE_BINARY_DIR})
-endif (WIN32)
+# NOTE: On Windows, these paths should be Windows-style, with '\' characters
+# separating path components. Unfortunately, CMake does not escape these
+# slashes in path strings, so when we pass them as preprocessor flags,
+# a string like `C:\src` will look to the standard Windows API like a
+# string with an escaped '\s' character.
+#
+# On the other hand, Windows APIs are happy to take Unix-style paths as
+# arguments. So, to unblock making the agent tests work, we simply use
+# Unix paths here.
+set(CURRENT_CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR})
+set(CURRENT_CMAKE_BUILD_DIR ${CMAKE_BINARY_DIR})

 add_definitions(-DSOURCE_DIR="${CURRENT_CMAKE_SOURCE_DIR}")
 add_definitions(-DBUILD_DIR="${CURRENT_CMAKE_BUILD_DIR}")


fix Xcode crash

fix Xcode crash

--- cmake/FindCUTI.cmake
+++ cmake/FindCUTI.cmake
@@ -51,6 +51,10 @@
 ENDIF(USE_CUTI_INTEGRATION AND WIN32)

 get_filename_component(CUTI_INCLUDE ${CUTI_ROOT_DIR}/include/Cuti.h ABSOLUTE)
+
+IF(USE_CUTI_INTEGRATION AND APPLE)
+  set(MACOSX_BUNDLE_GUI_IDENTIFIER "$(PRODUCT_BUNDLE_IDENTIFIER)")
+ENDIF(USE_CUTI_INTEGRATION AND APPLE)

 function(cuti_init_target_flags target)
 #Set all the flags needed by cuti to the test target
@@ -125,7 +129,6 @@
   #uses ${ARGN} as list of source files for the test target
 	if(USE_CUTI_INTEGRATION AND APPLE)
     #integrate tests to XCode
-    set(MACOSX_BUNDLE_GUI_IDENTIFIER "$(PRODUCT_BUNDLE_IDENTIFIER)")
 		find_package(XCTest REQUIRED)
 		cuti_xctest_add_bundle(${target} ${testee} ${CUTI_SOURCE} ${ARGN} ${CUTI_INCLUDE})
     target_compile_definitions(${target} PUBLIC -DCUTI_USES_XCTEST_BACKEND)


Allow manually specifying ejdb in combination with cmake find*

--- cmake/FindEJDB.cmake
+++ cmake/FindEJDB.cmake
@@ -17,7 +17,7 @@
           HINTS ${PC_EJDB_INCLUDEDIR} ${PC_EJDB_INCLUDE_DIRS})

 find_library(EJDB_LIBRARY NAMES tcejdb
-             HINTS ${PC_EJDB_LIBDIR} ${PC_EJDB_LIBRARY_DIRS})
+             HINTS ${PC_EJDB_LIBDIR} ${PC_EJDB_LIBRARY_DIRS} ${EJDB_LIBRARY_DIR})

 set(EJDB_LIBRARIES ${EJDB_LIBRARY})
 set(EJDB_INCLUDE_DIRS ${EJDB_INCLUDE_DIR})


for XCode the MAIN_DEPENDENCY file seems to get added as a file to build. Use DEPENDS as a workaround

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -393,7 +393,7 @@
          set(_out "${CMAKE_CURRENT_BINARY_DIR}/${_out}_${_impl}${_ext}")
          add_custom_command(OUTPUT "${_out}"
             COMMAND ${CMAKE_COMMAND} -E copy "${_vc_compile_src}" "${_out}"
-            MAIN_DEPENDENCY "${_vc_compile_src}"
+            DEPENDS "${_vc_compile_src}"
             COMMENT "Copy to ${_out}"
             WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
             VERBATIM)


restore lost commit 0b0797348b3046998171a3748b6e28777152db5e (appears to have been lost by merge commit ce8c754318cb1cb827882d155b6d6ed12916c020)

--- thirdparty/thirdparty.cmake
+++ thirdparty/thirdparty.cmake
@@ -600,14 +600,17 @@
 #############################################

 if(WIN32)
+  set(indi_zip ${CMAKE_SOURCE_DIR}/thirdparty/indiclient-44aaf5d3-win32.zip)
   set(indiclient_root ${thirdparties_deflate_directory})
   set(indiclient_dir ${indiclient_root}/indiclient)
-  if(NOT EXISTS ${indiclient_dir})
-    # unzip the dependency
-    execute_process(
-      COMMAND ${CMAKE_COMMAND} -E tar xf ${CMAKE_SOURCE_DIR}/thirdparty/indiclient-44aaf5d3-win32.zip --format=zip
-        WORKING_DIRECTORY ${indiclient_root})
-  endif()
+  add_custom_target(unzip_indi ALL)
+  add_custom_command(TARGET unzip_indi PRE_BUILD
+    COMMAND ${CMAKE_COMMAND} -E remove_directory ${indiclient_dir}
+    COMMAND ${CMAKE_COMMAND} -E tar xvf ${indi_zip} --format=zip
+    WORKING_DIRECTORY ${indiclient_root}
+    DEPENDS ${indi_zip}
+    COMMENT "Unpacking INDI Client sources"
+    VERBATIM)
   include_directories(${indiclient_dir}/include)
   set(PHD_LINK_EXTERNAL_RELEASE ${PHD_LINK_EXTERNAL_RELEASE} ${indiclient_dir}/lib/indiclient.lib)
   set(PHD_LINK_EXTERNAL_DEBUG ${PHD_LINK_EXTERNAL_DEBUG} ${indiclient_dir}/lib/indiclientd.lib)
@@ -625,7 +628,7 @@
     if(INDI_VERSION VERSION_LESS "1.4")
       set(PHD_LINK_EXTERNAL ${PHD_LINK_EXTERNAL} ${INDI_CLIENT_LIBRARIES} ${INDI_LIBRARIES})
     else(INDI_VERSION VERSION_LESS "1.4")
-        set(PHD_LINK_EXTERNAL ${PHD_LINK_EXTERNAL} ${INDI_CLIENT_LIBRARIES})
+      set(PHD_LINK_EXTERNAL ${PHD_LINK_EXTERNAL} ${INDI_CLIENT_LIBRARIES})
     endif(INDI_VERSION VERSION_LESS "1.4")
     if(INDI_VERSION VERSION_LESS "1.1")
       add_definitions("-DINDI_PRE_1_1_0")
@@ -633,7 +636,6 @@
     if(INDI_VERSION VERSION_LESS "1.0")
       add_definitions("-DINDI_PRE_1_0_0")
     endif()
-

     # INDI depends on libz
     find_package(ZLIB REQUIRED)
@@ -648,28 +650,40 @@
     # git clone https://github.com/indilib/indi.git
     # cd indi
     # git archive --format=tar.gz --prefix=libindi/ --output=libindi-`git rev-parse HEAD`.tar.gz HEAD
-    set(libindi "libindi")
-    set(libindi_file libindi-58b26c584049e1b9ecd55aa5f4a225677a417898)
-    message(STATUS "Using project provided libindi '${thirdparty_dir}/${libindi_file}.tar.gz'")
-    set(libindi_root "${thirdparties_deflate_directory}/${libindi}")
+
+    set(indi_zip ${thirdparty_dir}/libindi-58b26c584049e1b9ecd55aa5f4a225677a417898.tar.gz)
+    message(STATUS "Using project provided libindi '${indi_zip}'")
+    set(libindi_root "${thirdparties_deflate_directory}/libindi")
+
+    # this does not work because of the configure_file commands below
+    # that want to run at camke time, but this woudl extract the
+    # libindi files at build time
+#    add_custom_target(unzip_indi ALL)
+#    add_custom_command(TARGET unzip_indi PRE_BUILD
+#      COMMAND ${CMAKE_COMMAND} -E remove_directory ${libindi_root}
+#      COMMAND ${CMAKE_COMMAND} -E tar xvf ${indi_zip}
+#      WORKING_DIRECTORY ${thirdparties_deflate_directory}
+#      DEPENDS ${indi_zip}
+#      COMMENT "Unpacking INDI Client sources"
+#      VERBATIM)
     if(NOT EXISTS ${libindi_root})
-      # unzip the dependency
-      message(STATUS "[thirdparty] Untarring libindi")
+      message(STATUS "[thirdparty] extracting libindi sources")
       execute_process(
-        COMMAND ${CMAKE_COMMAND} -E tar xzf ${thirdparty_dir}/${libindi_file}.tar.gz
+        COMMAND ${CMAKE_COMMAND} -E tar xzf ${indi_zip}
         WORKING_DIRECTORY ${thirdparties_deflate_directory})
     endif()

     if(NOT APPLE)
       # todo: OSX build fails when Nova is found. I think it needs the include dir
       # punting for now to get the build un-broken
-    # Nova is required for sidereal time computation with Indi driver that not report it.
-    # This is not critical if it is not present but the hour angle computation will be wrong.
-    find_package(Nova)
-    if(NOVA_FOUND)
-      add_definitions("-DLIBNOVA")
-      set(PHD_LINK_EXTERNAL ${PHD_LINK_EXTERNAL} ${NOVA_LIBRARIES})
-    endif()
+
+      # Nova is required for sidereal time computation with Indi driver that not report it.
+      # This is not critical if it is not present but the hour angle computation will be wrong.
+      find_package(Nova)
+      if(NOVA_FOUND)
+        add_definitions("-DLIBNOVA")
+        set(PHD_LINK_EXTERNAL ${PHD_LINK_EXTERNAL} ${NOVA_LIBRARIES})
+      endif()
     endif()

     # warning: copied from the indi CMakeLists.txt. This should be updated when
@@ -689,7 +703,7 @@
     set(LIBINDI_DIRECTORY "${libindi_root}/libindi")

     # separate folder for the configurations
-    set(libindi_root_config "${thirdparties_deflate_directory}/${libindi}_configuration")
+    set(libindi_root_config "${thirdparties_deflate_directory}/libindi_configuration")
     if(NOT EXISTS ${libindi_root_config})
       file(MAKE_DIRECTORY "${libindi_root_config}")
     endif()


CMake: Fix using check on Debian Buster

CMake: Fix using check on Debian Buster

--- tools/cmake/FindCheck.cmake
+++ tools/cmake/FindCheck.cmake
@@ -28,14 +28,22 @@
 		MESSAGE ( STATUS "Using override CHECK_INSTALL_DIR to find check" )
 		SET ( CHECK_INCLUDE_DIR  "${CHECK_INSTALL_DIR}/include" )
 		FIND_LIBRARY( CHECK_LIBRARY NAMES check PATHS "${CHECK_INSTALL_DIR}/lib" )
-		FIND_LIBRARY( COMPAT_LIBRARY NAMES compat PATHS "${CHECK_INSTALL_DIR}/lib" )
+        IF (WIN32)
+		    FIND_LIBRARY( COMPAT_LIBRARY NAMES compat PATHS "${CHECK_INSTALL_DIR}/lib" )
+        ENDIF (WIN32)
 	ELSE ( CHECK_INSTALL_DIR )
 		FIND_PATH( CHECK_INCLUDE_DIR check.h )
 		FIND_LIBRARY( CHECK_LIBRARY NAMES check )
-		FIND_LIBRARY( COMPAT_LIBRARY NAMES compat )
+        IF (WIN32)
+		    FIND_LIBRARY( COMPAT_LIBRARY NAMES compat )
+        ENDIF (WIN32)
 	ENDIF ( CHECK_INSTALL_DIR )

-    SET ( CHECK_LIBRARIES "${CHECK_LIBRARY}" "${COMPAT_LIBRARY}" )
+    IF (WIN32)
+        SET ( CHECK_LIBRARIES "${CHECK_LIBRARY}" "${COMPAT_LIBRARY}" )
+    ELSE ( WIN32)
+        SET ( CHECK_LIBRARIES "${CHECK_LIBRARY}" )
+    ENDIF (WIN32)

 	IF ( CHECK_INCLUDE_DIR AND CHECK_LIBRARIES )
 		SET( CHECK_FOUND 1 )
@@ -54,4 +62,7 @@
 ENDIF( NOT CHECK_FOUND )

 # Hide advanced variables from CMake GUIs
-MARK_AS_ADVANCED( CHECK_INCLUDE_DIR CHECK_LIBRARIES CHECK_LIBRARY COMPAT_LIBRARY)+MARK_AS_ADVANCED( CHECK_INCLUDE_DIR CHECK_LIBRARIES CHECK_LIBRARY)
+IF( WIN32 )
+    MARK_AS_ADVANCED( COMPAT_LIBRARY)
+ENDIF()


Make sure all _INIT flags end with a space to fix ARMClang build error.

--- tools/cmake/toolchain.cmake
+++ tools/cmake/toolchain.cmake
@@ -111,3 +111,9 @@
 set(CMAKE_CXX_FLAGS_INIT ${CMAKE_C_FLAGS_INIT})
 list_to_space_separated(CMAKE_ASM_FLAGS_INIT ${common_options} ${asm_compile_options})
 list_to_space_separated(CMAKE_EXE_LINKER_FLAGS_INIT ${link_options})
+
+# due to a bug in ARMClang CMake compiler file, all _INIT flags must end with a space.
+# (this line: https://github.com/Kitware/CMake/blob/7d4a6ce714a9213ffd34b13a3debcb31a2430e04/Modules/Compiler/ARMClang.cmake#L97)
+set(CMAKE_C_FLAGS_INIT "${CMAKE_C_FLAGS_INIT} ")
+set(CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS_INIT} ")
+set(CMAKE_ASM_FLAGS_INIT "${CMAKE_ASM_FLAGS_INIT} ")


fixing parallel builds (and maybe not just parallel?) (everything depends on the header assembly target)

--- scripts/common.cmake
+++ scripts/common.cmake
@@ -13,7 +13,7 @@
 set(TEST_MODE "COMPARE" CACHE STRING "Test mode - normal/run through valgrind/collect output/compare with output")
 set_property(CACHE TEST_MODE PROPERTY STRINGS "NORMAL;VALGRIND;COLLECT;COMPARE")

-# add a customized overloaded version of add_test() to suite my needs
+# override add_test() to suite my needs
 function(add_test)
     cmake_parse_arguments(ARG "NO_VALGRIND;NO_OUTPUT" "NAME" "COMMAND" ${ARGN})
     if(NOT "${ARG_UNPARSED_ARGUMENTS}" STREQUAL "" OR "${ARG_NAME}" STREQUAL "" OR "${ARG_COMMAND}" STREQUAL "")
@@ -171,3 +171,15 @@
     COMMENT "assembling the single header")

 add_custom_target(assemble_single_header ALL DEPENDS ${doctest_include_folder}doctest.h)
+
+# override add_executable() to add a dependency on the header assembly target
+function(add_executable name)
+    _add_executable(${name} ${ARGN})
+    add_dependencies(${name} assemble_single_header)
+endfunction()
+
+# override add_library() to add a dependency on the header assembly target
+function(add_library name)
+    _add_library(${name} ${ARGN})
+    add_dependencies(${name} assemble_single_header)
+endfunction()


Fix the CPackConfig file for both cross compiling and local compiling of packages. Final filename of the deb file was wrong.

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -1,10 +1,12 @@
 set(CPACK_PACKAGE_VENDOR "Ultimaker")
 set(CPACK_PACKAGE_CONTACT "Arjen Hiemstra <a.hiemstra@ultimaker.com>")
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Cura Engine")
-set(CPACK_PACKAGE_VERSION_MAJOR 15)
-set(CPACK_PACKAGE_VERSION_MINOR 05)
-set(CPACK_PACKAGE_VERSION_PATCH 90)
+set(CPACK_PACKAGE_VERSION "15.05.90")
 set(CPACK_GENERATOR "DEB")
+if(NOT DEFINED CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+  execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
+endif()
+set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")

 set(DEB_DEPENDS
     "arcus (>= 15.05.90)"


Changed the default CDash URL for VTK

Changed the default CDash URL for VTK

The CDash instance was moved to open.cdash.org some time ago, update
out configuration to reflect its current location.

Change-Id: Ic1a897339571bafebbabbecbeb1e73814d1acf6e

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -8,6 +8,6 @@
 set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "www.cdash.org")
-set(CTEST_DROP_LOCATION "/CDash/submit.php?project=VTK")
+set(CTEST_DROP_SITE "open.cdash.org")
+set(CTEST_DROP_LOCATION "/submit.php?project=VTK")
 set(CTEST_DROP_SITE_CDASH TRUE)


refs #5368 suppress extra warnings from xz code when using clang

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

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -216,4 +216,5 @@

 list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
   "xz-4.999.9beta/src/liblzma"              # don't complain about warnings in xz source
-  )
+  "clang: warning: unknown warning option"  # don't complain about clang missing warnings from xz code
+  )


ctest: ignore notes attached to errors/warnings

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

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -10,6 +10,7 @@
    "WARNING non-zero return value in ctest from: make" # Ignore output from ctest
    "ipo: warning #11010:" # Ignore warning about incompatible libraries with ICC -m32 on 64-bit system
    "include/qt4" # -Wuninitialized in QWeakPointer(X *ptr)
+   " note: " # Notes are additional lines from errors (or warnings) that we don't want to count as additional warnings
    )

 set(CTEST_CUSTOM_ERROR_EXCEPTION ${CTEST_CUSTOM_ERROR_EXCEPTION}


Updating Havok.cmake to support all 3 major build configurations on all platforms. This is incomplete and requires additional changes to the 3p-havok-source repo and the llphysicsextensions-src repo.

--- indra/cmake/Havok.cmake
+++ indra/cmake/Havok.cmake
@@ -4,8 +4,18 @@
 set(Havok_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/havok/Source)
 list(APPEND Havok_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/havok/Demo)

-set(HAVOK_DEBUG_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok)
+set(HAVOK_DEBUG_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-fulldebug)
 set(HAVOK_RELEASE_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/release/havok)
+if (LL_DEBUG_HAVOK)
+    if (WIN32)
+        set(HAVOK_RELWITHDEBINFO_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-hybrid)
+    else (WIN32)
+        set(HAVOK_RELWITHDEBINFO_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-fulldebug)
+    endif(WIN32)
+else (LL_DEBUG_HAVOK)
+    set(HAVOK_RELWITHDEBINFO_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok)
+endif (LL_DEBUG_HAVOK)
+

 set(HAVOK_LIBS
     hkBase
@@ -32,36 +42,41 @@

 unset(HK_DEBUG_LIBRARIES)
 unset(HK_RELEASE_LIBRARIES)
-unset(HK_LIBRARIES)
+unset(HK_RELWITHDEBINFO_LIBRARIES)

 foreach(HAVOK_LIB ${HAVOK_LIBS})
-    find_library(HAVOK_DEBUG_LIB_${HAVOK_LIB}   ${HAVOK_LIB} PATHS ${HAVOK_DEBUG_LIBRARY_PATH})
-    find_library(HAVOK_RELEASE_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_RELEASE_LIBRARY_PATH})
-
-    if(LINUX)
-    set(cmd "mkdir")
-    set(debug_dir "${HAVOK_DEBUG_LIBRARY_PATH}/${HAVOK_LIB}")
-    set(release_dir "${HAVOK_RELEASE_LIBRARY_PATH}/${HAVOK_LIB}")
-    exec_program( ${cmd} ${HAVOK_DEBUG_LIBRARY_PATH} ARGS ${debug_dir} OUTPUT_VARIABLE rv)
-    exec_program( ${cmd} ${HAVOK_RELEASE_LIBRARY_PATH} ARGS ${release_dir} OUTPUT_VARIABLE rv)
+        find_library(HAVOK_DEBUG_LIB_${HAVOK_LIB}   ${HAVOK_LIB} PATHS ${HAVOK_DEBUG_LIBRARY_PATH})
+        find_library(HAVOK_RELEASE_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_RELEASE_LIBRARY_PATH})
+        find_library(HAVOK_RELWITHDEBINFO_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_RELWITHDEBINFO_LIBRARY_PATH})
+
+        if(LINUX)
+            set(cmd "mkdir")
+            set(debug_dir "${HAVOK_DEBUG_LIBRARY_PATH}/${HAVOK_LIB}")
+            set(release_dir "${HAVOK_RELEASE_LIBRARY_PATH}/${HAVOK_LIB}")
+            set(relwithdebinfo_dir "${HAVOK_RELWITHDEBINFO_LIBRARY_PATH}/${HAVOK_LIB}")

-    set(cmd "ar")
-    set(arg " -xv")
-    set(arg "${arg} ../lib${HAVOK_LIB}.a")
-    exec_program( ${cmd} ${debug_dir} ARGS ${arg} OUTPUT_VARIABLE rv)
-    exec_program( ${cmd} ${release_dir} ARGS ${arg} OUTPUT_VARIABLE rv)
+            exec_program( ${cmd} ${HAVOK_DEBUG_LIBRARY_PATH} ARGS ${debug_dir} OUTPUT_VARIABLE rv)
+            exec_program( ${cmd} ${HAVOK_RELEASE_LIBRARY_PATH} ARGS ${release_dir} OUTPUT_VARIABLE rv)
+            exec_program( ${cmd} ${HAVOK_RELWITHDEBINFO_LIBRARY_PATH} ARGS ${relwithdebinfo_dir} OUTPUT_VARIABLE rv)

-    file(GLOB extracted_debug "${debug_dir}/*.o")
-    file(GLOB extracted_release "${release_dir}/*.o")
-    list(APPEND HK_DEBUG_LIBRARIES ${extracted_debug})
-    list(APPEND HK_RELEASE_LIBRARIES ${extracted_release})
-    list(APPEND HK_LIBRARIES debug      ${extracted_debug}
-                 optimized  ${extracted_release})
-    else(LINUX)
-        list(APPEND HK_DEBUG_LIBRARIES   ${HAVOK_DEBUG_LIB_${HAVOK_LIB}})
-        list(APPEND HK_RELEASE_LIBRARIES ${HAVOK_RELEASE_LIB_${HAVOK_LIB}})
-        list(APPEND HK_LIBRARIES debug     ${HAVOK_DEBUG_LIB_${HAVOK_LIB}}
-                                 optimized ${HAVOK_RELEASE_LIB_${HAVOK_LIB}})
-    endif (LINUX)
+            set(cmd "ar")
+            set(arg " -xv")
+            set(arg "${arg} ../lib${HAVOK_LIB}.a")
+            exec_program( ${cmd} ${debug_dir} ARGS ${arg} OUTPUT_VARIABLE rv)
+            exec_program( ${cmd} ${release_dir} ARGS ${arg} OUTPUT_VARIABLE rv)
+            exec_program( ${cmd} ${relwithdebinfo_dir} ARGS ${arg} OUTPUT_VARIABLE rv)
+
+            file(GLOB extracted_debug "${debug_dir}/*.o")
+            file(GLOB extracted_release "${release_dir}/*.o")
+            file(GLOB extracted_relwithdebinfo "${release_dir}/*.o")
+            list(APPEND HK_DEBUG_LIBRARIES ${extracted_debug})
+            list(APPEND HK_RELEASE_LIBRARIES ${extracted_release})
+            list(APPEND HK_RELWITHDEBINFO_LIBRARIES ${extracted_relwithdebinfo})
+        else(LINUX)
+        # Win32
+            list(APPEND HK_DEBUG_LIBRARIES   ${HAVOK_DEBUG_LIB_${HAVOK_LIB}})
+            list(APPEND HK_RELEASE_LIBRARIES ${HAVOK_RELEASE_LIB_${HAVOK_LIB}})
+            list(APPEND HK_RELWITHDEBINFO_LIBRARIES ${HAVOK_RELWITHDEBINFO_LIB_${HAVOK_LIB}})
+        endif (LINUX)
 endforeach(HAVOK_LIB)


COMP: Adding explicit instantiations for interpolators with TCoor double. BUG: 4644. This matches the recent change of default template parameters       in the Interpolation hierarchy:             http://www.itk.org/Bug/view.php?id=4644

--- Wrapping/ExplicitITK/Modules/Common/wrap_itkImageFunction.cmake
+++ Wrapping/ExplicitITK/Modules/Common/wrap_itkImageFunction.cmake
@@ -27,8 +27,11 @@
 WRAP_TEMPLATE("IF3FF" "Templates::ImageF3,float,float")
 WRAP_TEMPLATE("ISI2DD" "Templates::ImageSI2,double,double")
 WRAP_TEMPLATE("IFAF22FAD2F" "Templates::ImageFAF22,Templates::FixedArrayD2,float")
+WRAP_TEMPLATE("IFAF22FAD2D" "Templates::ImageFAF22,Templates::FixedArrayD2,double")
 WRAP_TEMPLATE("IFAF33FAD3F" "Templates::ImageFAF33,Templates::FixedArrayD3,float")
+WRAP_TEMPLATE("IFAF33FAD3D" "Templates::ImageFAF33,Templates::FixedArrayD3,double")
 WRAP_TEMPLATE("IFAUC43FAD4F" "Templates::ImageFAUC43,Templates::FixedArrayD4,float")
+WRAP_TEMPLATE("IFAUC43FAD4D" "Templates::ImageFAUC43,Templates::FixedArrayD4,double")
 WRAP_TEMPLATE("IFAUC43MDF" "Templates::ImageFAUC43,vnl_matrix<double>,float")
 WRAP_TEMPLATE("IVF22FAD2D" "Templates::ImageVF22,Templates::FixedArrayD2,double")
 WRAP_TEMPLATE("IVF22FAD2F" "Templates::ImageVF22,Templates::FixedArrayD2,float")
@@ -53,6 +56,7 @@
 WRAP_TEMPLATE("IUI3DD" "Templates::ImageUI3,double,double")
 WRAP_TEMPLATE("IUL2DD" "Templates::ImageUL2,double,double")
 WRAP_TEMPLATE("IUL3DF" "Templates::ImageUL3,double,float")
+WRAP_TEMPLATE("IUL3DD" "Templates::ImageUL3,double,double")
 WRAP_TEMPLATE("IUS2DD" "Templates::ImageUS2,double,double")
 WRAP_TEMPLATE("IUS3DD" "Templates::ImageUS3,double,double")
 WRAP_TEMPLATE("IUS3DF" "Templates::ImageUS3,double,float")


Implement header-only target as INTERFACE lib

--- CMake/AbseilHelpers.cmake
+++ CMake/AbseilHelpers.cmake
@@ -136,34 +136,26 @@

     if(ABSL_CC_LIB_SRCS_LEN)
       add_library(${_NAME} STATIC ${ABSL_CC_LIB_SRCS} ${ABSL_CC_LIB_HDRS})
+      target_include_directories(${_NAME}
+        PUBLIC ${ABSL_COMMON_INCLUDE_DIRS})
+      target_compile_options(${_NAME}
+        PRIVATE ${ABSL_COMPILE_CXXFLAGS} ${ABSL_CC_LIB_COPTS})
+      target_link_libraries(${_NAME}
+        PUBLIC ${ABSL_CC_LIB_DEPS}
+        PRIVATE ${ABSL_CC_LIB_LINKOPTS}
+      )
+      target_compile_definitions(${_NAME} PUBLIC ${ABSL_CC_LIB_DEFINES})
+
+      # Add all Abseil targets to a a folder in the IDE for organization.
+      set_property(TARGET ${_NAME} PROPERTY FOLDER ${ABSL_IDE_FOLDER})
     else()
-      set(__dummy_header_only_lib_file "${CMAKE_CURRENT_BINARY_DIR}/${_NAME}_header_only_dummy.cc")
-
-      if(NOT EXISTS ${__dummy_header_only_lib_file})
-        file(WRITE ${__dummy_header_only_lib_file}
-          "/* generated file for header-only cmake target */
-
-          namespace absl {
-            // single meaningless symbol
-            void ${_NAME}__header_fakesym() {}
-          }  // namespace absl")
-      endif()
-
-      add_library(${_NAME} ${__dummy_header_only_lib_file} ${ABSL_CC_LIB_HDRS})
+      add_library(${_NAME} INTERFACE)
+      target_include_directories(${_NAME} INTERFACE ${ABSL_COMMON_INCLUDE_DIRS})
+      target_link_libraries(${_NAME}
+        INTERFACE ${ABSL_CC_LIB_DEPS} ${ABSL_CC_LIB_LINKOPTS}
+      )
+      target_compile_definitions(${_NAME} INTERFACE ${ABSL_CC_LIB_DEFINES})
     endif()
-
-    target_compile_options(${_NAME} PRIVATE ${ABSL_COMPILE_CXXFLAGS} ${ABSL_CC_LIB_COPTS})
-    target_link_libraries(${_NAME}
-      PUBLIC ${ABSL_CC_LIB_DEPS}
-      PRIVATE ${ABSL_CC_LIB_LINKOPTS}
-    )
-    target_compile_definitions(${_NAME} PUBLIC ${ABSL_CC_LIB_DEFINES})
-
-    target_include_directories(${_NAME}
-      PUBLIC ${ABSL_COMMON_INCLUDE_DIRS}
-    )
-    # Add all Abseil targets to a a folder in the IDE for organization.
-    set_property(TARGET ${_NAME} PROPERTY FOLDER ${ABSL_IDE_FOLDER})

     if(ABSL_CC_LIB_VISIBILITY_PUBLIC)
       add_library(absl::${ABSL_CC_LIB_NAME} ALIAS ${_NAME})


etc/service.cmake: Creating tar files without absolute paths

--- etc/service.cmake
+++ etc/service.cmake
@@ -244,17 +244,19 @@
                          REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}")

   if(CREATE_TAR)
+    get_filename_component(TAR_BASE_NAME "${CREATE_TAR}" NAME)
     add_custom_command(
       OUTPUT tarfile.o
-      COMMAND tar cf ${TAR_RELPATH} ${CREATE_TAR}
+      COMMAND tar cf ${TAR_RELPATH} -C ${CMAKE_SOURCE_DIR} ${TAR_BASE_NAME}
       COMMAND cp ${TAR_RELPATH} input.bin
       COMMAND ${CMAKE_OBJCOPY} -I binary -O elf32-i386 -B i386 input.bin tarfile.o
       COMMAND rm input.bin
     )
   elseif(CREATE_TAR_GZ)
+    get_filename_component(TAR_BASE_NAME "${CREATE_TAR_GZ}" NAME)
     add_custom_command(
       OUTPUT tarfile.o
-      COMMAND tar czf ${TAR_RELPATH} ${CREATE_TAR_GZ}
+      COMMAND tar czf ${TAR_RELPATH} -C ${CMAKE_SOURCE_DIR} ${TAR_BASE_NAME}
       COMMAND cp ${TAR_RELPATH} input.bin
       COMMAND ${CMAKE_OBJCOPY} -I binary -O elf32-i386 -B i386 input.bin tarfile.o
       COMMAND rm input.bin


And again an accidental commit. sorry.

And again an accidental commit. sorry.

svn path=/trunk/KDE/kdepim/; revision=976798

--- cmake/modules/FindNepomukAnnotation.cmake
+++ cmake/modules/FindNepomukAnnotation.cmake
@@ -1,51 +0,0 @@
-# Once done this will define
-#
-# NepomukAnnotation requires Nepomuk, so this module checks for Soprano too.
-#
-#  NEPOMUK_ANNOTATION_FOUND - system has Nepomuk
-#  NEPOMUK_ANNOTATION_INCLUDE_DIR - the Nepomuk include directory
-#  NEPOMUK_ANNOTATION_LIBRARIES - Link these to use Nepomuk Annotation
-#  NEPOMUK_ANNOTATION_DEFINITIONS - Compiler switches required for using Nepomuk
-#
-
-if (NOT DEFINED Nepomuk_FOUND)
-  macro_optional_find_package(Nepomuk)
-  macro_log_feature(Nepomuk_FOUND "Nepomuk" "Semantic Desktop" "" FALSE "" "Nepomuk is needed for NepomukAnnotation")
-endif (NOT DEFINED Nepomuk_FOUND)
-
-if (Nepomuk_FOUND)
-
-  set (NEPOMUK_ANNOTATION_FIND_REQUIRED ${NepomukAnnotation_FIND_REQUIRED})
-  if (NEPOMUK_ANNOTATION_INCLUDE_DIR AND NEPOMUK_ANNOTATION_LIBRARIES)
-
-    # Already in cache, be silent
-    set(NEPOMUK_ANNOTATION_FIND_QUIETLY TRUE)
-
-  else (NEPOMUK_ANNOTATION_INCLUDE_DIR AND NEPOMUK_ANNOTATION_LIBRARIES)
-    find_path(NEPOMUK_ANNOTATION_INCLUDE_DIR
-      NAMES
-      nepomuk/term.h
-      PATHS
-      ${KDE4_INCLUDE_DIR}
-      ${INCLUDE_INSTALL_DIR}
-      )
-
-    find_library(NEPOMUK_ANNOTATION_LIBRARIES
-      NAMES
-      nepomukannotation
-      PATHS
-      ${KDE4_LIB_DIR}
-      ${LIB_INSTALL_DIR}
-      )
-
-    mark_as_advanced(NEPOMUK_ANNOTATION_INCLUDE_DIR NEPOMUK_ANNOTATION_LIBRARIES)
-
-  endif (NEPOMUK_ANNOTATION_INCLUDE_DIR AND NEPOMUK_ANNOTATION_LIBRARIES)
-
-  include(FindPackageHandleStandardArgs)
-  find_package_handle_standard_args(NEPOMUK_ANNOTATION DEFAULT_MSG
-                                    NEPOMUK_ANNOTATION_LIBRARIES NEPOMUK_ANNOTATION_INCLUDE_DIR)
-  #to retain backward compatibility
-  set (NepomukAnnotation_FOUND ${NEPOMUK_ANNOTATION_FOUND})
-
-endif (Nepomuk_FOUND)


Include gyb source in build dependencies

Otherwise you can't fix gyb bugs and see the result.  We were including
the top-level driver, but not the Python module file, gyb.py

Swift SVN r32860

--- cmake/modules/SwiftHandleGybSources.cmake
+++ cmake/modules/SwiftHandleGybSources.cmake
@@ -40,8 +40,8 @@

   set(dependency_targets)
   set(de_gybbed_sources)
-  set(gyb_sources)
   set(gyb_tool "${SWIFT_SOURCE_DIR}/utils/gyb")
+  set(gyb_tool_source "${gyb_tool}" "${gyb_tool}.py")
   set(gyb_extra_sources
       "${SWIFT_SOURCE_DIR}/utils/GYBUnicodeDataUtils.py"
       "${SWIFT_SOURCE_DIR}/utils/SwiftIntTypes.py"
@@ -71,7 +71,7 @@
           COMMAND
             "${CMAKE_COMMAND}" -E remove "${output_file_name}.tmp"
           OUTPUT "${output_file_name}"
-          DEPENDS "${gyb_tool}" "${src}" "${gyb_extra_sources}"
+          DEPENDS "${gyb_tool_source}" "${src}" "${gyb_extra_sources}"
           COMMENT "Generating ${src_sans_gyb} from ${src} with ptr size = ${ptr_size}"
           WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
           SOURCES "${src}"


zeromq-config.cmake: fix issue #4357

zeromq-config.cmake: fix issue #4357

--- cmake/qibuild/modules/zeromq-config.cmake
+++ cmake/qibuild/modules/zeromq-config.cmake
@@ -2,8 +2,8 @@

 clean(ZEROMQ)
 fpath(ZEROMQ zmq.h)
-# zeromq is called libzmq.dll on windows...
-flib(ZEROMQ libzmq zmq)
+flib(ZEROMQ OPTIMIZED NAMES libzmq zmq)
+flib(ZEROMQ DEBUG     NAME  libzmq zmq_d)
 if(UNIX)
   qi_set_global(ZEROMQ_DEPENDS "UUID")
 else()


serialize mkpatch with ExternalProject_Add_Step

fixes https://github.com/smanders/externpro/issues/135

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -53,6 +53,17 @@
     else()
       set(patchCmd ${CMAKE_COMMAND} -E echo "no patch for ${prj}")
     endif()
+    ExternalProject_Add(${prj}_repo
+      GIT_REPOSITORY ${P_GIT_ORIGIN} GIT_TAG ${P_GIT_TAG}
+      #DOWNLOAD_COMMAND # tricky: must not be defined for git clone to happen
+      PATCH_COMMAND ""
+      UPDATE_COMMAND ${GIT_EXECUTABLE} fetch --all
+      CONFIGURE_COMMAND ""
+      BUILD_COMMAND ${patchCmd}
+      INSTALL_COMMAND ""
+      BUILD_IN_SOURCE 1 # <BINARY_DIR>==<SOURCE_DIR>
+      DOWNLOAD_DIR ${NULL_DIR} INSTALL_DIR ${NULL_DIR}
+      )
     if(DEFINED P_GIT_UPSTREAM)
       if(DEFINED P_GIT_TRACKING_BRANCH)
         set(trackingBranch ${P_GIT_TRACKING_BRANCH})
@@ -64,28 +75,15 @@
       else()
         set(upstreamCmd --set-upstream-to=upstream/${trackingBranch} ${trackingBranch})
       endif()
-      ExternalProject_Add(${prj}_repo
-        GIT_REPOSITORY ${P_GIT_ORIGIN} GIT_TAG ${P_GIT_TAG}
-        #DOWNLOAD_COMMAND # tricky: must not be defined for git clone to happen
-        PATCH_COMMAND ${GIT_EXECUTABLE} remote add upstream ${P_GIT_UPSTREAM}
-        UPDATE_COMMAND ${GIT_EXECUTABLE} fetch --all
-        CONFIGURE_COMMAND ${GIT_EXECUTABLE} branch ${upstreamCmd}
-        BUILD_COMMAND ${patchCmd}
-        INSTALL_COMMAND ""
-        BUILD_IN_SOURCE 1 # <BINARY_DIR>==<SOURCE_DIR>
-        DOWNLOAD_DIR ${NULL_DIR} INSTALL_DIR ${NULL_DIR}
+      ExternalProject_Add_Step(${prj}_repo remote_add_upstream
+        COMMAND ${GIT_EXECUTABLE} remote add upstream ${P_GIT_UPSTREAM}
+        WORKING_DIRECTORY <SOURCE_DIR>
+        DEPENDEES download DEPENDERS update
         )
-    else()
-      ExternalProject_Add(${prj}_repo
-        GIT_REPOSITORY ${P_GIT_ORIGIN} GIT_TAG ${P_GIT_TAG}
-        #DOWNLOAD_COMMAND # tricky: must not be defined for git clone to happen
-        PATCH_COMMAND ""
-        UPDATE_COMMAND ${GIT_EXECUTABLE} fetch --all
-        CONFIGURE_COMMAND ""
-        BUILD_COMMAND ${patchCmd}
-        INSTALL_COMMAND ""
-        BUILD_IN_SOURCE 1 # <BINARY_DIR>==<SOURCE_DIR>
-        DOWNLOAD_DIR ${NULL_DIR} INSTALL_DIR ${NULL_DIR}
+      ExternalProject_Add_Step(${prj}_repo set_upstream
+        COMMAND ${GIT_EXECUTABLE} branch ${upstreamCmd}
+        WORKING_DIRECTORY <SOURCE_DIR>
+        DEPENDEES update DEPENDERS build
         )
     endif()
   endif()


add example showing how to compile Cpp runtime with a different standard

--- runtime/Cpp/cmake/ExternalAntlr4Cpp.cmake
+++ runtime/Cpp/cmake/ExternalAntlr4Cpp.cmake
@@ -104,6 +104,7 @@
       CMAKE_CACHE_ARGS
           -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
           -DWITH_STATIC_CRT:BOOL=${ANTLR4_WITH_STATIC_CRT}
+          # -DCMAKE_CXX_STANDARD:STRING=17 # if desired, compile the runtime with a different C++ standard
       INSTALL_COMMAND ""
       EXCLUDE_FROM_ALL 1)
 endif()


More compliant cmake find module

More compliant cmake find module

--- cmake/FindVisionaray.cmake
+++ cmake/FindVisionaray.cmake
@@ -42,6 +42,7 @@
         lib
 )

+set(VISIONARAY_INCLUDE_DIRS ${VISIONARAY_INCLUDE_DIR})
 set(VISIONARAY_LIBRARIES ${VISIONARAY_LIBRARY})

 find_package_handle_standard_args(Visionaray