Some minor cleaning up [ci skip].

Some minor cleaning up [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -535,8 +535,7 @@
     IF(APPLE)
         # Clean up our plugin

-        OS_X_CLEAN_UP_FILE_WITH_QT_LIBRARIES(${PROJECT_BUILD_DIR}/${CMAKE_PROJECT_NAME}.app/Contents/PlugIns/${CMAKE_PROJECT_NAME}
-                                             ${PLUGIN_FILENAME} ${QT_LIBRARIES})
+        OS_X_CLEAN_UP_FILE_WITH_QT_LIBRARIES(${DEST_PLUGINS_DIR} ${PLUGIN_FILENAME} ${QT_LIBRARIES})

         # Make sure that the plugin refers to our embedded version of the other
         # plugins on which it depends
@@ -549,7 +548,7 @@
                 ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
                                    COMMAND install_name_tool -change @rpath/${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN}${CMAKE_SHARED_LIBRARY_SUFFIX}
                                                                      @executable_path/../PlugIns/${CMAKE_PROJECT_NAME}/${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN}${CMAKE_SHARED_LIBRARY_SUFFIX}
-                                                                     ${PROJECT_BUILD_DIR}/${CMAKE_PROJECT_NAME}.app/Contents/PlugIns/${CMAKE_PROJECT_NAME}/${PLUGIN_FILENAME})
+                                                                     ${DEST_PLUGINS_DIR}/${PLUGIN_FILENAME})
             ENDFOREACH()
         ENDFOREACH()

@@ -562,7 +561,7 @@
             ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
                                COMMAND install_name_tool -change ${PLUGIN_BINARY}
                                                                  @executable_path/../PlugIns/${CMAKE_PROJECT_NAME}/${PLUGIN_BINARY}
-                                                                 ${PROJECT_BUILD_DIR}/${CMAKE_PROJECT_NAME}.app/Contents/PlugIns/${CMAKE_PROJECT_NAME}/${PLUGIN_FILENAME})
+                                                                 ${DEST_PLUGINS_DIR}/${PLUGIN_FILENAME})
         ENDFOREACH()

         # Make sure that the plugin refers to our embedded version of the
@@ -572,7 +571,7 @@
             ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
                                COMMAND install_name_tool -change ${EXTERNAL_BINARY}
                                                                  @executable_path/../Frameworks/${EXTERNAL_BINARY}
-                                                                 ${PROJECT_BUILD_DIR}/${CMAKE_PROJECT_NAME}.app/Contents/PlugIns/${CMAKE_PROJECT_NAME}/${PLUGIN_FILENAME})
+                                                                 ${DEST_PLUGINS_DIR}/${PLUGIN_FILENAME})
         ENDFOREACH()
     ENDIF()


Slight improvement to our CMake code for retrieving a binary file.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -1080,8 +1080,8 @@
         FILE(DOWNLOAD "http://www.opencor.ws/binaries/${DIRNAME}/${COMPRESSED_FILENAME}" ${REAL_COMPRESSED_FILENAME}
              SHOW_PROGRESS STATUS STATUS)

-        # Uncompress the file, should we have managed to retrieve its
-        # uncompressed version
+        # Uncompress the compressed version of the file, should we have managed
+        # to retrieve it

         LIST(GET STATUS 0 STATUS_CODE)

@@ -1090,6 +1090,10 @@
                             WORKING_DIRECTORY ${REAL_DIRNAME} OUTPUT_QUIET)
             FILE(REMOVE ${REAL_COMPRESSED_FILENAME})
         ELSE()
+            FILE(REMOVE ${REAL_COMPRESSED_FILENAME})
+            # Note: this is in case we had an HTTP error of sorts, in which case
+            #       we would end up with an empty file...
+
             MESSAGE(FATAL_ERROR "The compressed version of the file could not be retrieved...")
         ENDIF()


Fix failing test cases on pushbuild

Fix failing test cases on pushbuild

--- cmake/plugin.cmake
+++ cmake/plugin.cmake
@@ -113,9 +113,12 @@
     SET (MYSQLD_STATIC_PLUGIN_LIBS ${MYSQLD_STATIC_PLUGIN_LIBS}
       ${target} CACHE INTERNAL "" FORCE)

-    IF(NOT ARG_MANDATORY)
+    IF(ARG_MANDATORY)
+      SET(${with_var} ON CACHE INTERNAL "Link ${plugin} statically to the server"
+       FORCE)
+    ELSE()
       SET(${with_var} ON CACHE BOOL "Link ${plugin} statically to the server"
-        FORCE)
+       FORCE)
     ENDIF()

     IF(ARG_MANDATORY)


Use Unix directory schema for apple.

Use Unix directory schema for apple.

	* build-aux/cmake/modules/Dirs.cmake: Here.

--- build-aux/cmake/modules/Dirs.cmake
+++ build-aux/cmake/modules/Dirs.cmake
@@ -21,25 +21,20 @@
       set(EXTRA_LIBRARIES_DIR ${BINARIES_DIR})
     endif(NOT UNIX)
   else(WIN32)
-    if(APPLE)
-      # Apple, MacOSX
-      #FIXME: Implement me!
-    else(APPLE)
-      # Unix, cygwin, mingw
-      include(Tools)
-      check_cmake_vars_exists(PROJECT_NAME PROJECT_VERSION)
-      set(_share_prefix share/${PROJECT_NAME}/${PROJECT_VERSION})
+    # Unix, cygwin, mingw
+    include(Tools)
+    check_cmake_vars_exists(PROJECT_NAME PROJECT_VERSION)
+    set(_share_prefix share/${PROJECT_NAME}/${PROJECT_VERSION})

-      set(LIBRARIES_DIR lib)
-      set(DOCUMENTATION_DIR ${_share_prefix}/doc)
-      set(PLUGINS_DIR ${_share_prefix}/plugins)
-      set(DATA_DIR ${_share_prefix}/data)
-      set(TRANSLATIONS_DIR ${_share_prefix}/translations)
-      set(SETTINGS_DIR ${_share_prefix}/etc)
-      set(EXAMPLES_DIR ${_share_prefix}/examples)
-      set(DEMOS_DIR ${_share_prefix}/demos)
-      set(EXTRA_LIBRARIES_DIR ${_share_prefix}/lib)
-    endif(APPLE)
+    set(LIBRARIES_DIR lib)
+    set(DOCUMENTATION_DIR ${_share_prefix}/doc)
+    set(PLUGINS_DIR ${_share_prefix}/plugins)
+    set(DATA_DIR ${_share_prefix}/data)
+    set(TRANSLATIONS_DIR ${_share_prefix}/translations)
+    set(SETTINGS_DIR ${_share_prefix}/etc)
+    set(EXAMPLES_DIR ${_share_prefix}/examples)
+    set(DEMOS_DIR ${_share_prefix}/demos)
+    set(EXTRA_LIBRARIES_DIR ${_share_prefix}/lib)
   endif(WIN32)

 endif(NOT DEFINED DIRS_CMAKE)


Teach the VCS detection to set some root-level variables with the raw
revision and git commit data extracted. This will be used in the Clang
CMake build to avoid trying to re-detect the information.

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

--- cmake/modules/VersionFromVCS.cmake
+++ cmake/modules/VersionFromVCS.cmake
@@ -13,6 +13,7 @@
     if( Subversion_FOUND )
       subversion_wc_info( ${CMAKE_CURRENT_SOURCE_DIR} Project )
       if( Project_WC_REVISION )
+        set(SVN_REVISION ${Project_WC_REVISION} PARENT_SCOPE)
         set(result "${result}-r${Project_WC_REVISION}")
       endif()
     endif()
@@ -30,6 +31,7 @@
       if( git_result EQUAL 0 )
         string(REGEX MATCH r[0-9]+ git_svn_rev ${git_output})
         string(SUBSTRING "${git_svn_rev}" 1 -1 git_svn_rev_number)
+        set(SVN_REVISION ${git_svn_rev_number} PARENT_SCOPE)
         set(git_svn_rev "-svn-${git_svn_rev}")

         # Determine if the HEAD points directly at a subversion revision.
@@ -55,6 +57,7 @@
                       OUTPUT_VARIABLE git_output)
       if( git_result EQUAL 0 AND NOT is_git_svn_rev_exact )
         string(STRIP "${git_output}" git_ref_id)
+        set(GIT_COMMIT ${git_ref_id} PARENT_SCOPE)
         set(result "${result}${git_svn_rev}-${git_ref_id}")
       else()
         set(result "${result}${git_svn_rev}")


Added another test on the list of ignored for ARM64

--- tutorials/CTestCustom.cmake
+++ tutorials/CTestCustom.cmake
@@ -16,6 +16,7 @@
        tutorial-tmva-TMVAMulticlass
        tutorial-tmva-TMVAMulticlassApplication
        tutorial-tmva-TMVARegressionApplication
+       tutorial-tmva-TMVAClassificationApplication
        tutorial-roostats-TwoSidedFrequentistUpperLimitWithBands)
 endif()


Removed FindBoost.cmake.

Removed FindBoost.cmake.

git-svn-id: b7791fb0f5d07d96612766859ad70a13be88ea96@2099 305cdda6-5ce1-45b3-a98d-dfc68c8b3305

