Change the rules to Add -fPIC flags.

Change the rules to Add -fPIC flags.

--- cmake/externals/configuration_steps/EP_Initialisation.cmake
+++ cmake/externals/configuration_steps/EP_Initialisation.cmake
@@ -66,7 +66,7 @@
   # Add PIC flag if Static build on UNIX with amd64 arch
   if (UNIX)
     if (NOT BUILD_SHARED_LIBS_${ep} AND
-        "${CMAKE_SYSTEM_PROCESSOR}" MATCHES amd64|AMD64|x86_64|X86_64)
+        "${CMAKE_SYSTEM_PROCESSOR}" MATCHES 64)

       set(${ep}_c_flags "${${ep}_c_flags} -fPIC")
       set(${ep}_cxx_flags "${${ep}_cxx_flags} -fPIC")


PKG: put back remote module

PKG: put back remote module

--- SuperBuild/CMake/External_otb.cmake
+++ SuperBuild/CMake/External_otb.cmake
@@ -144,15 +144,15 @@

 set(OTB_MODULES_CONFIG)
 if(WITH_REMOTE_MODULES)
-  # foreach(remote_module SertitObject Mosaic otbGRM DiapOTBModule)
-  #   list(APPEND OTB_MODULES_CONFIG -DModule_${remote_module}:BOOL=ON)
-  # endforeach()
+  foreach(remote_module SertitObject Mosaic otbGRM DiapOTBModule)
+    list(APPEND OTB_MODULES_CONFIG -DModule_${remote_module}:BOOL=ON)
+  endforeach()

   # Add CESBIO'S remote modules if OTB is compiled with GSL support (for now only TemporalGapFilling)
   if(OTB_USE_GSL)
-    # foreach(remote_module OTBTemporalGapFilling)
-    #   list(APPEND OTB_MODULES_CONFIG -DModule_${remote_module}:BOOL=ON)
-    # endforeach()
+    foreach(remote_module OTBTemporalGapFilling)
+      list(APPEND OTB_MODULES_CONFIG -DModule_${remote_module}:BOOL=ON)
+    endforeach()
   endif()
 else()
   set(OTB_MODULES_CONFIG)


Don't set either variable on Xcode 6

Don't set either variable on Xcode 6

