CMake: Build static SDK libs and SDK EC libs to /lib. Add that SDK lib location as link_directories for everything in init_target macro. This brings us closer again to core SDK vs application layer separation.

--- cmake/ModuleSetup.cmake
+++ cmake/ModuleSetup.cmake
@@ -38,6 +38,9 @@
     # note: CMAKE_INCLUDE_CURRENT_DIR could automate this
     include_directories (${CMAKE_CURRENT_SOURCE_DIR})

+    # Add the SDK static libs build location for linking
+    link_directories (${CMAKE_SOURCE_DIR}/lib)
+
     # set TARGET_DIR
     if (${TARGET_NAME}_OUTPUT)
         set (TARGET_DIR ${PROJECT_BINARY_DIR}/bin/${ARGV2})
@@ -60,8 +63,8 @@
             if (APPLE)
                 set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flat_namespace")
             endif()
-            set (LIBRARY_OUTPUT_PATH ${TARGET_DIR})
-            set (EXECUTABLE_OUTPUT_PATH ${TARGET_DIR})
+            set (LIBRARY_OUTPUT_DIRECTORY ${TARGET_DIR})
+            set (RUNTIME_OUTPUT_DIRECTORY ${TARGET_DIR})
         endif ()
     endif ()
     # pretty printing
@@ -73,13 +76,31 @@

     message (STATUS "-- build type:")
     message (STATUS "       " ${LIB_TYPE} " library")
-
+
+    # *unix add -fPIC for static libraries
     if (UNIX AND ${LIB_TYPE} STREQUAL "STATIC")
         set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
     endif ()

     add_library (${TARGET_NAME} ${LIB_TYPE} ${ARGN})

+    # build static libraries to /lib if
+    # - Is part of the SDK (/src/Core/)
+    # - Is a static EC declared by SDK on the build (/src/EntityComponents/)
+    if (${LIB_TYPE} STREQUAL "STATIC" AND NOT TARGET_DIR)
+        string (REGEX MATCH  ".*/src/Core/?.*" TARGET_IS_CORE ${CMAKE_CURRENT_SOURCE_DIR})
+        string (REGEX MATCH  ".*/src/EntityComponents/?.*" TARGET_IS_EC ${CMAKE_CURRENT_SOURCE_DIR})
+        if (TARGET_IS_CORE)
+            message (STATUS "-- SDK lib output path:")
+        elseif (TARGET_IS_EC)
+            message (STATUS "-- SDK EC lib output path:")
+        endif ()
+        if (TARGET_IS_CORE OR TARGET_IS_EC)
+            message (STATUS "       " ${CMAKE_SOURCE_DIR}/lib)
+            set_target_properties (${TARGET_NAME} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
+        endif ()
+    endif ()
+
     # internal library naming convention
     set_target_properties (${TARGET_NAME} PROPERTIES DEBUG_POSTFIX d)
     set_target_properties (${TARGET_NAME} PROPERTIES PREFIX "")


Fixing install target.

Fixing install target.

--- cmake/ectoInstall.cmake
+++ cmake/ectoInstall.cmake
@@ -3,7 +3,6 @@

 #install headers
 set(ecto_HEADERS
-  include/ecto/blackbox.hpp
   include/ecto/ecto.hpp
   include/ecto/graph_types.hpp
   include/ecto/log.hpp


add install command for tinyxml

add install command for tinyxml

--- cmake/get-tinyxml.cmake
+++ cmake/get-tinyxml.cmake
@@ -8,15 +8,6 @@

 set(TINYXML_VERSION "2.6.2")

-set(TINYXML_CMAKE_ARGS
-    ${COMMON_CMAKE_ARGS}
-        -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-        -DCMAKE_INSTALL_PREFIX=${DEPENDENCY_INSTALL_DIR}
-        #-DCMAKE_PREFIX_PATH=${DEPENDENCY_INSTALL_DIR} ${CMAKE_PREFIX_PATH}
-        -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-        -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
-)
-
 ExternalProject_Add(
   tinyxml
   PREFIX                ${DEPENDENCY_EXTRACT_DIR}
@@ -25,5 +16,10 @@
   URL                   https://sourceforge.net/projects/tinyxml/files/tinyxml/2.6.2/tinyxml_2_6_2.zip/download
   URL_MD5               2a0aaf609c9e670ec9748cd01ed52dae
   PATCH_COMMAND         ${CMAKE_COMMAND} -E copy ${CMAKE_MODULE_PATH}/patches/tinyxml/CMakeLists.txt ${DEPENDENCY_EXTRACT_DIR}/src/tinyxml
-  #CMAKE_ARGS            ${TINYXML_CMAKE_ARGS}
+  INSTALL_COMMAND
+    COMMAND             ${CMAKE_COMMAND} -E copy ${DEPENDENCY_EXTRACT_DIR}/src/tinyxml-build/Release/tinyxml.dll   ${DEPENDENCY_INSTALL_DIR}/bin/tinyxml.dll
+    COMMAND             ${CMAKE_COMMAND} -E copy ${DEPENDENCY_EXTRACT_DIR}/src/tinyxml-build/Release/tinyxml.lib   ${DEPENDENCY_INSTALL_DIR}/lib/tinyxml.lib
+    COMMAND             ${CMAKE_COMMAND} -E copy ${DEPENDENCY_EXTRACT_DIR}/src/tinystr.h"                          ${DEPENDENCY_INSTALL_DIR}/include/tinystr.h
+    COMMAND             ${CMAKE_COMMAND} -E copy ${DEPENDENCY_EXTRACT_DIR}/src/tinyxml.h"                          ${DEPENDENCY_INSTALL_DIR}/include/tinyxml.h
+
 )


Fix: oups missed with the last commit

Fix: oups missed with the last commit

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@903 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_options.cmake
+++ cmake/pcl_options.cmake
@@ -1,5 +1,9 @@
 # Options for building PCL.

 # Build shared libraries by default.
-option(PCL_SHARED_LIBS "Build shared libraries." ON)
+if(WIN32)
+	option(PCL_SHARED_LIBS "Build shared libraries." OFF)
+else(WIN32)
+	option(PCL_SHARED_LIBS "Build shared libraries." ON)
+endif(WIN32)
 mark_as_advanced(PCL_SHARED_LIBS)


Minor refactor

Minor refactor

--- cmake/pomdog/math.cmake
+++ cmake/pomdog/math.cmake
@@ -1,4 +1,4 @@
-source_group(math           REGULAR_EXPRESSION "pomdog/math/*")
+source_group(math REGULAR_EXPRESSION "pomdog/math/*")

 target_sources(pomdog_static PRIVATE
     # NOTE: math


cmake: Support building against Slicer without C++11 support

--- Common.cmake
+++ Common.cmake
@@ -172,6 +172,36 @@
   if(NOT "${CMAKE_C_FLAGS}" MATCHES "-fPIC")
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
   endif()
+endif()
+
+# Since C++11 support should NOT be enabled when building against Slicer 4.8, we
+# use the following workaround to find out which version of Slicer is used.
+# Indeed, simply calling "find_package(Slicer ...)" here would have undesirable side
+# effects. For more details, see use of "unsetForSlicer()" in SuperBuild.cmake
+if(NOT DEFINED HAS_STD_CPP11_FLAG)
+  set(_msg "Forcing HAS_STD_CPP11_FLAG to OFF")
+  message(STATUS "${_msg}")
+  if(DEFINED Slicer_DIR)
+    set(_config "${Slicer_DIR}/SlicerConfig.cmake")
+    if(NOT EXISTS ${_config})
+      message(FATAL_ERROR "Slicer_DIR [${Slicer_DIR}] is specified but doesn't contain SlicerConfig.cmake")
+    endif()
+    file(READ "${Slicer_DIR}/SlicerConfig.cmake" _config_content)
+    string(REGEX REPLACE "Slicer_REQUIRED_QT_VERSION \"([0-9\\.]+)\"" "\\1" _match ${_config_content})
+    if(_match STREQUAL "")
+      message(FATAL_ERROR "Failed to extract Slicer_REQUIRED_QT_VERSION")
+    endif()
+    set(Slicer_REQUIRED_QT_VERSION "${CMAKE_MATCH_1}")
+    if(Slicer_REQUIRED_QT_VERSION VERSION_LESS 5)
+      set(HAS_STD_CPP11_FLAG 0)
+      set(_status "yes (Slicer built using Qt4 requires C++98)")
+    else()
+      set(_status "no (Slicer built using Qt5 supports C++11)")
+    endif()
+  else()
+    set(_status "no (Standalone build of DTIProcess supports C++11)")
+  endif()
+  message(STATUS "${_msg} - ${_status}")
 endif()

 include(CheckCXXCompilerFlag)


WIP: linux problems

WIP: linux problems

--- Common.cmake
+++ Common.cmake
@@ -20,24 +20,20 @@
 # Build option(s)
 #-----------------------------------------------------------------------------
 #-----------------------------------------------------------------------------
-option(BUILD_SHARED_LIBS "Build ITK with shared libraries." ON)
+option(BUILD_SHARED_LIBS "Build ITK with shared libraries." OFF)
 set(ANTS_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})

+######################################################################################################
 # BA - add this stuff to help installation of ANTsR
-# use, i.e. don't skip the full RPATH for the build tree
-SET(CMAKE_SKIP_BUILD_RPATH  FALSE)
-# when building, don't use the install RPATH already
-# (but later on when installing)
-SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
-SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
-# add the automatically determined parts of the RPATH
-# which point to directories outside the build tree to the install RPATH
-SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-# the RPATH to be used when installing, but only if it's not a system directory
-LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
-IF("${isSystemDir}" STREQUAL "-1")
-   SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
-ENDIF("${isSystemDir}" STREQUAL "-1")
+# SET(CMAKE_SKIP_BUILD_RPATH  FALSE)
+# SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+# SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+# SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+# LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
+# IF("${isSystemDir}" STREQUAL "-1")
+#   SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+# ENDIF("${isSystemDir}" STREQUAL "-1")
+#####################################################################################################

 option(BUILD_EXTERNAL_APPLICATIONS "Build applications that are bundled with ANTs for convenience." ON)
 set(BUILD_EXTERNAL_APPLICATIONS ${BUILD_EXTERNAL_APPLICATIONS})


BUG: Configures with CMake 3.0.0 and up

BUG: Configures with CMake 3.0.0 and up

The CMake version was only check using CMAKE_PATH_VERSION instead of the entire version number. It now uses the entire version number instead.


Tweak xlC options

Tweak xlC options

--- Common.cmake
+++ Common.cmake
@@ -77,8 +77,8 @@
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
   endif()
 elseif(CMAKE_COMPILER_IS_XLCXX)
-  set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -qnoopt")
-  set(CMAKE_CC_FLAGS_DEBUG "${CMAKE_CC_FLAGS_DEBUG} -qnoopt")
+  set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -qnoopt")
+  set(CMAKE_CC_FLAGS_DEBUG "${CMAKE_CC_FLAGS_DEBUG} -O0 -qnoopt")
 endif()

 if(MSVC)


set the system processor in the MinGW toolchain file

The system processor is used by the aruco CMakeLists.txt file and this
stops a warning being generated by CMake.

--- mingw-toolchain.cmake
+++ mingw-toolchain.cmake
@@ -1,5 +1,6 @@
 # the name of the target operating system
 SET(CMAKE_SYSTEM_NAME Windows)
+SET(CMAKE_SYSTEM_PROCESSOR i486)

 # which compilers to use for C and C++
 SET(CMAKE_C_COMPILER i486-mingw32-gcc)


Follow CMake coding guidelines in FindMagnum.cmake.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -56,8 +56,7 @@
 # Root include dir
 find_path(MAGNUM_INCLUDE_DIR
     NAMES Magnum.h
-    PATH_SUFFIXES Magnum
-)
+    PATH_SUFFIXES Magnum)

 # Configuration
 file(READ ${MAGNUM_INCLUDE_DIR}/magnumConfigure.h _magnumConfigure)
@@ -139,8 +138,7 @@
     if(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES)
         find_path(_MAGNUM_${_COMPONENT}_INCLUDE_DIR
             NAMES ${_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES}
-            PATHS ${MAGNUM_INCLUDE_DIR}/${_MAGNUM_${_COMPONENT}_INCLUDE_PATH_SUFFIX}
-        )
+            PATHS ${MAGNUM_INCLUDE_DIR}/${_MAGNUM_${_COMPONENT}_INCLUDE_PATH_SUFFIX})
     endif()

     # Decide if the library was found
@@ -154,8 +152,7 @@
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(Magnum
     REQUIRED_VARS MAGNUM_INCLUDE_DIR MAGNUM_LIBRARY
-    HANDLE_COMPONENTS
-)
+    HANDLE_COMPONENTS)

 # Installation dirs
 set(MAGNUM_LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
@@ -170,8 +167,7 @@
     MAGNUM_PLUGINS_IMPORTER_INSTALL_DIR
     MAGNUM_CMAKE_MODULE_INSTALL_DIR
     MAGNUM_INCLUDE_INSTALL_DIR
-    MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR
-)
+    MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR)

 # Importer plugins dir
 if(NOT WIN32)


fix: mirtk_target_dependencies when list of link dependencies is empty [CMake]

--- CMake/Modules/mirtkTargetDependencies.cmake
+++ CMake/Modules/mirtkTargetDependencies.cmake
@@ -84,6 +84,8 @@
     message(FATAL_ERROR "Expected library file path or imported target after ${dep_attr}\nArguments = [${ARGN_UNPARSED_ARGUMENTS}]")
   endif ()
   # Update MIRTK_LIBRARY_PATH
-  list(REMOVE_DUPLICATES ldpath)
+  if (ldpath)
+    list(REMOVE_DUPLICATES ldpath)
+  endif ()
   set_property(GLOBAL PROPERTY MIRTK_LIBRARY_PATH "${ldpath}")
 endfunction ()


adress review comments

adress review comments

--- cmake/Modules/AR_CompilerSettings.cmake
+++ cmake/Modules/AR_CompilerSettings.cmake
@@ -51,9 +51,9 @@

   # https://msdn.microsoft.com/en-us/library/aa267384%28VS.60%29.aspx
   set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /INCREMENTAL:NO /SUBSYSTEM:CONSOLE /LTCG")
-  set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} /SUBSYSTEM:CONSOLE /ignore:4099")
-  set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /SUBSYSTEM:CONSOLE /ignore:4099")
-  set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /SUBSYSTEM:CONSOLE /ignore:4099")
+  set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} /SUBSYSTEM:CONSOLE")
+  set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /SUBSYSTEM:CONSOLE")
+  set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /SUBSYSTEM:CONSOLE")

   set(CanUseSSE42 True CACHE BOOL "Use SSE4.2 optimizations")
 else()


Update seperate travis script for building

--- cmake/Toolchain-gcc-arm-none-eabi.cmake
+++ cmake/Toolchain-gcc-arm-none-eabi.cmake
@@ -34,9 +34,15 @@

 set(CMAKE_SYSTEM_NAME Generic)