--- library/FindBoost.cmake
+++ library/FindBoost.cmake
@@ -1,611 +0,0 @@
-# - Try to find Boost include dirs and libraries
-# Usage of this module as follows:
-#
-#     SET(Boost_USE_STATIC_LIBS ON)
-#     SET(Boost_USE_MULTITHREAD OFF)
-#     FIND_PACKAGE( Boost 1.34.1 COMPONENTS date_time filesystem iostreams ... )
-#
-# The Boost_ADDITIONAL_VERSIONS variable can be used to specify a list of
-# boost version numbers that should be taken into account when searching
-# for the libraries. Unfortunately boost puts the version number into the
-# actual filename for the libraries, so this might be needed in the future
-# when new Boost versions are released.
-#
-# Currently this module searches for the following version numbers:
-# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1, 1.36.0,
-# 1.36.1
-#
-# The components list needs to be the actual names of boost libraries, that is
-# the part of the actual library files that differ on different libraries. So
-# its "date_time" for "libboost_date_time...". Anything else will result in
-# errors
-#
-# You can provide a minimum version number that should be used. If you provide this
-# version number and specify the REQUIRED attribute, this module will fail if it
-# can't find the specified or a later version. If you specify a version number this is
-# automatically put into the considered list of version numbers and thus doesn't need
-# to be specified in the Boost_ADDITIONAL_VERSIONS variable
-#
-# Variables used by this module, they can change the default behaviour and need to be set
-# before calling find_package:
-#  Boost_USE_MULTITHREAD         Can be set to OFF to use the non-multithreaded
-#                                boost libraries. Defaults to ON.
-#  Boost_USE_STATIC_LIBS         Can be set to ON to force the use of the static
-#                                boost libraries. Defaults to OFF.
-#  Boost_ADDITIONAL_VERSIONS     A list of version numbers to use for searching
-#                                the boost include directory. The default list
-#                                of version numbers is:
-#                                1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1,
-#                                1.35, 1.35.0, 1.35.1, 1.36.0, 1.36.1
-#                                If you want to look for an older or newer
-#                                version set this variable to a list of
-#                                strings, where each string contains a number, i.e.
-#                                SET(Boost_ADDITIONAL_VERSIONS "0.99.0" "1.35.0")
-#  BOOST_ROOT                    Preferred installation prefix for searching for Boost,
-#                                set this if the module has problems finding the proper Boost installation
-#  BOOST_INCLUDEDIR              Set this to the include directory of Boost, if the
-#                                module has problems finding the proper Boost installation
-#  BOOST_LIBRARYDIR              Set this to the lib directory of Boost, if the
-#                                module has problems finding the proper Boost installation
-#
-#  The last three variables are available also as environment variables
-#
-#
-# Variables defined by this module:
-#
-#  Boost_FOUND                          System has Boost, this means the include dir was found,
-#                                       as well as all the libraries specified in the COMPONENTS list
-#  Boost_INCLUDE_DIRS                   Boost include directories, not cached
-#  Boost_INCLUDE_DIR                    This is almost the same as above, but this one is cached and may be
-#                                       modified by advanced users
-#  Boost_LIBRARIES                      Link these to use the Boost libraries that you specified, not cached
-#  Boost_LIBRARY_DIRS                   The path to where the Boost library files are.
-#  Boost_VERSION                        The version number of the boost libraries that have been found,
-#                                       same as in version.hpp from Boost
-#  Boost_LIB_VERSION                    The version number in filename form as its appended to the library filenames
-#  Boost_MAJOR_VERSION                  major version number of boost
-#  Boost_MINOR_VERSION                  minor version number of boost
-#  Boost_SUBMINOR_VERSION               subminor version number of boost
-#  Boost_LIB_DIAGNOSTIC_DEFINITIONS     Only set on windows. Can be used with add_definitions
-#                                       to print diagnostic information about the automatic
-#                                       linking done on windows.
-
-# For each component you list the following variables are set.
-# ATTENTION: The component names need to be in lower case, just as the boost
-# library names however the cmake variables use upper case for the component
-# part. So you'd get Boost_SERIALIZATION_FOUND for example.
-#
-#  Boost_${COMPONENT}_FOUND             True IF the Boost library "component" was found.
-#  Boost_${COMPONENT}_LIBRARY           The absolute path of the Boost library "component".
-#  Boost_${COMPONENT}_LIBRARY_DEBUG     The absolute path of the debug version of the
-#                                       Boost library "component".
-#  Boost_${COMPONENT}_LIBRARY_RELEASE   The absolute path of the release version of the
-#                                       Boost library "component"
-#
-#  Copyright (c) 2006-2008 Andreas Schneider <mail@cynapses.org>
-#  Copyright (c) 2007      Wengo
-#  Copyright (c) 2007      Mike Jackson
-#  Copyright (c) 2008      Andreas Pakulat <apaku@gmx.de>
-#
-#  Redistribution AND use is allowed according to the terms of the New
-#  BSD license.
-#  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-#
-
-# this module required CMake 2.5 for the Boost_FIND_VERSION stuff
-
-# this must not be done in find modules, it changes the policy settings, which may have been
-# set in the projects cmake files.
-# beside that this module comes with cmake, so the cmake version is always correct, Alex
-# CMAKE_MINIMUM_REQUIRED(VERSION "2.6" FATAL_ERROR)
-
-# MESSAGE(STATUS "Finding Boost libraries.... ")
-
-OPTION(Boost_USE_MULTITHREADED "Use the multithreaded versions of the boost libraries" ON)
-
-SET( _boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS} "1.36.1" "1.36.0" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0" "1.34" "1.33.1" "1.33.0" "1.33" )
-
-############################################
-#
-# Check the existence of the libraries.
-#
-############################################
-# This macro was taken directly from the FindQt4.cmake file that is included
-# with the CMake distribution. This is NOT my work. All work was done by the
-# original authors of the FindQt4.cmake file. Only minor modifications were
-# made to remove references to Qt and make this file more generally applicable
-#########################################################################
-
-MACRO (_Boost_ADJUST_LIB_VARS basename)
-  IF (Boost_INCLUDE_DIR )
-    #MESSAGE(STATUS "Adjusting ${basename} ")
-
-    IF (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE)
-      # if the generator supports configuration types then set
-      # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
-      IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
-        SET(Boost_${basename}_LIBRARY optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
-      ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
-        # if there are no configuration types and CMAKE_BUILD_TYPE has no value
-        # then just use the release libraries
-        SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} )
-      ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
-      SET(Boost_${basename}_LIBRARIES optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
-    ENDIF (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE)
-
-    # if only the release version was found, set the debug variable also to the release version
-    IF (Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG)
-      SET(Boost_${basename}_LIBRARY_DEBUG ${Boost_${basename}_LIBRARY_RELEASE})
-      SET(Boost_${basename}_LIBRARY       ${Boost_${basename}_LIBRARY_RELEASE})
-      SET(Boost_${basename}_LIBRARIES     ${Boost_${basename}_LIBRARY_RELEASE})
-    ENDIF (Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG)
-
-    # if only the debug version was found, set the release variable also to the debug version
-    IF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE)
-      SET(Boost_${basename}_LIBRARY_RELEASE ${Boost_${basename}_LIBRARY_DEBUG})
-      SET(Boost_${basename}_LIBRARY         ${Boost_${basename}_LIBRARY_DEBUG})
-      SET(Boost_${basename}_LIBRARIES       ${Boost_${basename}_LIBRARY_DEBUG})
-    ENDIF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE)
-
-    IF (Boost_${basename}_LIBRARY)
-      SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library")
-      GET_FILENAME_COMPONENT(Boost_LIBRARY_DIRS "${Boost_${basename}_LIBRARY}" PATH)
-      SET(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory")
-      SET(Boost_${basename}_FOUND ON CACHE INTERNAL "Was the boost boost ${basename} library found")
-    ENDIF (Boost_${basename}_LIBRARY)
-
-  ENDIF (Boost_INCLUDE_DIR )
-  # Make variables changeble to the advanced user
-  MARK_AS_ADVANCED(
-      Boost_${basename}_LIBRARY
-      Boost_${basename}_LIBRARY_RELEASE
-      Boost_${basename}_LIBRARY_DEBUG
-  )
-ENDMACRO (_Boost_ADJUST_LIB_VARS)
-
-#-------------------------------------------------------------------------------
-
-
-SET( _boost_IN_CACHE TRUE)
-IF(Boost_INCLUDE_DIR)
-  FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
-    STRING(TOUPPER ${COMPONENT} COMPONENT)
-    IF(NOT Boost_${COMPONENT}_FOUND)
-      SET( _boost_IN_CACHE FALSE)
-    ENDIF(NOT Boost_${COMPONENT}_FOUND)
-  ENDFOREACH(COMPONENT)
-ELSE(Boost_INCLUDE_DIR)
-  SET( _boost_IN_CACHE FALSE)
-ENDIF(Boost_INCLUDE_DIR)
-
-IF (_boost_IN_CACHE)
-  # in cache already
-  SET(Boost_FOUND TRUE)
-  FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
-    STRING(TOUPPER ${COMPONENT} COMPONENT)
-    _Boost_ADJUST_LIB_VARS( ${COMPONENT} )
-    SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${COMPONENT}_LIBRARY})
-  ENDFOREACH(COMPONENT)
-  SET(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR})
-  IF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0")
-    MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000")
-    MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000")
-    MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100")
-  ENDIF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0")
-ELSE (_boost_IN_CACHE)
-  # Need to search for boost
-
-  IF(WIN32)
-    # In windows, automatic linking is performed, so you do not have to specify the libraries.
-    # If you are linking to a dynamic runtime, then you can choose to link to either a static or a
-    # dynamic Boost library, the default is to do a static link.  You can alter this for a specific
-    # library "whatever" by defining BOOST_WHATEVER_DYN_LINK to force Boost library "whatever" to
-    # be linked dynamically.  Alternatively you can force all Boost libraries to dynamic link by
-    # defining BOOST_ALL_DYN_LINK.
-
-    # This feature can be disabled for Boost library "whatever" by defining BOOST_WHATEVER_NO_LIB,
-    # or for all of Boost by defining BOOST_ALL_NO_LIB.
-
-    # If you want to observe which libraries are being linked against then defining
-    # BOOST_LIB_DIAGNOSTIC will cause the auto-linking code to emit a #pragma message each time
-    # a library is selected for linking.
-    SET(Boost_LIB_DIAGNOSTIC_DEFINITIONS "-DBOOST_LIB_DIAGNOSTIC" CACHE STRING "Boost diagnostic define")
-    MARK_AS_ADVANCED(Boost_LIB_DIAGNOSTIC_DEFINITIONS)
-  ENDIF(WIN32)
-
-
-  SET(_boost_INCLUDE_SEARCH_DIRS
-    C:/boost/include
-    "C:/Program Files/boost/boost_${Boost_FIND_VERSION_MAJOR}_${Boost_FIND_VERSION_MINOR}_${Boost_FIND_VERSION_PATCH}"
-    # D: is very often the cdrom drive, IF you don't have a
-    # cdrom inserted it will popup a very annoying dialog
-    #D:/boost/include
-    /sw/local/include
-  )
-
-  SET(_boost_LIBRARIES_SEARCH_DIRS
-    C:/boost/lib
-    "C:/Program Files/boost/boost_${Boost_FIND_VERSION_MAJOR}_${Boost_FIND_VERSION_MINOR}_${Boost_FIND_VERSION_PATCH}/lib"
-    /sw/local/lib
-  )
-
-  IF( NOT $ENV{BOOST_ROOT} STREQUAL "" )
-    SET(_boost_INCLUDE_SEARCH_DIRS $ENV{BOOST_ROOT}/include ${_boost_INCLUDE_SEARCH_DIRS})
-    SET(_boost_LIBRARIES_SEARCH_DIRS $ENV{BOOST_ROOT}/lib ${_boost_INCLUDE_SEARCH_DIRS})
-  ENDIF( NOT $ENV{BOOST_ROOT} STREQUAL "" )
-
-  IF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" )
-    SET(_boost_INCLUDE_SEARCH_DIRS $ENV{BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS})
-  ENDIF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" )
-
-  IF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" )
-    SET(_boost_LIBRARIES_SEARCH_DIRS $ENV{BOOST_LIBRARYDIR} ${_boost_INCLUDE_SEARCH_DIRS})
-  ENDIF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" )
-
-  IF( BOOST_ROOT )
-
-    FOREACH(SearchDir ${BOOST_ROOT})
-        LIST(INSERT _boost_INCLUDE_SEARCH_DIRS 0 ${SearchDir}/include)
-        LIST(INSERT _boost_LIBRARIES_SEARCH_DIRS 0 ${SearchDir}/lib)
-    ENDFOREACH(SearchDir ${BOOST_ROOT})
-
-  ENDIF( BOOST_ROOT )
-
-  IF( BOOST_INCLUDEDIR )
-    SET(_boost_INCLUDE_SEARCH_DIRS ${BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS})
-  ENDIF( BOOST_INCLUDEDIR )
-
-  IF( BOOST_LIBRARYDIR )
-    SET(_boost_LIBRARIES_SEARCH_DIRS ${BOOST_LIBRARYDIR} ${_boost_LIBRARIES_SEARCH_DIRS})
-  ENDIF( BOOST_LIBRARYDIR )
-
-  #Try first in our own include search paths (e.g. BOOST_ROOT)
-  FOREACH(_boost_VER ${_boost_TEST_VERSIONS})
-    IF( NOT Boost_INCLUDE_DIR )
-
-      # Add in a path suffix, based on the required version, ideally we could
-      # read this from version.hpp, but for that to work we'd need to know the include
-      # dir already
-      SET(_boost_PATH_SUFFIX
-        boost-${_boost_VER}
-      )
-
-      IF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
-          STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3" _boost_PATH_SUFFIX ${_boost_PATH_SUFFIX})
-      ELSEIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+")
-          STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2" _boost_PATH_SUFFIX ${_boost_PATH_SUFFIX})
-      ENDIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
-
-      #MESSAGE(Testing)
-      #MESSAGE(${_boost_INCLUDE_SEARCH_DIRS})
-      #MESSAGE(${_boost_PATH_SUFFIX})
-      FIND_PATH(Boost_INCLUDE_DIR
-          NAMES         boost/config.hpp
-          PATHS         ${_boost_INCLUDE_SEARCH_DIRS}
-          PATH_SUFFIXES ${_boost_PATH_SUFFIX}
-          NO_DEFAULT_PATH
-      )
-    ENDIF( NOT Boost_INCLUDE_DIR )
-  ENDFOREACH(_boost_VER)
-
-  # If nothing is found search again using system default paths
-  FOREACH(_boost_VER ${_boost_TEST_VERSIONS})
-    IF( NOT Boost_INCLUDE_DIR )
-
-      # Add in a path suffix, based on the required version, ideally we could
-      # read this from version.hpp, but for that to work we'd need to know the include
-      # dir already
-      SET(_boost_PATH_SUFFIX
-        boost-${_boost_VER}
-      )
-
-      IF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
-          STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3" _boost_PATH_SUFFIX ${_boost_PATH_SUFFIX})
-      ELSEIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+")
-          STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2" _boost_PATH_SUFFIX ${_boost_PATH_SUFFIX})
-      ENDIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
-
-      FIND_PATH(Boost_INCLUDE_DIR
-          NAMES         boost/config.hpp
-          PATH_SUFFIXES ${_boost_PATH_SUFFIX}
-      )
-
-    ENDIF( NOT Boost_INCLUDE_DIR )
-  ENDFOREACH(_boost_VER)
-
-  IF(Boost_INCLUDE_DIR)
-    # Extract Boost_VERSION and Boost_LIB_VERSION from version.hpp
-    # Read the whole file:
-    #
-    SET(BOOST_VERSION 0)
-    SET(BOOST_LIB_VERSION "")
-    FILE(READ "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS)
-
-    STRING(REGEX REPLACE ".*#define BOOST_VERSION ([0-9]+).*" "\\1" Boost_VERSION "${_boost_VERSION_HPP_CONTENTS}")
-    STRING(REGEX REPLACE ".*#define BOOST_LIB_VERSION \"([0-9_]+)\".*" "\\1" Boost_LIB_VERSION "${_boost_VERSION_HPP_CONTENTS}")
-
-    SET(Boost_LIB_VERSION ${Boost_LIB_VERSION} CACHE INTERNAL "The library version string for boost libraries")
-    SET(Boost_VERSION ${Boost_VERSION} CACHE INTERNAL "The version number for boost libraries")
-
-    IF(NOT "${Boost_VERSION}" STREQUAL "0")
-      MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000")
-      MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000")
-      MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100")
-
-    ENDIF(NOT "${Boost_VERSION}" STREQUAL "0")
-  ENDIF(Boost_INCLUDE_DIR)
-
-
-  #Setting some more suffixes for the library
-  SET (Boost_LIB_PREFIX "")
-  IF ( WIN32 AND Boost_USE_STATIC_LIBS )
-    SET (Boost_LIB_PREFIX "lib")
-  ENDIF ( WIN32 AND Boost_USE_STATIC_LIBS )
-  SET (_boost_COMPILER "-gcc")
-  IF (MSVC71)
-    SET (_boost_COMPILER "-vc71")
-  ENDIF(MSVC71)
-  IF (MSVC80)
-    SET (_boost_COMPILER "-vc80")
-  ENDIF(MSVC80)
-  IF (MSVC90)
-    SET (_boost_COMPILER "-vc90")
-  ENDIF (MSVC90)
-  IF (MINGW)
-    EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
-      ARGS --version
-      OUTPUT_VARIABLE _boost_COMPILER_VERSION
-      )
-    STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.[0-9] .*" "\\1\\2"
-      _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION})
-    SET (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}")
-  ENDIF(MINGW)
-  IF (CYGWIN)
-    SET (_boost_COMPILER "-gcc")
-  ENDIF (CYGWIN)
-  IF (UNIX)
-    IF (APPLE)
-        SET (_boost_COMPILER "")
-    ELSE (APPLE)
-      IF (NOT CMAKE_COMPILER_IS_GNUCC)
-        # This is for the intel compiler
-        SET (_boost_COMPILER "-il")
-      ELSE (NOT CMAKE_COMPILER_IS_GNUCC)
-        #find out the version of gcc being used.
-        EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
-            ARGS --version
-            OUTPUT_VARIABLE _boost_COMPILER_VERSION
-        )
-        STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.[0-9].*" "\\1\\2"
-               _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION})
-        SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}")
-      ENDIF (NOT CMAKE_COMPILER_IS_GNUCC)
-    ENDIF (APPLE)
-  ENDIF(UNIX)
-
-  IF(_boost_COMPILER STREQUAL "-gcc")
-     MESSAGE("Here")
-  ENDIF(_boost_COMPILER STREQUAL "-gcc")
-
-  SET (_boost_MULTITHREADED "-mt")
-
-  IF( NOT Boost_USE_MULTITHREADED )
-    SET (_boost_MULTITHREADED "")
-  ENDIF( NOT Boost_USE_MULTITHREADED )
-
-  SET( _boost_STATIC_TAG "")
-  IF (WIN32)
-    IF(MSVC)
-      SET (_boost_ABI_TAG "g")
-    ENDIF(MSVC)
-    IF( Boost_USE_STATIC_LIBS )
-      SET( _boost_STATIC_TAG "-s")
-    ENDIF( Boost_USE_STATIC_LIBS )
-  ENDIF(WIN32)
-  IF(_boost_ABI_TAG STREQUAL "g" )
-       SET (_boost_ABI_TAG "${_boost_ABI_TAG}d")
-  ELSE(_boost_ABI_TAG STREQUAL "g")
-       SET(_boost_ABI_TAG "d")
-  ENDIF(_boost_ABI_TAG STREQUAL "g")
-
-  # ------------------------------------------------------------------------
-  #  Begin finding boost libraries
-  # ------------------------------------------------------------------------
-  FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
-    STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
-    SET( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" )
-    SET( Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE-NOTFOUND" )
-    SET( Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG-NOTFOUND")
-
-    # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
-    IF( Boost_USE_STATIC_LIBS )
-      SET( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
-      IF(WIN32)
-        SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
-      ELSE(WIN32)
-        SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
-      ENDIF(WIN32)
-    ENDIF( Boost_USE_STATIC_LIBS )
-
-    # On Linux, if the libraries have the version.so.version format, we need to find
-    # those files for installation of boost dlls to work correctly.
-    SET(_Boost_ADDITIONAL_NAMES "")
-    IF( CMAKE_HOST_UNIX )
-        SET(_Boost_ADDITIONAL_NAMES
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}.so
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}
-            )
-    ENDIF( CMAKE_HOST_UNIX )
-    FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
-        NAMES  ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}
-        PATHS  ${_boost_LIBRARIES_SEARCH_DIRS}
-        NO_DEFAULT_PATH
-    )
-
-    IF( NOT ${Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE} )
-      FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
-          NAMES  ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
-                 ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
-                 ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
-                 ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}
-                 ${Boost_LIB_PREFIX}boost_${COMPONENT}
-      )
-    ENDIF( NOT ${Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE} )
-
-    FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG
-        NAMES  ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_boost_ABI_TAG}
-        PATHS  ${_boost_LIBRARIES_SEARCH_DIRS}
-        NO_DEFAULT_PATH
-    )
-
-    IF( NOT ${Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG} )
-      FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG
-          NAMES  ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}
-               ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_boost_ABI_TAG}
-      )
-    ENDIF( NOT ${Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG} )
-    _Boost_ADJUST_LIB_VARS(${UPPERCOMPONENT})
-    IF( Boost_USE_STATIC_LIBS )
-      SET(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
-    ENDIF( Boost_USE_STATIC_LIBS )
-  ENDFOREACH(COMPONENT)
-
-  # Option to use system provided ZLIB library instead of requiring the one
-  # build by Boost on UNIX systems.
-  # If Boost is not built with ZLIB on your system, set NEKTAR_USE_SYSTEM_ZLIB
-  # to allow the system libz.so to be used instead.
-  IF (UNIX)
-    SET(NEKTAR_USE_SYSTEM_ZLIB OFF CACHE BOOL "Use system ZLIB library")
-    IF (NOT Boost_ZLIB_LIBRARY_FOUND AND NEKTAR_USE_SYSTEM_ZLIB)
-        INCLUDE(FindZLIB)
-        IF (NOT Boost_ZLIB_LIBRARY_RELEASE AND ZLIB_FOUND)
-            SET(Boost_ZLIB_LIBRARY_RELEASE ${ZLIB_LIBRARY} CACHE STRING "ZLIB   library"
-                FORCE)
-            SET(Boost_ZLIB_LIBRARY_DEBUG ${ZLIB_LIBRARY} CACHE STRING "ZLIB     library"
-                FORCE)
-        ENDIF (NOT Boost_ZLIB_LIBRARY_RELEASE AND ZLIB_FOUND)
-    ENDIF (NOT Boost_ZLIB_LIBRARY_FOUND AND NEKTAR_USE_SYSTEM_ZLIB)
-  ENDIF (UNIX)
-
-  # ------------------------------------------------------------------------
-  #  End finding boost libraries
-  # ------------------------------------------------------------------------
-
-  SET(Boost_INCLUDE_DIRS
-    ${Boost_INCLUDE_DIR}
-  )
-
-  # MESSAGE(STATUS "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
-  # MESSAGE(STATUS "Boost_LIBRARIES: ${Boost_LIBRARIES}")
-
-  SET(Boost_FOUND FALSE)
-  IF(Boost_INCLUDE_DIR)
-    SET( Boost_FOUND TRUE )
-    IF( Boost_FIND_VERSION_MAJOR AND Boost_VERSION_MAJOR LESS "${Boost_FIND_VERSION_MAJOR}" )
-      SET( Boost_FOUND FALSE )
-    ELSE( Boost_FIND_VERSION_MAJOR AND Boost_VERSION_MAJOR LESS "${Boost_FIND_VERSION_MAJOR}" )
-      IF( Boost_FIND_VERSION_MINOR AND Boost_VERSION_MINOR LESS "${Boost_FIND_VERSION_MINOR}" )
-        SET( Boost_FOUND FALSE )
-      ELSE( Boost_FIND_VERSION_MINOR AND Boost_VERSION_MINOR LESS "${Boost_FIND_VERSION_MINOR}" )
-        IF( Boost_FIND_VERSION_PATCH AND Boost_VERSION_SUBMINOR LESS "${Boost_FIND_VERSION_PATCH}" )
-          SET( Boost_FOUND FALSE )
-        ENDIF( Boost_FIND_VERSION_PATCH AND Boost_VERSION_SUBMINOR LESS "${Boost_FIND_VERSION_PATCH}" )
-      ENDIF( Boost_FIND_VERSION_MINOR AND Boost_VERSION_MINOR LESS "${Boost_FIND_VERSION_MINOR}" )
-    ENDIF( Boost_FIND_VERSION_MAJOR AND Boost_VERSION_MAJOR LESS "${Boost_FIND_VERSION_MAJOR}" )
-    set(_boost_CHECKED_COMPONENT FALSE)
-    FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
-      STRING(TOUPPER ${COMPONENT} COMPONENT)
-      set(_boost_CHECKED_COMPONENT TRUE)
-      IF(NOT Boost_${COMPONENT}_FOUND)
-        SET( Boost_FOUND FALSE)
-      ENDIF(NOT Boost_${COMPONENT}_FOUND)
-    ENDFOREACH(COMPONENT)
-    IF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT )
-      # Compatibility Code for backwards compatibility with CMake 2.4
-
-      # Look for the boost library path.
-      # Note that the user may not have installed any libraries
-      # so it is quite possible the Boost_LIBRARY_PATH may not exist.
-      SET(_boost_LIB_DIR ${Boost_INCLUDE_DIR})
-
-      IF("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+")
-        GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH)
-      ENDIF ("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+")
-
-      IF("${_boost_LIB_DIR}" MATCHES "/include$")
-        # Strip off the trailing "/include" in the path.
-        GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH)
-      ENDIF("${_boost_LIB_DIR}" MATCHES "/include$")
-
-      IF(EXISTS "${_boost_LIB_DIR}/lib")
-        SET (_boost_LIB_DIR ${_boost_LIB_DIR}/lib)
-      ELSE(EXISTS "${_boost_LIB_DIR}/lib")
-        IF(EXISTS "${_boost_LIB_DIR}/stage/lib")
-          SET(_boost_LIB_DIR ${_boost_LIB_DIR}/stage/lib)
-        ELSE(EXISTS "${_boost_LIB_DIR}/stage/lib")
-          SET(_boost_LIB_DIR "")
-        ENDIF(EXISTS "${_boost_LIB_DIR}/stage/lib")
-      ENDIF(EXISTS "${_boost_LIB_DIR}/lib")
-
-      IF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}")
-        SET(Boost_LIBRARY_DIRS ${_boost_LIB_DIR} CACHE FILEPATH "Boost library directory")
-      ENDIF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}")
-
-    ENDIF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT )
-
-  ELSE(Boost_INCLUDE_DIR)
-    SET( Boost_FOUND FALSE)
-  ENDIF(Boost_INCLUDE_DIR)
-
-  IF (Boost_FOUND)
-      IF (NOT Boost_FIND_QUIETLY)
-        MESSAGE(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
-      ENDIF(NOT Boost_FIND_QUIETLY)
-      IF (NOT Boost_FIND_QUIETLY)
-        MESSAGE(STATUS "Found the following Boost libraries:")
-      ENDIF(NOT Boost_FIND_QUIETLY)
-      FOREACH ( COMPONENT  ${Boost_FIND_COMPONENTS} )
-        STRING( TOUPPER ${COMPONENT} UPPERCOMPONENT )
-        IF ( Boost_${UPPERCOMPONENT}_FOUND )
-          IF (NOT Boost_FIND_QUIETLY)
-            MESSAGE (STATUS "  ${COMPONENT}")
-          ENDIF(NOT Boost_FIND_QUIETLY)
-          SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${UPPERCOMPONENT}_LIBRARY})
-        ENDIF ( Boost_${UPPERCOMPONENT}_FOUND )
-      ENDFOREACH(COMPONENT)
-  ELSE (Boost_FOUND)
-      IF (Boost_FIND_REQUIRED)
-          #MESSAGE(STATUS "Boost version required: ${Boost_FIND_VERSION}. Found: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
-          #MESSAGE(FATAL_ERROR "Couldn't find the Boost libraries and/or include directory, or the version found is too old. Please install the Boost libraries AND development packages. You can set BOOST_ROOT, BOOST_INCLUDEDIR and BOOST_LIBRARYDIR to help find Boost.")
-      ENDIF(Boost_FIND_REQUIRED)
-  ENDIF(Boost_FOUND)
-
-  # Under Windows, automatic linking is performed, so no need to specify the libraries.
-  IF (WIN32)
-    IF (NOT MINGW)
-      SET(Boost_LIBRARIES "")
-    ENDIF (NOT MINGW)
-  ENDIF(WIN32)
-
-  # show the Boost_INCLUDE_DIRS AND Boost_LIBRARIES variables only in the advanced view
-  MARK_AS_ADVANCED(Boost_INCLUDE_DIR
-      Boost_INCLUDE_DIRS
-      Boost_LIBRARY_DIRS
-      Boost_USE_MULTITHREADED
-  )
-ENDIF(_boost_IN_CACHE)
-