--- standard/StandardProject.cmake
+++ standard/StandardProject.cmake
@@ -106,15 +106,18 @@

   if(APPLE AND NOT (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm"))
     if(NOT CMAKE_OSX_SYSROOT)
-      set(_developer_sdk_version 10.11)
       # CLANG_VERSION requires a sysroot to obtain, so resort to execute_process() here
       execute_process(COMMAND clang -v ERROR_VARIABLE _clang_version)
-      if(_clang_version MATCHES "clang-8")
+      if(_clang_version MATCHES "clang-7")
+        set(_developer_sdk_version 10.11)
+      elseif(_clang_version MATCHES "clang-8")
         set(_developer_sdk_version 10.12)
       endif()
-      set(CMAKE_OSX_SYSROOT "macosx${_developer_sdk_version}" CACHE STRING "Mac OS X build environment" FORCE)
+      if(_developer_sdk_version)
+        set(CMAKE_OSX_SYSROOT "macosx${_developer_sdk_version}" CACHE STRING "Mac OS X build environment" FORCE)
+      endif()
     endif()
-    if(NOT CMAKE_OSX_DEPLOYMENT_TARGET)
+    if(_developer_sdk_version AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
       set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Mac OS X deployment target" FORCE)
     endif()
   endif()


Capitalization issue

Capitalization issue

--- scripts/VersionAndGitRef.cmake
+++ scripts/VersionAndGitRef.cmake
@@ -1,4 +1,4 @@
-find_package(git)
+find_package(Git)

 # Set version variable
 # If git is found and this is a git workdir, then figure out build id


Fixed typo

Fixed typo

--- standard/StandardProject.cmake
+++ standard/StandardProject.cmake
@@ -99,7 +99,7 @@
   set(CMAKE_CXX_EXTENSIONS OFF PARENT_SCOPE)

   #CMAKE_OSX_DEPLOYMENT_TARGET < 10.9 implies -stdlib=libstdc++, which doesn't have
-  #complete c++11 support. oveeride with libc++
+  #complete c++11 support. override with libc++
   if(CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++" PARENT_SCOPE)
   endif()


ManageVariable: Clean up

ManageVariable: Clean up

--- Modules/ManageVariable.cmake
+++ Modules/ManageVariable.cmake
@@ -160,8 +160,6 @@
     ELSE(_cmd_output)
 	SET(var "${var}-NOVALUE")
     ENDIF(_cmd_output)
-    #SET(value ${${var}})
-    #MESSAGE("var=${var} _cmd_output=${_cmd_output} value=|${value}|" )
 ENDMACRO(COMMAND_OUTPUT_TO_VARIABLE var cmd)

 # This macro is meant to be internal.


CMake: Prefer static archives if BUILD_SHARED_LIBS is set to off

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

--- deal.II/cmake/setup_deal_ii.cmake
+++ deal.II/cmake/setup_deal_ii.cmake
@@ -147,7 +147,7 @@

 ###########################################################################
 #                                                                         #
-#  Cleanup and Includes that have to happen after the call to PROJECT():  #
+#    Cleanup and setup that has to happen after the call to PROJECT():    #
 #                                                                         #
 ###########################################################################

@@ -164,6 +164,14 @@
     )
 ENDFOREACH()

+#
+# Invert the search order for libraries when BUILD_SHARED_LIBS=OFF to
+# prefer static archives instead of shared libraries:
+#
+IF(NOT BUILD_SHARED_LIBS)
+  # TODO: Does this work on a Windows or CYGWIN target?
+  LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES)
+ENDIF()

 #
 # Cross compilation stuff:


Fix Toolchain file.

Fix Toolchain file.

--- rpi/cmaketc/Toolchain-raspberrypi-arm.cmake
+++ rpi/cmaketc/Toolchain-raspberrypi-arm.cmake
@@ -11,7 +11,7 @@
   return()
 endif()

-SET (PiToolsDir ENV{PI_TOOL})
+SET (PiToolsDir $ENV{PI_TOOL})

 # specify the cross compiler
 SET (CMAKE_C_COMPILER $ENV{PI_TOOLS_HOME}/${PiToolsDir}/bin/arm-linux-gnueabihf-gcc)


updates to .gitlab-ci.yml

updates to .gitlab-ci.yml


added option to set STIR_DISABLE_HDF5_SUPPORT in cmake

--- SuperBuild/External_STIR.cmake
+++ SuperBuild/External_STIR.cmake
@@ -70,6 +70,7 @@
   option(STIR_BUILD_SWIG_PYTHON "Build STIR Python interface" ${default_STIR_BUILD_SWIG_PYTHON})
   option(STIR_DISABLE_CERN_ROOT "Disable STIR ROOT interface" ON)
   option(STIR_DISABLE_LLN_MATRIX "Disable STIR Louvain-la-Neuve Matrix library for ECAT7 support" ON)
+  option(STIR_DISABLE_HDF5_SUPPORT "Disable STIR use of HDF5 libraries" OFF)
   option(STIR_ENABLE_EXPERIMENTAL "Enable STIR experimental code" OFF)

   mark_as_advanced(BUILD_STIR_EXECUTABLES BUILD_STIR_SWIG_PYTHON STIR_DISABLE_CERN_ROOT)
@@ -96,7 +97,7 @@
     -DSTIR_OPENMP=${STIR_ENABLE_OPENMP}
     # Use 2 variables for ROOT to cover multiple STIR versions
     -DDISABLE_CERN_ROOT_SUPPORT=${STIR_DISABLE_CERN_ROOT} -DDISABLE_CERN_ROOT=${STIR_DISABLE_CERN_ROOT}
-    -DDISABLE_HDF5_SUPPORT:BOOL=ON
+    -DDISABLE_HDF5_SUPPORT:BOOL=${STIR_DISABLE_HDF5_SUPPORT}
     -DDISABLE_LLN_MATRIX=${STIR_DISABLE_LLN_MATRIX}
     -DSTIR_ENABLE_EXPERIMENTAL=${STIR_ENABLE_EXPERIMENTAL}
    )


remove commented code

remove commented code

--- bin/coverage_list.cmake
+++ bin/coverage_list.cmake
@@ -6,15 +6,7 @@
     list(APPEND COVERAGE_SRCS ${BUILD_LIST})

     include(${PROJECT_SOURCE_DIR}/lib/coverage_list.cmake)
-    include(${PROJECT_SOURCE_DIR}/test/coverage_list.cmake)
-    # file(STRINGS ${PROJECT_SOURCE_DIR}/lib/coverage_list.cmake LIB_COVERAGE_LIST)
-    # ## print out list for debugging
-    # #message(${LIB_COVERAGE_LIST})
-    # list(APPEND COVERAGE_SRCS ${LIB_COVERAGE_LIST})
-    # file(STRINGS ${PROJECT_SOURCE_DIR}/test/coverage_list.cmake TEST_COVERAGE_LIST)
-    # ## print out list for debugging
-    # #message(${TEST_COVERAGE_LIST})
-    # list(APPEND COVERAGE_SRCS ${TEST_COVERAGE_LIST})
+    # include(${PROJECT_SOURCE_DIR}/test/coverage_list.cmake)

     # Create the coveralls target.
     coveralls_setup(


boards: qemu_xtensa: enable icount mode

boards: qemu_xtensa: enable icount mode

Enable icount mode for qemu_xtensa platform, The icount shift value
is selectd based on cpu clock frequency of this platform. The virtual
cpu will execute one instruction every 2^shift ns of virtual time.

Signed-off-by: Wentong Wu <a92ffab6ab5ff780cf36418e13a69a97399df0f5@intel.com>

--- boards/xtensa/qemu_xtensa/board.cmake
+++ boards/xtensa/qemu_xtensa/board.cmake
@@ -8,6 +8,9 @@
 	-machine sim -semihosting -nographic -cpu sample_controller
   )

+if(CONFIG_QEMU_ICOUNT)
+  list(APPEND QEMU_EXTRA_FLAGS -icount shift=6,align=off,sleep=off -rtc clock=vm)
+endif()
 # TODO: Support debug
 # board_set_debugger_ifnset(qemu)
 # debugserver: QEMU_EXTRA_FLAGS += -s -S


Disable file marks

Disable file marks

--- blocks/boost/install/install.cmake
+++ blocks/boost/install/install.cmake
@@ -1,234 +1,234 @@
-include(boost/install/utils)
-
-
-function(BII_BOOST_PRINT_SETUP)
-    message(STATUS "Boost version: ${BII_BOOST_VERSION}")
-    message(STATUS "Libraries: ${BII_BOOST_LIBS}")
-    message(STATUS "Upstream URL: ${BII_BOOST_DOWNLOAD_URL}")
-    message(STATUS "Package: ${BII_BOOST_PACKAGE}")
-    message(STATUS "Path to package: ${BII_BOOST_PACKAGE_PATH}")
-    message(STATUS "Boost directory: ${BII_BOOST_DIR}")
-    message(STATUS "Toolset: ${BII_BOOST_TOOLSET}")
-    message(STATUS "Bootstrapper: ${__BII_BOOST_BOOSTRAPER}")
-endfunction()
-
-function(BII_BOOST_INSTALL_SETUP)
-    #Misc
-    set(__BII_BOOST_VERSION_DEFAULT 1.57.0)
-
-    #Lets go!
-    message(STATUS "Setting up biicode Boost configuration...")
-
-    if(NOT (BII_BOOST_VERSION))
-        message(STATUS "BII_BOOST_VERSION not specified. Using Boost ${__BII_BOOST_VERSION_DEFAULT}")
-
-        set(BII_BOOST_VERSION ${__BII_BOOST_VERSION_DEFAULT} CACHE INTERNAL "Biicode boost version")
-    endif()
-
-    string(REGEX REPLACE  "[.]" "_" __BII_BOOST_VERSION_LABEL ${BII_BOOST_VERSION})
-
-    #Download and install
-    set(BII_BOOST_INSTALL_DIR ${BIICODE_ENV_DIR}/boost/${BII_BOOST_VERSION}            CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} install directory")
-    set(BII_BOOST_DIR ${BII_BOOST_INSTALL_DIR}                                         CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} base directory")
-    set(__BII_BOOST_TMPDIR ${BIICODE_ENV_DIR}/tmp/boost/${BII_BOOST_VERSION}           CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} temporal directory used during install")
-    set(BII_BOOST_EXTRACT_DIR ${__BII_BOOST_TMPDIR}/boost_${__BII_BOOST_VERSION_LABEL} CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} package extraction directory")
-
-    if(NOT (EXISTS __BII_BOOST_TMPDIR))
-        file(MAKE_DIRECTORY "${__BII_BOOST_TMPDIR}")
-    endif()
-
-    if(NOT (EXISTS ${BIICODE_ENV_DIR}/boost/))
-        file(MAKE_DIRECTORY "${BIICODE_ENV_DIR}/boost/")
-    endif()
-
-    if(CMAKE_SYSTEM_NAME MATCHES "Windows")
-        set(__BII_BOOST_PACKAGE_TYPE zip)
-    else()
-        set(__BII_BOOST_PACKAGE_TYPE tar.gz)
-    endif()
-
-    set(BII_BOOST_PACKAGE boost_${__BII_BOOST_VERSION_LABEL}.${__BII_BOOST_PACKAGE_TYPE}                                     CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} package")
-    set(BII_BOOST_PACKAGE_PATH ${__BII_BOOST_TMPDIR}/${BII_BOOST_PACKAGE}                                                    CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} package download destination")
-    set(BII_BOOST_DOWNLOAD_URL "http://sourceforge.net/projects/boost/files/boost/${BII_BOOST_VERSION}/${BII_BOOST_PACKAGE}" CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} package upstream URL")
-
-    #Bootstrap
-    if(CMAKE_SYSTEM_NAME MATCHES "Windows")
-        set(__BII_BOOST_BOOSTRAPER ${BII_BOOST_DIR}/bootstrap.bat CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} boostrap file")
-        set(__BII_BOOST_B2         ${BII_BOOST_DIR}/b2.exe        CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} build file")
-    elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
-        set(__BII_BOOST_BOOSTRAPER ${BII_BOOST_DIR}/bootstrap.sh CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} boostrap file")
-        set(__BII_BOOST_B2         ${BII_BOOST_DIR}/b2           CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} build file")
-    elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
-        set(__BII_BOOST_BOOSTRAPER ${BII_BOOST_DIR}/bootstrap.sh CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} boostrap file")
-        set(__BII_BOOST_B2         ${BII_BOOST_DIR}/b2           CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} build file")
-    else()
-        message(FATAL_ERROR "Unknown platform. Stopping Boost installation")
-    endif()
-
-    if(NOT (BII_BOOST_TOOLSET))
-        message(STATUS "BII_BOOST_TOOLSET not specified. Using ${CMAKE_CXX_COMPILER_ID} compiler")
-
-        BII_BOOST_COMPUTE_TOOLSET(__BII_BOOST_DEFAULT_TOOLSET)
-
-        set(BII_BOOST_TOOLSET ${__BII_BOOST_DEFAULT_TOOLSET} CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} build toolset")
-    endif()
-
-    if(NOT (BII_BOOST_VARIANT))
-        if(NOT CMAKE_BUILD_TYPE)
-            set(CMAKE_BUILD_TYPE Release)
-        endif()
-
-        message(STATUS "BII_BOOST_VARIANT not specified. Using ${CMAKE_BUILD_TYPE} variant")
-
-        string(TOLOWER ${CMAKE_BUILD_TYPE} BII_BOOST_VARIANT)
-    endif()
-
-    #Build
-    if(NOT (BII_BOOST_BUILD_J))
-        message(STATUS "BII_BOOST_BUILD_J not specified. Parallel build disabled")
-
-        set(BII_BOOST_BUILD_J 1 CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} build threads count")
-    endif()
-
-    set(__BII_BOOST_BOOTSTRAP_CALL "${__BII_BOOST_BOOSTRAPER} --prefix=${BII_BOOST_DIR}"
-                                   CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} boostrap call")
-
-    set(__BII_BOOST_B2_CALL        ${__BII_BOOST_B2} --includedir=${BII_BOOST_DIR}
-                                                     --toolset=${BII_BOOST_TOOLSET}
-                                                     -j${BII_BOOST_BUILD_J}
-                                                     --layout=versioned
-                                                     --build-type=complete
-                                   CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} b2 call")
-endfunction()
-
-
-function(BII_BOOST_DOWNLOAD)
-    if(NOT (EXISTS ${BII_BOOST_PACKAGE_PATH}))
-        message(STATUS "Downloading Boost ${BII_BOOST_VERSION} from ${BII_BOOST_DOWNLOAD_URL}...")
-
-        file(DOWNLOAD "${BII_BOOST_DOWNLOAD_URL}" "${BII_BOOST_PACKAGE_PATH}" SHOW_PROGRESS STATUS RESULT)
-
-        message(STATUS ${RESULT})
-    else()
-        message(STATUS "Download aborted. ${BII_BOOST_PACKAGE} was downloaded previously")
-    endif()
-
-
-    if(NOT (EXISTS ${BII_BOOST_DIR}))
-        message(STATUS "Extracting Boost ${BII_BOOST_VERSION} (${BII_BOOST_PACKAGE} in ${BII_BOOST_PACKAGE_PATH})...")
-
-        execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf "${BII_BOOST_PACKAGE_PATH}" WORKING_DIRECTORY ${__BII_BOOST_TMPDIR})
-
-        file(RENAME "${BII_BOOST_EXTRACT_DIR}" "${BII_BOOST_INSTALL_DIR}")
-    endif()
-endfunction()
-
-function(BII_BOOST_BOOTSTRAP)
-    message(STATUS "Bootstrapping Boost ${BII_BOOST_VERSION}...")
-
-    if((NOT (EXISTS ${__BII_BOOST_B2})) OR (${BII_BOOST_BOOTSTRAP_FORCE}))
-        execute_process(COMMAND ${__BII_BOOST_BOOTSTRAP_CALL} WORKING_DIRECTORY ${BII_BOOST_DIR}
-                        RESULT_VARIABLE Result OUTPUT_VARIABLE Output ERROR_VARIABLE Error)
-        if(NOT Result EQUAL 0)
-            message(FATAL_ERROR "Failed running ${__BII_BOOST_BOOTSTRAP_CALL}:\n${Output}\n${Error}\n")
-        endif()
-    else()
-        message(STATUS "Boost boostrapping aborted! b2 file already exists. Set BII_BOOST_BOOTSTRAP_FORCE to override")
-    endif()
-endfunction()
-
-function(BII_BOOST_BUILD)
-    include(ExternalProject)
-
-    message(STATUS "Building Boost ${BII_BOOST_VERSION} with toolset ${BII_BOOST_TOOLSET}...")
-
-    if(TRUE)
-        if(BII_BOOST_LIBS)
-            string(REGEX REPLACE "[,]" ";" __BII_BOOST_LIBS ${BII_BOOST_LIBS})
-
-            foreach(lib ${__BII_BOOST_LIBS})
-                message(STATUS "Building ${lib} library...")
-
-                set(__BII_BOOST_B2_CALL_EX ${__BII_BOOST_B2_CALL} --with-${lib})
-
-                execute_process(COMMAND ${__BII_BOOST_B2_CALL_EX} WORKING_DIRECTORY ${BII_BOOST_DIR}
-                                RESULT_VARIABLE Result OUTPUT_VARIABLE Output ERROR_VARIABLE Error)
-                if(NOT Result EQUAL 0)
-                    message(FATAL_ERROR "Failed running ${__BII_BOOST_B2_CALL}:\n${Output}\n${Error}\n")
-                endif()
-            endforeach()
-        else()
-            if(NOT (BII_BOOST_LIBS_EXCLUDED))
-                set(BII_BOOST_LIBS_EXCLUDED python)
-            endif()
-
-            string(REGEX REPLACE "[,]" ";" __BII_BOOST_LIBS_EXCLUDED ${BII_BOOST_LIBS_EXCLUDED})
-
-            foreach(lib ${__BII_BOOST_LIBS_EXCLUDED})
-                set(__BII_BOOST_B2_CALL ${__BII_BOOST_B2_CALL} --without-${lib})
-            endforeach()
-
-            execute_process(COMMAND ${__BII_BOOST_B2_CALL} WORKING_DIRECTORY ${BII_BOOST_DIR}
-                            RESULT_VARIABLE Result OUTPUT_VARIABLE Output ERROR_VARIABLE Error)
-            if(NOT Result EQUAL 0)
-                message(FATAL_ERROR "Failed running ${__BII_BOOST_B2_CALL}:\n${Output}\n${Error}\n")
-            endif()
-        endif()
-
-
-    else()
-        message(STATUS "Boost build aborted! Build output folder (${BII_BOOST_DIR}/stage) already exists. Set BII_BOOST_BUILD_FORCE to override")
-    endif()
-endfunction()
-
-function(BII_BOOST_INSTALL)
-    BII_BOOST_INSTALL_SETUP()
-
-    if((NOT (EXISTS ${BIICODE_ENV_DIR}/boost/__BII_BOOST_SETUP_${BII_BOOST_VERSION}_${BII_BOOST_TOOLSET}_READY)) OR (${BII_BOOST_BUILD_FORCE}))
-        BII_BOOST_PRINT_SETUP()
-
-        BII_BOOST_DOWNLOAD()
-        BII_BOOST_BOOTSTRAP()
-        BII_BOOST_BUILD()
-
-        #Mark current setup (toolset + version) as built
-        file(WRITE ${BIICODE_ENV_DIR}/boost/__BII_BOOST_SETUP_${BII_BOOST_VERSION}_${BII_BOOST_TOOLSET}_READY "Biicode boost ${BII_BOOST_VERSION} w/ ${BII_BOOST_TOOLSET} toolset setup ready to use")
-    endif()
-
-    set(BOOST_ROOT       "${BII_BOOST_DIR}"         CACHE INTERNAL "Boost root directory")
-    set(BOOST_INCLUDEDIR "${BOOST_ROOT}"            CACHE INTERNAL "Boost include directory")
-    set(BOOST_LIBRARYDIR "${BOOST_ROOT}/stage/lib/" CACHE INTERNAL "Boost library directory")
-
-
-    # CMake 3.1 on windows does not search for Boost 1.57.0 by default, this is a workaround
-    set(Boost_ADDITIONAL_VERSIONS ${BII_BOOST_VERSION} CACHE INTERNAL "")
-    # Disable searching on system Boost
-    set(Boost_NO_SYSTEM_PATHS TRUE CACHE INTERNAL "")
-
-    # FindBoost auto-compute does not care about Clang?
-    if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-        COMPILER_VERSION(__clang_version)
-        string(REGEX REPLACE "([0-9])\\.([0-9])" "\\1\\2" __clang_version ${__clang_version})
-
-        set(Boost_COMPILER "-clang${__clang_version}" CACHE INTERNAL "Boost library suffix")
-
-        message(STATUS ">>>> Setting Boost_COMPILER suffix manually for clang: ${Boost_COMPILER}")
-    endif()
-
-    find_package(Boost)
-    if(Boost_FOUND)
-        include_directories(${Boost_INCLUDE_DIR})
-
-        if(MSVC)
-            link_directories(${Boost_LIBRARYDIR})
-        endif()
-
-        add_definitions( "-DHAS_BOOST" )
-
-        message(STATUS "BOOST_ROOT       ${BOOST_ROOT}")
-        message(STATUS "BOOST_INCLUDEDIR ${BOOST_INCLUDEDIR}")
-        message(STATUS "BOOST_LIBRARYDIR ${BOOST_LIBRARYDIR}")
-    else()
-        message(FATAL_ERROR "Boost not found after biicode setup!")
-    endif()
-endfunction()
+include(boost/install/utils)
+
+
+function(BII_BOOST_PRINT_SETUP)
+    message(STATUS "Boost version: ${BII_BOOST_VERSION}")
+    message(STATUS "Libraries: ${BII_BOOST_LIBS}")
+    message(STATUS "Upstream URL: ${BII_BOOST_DOWNLOAD_URL}")
+    message(STATUS "Package: ${BII_BOOST_PACKAGE}")
+    message(STATUS "Path to package: ${BII_BOOST_PACKAGE_PATH}")
+    message(STATUS "Boost directory: ${BII_BOOST_DIR}")
+    message(STATUS "Toolset: ${BII_BOOST_TOOLSET}")
+    message(STATUS "Bootstrapper: ${__BII_BOOST_BOOSTRAPER}")
+endfunction()
+
+function(BII_BOOST_INSTALL_SETUP)
+    #Misc
+    set(__BII_BOOST_VERSION_DEFAULT 1.57.0)
+
+    #Lets go!
+    message(STATUS "Setting up biicode Boost configuration...")
+
+    if(NOT (BII_BOOST_VERSION))
+        message(STATUS "BII_BOOST_VERSION not specified. Using Boost ${__BII_BOOST_VERSION_DEFAULT}")
+
+        set(BII_BOOST_VERSION ${__BII_BOOST_VERSION_DEFAULT} CACHE INTERNAL "Biicode boost version")
+    endif()
+
+    string(REGEX REPLACE  "[.]" "_" __BII_BOOST_VERSION_LABEL ${BII_BOOST_VERSION})
+
+    #Download and install
+    set(BII_BOOST_INSTALL_DIR ${BIICODE_ENV_DIR}/boost/${BII_BOOST_VERSION}            CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} install directory")
+    set(BII_BOOST_DIR ${BII_BOOST_INSTALL_DIR}                                         CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} base directory")
+    set(__BII_BOOST_TMPDIR ${BIICODE_ENV_DIR}/tmp/boost/${BII_BOOST_VERSION}           CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} temporal directory used during install")
+    set(BII_BOOST_EXTRACT_DIR ${__BII_BOOST_TMPDIR}/boost_${__BII_BOOST_VERSION_LABEL} CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} package extraction directory")
+
+    if(NOT (EXISTS __BII_BOOST_TMPDIR))
+        file(MAKE_DIRECTORY "${__BII_BOOST_TMPDIR}")
+    endif()
+
+    if(NOT (EXISTS ${BIICODE_ENV_DIR}/boost/))
+        file(MAKE_DIRECTORY "${BIICODE_ENV_DIR}/boost/")
+    endif()
+
+    if(CMAKE_SYSTEM_NAME MATCHES "Windows")
+        set(__BII_BOOST_PACKAGE_TYPE zip)
+    else()
+        set(__BII_BOOST_PACKAGE_TYPE tar.gz)
+    endif()
+
+    set(BII_BOOST_PACKAGE boost_${__BII_BOOST_VERSION_LABEL}.${__BII_BOOST_PACKAGE_TYPE}                                     CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} package")
+    set(BII_BOOST_PACKAGE_PATH ${__BII_BOOST_TMPDIR}/${BII_BOOST_PACKAGE}                                                    CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} package download destination")
+    set(BII_BOOST_DOWNLOAD_URL "http://sourceforge.net/projects/boost/files/boost/${BII_BOOST_VERSION}/${BII_BOOST_PACKAGE}" CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} package upstream URL")
+
+    #Bootstrap
+    if(CMAKE_SYSTEM_NAME MATCHES "Windows")
+        set(__BII_BOOST_BOOSTRAPER ${BII_BOOST_DIR}/bootstrap.bat CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} boostrap file")
+        set(__BII_BOOST_B2         ${BII_BOOST_DIR}/b2.exe        CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} build file")
+    elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+        set(__BII_BOOST_BOOSTRAPER ${BII_BOOST_DIR}/bootstrap.sh CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} boostrap file")
+        set(__BII_BOOST_B2         ${BII_BOOST_DIR}/b2           CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} build file")
+    elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
+        set(__BII_BOOST_BOOSTRAPER ${BII_BOOST_DIR}/bootstrap.sh CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} boostrap file")
+        set(__BII_BOOST_B2         ${BII_BOOST_DIR}/b2           CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} build file")
+    else()
+        message(FATAL_ERROR "Unknown platform. Stopping Boost installation")
+    endif()
+
+    if(NOT (BII_BOOST_TOOLSET))
+        message(STATUS "BII_BOOST_TOOLSET not specified. Using ${CMAKE_CXX_COMPILER_ID} compiler")
+
+        BII_BOOST_COMPUTE_TOOLSET(__BII_BOOST_DEFAULT_TOOLSET)
+
+        set(BII_BOOST_TOOLSET ${__BII_BOOST_DEFAULT_TOOLSET} CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} build toolset")
+    endif()
+
+    if(NOT (BII_BOOST_VARIANT))
+        if(NOT CMAKE_BUILD_TYPE)
+            set(CMAKE_BUILD_TYPE Release)
+        endif()
+
+        message(STATUS "BII_BOOST_VARIANT not specified. Using ${CMAKE_BUILD_TYPE} variant")
+
+        string(TOLOWER ${CMAKE_BUILD_TYPE} BII_BOOST_VARIANT)
+    endif()
+
+    #Build
+    if(NOT (BII_BOOST_BUILD_J))
+        message(STATUS "BII_BOOST_BUILD_J not specified. Parallel build disabled")
+
+        set(BII_BOOST_BUILD_J 1 CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} build threads count")
+    endif()
+
+    set(__BII_BOOST_BOOTSTRAP_CALL "${__BII_BOOST_BOOSTRAPER} --prefix=${BII_BOOST_DIR}"
+                                   CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} boostrap call")
+
+    set(__BII_BOOST_B2_CALL        ${__BII_BOOST_B2} --includedir=${BII_BOOST_DIR}
+                                                     --toolset=${BII_BOOST_TOOLSET}
+                                                     -j${BII_BOOST_BUILD_J}
+                                                     --layout=versioned
+                                                     --build-type=complete
+                                   CACHE INTERNAL "Biicode boost ${BII_BOOST_VERSION} b2 call")
+endfunction()
+
+
+function(BII_BOOST_DOWNLOAD)
+    if(NOT (EXISTS ${BII_BOOST_PACKAGE_PATH}))
+        message(STATUS "Downloading Boost ${BII_BOOST_VERSION} from ${BII_BOOST_DOWNLOAD_URL}...")
+
+        file(DOWNLOAD "${BII_BOOST_DOWNLOAD_URL}" "${BII_BOOST_PACKAGE_PATH}" SHOW_PROGRESS STATUS RESULT)
+
+        message(STATUS ${RESULT})
+    else()
+        message(STATUS "Download aborted. ${BII_BOOST_PACKAGE} was downloaded previously")
+    endif()
+
+
+    if(NOT (EXISTS ${BII_BOOST_DIR}))
+        message(STATUS "Extracting Boost ${BII_BOOST_VERSION} (${BII_BOOST_PACKAGE} in ${BII_BOOST_PACKAGE_PATH})...")
+
+        execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf "${BII_BOOST_PACKAGE_PATH}" WORKING_DIRECTORY ${__BII_BOOST_TMPDIR})
+
+        file(RENAME "${BII_BOOST_EXTRACT_DIR}" "${BII_BOOST_INSTALL_DIR}")
+    endif()
+endfunction()
+
+function(BII_BOOST_BOOTSTRAP)
+    message(STATUS "Bootstrapping Boost ${BII_BOOST_VERSION}...")
+
+    if((NOT (EXISTS ${__BII_BOOST_B2})) OR (${BII_BOOST_BOOTSTRAP_FORCE}))
+        execute_process(COMMAND ${__BII_BOOST_BOOTSTRAP_CALL} WORKING_DIRECTORY ${BII_BOOST_DIR}
+                        RESULT_VARIABLE Result OUTPUT_VARIABLE Output ERROR_VARIABLE Error)
+        if(NOT Result EQUAL 0)
+            message(FATAL_ERROR "Failed running ${__BII_BOOST_BOOTSTRAP_CALL}:\n${Output}\n${Error}\n")
+        endif()
+    else()
+        message(STATUS "Boost boostrapping aborted! b2 file already exists. Set BII_BOOST_BOOTSTRAP_FORCE to override")
+    endif()
+endfunction()
+
+function(BII_BOOST_BUILD)
+    include(ExternalProject)
+
+    message(STATUS "Building Boost ${BII_BOOST_VERSION} with toolset ${BII_BOOST_TOOLSET}...")
+
+    if(TRUE)
+        if(BII_BOOST_LIBS)
+            string(REGEX REPLACE "[,]" ";" __BII_BOOST_LIBS ${BII_BOOST_LIBS})
+
+            foreach(lib ${__BII_BOOST_LIBS})
+                message(STATUS "Building ${lib} library...")
+
+                set(__BII_BOOST_B2_CALL_EX ${__BII_BOOST_B2_CALL} --with-${lib})
+
+                execute_process(COMMAND ${__BII_BOOST_B2_CALL_EX} WORKING_DIRECTORY ${BII_BOOST_DIR}
+                                RESULT_VARIABLE Result OUTPUT_VARIABLE Output ERROR_VARIABLE Error)
+                if(NOT Result EQUAL 0)
+                    message(FATAL_ERROR "Failed running ${__BII_BOOST_B2_CALL}:\n${Output}\n${Error}\n")
+                endif()
+            endforeach()
+        else()
+            if(NOT (BII_BOOST_LIBS_EXCLUDED))
+                set(BII_BOOST_LIBS_EXCLUDED python)
+            endif()
+
+            string(REGEX REPLACE "[,]" ";" __BII_BOOST_LIBS_EXCLUDED ${BII_BOOST_LIBS_EXCLUDED})
+
+            foreach(lib ${__BII_BOOST_LIBS_EXCLUDED})
+                set(__BII_BOOST_B2_CALL ${__BII_BOOST_B2_CALL} --without-${lib})
+            endforeach()
+
+            execute_process(COMMAND ${__BII_BOOST_B2_CALL} WORKING_DIRECTORY ${BII_BOOST_DIR}
+                            RESULT_VARIABLE Result OUTPUT_VARIABLE Output ERROR_VARIABLE Error)
+            if(NOT Result EQUAL 0)
+                message(FATAL_ERROR "Failed running ${__BII_BOOST_B2_CALL}:\n${Output}\n${Error}\n")
+            endif()
+        endif()
+
+
+    else()
+        message(STATUS "Boost build aborted! Build output folder (${BII_BOOST_DIR}/stage) already exists. Set BII_BOOST_BUILD_FORCE to override")
+    endif()
+endfunction()
+
+function(BII_BOOST_INSTALL)
+    BII_BOOST_INSTALL_SETUP()
+
+    if(TRUE OR (NOT (EXISTS ${BIICODE_ENV_DIR}/boost/__BII_BOOST_SETUP_${BII_BOOST_VERSION}_${BII_BOOST_TOOLSET}_READY)) OR (${BII_BOOST_BUILD_FORCE}))
+        BII_BOOST_PRINT_SETUP()
+
+        BII_BOOST_DOWNLOAD()
+        BII_BOOST_BOOTSTRAP()
+        BII_BOOST_BUILD()
+
+        #Mark current setup (toolset + version) as built
+        file(WRITE ${BIICODE_ENV_DIR}/boost/__BII_BOOST_SETUP_${BII_BOOST_VERSION}_${BII_BOOST_TOOLSET}_READY "Biicode boost ${BII_BOOST_VERSION} w/ ${BII_BOOST_TOOLSET} toolset setup ready to use")
+    endif()
+
+    set(BOOST_ROOT       "${BII_BOOST_DIR}"         CACHE INTERNAL "Boost root directory")
+    set(BOOST_INCLUDEDIR "${BOOST_ROOT}"            CACHE INTERNAL "Boost include directory")
+    set(BOOST_LIBRARYDIR "${BOOST_ROOT}/stage/lib/" CACHE INTERNAL "Boost library directory")
+
+
+    # CMake 3.1 on windows does not search for Boost 1.57.0 by default, this is a workaround
+    set(Boost_ADDITIONAL_VERSIONS ${BII_BOOST_VERSION} CACHE INTERNAL "")
+    # Disable searching on system Boost
+    set(Boost_NO_SYSTEM_PATHS TRUE CACHE INTERNAL "")
+
+    # FindBoost auto-compute does not care about Clang?
+    if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+        COMPILER_VERSION(__clang_version)
+        string(REGEX REPLACE "([0-9])\\.([0-9])" "\\1\\2" __clang_version ${__clang_version})
+
+        set(Boost_COMPILER "-clang${__clang_version}" CACHE INTERNAL "Boost library suffix")
+
+        message(STATUS ">>>> Setting Boost_COMPILER suffix manually for clang: ${Boost_COMPILER}")
+    endif()
+
+    find_package(Boost)
+    if(Boost_FOUND)
+        include_directories(${Boost_INCLUDE_DIR})
+
+        if(MSVC)
+            link_directories(${Boost_LIBRARYDIR})
+        endif()
+
+        add_definitions( "-DHAS_BOOST" )
+
+        message(STATUS "BOOST_ROOT       ${BOOST_ROOT}")
+        message(STATUS "BOOST_INCLUDEDIR ${BOOST_INCLUDEDIR}")
+        message(STATUS "BOOST_LIBRARYDIR ${BOOST_LIBRARYDIR}")
+    else()
+        message(FATAL_ERROR "Boost not found after biicode setup!")
+    endif()
+endfunction()