-set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
-set(CMAKE_C_COMPILER arm-none-eabi-gcc)
-set(CMAKE_CXX_COMPILER arm-none-eabi-g++)
+if(CMAKE_VERSION VERSION_LESS "3.6.0")
+    include(CMakeForceCompiler)
+    cmake_force_c_compiler(arm-none-eabi-gcc GNU)
+    cmake_force_cxx_compiler(arm-none-eabi-g++ GNU)
+else()
+    set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
+    set(CMAKE_C_COMPILER arm-none-eabi-gcc)
+    set(CMAKE_CXX_COMPILER arm-none-eabi-g++)
+endif()

 set(CMAKE_LINKER arm-none-eabi-ld CACHE STRING "GNU ARM linker")
 set(CMAKE_AR arm-none-eabi-ar CACHE STRING "GNU ARM archiver")


cmake: fix xcc not supporting -Wno-unsed-but-set-variable

XCC does not support the compiler flag -Wno-unused-but-set-variable
so check for flag support before setting it in cmake.

Fixes #29707

Signed-off-by: Daniel Leung <d94e04d205b5962d7873a139ef298b03c1717f72@intel.com>

--- cmake/compiler/gcc/compiler_flags.cmake
+++ cmake/compiler/gcc/compiler_flags.cmake
@@ -89,7 +89,7 @@
                             -Wvla
 )

-set_compiler_property(PROPERTY warning_extended -Wno-unused-but-set-variable)
+check_set_compiler_property(PROPERTY warning_extended -Wno-unused-but-set-variable)

 check_set_compiler_property(PROPERTY warning_error_implicit_int -Werror=implicit-int)


autocmake update

autocmake update

--- cmake/modules/autocmake_math_libs.cmake
+++ cmake/modules/autocmake_math_libs.cmake
@@ -270,6 +270,8 @@
     unset(l)
 endmacro()

+include(FindPackageHandleStandardArgs)
+
 macro(cache_math_result _service MATH_TYPE)
     string(TOUPPER ${_service} _SERVICE)
     set(${_SERVICE}_FIND_QUIETLY TRUE)


STYLE: remove debug informations

STYLE: remove debug informations

--- CMake/External_jpeg.cmake
+++ CMake/External_jpeg.cmake
@@ -13,11 +13,6 @@
   set(${proj}_DEPENDENCIES)
   set(JPEG_SB_BUILD_DIR ${CMAKE_BINARY_DIR}/${proj}/build)
   set(JPEG_SB_SRC ${CMAKE_BINARY_DIR}/${proj}/src/${proj})
-
-  # DEBUG
-  message(STATUS "System name : ${CMAKE_SYSTEM_NAME}")
-  message(STATUS "System ver  : ${CMAKE_SYSTEM_VERSION}")
-  message(STATUS "System proc : ${CMAKE_SYSTEM_PROCESSOR}")

   if(WIN32)

@@ -95,4 +90,4 @@
   endif()

   message(STATUS "  Using libjpeg SuperBuild version")
-endif()+endif()


Temporarily disable test.

Temporarily disable test.

--- Modules/DiffusionImaging/FiberTracking/Testing/files.cmake
+++ Modules/DiffusionImaging/FiberTracking/Testing/files.cmake
@@ -1,6 +1,7 @@
 SET(MODULE_CUSTOM_TESTS
   mitkFiberBundleXReaderWriterTest.cpp
-  mitkGibbsTrackingTest.cpp
+  # temporarily disabled, see bug #18253
+  #mitkGibbsTrackingTest.cpp
   mitkStreamlineTrackingTest.cpp
   mitkPeakExtractionTest.cpp
   mitkLocalFiberPlausibilityTest.cpp


Added lost parameter to FPHSA in FindMagnum.cmake.

Lost during rework in e8403c512335c3448e78579f6690ac45a20e43ce.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -165,7 +165,7 @@
 endforeach()

 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Magnum
+find_package_handle_standard_args(Magnum DEFAULT_MSG
     REQUIRED_VARS MAGNUM_INCLUDE_DIR MAGNUM_LIBRARY
     HANDLE_COMPONENTS)


modules: updated FindMagnum.cmake.

modules: updated FindMagnum.cmake.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -13,6 +13,9 @@
 #  MAGNUM_DEPLOY_PREFIX         - Prefix where to put final application
 #   executables, defaults to ``.``. If a relative path is used, it's relative
 #   to :variable:`CMAKE_INSTALL_PREFIX`.
+#  MAGNUM_INCLUDE_INSTALL_PREFIX - Prefix where to put platform-independent
+#   include and other files, defaults to ``.``. If a relative path is used,
+#   it's relative to :variable:`CMAKE_INSTALL_PREFIX`.
 #  MAGNUM_PLUGINS_DEBUG_DIR     - Base directory with dynamic plugins for
 #   debug builds, defaults to magnum-d/ subdirectory of dir where Magnum
 #   library was found
@@ -162,7 +165,7 @@
 # are included just for backwards compatibility and only if
 # :variable:`MAGNUM_BUILD_DEPRECATED` is enabled:
 #
-#  MAGNUM_LIBRARIES            - Expands to ``Magnum::Magnum`` target. Use
+#  MAGNUM_LIBRARIES             - Expands to ``Magnum::Magnum`` target. Use
 #   ``Magnum::Magnum`` target directly instead.
 #  MAGNUM_*_LIBRARIES           - Expands to ``Magnum::*`` target. Use
 #   ``Magnum::*`` target directly instead.
@@ -511,8 +514,6 @@
             if(_component STREQUAL AndroidApplication)
                 find_package(EGL)
                 set_property(TARGET Magnum::${_component} APPEND PROPERTY
-                    INTERFACE_INCLUDE_DIRECTORIES ${ANDROID_NATIVE_APP_GLUE_INCLUDE_DIR})
-                set_property(TARGET Magnum::${_component} APPEND PROPERTY
                     INTERFACE_LINK_LIBRARIES android EGL::EGL)

             # GLFW application dependencies
@@ -789,11 +790,13 @@
 # Installation and deploy dirs
 set(MAGNUM_DEPLOY_PREFIX "."
     CACHE STRING "Prefix where to put final application executables")
+set(MAGNUM_INCLUDE_INSTALL_PREFIX "."
+    CACHE STRING "Prefix where to put platform-independent include and other files")

 include(${CORRADE_LIB_SUFFIX_MODULE})
 set(MAGNUM_BINARY_INSTALL_DIR bin)
 set(MAGNUM_LIBRARY_INSTALL_DIR lib${LIB_SUFFIX})
-set(MAGNUM_DATA_INSTALL_DIR share/magnum)
+set(MAGNUM_DATA_INSTALL_DIR ${MAGNUM_INCLUDE_INSTALL_PREFIX}/share/magnum)
 set(MAGNUM_PLUGINS_DEBUG_BINARY_INSTALL_DIR ${MAGNUM_BINARY_INSTALL_DIR}/magnum-d)
 set(MAGNUM_PLUGINS_DEBUG_LIBRARY_INSTALL_DIR ${MAGNUM_LIBRARY_INSTALL_DIR}/magnum-d)
 set(MAGNUM_PLUGINS_RELEASE_BINARY_INSTALL_DIR ${MAGNUM_BINARY_INSTALL_DIR}/magnum)
@@ -816,8 +819,8 @@
 set(MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_LIBRARY_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_LIBRARY_INSTALL_DIR}/audioimporters)
 set(MAGNUM_PLUGINS_AUDIOIMPORTER_RELEASE_BINARY_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_BINARY_INSTALL_DIR}/audioimporters)
 set(MAGNUM_PLUGINS_AUDIOIMPORTER_RELEASE_LIBRARY_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_LIBRARY_INSTALL_DIR}/audioimporters)
-set(MAGNUM_INCLUDE_INSTALL_DIR include/Magnum)
-set(MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR include/MagnumPlugins)
+set(MAGNUM_INCLUDE_INSTALL_DIR ${MAGNUM_INCLUDE_INSTALL_PREFIX}/include/Magnum)
+set(MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR ${MAGNUM_INCLUDE_INSTALL_PREFIX}/include/MagnumPlugins)

 # Get base plugin directory from main library location. This is *not* PATH,
 # because CMake always converts the path to an absolute location internally,


GIT: Fix for output of git rev-list to the input of wc -l 	execute_process() Runs the given sequence of one or more 	commands with the standard output of each process piped to 	the standard input of the next.

--- cmake/CheckGitVersion.cmake
+++ cmake/CheckGitVersion.cmake
@@ -58,7 +58,8 @@
                             OUTPUT_VARIABLE ALIROOT_SERIAL_ORIGINAL)
         else()
             # generate the short version of the revision hash using -wc -l