Added DICOMParser include directory if using ansi stdlib

--- vtkIncludeDirectories.cmake
+++ vtkIncludeDirectories.cmake
@@ -103,6 +103,8 @@
   ${VTK_SOURCE_DIR}/Common
 )

+
+
 # Access to vtkRegressionTestImage.h.
 SET(VTK_INCLUDE_DIRS_SOURCE_TREE ${VTK_INCLUDE_DIRS_SOURCE_TREE}
   ${VTK_SOURCE_DIR}/Common/Testing/Cxx
@@ -141,3 +143,8 @@
 VTK_THIRD_PARTY_INCLUDE(PNG  png)
 VTK_THIRD_PARTY_INCLUDE(TIFF tiff)
 VTK_THIRD_PARTY_INCLUDE(EXPAT expat)
+
+IF(VTK_USE_ANSI_STDLIB)
+  VTK_THIRD_PARTY_INCLUDE(DICOMParser DICOMParser)
+ENDIF(VTK_USE_ANSI_STDLIB)
+


Update Hunter

Update Hunter

--- common.cmake
+++ common.cmake
@@ -5,7 +5,7 @@
 # * https://github.com/ruslo/hunter
 include("${CMAKE_CURRENT_LIST_DIR}/cmake/HunterGate.cmake")
 HunterGate(
-    URL "https://github.com/ruslo/hunter/archive/v0.12.23.tar.gz"
-    SHA1 "e1aad873adb4d0cd254c070f3e1a1c181d8daaea"
+    URL "https://github.com/ruslo/hunter/archive/v0.15.6.tar.gz"
+    SHA1 "3dc0cd2ccbc52e8be93967dbc583303a1e825aa2"
     ${CONFIG_FILE}
 )


fixed ifdef warning

fixed ifdef warning


PKG: deactivate extra libs when building Qt4

--- SuperBuild/CMake/External_qt4.cmake
+++ SuperBuild/CMake/External_qt4.cmake
@@ -66,7 +66,7 @@
       INSTALL_DIR ${SB_INSTALL_PREFIX}
       DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
       CONFIGURE_COMMAND
-        ${QT4_SB_SRC}/configure -prefix ${SB_INSTALL_PREFIX} -opensource -confirm-license -release -shared -nomake demos -nomake examples -nomake tools -no-phonon-backend -no-phonon -no-script -no-scripttools -no-multimedia -no-webkit -qt-sql-sqlite -plugin-sql-sqlite -no-nis -no-qt3support  -system-zlib -system-libpng -system-libtiff -system-libjpeg -system-sqlite -L ${SB_INSTALL_PREFIX}/lib -I ${SB_INSTALL_PREFIX}/include -I ${SB_INSTALL_PREFIX}/include/freetype2
+        ${QT4_SB_SRC}/configure -prefix ${SB_INSTALL_PREFIX} -opensource -confirm-license -release -shared -nomake demos -nomake examples -nomake tools -no-phonon-backend -no-phonon -no-script -no-scripttools -no-multimedia -no-webkit -qt-sql-sqlite -plugin-sql-sqlite -no-nis -no-qt3support  -system-zlib -system-libpng -system-libtiff -system-libjpeg -system-sqlite -L ${SB_INSTALL_PREFIX}/lib -I ${SB_INSTALL_PREFIX}/include -I ${SB_INSTALL_PREFIX}/include/freetype2 -no-xrender -no-fontconfig -no-sm
       DEPENDS ${${proj}_DEPENDENCIES}
       )
   endif()


ENH: start each line with newline when patching

--- SuperBuild/CMake/post_install.cmake
+++ SuperBuild/CMake/post_install.cmake
@@ -12,12 +12,11 @@
       set(CODE_SNIPPET "${CODE_SNIPPET} \nget_filename_component(DEPS_INSTALL_DIR \"$${}{DEPS_INSTALL_DIR}\" PATH)" )
     endforeach()
     string(REPLACE "${MATCH}" "$${}{DEPS_INSTALL_DIR}" cmake_file_CONTENTS_NEW ${cmake_file_CONTENTS})