[cmake] Add missing quote to ${CMAKE_CXX_FLAGS} (#5566)

Without it, we can see failures like:

```
CMake Error at build_tools/cmake/iree_copts.cmake:297 (string):
  string sub-command REPLACE requires at least four arguments.
```

--- build_tools/cmake/iree_copts.cmake
+++ build_tools/cmake/iree_copts.cmake
@@ -293,8 +293,8 @@
 #   https://github.com/google/iree/issues/4665.
 #   https://discourse.cmake.org/t/how-to-fix-build-warning-d9025-overriding-gr-with-gr/878
 #   https://gitlab.kitware.com/cmake/cmake/-/issues/20610
-if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
-  string(REPLACE "/GR" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+if(CMAKE_CXX_FLAGS AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+  string(REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
 endif()

 if(NOT ANDROID)


Correct version number.

Correct version number.

--- VERSION.cmake
+++ VERSION.cmake
@@ -44,10 +44,10 @@
 #    set COMPATMINOR to MINOR. (binary incompatible change)
 #

-# Package version 2.4.14
+# Package version 2.4.15
 SET(OPENWSMAN_MAJOR "2")
 SET(OPENWSMAN_MINOR "4")
-SET(OPENWSMAN_PATCH "14")
+SET(OPENWSMAN_PATCH "15")

 # Plugin API 2.2
 SET(OPENWSMAN_PLUGIN_API_MAJOR "2")


New version: 0.3.15

New version: 0.3.15

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "3")
-SET(HAWKEY_PATCH "14")
+SET(HAWKEY_PATCH "15")


CMake, Add binary_dir option to add_umodule macro.

       This is usefull when the umodule subdirectory was not a real
       subdirectory.

	* build-aux/cmake/modules/UModule.cmake (add_umodule): Here.

--- build-aux/cmake/modules/UModule.cmake
+++ build-aux/cmake/modules/UModule.cmake
@@ -91,13 +91,21 @@
 # umodules (with for example 'add_uobject' command) to grab all dependencies.
 # Indeed, ${UMODULE_DIR}_${TYPE}_SHARED_LIBRARIES variables are set during
 # those steps.
-# e.g. add_umodule(umodule_folder [DEPENDS umodule_folder1 umodule_folder2..])
+# e.g. add_umodule(umodule_folder [umodule_binary_dir]
+#                  [DEPENDS umodule_folder1 umodule_folder2..])

 MACRO(add_umodule)

     parse_arguments(UMODULE "DEPENDS" "" ${ARGN})
-    set(UMODULE_DIR ${UMODULE_DEFAULT_ARGS})
+    list(LENGTH UMODULE_DEFAULT_ARGS args_length)
+    list(GET UMODULE_DEFAULT_ARGS 0 UMODULE_DIR)
+    if(args_length GREATER 1)
+      list(GET UMODULE_DEFAULT_ARGS 1 UMODULE_BINARY_DIR)
+    else()
+      set(UMODULE_BINARY_DIR)
+    endif()
     set(UMODULE_LINKS)
+
     foreach(i ${UMODULE_INSTALL_TYPES})
         set(${UMODULE_DIR}_${i}_SHARED_LIBRARIES)
     endforeach(i ${UMODULE_INSTALL_TYPES})
@@ -126,7 +134,7 @@
         endforeach(UMODULE_DEPENDS_DIR)
     endif(UMODULE_DEPENDS)

-    add_subdirectory(${UMODULE_DIR})
+    add_subdirectory(${UMODULE_DIR} ${UMODULE_BINARY_DIR})

 ENDMACRO(add_umodule)


Use updated FindAprUtil

Use updated FindAprUtil

--- src/ibp/cmake/FindAPRUtil-ACCRE.cmake
+++ src/ibp/cmake/FindAPRUtil-ACCRE.cmake
@@ -1,51 +1,65 @@
-# -*- cmake -*-
+# Locate apr-util include paths and libraries. Based on findapr.cmake;
+# simple modifications to apply to apr-util instead.

-# - Find Apache Portable Runtime
-# Find the APR includes and libraries
 # This module defines
-#  APRUTIL_INCLUDE_DIR and APRUTIL_INCLUDE_DIR, where to find apr.h, etc.
-#  APRUTIL_LIBRARIES and APRUTIL_LIBRARIES, the libraries needed to use APR.
-#  APRUTIL_FOUND and APRUTIL_FOUND, If false, do not try to use APR.
-# also defined, but not for general use are
-#  APRUTIL_LIBRARY and APRUTIL_LIBRARY, where to find the APR library.
+# APU_INCLUDES, where to find apu.h, etc.
+# APU_LIBS, linker switches to use with ld to link against apr-util
+# APU_EXTRALIBS, additional libraries to link against
+# APU_LDFLAGS, additional linker flags that must be used
+# APU_FOUND, set to TRUE if found, FALSE otherwise
+# APU_VERSION, set to the version of apr-util found

-# APR first.
+set(APU_FOUND FALSE)

-# Find the *relative* include path
-find_path(apr_inc NAMES apr-accre-1.0/apr.h apr-ACCRE-1/apr.h)
+find_program(APU_CONFIG_EXECUTABLE apu-ACCRE-1-config)
+mark_as_advanced(APU_CONFIG_EXECUTABLE)

-# Now convert it to the full path
-if (apr_inc)
-   find_path(APR_INCLUDE_DIR NAMES apr.h PATHS ${apr_inc}/apr-accre-1.0 ${apr_inc}/apr-ACCRE-1 )
-else (apr_inc)
-   find_path(APRUTIL_INCLUDE_DIR apr.h)
-endif (apr_inc)
+macro(_apu_invoke _varname _regexp)
+    execute_process(
+        COMMAND ${APU_CONFIG_EXECUTABLE} ${ARGN}
+        OUTPUT_VARIABLE _apu_output
+        RESULT_VARIABLE _apu_failed
+    )

-FIND_LIBRARY(APRUTIL_LIBRARY NAMES aprutil-ACCRE-1)
+    if(_apu_failed)
+        message(FATAL_ERROR "${APU_CONFIG_EXECUTABLE} ${ARGN} failed")
+    else()
+        string(REGEX REPLACE "[\r\n]"  "" _apu_output "${_apu_output}")

-IF (APRUTIL_LIBRARY AND APRUTIL_INCLUDE_DIR)
-    SET(APRUTIL_LIBRARIES ${APRUTIL_LIBRARY})
-    SET(APRUTIL_FOUND "YES")
-ELSE (APRUTIL_LIBRARY AND APRUTIL_INCLUDE_DIR)
-  SET(APRUTIL_FOUND "NO")
-ENDIF (APRUTIL_LIBRARY AND APRUTIL_INCLUDE_DIR)
+        if(NOT ${_regexp} STREQUAL "")
+            string(REGEX REPLACE "${_regexp}" " " _apu_output "${_apu_output}")
+        endif()

+        # trim string after processing the _regexp arg because it may introduce a <space> at the ends of the string
+        string(REGEX REPLACE " +$"     "" _apu_output "${_apu_output}")
+        string(REGEX REPLACE "^ +"     "" _apu_output "${_apu_output}")

-IF (APRUTIL_FOUND)
-   IF (NOT APRUTIL_FIND_QUIETLY)
-      MESSAGE(STATUS "Found APRUtil-ACCRE: ${APRUTIL_LIBRARIES}")
-   ENDIF (NOT APRUTIL_FIND_QUIETLY)
-ELSE (APRUTIL_FOUND)
-   IF (APRUTIL_FIND_REQUIRED)
-      MESSAGE(FATAL_ERROR "Could not find APRUtil-ACCRE library")
-   ENDIF (APRUTIL_FIND_REQUIRED)
-ENDIF (APRUTIL_FOUND)
+        # XXX: We don't want to invoke separate_arguments() for APU_LDFLAGS;
+        # just leave as-is
+        if(NOT ${_varname} STREQUAL "APU_LDFLAGS")
+            separate_arguments(_apu_output)
+        endif()

-# Deprecated declarations.
-SET (NATIVE_APRUTIL_INCLUDE_PATH ${APRUTIL_INCLUDE_DIR} )
-GET_FILENAME_COMPONENT (NATIVE_APRUTIL_LIB_PATH ${APRUTIL_LIBRARY} PATH)
+        set(${_varname} "${_apu_output}")
+    endif()
+endmacro(_apu_invoke)

-MARK_AS_ADVANCED(
-  APRUTIL_LIBRARY
-  APRUTIL_INCLUDE_DIR
-  )
+_apu_invoke(APU_INCLUDES  "(^| )-I" --includes)
+_apu_invoke(APU_EXTRALIBS "(^| )-l" --libs)
+_apu_invoke(APU_LIBTOOL   "(^| )-L" --link-libtool)
+_apu_invoke(APU_LIBS      ""        --link-ld)
+_apu_invoke(APU_LDFLAGS   ""        --ldflags)
+_apu_invoke(APU_VERSION   ""        --version)
+
+list(GET APU_LIBTOOL 0 APU_LIBTOOL_ARG0)
+
+get_filename_component(APU_LIBTOOL_BASE ${APU_LIBTOOL_ARG0} PATH )
+FIND_LIBRARY(APU_LIBRARY NAMES apr-accre-1 aprutil-ACCRE-1 PATHS ${APU_LIBTOOL_BASE})
+
+# compatibility, allow this CMake module to work with the various CMakeList.txt files
+set(APRUTIL_INCLUDE_DIR "${APU_INCLUDES}")
+set(APRUTIL_LIBRARY "${APU_LIBRARY}")
+
+MESSAGE(STATUS "APU AT ${APU_LIBRARY}")
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(APU DEFAULT_MSG APU_INCLUDES APU_LIBS APU_LIBRARY APU_VERSION)


Do not generate IDL files for .srv files for Connext

--- rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
@@ -3,9 +3,19 @@
 message("   - interface files: ${rosidl_generate_interfaces_IDL_FILES}")
 message("   - dependency package names: ${rosidl_generate_interfaces_DEPENDENCY_PACKAGE_NAMES}")

+set(_ros_idl_files "")
+foreach(_idl_file ${rosidl_generate_interfaces_IDL_FILES})
+  get_filename_component(_extension "${_idl_file}" EXT)
+  # Skip .srv files
+  if("${_extension}" STREQUAL ".msg")
+    get_filename_component(name "${_idl_file}" NAME_WE)
+    list(APPEND _ros_idl_files "${_idl_file}")
+  endif()
+endforeach()
+
 rosidl_generate_dds_interfaces(
   ${rosidl_generate_interfaces_TARGET}__dds_connext_idl
-  IDL_FILES ${rosidl_generate_interfaces_IDL_FILES}
+  IDL_FILES ${_ros_idl_files}
   DEPENDENCY_PACKAGE_NAMES ${rosidl_generate_interfaces_DEPENDENCY_PACKAGE_NAMES}
   OUTPUT_SUBFOLDERS "dds_connext"
 )


Fixed bad path to include dir in Findossim.cmake

--- cmake/CMakeModules/Findossim.cmake
+++ cmake/CMakeModules/Findossim.cmake
@@ -18,7 +18,7 @@
 set(CMAKE_FIND_FRAMEWORK "LAST")
 find_path(OSSIM_INCLUDE_DIR ossim/ossimVersion.h ossimVersion.h
    PATHS
-      $ENV{OSSIM_DEV_HOME}/core/include
+      $ENV{OSSIM_DEV_HOME}/ossim/include
       $ENV{OSSIM_INSTALL_PREFIX}/include
    PATH_SUFFIXES
       include


OpenCV: disable examples build

OpenCV: disable examples build

--- cmake/projects/OpenCV/hunter.cmake
+++ cmake/projects/OpenCV/hunter.cmake
@@ -93,11 +93,13 @@
 hunter_cmake_args(
     OpenCV
     CMAKE_ARGS
+        BUILD_ANDROID_EXAMPLES=OFF
         BUILD_DOCS=OFF
+        BUILD_EXAMPLES=OFF
+        BUILD_PERF_TESTS=OFF
         BUILD_TESTS=OFF
-        BUILD_PERF_TESTS=OFF
         BUILD_opencv_apps=OFF
-        BUILD_EXAMPLES=OFF
+        INSTALL_PYTHON_EXAMPLES=OFF
         ${_ios_args}
         # Find packages in Hunter (instead of building from OpenCV sources)
         BUILD_ZLIB=OFF


update imshow release

update imshow release

--- cmake/projects/imshow/hunter.cmake
+++ cmake/projects/imshow/hunter.cmake
@@ -16,9 +16,9 @@
     VERSION
     "1.0.0"
     URL
-    "https://github.com/hunter-packages/imshow/archive/v1.0.0.tar.gz"
+    "https://github.com/hunter-packages/imshow/archive/v1.0.0.tar.gz"
     SHA1
-    eb2b0a425c6769ff35bc680cc07c1da0ed104df1
+    3b01b2cdd59d8a90da0df45888e96175da009ef5
 )

 hunter_pick_scheme(DEFAULT url_sha1_cmake)


libjansson fix

libjansson fix

--- libjansson.cmake
+++ libjansson.cmake
@@ -10,7 +10,7 @@
 include (ExternalSource)
 include (BuildSupport)

-external_git_pro (libjansson
+external_git_repo (libjansson
   HEAD
   git://github.com/akheron/jansson.git
   )


[cmake] fix override/final check

[cmake] fix override/final check

--- cmake/modules/CheckOverrideFinal.cmake
+++ cmake/modules/CheckOverrideFinal.cmake
@@ -12,13 +12,13 @@
         virtual void bar() override {}
       };
       int main(){}"
-  DS_OVERRIDE)
+  DS_OVERRIDE_ON)

-if(DS_OVERRIDE)
+if(DS_OVERRIDE_ON)
     set(DS_OVERRIDE override)
 else()
     set(DS_OVERRIDE /*override*/)
-endif(DS_OVERRIDE)
+endif(DS_OVERRIDE_ON)

 check_cxx_source_compiles("struct IFoo
       {
@@ -33,10 +33,10 @@
       };
       int main(){}
       "
-  DS_FINAL)
+  DS_FINAL_ON)

-if(DS_FINAL)
+if(DS_FINAL_ON)
     set(DS_FINAL final)
 else()
     set(DS_FINAL /*final*/)
-endif(DS_FINAL)+endif(DS_FINAL_ON)


[cmake] macOS: prefer user-provided Python install over Framework:

The framework one depends on https://github.com/root-project/root/issues/6753
and https://gitlab.kitware.com/cmake/cmake/-/issues/21293
before we can potentially use it. And anyway if users install their own
Python we should be nice and use that, not Python coming with Xcode / cmd line tools.

Works around:
dlopen(/Users/sftnight/build/jenkins/night/LABEL/mac10beta/SPEC/cxx17/V/master/build/lib/libROOTTPython.so, 9): Library not loaded: @rpath/Python3.framework/Versions/3.8/Python3
  Referenced from: /Users/sftnight/build/jenkins/night/LABEL/mac10beta/SPEC/cxx17/V/master/build/lib/libROOTTPython.so
  Reason: image not found

--- cmake/modules/SearchRootCoreDeps.cmake
+++ cmake/modules/SearchRootCoreDeps.cmake
@@ -64,6 +64,11 @@
 ]]

 message(STATUS "Looking for Python")