-            execute_process(COMMAND git rev-list ${GIT_SHA1} | wc -l
+            execute_process(COMMAND git rev-list ${GIT_SHA1}
+                            COMMAND wc -l
                             WORKING_DIRECTORY ${AliRoot_SOURCE_DIR}
                             OUTPUT_STRIP_TRAILING_WHITESPACE
                             RESULT_VARIABLE revcount


Escape double-quote in ConfigureChecks to fix CMake 2.8.12.1 warnings.

This warning occurs starting with CMake version efcf318f where the
CMake lexer has been taught how to understand line continuation for
quoted arguments.

Fixes #32

--- cmake/ConfigureChecks.cmake
+++ cmake/ConfigureChecks.cmake
@@ -1289,7 +1289,7 @@
       exit(1);
 #if HAVE_TZNAME
   /* For UTC, tzname[1] is sometimes \"\", sometimes \"   \" */
-  if (strcmp(tzname[0], "UTC") ||
+  if (strcmp(tzname[0], \"UTC\") ||
     (tzname[1][0] != 0 && tzname[1][0] != ' '))
       exit(1);
 #endif


Set PY_PLATFORM CMake variable on all platform.

It is used to set the default "PYTHONPATH" in libpython/CMakeLists.txt

--- cmake/ConfigureChecks.cmake
+++ cmake/ConfigureChecks.cmake
@@ -970,49 +970,6 @@
     )
 endif(APPLE)

-# setup the python platform
-set(PY_PLATFORM generic)
-
-if(CMAKE_SYSTEM MATCHES Linux)
-  set(PY_PLATFORM linux2)
-endif(CMAKE_SYSTEM MATCHES Linux)
-
-if(CMAKE_SYSTEM MATCHES Darwin)
-  set(PY_PLATFORM darwin)
-endif(CMAKE_SYSTEM MATCHES Darwin)
-
-if(CMAKE_SYSTEM MATCHES FreeBSD)
-  set(PY_PLATFORM freebsd5)  # which version to use ?
-endif(CMAKE_SYSTEM MATCHES FreeBSD)
-
-if(CMAKE_SYSTEM MATCHES NetBSD)
-  set(PY_PLATFORM netbsd1)
-endif(CMAKE_SYSTEM MATCHES NetBSD)
-
-if(CMAKE_SYSTEM MATCHES AIX)
-  set(PY_PLATFORM aix4)
-endif(CMAKE_SYSTEM MATCHES AIX)
-
-if(CMAKE_SYSTEM MATCHES BeOS)
-  set(PY_PLATFORM beos5)
-endif(CMAKE_SYSTEM MATCHES BeOS)
-
-if(CMAKE_SYSTEM MATCHES IRIX)
-  set(PY_PLATFORM irix6)
-endif(CMAKE_SYSTEM MATCHES IRIX)
-
-if(CMAKE_SYSTEM MATCHES SunOS)
-  set(PY_PLATFORM sunos5)
-endif(CMAKE_SYSTEM MATCHES SunOS)
-
-if(CMAKE_SYSTEM MATCHES UnixWare)
-  set(PY_PLATFORM unixware7)
-endif(CMAKE_SYSTEM MATCHES UnixWare)
-
-if(CMAKE_SYSTEM MATCHES Windows)
-  set(PY_PLATFORM win32)
-endif(CMAKE_SYSTEM MATCHES Windows)
-
 # todo
 set(ENABLE_IPV6 1)
 set(HAVE_UCS4_TCL 0)
@@ -1028,3 +985,46 @@
 set(HAVE_GETHOSTBYNAME_R_6_ARG 0)

 endif(WIN32)
+
+# setup the python platform
+set(PY_PLATFORM generic)
+
+if(CMAKE_SYSTEM MATCHES Linux)
+  set(PY_PLATFORM linux2)
+endif(CMAKE_SYSTEM MATCHES Linux)
+
+if(CMAKE_SYSTEM MATCHES Darwin)
+  set(PY_PLATFORM darwin)
+endif(CMAKE_SYSTEM MATCHES Darwin)
+
+if(CMAKE_SYSTEM MATCHES FreeBSD)
+  set(PY_PLATFORM freebsd5)  # which version to use ?
+endif(CMAKE_SYSTEM MATCHES FreeBSD)
+
+if(CMAKE_SYSTEM MATCHES NetBSD)
+  set(PY_PLATFORM netbsd1)
+endif(CMAKE_SYSTEM MATCHES NetBSD)
+
+if(CMAKE_SYSTEM MATCHES AIX)
+  set(PY_PLATFORM aix4)
+endif(CMAKE_SYSTEM MATCHES AIX)
+
+if(CMAKE_SYSTEM MATCHES BeOS)
+  set(PY_PLATFORM beos5)
+endif(CMAKE_SYSTEM MATCHES BeOS)
+
+if(CMAKE_SYSTEM MATCHES IRIX)
+  set(PY_PLATFORM irix6)
+endif(CMAKE_SYSTEM MATCHES IRIX)
+
+if(CMAKE_SYSTEM MATCHES SunOS)
+  set(PY_PLATFORM sunos5)
+endif(CMAKE_SYSTEM MATCHES SunOS)
+
+if(CMAKE_SYSTEM MATCHES UnixWare)
+  set(PY_PLATFORM unixware7)
+endif(CMAKE_SYSTEM MATCHES UnixWare)
+
+if(CMAKE_SYSTEM MATCHES Windows)
+  set(PY_PLATFORM win32)
+endif(CMAKE_SYSTEM MATCHES Windows)


libpython-static: Use CMAKE_DL_LIBS instead to initialize CMAKE_DL_LIBS

Instead of explicitly looking for the dl library, uses
CMAKE_DL_LIBS to initialize HAVE_LIBDL. Considering that CMAKE_DL_LIBS
is set to the library containing the dlopen and dlclose symbols. This will
allow to build statically while linking against the "dl" shared library and
avoid the warning:

  warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

--- cmake/ConfigureChecks.cmake
+++ cmake/ConfigureChecks.cmake
@@ -323,7 +323,9 @@

 find_library(HAVE_LIBCURSES curses)
 find_library(HAVE_LIBCRYPT crypt)
-find_library(HAVE_LIBDL dl)
+if(NOT DEFINED HAVE_LIBDL)
+  set(HAVE_LIBDL ${CMAKE_DL_LIBS} CACHE STRING "Name of library containing dlopen and dlcose.")
+endif()
 find_library(HAVE_LIBDLD dld)
 find_library(HAVE_LIBINTL intl)
 find_library(HAVE_LIBM m)


cmake: add new search locations for shield overlay and conf files

* Add support to search for a board specific shield in
  <SHIELD DIR>/boards/<SHIELD>/<BOARD>.{overlay,conf}.  So we can
  support something like:

  x_nucleo_iks01a3/boards/x_nucleo_iks01a3_shub/stm32mp157c_dk2.overlay
  x_nucleo_iks01a3/boards/x_nucleo_iks01a3_shub/stm32mp157c_dk2.conf

Fixes #19078

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

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -320,6 +320,15 @@
           )
         endif()

+        # search for shield/boards/shield/board.overlay file
+        if(EXISTS ${shield_dir}/${s_dir}/boards/${s}/${BOARD}.overlay)
+          # add shield/board overlay to the shield overlays list
+          list(APPEND
+            shield_dts_files
+            ${shield_dir}/${s_dir}/boards/${s}/${BOARD}.overlay
+          )
+        endif()
+
         # search for shield/shield.conf file
         if(EXISTS ${shield_dir}/${s_dir}/${s}.conf)
           # add shield.conf to the shield config list
@@ -335,6 +344,15 @@
           list(APPEND
             shield_conf_files
             ${shield_dir}/${s_dir}/boards/${BOARD}.conf
+          )
+        endif()
+
+        # search for shield/boards/shield/board.conf file
+        if(EXISTS ${shield_dir}/${s_dir}/boards/${s}/${BOARD}.conf)
+          # add HW specific board.conf to the shield config list
+          list(APPEND
+            shield_conf_files
+            ${shield_dir}/${s_dir}/boards/${s}/${BOARD}.conf
           )
         endif()
       else()


Change oneDNN SHA (#42657)

Change oneDNN SHA (#42657)

--- cmake/external/mkldnn.cmake
+++ cmake/external/mkldnn.cmake
@@ -19,7 +19,7 @@
 SET(MKLDNN_INSTALL_DIR    ${THIRD_PARTY_PATH}/install/mkldnn)
 SET(MKLDNN_INC_DIR        "${MKLDNN_INSTALL_DIR}/include" CACHE PATH "mkldnn include directory." FORCE)
 SET(MKLDNN_REPOSITORY     ${GIT_URL}/oneapi-src/oneDNN.git)
-SET(MKLDNN_TAG            9a35435c18722ff17a48fb60bceac42bfdf78754)
+SET(MKLDNN_TAG            9b186765dded79066e0cd9c17eb70b680b76fb8e)

 # Introduce variables:


[CMake] Fixing a small hack in add_lldb_library

This code was adding an explicit dependency on libclang because lldb needs clang headers, changing this to instead depend on the clang tablegen targets means we don't have to depend on building the clang bits in libclang that lldb doesn't need.

Note this is still a bit of a hack because we're adding the dependency to all lldb libraries, instead of just the ones that need it.

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@282196 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/AddLLDB.cmake
+++ cmake/modules/AddLLDB.cmake
@@ -91,7 +91,10 @@
   # Hack: only some LLDB libraries depend on the clang autogenerated headers,
   # but it is simple enough to make all of LLDB depend on some of those
   # headers without negatively impacting much of anything.
-  add_dependencies(${name} libclang)
+  get_property(CLANG_TABLEGEN_TARGETS GLOBAL PROPERTY CLANG_TABLEGEN_TARGETS)
+  if(CLANG_TABLEGEN_TARGETS)
+    add_dependencies(${name} ${CLANG_TABLEGEN_TARGETS})
+  endif()

   set_target_properties(${name} PROPERTIES FOLDER "lldb libraries")
 endmacro(add_lldb_library)


[cmake] Make LIT_COMMAND configurable and improve fallback support

Make LIT_COMMAND configurable, use source tree only when actually
available and extend the default search to other common executable names
'lit.py' and 'lit', in order to increase uniformity between all LLVM
projects and support using installed lit.

Changing the conditional used to determine whether in-tree or external
lit is being used covers the case when LLVM_MAIN_SRC_DIR is defined but
does not exist (anymore). In this case, the functions falls back to
looking for installed lit rather than attempting to use a non-existing
path. The same conditional is used in clang already.

Making LIT_COMMAND a cache variable in case the source tree variant is
used serves two purposes. Firstly, it increases uniformity between
the two branches since find_program() implicitly makes LIT_COMMAND
a cache variable. Secondly, it allows overriding the lit executable used
to run the tests when the LLVM source tree is provided. Gentoo is
planning to use this to use installed (and byte-compiled) lit instead of
re-compiling it in every LLVM project.

Extending default search is meant to increase uniformity between
different LLVM projects. The 'lit.py' name is already used by a few of
them, and 'lit' is the name used by utils/lit/setup.py when installing.

Differential Revision: https://reviews.llvm.org/D25076

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1095,10 +1095,16 @@
   if (NOT CMAKE_CFG_INTDIR STREQUAL ".")
     list(APPEND LIT_ARGS --param build_mode=${CMAKE_CFG_INTDIR})
   endif ()
-  if (LLVM_MAIN_SRC_DIR)
-    set (LIT_COMMAND ${PYTHON_EXECUTABLE} ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
-  else()
-    find_program(LIT_COMMAND llvm-lit)
+  if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
+    # reset cache after erraneous r283029
+    # TODO: remove this once all buildbots run
+    if (LIT_COMMAND STREQUAL "${PYTHON_EXECUTABLE} ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py")
+      unset(LIT_COMMAND CACHE)
+    endif()
+    set (LIT_COMMAND "${PYTHON_EXECUTABLE};${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py"
+         CACHE STRING "Command used to spawn llvm-lit")
+  else()
+    find_program(LIT_COMMAND NAMES llvm-lit lit.py lit)
   endif ()
   list(APPEND LIT_COMMAND ${LIT_ARGS})
   foreach(param ${ARG_PARAMS})


Reformat.

Reformat.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -143,8 +143,10 @@
 endfunction(add_llvm_symbol_exports)

 if(NOT WIN32 AND NOT APPLE)
-  execute_process(COMMAND ${CMAKE_C_COMPILER} -Wl,--version
-                  OUTPUT_VARIABLE stdout)
+  execute_process(
+    COMMAND ${CMAKE_C_COMPILER} -Wl,--version
+    OUTPUT_VARIABLE stdout
+    )
   if("${stdout}" MATCHES "GNU gold")
     set(LLVM_LINKER_IS_GOLD ON)
   endif()


[CMake] We shouldn't be storing values in the cache unless they actually need CMake cache behavior.

add_llvm_external_project puts LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR into the cache even if it is just the in-tree default path. This causes all sorts of oddness, and makes it so that I can't change the behavior of this variable.

This patch never puts LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR into the cache. It will only end up in the cache if it is specified on the command line, which is the correct behavior.

There is also a temporary change to remove non-default values from the cache if they are already present. This should have the impact of cleaning out unncecissary values from the caches on the buildbots and people's local build directories. This part of the change is marked with a TODO and can be removed in a few days.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -689,10 +689,15 @@
   list(APPEND LLVM_IMPLICIT_PROJECT_IGNORE "${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir}")
   string(REPLACE "-" "_" nameUNDERSCORE ${name})
   string(TOUPPER ${nameUNDERSCORE} nameUPPER)
-  set(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir}"
-      CACHE PATH "Path to ${name} source directory")
-  if (NOT ${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR} STREQUAL ""
-      AND EXISTS ${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR}/CMakeLists.txt)
+  #TODO: Remove this check in a few days once it has circulated through
+  # buildbots and people's checkouts (cbieneman - July 14, 2015)
+  if(${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR} STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir}")
+    unset(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR CACHE)
+  endif()
+  if(NOT LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR)
+    set(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir}")
+  endif()
+  if (EXISTS ${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR}/CMakeLists.txt)
     option(LLVM_EXTERNAL_${nameUPPER}_BUILD
            "Whether to build ${name} as part of LLVM" ON)
     if (LLVM_EXTERNAL_${nameUPPER}_BUILD)


Expose XML_DECL in cmake to give path to xml.dcl

  This exposes XML_DECL to cmake as a user settable option.  This allows
  "make validate" to be used on systems that have xml.dcl in locations
  other than "/usr/share/xml/declaration/xml.dcl".  For example, on Macs
  that have installed OpenSP via MacPorts, the file will be in
  "/opt/local/share/OpenSP/xml.dcl".  This also allows one to specify the
  docbook 4.2 catalog by prepending "-c /path/to/docbook-42.cat " to
  CML_DECL.  It's a little bit of a cheat; the catalog probably get it's
  own cmake variable (or copy it into doc/docbook/src/catalog).

  Thanks to David MacMahon for this patch.

svn path=/trunk/; revision=10747

--- cmake/modules/docbook.cmake
+++ cmake/modules/docbook.cmake
@@ -49,7 +49,7 @@
 set(PLPLOT_WEBSITE "plplot.sourceforge.net" CACHE STRING "PLplot web site")

 # Required for validation regardless of whether BUILD_DOC is set
-set(XML_DECL /usr/share/xml/declaration/xml.dcl)
+set(XML_DECL "/usr/share/xml/declaration/xml.dcl" CACHE STRING "Full path to xml.dcl file.")
 set(DOCBOOK_DTD_PUBID "-//OASIS//DTD DocBook XML V4.2//EN")
 find_program(ONSGMLS onsgmls)


remove the set($ENV{ROS_ROOT} ...), experimental.

--- cmake/rosbuild_compat.cmake
+++ cmake/rosbuild_compat.cmake
@@ -2,7 +2,10 @@
 #  used to thunk out to catkin, from rosbuild cmakelists files.
 #  For saving time during transition.
 #
-set(ENV{ROS_ROOT} ${CMAKE_SOURCE_DIR}/ros)
+
+#EAR: setting ENV is frowned upon, this has global scope ...
+#please use the env.sh script if you require ROS_ROOT to be set when running scripts
+#set(ENV{ROS_ROOT} ${CMAKE_SOURCE_DIR}/ros)

 cmake_policy(SET CMP0003 NEW)
 cmake_policy(SET CMP0011 NEW)


Set gcc to c99 standard and enable pedantic.

--- cmake/Modules/DefineCompilerFlags.cmake
+++ cmake/Modules/DefineCompilerFlags.cmake
@@ -4,7 +4,7 @@

 if (UNIX AND NOT WIN32)
   if (CMAKE_COMPILER_IS_GNUCC)
-    add_definitions(-Wall -Wextra -Wmissing-prototypes -Wdeclaration-after-statement -Wunused)
+    add_definitions(-std=gnu99 -pedantic -Wall -Wextra -Wshadow -Wmissing-prototypes -Wdeclaration-after-statement -Wunused)

     # with -fPIC
     check_c_compiler_flag("-fPIC" WITH_FPIC)


GNU_SOURCE is not a compiler flag

GNU_SOURCE is not a compiler flag

This line in DefineCompilerFlags.cmake always passed:
    check_c_compiler_flag("-D_GNU_SOURCE" WITH_GNU_SOURCE)
because -D$string just defined a preprocessor macro, so the compilation
would always succeed.

On UNIX platforms, with GCC or LLVM compilers, we want to always use
GNU_SOURCE.

--- cmake/Modules/DefineCompilerFlags.cmake
+++ cmake/Modules/DefineCompilerFlags.cmake
@@ -36,10 +36,7 @@
             endif()
         endif()

-        check_c_compiler_flag("-D_GNU_SOURCE" WITH_GNU_SOURCE)
-        if (WITH_GNU_SOURCE)
-            set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE")
-        endif (WITH_GNU_SOURCE)
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE")
     endif (${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)")

     #


Check unparsed arguments

Check unparsed arguments

--- cmake/core/sugar_doxygen_generate.cmake
+++ cmake/core/sugar_doxygen_generate.cmake
@@ -17,6 +17,10 @@
   CMAKE_PARSE_ARGUMENTS(
       doxy_generate "${options}" "${one_value_args}" "" ${ARGV}
   )
+
+  if(doxy_generate_UNPARSED_ARGUMENTS)
+    sugar_fatal_error("Unparsed: ${doxy_generate_UNPARSED_ARGUMENTS}")
+  endif()

   if(NOT doxy_generate_TARGET)
     sugar_fatal_error("TARGET is mandatory parameter")


Remove dependency for system installed PCL

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -287,6 +287,10 @@
   list(REMOVE_ITEM externals
     pcl
   )
+
+  list(REMOVE_ITEM PointCloudLibraryPlugin_depends
+    pcl
+  )
 endif()


advanced libbot revision to incorporate param server bug fix

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -1,6 +1,6 @@

 set(libbot-drc_url https://svn.csail.mit.edu/drc/trunk/software/externals/libbot-drc)
-set(libbot-drc_revision 8322)
+set(libbot-drc_revision 8323)
 set(libbot-drc_depends)

 set(Eigen_pod_url https://svn.csail.mit.edu/Eigen_pod)


fptu-cmake: check and use function/data sections.

--- cmake.fptu/compiler.cmake
+++ cmake.fptu/compiler.cmake
@@ -126,6 +126,7 @@
   check_c_compiler_flag("-Og" CC_HAS_DEBUG_FRENDLY_OPTIMIZATION)
   check_c_compiler_flag("-Wall" CC_HAS_WALL)
   check_c_compiler_flag("-Ominimal" CC_HAS_OMINIMAL)
+  check_c_compiler_flag("-ffunction-sections -fdata-sections" CC_HAS_SECTIONS)

   #
   # Check for an omp support
@@ -375,6 +376,12 @@

   if(CC_HAS_WNO_UNKNOWN_PRAGMAS AND NOT HAVE_OPENMP)
     add_compile_flags("C;CXX" -Wno-unknown-pragmas)
+  endif()
+
+  if(CC_HAS_SECTIONS)
+    add_compile_flags("C;CXX" -ffunction-sections -fdata-sections)
+  elseif(MSVC)
+    add_compile_flags("C;CXX" /Gy)
   endif()

   # We must set -fno-omit-frame-pointer here, since we rely


Do not rebuild documentation if dependencies did not change

This improvement speeds up the website build

--- cmake/Documentation.cmake
+++ cmake/Documentation.cmake
@@ -29,13 +29,17 @@

   configure_file(${doxyfile_in} ${doxyfile} @ONLY)
   set(DEST_DIR ${CMAKE_CURRENT_BINARY_DIR}/doc/api)
-  add_custom_target(doc
+  add_custom_command(
+      OUTPUT "${DEST_DIR}/index.html"
+      DEPENDS biodynamo ${doxyfile}
       COMMAND rm -rf ${DEST_DIR}
       COMMAND mkdir -p ${DEST_DIR}
       COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile}
       WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
       COMMENT "Generate documentation"
       VERBATIM)
+
+  add_custom_target(doc DEPENDS "${DEST_DIR}/index.html")

   # Issue with long file names when building deb pacakages
   # https://gitlab.kitware.com/cmake/cmake/issues/14332


Fixing typo in ScaLAPACK tests.

Fixing typo in ScaLAPACK tests.

--- cmake/ElemMathTests.cmake
+++ cmake/ElemMathTests.cmake
@@ -110,5 +110,5 @@
   set(ELEM_SCALAPACK_DEFS "-DBLAS_POST")
 else()
   set(ELEM_HAVE_SCALAPACK FALSE)
-  message(status "ScaLAPACK was NOT detected.")
+  message(STATUS "ScaLAPACK was NOT detected.")
 endif()


draco: Fix empty list handling in older CMakes.

Older CMake releases don't support empty list variables with list(FILTER).

--- cmake/draco_targets.cmake
+++ cmake/draco_targets.cmake
@@ -331,8 +331,13 @@
   endif()

   # Determine if $lib_NAME is a header only target.
-  set(sources_list ${lib_SOURCES})
-  list(FILTER sources_list INCLUDE REGEX cc$)
+  unset(sources_list)
+
+  if(lib_SOURCES)
+    set(sources_list ${lib_SOURCES})
+    list(FILTER sources_list INCLUDE REGEX cc$)
+  endif()
+
   if(NOT sources_list)
     if(NOT XCODE)
       # This is a header only target. Tell CMake the link language.


add md5 for libvorbis

add md5 for libvorbis

--- cmake/get-libvorbis.cmake
+++ cmake/get-libvorbis.cmake
@@ -22,7 +22,7 @@
     DOWNLOAD_DIR    ${DEPENDENCY_DOWNLOAD_DIR}
     DOWNLOAD_NAME   libvorbis-v${LIBOGG_VERSION}.zip
     URL             http://downloads.xiph.org/releases/vorbis/libvorbis-${LIBOGG_VERSION}.zip
-    URL_MD5         1
+    URL_MD5         c39454ff13e79dc8c89bc3a9295b3298
     PATCH_COMMAND   ${CMAKE_COMMAND} -E copy ${CMAKE_MODULE_PATH}/patches/libvorbis/CMakeLists.txt  ${DEPENDENCY_EXTRACT_DIR}/src/libvorbis
     CMAKE_ARGS      ${LIBVORBIS_CMAKE_ARGS}
 )


Fix CMake status message for VKL for non release configs

--- cmake/ospray_macros.cmake
+++ cmake/ospray_macros.cmake
@@ -1,4 +1,4 @@
-## Copyright 2009-2019 Intel Corporation
+## Copyright 2009-2020 Intel Corporation
 ## SPDX-License-Identifier: Apache-2.0

 include(CMakeFindDependencyMacro)
@@ -441,8 +441,10 @@
   else()
     get_target_property(OPENVKL_INCLUDE_DIRS openvkl::openvkl
         INTERFACE_INCLUDE_DIRECTORIES)
+    get_target_property(CONFIGURATIONS openvkl::openvkl IMPORTED_CONFIGURATIONS)
+    list(GET CONFIGURATIONS 0 CONFIGURATION)
     get_target_property(OPENVKL_LIBRARY openvkl::openvkl
-        IMPORTED_LOCATION_RELEASE)
+        IMPORTED_LOCATION_${CONFIGURATION})
     message(STATUS "Found Open VKL: ${OPENVKL_LIBRARY}")
   endif()
 endmacro()


Add: account for sub sub systems

Add: account for sub sub systems

--- cmake/pcl_pclconfig.cmake
+++ cmake/pcl_pclconfig.cmake
@@ -36,6 +36,27 @@
             endforeach(_opt_dep)
             set(PCLCONFIG_OPTIONAL_DEPENDENCIES "${PCLCONFIG_OPTIONAL_DEPENDENCIES})\n")
         endif(_opt_deps)
+
+	#look for subsystems
+	string(TOUPPER "PCL_${_ss}_SUBSYS" PCL_SUBSYS_SUBSYS)
+	if (${PCL_SUBSYS_SUBSYS})
+	  string(TOUPPER "PCL_${_ss}_SUBSYS_STATUS" PCL_SUBSYS_SUBSYS_STATUS)
+	  foreach(_sub ${${PCL_SUBSYS_SUBSYS}})
+	    PCL_GET_SUBSUBSYS_STATUS(_sub_status ${_ss} ${_sub})
+	    if (_sub_status)
+              set(PCLCONFIG_AVAILABLE_COMPONENTS "${PCLCONFIG_AVAILABLE_COMPONENTS} ${_sub}")
+              set(PCLCONFIG_AVAILABLE_COMPONENTS_LIST "${PCLCONFIG_AVAILABLE_COMPONENTS_LIST}\n# - ${_sub}")
+	      GET_IN_MAP(_deps PCL_SUBSYS_DEPS ${_ss}_${sub})
+              if(_deps)
+		set(PCLCONFIG_INTERNAL_DEPENDENCIES "${PCLCONFIG_INTERNAL_DEPENDENCIES}set(pcl_${_sub}_int_dep ")
+		foreach(_dep ${_deps})
+                  set(PCLCONFIG_INTERNAL_DEPENDENCIES "${PCLCONFIG_INTERNAL_DEPENDENCIES}${_dep} ")
+		endforeach(_dep)
+		set(PCLCONFIG_INTERNAL_DEPENDENCIES "${PCLCONFIG_INTERNAL_DEPENDENCIES})\n")
+              endif(_deps)
+	    endif (_sub_status)
+	  endforeach(_sub)
+	endif (${PCL_SUBSYS_SUBSYS})
     endif(_status)
 endforeach(_ss)


spiffs: fix build issue on clean project

From issue:

I did some poking around in components/spiffs/project_include.cmake and
it looks like what is failing is it isn't getting an offset from
parttool.py. I think what the problem is that the parttool.py cannot
determine the offset of the storage partition as I can't run menuconfig
to set the custom partitions.

I have tested that this problem is solvable by manually setting the
custom partitions in sdkconfig and that is a workaround but there should
be at least a better error message in the configuration when it cannot
find the partition as this would also happen if the partition name was
misspelled.

Closes https://github.com/espressif/esp-idf/issues/4236

--- components/spiffs/project_include.cmake
+++ components/spiffs/project_include.cmake
@@ -15,40 +15,46 @@
     partition_table_get_partition_info(size "--partition-name ${partition}" "size")
     partition_table_get_partition_info(offset "--partition-name ${partition}" "offset")

-    set(image_file ${CMAKE_BINARY_DIR}/${partition}.bin)
+    if("${size}" AND "${offset}")
+        set(image_file ${CMAKE_BINARY_DIR}/${partition}.bin)

-    if(CONFIG_SPIFFS_USE_MAGIC)
-        set(use_magic "--use-magic")
-    endif()
+        if(CONFIG_SPIFFS_USE_MAGIC)
+            set(use_magic "--use-magic")
+        endif()

-    if(CONFIG_SPIFFS_USE_MAGIC_LENGTH)
-        set(use_magic_len "--use-magic-len")
-    endif()
+        if(CONFIG_SPIFFS_USE_MAGIC_LENGTH)
+            set(use_magic_len "--use-magic-len")
+        endif()

-    if(CONFIG_SPIFFS_FOLLOW_SYMLINKS)
-        set(follow_symlinks "--follow-symlinks")
-    endif()
+        if(CONFIG_SPIFFS_FOLLOW_SYMLINKS)
+            set(follow_symlinks "--follow-symlinks")
+        endif()

-    # Execute SPIFFS image generation; this always executes as there is no way to specify for CMake to watch for
-    # contents of the base dir changing.
-    add_custom_target(spiffs_${partition}_bin ALL
-        COMMAND ${spiffsgen_py} ${size} ${base_dir_full_path} ${image_file}
-        --page-size=${CONFIG_SPIFFS_PAGE_SIZE}
-        --obj-name-len=${CONFIG_SPIFFS_OBJ_NAME_LEN}
-        --meta-len=${CONFIG_SPIFFS_META_LENGTH}
-        ${follow_symlinks}
-        ${use_magic}
-        ${use_magic_len}
-        DEPENDS ${arg_DEPENDS}
-        )
+        # Execute SPIFFS image generation; this always executes as there is no way to specify for CMake to watch for
+        # contents of the base dir changing.
+        add_custom_target(spiffs_${partition}_bin ALL
+            COMMAND ${spiffsgen_py} ${size} ${base_dir_full_path} ${image_file}
+            --page-size=${CONFIG_SPIFFS_PAGE_SIZE}
+            --obj-name-len=${CONFIG_SPIFFS_OBJ_NAME_LEN}
+            --meta-len=${CONFIG_SPIFFS_META_LENGTH}
+            ${follow_symlinks}
+            ${use_magic}
+            ${use_magic_len}
+            DEPENDS ${arg_DEPENDS}
+            )

-    set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" APPEND PROPERTY
-        ADDITIONAL_MAKE_CLEAN_FILES
-        ${image_file})
+        set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" APPEND PROPERTY
+            ADDITIONAL_MAKE_CLEAN_FILES
+            ${image_file})

-    if(arg_FLASH_IN_PROJECT)
-        esptool_py_flash_project_args(${partition} ${offset} ${image_file} FLASH_IN_PROJECT)
+        if(arg_FLASH_IN_PROJECT)
+            esptool_py_flash_project_args("${partition}" "${offset}" "${image_file}" FLASH_IN_PROJECT)
+        else()
+            esptool_py_flash_project_args("${partition}" "${offset}" "${image_file}")
+        endif()
     else()
-        esptool_py_flash_project_args(${partition} ${offset} ${image_file})
+        set(message "Failed to create SPIFFS image for partition '${partition}'. "
+                    "Check project configuration if using the correct partition table file.")
+        fail_at_build_time(spiffs_${partition}_bin "${message}")
     endif()
 endfunction()


Add -Wconversion to Mac warnings

Add -Wconversion to Mac warnings

--- cmake/CMakemacosx64.cmake
+++ cmake/CMakemacosx64.cmake
@@ -1,3 +1,5 @@
+# -*- mode: cmake -*-
+
 #--------------------------------------------------------------------------------#
 # Package File for                                                               #
 # Author : Johny Jose (johny.jose@cern.ch)                                       #
@@ -57,7 +59,7 @@
 set ( CLIBCOPT )
 set ( CLIBFOPT  ${CLIBDEFS})

-set ( CXXWARN  "-Wall -Wno-long-long -W -Weffc++ -Wshadow -Woverloaded-virtual -ansi")
+set ( CXXWARN  "-Wall -Wconversion-Wno-long-long -W -Weffc++ -Wshadow -Woverloaded-virtual -ansi")

 set ( CXXSTF  "-pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -fno-default-inline -fno-inline -I/usr/X11R6/include -I${FINK_ROOT}/include")


Revert XLink to latest develop

Revert XLink to latest develop

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -8,8 +8,8 @@
 hunter_config(
     XLink
     VERSION "luxonis-2021.4-master"
-    URL "https://github.com/luxonis/XLink/archive/00b09dcdbb8ec66ee896090edcca009818a0dbe3.tar.gz"
-    SHA1 "afa6445f7e8cc16567891dadddb5d9aef399973e"
+    URL "https://github.com/luxonis/XLink/archive/8a2ea2741b70dc5179952ad52aa80e126240e852.tar.gz"
+    SHA1 "86c683f72092e4830b960cf5d7d3de079b1549e4"
 )

 hunter_config(


Squashed '3rdparty/github/cmake-utils/' changes from a66691a..3019a08

3019a08 MYPACKAGEPACK is reserved to the top-level

git-subtree-dir: 3rdparty/github/cmake-utils
git-subtree-split: 3019a08786555830fc52cdd1ea88f39c963a4978

--- cmake/MyPackagePack.cmake
+++ cmake/MyPackagePack.cmake
@@ -1,146 +1,150 @@
 MACRO (MYPACKAGEPACK VENDOR SUMMARY)
   #
-  # Set common CPack variables
+  # This should be executed only at the top-level
   #
-  IF (MYPACKAGE_DEBUG)
-    MESSAGE (STATUS "[${PROJECT_NAME}-BOOTSTRAP-DEBUG] Configuration CPack")
-  ENDIF ()
-  SET (CPACK_PACKAGE_NAME                "${PROJECT_NAME}")
-  SET (CPACK_PACKAGE_VENDOR              "${VENDOR}")
-  SET (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${SUMMARY}")
-  SET (CPACK_PACKAGE_VERSION             "${${PROJECT_NAME}_VERSION}")
-  SET (CPACK_PACKAGE_VERSION_MAJOR       "${${PROJECT_NAME}_VERSION_MAJOR}")
-  SET (CPACK_PACKAGE_VERSION_MINOR       "${${PROJECT_NAME}_VERSION_MINOR}")
-  SET (CPACK_PACKAGE_VERSION_PATCH       "${${PROJECT_NAME}_VERSION_PATCH}")
-  IF (EXISTS "${PROJECT_SOURCE_DIR}/LICENSE")
-    CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/LICENSE"  "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt")
-    SET (CPACK_RESOURCE_FILE_LICENSE     "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt")
-  ELSE ()
+  IF (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
+    #
+    # Set common CPack variables
+    #
     IF (MYPACKAGE_DEBUG)
-      MESSAGE (STATUS "[${PROJECT_NAME}-START-DEBUG] No LICENSE")
+      MESSAGE (STATUS "[${PROJECT_NAME}-BOOTSTRAP-DEBUG] Configuration CPack")
     ENDIF ()
-    SET (CPACK_RESOURCE_FILE_LICENSE)
-  ENDIF ()
-  #
-  # Enable component to all archive packaging types
-  #
-  SET (CPACK_ARCHIVE_COMPONENT_INSTALL TRUE)
-  #
-  # Get all components in one package
-  #
-  SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
-  #
-  # Do not get fooled by components out of our control
-  #
-  SET (CPACK_COMPONENTS_ALL ManpageComponent DynamicLibraryComponent StaticLibraryComponent HeaderComponent ApplicationComponent)
-  #
-  # Include CPack - from now on we will have access to CPACK own macros
-  #
-  INCLUDE (CPack)
-  #
-  # Install types
-  #
-  IF (_HAVE_HEADERCOMPONENT OR _HAVE_DYNAMICLIBRARYCOMPONENT OR _HAVE_STATICLIBRARYCOMPONENT OR _HAVE_APPLICATIONCOMPONENT OR _HAVE_MANPAGECOMPONENT)
-    SET (_CAN_FULLTYPE TRUE)
-  ELSE ()
-    SET (_CAN_FULLTYPE FALSE)
-  ENDIF ()
-  IF (_HAVE_HEADERCOMPONENT OR _HAVE_DYNAMICLIBRARYCOMPONENT OR _HAVE_STATICLIBRARYCOMPONENT)
-    SET (_CAN_DEVELOPMENTTYPE TRUE)
-  ELSE ()
-    SET (_CAN_DEVELOPMENTTYPE FALSE)
-  ENDIF ()
-  IF (_CAN_FULLTYPE)
-    CPACK_ADD_INSTALL_TYPE (FullType        DISPLAY_NAME "Full")
-  ENDIF ()
-  IF (_CAN_DEVELOPMENTTYPE)
-    CPACK_ADD_INSTALL_TYPE (DevelopmentType DISPLAY_NAME "Development")
-  ENDIF ()
-  #
-  # Groups
-  #
-  IF (_HAVE_HEADERCOMPONENT)
-    SET (_CAN_DEVELOPMENTGROUP TRUE)
-  ELSE ()
-    SET (_CAN_DEVELOPMENTGROUP FALSE)
-  ENDIF ()
-  IF (_HAVE_DYNAMICLIBRARYCOMPONENT OR _HAVE_STATICLIBRARYCOMPONENT)
-    SET (_CAN_DEVELOPMENTLIBRARYGROUP TRUE)
-  ELSE ()
-    SET (_CAN_DEVELOPMENTLIBRARYGROUP FALSE)
-  ENDIF ()
-  IF (_HAVE_MANPAGECOMPONENT)
-    SET (_CAN_DOCUMENTGROUP TRUE)
-  ELSE ()
-    SET (_CAN_DOCUMENTGROUP FALSE)
-  ENDIF ()
-  IF (_HAVE_APPLICATIONCOMPONENT)
-    SET (_CAN_RUNTIMEGROUP TRUE)
-  ELSE ()
-    SET (_CAN_RUNTIMEGROUP FALSE)
-  ENDIF ()
-  IF (_CAN_DEVELOPMENTGROUP)
-    CPACK_ADD_COMPONENT_GROUP (DevelopmentGroup        DISPLAY_NAME "Development" DESCRIPTION "Develoment files\n\nThis group contains libraries and headers"  EXPANDED)
-  ENDIF ()
-  IF (_CAN_DEVELOPMENTLIBRARYGROUP)
-    CPACK_ADD_COMPONENT_GROUP (DevelopmentLibraryGroup DISPLAY_NAME "Libraries"   DESCRIPTION "Library files\n\nBoth static and dynamic version are provided" PARENT_GROUP DevelopmentGroup)
-  ENDIF ()
-  IF (_CAN_DOCUMENTGROUP)
-    CPACK_ADD_COMPONENT_GROUP (DocumentGroup           DISPLAY_NAME "Documents"   DESCRIPTION "Document files\n\nThis group contains all the provided documentation" EXPANDED)
-  ENDIF ()
-  IF (_CAN_RUNTIMEGROUP)
-    CPACK_ADD_COMPONENT_GROUP (RuntimeGroup            DISPLAY_NAME "Runtime"     DESCRIPTION "Runtime applications"  EXPANDED)
-  ENDIF ()
-  #
-  # Components
-  #
-  IF (_HAVE_MANPAGECOMPONENT)
-    CPACK_ADD_COMPONENT(ManpageComponent
-                        DISPLAY_NAME "Man pages"
-                        DESCRIPTION "Documentation in the man format\n\nUseful on all platforms but Windows, in general"
-                        GROUP DocumentGroup
-                        INSTALL_TYPES FullType)
-  ENDIF ()
-  IF (_HAVE_DYNAMICLIBRARYCOMPONENT)
-    CPACK_ADD_COMPONENT(DynamicLibraryComponent
-                        DISPLAY_NAME "Dynamic"
-                        DESCRIPTION "Dynamic Libraries\n\nNecessary almost anytime"
-                        GROUP DevelopmentLibraryGroup
-                        INSTALL_TYPES FullType DevelopmentType)
-  ENDIF ()
-  IF (_HAVE_STATICLIBRARYCOMPONENT)
-    CPACK_ADD_COMPONENT(StaticLibraryComponent
-                        DISPLAY_NAME "Static"
-                        DESCRIPTION "Static Libraries\n\nOnly programmers would eventually need that"
-                        GROUP DevelopmentLibraryGroup
-                        INSTALL_TYPES FullType DevelopmentType)
-  ENDIF ()
-  IF (_HAVE_HEADERCOMPONENT)
-    CPACK_ADD_COMPONENT(HeaderComponent
-                        DISPLAY_NAME "Headers"
-                        DESCRIPTION "C/C++ Headers\n\nProgrammers will need these files"
-                        GROUP DevelopmentGroup
-                        INSTALL_TYPES FullType DevelopmentType)
-  ENDIF ()
-  IF (_HAVE_APPLICATIONCOMPONENT)
-    CPACK_ADD_COMPONENT(ApplicationComponent
-                        DISPLAY_NAME "Applications"
-                        DESCRIPTION "Executables"
-                        GROUP RuntimeGroup
-                        INSTALL_TYPES FullType
-                        DEPENDS DynamicLibraryComponent)
-  ENDIF ()
-  #
-  # Quite subtil, but the "package" target is not visible at this time. There is a old standing bug
-  # in CMake about this.
-  # We use a custom target for package generation.
-  # In addition documentation is generated using the INSTALL(CODE xxx) hack.
-  #
-  ADD_CUSTOM_TARGET(pack
-    COMMAND ${CMAKE_MAKE_PROGRAM} package
-    COMMENT "Packaging Source files"
-    DEPENDS man
-    VERBATIM
+    SET (CPACK_PACKAGE_NAME                "${PROJECT_NAME}")
+    SET (CPACK_PACKAGE_VENDOR              "${VENDOR}")
+    SET (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${SUMMARY}")
+    SET (CPACK_PACKAGE_VERSION             "${${PROJECT_NAME}_VERSION}")
+    SET (CPACK_PACKAGE_VERSION_MAJOR       "${${PROJECT_NAME}_VERSION_MAJOR}")
+    SET (CPACK_PACKAGE_VERSION_MINOR       "${${PROJECT_NAME}_VERSION_MINOR}")
+    SET (CPACK_PACKAGE_VERSION_PATCH       "${${PROJECT_NAME}_VERSION_PATCH}")
+    IF (EXISTS "${PROJECT_SOURCE_DIR}/LICENSE")
+      CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/LICENSE"  "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt")
+      SET (CPACK_RESOURCE_FILE_LICENSE     "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt")
+    ELSE ()
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-START-DEBUG] No LICENSE")
+      ENDIF ()
+      SET (CPACK_RESOURCE_FILE_LICENSE)
+    ENDIF ()
+    #
+    # Enable component to all archive packaging types
+    #
+    SET (CPACK_ARCHIVE_COMPONENT_INSTALL TRUE)
+    #
+    # Get all components in one package
+    #
+    SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
+    #
+    # Do not get fooled by components out of our control
+    #
+    SET (CPACK_COMPONENTS_ALL ManpageComponent DynamicLibraryComponent StaticLibraryComponent HeaderComponent ApplicationComponent)
+    #
+    # Include CPack - from now on we will have access to CPACK own macros
+    #
+    INCLUDE (CPack)
+    #
+    # Install types
+    #
+    IF (_HAVE_HEADERCOMPONENT OR _HAVE_DYNAMICLIBRARYCOMPONENT OR _HAVE_STATICLIBRARYCOMPONENT OR _HAVE_APPLICATIONCOMPONENT OR _HAVE_MANPAGECOMPONENT)
+      SET (_CAN_FULLTYPE TRUE)
+    ELSE ()
+      SET (_CAN_FULLTYPE FALSE)
+    ENDIF ()
+    IF (_HAVE_HEADERCOMPONENT OR _HAVE_DYNAMICLIBRARYCOMPONENT OR _HAVE_STATICLIBRARYCOMPONENT)
+      SET (_CAN_DEVELOPMENTTYPE TRUE)
+    ELSE ()
+      SET (_CAN_DEVELOPMENTTYPE FALSE)
+    ENDIF ()
+    IF (_CAN_FULLTYPE)
+      CPACK_ADD_INSTALL_TYPE (FullType        DISPLAY_NAME "Full")
+    ENDIF ()
+    IF (_CAN_DEVELOPMENTTYPE)
+      CPACK_ADD_INSTALL_TYPE (DevelopmentType DISPLAY_NAME "Development")
+    ENDIF ()
+    #
+    # Groups
+    #
+    IF (_HAVE_HEADERCOMPONENT)
+      SET (_CAN_DEVELOPMENTGROUP TRUE)
+    ELSE ()
+      SET (_CAN_DEVELOPMENTGROUP FALSE)
+    ENDIF ()
+    IF (_HAVE_DYNAMICLIBRARYCOMPONENT OR _HAVE_STATICLIBRARYCOMPONENT)
+      SET (_CAN_DEVELOPMENTLIBRARYGROUP TRUE)
+    ELSE ()
+      SET (_CAN_DEVELOPMENTLIBRARYGROUP FALSE)
+    ENDIF ()
+    IF (_HAVE_MANPAGECOMPONENT)
+      SET (_CAN_DOCUMENTGROUP TRUE)
+    ELSE ()
+      SET (_CAN_DOCUMENTGROUP FALSE)
+    ENDIF ()
+    IF (_HAVE_APPLICATIONCOMPONENT)
+      SET (_CAN_RUNTIMEGROUP TRUE)
+    ELSE ()
+      SET (_CAN_RUNTIMEGROUP FALSE)
+    ENDIF ()
+    IF (_CAN_DEVELOPMENTGROUP)
+      CPACK_ADD_COMPONENT_GROUP (DevelopmentGroup        DISPLAY_NAME "Development" DESCRIPTION "Develoment files\n\nThis group contains libraries and headers"  EXPANDED)
+    ENDIF ()
+    IF (_CAN_DEVELOPMENTLIBRARYGROUP)
+      CPACK_ADD_COMPONENT_GROUP (DevelopmentLibraryGroup DISPLAY_NAME "Libraries"   DESCRIPTION "Library files\n\nBoth static and dynamic version are provided" PARENT_GROUP DevelopmentGroup)
+    ENDIF ()
+    IF (_CAN_DOCUMENTGROUP)
+      CPACK_ADD_COMPONENT_GROUP (DocumentGroup           DISPLAY_NAME "Documents"   DESCRIPTION "Document files\n\nThis group contains all the provided documentation" EXPANDED)
+    ENDIF ()
+    IF (_CAN_RUNTIMEGROUP)
+      CPACK_ADD_COMPONENT_GROUP (RuntimeGroup            DISPLAY_NAME "Runtime"     DESCRIPTION "Runtime applications"  EXPANDED)
+    ENDIF ()
+    #
+    # Components
+    #
+    IF (_HAVE_MANPAGECOMPONENT)
+      CPACK_ADD_COMPONENT(ManpageComponent
+                          DISPLAY_NAME "Man pages"
+                          DESCRIPTION "Documentation in the man format\n\nUseful on all platforms but Windows, in general"
+                          GROUP DocumentGroup
+                          INSTALL_TYPES FullType)
+    ENDIF ()
+    IF (_HAVE_DYNAMICLIBRARYCOMPONENT)
+      CPACK_ADD_COMPONENT(DynamicLibraryComponent
+                          DISPLAY_NAME "Dynamic"
+                          DESCRIPTION "Dynamic Libraries\n\nNecessary almost anytime"
+                          GROUP DevelopmentLibraryGroup
+                          INSTALL_TYPES FullType DevelopmentType)
+    ENDIF ()
+    IF (_HAVE_STATICLIBRARYCOMPONENT)
+      CPACK_ADD_COMPONENT(StaticLibraryComponent
+                          DISPLAY_NAME "Static"
+                          DESCRIPTION "Static Libraries\n\nOnly programmers would eventually need that"
+                          GROUP DevelopmentLibraryGroup
+                          INSTALL_TYPES FullType DevelopmentType)
+    ENDIF ()
+    IF (_HAVE_HEADERCOMPONENT)
+      CPACK_ADD_COMPONENT(HeaderComponent
+                          DISPLAY_NAME "Headers"
+                          DESCRIPTION "C/C++ Headers\n\nProgrammers will need these files"
+                          GROUP DevelopmentGroup
+                          INSTALL_TYPES FullType DevelopmentType)
+    ENDIF ()
+    IF (_HAVE_APPLICATIONCOMPONENT)
+      CPACK_ADD_COMPONENT(ApplicationComponent
+                          DISPLAY_NAME "Applications"
+                          DESCRIPTION "Executables"
+                          GROUP RuntimeGroup
+                          INSTALL_TYPES FullType
+                          DEPENDS DynamicLibraryComponent)
+    ENDIF ()
+    #
+    # Quite subtil, but the "package" target is not visible at this time. There is a old standing bug
+    # in CMake about this.
+    # We use a custom target for package generation.
+    # In addition documentation is generated using the INSTALL(CODE xxx) hack.
+    #
+    ADD_CUSTOM_TARGET(pack
+      COMMAND ${CMAKE_MAKE_PROGRAM} package
+      COMMENT "Packaging ${PROJECT_NAME}"
+      DEPENDS man
+      VERBATIM
     )
-
+  ENDIF ()
 ENDMACRO()


Applied patch for IPP linking under MinGW (thanks to Philippe FOUBERT) #1906

--- cmake/OpenCVFindIPP.cmake
+++ cmake/OpenCVFindIPP.cmake
@@ -220,45 +220,40 @@
 endfunction()

-    # ------------------------------------------------------------------------
-    # This section will look for IPP through IPPROOT env variable
-    # Note, IPPROOT is not set by IPP installer, you may need to set it manually
-    # ------------------------------------------------------------------------
-    find_path(
-        IPP_H_PATH
-        NAMES ippversion.h
-        PATHS $ENV{IPPROOT}
-        PATH_SUFFIXES include
-        DOC "The path to Intel(R) IPP header files"
-        NO_DEFAULT_PATH
-        NO_CMAKE_PATH)
-
-    if(IPP_H_PATH)
-
-        set(IPP_FOUND 1)
-
-        # traverse up to IPPROOT level
-        get_filename_component(IPP_ROOT_DIR ${IPP_H_PATH} PATH)
-
-        # extract IPP version info
-        get_ipp_version(${IPP_ROOT_DIR})
-
-        # keep info in the same vars for auto search and search by IPPROOT
-        set(IPP_LATEST_VERSION_STR   ${IPP_VERSION_STR})
-        set(IPP_LATEST_VERSION_MAJOR ${IPP_VERSION_MAJOR})
-        set(IPP_LATEST_VERSION_MINOR ${IPP_VERSION_MINOR})
-        set(IPP_LATEST_VERSION_BUILD ${IPP_VERSION_BUILD})
-
-        # set IPP INCLUDE, LIB dirs and library names
-        set_ipp_variables(${IPP_LATEST_VERSION_STR})
-
-    endif()
-
-
-    if(IPP_FOUND)
-        return()
-    endif()
-
+# ------------------------------------------------------------------------
+# This section will look for IPP through IPPROOT env variable
+# Note, IPPROOT is not set by IPP installer, you may need to set it manually
+# ------------------------------------------------------------------------
+find_path(
+    IPP_H_PATH
+    NAMES ippversion.h
+    PATHS $ENV{IPPROOT}
+    PATH_SUFFIXES include
+    DOC "The path to Intel(R) IPP header files"
+    NO_DEFAULT_PATH
+    NO_CMAKE_PATH)
+
+if(IPP_H_PATH)
+    set(IPP_FOUND 1)
+
+    # traverse up to IPPROOT level
+    get_filename_component(IPP_ROOT_DIR ${IPP_H_PATH} PATH)
+
+    # extract IPP version info
+    get_ipp_version(${IPP_ROOT_DIR})
+
+    # keep info in the same vars for auto search and search by IPPROOT
+    set(IPP_LATEST_VERSION_STR   ${IPP_VERSION_STR})
+    set(IPP_LATEST_VERSION_MAJOR ${IPP_VERSION_MAJOR})
+    set(IPP_LATEST_VERSION_MINOR ${IPP_VERSION_MINOR})
+    set(IPP_LATEST_VERSION_BUILD ${IPP_VERSION_BUILD})
+
+    # set IPP INCLUDE, LIB dirs and library names
+    set_ipp_variables(${IPP_LATEST_VERSION_STR})
+endif()
+
+
+if(NOT IPP_FOUND)
     # reset var from previous search
     set(IPP_H_PATH)

@@ -304,19 +299,38 @@
             endforeach()
         endif()
     endforeach()
-
-    if(IPP_FOUND)
-        # set IPP INCLUDE, LIB dirs and library names
-        set_ipp_variables(${IPP_LATEST_VERSION_STR})
-
-        # set CACHE variable IPP_H_PATH,
-        # path to IPP header files for the latest version
-        find_path(
-            IPP_H_PATH
-            NAMES ippversion.h
-            PATHS ${IPP_ROOT_DIR}
-            PATH_SUFFIXES include
-            DOC "The path to Intel(R) IPP header files"
-            NO_DEFAULT_PATH
-            NO_CMAKE_PATH)
-    endif()
+endif()
+
+if(IPP_FOUND)
+    # set IPP INCLUDE, LIB dirs and library names
+    set_ipp_variables(${IPP_LATEST_VERSION_STR})
+
+    # set CACHE variable IPP_H_PATH,
+    # path to IPP header files for the latest version
+    find_path(
+        IPP_H_PATH
+        NAMES ippversion.h
+        PATHS ${IPP_ROOT_DIR}
+        PATH_SUFFIXES include
+        DOC "The path to Intel(R) IPP header files"
+        NO_DEFAULT_PATH
+        NO_CMAKE_PATH)
+endif()
+
+if(WIN32 AND MINGW AND NOT IPP_LATEST_VERSION_MAJOR LESS 7)
+    # Since IPP built with Microsoft compiler and /GS option
+    # ======================================================
+    # From Windows SDK 7.1
+    #   (usually in "C:\Program Files\Microsoft Visual Studio 10.0\VC\lib"),
+    # to avoid undefined reference to __security_cookie and _chkstk:
+    set(MSV_RUNTMCHK "RunTmChk")
+    set(IPP_LIBRARIES ${IPP_LIBRARIES} ${MSV_RUNTMCHK}${IPP_LIB_SUFFIX})
+
+    # To avoid undefined reference to _alldiv and _chkstk
+    # ===================================================
+    # NB: it may require a recompilation of w32api (after having modified
+    #     the file ntdll.def) to export the required functions
+    #     See http://code.opencv.org/issues/1906 for additional details
+    set(MSV_NTDLL    "ntdll")
+    set(IPP_LIBRARIES ${IPP_LIBRARIES} ${MSV_NTDLL}${IPP_LIB_SUFFIX})
+endif()


Fix missing ENDIF() in ZincPackaging.cmake.  https://tracker.physiomeproject.org/show_bug.cgi?id=3726

git-svn-id: b9baf8c2d14a71b3ba9c27a102eb6e792fc13348@11048 3c1deb5b-d424-0410-962d-aba41a686d42

--- cmake/ZincPackaging.cmake
+++ cmake/ZincPackaging.cmake
@@ -14,6 +14,7 @@
         SET(ZINC_ARCHITECTURE x86)
     ELSE()
         SET(ZINC_ARCHITECTURE amd64)
+    ENDIF()
 ENDIF()

 FUNCTION( GET_ZINC_SYSTEM_NAME RETURN_SYSTEM_NAME )


Improve QtDeclarative detection.

Improve QtDeclarative detection.

--- cmake/externals/dtk.cmake
+++ cmake/externals/dtk.cmake
@@ -23,7 +23,7 @@

     include(CheckIncludeFileCXX)
     set(CMAKE_REQUIRED_INCLUDES ${QT_INCLUDES})
-    Check_Include_File_CXX(QtDeclarative/QtDeclarative HasQtDeclarative)
+    Check_Include_File_CXX(QtDeclarative HasQtDeclarative)

     set(DISABLE_DTK_COMPOSER)
     if (NOT HasQtDeclarative)


Enable the generate_plplot_h.inc target by default since that target is
only run at user option in any case.

svn path=/trunk/; revision=11496

--- cmake/modules/ocaml.cmake
+++ cmake/modules/ocaml.cmake
@@ -128,7 +128,7 @@
 endif(ENABLE_ocaml)

 if(ENABLE_ocaml)
-  option(GENERATE_PLPLOT_H_INC "Generate generated_plplot_h.inc" OFF)
+  option(GENERATE_PLPLOT_H_INC "Generate generated_plplot_h.inc" ON)

   if(GENERATE_PLPLOT_H_INC)
     find_program(OCAML ocaml)


qibuild/test: fixes on windows

qibuild/test: fixes on windows

--- cmake/qibuild/tests.cmake
+++ cmake/qibuild/tests.cmake
@@ -22,13 +22,13 @@
     set(ARG_TIMEOUT 20)
   endif()

-  if(MSVC)
+  if(MSVC_IDE)
     set(_bin_path ${QI_SDK_DIR}/${target_name})
   else()
     set(_bin_path ${QI_SDK_DIR}/${QI_SDK_BIN}/${target_name})
   endif()

-  if(MSVC AND ${CMAKE_BUILD_TYPE} STREQUAL "DEBUG")
+  if(WIN32 AND "${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")
     set(_bin_path ${_bin_path}_d)
   endif()


Fix doc

Fix doc

Change-Id: I23c5c5d5636016185d5a0ed13dc807cbe8a50e27
Reviewed-on: http://gerrit.aldebaran.lan:8080/6449
Reviewed-by: ncornu <13ba26b8f12d26c819f48749c65f2f7f5c1d13db@aldebaran-robotics.com>
Tested-by: ncornu <13ba26b8f12d26c819f48749c65f2f7f5c1d13db@aldebaran-robotics.com>

--- cmake/qibuild/tests.cmake
+++ cmake/qibuild/tests.cmake
@@ -76,7 +76,7 @@
 # \argn: source files, like the SRC group, argn and SRC will be merged
 # \param:TIMEOUT The timeout of the test
 # \group:SRC Sources
-# \group:DEPENDS Dependencies to pass to use_lib
+# \group:DEPENDS Dependencies to pass to qi_use_lib
 # \group:ARGUMENTS Arguments to pass to add_test (to your test program)
 #
 function(qi_create_gtest name)


add python executable

add python executable

--- cmake/rosruby-macro.cmake
+++ cmake/rosruby-macro.cmake
@@ -18,7 +18,8 @@

 macro(rosruby_generate_messages)
   add_custom_target(rosruby_genmsg_for_${PROJECT_NAME} ALL
-    COMMAND ${CATKIN_ENV} ${ROSRUBY_GENMSG_DIR}/rosruby_genmsg.py ${ARGN}
+    COMMAND ${CATKIN_ENV} ${PYTHON_EXECUTABLE}
+    ${ROSRUBY_GENMSG_DIR}/rosruby_genmsg.py ${ARGN}
     -d ${ROSRUBY_DEVEL_LIB_DESTINATION}
     )
   foreach(package ${ARGN})


[WIN] Fix a bug in find_llvm when specify llvm-config (#2758)

--- cmake/util/FindLLVM.cmake
+++ cmake/util/FindLLVM.cmake
@@ -37,8 +37,9 @@
     execute_process(COMMAND ${LLVM_CONFIG} --cxxflags
       OUTPUT_VARIABLE __llvm_cxxflags)
     execute_process(COMMAND ${LLVM_CONFIG} --version
-      COMMAND cut -b 1,3
-      OUTPUT_VARIABLE TVM_LLVM_VERSION)
+      OUTPUT_VARIABLE __llvm_version)
+    # llvm version
+    string(REGEX REPLACE "^([^.]+)\.([^.])+\.[^.]+.*$" "\\1\\2" TVM_LLVM_VERSION ${__llvm_version})
     # definitions
     string(REGEX MATCHALL "(^| )-D[A-Za-z0-9_]*" LLVM_DEFINITIONS ${__llvm_cxxflags})
     # include dir


fix a bug in FindGlog.cmake

fix a bug in FindGlog.cmake

Summary:
Call `find_package_handle_standard_args()` with a package name of `Glog`
rather than `glog`, so that it sets `Glog_FOUND` rather than `glog_FOUND`.
This argument needs to match the case of our file name (FindGlog.cmake), since
CMake variables are case-sensitive.

Reviewed By: Orvid

Differential Revision: D36678745

fbshipit-source-id: 6a0578103d12684e414664b17f7880664c0141f4

--- build/fbcode_builder/CMake/FindGlog.cmake
+++ build/fbcode_builder/CMake/FindGlog.cmake
@@ -19,7 +19,7 @@

 select_library_configurations(GLOG)

-find_package_handle_standard_args(glog DEFAULT_MSG
+find_package_handle_standard_args(Glog DEFAULT_MSG
   GLOG_LIBRARY
   GLOG_INCLUDE_DIR)


Adding support for QNX6.6

Adding support for QNX6.6

--- cmake-toolchain/qnx.cmake
+++ cmake-toolchain/qnx.cmake
@@ -1,24 +0,0 @@
-SET(CMAKE_SYSTEM_NAME QNX)
-SET(CMAKE_SYSTEM_VERSION 700)
-SET(arch armv7)
-
-SET(QNX_HOST ${QNX_BASE}/host/linux/x86_64)
-SET(QNX_TARGET ${QNX_BASE}/target/qnx7)
-
-SET(CMAKE_MAKE_PROGRAM "${QNX_HOST}/usr/bin/make"   CACHE PATH "QNX make Program")
-SET(CMAKE_SH           "${QNX_HOST}/usr/bin/sh"     CACHE PATH "QNX shell Program")
-SET(CMAKE_AR           "${QNX_HOST}/usr/bin/nto${arch}-ar"        CACHE PATH "QNX ar Program")
-SET(CMAKE_RANLIB       "${QNX_HOST}/usr/bin/nto${arch}-ranlib"    CACHE PATH "QNX ranlib Program")
-SET(CMAKE_NM           "${QNX_HOST}/usr/bin/nto${arch}-nm"        CACHE PATH "QNX nm Program")
-SET(CMAKE_OBJCOPY      "${QNX_HOST}/usr/bin/nto${arch}-objcopy"   CACHE PATH "QNX objcopy Program")
-SET(CMAKE_OBJDUMP      "${QNX_HOST}/usr/bin/nto${arch}-objdump"   CACHE PATH "QNX objdump Program")
-SET(CMAKE_LINKER       "${QNX_HOST}/usr/bin/nto${arch}-ld"        CACHE PATH "QNX linker Program")
-SET(CMAKE_STRIP        "${QNX_HOST}/usr/bin/nto${arch}-strip"     CACHE PATH "QNX strip Program")
-
-SET(CMAKE_C_COMPILER    ${QNX_HOST}/usr/bin/nto${arch}-gcc)
-SET(CMAKE_CXX_COMPILER  ${QNX_HOST}/usr/bin/nto${arch}-g++)
-
-SET(CMAKE_FIND_ROOT_PATH ${QNX_TARGET})
-SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)


Try enabling the "bundle" for Win installers

Signed-off-by: Geoff Hutchison <9cf35bacc9f8512ca007341c9e919cf5dc03e0c7@gmail.com>

--- cmake/AvogadroCPack.cmake
+++ cmake/AvogadroCPack.cmake
@@ -29,7 +29,7 @@

 # Should we add extra install rules to make a self-contained bundle, this is
 # usually only required when attempting to create self-contained installers.
-if(APPLE)
+if(APPLE OR WIN32)
   set(INSTALL_BUNDLE_FILES ON)
 else()
   option(INSTALL_BUNDLE_FILES "Add install rules to bundle files" OFF)


Enable BMI instructions when we enable AVX with GCC and Clang.

--- cmake/CMakeCompiler.cmake
+++ cmake/CMakeCompiler.cmake
@@ -33,6 +33,7 @@
 		if(CPU_INSTRUCTION_SET MATCHES "x86" OR CPU_INSTRUCTION_SET MATCHES "x64")
 			if(USE_AVX_INSTRUCTIONS)
 				target_compile_options(${_project_name} PRIVATE "-mavx")
+                target_compile_options(${_project_name} PRIVATE "-mbmi")
 			else()
 				target_compile_options(${_project_name} PRIVATE "-msse4.1")
 			endif()


GCC 4.2 on Mac does not support -std=c++03

Added a test to verify the compiler supports the flag, in addition the
compiler does not support -isystem and pedantic fails on some Mongo client
headers. Enclosing that flag in the same block for now, along with others
that cause many warnings for included headers.

Change-Id: I552034d0cd9ec0c95d0917da2e42002c88c02451

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -3,13 +3,19 @@
   include(CheckCXXCompilerFlag)

   # Addtional warnings for GCC
-  set(CMAKE_CXX_FLAGS_WARN "-Wnon-virtual-dtor -Wno-long-long -std=c++03 -pedantic -Wcast-align -Wchar-subscripts -Wall -Wextra -Wpointer-arith -Wformat-security -Woverloaded-virtual -Wshadow -Wunused-parameter -fno-check-new -fno-common")
+  set(CMAKE_CXX_FLAGS_WARN "-Wnon-virtual-dtor -Wno-long-long -Wcast-align -Wchar-subscripts -Wall -Wpointer-arith -Wformat-security -Woverloaded-virtual -fno-check-new -fno-common")

   # This flag is useful as not returning from a non-void function is an error
   # with MSVC, but it is not supported on all GCC compiler versions
-  check_cxx_compiler_flag(-Werror=return-type HAVE_GCC_ERROR_RETURN_TYPE)
+  check_cxx_compiler_flag("-Werror=return-type" HAVE_GCC_ERROR_RETURN_TYPE)
   if(HAVE_GCC_ERROR_RETURN_TYPE)
     set(CMAKE_CXX_FLAGS_ERROR "-Werror=return-type")
+  endif()
+  check_cxx_compiler_flag("-std=c++03" HAVE_GCC_STD_CPP_03)
+  if(HAVE_GCC_STD_CPP_03)
+    set(CMAKE_CXX_FLAGS_STD_CPP "-std=c++03 -pedantic -Wshadow -Wextra")
+  else()
+    set(CMAKE_CXX_FLAGS_STD_CPP "-ansi")
   endif()

   # If we are compiling on Linux then set some extra linker flags too
@@ -22,6 +28,7 @@
       "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_EXE_LINKER_FLAGS}")
   endif()

+  set(CMAKE_CXX_FLAGS_WARN "${CMAKE_CXX_FLAGS_WARN} ${CMAKE_CXX_FLAGS_STD_CPP}")
   # Set up the debug CXX_FLAGS for extra warnings
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
     "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${CMAKE_CXX_FLAGS_WARN}")


Define FREEIMAGE_LIBRARIES.

Define FREEIMAGE_LIBRARIES.

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

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

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


remove references to specific ROS versions

--- cmake/rosbuild_lite.cmake
+++ cmake/rosbuild_lite.cmake
@@ -55,13 +55,9 @@

 macro( rosbuild_lite_init )
-  set(ROS_ROOT_DEFAULT /opt/ros/electric/ros CACHE PATH "The default ROS_ROOT")
-  set(ROS_PACKAGE_PATH_DEFAULT /opt/ros/electric/stacks CACHE PATH "The default ROS_PACKAGE_PATH")
-
   if (NOT ROS_ROOT)
     if ("$ENV{ROS_ROOT}" STREQUAL "")
-      message(STATUS "*** ROS_ROOT is not set... is your environment set correctly? Setting to default: ${ROS_ROOT_DEFAULT}")
-      set(ROS_ROOT ${ROS_ROOT_DEFAULT} CACHE PATH  "ROS_ROOT path")
+      message(FATAL_ERROR "*** ROS_ROOT is not set... is your environment set correctly?")
     else()
       set(ROS_ROOT "$ENV{ROS_ROOT}" CACHE PATH  "ROS_ROOT path")
     endif()
@@ -69,15 +65,14 @@

   if (NOT ROS_PACKAGE_PATH)
     if ("$ENV{ROS_PACKAGE_PATH}" STREQUAL "")
-      message(STATUS "*** ROS_PACKAGE_PATH is not set... is your environment set correctly? Setting to default: ${ROS_PACKAGE_PATH_DEFAULT}")
-      set(ROS_PACKAGE_PATH ${ROS_PACKAGE_PATH_DEFAULT} CACHE PATH "ROS_PACKAGE_PATH path")
+      message(FATAL_ERROR "*** ROS_PACKAGE_PATH is not set... is your environment set correctly?")
     else()
       set(ROS_PACKAGE_PATH "$ENV{ROS_PACKAGE_PATH}" CACHE PATH "ROS_PACKAGE_PATH path")
     endif()
   endif()

-  find_program(ROSPACK_EXECUTABLE rospack PATHS ${ROS_ROOT}/bin /opt/ros/fuerte/bin DOC "the rospack executable." NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_ENVIRONMENT_PATH)
-  find_program(ROSMSG_EXECUTABLE rosmsg PATHS ${ROS_ROOT}/bin /opt/ros/fuerte/bin DOC "rosmsg executable" NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_ENVIRONMENT_PATH)
+  find_program(ROSPACK_EXECUTABLE rospack PATHS ${ROS_ROOT}/bin DOC "the rospack executable." NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_ENVIRONMENT_PATH)
+  find_program(ROSMSG_EXECUTABLE rosmsg PATHS ${ROS_ROOT}/bin DOC "rosmsg executable" NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_ENVIRONMENT_PATH)

   if (ROSPACK_EXECUTABLE)
     set(ROS_FOUND TRUE)


have the supperbuild use its own source instead of locking in a version

--- superbuild/versions.cmake
+++ superbuild/versions.cmake
@@ -83,9 +83,7 @@
   GIT_REPOSITORY git://source.openchemistry.org/molequeue.git
   GIT_TAG e545ee25b4b79d5bae9e1)

-add_revision(nuclearRGG
-  GIT_REPOSITORY https://github.com/Kitware/RGG
-  GIT_TAG 4a3bc58d02cf92d8b582154ddcae32e9d1117a5d)
+add_revision( nuclearRGG SOURCE_DIR ${CMAKE_SOURCE_DIR}/.. )

 add_revision(vtk
   GIT_REPOSITORY git://vtk.org/VTK.git


fix compilation

fix compilation

--- CMake/Packages/FindCEGUI.cmake
+++ CMake/Packages/FindCEGUI.cmake
@@ -134,7 +134,7 @@
 ${CEGUI_TOLUA_LIBRARY_OPTIMIZED}
 )

-add_parent_dir(CEGUI_INCLUDE_DIR CEGUI_INCLUDE_DIR)
+GET_FILENAME_COMPONENT(CEGUI_INCLUDE_DIR "${CEGUI_INCLUDE_DIR}" PATH)

 set(CEGUI_INCLUDE_DIR
 "${CEGUI_BUILD}Library/Cegui/cegui/include"


Changed tabs to four spaces to avoid different editors rendering the indentation differently

--- CMakeModules/FindCOLLADA.cmake
+++ CMakeModules/FindCOLLADA.cmake
@@ -29,7 +29,7 @@
 ELSEIF(MINGW)
     SET(COLLADA_BUILDNAME "mingw")
 ELSEIF(MSVC14)
-    SET(COLLADA_BUILDNAME "vc14")
+    SET(COLLADA_BUILDNAME "vc14")
 ELSEIF(MSVC12)
     SET(COLLADA_BUILDNAME "vc12")
 ELSEIF(MSVC11)
@@ -186,16 +186,16 @@

     FIND_PACKAGE(ZLIB)
     IF (ZLIB_FOUND)
-		IF (ZLIB_LIBRARY_RELEASE)
-        	SET(COLLADA_ZLIB_LIBRARY "${ZLIB_LIBRARY_RELEASE}" CACHE FILEPATH "" FORCE)
-		ELSE(ZLIB_LIBRARY_RELEASE)
-        	SET(COLLADA_ZLIB_LIBRARY "${ZLIB_LIBRARY}" CACHE FILEPATH "" FORCE)
-		ENDIF(ZLIB_LIBRARY_RELEASE)
-		IF (ZLIB_LIBRARY_DEBUG)
-        	SET(COLLADA_ZLIB_LIBRARY_DEBUG "${ZLIB_LIBRARY_DEBUG}" CACHE FILEPATH "" FORCE)
-		ELSE(ZLIB_LIBRARY_DEBUG)
-        	SET(COLLADA_ZLIB_LIBRARY_DEBUG "${COLLADA_ZLIB_LIBRARY}" CACHE FILEPATH "" FORCE)
-		ENDIF(ZLIB_LIBRARY_DEBUG)
+        IF (ZLIB_LIBRARY_RELEASE)
+            SET(COLLADA_ZLIB_LIBRARY "${ZLIB_LIBRARY_RELEASE}" CACHE FILEPATH "" FORCE)
+        ELSE(ZLIB_LIBRARY_RELEASE)
+            SET(COLLADA_ZLIB_LIBRARY "${ZLIB_LIBRARY}" CACHE FILEPATH "" FORCE)
+        ENDIF(ZLIB_LIBRARY_RELEASE)
+        IF (ZLIB_LIBRARY_DEBUG)
+            SET(COLLADA_ZLIB_LIBRARY_DEBUG "${ZLIB_LIBRARY_DEBUG}" CACHE FILEPATH "" FORCE)
+        ELSE(ZLIB_LIBRARY_DEBUG)
+            SET(COLLADA_ZLIB_LIBRARY_DEBUG "${COLLADA_ZLIB_LIBRARY}" CACHE FILEPATH "" FORCE)
+        ENDIF(ZLIB_LIBRARY_DEBUG)
     ELSE(ZLIB_FOUND)
         IF(WIN32)
             FIND_LIBRARY(COLLADA_ZLIB_LIBRARY


Add a comment.

Add a comment.

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

--- deal.II/cmake/modules/FindUMFPACK.cmake
+++ deal.II/cmake/modules/FindUMFPACK.cmake
@@ -128,7 +128,10 @@
     )

   #
-  # Add rt to the link interface as well:
+  # Add rt to the link interface as well (for whatever reason,
+  # libsuitesparse.so depends on clock_gettime but the shared
+  # lib does not record its dependence on librt.so as evidenced
+  # by ldd :-( ):
   #
   FIND_LIBRARY(rt_lib NAMES rt)
   MARK_AS_ADVANCED(rt_lib)
@@ -167,4 +170,3 @@
     "An optional hint to a SUITESPARSE directory"
     )
 ENDIF()
-


Fix IF block warning

Fix IF block warning

--- test/openVibeTests.cmake
+++ test/openVibeTests.cmake
@@ -21,7 +21,7 @@

 IF(NOT DEFINED CTEST_GIT_URL)
 	SET(CTEST_GIT_URL                          "git://scm.gforge.inria.fr/openvibe/openvibe.git")
-ENDIF(NOT DEFINED CTEST_BRANCH)
+ENDIF(NOT DEFINED CTEST_GIT_URL)

 IF(NOT DEFINED CTEST_BRANCH)
 	SET(CTEST_BRANCH                          "master")


Quickfix: Do not use the "sed" statement in run_testsuite at all on non GNU platforms

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

--- deal.II/cmake/scripts/run_testsuite.cmake
+++ deal.II/cmake/scripts/run_testsuite.cmake
@@ -563,17 +563,27 @@
 "
     )
 ENDIF()
-FILE(GLOB _xml_files ${_path}/*.xml)
-EXECUTE_PROCESS(COMMAND sed -i -e
-  s/CompilerName=\"\"/CompilerName=\"${_compiler_name}\"\\n\\tCompilerVersion=\"${_compiler_version}\"/g
-  ${_xml_files}
-  OUTPUT_QUIET RESULT_VARIABLE  _res
-  )
-IF(NOT "${_res}" STREQUAL "0")
-  MESSAGE(FATAL_ERROR "
-\"sed\" failed. Bailing out.
-"
-    )
+
+IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+  #
+  # Only use the following sed command on GNU userlands:
+  #
+  # TODO: Come up with a more robust way to inject this that also works on
+  # BSD and Mac
+  #
+  MESSAGE(FATAL_ERROR "Success")
+  FILE(GLOB _xml_files ${_path}/*.xml)
+  EXECUTE_PROCESS(COMMAND sed -i -e
+    s/CompilerName=\"\"/CompilerName=\"${_compiler_name}\"\\n\\tCompilerVersion=\"${_compiler_version}\"/g
+    ${_xml_files}
+    OUTPUT_QUIET RESULT_VARIABLE  _res
+    )
+  IF(NOT "${_res}" STREQUAL "0")
+    MESSAGE(FATAL_ERROR "
+  \"sed\" failed. Bailing out.
+  "
+      )
+  ENDIF()
 ENDIF()

 IF(NOT "${_svn_WC_REVISION}" STREQUAL "")


[cmake] silence curl to prevent log pollution

--- cmake/Modules/SetupBoost.cmake
+++ cmake/Modules/SetupBoost.cmake
@@ -39,7 +39,7 @@
     ENDIF(NOT CURL)
     MESSAGE(STATUS "Saving boost to ${BOOST_DOWNLOAD_OUT}")
     EXECUTE_PROCESS(
-            COMMAND ${CURL} "-kL" "http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_${Boost_VERSION}.tar.gz/download" "-o" "${BOOST_DOWNLOAD_OUT}"
+            COMMAND ${CURL} "-ksL" "http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_${Boost_VERSION}.tar.gz/download" "-o" "${BOOST_DOWNLOAD_OUT}"
             RESULT_VARIABLE Result
             OUTPUT_VARIABLE Output
     )


Relaxed boost version dependency

Relaxed boost version dependency

--- cmake/external_libraries.cmake
+++ cmake/external_libraries.cmake
@@ -32,7 +32,7 @@
 set(CMAKE_MODULE_PATH /usr/share/SFML/cmake/Modules/)

 find_package(Threads REQUIRED)
-find_package(Boost 1.62 REQUIRED system program_options)
+find_package(Boost 1.58 REQUIRED COMPONENTS system program_options)
 find_package(SFML  2.4.2  REQUIRED system window graphics network audio)
 find_package(X11   1.6  REQUIRED)
 find_package(GTest 1.7 REQUIRED)


[CMake] Correctly reinstate LLDB_CAN_USE_LLDB_SERVER

r360631 introduced a "syntax error" which meant that cmake was still not
honoring the value of LLDB_CAN_USE_LLDB_SERVER variable. The correct
syntax for seting an internal cache variable is "set(VAR value CACHE
INTERNAL)", but the patch omitted the "CACHE" keyword. The "syntax
error" is in quotes because without the CACHE keyword this is still
valid syntax for setting the value of LLDB_CAN_USE_LLDB_SERVER to "1
INTERNAL".

There doesn't seem to be a need for this to be a cache variable so I'm
reverting this variable to a plain one, as it was before r360621.

This will hopefully fix the windows build.

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@360652 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit f45b0767a46f977cb1ad2fb82604dab491a47706)

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -436,9 +436,9 @@
 # Figure out if lldb could use lldb-server.  If so, then we'll
 # ensure we build lldb-server when an lldb target is being built.
 if (CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|FreeBSD|Linux|NetBSD")
-  set(LLDB_CAN_USE_LLDB_SERVER 1 INTERNAL)
+  set(LLDB_CAN_USE_LLDB_SERVER 1)
 else()
-  set(LLDB_CAN_USE_LLDB_SERVER 0 INTERNAL)
+  set(LLDB_CAN_USE_LLDB_SERVER 0)
 endif()

 # Figure out if lldb could use debugserver.  If so, then we'll


[CMake] Use system's debugserver

[CMake] Use system's debugserver

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -50,7 +50,9 @@
 option(LLDB_BUILD_FRAMEWORK "Build LLDB.framework (Darwin only)" OFF)
 option(LLDB_NO_INSTALL_DEFAULT_RPATH "Disable default RPATH settings in binaries" OFF)

+# BEGIN SWIFT CODE
 option(LLDB_ALLOW_STATIC_BINDINGS "Enable using static/baked language bindings if swig is not present." OFF)
+# END SWIFT CODE

 if(LLDB_BUILD_FRAMEWORK)
   if(NOT APPLE)
@@ -74,8 +76,11 @@
         "Directory to emit dSYM files stripped from executables and libraries (Darwin Only)")
   endif()

-  # We should override this from the cmake config at some point:
+  # BEGIN SWIFT CODE
+  # FIXME: We should override these from cmake config/cache!
   set(LLDB_FRAMEWORK_TOOLS "${LLDB_FRAMEWORK_TOOLS};repl_swift" CACHE INTERNAL "" FORCE)
+  set(LLDB_USE_SYSTEM_DEBUGSERVER ON CACHE BOOL "" FORCE)
+  # END SWIFT CODE
 endif()

 if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")


Fix dependencies in cmake testhelper

Fix dependencies in cmake testhelper

--- cmake/modules/testhelper.cmake
+++ cmake/modules/testhelper.cmake
@@ -1,5 +1,6 @@
 macro(addTestToLibavgPythonPackage testTarget)
     add_custom_target(copy_${testTarget} ALL)
+    add_dependencies(copy_${testTarget} ${testTarget})
     add_custom_command(TARGET copy_${testTarget}
         COMMAND ${CMAKE_COMMAND} -E copy
         "${CMAKE_CURRENT_BINARY_DIR}/${testTarget}"
@@ -17,6 +18,7 @@

 macro(addPluginToLibavgPythonPackage plugin)
     add_custom_target(copy_${plugin} ALL)
+    add_dependencies(copy_${plugin} ${plugin})
     add_custom_command(TARGET copy_${plugin}
         COMMAND ${CMAKE_COMMAND} -E copy
         "${CMAKE_CURRENT_BINARY_DIR}/${plugin}${CMAKE_SHARED_MODULE_SUFFIX}"


include/atlas missing (fedora)

include/atlas missing (fedora)

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

--- Numerics/cmake/FindATLAS.cmake
+++ Numerics/cmake/FindATLAS.cmake
@@ -60,6 +60,7 @@
     ENDIF(NOT CBLAS_INCLUDE_PATH)
   ELSE(NOT ATLAS_INCLUDE_PATH)
     INCLUDE_DIRECTORIES(${ATLAS_INCLUDE_PATH})
+    INCLUDE_DIRECTORIES(${ATLAS_INCLUDE_PATH}/atlas)
     SET(HAVE_ATLAS 1)
     SET(HAVE_CBLAS_H 1)
     SET(HAVE_CLAPACK_H 1)


Simplified the handling of extra sub-projects at superbuild level.

Also added error checks to stop processing early.

--- CMake/MITKDashboardDriverScript.cmake
+++ CMake/MITKDashboardDriverScript.cmake
@@ -269,7 +269,7 @@

     # Build top level (either all or the supplied targets at
     # superbuild level
-    if(SUPERBUILD_TARGETS)
+    if(SUPERBUILD_TARGETS AND NOT build_errors)
       foreach(superbuild_target ${SUPERBUILD_TARGETS})

         message("----------- [ Build ${superbuild_target} - SuperBuild ] -----------")
@@ -288,8 +288,6 @@
         string(REPLACE "^^" ";" external_project_with_build_dir_list "${external_project_with_build_dir}")
         list(GET external_project_with_build_dir_list 0 external_project_name)
         list(GET external_project_with_build_dir_list 1 external_project_builddir)
-        list(GET external_project_with_build_dir_list 2 external_project_superbuilddir)
-        list(GET external_project_with_build_dir_list 3 external_project_buildtarget)

         set_property(GLOBAL PROPERTY SubProject ${external_project_name})
         set_property(GLOBAL PROPERTY Label ${external_project_name})
@@ -297,33 +295,20 @@
         message("----------- [ Build ${external_project_name} ] -----------")

         func_build_target("${external_project_name}" "${CTEST_BINARY_DIRECTORY}")
-
-        # The next func_build_target calls are for continuous clients, to make sure
-        # the external project is completely build (targets added with ExternalProject_Add
-        # are not rebuild automatically if their sources changed
-        if(NOT build_errors AND external_project_superbuilddir)
-          func_build_target("" "${CTEST_BINARY_DIRECTORY}/${external_project_superbuilddir}")
+
+        if (NOT build_errors)
+          # HACK Unfortunately ctest_coverage ignores the build argument, try to force it...
+          file(READ "${CTEST_BINARY_DIRECTORY}/${external_project_builddir}/CMakeFiles/TargetDirectories.txt" mitk_build_coverage_dirs)
+          file(APPEND "${CTEST_BINARY_DIRECTORY}/CMakeFiles/TargetDirectories.txt" "${mitk_build_coverage_dirs}")
+
+          message("----------- [ Test ${external_project_name} ] -----------")
+
+          # runs only tests that have a LABELS property matching "${external_project_name}"
+          func_test(${external_project_name} "${CTEST_BINARY_DIRECTORY}/${external_project_builddir}")
+
+          # restore old coverage dirs
+          file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeFiles/TargetDirectories.txt" "${old_coverage_dirs}")
         endif()
-
-        if(NOT build_errors AND external_project_buildtarget)
-          func_build_target("${external_project_buildtarget}" "${CTEST_BINARY_DIRECTORY}/${external_project_superbuilddir}")
-        endif()
-
-        if(NOT build_errors)
-          func_build_target("" "${CTEST_BINARY_DIRECTORY}/${external_project_builddir}")
-        endif()
-
-        # HACK Unfortunately ctest_coverage ignores the build argument, try to force it...
-        file(READ "${CTEST_BINARY_DIRECTORY}/${external_project_builddir}/CMakeFiles/TargetDirectories.txt" mitk_build_coverage_dirs)
-        file(APPEND "${CTEST_BINARY_DIRECTORY}/CMakeFiles/TargetDirectories.txt" "${mitk_build_coverage_dirs}")
-
-        message("----------- [ Test ${external_project_name} ] -----------")
-
-        # runs only tests that have a LABELS property matching "${external_project_name}"
-        func_test(${external_project_name} "${CTEST_BINARY_DIRECTORY}/${external_project_builddir}")
-
-        # restore old coverage dirs
-        file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeFiles/TargetDirectories.txt" "${old_coverage_dirs}")

       endforeach()

@@ -336,8 +321,10 @@
        message("----------- [ Build SuperBuild ] -----------")
     endif()

-    # build everything at superbuild level which has not yet been built
-    func_build_target("" "${CTEST_BINARY_DIRECTORY}")
+    if(NOT build_errors)
+      # build everything at superbuild level which has not yet been built
+      func_build_target("" "${CTEST_BINARY_DIRECTORY}")
+    endif()

     # runs only tests that have a LABELS property matching "SuperBuild"
     #func_test("SuperBuild" "${CTEST_BINARY_DIRECTORY}")
@@ -360,38 +347,42 @@
       math(EXPR build_errors "${build_errors} + 1")
     endif()

+
     foreach(subproject ${CTEST_PROJECT_SUBPROJECTS})
-      set_property(GLOBAL PROPERTY SubProject ${subproject})
-      set_property(GLOBAL PROPERTY Label ${subproject})
-
-      if(subproject MATCHES "Unlabeled")
-        message("----------- [ Build All (Unlabeled) ] -----------")
-        # Build target
-        func_build_target("" "${build_dir}")
-      else()
-        message("----------- [ Build ${subproject} ] -----------")
-        # Build target
-        func_build_target(${subproject} "${build_dir}")
+      if(NOT build_errors)
+        set_property(GLOBAL PROPERTY SubProject ${subproject})
+        set_property(GLOBAL PROPERTY Label ${subproject})
+
+        if(subproject MATCHES "Unlabeled")
+          message("----------- [ Build All (Unlabeled) ] -----------")
+          # Build target
+          func_build_target("" "${build_dir}")
+        else()
+          message("----------- [ Build ${subproject} ] -----------")
+          # Build target
+          func_build_target(${subproject} "${build_dir}")
+        endif()
       endif()
-
     endforeach()

-    # HACK Unfortunately ctest_coverage ignores the build argument, try to force it...
-    file(READ ${build_dir}/CMakeFiles/TargetDirectories.txt mitk_build_coverage_dirs)
-    file(APPEND "${CTEST_BINARY_DIRECTORY}/CMakeFiles/TargetDirectories.txt" "${mitk_build_coverage_dirs}")
-
-    foreach(subproject ${CTEST_PROJECT_SUBPROJECTS})
-      set_property(GLOBAL PROPERTY SubProject ${subproject})
-      set_property(GLOBAL PROPERTY Label ${subproject})
-      message("----------- [ Test ${subproject} ] -----------")
-
-      # runs only tests that have a LABELS property matching "${subproject}"
-      func_test(${subproject} "${build_dir}")
-    endforeach()
+    if(NOT build_errors)
+      # HACK Unfortunately ctest_coverage ignores the build argument, try to force it...
+      file(READ ${build_dir}/CMakeFiles/TargetDirectories.txt mitk_build_coverage_dirs)
+      file(APPEND "${CTEST_BINARY_DIRECTORY}/CMakeFiles/TargetDirectories.txt" "${mitk_build_coverage_dirs}")
+
+      foreach(subproject ${CTEST_PROJECT_SUBPROJECTS})
+        set_property(GLOBAL PROPERTY SubProject ${subproject})
+        set_property(GLOBAL PROPERTY Label ${subproject})
+        message("----------- [ Test ${subproject} ] -----------")
+
+        # runs only tests that have a LABELS property matching "${subproject}"
+        func_test(${subproject} "${build_dir}")
+      endforeach()
+    endif()

     # Build any additional target which is not build by "all"
     # i.e. the "package" target
-    if(CTEST_PROJECT_ADDITIONAL_TARGETS)
+    if(CTEST_PROJECT_ADDITIONAL_TARGETS AND NOT build_errors)
       foreach(additional_target ${CTEST_PROJECT_ADDITIONAL_TARGETS})
         set_property(GLOBAL PROPERTY SubProject ${additional_target})
         set_property(GLOBAL PROPERTY Label ${additional_target})


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

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


Added missing variable for external projects to start DGraph on Windows.

--- CMake/ctkMacroSetupExternalPlugins.cmake
+++ CMake/ctkMacroSetupExternalPlugins.cmake
@@ -46,6 +46,13 @@
       MESSAGE(FATAL_ERROR "error: CTK requires Qt >= ${minimum_required_qt_version} -- you cannot use Qt ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}.")
     ENDIF()
   ENDIF()
+
+  # Set variable QT_INSTALLED_LIBRARY_DIR that will contains
+  # Qt shared library
+  SET(QT_INSTALLED_LIBRARY_DIR ${QT_LIBRARY_DIR})
+  IF(WIN32)
+    GET_FILENAME_COMPONENT(QT_INSTALLED_LIBRARY_DIR ${QT_QMAKE_EXECUTABLE} PATH)
+  ENDIF()

   SET(plugin_dirswithoption )
   SET(plugin_subdirs )


Make git describe debug line better

Make git describe debug line better

--- cmake/GetGitRevisionDescriptionDyND.cmake
+++ cmake/GetGitRevisionDescriptionDyND.cmake
@@ -100,7 +100,7 @@
 	#endif()

     #message(STATUS "Hash found: ${hash}")
-	message(STATUS "Arguments to execute_process: ${ARGN}")
+	message(STATUS "Arguments to ${GIT_EXECUTABLE}: ${ARGN}")

 	execute_process(COMMAND
 		"${GIT_EXECUTABLE}"


BUG: Improve KWStyle ExternalProject utilization.

This addresses multiple bugs:

- When crosscompiling, do not build KWStyle because the executable will not be
  built for the host build system.
- When KWStyle is already available on the host system, still run the KWStyle
  tests.

This is a follow-up for 9ebf6931faae2444e56696d01767cc1591941245.

Change-Id: I542a6729841996735ee762242db630bc8d8f384e

--- CMake/ITKModuleKWStyleTest.cmake
+++ CMake/ITKModuleKWStyleTest.cmake
@@ -18,9 +18,9 @@
 mark_as_advanced(ITK_USE_KWSTYLE)
 find_package(KWStyle 1.0.1 QUIET)

-if(NOT KWSTYLE_FOUND AND BUILD_TESTING AND ITK_USE_KWSTYLE)
-  include(${ITK_SOURCE_DIR}/Utilities/KWStyle/BuildKWStyle.cmake)
-else()
+if(NOT KWSTYLE_FOUND AND BUILD_TESTING AND ITK_USE_KWSTYLE AND NOT CMAKE_CROSSCOMPILING)
+  include(${ITK_CMAKE_DIR}/../Utilities/KWStyle/BuildKWStyle.cmake)
+elseif(NOT KWSTYLE_FOUND)
   set(ITK_USE_KWSTYLE OFF)
 endif()


Remove -Wshadow warning

Remove -Wshadow warning

It is too noisy

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -66,7 +66,6 @@
     add_warning("-Wdocumentation")
     add_warning("-Wdeprecated")
     add_warning("-Wextra-semi")
-    add_warning("-Wshadow")
     add_warning("-Wnon-virtual-dtor")

     add_warning("-Wold-style-cast")


add camera permisions to manifest

add camera permisions to manifest

--- cmake/articated_app.cmake
+++ cmake/articated_app.cmake
@@ -90,6 +90,11 @@
             ANDROID_MANIFEST_TMP
             ${ANDROID_MANIFEST_TMP})

+    STRING(REGEX REPLACE
+            "<uses-permission"
+            "<uses-permission android:name=\"android.permission.CAMERA\" />\n <uses-permission"
+            ANDROID_MANIFEST_TMP
+            ${ANDROID_MANIFEST_TMP})

     # write manifest
     file(WRITE ${CMAKE_BINARY_DIR}/package/AndroidManifest.xml ${ANDROID_MANIFEST_TMP})


[cmake] upgraded to ffmpeg release/1.2 on linux and mac

--- cmake/ffmpeg-config.cmake
+++ cmake/ffmpeg-config.cmake
@@ -43,7 +43,7 @@
   ### INSTALL
   install(FILES ${FFMPEG_DLLS} DESTINATION bin/plugins)
 else()
-  GenerateFFMPEG(http://github.com/FFmpeg/FFmpeg.git n0.11.1)
+  GenerateFFMPEG(http://github.com/FFmpeg/FFmpeg.git release/1.2)
 endif()
 find_package_handle_standard_args(FFMPEG DEFAULT_MSG
   FFMPEG_LIBRARIES


Re-enable the OCaml bindings by default

Re-enable the OCaml bindings by default

svn path=/trunk/; revision=11945

--- cmake/modules/ocaml.cmake
+++ cmake/modules/ocaml.cmake
@@ -24,7 +24,7 @@
 if(DEFAULT_NO_BINDINGS)
   option(ENABLE_ocaml "Enable OCaml bindings" OFF)
 else(DEFAULT_NO_BINDINGS)
-  option(ENABLE_ocaml "Enable OCaml bindings" OFF)
+  option(ENABLE_ocaml "Enable OCaml bindings" ON)
 endif(DEFAULT_NO_BINDINGS)

 option(ENABLE_ocaml_static "Enable OCaml bindings for the static build case" OFF)


remove c++11 from common.cmake for mcu

remove c++11 from common.cmake for mcu

--- common.cmake
+++ common.cmake
@@ -21,34 +21,6 @@
         set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
     endif()
 endif()
-
-# Compiler-specific C++11 activation.
-if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
-    set(CMAKE_CXX_FLAGS                "-Wall -std=c++11")
-    set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g")
-    set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG")
-    set(CMAKE_CXX_FLAGS_RELEASE        "-O4 -DNDEBUG")
-    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
-
-    execute_process(
-	COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
-    if (NOT (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7))
-	message("${PROJECT_NAME} requires g++ 4.7 or greater for C++11.")
-    endif ()
-elseif (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
-
-    set(CMAKE_CXX_FLAGS                "-Wall -std=c++11")
-    set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g")
-    set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG")
-    set(CMAKE_CXX_FLAGS_RELEASE        "-O4 -DNDEBUG")
-    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
-
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
-elseif(${CMAKE_MAKE_PROGRAM} MATCHES "(msdev|devenv|nmake|MSBuild)")
-    add_definitions("/W2")
-else ()
-    message("Your C++ compiler does not support C++11.")
-endif ()

 if(TODO MATCHES "ON")


change LuaBridge download name to avoid errors

* hash changed with last commit, but not the version
* see issue https://github.com/smanders/externpro/issues/147

--- projects/luabridge.cmake
+++ projects/luabridge.cmake
@@ -14,5 +14,5 @@
   GIT_TAG ${TAG}
   DLURL ${REPO}/archive/${TAG}.tar.gz
   DLMD5 0ac0ac198ec37ad5782dd5269ebbbe23
-  DLNAME LuaBridge-${VER}.tar.gz
+  DLNAME LuaBridge-${VER}p.tar.gz
   )