-    file(WRITE "${cmake_file}"
-      "# This file is modified by OTB after installation.\n"
-      "# For example, see POST_INSTALL_* step in OTB/SuperBuild/CMake/External_itk.cmake \n"
-      "# BEGIN CODE BLOCK FROM OTB SUPERBUILD\n"
-      "${CODE_SNIPPET}\n"
-      "# END CODE BLOCK FROM OTB SUPERBUILD\n"
-      "${cmake_file_CONTENTS_NEW}\n")
+    file(WRITE "${cmake_file}"  "# This file is modified by OTB after installation.
+      \n# For example, see POST_INSTALL_* step in OTB/SuperBuild/CMake/External_itk.cmake
+      \n# BEGIN CODE BLOCK FROM OTB SUPERBUILD
+      \n${CODE_SNIPPET}
+      \n# END CODE BLOCK FROM OTB SUPERBUILD
+      \n${cmake_file_CONTENTS_NEW}")
   endif()
 endforeach() #foreach(cmake_file


Remove mkblctrl from default.cmake

Remove mkblctrl from default.cmake

Mkblctrl needs to be removed for the build to now succeed.

--- boards/mro/ctrl-zero-h7-oem/default.cmake
+++ boards/mro/ctrl-zero-h7-oem/default.cmake
@@ -37,7 +37,6 @@
 		lights/rgbled
 		lights/rgbled_ncp5623c
 		magnetometer # all available magnetometer drivers
-		mkblctrl
 		optical_flow # all available optical flow drivers
 		#osd
 		pca9685


CMakeLists.txt based on makefile.vc

CMakeLists.txt based on makefile.vc

--- CMake/External_libtiff.cmake
+++ CMake/External_libtiff.cmake
@@ -24,10 +24,15 @@
   endif()

   if(MSVC)
-
+    #is JPEG required for linux also?
+    if(NOT USE_SYSTEM_JPEG)
+        list(APPEND ${proj}_DEPENDENCIES JPEG)
+    endif()
+
     set(TIFF_SB_ZLIB_CONFIG)
-    set(ZLIB_DIR ${CMAKE_INSTALL_PREFIX})
-    configure_file(${CMAKE_SOURCE_DIR}/patches/${proj}/nmake.opt ${TIFF_SB_BUILD_DIR}/nmake.opt)
+    STRING(REGEX REPLACE "/$" "" CMAKE_WIN_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
+    STRING(REGEX REPLACE "/" "\\\\" CMAKE_WIN_INSTALL_PREFIX ${CMAKE_WIN_INSTALL_PREFIX})
+    configure_file(${CMAKE_SOURCE_DIR}/patches/${proj}/nmake.opt ${CMAKE_BINARY_DIR}/nmake_libtiff_extra.opt)

      ExternalProject_Add(${proj}_build
       PREFIX ${proj}
@@ -37,7 +42,7 @@
       BINARY_DIR ${TIFF_SB_SRC}
       INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
       DEPENDS ${${proj}_DEPENDENCIES}
-      PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${TIFF_SB_BUILD_DIR}/nmake.opt ${TIFF_SB_SRC}
+      PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/nmake_libtiff_extra.opt ${TIFF_SB_SRC}/nmake.opt
       CONFIGURE_COMMAND ""
       BUILD_COMMAND nmake /f ${TIFF_SB_SRC}/Makefile.vc
       INSTALL_COMMAND ${CMAKE_COMMAND} -E copy  ${CMAKE_SOURCE_DIR}/patches/${proj}/CMakeLists.txt


Prefix the conditional copying CMake code with "surgsim_".

--- CMake/SurgSimUtilities.cmake
+++ CMake/SurgSimUtilities.cmake
@@ -30,9 +30,9 @@
 # should be a add_custom_command "generator expression") evaluates to 1.
 #
 # Note the use of optional arguments:
-#   copy_to_target_directory_if(<condition> <target> [<file>...])
-#
-function(copy_to_target_directory_if CONDITION TARGET)
+#   surgsim_copy_to_target_directory_if(<condition> <target> [<file>...])
+#
+function(surgsim_copy_to_target_directory_if CONDITION TARGET)
 	foreach(FILE ${ARGN})
 		if(NOT "${FILE}" STREQUAL "")
 			# After much experimentation (and cmake-gui crashes), I learned
@@ -65,30 +65,31 @@
 # target is built successfully.
 #
 # Note the use of optional arguments:
-#   copy_to_target_directory(<target> [<file>...])
-#
-macro(copy_to_target_directory TARGET)
-	copy_to_target_directory_if(1 "${TARGET}" ${ARGN})
+#   surgsim_copy_to_target_directory(<target> [<file>...])
+#
+macro(surgsim_copy_to_target_directory TARGET)
+	surgsim_copy_to_target_directory_if(1 "${TARGET}" ${ARGN})
 endmacro()

 # Copy zero or more files to the location of a built *Debug* target,
 # after the target is built successfully.
 #
 # Note the use of optional arguments:
-#   copy_to_target_directory_for_debug(<target> [<file>...])
-#
-macro(copy_to_target_directory_for_debug TARGET)
-	copy_to_target_directory_if($<CONFIG:Debug> "${TARGET}" ${ARGN})
+#   surgsim_copy_to_target_directory_for_debug(<target> [<file>...])
+#
+macro(surgsim_copy_to_target_directory_for_debug TARGET)
+	surgsim_copy_to_target_directory_if($<CONFIG:Debug> "${TARGET}" ${ARGN})
 endmacro()

 # Copy zero or more files to the location of a built *non-Debug*
 # target, after the target is built successfully.
 #
 # Note the use of optional arguments:
-#   copy_to_target_directory_for_release(<target> [<file>...])
-#
-macro(copy_to_target_directory_for_release TARGET)
-	copy_to_target_directory_if($<NOT:$<CONFIG:Debug>> "${TARGET}" ${ARGN})
+#   surgsim_copy_to_target_directory_for_release(<target> [<file>...])
+#
+macro(surgsim_copy_to_target_directory_for_release TARGET)
+	surgsim_copy_to_target_directory_if($<NOT:$<CONFIG:Debug>>
+		"${TARGET}" ${ARGN})
 endmacro()

 # Builds the unit test executable or library (unless disabled).
@@ -108,10 +109,11 @@
 		add_executable(${TESTNAME} ${UNIT_TEST_SOURCES} ${UNIT_TEST_HEADERS})
 		target_link_libraries(${TESTNAME} gtest_main ${LIBS})
 		# copy all ${UNIT_TEST_SHARED..._LIBS} to the test executable directory:
-		copy_to_target_directory_for_debug(${TESTNAME} ${UNIT_TEST_SHARED_LIBS})
-		copy_to_target_directory_for_release(${TESTNAME}
+		surgsim_copy_to_target_directory(${TESTNAME}
+			${UNIT_TEST_SHARED_LIBS})
+		surgsim_copy_to_target_directory_for_release(${TESTNAME}
 			${UNIT_TEST_SHARED_RELEASE_LIBS})
-		copy_to_target_directory_for_debug(${TESTNAME}
+		surgsim_copy_to_target_directory_for_debug(${TESTNAME}
 			${UNIT_TEST_SHARED_DEBUG_LIBS})
 	endif()
 endmacro()


include for find_package_handle_standard_args; fixes #11

--- modules/math_libs.cmake
+++ modules/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)


Add temporary fix for finsing jni plugin

--- cmake/Modules/SafeCheckSymbolExists.cmake
+++ cmake/Modules/SafeCheckSymbolExists.cmake
@@ -20,15 +20,13 @@
 			CMAKE_C_FLAGS
 			${CMAKE_C_FLAGS})

-	cmake_push_check_state (RESET)
 	get_directory_property (DEFS COMPILE_DEFINITIONS)
 	prepend (DEFS "-D" ${DEFS})
 	list (APPEND CMAKE_REQUIRED_DEFINITIONS
 		     ${DEFS})

 	check_symbol_exists ("${SYMBOL}" "${FILES}" "${VARIABLE}")
-
-	cmake_pop_check_state ()
+
 	set (CMAKE_C_FLAGS ${CMAKE_C_FLAGS_OLD})
 endmacro ()


Added additional path to test for opencv

--- cmake/CMakeModules/FindOpenCV.cmake
+++ cmake/CMakeModules/FindOpenCV.cmake
@@ -33,7 +33,8 @@
           PATHS
           $ENV{OPENCV_HOME}/include
           /usr/include
-          /usr/local/include)
+          /usr/local/include
+          /usr/local/opencv-3.2)

 macro(FIND_OPENCV_LIBRARY MYLIBRARY MYLIBRARYNAME)

@@ -43,7 +44,8 @@
       $ENV{OPENCV_HOME}/lib
       /usr/lib64
       /usr/lib
-      /usr/local/lib)
+      /usr/local/lib
+      /usr/local/opencv-3.2)

 endmacro(FIND_OPENCV_LIBRARY MYLIBRARY MYLIBRARYNAME)


cmake/target_arm: Use NO_SPLIT for TOOLCHAIN_LD_FLAGS

The whole set of architecture flags must be specified together as
they might not make sense in isolation, e.g. -mfloat-abi=hard requires
a -mcpu value that might have an FPU. Use the NO_SPLIT feature to
bind all of the linker options together so that the linker can
compute the correct linker paths for toolchain-provided libraries like
libc and libgcc.

Signed-off-by: Keith Packard <fd7f967895e9f35e58ec8a62a847a54d7fa7275f@keithp.com>

--- cmake/compiler/gcc/target_arm.cmake
+++ cmake/compiler/gcc/target_arm.cmake
@@ -1,18 +1,17 @@
 # SPDX-License-Identifier: Apache-2.0
-list(APPEND TOOLCHAIN_C_FLAGS   -mcpu=${GCC_M_CPU})
-list(APPEND TOOLCHAIN_LD_FLAGS  -mcpu=${GCC_M_CPU})
+
+set(ARM_C_FLAGS)
+
+list(APPEND ARM_C_FLAGS   -mcpu=${GCC_M_CPU})

 if(CONFIG_COMPILER_ISA_THUMB2)
-  list(APPEND TOOLCHAIN_C_FLAGS   -mthumb)
-  list(APPEND TOOLCHAIN_LD_FLAGS  -mthumb)
+  list(APPEND ARM_C_FLAGS   -mthumb)
 endif()

-list(APPEND TOOLCHAIN_C_FLAGS -mabi=aapcs)
-list(APPEND TOOLCHAIN_LD_FLAGS -mabi=aapcs)
+list(APPEND ARM_C_FLAGS -mabi=aapcs)

 if(CONFIG_FPU)
-  list(APPEND TOOLCHAIN_C_FLAGS   -mfpu=${GCC_M_FPU})
-  list(APPEND TOOLCHAIN_LD_FLAGS  -mfpu=${GCC_M_FPU})
+  list(APPEND ARM_C_FLAGS   -mfpu=${GCC_M_FPU})

   if(CONFIG_DCLS AND NOT CONFIG_FP_HARDABI)
     # If the processor is equipped with VFP and configured in DCLS topology,
@@ -22,20 +21,18 @@
   endif()

   if    (CONFIG_FP_HARDABI OR FORCE_FP_HARDABI)
-    list(APPEND TOOLCHAIN_C_FLAGS   -mfloat-abi=hard)
-    list(APPEND TOOLCHAIN_LD_FLAGS  -mfloat-abi=hard)
+    list(APPEND ARM_C_FLAGS   -mfloat-abi=hard)
   elseif(CONFIG_FP_SOFTABI)
-    list(APPEND TOOLCHAIN_C_FLAGS   -mfloat-abi=softfp)
-    list(APPEND TOOLCHAIN_LD_FLAGS  -mfloat-abi=softfp)
+    list(APPEND ARM_C_FLAGS   -mfloat-abi=softfp)
   endif()
 endif()

 if(CONFIG_FP16)
   if    (CONFIG_FP16_IEEE)
-    list(APPEND TOOLCHAIN_C_FLAGS   -mfp16-format=ieee)
-    list(APPEND TOOLCHAIN_LD_FLAGS  -mfp16-format=ieee)
+    list(APPEND ARM_C_FLAGS   -mfp16-format=ieee)
   elseif(CONFIG_FP16_ALT)
-    list(APPEND TOOLCHAIN_C_FLAGS   -mfp16-format=alternative)
-    list(APPEND TOOLCHAIN_LD_FLAGS  -mfp16-format=alternative)
+    list(APPEND ARM_C_FLAGS   -mfp16-format=alternative)
   endif()
 endif()
+list(APPEND TOOLCHAIN_C_FLAGS ${ARM_C_FLAGS})
+list(APPEND TOOLCHAIN_LD_FLAGS NO_SPLIT ${ARM_C_FLAGS})


ADD primitive test to check if exec windows dependancies installer is needed in continous build

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

--- trunk/test/openVibeTests.cmake
+++ trunk/test/openVibeTests.cmake
@@ -87,11 +87,16 @@
 set(CTEST_UPDATE_COMMAND               "${CTEST_SVN_COMMAND}")

-
+SET(NEED_CONFIGURE TRUE)
 IF(WIN32)
 	## -- Configure Command
+	IF(${MODEL} MATCHES Continuous)
+		IF(EXISTS "${CTEST_SOURCE_DIRECTORY}/dependencies/Uninstall.exe")
+			SET(NEED_CONFIGURE FALSE)
+		ENDIF(EXISTS "${CTEST_SOURCE_DIRECTORY}/dependencies/Uninstall.exe")
+	ENDIF(${MODEL} MATCHES Continuous)
 	set(CTEST_CONFIGURE_COMMAND            "${CTEST_SOURCE_DIRECTORY}/scripts/win32-install_dependencies.exe /S")
-
+
 	## -- Build Command
 	set(CTEST_BUILD_COMMAND                "cmd /C \"win32-build.cmd --no-pause\"")
 ELSE(WIN32)
@@ -147,45 +152,47 @@
 message(" -- Start dashboard ${MODEL} - ${CTEST_BUILD_NAME} --")
 ctest_start(${MODEL} TRACK ${MODEL})

-set(ALL_OK "TRUE")
+set(ALL_OK TRUE)

 ## -- Update
-IF(ALL_OK MATCHES "TRUE")
+IF(ALL_OK)
 	message(" -- Update ${MODEL} - ${CTEST_BUILD_NAME} --")
 	ctest_update( SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res)
 	IF(res==-1)
 		message(SEND_ERROR "  Update failed.")
-		set(ALL_OK "FALSE")
+		set(ALL_OK FALSE)
 	ENDIF(res==-1)
-ENDIF(ALL_OK MATCHES "TRUE")
+ENDIF(ALL_OK)

 ## -- Configure