+
+# On macOS, prefer user-provided Pythons.
+set(Python_FIND_FRAMEWORK LAST)
+set(Python2_FIND_FRAMEWORK LAST)
+set(Python3_FIND_FRAMEWORK LAST)

 # CMake 3.14 is the minimum because in 3.12 and 3.13, despite find_package(PythonX) being present,
 # the Numpy-related variables are not set


Detect Intel OpenCL SDK exactly.

Detect Intel OpenCL SDK exactly.

the rotate_opencl sample tries to access "CL/va_ext.h".
which is Intel OpenCL SDK specific extension.
So let's try to only build the sample if user has installed
Intel OpenCL SDK.

v2:
slight update the cmake to move make_library under INTEL_OPENCL_SDK.
v3:
make patch simple.

Signed-off-by: Ruiling Song <286a174c1339c6eff91abc41c3a1012c95030c95@intel.com>

--- builder/FindOpenCL.cmake
+++ builder/FindOpenCL.cmake
@@ -25,16 +25,18 @@

 if ( NOT OPENCL_INCLUDE MATCHES NOTFOUND )
     if ( NOT OPENCL_LIBRARY MATCHES NOTFOUND )
-        set ( OPENCL_FOUND TRUE )
+        if ( EXISTS /etc/OpenCL/vendors/intel.icd )
+            set ( OPENCL_FOUND TRUE )