-IF(ALL_OK MATCHES "TRUE")
-	message(" -- Configure ${MODEL} - ${CTEST_BUILD_NAME} --")
-	ctest_configure(BUILD  "${CTEST_SOURCE_DIRECTORY}/scripts" SOURCE "${CTEST_SOURCE_DIRECTORY}/scripts" RETURN_VALUE res)
-	IF(res!=0)
-		message(SEND_ERROR "  Configure failed.")
-		set(ALL_OK "FALSE")
-	ENDIF(res!=0)
-ENDIF(ALL_OK MATCHES "TRUE")
+IF(ALL_OK)
+	IF(NEED_CONFIGURE)
+		message(" -- Configure ${MODEL} - ${CTEST_BUILD_NAME} --")
+		ctest_configure(BUILD  "${CTEST_SOURCE_DIRECTORY}/scripts" SOURCE "${CTEST_SOURCE_DIRECTORY}/scripts" RETURN_VALUE res)
+		IF(res!=0)
+			message(SEND_ERROR "  Configure failed.")
+			set(ALL_OK FALSE)
+		ENDIF(res!=0)
+	ENDIF(NEED_CONFIGURE)
+ENDIF(ALL_OK)

 ## -- BUILD
-IF(ALL_OK MATCHES "TRUE")
+IF(ALL_OK)
 	message(" -- Build ${MODEL} - ${CTEST_BUILD_NAME} --")
 	ctest_build(BUILD  "${CTEST_SOURCE_DIRECTORY}/scripts" SOURCE "${CTEST_SOURCE_DIRECTORY}/scripts" RETURN_VALUE res)
 	IF(res!=0)
 		message(SEND_ERROR "  Build failed.")
-		set(ALL_OK "FALSE")
+		set(ALL_OK FALSE)
 	ENDIF(res!=0)
-ENDIF(ALL_OK MATCHES "TRUE")
+ENDIF(ALL_OK)

 ## -- TEST
-IF(ALL_OK MATCHES "TRUE")
+IF(ALL_OK)
 	message(" -- Test ${MODEL} - ${CTEST_BUILD_NAME} --")
 	set( $ENV{CTEST_BINARY_DIRECTORY}    "${CTEST_BINARY_DIRECTORY}" )
 	ctest_test(BUILD  "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
 	message(STATUS "  INFO : ctest_test(...) returned '${res}'")
-ENDIF(ALL_OK MATCHES "TRUE")
+ENDIF(ALL_OK)

 ## -- SUBMIT
 message(" -- Submit ${MODEL} - ${CTEST_BUILD_NAME} --")


Fix bug in setting of extra dirs

Fix bug in setting of extra dirs

Remove use of DEFINED flag in if statements for CMake, Fhicl and GDML
directories. This prevented resetting of variables in local scope.
Setting now follows (exactly) that used in upstream GNUInstallDirs
for setting dependent variables.

--- Modules/CetInstallDirs.cmake
+++ Modules/CetInstallDirs.cmake
@@ -99,7 +99,7 @@
 # Assumed that CMake Package Configuration files are architecture dependent
 # Not *always* true, but gives a good default
 # TODO: See if this could be chosen..
-if(NOT DEFINED CMAKE_INSTALL_CMAKEDIR)
+if(NOT CMAKE_INSTALL_CMAKEDIR)
   set(CMAKE_INSTALL_CMAKEDIR "" CACHE PATH "CMake package configuration files (LIBDIR/cmake)")
   set(CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake")
 endif()
@@ -107,7 +107,7 @@
 # FHICL files are always architecture independent
 # - Policy at present is to follow other man/doc style and use "fhicl/PROJECT_NAME"
 #   Could equally use PROJECT_NAME/fhicl as default if better fit
-if(NOT DEFINED CMAKE_INSTALL_FHICLDIR)
+if(NOT CMAKE_INSTALL_FHICLDIR)
   set(CMAKE_INSTALL_FHICLDIR "" CACHE PATH "FHICL configuration files (DATAROOTDIR/fhicl/PROJECT_NAME)")
   set(CMAKE_INSTALL_FHICLDIR "${CMAKE_INSTALL_DATAROOTDIR}/fhicl/${PROJECT_NAME}")
 endif()
@@ -115,7 +115,7 @@
 # GDML files are always architecture independent
 # - Policy at present is to follow other man/doc style and use "gdml/PROJECT_NAME"
 #   Could equally use PROJECT_NAME/gdml as default if better fit
-if(NOT DEFINED CMAKE_INSTALL_GDMLDIR)
+if(NOT CMAKE_INSTALL_GDMLDIR)
   set(CMAKE_INSTALL_GDMLDIR "" CACHE PATH "GDML configuration files (DATAROOTDIR/gdml/PROJECT_NAME)")
   set(CMAKE_INSTALL_GDMLDIR "${CMAKE_INSTALL_DATAROOTDIR}/gdml/${PROJECT_NAME}")
 endif()


add statusor to cmake

add statusor to cmake

--- cmake/cpp.cmake
+++ cmake/cpp.cmake
@@ -33,6 +33,7 @@
   absl::meta
   absl::stacktrace
   absl::status
+  absl::statusor
   absl::str_format
   absl::strings
   absl::synchronization


nya_fetch

--- cmake/nya.cmake
+++ cmake/nya.cmake
@@ -14,8 +14,39 @@
 add_definitions(-DELPP_THREAD_SAFE)                     # thread name

 # gui application setting
-if (APPLE)
+if(APPLE)
     set(OS_BUNDLE MACOSX_BUNDLE)
 elseif(WIN32)
     set(OS_BUNDLE WIN32)
-endif()+endif()
+
+# FetchContent into ../folder_name
+# nya_fetch(<url> <tag> <folder_name>)
+macro(nya_fetch)
+    if(NOT ${ARGC} EQUAL 0)
+        if(${ARGC} GREATER 1)
+            set(FETCH_TAG ${ARGV1})
+        else()
+            set(FETCH_TAG master)
+        endif()
+
+        if(${ARGC} GREATER 2)
+            set(FETCH_NAME ${ARGV2})
+        else()
+            get_filename_component(FETCH_NAME ${ARGV0} NAME_WE)
+        endif()
+
+        get_filename_component(FETCH_ROOT ${CMAKE_SOURCE_DIR}/../${FETCH_NAME}  ABSOLUTE)
+        get_filename_component(BINARY_DIR_NAME ${CMAKE_BINARY_DIR} NAME)
+
+        message("++ fetch: " ${FETCH_ROOT})
+
+        FetchContent_Declare(${FETCH_NAME}
+                GIT_REPOSITORY ${ARGV0}
+                GIT_TAG        ${FETCH_TAG}
+                SOURCE_DIR     ${FETCH_ROOT}
+                BINARY_DIR     ${FETCH_ROOT}/${BINARY_DIR_NAME}
+                )
+        FetchContent_MakeAvailable(${FETCH_NAME})
+    endif()
+endmacro(nya_fetch)


cmake: Add Python interpreter as dependency of tools

--- BasisProject.cmake
+++ BasisProject.cmake
@@ -66,8 +66,11 @@
     }"
     #<dependency>
   OPTIONAL_DEPENDS
+    Python{Interp}
     TBB{tbb}
     #<optional-dependency>
+  TOOLS_DEPENDS
+    Python{Interp}
   TEST_DEPENDS
     #<test-dependency>
   OPTIONAL_TEST_DEPENDS


remove boost.math from build

remove boost.math from build

* it was previously removed from build for Linux with Clang
* removed for Linux/Clang on 2015.03.11 with commit message "boost math crashes clang"
* not sure what version of Clang, boost version 1.57.0
* whether or not that is still the case I haven't verified
  * either way: until there is an argument for using boost.math it is disabled from default build, for now

issue https://github.com/smanders/externpro/issues/202

--- projects/boost.cmake
+++ projects/boost.cmake
@@ -234,7 +234,8 @@
     address-model=${BUILD_PLATFORM} variant=${boost_VARIANT}
     runtime-link=${boost_RUNTIME_LINK} toolset=${boost_TOOLSET} ${boost_FLAGS}
     )
-  foreach(lib locale mpi python) # libraries with build issues
+  # libraries with build issues
+  foreach(lib locale math mpi python)
     list(APPEND boost_BUILD --without-${lib})
   endforeach()
   # TRICKY: need zlib, bzip2 include directories at cmake-time (before they're built)
@@ -254,9 +255,6 @@
     list(APPEND boost_BUILD -s ZLIB_BINARY=zlibstatic_${zlibVer}${CMAKE_RELEASE_POSTFIX})
     list(APPEND boost_BUILD -s BZIP2_BINARY=bz2_${bzip2Ver}${CMAKE_RELEASE_POSTFIX})
   endif()
-  if(${CMAKE_SYSTEM_NAME} STREQUAL Linux AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
-    list(APPEND boost_BUILD --without-math)
-  endif()
   set(boost_INSTALL install --libdir=${STAGE_DIR}/lib --includedir=${STAGE_DIR}/include)
   addproject_boost(${bl_PRO}_bld)
   list(APPEND ${bl_PRO}_DEPENDS ${bl_PRO}_bld) # serialize the build


Set the default buildtype to RelWithDebInfo.

--- cmake/Modules/DefineCMakeDefaults.cmake
+++ cmake/Modules/DefineCMakeDefaults.cmake
@@ -20,9 +20,9 @@

 # Set the default build type to release with debug info
 if (NOT CMAKE_BUILD_TYPE)
-	set(CMAKE_BUILD_TYPE Debug
-		CACHE STRING
-			"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
-		FORCE
-	)
+  set(CMAKE_BUILD_TYPE RelWithDebInfo
+    CACHE STRING
+      "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
+    FORCE
+  )
 endif (NOT CMAKE_BUILD_TYPE)


Haskell: Fix mismatched arguments in if-statement

This commit closes #1961.

--- cmake/Modules/LibAddHaskellPlugin.cmake
+++ cmake/Modules/LibAddHaskellPlugin.cmake
@@ -239,9 +239,9 @@
 				remove_plugin (${target} "GHC_RTS_LIB not found")
 			endif (GHC_RTS_LIB)

-		else (FINDEX GREATER -1)
+		else (HAVE_HASKELL_BINDING)
 			remove_plugin (${target} "haskell bindings are not included in the cmake configuration")
-		endif (FINDEX GREATER -1)
+		endif (HAVE_HASKELL_BINDING)
 		else (HASKELL_FOUND)
 			remove_plugin (${target} ${HASKELL_NOTFOUND_INFO})
 		endif (HASKELL_FOUND)


Qt 5.9 Windows: Link 'Qt5EventDispatcherSupport.lib'

--- cmake/Qt5Widgets_HunterPlugin_5_9.cmake
+++ cmake/Qt5Widgets_HunterPlugin_5_9.cmake
@@ -304,6 +304,13 @@
       "${_qt_install_prefix}/lib/Qt5FontDatabaseSupport.lib"
       "${_qt_install_prefix}/lib/Qt5FontDatabaseSupportd.lib"
   )
+
+  # defined: QWindowsGuiEventDispatcher::QWindowsGuiEventDispatcher(class QObject *)
+  _qt_cmake_extra_helpers_add_interface_release_debug(
+      Qt5::Widgets
+      "${_qt_install_prefix}/lib/Qt5EventDispatcherSupport.lib"
+      "${_qt_install_prefix}/lib/Qt5EventDispatcherSupportd.lib"
+  )
 elseif(MINGW)
   _qt_cmake_extra_helpers_add_source(
       Qt5::Widgets


Allow CommonCPPCTest in multiple directories

--- CommonCPPCTest.cmake
+++ CommonCPPCTest.cmake
@@ -64,10 +64,14 @@
   endif()
 endforeach()

-add_custom_target(run_cpp_tests
-  COMMAND ${CMAKE_CTEST_COMMAND} \${ARGS} DEPENDS ${ALL_CPP_TESTS}
-  WORKING_DIRECTORY ${${CMAKE_PROJECT_NAME}_BINARY_DIR}
-  COMMENT "Running all cpp unit tests")
-if(COVERAGE)
-  add_dependencies(run_cpp_tests lcov-clean)
+if(TARGET run_cpp_tests)
+  add_dependencies(run_cpp_tests ${ALL_CPP_TESTS})
+else()
+  add_custom_target(run_cpp_tests
+    COMMAND ${CMAKE_CTEST_COMMAND} \${ARGS} DEPENDS ${ALL_CPP_TESTS}
+    WORKING_DIRECTORY ${${CMAKE_PROJECT_NAME}_BINARY_DIR}
+    COMMENT "Running all cpp unit tests")
+  if(COVERAGE)
+    add_dependencies(run_cpp_tests lcov-clean)
+  endif()
 endif()


BUG: resolved double compilation of tubetk for valgrind computation

--- CMake/DashboardScripts/memory.cmake
+++ CMake/DashboardScripts/memory.cmake
@@ -24,7 +24,7 @@
 cmake_minimum_required(VERSION 2.8)

 set( SCRIPT_NAME "Memory" )
-set( SCRIPT_BINARY_SUBDIR "" )
+set( SCRIPT_BINARY_SUBDIR "TubeTK-Build" )
 set( SCRIPT_TubeTK_USE_SUPERBUILD OFF )

 include( ${SITE_SCRIPT_DIR}/cmakecache.cmake )
@@ -35,5 +35,5 @@
 ctest_configure( BUILD "${CTEST_BINARY_DIRECTORY}" )
 ctest_read_custom_files( "${CTEST_BINARY_DIRECTORY}" )
 ctest_build( BUILD "${CTEST_BINARY_DIRECTORY}" )
-ctest_memcheck( BUILD "${CTEST_BINARY_DIRECTORY}/TubeTK-Build" )
+ctest_memcheck( BUILD "${CTEST_BINARY_DIRECTORY}" )
 ctest_submit( PARTS MemCheck )


Issue #51: Turn off IPP on Mac.

Issue #51: Turn off IPP on Mac.

--- CMake/ExternalProjects/OpenCV.cmake
+++ CMake/ExternalProjects/OpenCV.cmake
@@ -62,6 +62,7 @@
   else()
     list(APPEND _vtk_options
       -DWITH_LAPACK:BOOL=OFF
+      -DWITH_IPP:BOOL=OFF
     )
   endif()


Fix install of tools PDBs in debug mode

Fix install of tools PDBs in debug mode

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -363,7 +363,7 @@
     ogre_install_target(${TOOLNAME} "" FALSE)
     if (OGRE_INSTALL_PDB)
       # install debug pdb files
-      install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_DEBUG_PATH}/${TOOLNAME}.pdb
+      install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_DEBUG_PATH}/${TOOLNAME}_d.pdb
         DESTINATION bin${OGRE_DEBUG_PATH}
         CONFIGURATIONS Debug
         )


fixed up includes - now it's at least compiling.

--- core/source/configure/version.cpp.cmake
+++ core/source/configure/version.cpp.cmake
@@ -4,7 +4,10 @@
 # * License, v. 2.0. If a copy of the MPL was not distributed with this
 # * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