-        get_filename_component( OPENCL_LIBRARY_PATH ${OPENCL_LIBRARY} PATH )
+            get_filename_component( OPENCL_LIBRARY_PATH ${OPENCL_LIBRARY} PATH )

-        list( APPEND OPENCL_LIBS OpenCL )
+            list( APPEND OPENCL_LIBS OpenCL )
+        endif()
     endif()
 endif()

 if ( NOT DEFINED OPENCL_FOUND )
-    message( STATUS "OpenCL was not found (optional). The following will not be built: rotate_opencl plugin.")
+  message( STATUS "Intel OpenCL SDK was not found (optional). The following will not be built: rotate_opencl plugin.")
 else ()
-    message( STATUS "OpenCL was found here: ${OPENCL_LIBRARY_PATH} and ${OPENCL_INCLUDE}" )
+  message( STATUS "Intel OpenCL SDK was found here: ${OPENCL_LIBRARY_PATH} and ${OPENCL_INCLUDE}" )
 endif()


when using pcl do not allow it to override compiler flags

--- cMake/FreeCAD_Helpers/SetupPCL.cmake
+++ cMake/FreeCAD_Helpers/SetupPCL.cmake
@@ -6,6 +6,9 @@
     # PCL needs to be found before boost because the PCLConfig also calls find_package(Boost ...),
     # but with different components
     if(FREECAD_USE_PCL)
+        # pcl overrides the compiler flags by adding -Wno-deprecated
+        set (SAVE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
         find_package(PCL REQUIRED COMPONENTS common kdtree features surface io filters segmentation sample_consensus)
+        set (CMAKE_CXX_FLAGS ${SAVE_CXX_FLAGS})
     endif(FREECAD_USE_PCL)
 endmacro(SetupPCL)


build: Clarified LSL find script code ownership

--- cmake-modules/FindThirdPartyLSL.cmake
+++ cmake-modules/FindThirdPartyLSL.cmake
@@ -9,6 +9,9 @@
 #
 # Adds library to target
 # Adds include path
+#
+# Script @author Jussi T. Lindgren / Inria
+#
 # ---------------------------------

 # The first ${..}/liblsl path is for Windows, the second ${..}/ for Linux


CMake: set stack size to 2MB for MSVC builds

Compiling under Visual C++ 2012 with the default stack size of 1MB, the stack
overflows at a depth of 216 template instantiations, well before the 256
default limit. This patch modifies the default MSVC stack size to 2MB.

Patch by Yaron Keren!

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -153,6 +153,10 @@
 if( MSVC )
   include(ChooseMSVCCRT)

+  # Visual C++ default stack size is 1MB. This is not enough for clang to
+  # instantiate templates up to the default maximum depth allowed, 256.
+  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -STACK:2097152")
+
   if( MSVC10 )
     # MSVC 10 will complain about headers in the STL not being exported, but
     # will not complain in MSVC 11.


build: convert parameter to cached value

This converts the local variable to a cached variable which the user can
specify.  By making this a cached variable, it is easier to control and
ensure that a default value is provided.

--- cmake/modules/SwiftConfigureSDK.cmake
+++ cmake/modules/SwiftConfigureSDK.cmake
@@ -252,9 +252,8 @@
           "${SWIFT_ANDROID_NDK_PATH}/toolchains/${SWIFT_SDK_ANDROID_ARCH_${arch}_NDK_TRIPLE}-${SWIFT_ANDROID_NDK_GCC_VERSION}/prebuilt/${_swift_android_prebuilt_build}")
       endif()
     else()
-      if(NOT SWIFT_SDK_${prefix}_ARCH_${arch}_PATH)
-        set(SWIFT_SDK_${prefix}_ARCH_${arch}_PATH "/")
-      endif()
+      set(SWIFT_SDK_${prefix}_ARCH_${arch}_PATH "/" CACHE STRING "CMAKE_SYSROOT for ${prefix} ${arch}")
+
       if("${prefix}" STREQUAL "HAIKU")
         set(SWIFT_SDK_HAIKU_ARCH_${arch}_LIBC_INCLUDE_DIRECTORY "/system/develop/headers/posix" CACHE STRING "Path to C library headers")
         set(SWIFT_SDK_HAIKU_ARCH_${arch}_LIBC_ARCHITECTURE_INCLUDE_DIRECTORY "/system/develop/headers" CACHE STRING "Path to C library architecture headers")


refs #5368 change up compiler defines to make freebsd happier

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

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -10,13 +10,19 @@

 ## preprocessor definitions we want everywhere
 add_c_defines(
-  _SVID_SOURCE
-  _XOPEN_SOURCE=600
   _FILE_OFFSET_BITS=64
   _LARGEFILE64_SOURCE
   __STDC_FORMAT_MACROS
   __STDC_LIMIT_MACROS
-  )
+  __LONG_LONG_SUPPORTED
+  )
+if (NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
+  ## on FreeBSD these types of macros actually remove functionality
+  add_c_defines(
+    _SVID_SOURCE
+    _XOPEN_SOURCE=600
+    )
+endif ()

 ## add TOKU_PTHREAD_DEBUG for debug builds
 set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG TOKU_PTHREAD_DEBUG)


generic is not a valid arch for GCC. tried to fix this

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -43,7 +43,7 @@
 endmacro(_my_find)

 macro(AutodetectHostArchitecture)
-	set(TARGET_ARCHITECTURE "generic")
+	set(TARGET_ARCHITECTURE "native")
 	set(ARCH_FLAGS)
 	set(_vendor_id)
 	set(_cpu_family)
@@ -104,8 +104,8 @@
 elseif(_cpu_model EQUAL 14)
 	set(TARGET_ARCHITECTURE "core")
 elseif(_cpu_model LESS 14)
-	message(WARNING "Your CPU (family ${_cpu_family}, model ${_cpu_model}) is not known. Auto-detection of optimization flags failed and will use the generic CPU settings with SSE2.")
-	set(TARGET_ARCHITECTURE "generic")
+	message(WARNING "Your CPU (family ${_cpu_family}, model ${_cpu_model}) is not known. Auto-detection of optimization flags failed and will use the native CPU settings with SSE2.")
+	set(TARGET_ARCHITECTURE "native")
 else()
 	message(WARNING "Your CPU (family ${_cpu_family}, model ${_cpu_model}) is not known. Auto-detection of optimization flags failed and will use the 65nm Core 2 CPU settings.")
 	set(TARGET_ARCHITECTURE "merom")
@@ -139,7 +139,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\", \"ivy-bridge\", \"atom\", \"k8\", \"k8-sse3\", \"barcelona\", \"istanbul\", \"magny-cours\", \"bulldozer\", \"interlagos\", \"piledriver\".")
+	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\", \"native\", \"core\", \"merom\" (65nm Core2), \"penryn\" (45nm Core2), \"nehalem\", \"westmere\", \"sandy-bridge\", \"ivy-bridge\", \"atom\", \"k8\", \"k8-sse3\", \"barcelona\", \"istanbul\", \"magny-cours\", \"bulldozer\", \"interlagos\", \"piledriver\".")
 set(_force)
 	if(NOT _last_target_arch STREQUAL "${TARGET_ARCHITECTURE}")
 	message(STATUS "target changed from \"${_last_target_arch}\" to \"${TARGET_ARCHITECTURE}\"")