+#include "zinc/status.h"
 #include "zinc/context.h"
+#include "general/mystring.h"
+#include <string.h>

 static const int ZINC_MAJOR_VERSION = @Zinc_VERSION_MAJOR@;
 static const int ZINC_MINOR_VERSION = @Zinc_VERSION_MINOR@;


Correction  :ajout des " " "${FLUID_COMMAND}" car si chaine vide, erreur CMake. GET_FILENAME_COMPONENT(FLUID_FILE_NAME "${FLUID_COMMAND}" NAME )

--- otbGenerateOTBConfig.cmake
+++ otbGenerateOTBConfig.cmake
@@ -75,7 +75,7 @@
         SET(OTB_FLTK_LIBRARY_DIRS ${FLTK_LIBRARY_DIRS})
         SET(OTB_FLTK_EXECUTABLE_DIRS ${FLTK_EXECUTABLE_DIRS})
 ELSE(OTB_USE_EXTERNAL_FLTK)
-        GET_FILENAME_COMPONENT(FLUID_FILE_NAME ${FLUID_COMMAND} NAME )
+        GET_FILENAME_COMPONENT(FLUID_FILE_NAME "${FLUID_COMMAND}" NAME )
         SET(OTB_FLUID_COMMAND ${CMAKE_INSTALL_PREFIX}/bin/${FLUID_FILE_NAME})
         SET(OTB_FLTK_FLUID_EXECUTABLE ${OTB_FLUID_COMMAND})
         SET(OTB_FLTK_LIBRARY_DIRS ${CMAKE_INSTALL_PREFIX}/lib)


update sha1 for PointCloudLibraryPlugin

update sha1 for PointCloudLibraryPlugin

--- distro/superbuild/cmake/externals.cmake
+++ distro/superbuild/cmake/externals.cmake
@@ -483,12 +483,13 @@

 ExternalProject_Add(PointCloudLibraryPlugin
   GIT_REPOSITORY https://github.com/patmarion/PointCloudLibraryPlugin.git
-  GIT_TAG a88aa5a
+  GIT_TAG 2b1bdfe
   CMAKE_CACHE_ARGS
     ${default_cmake_args}
     ${eigen_args}
     ${boost_args}
     ${flann_args}
+    ${python_args}
     ${vtk_args}
     -DPCL_REQUIRED_VERSION:STRING=1.8.0
   DEPENDS


SuperBuild: itk: .tar.xz -> tar.gz. cmake 3.0 cannot handle .xz

CMake bug: https://cmake.org/Bug/print_bug_page.php?bug_id=13515

--- SuperBuild/CMake/External_itk.cmake
+++ SuperBuild/CMake/External_itk.cmake
@@ -137,8 +137,8 @@

 ExternalProject_Add(ITK
   PREFIX ITK
-  URL "https://sourceforge.net/projects/itk/files/itk/4.10/InsightToolkit-4.10.0.tar.xz"
-  URL_MD5 15beb120e580ce85117496795746e628
+  URL "http://downloads.sourceforge.net/project/itk/itk/4.10/InsightToolkit-4.10.0.tar.gz"
+  URL_MD5 8c67ba296da3835fb67bb29d98dcff3e
   SOURCE_DIR ${ITK_SB_SRC}
   BINARY_DIR ${ITK_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}


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 08)

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


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   22)
+SET(KWSYS_DATE_STAMP_DAY   23)


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 04)

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


Update Go language support to 1.1rc3

Update Go language support to 1.1rc3

--- golang.cmake
+++ golang.cmake
@@ -11,9 +11,9 @@
 include (BuildSupport)

 external_source (golang
-    1.0.3
-    go1.0.3.src.tar.gz
-    31acddba58b4592242a3c3c16165866b
+    1.1
+    go1.1rc3.src.tar.gz
+    d51ff5dc4cdae52e2d30150f4562b8ec
     http://go.googlecode.com/files)

 message ("Installing ${golang_NAME} into build area: ${BUILDEM_DIR} ...")
@@ -24,8 +24,9 @@
     UPDATE_COMMAND    ""
     # For patch discussion see:
     # https://groups.google.com/forum/?fromgroups=#!topic/golang-nuts/bHHI3jmZM7o
-    PATCH_COMMAND     patch -R ${golang_SRC_DIR}/src/pkg/crypto/x509/x509.go
-         ${BUILDEM_REPO_DIR}/patches/golang-1.0.3.patch
+    #PATCH_COMMAND     patch -R ${golang_SRC_DIR}/src/pkg/crypto/x509/x509.go
+    #     ${BUILDEM_REPO_DIR}/patches/golang-1.0.3.patch
+    PATCH_COMMAND     ""
     CONFIGURE_COMMAND ""
     BUILD_COMMAND     ""
     INSTALL_COMMAND   ""


cmake: Make for-production default OFF

cmake: Make for-production default OFF


COMP: Bump ImageViewer version.

COMP: Bump ImageViewer version.

Includes a more reliable FLTK fetch and improves the
error message when file not found.

Change-Id: I451539e29d483b031114e6af0d872a5b4d013f20

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -426,7 +426,7 @@
   set( proj ImageViewer )
   ExternalProject_Add( ImageViewer
     GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/TubeTK/ImageViewer.git"
-    GIT_TAG "b2ac8ef25da64f17b1e2e08ddb5415ec95783515"
+    GIT_TAG "9fbaa236d14a5364893b73c53fd7e20268a0d165"
     SOURCE_DIR "${CMAKE_BINARY_DIR}/ImageViewer"
     BINARY_DIR ImageViewer-Build
     CMAKE_GENERATOR ${gen}


Bug #3192: Pass Mac args for Mavericks builds

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -62,6 +62,15 @@
   -DCMAKE_MODULE_LINKER_FLAGS:STRING=${EP_COMMON_MODULE_LINKER_FLAGS}
   -DCMAKE_SHARED_LINKER_FLAGS:STRING=${EP_COMMON_SHARED_LINKER_FLAGS}
 )
+
+if(APPLE)
+  set(EP_COMMON_ARGS
+       -DCMAKE_OSX_ARCHITECTURES:PATH=${CMAKE_OSX_ARCHITECTURES}
+       -DCMAKE_OSX_DEPLOYMENT_TARGET:PATH=${CMAKE_OSX_DEPLOYMENT_TARGET}
+       -DCMAKE_OSX_SYSROOT:PATH=${CMAKE_OSX_SYSROOT}
+       ${EP_COMMON_ARGS}
+      )
+endif()

 # Compute -G arg for configuring external projects with the same CMake generator:
 IF(CMAKE_EXTRA_GENERATOR)


Update Hunter

Update Hunter

--- common.cmake
+++ common.cmake
@@ -5,7 +5,7 @@
 # * https://github.com/ruslo/hunter
 include("${CMAKE_CURRENT_LIST_DIR}/cmake/HunterGate.cmake")
 HunterGate(
-    URL "https://github.com/ruslo/hunter/archive/v0.12.11.tar.gz"
-    SHA1 "79173425791e1fac4bafdecfc47a4edb994b2b1d"
+    URL "https://github.com/ruslo/hunter/archive/v0.12.22.tar.gz"
+    SHA1 "868408f1f3d8deeaab13f4ebca28b02ec2dfcade"
     ${CONFIG_FILE}
 )


Fixed regular expression (dash character position), added docu.

--- CMake/usFunctionGenerateModuleInit.cmake
+++ CMake/usFunctionGenerateModuleInit.cmake
@@ -24,6 +24,8 @@
 #!        auto-loading will be disabled for this module.
 #! \param DEPENDS (optional) A string containing module dependencies.
 #! \param VERSION (optional) A version string for the module.
+#! \param EXECUTABLE (flag) A flag indicating that the initialization code is intended for
+#! an executable.
 #!
 function(usFunctionGenerateModuleInit src_var)

@@ -43,7 +45,7 @@
   set(US_MODULE_LIBRARY_NAME ${US_MODULE_NAME})
 endif()

-set(_regex_validation "[a-zA-Z-_][a-zA-Z-_0-9]*")
+set(_regex_validation "[a-zA-Z_-][a-zA-Z_0-9-]*")
 if(US_MODULE_EXECUTABLE)
   string(REGEX MATCH ${_regex_validation} _valid_chars ${US_MODULE_NAME})
   if(NOT _valid_chars STREQUAL US_MODULE_NAME)


utils: vlog: tests: v2x_tests: removed unused EXTRA_ARGUMENTS

Signed-off-by: Grzegorz Latosinski <574624477ed0116ef9f8ff1ead5d9d56a6c88da6@antmicro.com>

--- utils/vlog/tests/v2x_tests.cmake
+++ utils/vlog/tests/v2x_tests.cmake
@@ -39,7 +39,6 @@
     NAME ${NAME}_${TYPE}
     FILE ${GOLDEN_XML}
     OUTPUT ${NAME}.${TYPE}.golden.xml
-    EXTRA_ARGUMENTS "-param" "strip_comments" "1"
     )

   set(ACTUAL_XML ${NAME}.${TYPE}.xml)
@@ -47,7 +46,6 @@
     NAME ${NAME}_${TYPE}
     FILE ${ACTUAL_XML}
     OUTPUT ${NAME}.${TYPE}.actual.xml
-    EXTRA_ARGUMENTS "-param" "strip_comments" "1"
     )

   get_rel_target(REL_DIFF_NAME diff ${NAME}.${TYPE}.xml)


update

update

--- modules/fmt.cmake
+++ modules/fmt.cmake
@@ -1,4 +1,7 @@
 if(NOT TARGET fmt)
+
+  # Module includes
+  include_directories("fmt")

   # Module library
   file(GLOB SOURCE_FILES "fmt/fmt/*.cc")


Properly install headers

Properly install headers

--- cmake/GluonMacros.cmake
+++ cmake/GluonMacros.cmake
@@ -35,11 +35,13 @@
     string( TOLOWER ${_target_short} _target_include_dir )

     set_target_properties( ${_target_simple} PROPERTIES
+        FRAMEWORK TRUE
         VERSION ${GLUON_VERSION_STRING}
         SOVERSION ${GLUON_VERSION_STRING}
         DEFINE_SYMBOL MAKE_${_target_uc}_LIB
         EXPORT_NAME ${_target_short}
         COMPILE_FLAGS -DGLUON_DEFAULT_LOG_CATEGORY=GluonCore::${_target_simple}Category
+        PUBLIC_HEADER "${_HEADERS}"
     )

     target_include_directories( ${_target_simple} PUBLIC ${_INCLUDES} )
@@ -52,11 +54,7 @@
         LIBRARY DESTINATION ${LIB_INSTALL_DIR} COMPONENT ${_target}
         ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT ${_target}
         FRAMEWORK DESTINATION ${LIB_INSTALL_DIR} COMPONENT ${_target}
-    )
-
-    install( FILES ${_headers}
-        DESTINATION ${INCLUDE_INSTALL_DIR}/${_target_include_dir}
-        COMPONENT ${_target}
+        PUBLIC_HEADER DESTINATION ${INCLUDE_INSTALL_DIR}/${_target_include_dir} COMPONENT ${_target}_devel
     )

     install( EXPORT ${_target_simple}Targets


More compiler warnings, errors, and optimizations flags

--- cmake/compilation.cmake
+++ cmake/compilation.cmake
@@ -2,7 +2,16 @@
 set(CMAKE_CXX_STANDARD 14)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)

-set(CMAKE_CXX_FLAGS "-Wall -std=c++14")
+set(COMMON_COMPILER_WARNINGS "-Wno-unused-parameter -Wempty-body -Woverloaded-virtual -Wtautological-compare")
+set(CLANG_WARNINGS "-Wnull-arithmetic -Woverriding-method-mismatch")
+set(GCC_WARNINGS "-Wuseless-cast")
+
+# Warnings turned into errors.
+set(COMMON_COMPILER_ERRORS "-Werror=return-type -Werror=delete-incomplete -Werror=delete-non-virtual-dtor -Werror=float-equal -Werror=reorder -Werror=uninitialized -Werror=unreachable-code")
+set(CLANG_ERRORS "-Werror=inconsistent-missing-override -Werror=unused-private-field -Werror=division-by-zero -Werror=return-stack-address")
+set(GCC_ERRORS "")
+
+set(CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic-errors ${COMMON_COMPILER_WARNINGS} ${COMMON_COMPILER_ERRORS} -std=c++14")
 set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
 set(CMAKE_CXX_FLAGS_MINSIZEREL "-O3 -DNDEBUG")
 set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
@@ -11,11 +20,15 @@
 # Some release optimization flags for GCC/Clang.
 if (NOT WIN32)
   # Clang/GCC
-  set(REL_OPTS "-pipe -fvisibility=hidden -fvisibility-inlines-hidden -ffast-math -funroll-loops")
+  set(REL_OPTS "-pipe -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -ffast-math -funroll-loops")

   # GCC only
   if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
     set(REL_OPTS "${REL_OPTS} -fno-implement-inlines")
+
+  # Clang only
+  elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+    set(REL_OPTS "${REL_OPTS} -Ofast")
   endif()

   set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} ${REL_OPTS}")
@@ -23,13 +36,15 @@
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${REL_OPTS}")
 endif()

+message("Compiler ID: ${CMAKE_CXX_COMPILER_ID}")
+
 if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
   execute_process(
     COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
     OUTPUT_VARIABLE GCC_VERSION
     )
   if (NOT (GCC_VERSION VERSION_GREATER 5.0 OR GCC_VERSION VERSION_EQUAL 5.0))
-    MESSAGE(FATAL_ERROR "Requires GCC >= 5.0.")
+    message(FATAL_ERROR "Requires GCC >= 5.0.")
   endif()
 elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
   execute_process(


[cmake] xfailed is not an error ...

[cmake] xfailed is not an error ...

--- cmake/tools4tests.cmake
+++ cmake/tools4tests.cmake
@@ -384,7 +384,7 @@
 macro(add_python_test test_name test_file)
   add_test(${test_name} ${PYTHON_EXECUTABLE} ${TESTS_RUNNER} "${pytest_opt}" ${DRIVE_LETTER}${test_file})
   #    WORKING_DIRECTORY ${SICONOS_SWIG_ROOT_DIR}/tests)
-  set_tests_properties(${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILURE;Exception;failed;ERROR;Assertion")
+  set_tests_properties(${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILURE;Exception;[^x]failed;ERROR;Assertion")
   set_tests_properties(${test_name} PROPERTIES ENVIRONMENT "PYTHONPATH=$ENV{PYTHONPATH}:${CMAKE_BINARY_DIR}/wrap")
   set_tests_properties(${test_name} PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_BINARY_DIR}/wrap/siconos/tests") # for plugins
 endmacro()


Add CMAKE_BACKWARDS_COMPATIBILITY for ctest 2.4 and eariler. Remove dependency on flies-publican and publican, as those functionalities are provided by import.sh

--- flies-selenium/src/test/steer.cmake
+++ flies-selenium/src/test/steer.cmake
@@ -3,6 +3,12 @@
 # Init Definition
 ####################################################################
 SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
+MESSAGE("CMake version=${CMAKE_VERSION}")
+IF (CMAKE_VERSION VERSION_LESS 2.6)
+    MESSAGE("SET CMAKE_BACKWARDS_COMPATIBILITY ${CMAKE_VERSION}")
+    SET(CMAKE_BACKWARDS_COMPATIBILITY ${CMAKE_VERSION})
+ENDIF()
+
 SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR})
 SET(ENV{LC_ALL} "C")
 INCLUDE(BasicMacros.cmake)
@@ -106,16 +112,6 @@
     MESSAGE(SEND_ERROR "ctest not found, install it please.")
 ENDIF()

-FIND_PROGRAM(PUBLICAN_CMD publican)
-IF( ${PUBLICAN_CMD} STREQUAL "PUBLICAN_CMD-NOTFOUND" )
-    MESSAGE(SEND_ERROR "publican not found, install it please.")
-ENDIF()
-
-FIND_PROGRAM(FLIES_PUBLICAN_CMD flies-publican)
-IF( ${FLIES_PUBLICAN_CMD} STREQUAL "FLIES_PUBLICAN_CMD-NOTFOUND" )
-    MESSAGE(SEND_ERROR "flies-publican not found, install it please.")
-ENDIF()
-
 FIND_PROGRAM(SELENIUM_SERVER_CMD selenium-server)
 IF(${SELENIUM_SERVER_CMD} STREQUAL "SELENIUM_SERVER_CMD-NOTFOUND")
     # find selenium server jar


[OGRE-378] Unable to build when using MinGW without samples.

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -113,10 +113,20 @@
 	  endif ()

 	  if (MINGW)
-      install(FILES ${OIS_LIBRARY_DBG} DESTINATION lib/debug CONFIGURATIONS Debug)
-      install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
-      install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/release CONFIGURATIONS Release)
-      install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
+		if (EXISTS ${OIS_LIBRARY_DBG})
+			install(FILES ${OIS_LIBRARY_DBG} DESTINATION lib/debug CONFIGURATIONS Debug)
+		else()
+			install(FILES DESTINATION lib/debug CONFIGURATIONS Debug)
+		endif ()
+		if (EXISTS ${OIS_LIBRARY_REL})
+			install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
+			install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/release CONFIGURATIONS Release)
+			install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
+		else()
+			install(FILES DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
+			install(FILES DESTINATION lib/release CONFIGURATIONS Release)
+			install(FILES DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
+		endif ()
 	  endif () # MINGW
 	endif () # WIN32
 endif () # OGRE_INSTALL_DEPENDENCIES


BUG: Fix link warnings for static build on windows.

--- CMake/vtkPythonWrapping.cmake
+++ CMake/vtkPythonWrapping.cmake
@@ -64,6 +64,11 @@
   endif()
   target_link_libraries(${module_name}PythonD LINK_PUBLIC ${module_name}
     vtkWrappingPythonCore ${extra_links} ${VTK_PYTHON_LIBRARIES})
+
+  if (MSVC)
+    set_target_properties(${module_name}PythonD
+      PROPERTIES STATIC_LIBRARY_FLAGS ${CMAKE_MODULE_LINKER_FLAGS})
+  endif()

   _vtk_add_python_module(${module_name}Python ${module_name}PythonInit.cxx)
   target_link_libraries(${module_name}Python ${module_name}PythonD)


Based on code review by David Manthey: These new test files are being run as part of the CI ctest process. Because this repo isn't quite a simple Girder 2.x plugin, tests have to be added explicitly in the plugin.cmake file.

--- plugin.cmake
+++ plugin.cmake
@@ -158,6 +158,10 @@
     "plugins/HistomicsTK/TCGA-02-0010-01Z-00-DX4.07de2e55-a8fe-40ee-9e98-bcb78050b9f7-crop.tif"
 )

+add_histomicstk_python_test(annotation_and_mask_utils)
+
+add_histomicstk_python_test(annotations_to_masks_handler)
+
 # front-end tests

 add_web_client_test(


Don't skip platform checks

Don't skip platform checks

Otherwise we can't find some libraries (e.g. threads)

--- toolchain/iOS.cmake
+++ toolchain/iOS.cmake
@@ -49,10 +49,6 @@
 set (CMAKE_C_COMPILER /usr/bin/gcc)
 set (CMAKE_CXX_COMPILER /usr/bin/g++)
 set(CMAKE_AR ar CACHE FILEPATH "" FORCE)
-
-# Skip the platform compiler checks for cross compiling
-set (CMAKE_CXX_COMPILER_WORKS TRUE)
-set (CMAKE_C_COMPILER_WORKS TRUE)

 # All iOS/Darwin specific settings - some may be redundant
 set (CMAKE_SHARED_LIBRARY_PREFIX "lib")


Synchronize adm files

Synchronize adm files

--- adm_local_without_kernel/cmake_files/FindSalomeBoost.cmake
+++ adm_local_without_kernel/cmake_files/FindSalomeBoost.cmake
@@ -32,7 +32,7 @@
   # Under windows, one extra sub-directory in the boost installation hierarchy:
   SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Boost Boost_INCLUDE_DIRS 2)
 ELSE()
-  SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Boost Boost_INCLUDE_DIRS 2)
+  SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Boost Boost_INCLUDE_DIRS 1)
 ENDIF()
 IF(Boost_FOUND OR BOOST_FOUND)
    MESSAGE(STATUS "Boost include dirs is: ${Boost_INCLUDE_DIRS}")


detect IvyBridge CPUs and try to have the compiler support RDRND and F16C

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -40,7 +40,9 @@
    if(_vendor_id STREQUAL "GenuineIntel")
       if(_cpu_family EQUAL 6)
          # Any recent Intel CPU except NetBurst
-         if(_cpu_model EQUAL 46)     # Xeon 7500 series
+         if(_cpu_model EQUAL 58)
+            set(TARGET_ARCHITECTURE "ivy-bridge")
+         elseif(_cpu_model EQUAL 46) # Xeon 7500 series
             set(TARGET_ARCHITECTURE "westmere")
          elseif(_cpu_model EQUAL 45) # Xeon TNG
             set(TARGET_ARCHITECTURE "sandy-bridge")
@@ -98,7 +100,7 @@
 endmacro()

 macro(OptimizeForArchitecture)
-   set(TARGET_ARCHITECTURE "auto" CACHE STRING "CPU architecture to optimize for. Using an incorrect setting here can result in crashes of the resulting binary because of invalid instructions used.\nSetting the value to \"auto\" will try to optimize for the architecture where cmake is called.\nOther supported values are: \"none\", \"generic\", \"core\", \"merom\" (65nm Core2), \"penryn\" (45nm Core2), \"nehalem\", \"westmere\", \"sandy-bridge\", \"atom\", \"k8\", \"k8-sse3\", \"barcelona\", \"istanbul\", \"magny-cours\", \"bulldozer\", \"interlagos\".")
+   set(TARGET_ARCHITECTURE "auto" CACHE STRING "CPU architecture to optimize for. Using an incorrect setting here can result in crashes of the resulting binary because of invalid instructions used.\nSetting the value to \"auto\" will try to optimize for the architecture where cmake is called.\nOther supported values are: \"none\", \"generic\", \"core\", \"merom\" (65nm Core2), \"penryn\" (45nm Core2), \"nehalem\", \"westmere\", \"sandy-bridge\", \"ivy-bridge\", \"atom\", \"k8\", \"k8-sse3\", \"barcelona\", \"istanbul\", \"magny-cours\", \"bulldozer\", \"interlagos\".")
    set(_force)
    if(NOT _last_target_arch STREQUAL "${TARGET_ARCHITECTURE}")
       message(STATUS "target changed from \"${_last_target_arch}\" to \"${TARGET_ARCHITECTURE}\"")
@@ -144,6 +146,11 @@
       list(APPEND _march_flag_list "corei7")
       list(APPEND _march_flag_list "core2")
       list(APPEND _available_vector_units_list "sse" "sse2" "sse3" "ssse3" "sse4.1" "sse4.2")
+   elseif(TARGET_ARCHITECTURE STREQUAL "ivy-bridge")
+      list(APPEND _march_flag_list "core-avx-i")
+      list(APPEND _march_flag_list "corei7-avx")
+      list(APPEND _march_flag_list "core2")
+      list(APPEND _available_vector_units_list "sse" "sse2" "sse3" "ssse3" "sse4.1" "sse4.2" "avx" "rdrnd" "f16c")
    elseif(TARGET_ARCHITECTURE STREQUAL "sandy-bridge")
       list(APPEND _march_flag_list "sandybridge")
       list(APPEND _march_flag_list "corei7-avx")
@@ -295,38 +302,48 @@
             add_definitions("-D${_flag}")
          endforeach(_flag)
       elseif(CMAKE_CXX_COMPILER MATCHES "/(icpc|icc)$") # ICC (on Linux)
-         _my_find(_available_vector_units_list "avx"    _found)
+         _my_find(_available_vector_units_list "avx2"    _found)
          if(_found)