@@ -237,8 +237,8 @@
 	list(APPEND _march_flag_list "barcelona")
 	list(APPEND _march_flag_list "core2")
 	list(APPEND _available_vector_units_list "sse" "sse2" "sse3" "sse4a")
-	elseif(TARGET_ARCHITECTURE STREQUAL "generic")
-	list(APPEND _march_flag_list "generic")
+	elseif(TARGET_ARCHITECTURE STREQUAL "native")
+	list(APPEND _march_flag_list "native")
 	elseif(TARGET_ARCHITECTURE STREQUAL "none")
 # add this clause to remove it from the else clause
 	else(TARGET_ARCHITECTURE STREQUAL "core")


[lldb][CMake] Avoid 'Autogenerate scheme' dialogs in Xcode projects

Summary:
Supported in CMake 3.9 and higher: https://cmake.org/cmake/help/v3.9/variable/CMAKE_XCODE_GENERATE_SCHEME.html
Older versions will just report it as unused in the end of the configuration process.

Reviewers: jingham, JDevlieghere

Reviewed By: JDevlieghere

Subscribers: mgorny, lldb-commits, #lldb

Tags: #lldb

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

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

--- cmake/caches/Apple-lldb-Xcode.cmake
+++ cmake/caches/Apple-lldb-Xcode.cmake
@@ -2,3 +2,4 @@

 set(LLDB_BUILD_FRAMEWORK ON CACHE BOOL "")
 set(CMAKE_OSX_DEPLOYMENT_TARGET 10.11 CACHE STRING "")
+set(CMAKE_XCODE_GENERATE_SCHEME ON CACHE BOOL "")


Format

Format


[cmake] fixes doxygen pre build step running after the nec. dependency

--- cmake/modules/DuneStuffMacros.cmake
+++ cmake/modules/DuneStuffMacros.cmake
@@ -174,5 +174,6 @@

 macro(add_forced_doxygen_target)
   add_doxygen_target()
-  add_custom_command(TARGET doxygen_${ProjectName} PRE_BUILD COMMAND rm -rf ${CMAKE_CURRENT_BINARY_DIR}/html )
+  add_custom_target(doxygen_${ProjectName}_pre_build COMMAND rm -rf ${CMAKE_CURRENT_BINARY_DIR}/html )
+  add_dependencies(doxygen_${ProjectName} doxygen_${ProjectName}_pre_build)
 endmacro(add_forced_doxygen_target)


[cmake] link to system CXSparse if selected and found

--- cmake/siconos_find_common_dep.cmake
+++ cmake/siconos_find_common_dep.cmake
@@ -44,6 +44,7 @@
     but not found! Using the internal copy of suitesparse")
   else()
     set(_sys_CXSparse TRUE)
+    list(APPEND SICONOS_LINK_LIBRARIES ${CXSparse_LIBRARY})
   endif()
   set(USE_SYSTEM_SUITESPARSE ${_sys_CXSparse} CACHE INTERNAL "flag to check to systemwide SuiteSparse install")
 endif()


[Build] Added support to read the version from the CMake cache.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -139,6 +139,8 @@
 macro (store_in_cache)
   # Force some variables that could be defined in the command line to be
   # written to cache