-            AddCompilerFlag("-xAVX" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
+            AddCompilerFlag("-xCORE-AVX2" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
          else(_found)
-            _my_find(_available_vector_units_list "sse4.2" _found)
+            _my_find(_available_vector_units_list "f16c"    _found)
             if(_found)
-               AddCompilerFlag("-xSSE4.2" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
+               AddCompilerFlag("-xCORE-AVX-I" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
             else(_found)
-               _my_find(_available_vector_units_list "sse4.1" _found)
+               _my_find(_available_vector_units_list "avx"    _found)
                if(_found)
-                  AddCompilerFlag("-xSSE4.1" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
+                  AddCompilerFlag("-xAVX" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
                else(_found)
-                  _my_find(_available_vector_units_list "ssse3"  _found)
+                  _my_find(_available_vector_units_list "sse4.2" _found)
                   if(_found)
-                     AddCompilerFlag("-xSSSE3" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
+                     AddCompilerFlag("-xSSE4.2" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
                   else(_found)
-                     _my_find(_available_vector_units_list "sse3"   _found)
+                     _my_find(_available_vector_units_list "sse4.1" _found)
                      if(_found)
-                        # If the target host is an AMD machine then we still want to use -xSSE2 because the binary would refuse to run at all otherwise
-                        _my_find(_march_flag_list "barcelona" _found)
-                        if(NOT _found)
-                           _my_find(_march_flag_list "k8-sse3" _found)
-                        endif(NOT _found)
+                        AddCompilerFlag("-xSSE4.1" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
+                     else(_found)
+                        _my_find(_available_vector_units_list "ssse3"  _found)
                         if(_found)
-                           AddCompilerFlag("-xSSE2" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
+                           AddCompilerFlag("-xSSSE3" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
                         else(_found)
-                           AddCompilerFlag("-xSSE3" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
-                        endif(_found)
-                     else(_found)
-                        _my_find(_available_vector_units_list "sse2"   _found)
-                        if(_found)
-                           AddCompilerFlag("-xSSE2" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
+                           _my_find(_available_vector_units_list "sse3"   _found)
+                           if(_found)
+                              # If the target host is an AMD machine then we still want to use -xSSE2 because the binary would refuse to run at all otherwise
+                              _my_find(_march_flag_list "barcelona" _found)
+                              if(NOT _found)
+                                 _my_find(_march_flag_list "k8-sse3" _found)
+                              endif(NOT _found)
+                              if(_found)
+                                 AddCompilerFlag("-xSSE2" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
+                              else(_found)
+                                 AddCompilerFlag("-xSSE3" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
+                              endif(_found)
+                           else(_found)
+                              _my_find(_available_vector_units_list "sse2"   _found)
+                              if(_found)
+                                 AddCompilerFlag("-xSSE2" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
+                              endif(_found)
+                           endif(_found)
                         endif(_found)
                      endif(_found)
                   endif(_found)


[cmake] removes unused c++11 checks

[cmake] removes unused c++11 checks

--- cmake/modules/DuneStuffMacros.cmake
+++ cmake/modules/DuneStuffMacros.cmake
@@ -6,37 +6,10 @@
 # Contributors: Sven Kaulmann

 INCLUDE (CheckIncludeFileCXX)
+include(TestCXXAcceptsFlag)
 CHECK_INCLUDE_FILE_CXX("tr1/array" HAVE_TR1_ARRAY)
 CHECK_INCLUDE_FILE_CXX("malloc.h" HAVE_MALLOC_H)

-# try to use compiler flag -std=c++11
-include(TestCXXAcceptsFlag)
-CHECK_CXX_ACCEPTS_FLAG("-std=c++11" CXX_FLAG_CXX11)
-if(CXX_FLAG_CXX11)
-  set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++11")
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ")
-  set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11 ")
-  set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -std=c++11 ")
-  set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++11 ")
-  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -std=c++11 ")
-  set(CXX_STD0X_FLAGS "-std=c++11")
-else()
-  # try to use compiler flag -std=c++0x for older compilers
-  CHECK_CXX_ACCEPTS_FLAG("-std=c++0x" CXX_FLAG_CXX0X)
-  if(CXX_FLAG_CXX0X)
-    set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++0x" )
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x ")
-    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++0x ")
-    set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -std=c++0x ")
-    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++0x ")
-    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -std=c++0x ")
-  set(CXX_STD0X_FLAGS "-std=c++0x")
-  endif(CXX_FLAG_CXX0X)
-endif(CXX_FLAG_CXX11)
-
-if(NOT CXX_STD0X_FLAGS)
-    message(FATAL "you need a c++11 compatible compiler")
-endif()

 CHECK_CXX_SOURCE_COMPILES("
    int main(void)


DOC: add VERSION file to standalone binaries

--- SuperBuild/Packaging/PackageHelper.cmake
+++ SuperBuild/Packaging/PackageHelper.cmake
@@ -371,6 +371,14 @@
   else()
     install(DIRECTORY ${PKG_SHARE_SOURCE_DIR}/copyright DESTINATION ${PKG_SHARE_DEST_DIR})
     install(FILES ${PKG_SHARE_SOURCE_DIR}/copyright/LICENSE DESTINATION ${PKG_STAGE_DIR})
+  endif()
+
+  ####################### Install VERSION ##########################
+  file(GLOB OTB_VERSION_FILES ${PKG_SHARE_SOURCE_DIR}/doc/OTB-*/VERSION)
+  if(OTB_VERSION_FILES)
+    list(SORT OTB_VERSION_FILES)
+    list(GET OTB_VERSION_FILES -1 OTB_LATEST_VERSION_FILE)
+    install(FILES ${OTB_LATEST_VERSION_FILE} DESTINATION ${PKG_STAGE_DIR})
   endif()

 endfunction()
@@ -1054,4 +1062,4 @@
   libgobject-2.0.so.0
   libXrender.so.1
   libfontconfig.so.1
-  )+  )


ensure flags are used

ensure flags are used

--- ValgrindTest.cmake
+++ ValgrindTest.cmake
@@ -66,10 +66,10 @@
 		set(ADD_VALGRIND_PROFILE_TEST_EXECUTABLE "${PROJECT_BINARY_DIR}/tests/${ADD_VALGRIND_PROFILE_TEST_TARGET}")
 	endif()

-	if (ENABLE_PROFILING)
-		add_valgrind_profile(ENABLE_PROFILING TARGET ${ADD_VALGRIND_PROFILE_TEST_TARGET} EXECUTABLE ${ADD_VALGRIND_PROFILE_TEST_EXECUTABLE})
+	if (${ENABLE_PROFILING})
+		add_valgrind_profile(${ENABLE_PROFILING} TARGET ${ADD_VALGRIND_PROFILE_TEST_TARGET} EXECUTABLE ${ADD_VALGRIND_PROFILE_TEST_EXECUTABLE})
 	else()
-		add_valgrind_test(ENABLE_MEMCHECK TARGET ${ADD_VALGRIND_PROFILE_TEST_TARGET} EXECUTABLE ${ADD_VALGRIND_PROFILE_TEST_EXECUTABLE})
+		add_valgrind_test(${ENABLE_MEMCHECK} TARGET ${ADD_VALGRIND_PROFILE_TEST_TARGET} EXECUTABLE ${ADD_VALGRIND_PROFILE_TEST_EXECUTABLE})
 	endif()

 endfunction()


cmake: Add support for out-of-tree shields

Add support for out-of-tree shields. Out-of-tree shields can now be
stored in out-of-tree board directories.

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

--- cmake/dts.cmake
+++ cmake/dts.cmake
@@ -19,39 +19,40 @@
   ${DTS_COMMON_OVERLAYS}
   )

-#Parse boards/shields to generate the shield list
+# Parse boards/shields of each board root to generate the shield list
+foreach(board_root ${BOARD_ROOT})
+  set(shield_dir ${board_root}/boards/shields)

-set(shield_dir ${ZEPHYR_BASE}/boards/shields)
+  # Match the .overlay files in the shield directories to make sure we are
+  # finding shields, e.g. x_nucleo_iks01a1/x_nucleo_iks01a1.overlay
+  file(GLOB_RECURSE shields_refs_list
+    RELATIVE ${shield_dir}
+    ${shield_dir}/*/*.overlay
+    )

-# Match the .overlay files in the shield directories to make sure we are
-# finding shields, e.g. x_nucleo_iks01a1/x_nucleo_iks01a1.overlay
-file(GLOB_RECURSE shields_refs_list
-     RELATIVE ${shield_dir}
-     ${shield_dir}/*/*.overlay
-     )
+  # The above gives a list like
+  # x_nucleo_iks01a1/x_nucleo_iks01a1.overlay;x_nucleo_iks01a2/x_nucleo_iks01a2.overlay
+  # we construct a list of shield names by extracting file name and
+  # removing the extension.
+  foreach(shield_path ${shields_refs_list})
+	get_filename_component(shield ${shield_path} NAME_WE)

-# The above gives a list like
-# x_nucleo_iks01a1/x_nucleo_iks01a1.overlay;x_nucleo_iks01a2/x_nucleo_iks01a2.overlay
-# we construct a list of shield names by extracting file name and
-# removing the extension.
-foreach(shield_path ${shields_refs_list})
-  get_filename_component(shield ${shield_path} NAME_WE)
+	# Generate CONFIG flags matching each shield
+	string(TOUPPER "CONFIG_SHIELD_${shield}" shield_config)

-  # Generate CONFIG flags matching each shield
-  string(TOUPPER "CONFIG_SHIELD_${shield}" shield_config)
-
-  if(${shield_config})
-    # if shield config flag is on, add shield overlay to the shield overlays
-    # list and dts_fixup file to the shield fixup file
-    list(APPEND
-      dts_files
-      ${shield_dir}/${shield_path}
-      )
-    list(APPEND
-      dts_fixups
-      ${shield_dir}/${shield}/dts_fixup.h
-      )
-  endif()
+	if(${shield_config})
+      # if shield config flag is on, add shield overlay to the shield overlays
+      # list and dts_fixup file to the shield fixup file
+      list(APPEND
+		dts_files
+		${shield_dir}/${shield_path}
+		)
+      list(APPEND
+		dts_fixups
+		${shield_dir}/${shield}/dts_fixup.h
+		)
+	endif()
+  endforeach()
 endforeach()

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


Linking to libcurl now works on OSX 10.5.

--- build/modules/FindCURL.cmake
+++ build/modules/FindCURL.cmake
@@ -39,12 +39,29 @@
       SET(CURL_LIBRARIES ${CURL_RELEASE_LIBRARY})
     ENDIF(CURL_DEBUG_LIBRARY AND CURL_RELEASE_LIBRARY)
   ELSE()
+    FIND_LIBRARY(CRYPTO_LIBRARIES NAMES crypto)
+    FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl)
+    FIND_LIBRARY(ZLIB_LIBRARIES NAMES z)
+    FIND_LIBRARY(LDAP_LIBRARIES NAMES ldap)
     FIND_LIBRARY(CURL_LIBRARIES NAMES curl PATHS ${CURL_LIBRARY_DIRS} NO_DEFAULT_PATH)
   ENDIF()

   IF(CURL_LIBRARIES)
     SET(CURL_FOUND TRUE)
   ENDIF(CURL_LIBRARIES)
+
+  IF(CRYPTO_LIBRARIES)
+    SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${CRYPTO_LIBRARIES})
+  ENDIF()
+  IF(OPENSSL_LIBRARIES)
+    SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES})
+  ENDIF()
+  IF(ZLIB_LIBRARIES)
+    SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${ZLIB_LIBRARIES})
+  ENDIF()
+  IF(LDAP_LIBRARIES)
+    SET(CURL_LIBRARIES ${CURL_LIBRARIES} ${LDAP_LIBRARIES})
+  ENDIF()
 ENDIF(CURL_INCLUDE_DIRS)

 IF(CURL_FOUND)


Py.test is accessed via -m call if python sufficiently up to date

This is more reliable than looking for a py.test executable.

--- scripts/AddPyTest.cmake
+++ scripts/AddPyTest.cmake
@@ -107,9 +107,16 @@
     include(EnvironmentScript)

     lookup_python_package(pytest REQUIRED PATH "${python_path}")
-    find_program(PYTEST_EXECUTABLE py.test HINTS "${python_path}")
-    if(NOT PYTEST_EXECUTABLE)
-        message(FATAL_ERROR "Could not locate py.test executable")
+    set(version_string "${PYTHON_VERSION_MAJOR}")
+    set(version_string "${version_string}.${PYTHON_VERSION_MINOR}")
+    set(version_string "${version_string}.${PYTHON_VERSION_PATCH}")
+    if("${version_string}" VERSION_GREATER "2.6")
+        set(PYTEST_EXECUTABLE "${PYTHON_EXECUTABLE} -m py.test")
+    else()
+        find_program(PYTEST_EXECUTABLE py.test HINTS "${python_path}")
+        if(NOT PYTEST_EXECUTABLE)
+            message(FATAL_ERROR "Could not locate py.test executable")
+        endif()
     endif()

     add_to_python_path("${python_path}")


tests:
 * Test script should no longer run later stages if a prerequisite stage fails. Since different tools might return different output values, this can not be guaranteed to work in all cases. Let's see for our current ones.

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

--- trunk/test/openVibeTests.cmake
+++ trunk/test/openVibeTests.cmake
@@ -1,3 +1,5 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.4)
+
 # REMOVE if all test is passed
 # set(CMAKE_LEGACY_CYGWIN_WIN32 0)  # Remove when CMake >= 2.8.4 is required
 #------------------------
@@ -135,27 +137,50 @@
 message(" -- Start dashboard ${MODEL} - ${CTEST_BUILD_NAME} --")
 ctest_start(${MODEL} TRACK ${MODEL})

+set(ALL_OK "TRUE")
+
 ## -- Update
-message(" -- Update ${MODEL} - ${CTEST_BUILD_NAME} --")
-ctest_update( SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res)
+IF(ALL_OK)
+	message(" -- Update ${MODEL} - ${CTEST_BUILD_NAME} --")
+	ctest_update( SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res)
+	IF(res==-1)
+		message(SEND_ERROR "  Update failed.")
+		set(ALL_OK "FALSE")
+	ENDIF(res==-1)
+ENDIF(ALL_OK)

 ## -- Configure
-message(" -- Configure ${MODEL} - ${CTEST_BUILD_NAME} --")
-ctest_configure(BUILD  "${CTEST_SOURCE_DIRECTORY}/scripts" SOURCE "${CTEST_SOURCE_DIRECTORY}/scripts" RETURN_VALUE res)
-
+IF(ALL_OK)
+	message(" -- Configure ${MODEL} - ${CTEST_BUILD_NAME} --")
+	ctest_configure(BUILD  "${CTEST_SOURCE_DIRECTORY}/scripts" SOURCE "${CTEST_SOURCE_DIRECTORY}/scripts" RETURN_VALUE res)
+	IF(res!=0)
+		message(SEND_ERROR "  Configure failed.")
+		set(ALL_OK "FALSE")
+	ENDIF(res!=0)
+ENDIF(ALL_OK)
+
 ## -- BUILD
-message(" -- Build ${MODEL} - ${CTEST_BUILD_NAME} --")
-ctest_build(BUILD  "${CTEST_SOURCE_DIRECTORY}/scripts" SOURCE "${CTEST_SOURCE_DIRECTORY}/scripts" RETURN_VALUE res)
+IF(ALL_OK)
+	message(" -- Build ${MODEL} - ${CTEST_BUILD_NAME} --")
+	ctest_build(BUILD  "${CTEST_SOURCE_DIRECTORY}/scripts" SOURCE "${CTEST_SOURCE_DIRECTORY}/scripts" RETURN_VALUE res)
+	IF(res!=0)
+		message(SEND_ERROR "  Build failed.")
+		set(ALL_OK "FALSE")
+	ENDIF(res!=0)
+ENDIF(ALL_OK)

 ## -- TEST
-message(" -- Test ${MODEL} - ${CTEST_BUILD_NAME} --")
-ctest_test(BUILD  "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
-
+IF(ALL_OK)
+	message(" -- Test ${MODEL} - ${CTEST_BUILD_NAME} --")
+	ctest_test(BUILD  "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+	message(STATUS "  INFO : ctest_test(...) returned '${res}'")
+ENDIF(ALL_OK)

 ## -- SUBMIT
 message(" -- Submit ${MODEL} - ${CTEST_BUILD_NAME} --")

 ctest_submit(                                              RETURN_VALUE res)
+message(STATUS "  INFO : submit(...) returned '${res}'")

 message(" -- Finished ${MODEL}  - ${CTEST_BUILD_NAME} --")


Check for clock_gettime in librt

Check for clock_gettime in librt

--- configure.cmake
+++ configure.cmake
@@ -279,6 +279,9 @@
   MY_SEARCH_LIBS(setsockopt socket LIBSOCKET)
   MY_SEARCH_LIBS(dlopen dl LIBDL)
   MY_SEARCH_LIBS(sched_yield rt LIBRT)
+  IF(NOT LIBRT)
+    MY_SEARCH_LIBS(clock_gettime rt LIBRT)
+  ENDIF()
   FIND_PACKAGE(Threads)

   SET(CMAKE_REQUIRED_LIBRARIES


Fix finding of static libs and fallback to dynamic where that makes sense.

--- cmake/CEGUIFindHelpers.cmake
+++ cmake/CEGUIFindHelpers.cmake
@@ -13,7 +13,7 @@
         set(_STATIC "_STATIC")

         if(UNIX)
-            set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+            set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so;.dynlib")
         endif()

     else()
@@ -23,8 +23,8 @@
     # decide which libs to look for, prefer list we get from pkg-config rather
     # than making idiotic assumptions or guesses (which we resort to if
     # pkg-config did not tell us anything).
-    if (PC_${_PREFIX}_LIBRARIES)
-        set(_FINDLIBS ${PC_${_PREFIX}_LIBRARIES})
+    if (PC_${_PREFIX}${_STATIC}_LIBRARIES)
+        set(_FINDLIBS ${PC_${_PREFIX}${_STATIC}_LIBRARIES})
     else()
         set(_FINDLIBS ${_FALLBACKLIBS})
     endif()
@@ -34,7 +34,7 @@
     set(${_PREFIX}_FOUND_ALL_LIBS${_LIBS_VAR_EXT} TRUE)
     foreach(_L ${_FINDLIBS})
         string(TOUPPER "${_L}" _UL)
-        find_library(${_UL}_LIBRARY${_LIBS_VAR_EXT} NAMES ${_L} HINTS ${PC_${_PREFIX}_LIBDIR} ${PC_${_PREFIX}_LIBRARY_DIRS}${_STATIC} PATH_SUFFIXES ${_PATH_SUFFIXES})
+        find_library(${_UL}_LIBRARY${_LIBS_VAR_EXT} NAMES ${_L} HINTS ${PC_${_PREFIX}_LIBDIR} ${PC_${_PREFIX}${_STATIC}_LIBRARY_DIRS} PATH_SUFFIXES ${_PATH_SUFFIXES})
         if(${_UL}_LIBRARY${_LIBS_VAR_EXT})
             list(APPEND ${_PREFIX}_LIBRARIES${_LIBS_VAR_EXT} ${${_UL}_LIBRARY}${_LIBS_VAR_EXT})
         else()