+  set (PACKAGE_VERSION "${PACKAGE_VERSION}" CACHE STRING
+  "Version of the project/package")
   set (BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS}" CACHE BOOL
 	"Set to OFF to build static libraries" FORCE)
   set (CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE PATH


fix update command

fix update command

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

--- trunk/test/openVibeTests.cmake
+++ trunk/test/openVibeTests.cmake
@@ -74,7 +74,7 @@
 endif(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")

 ## -- Update Command
-set(CTEST_UPDATE_COMMAND               "${CTEST_SVN_COMMAND}")
+set(CTEST_UPDATE_COMMAND               "${CTEST_SVN_COMMAND} update")


Update CodeCoverage.cmake

Update CodeCoverage.cmake

[ci skip]

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -10,10 +10,15 @@
     FIND_PROGRAM(LCOV_PATH lcov)
 ENDIF()

-FIND_PROGRAM(GENHTML_PATH genhtml)
+IF(DEFINED ENV{GENHTML_PATH})
+    SET(GENHTML_PATH $ENV{GENHTML_PATH})
+ELSE()
+    FIND_PROGRAM(GENHTML_PATH genhtml)
+ENDIF()

 MESSAGE(STATUS "GCOV_PATH="${GCOV_PATH})
 MESSAGE(STATUS "LCOV_PATH="${LCOV_PATH})
+MESSAGE(STATUS "GENHTML_PATH="${GENHTML_PATH})

 IF(NOT GCOV_PATH)
     MESSAGE(FATAL_ERROR "gcov not found! Aborting...")


Bug 1054: Use set(EIGEN_CXX_FLAG_VERSION "/version") only for Intel compilers on Windows. Also removed code calling `head -n1` and always use integrated REGEX functionality.

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -367,23 +367,15 @@
     # on all other system we rely on ${CMAKE_CXX_COMPILER}
     # supporting a "--version" or "/version" flag

-    if(WIN32 AND NOT CYGWIN AND NOT MINGW)
+    if(WIN32 AND ${CMAKE_CXX_COMPILER_ID} EQUAL "Intel")
       set(EIGEN_CXX_FLAG_VERSION "/version")
     else()
       set(EIGEN_CXX_FLAG_VERSION "--version")
     endif()

-    # check whether the head command exists
-    find_program(HEAD_EXE head NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_CMAKE_SYSTEM_PATH)
-    if(HEAD_EXE)
-      execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${EIGEN_CXX_FLAG_VERSION}
-                      COMMAND head -n 1
-                      OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
-    else()
-      execute_process(COMMAND ${CMAKE_CXX_COMPILER}  ${EIGEN_CXX_FLAG_VERSION}
-                      OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
-      string(REGEX REPLACE "[\n\r].*"  ""  eigen_cxx_compiler_version_string  ${eigen_cxx_compiler_version_string})
-    endif()
+    execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${EIGEN_CXX_FLAG_VERSION}
+                    OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
+    string(REGEX REPLACE "[\n\r].*"  ""  eigen_cxx_compiler_version_string  ${eigen_cxx_compiler_version_string})

     ei_get_compilerver_from_cxx_version_string("${eigen_cxx_compiler_version_string}" CNAME CVER)
     set(${VAR} "${CNAME}-${CVER}")


fix detection of ICC version

fix detection of ICC version

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -316,7 +316,7 @@
       string( REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1.\\2.\\3"
               eigen_cxx_compiler_version ${eigen_cxx_compiler_version_raw})
     elseif(eigen_cxx_compiler_name MATCHES "icpc|clang")
-      string( REGEX REPLACE ".* ([0-9]*)\\.([0-9]*) .*" "\\1.\\2"
+      string( REGEX REPLACE ".* ([0-9]+\\.[0-9]+\\.[0-9]+|[0-9]+\\.[0-9]+).*" "\\1"
               eigen_cxx_compiler_version ${eigen_cxx_compiler_version_raw})
     else()
       set(eigen_cxx_compiler_version "_")


removed compiler warnings

removed compiler warnings

--- cmake/FindCasaCore.cmake
+++ cmake/FindCasaCore.cmake
@@ -1,5 +1,5 @@
 # - Find casacore
-#
+#==============================================================================
 # Find the native CASACORE includes and library
 #
 #  CASACORE_INCLUDE_DIR  - where to find casacore.h, etc.
@@ -7,72 +7,84 @@
 #                          search for libraries
 #  CASACORE_LIBRARIES    - List of libraries when using casacore.
 #  CASACORE_FOUND        - True if casacore found.
+#==============================================================================
+#
+# Required external packages:
+#   gfortran
+#   cfitsio3
+#   wcs
+#   blas
+#   fftw3
+#   fftw3f
+#
+# Casacore dependencies between sub-packages:
+# http://usg.lofar.org/wiki/doku.php?id=software:packages:casacore:dependency_of_the_packages
+#
+#==============================================================================
+#
+# Issues:
+#   - Near lack of handling of external libraries.
+#   - No handling of interdependance of modules.
+#   - Exporting of module libraries? (with useful names)
+#   - Include dir not set? (module include directories?)
+#   - Single library mode?
+#   - Library versions?
+#
+#==============================================================================

-#message("========== version: ${CasaCore_FIND_VERSION}")
-#message("========== ver major: ${CasaCore_FIND_VERSION_MAJOR}")
-#message("========== ver minor: ${CasaCore_FIND_VERSION_MINOR}")
-#message("========== ver path: ${CasaCore_FIND_VERSION_PATCH}")
-#message("========== exact: ${CasaCore_VERSION_EXACT}")
-#message("========== required: ${CasaCore_FIND_REQUIRED}")
+set(casacore_modules
+    casa_casa
+    casa_components
+    casa_coordinates
+    casa_fits
+    casa_images
+    casa_lattices
+#    casa_measures_f ??!
+    casa_measures
+    casa_mirlib
+    casa_msfits
+    casa_ms
+    casa_scimath_f
+    casa_scimath
+    casa_tables
+)

-#include(FindPkgConfig)
-#pkg_check_modules(CFITSIO cfitsio>=3.0 REQUIRED)
-#pkg_check_modules(WCSLIB wcslib>=4.7 REQUIRED)
+# Already in cache, be silent
+if (CASACORE_INCLUDE_DIR)
+    set (CASACORE_FIND_QUIETLY TRUE)
+endif (CASACORE_INCLUDE_DIR)

-#find_library(TEST_LIB NAMES oskar_ms
-#    PATHS
-#)
-
-IF (CASACORE_INCLUDE_DIR)
-    # Already in cache, be silent
-    SET(CASACORE_FIND_QUIETLY TRUE)
-ENDIF (CASACORE_INCLUDE_DIR)
+if (CASACORE_FIND_QUIETLY OR NOT CASACORE_FIND_REQUIRED)
+  find_package(LAPACK)
+else ()
+  find_package(LAPACK REQUIRED)
+endif ()

-### mmm probably need to find the other deps too....
-### see: http://usg.lofar.org/websvn/filedetails.php?repname=repos+1&path=%2Fcode%2Ftrunk%2Fdevel_common%2Fcmake%2FFindCASACORE.cmake&rev=1513&sc=1
-if(CASACORE_FIND_QUIETLY OR NOT CASACORE_FIND_REQUIRED)
-  find_package(LAPACK)
-else(CASACORE_FIND_QUIETLY OR NOT CASACORE_FIND_REQUIRED)
-  find_package(LAPACK REQUIRED)
-endif(CASACORE_FIND_QUIETLY OR NOT CASACORE_FIND_REQUIRED)
+# mmm this only works by luck by the looks of things...!
+if (LAPACK_FOUND)
+    set(CASACORE_LINKER_FLAGS ${LAPACK_LINKER_FLAGS})
+    find_path(CASACORE_INCLUDE_DIR casacore)

-if(LAPACK_FOUND)
-  set(CASACORE_LINKER_FLAGS ${LAPACK_LINKER_FLAGS})
+    foreach (module ${casacore_modules})
+        find_library(CASACORE_LIBRARY_${module} NAMES ${module}
+            PATHS ENV CASACORE_LIBRARY_PATH)
+        mark_as_advanced(CASACORE_LIBRARY_${module})
+        list(APPEND CASACORE_LIBRARIES ${CASACORE_LIBRARY_${module}})
+    endforeach ()

-FIND_PATH(CASACORE_INCLUDE_DIR casacore)
-
-SET(CASACORE_NAMES
-    casa_images
-    casa_mirlib
-    casa_components
-    casa_coordinates
-    casa_lattices
-    casa_msfits
-    casa_ms
-    casa_fits
-    casa_measures
-    casa_tables
-    casa_scimath
-    casa_scimath_f
-    casa_casa
-)
-FOREACH( lib ${CASACORE_NAMES} )
-    FIND_LIBRARY(CASACORE_LIBRARY_${lib} NAMES ${lib} PATHS ENV CASACORE_LIBRARY_PATH )
-    MARK_AS_ADVANCED(CASACORE_LIBRARY_${lib})
-    LIST(APPEND CASACORE_LIBRARIES ${CASACORE_LIBRARY_${lib}})
-ENDFOREACH(lib)
-LIST(APPEND CASACORE_LIBRARIES ${LAPACK_LIBRARIES})
-endif(LAPACK_FOUND)
+    list(APPEND CASACORE_LIBRARIES ${LAPACK_LIBRARIES})
+endif (LAPACK_FOUND)

 # handle the QUIETLY and REQUIRED arguments and set CASACORE_FOUND to TRUE if.
 # all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(CASACORE DEFAULT_MSG CASACORE_LIBRARIES CASACORE_INCLUDE_DIR)

-IF(CASACORE_FOUND)
-ELSE(CASACORE_FOUND)
-    SET( CASACORE_LIBRARIES )
-ENDIF(CASACORE_FOUND)
+if (CASACORE_FOUND)
+    #
+else ()
+    set(CASACORE_LIBRARIES)
+endif ()


IVGCVSW-5679 Failure to run the build instructions to build ArmNN using android ndk

   * Provide FLATBUFFERS_INCLUDE_PATH in GlobalConfig.cmake if ARMCOMPUTECL is enabled

Signed-off-by: Nikhil Raj <70dde441576cd8b053dd4c3a595f3f0b9c7a63a3@arm.com>
Change-Id: Iabd5bb9b8a63970df9b7f485d07f8c1ee1a78560

--- cmake/GlobalConfig.cmake
+++ cmake/GlobalConfig.cmake
@@ -321,6 +321,18 @@

 # ARM Compute OpenCL backend
 if(ARMCOMPUTECL)
+    # verify we have a valid flatbuffers include path
+    find_path(FLATBUFFERS_INCLUDE_PATH flatbuffers/flatbuffers.h
+              HINTS ${FLATBUFFERS_ROOT}/include /usr/local/include /usr/include)
+
+    message(STATUS "Flatbuffers headers are located at: ${FLATBUFFERS_INCLUDE_PATH}")
+
+    find_library(FLATBUFFERS_LIBRARY
+                 NAMES libflatbuffers.a flatbuffers
+                 HINTS ${FLATBUFFERS_ROOT}/lib /usr/local/lib /usr/lib)
+
+    message(STATUS "Flatbuffers library located at: ${FLATBUFFERS_LIBRARY}")
+
     # Always use Arm compute library OpenCL headers
     find_path(OPENCL_INCLUDE CL/cl2.hpp
               PATHS ${ARMCOMPUTE_ROOT}/include


By experiment we have recently found our pthread code causes segfaults in
the Tk components of PLplot on Linux (which is the platform for which our
original pthread support was implemented).  Until this issue is addressed we
consider our pthread code to be experimental which is why we are turning it
off (HAVE_PTHREAD set to OFF by default) now for all platforms.

svn path=/trunk/; revision=9851

--- cmake/modules/xwin.cmake
+++ cmake/modules/xwin.cmake
@@ -40,7 +40,10 @@
       # get a clear report that official X works for 10.5.
       option(HAVE_PTHREAD "Use pthreads with the xwin driver" OFF)
     else(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
-      option(HAVE_PTHREAD "Use pthreads with the xwin driver" ON)
+      # Turn HAVE_PTHREAD OFF by default everywhere else as well since it
+      # has been discovered it interacts so poorly with the Tk components
+      # of PLplot on Linux that it causes segfaults for those components.
+      option(HAVE_PTHREAD "Use pthreads with the xwin driver" OFF)
     endif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
     if(HAVE_PTHREAD)
       find_package(Threads)


need RLINK path set to true

need RLINK path set to true

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@215 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_find_ros.cmake
+++ cmake/pcl_find_ros.cmake
@@ -48,7 +48,7 @@
         SET(CMAKE_INSTALL_RPATH "${CMAKE_SOURCE_DIR}/../../lib64")
         # don't add the automatically determined parts of the RPATH
         # which point to directories outside the build tree to the install RPATH
-        SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
+        SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

     endif(USE_ROS)
 endif(ROS_ROOT)


slightly alter path to test executable in macro

--- cmake/pdal_targets.cmake
+++ cmake/pdal_targets.cmake
@@ -126,7 +126,7 @@
     endif()
     target_link_libraries(${_name} ${PDAL_LINKAGE} ${PDAL_LIB_NAME})
     target_link_libraries(${_name} ${PDAL_LINKAGE} ${_deps})
-    add_test(NAME ${_name} COMMAND "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_name}" "${PROJECT_SOURCE_DIR}/test/data" --catch_system_errors=no WORKING_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/..")
+    add_test(NAME ${_name} COMMAND "${PROJECT_BINARY_DIR}/bin/${_name}" "${PROJECT_SOURCE_DIR}/test/data" --catch_system_errors=no WORKING_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/..")
 endmacro(PDAL_ADD_TEST)

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


Rearranging the hints makes the environment variable trump all other installations.

--- cycamore/CMake/Findcycluscore.cmake
+++ cycamore/CMake/Findcycluscore.cmake
@@ -2,35 +2,35 @@
 #  CYCLUS_CORE_INCLUDE_DIR - the Cyclus include directory
 #  CYCLUS_CORE_LIBRARIES - The libraries needed to use the Cyclus Core Library

+IF(NOT DEFINED ${CYCLUS_ROOT_DIR})
+  SET(CYCLUS_ROOT_DIR "$ENV{CYCLUS_ROOT_DIR}")
+ENDIF(NOT DEFINED ${CYCLUS_ROOT_DIR})
+
 # Look for the header files
 FIND_PATH(CYCLUS_CORE_INCLUDE_DIR suffix.h
-  HINTS /usr/local/cyclus /opt/local/cyclus "$ENV{CYCLUS_ROOT_DIR}/cyclus"
-  "$ENV{CYCLUS_ROOT_DIR}"
+  HINTS ${CYCLUS_ROOT_DIR} "${CYCLUS_ROOT_DIR}/cyclus"
+  /usr/local/cyclus /opt/local/cyclus
   PATH_SUFFIXES cyclus/include)
-#MESSAGE("core include: ${CYCLUS_CORE_INCLUDE_DIR}")

 # Look for the header files
 FIND_PATH(CYCLUS_CORE_SHARE_DIR cyclus.rng.in
-  HINTS /usr/local/cyclus /opt/local/cyclus "$ENV{CYCLUS_ROOT_DIR}/cyclus"
-  "$ENV{CYCLUS_ROOT_DIR}"
+  HINTS ${CYCLUS_ROOT_DIR} "${CYCLUS_ROOT_DIR}/cyclus"
+  /usr/local/cyclus /opt/local/cyclus
   PATH_SUFFIXES cyclus/share)
-#MESSAGE("core share: ${CYCLUS_CORE_SHARE_DIR}")

 # Look for the library
 FIND_LIBRARY(CYCLUS_CORE_LIBRARY NAMES cycluscore
-  HINTS /usr/local/cyclus/lib /usr/local/cyclus
-  "$ENV{CYCLUS_ROOT_DIR}"
-  /opt/local /opt/local/cyclus "$ENV{CYCLUS_ROOT_DIR}/cyclus"
+  HINTS ${CYCLUS_ROOT_DIR} "${CYCLUS_ROOT_DIR}/cyclus"
+  /usr/local/cyclus/lib /usr/local/cyclus
+  /opt/local /opt/local/cyclus
   PATH_SUFFIXES cyclus/lib)
-#MESSAGE("core lib: ${CYCLUS_CORE_LIBRARY}")

 # Look for the library
 FIND_LIBRARY(CYCLUS_GTEST_LIBRARY NAMES gtest
-  HINTS /usr/local/cyclus/lib /usr/local/cyclus
-  /opt/local/lib /opt/local/cyclus/lib "$ENV{CYCLUS_ROOT_DIR}/cyclus/lib"
-  "$ENV{CYCLUS_ROOT_DIR}/lib"
-  )
-#MESSAGE("core gtest: ${CYCLUS_GTEST_LIBRARY}")
+  HINTS ${CYCLUS_ROOT_DIR} "${CYCLUS_ROOT_DIR}/cyclus"
+  /usr/local/cyclus/lib /usr/local/cyclus
+  /opt/local/lib /opt/local/cyclus/lib
+  PATH_SUFFIXES cyclus/lib)

 # Copy the results to the output variables.
 IF (CYCLUS_CORE_INCLUDE_DIR AND CYCLUS_CORE_LIBRARY AND CYCLUS_GTEST_LIBRARY AND CYCLUS_CORE_SHARE_DIR)