Building each specified Boost library

Building each specified Boost library

--- blocks/boost/install/install.cmake
+++ blocks/boost/install/install.cmake
@@ -1,191 +1,234 @@
-include(boost/install/utils)
-
-
-function(BII_BOOST_PRINT_SETUP)
-    message(STATUS "Boost version: ${BII_BOOST_VERSION}")
-    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()
-
-    #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
-                                                     --without-python
-                                   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)
-        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()
-    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})
-        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((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()


Remove unused file.

Remove unused file.

--- dep/uv.cmake
+++ dep/uv.cmake
@@ -1,65 +0,0 @@
-#/// @file   uv.cmake
-#/// @brief  libtbag-uv library build project.
-#/// @author zer0
-#/// @date   2016-07-04
-#///
-#/// @remarks
-#///  The following are set after configuration is done:
-#///   - ${TBAG_DEP_UV_NAME}
-#///   - ${TBAG_DEP_UV_LOG_PREFIX}
-#///   - ${TBAG_DEP_UV_INCLUDE_DIRS}
-#///   - ${TBAG_DEP_UV_LIBRARIES}
-#///   - ${TBAG_DEP_UV_ARCHIVES}
-#///   - ${TBAG_DEP_UV_DEPENDENCIES}
-#///   - ${TBAG_DEP_UV_LIBRARIES}: Archives + Dependencies
-
-if (DEFINED TBAG_DEP_UV_NAME)
-    return ()
-endif ()
-
-set (TBAG_DEP_UV_NAME         "libtbag-uv")
-set (TBAG_DEP_UV_LOG_PREFIX   "${PROJECT_BINARY_DIR}/CMakeFiles/${TBAG_DEP_UV_NAME}.dir/build.log")
-set (TBAG_DEP_UV_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/dep/uv/include")
-set (TBAG_DEP_UV_ARCHIVES_PRE "${PROJECT_SOURCE_DIR}/dep/uv/.libs/libuv.a")
-set (TBAG_DEP_UV_ARCHIVES     "${PROJECT_SOURCE_DIR}/dep/uv/libuv.a")
-
-set (TBAG_DEP_UV_DEPENDENCIES "")
-if (UNIX)
-    list (APPEND TBAG_DEP_UV_DEPENDENCIES -lpthread)
-    if (NOT APPLE)
-        list (APPEND TBAG_DEP_UV_DEPENDENCIES -ldl)
-    else ()
-        list (APPEND TBAG_DEP_UV_DEPENDENCIES -lrt -lnsl -ldl)
-    endif ()
-endif ()
-
-set (TBAG_DEP_UV_LIBRARIES ${TBAG_DEP_UV_ARCHIVES}
-                           ${TBAG_DEP_UV_DEPENDENCIES})
-
-## libuv custom target.
-add_custom_target (${TBAG_DEP_UV_NAME} ALL DEPENDS ${TBAG_DEP_UV_ARCHIVES})
-
-add_custom_command (
-        OUTPUT "${PROJECT_SOURCE_DIR}/dep/uv/configure"
-        COMMAND ./autogen.sh > "${TBAG_DEP_UV_LOG_PREFIX}.1" 2>&1
-        DEPENDS "${PROJECT_SOURCE_DIR}/dep/uv/autogen.sh"
-        WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/dep/uv/")
-
-add_custom_command (
-        OUTPUT "${PROJECT_SOURCE_DIR}/dep/uv/Makefile"
-        COMMAND ./configure CFLAGS=-fPIC --disable-shared --enable-static > "${TBAG_DEP_UV_LOG_PREFIX}.2" 2>&1
-        DEPENDS "${PROJECT_SOURCE_DIR}/dep/uv/configure"
-        WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/dep/uv/")
-
-add_custom_command (
-        OUTPUT ${TBAG_DEP_UV_ARCHIVES_PRE}
-        COMMAND make V=1 > "${TBAG_DEP_UV_LOG_PREFIX}.3" 2>&1
-        DEPENDS "${PROJECT_SOURCE_DIR}/dep/uv/Makefile"
-        WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/dep/uv/")
-
-add_custom_command (
-        OUTPUT ${TBAG_DEP_UV_ARCHIVES}
-        COMMAND ${CMAKE_COMMAND} -E copy ${TBAG_DEP_UV_ARCHIVES_PRE} ${TBAG_DEP_UV_ARCHIVES}
-        DEPENDS "${TBAG_DEP_UV_ARCHIVES_PRE}"
-        WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/dep/uv/")
-


disable clang leak sanitizer for now

disable clang leak sanitizer for now

It's very very slow (two orders of magnitude slower than valgrind).

--- toolchains/clang.cmake
+++ toolchains/clang.cmake
@@ -22,10 +22,10 @@

 # Leak sanitizer is available only on Clang on Linux x64.
 # http://clang.llvm.org/docs/LeakSanitizer.html
-if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND TNUN_ABI STREQUAL "x64" )
-    list( APPEND TNUN_compiler_runtime_sanity_checks -fsanitize=leak )
-    list( APPEND TNUN_linker_runtime_sanity_checks -fsanitize=leak)
-endif()
+#if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND TNUN_ABI STREQUAL "x64" )
+#    list( APPEND TNUN_compiler_runtime_sanity_checks -fsanitize=leak )
+#    list( APPEND TNUN_linker_runtime_sanity_checks -fsanitize=leak)
+#endif()

 # Implementation note:
 # When clang is used behind ccache, it throws a lot of "unused-argument" warnings.


fixup rewrite stage

fixup rewrite stage

--- cmake/qibuild/internal/stage.cmake
+++ cmake/qibuild/internal/stage.cmake
@@ -114,7 +114,7 @@
 # the absolute paths in CMAKE_BINARY_DIR/sdk/cmake/target-config.cmake
 function(_qi_gen_inc_dir_code_sdk res target)
   string(TOUPPER ${target} _U_target)
-  if(NOT ${target}_INCLUDE_DIRS)
+  if(NOT ${_U_target}_INCLUDE_DIRS)
     get_directory_property(_inc_dirs INCLUDE_DIRECTORIES)
     set(${_U_target}_INCLUDE_DIRS ${_inc_dirs})
   endif()


fixed: wrong test for python libs

fixed: wrong test for python libs

--- CMake/BuildFunctions.cmake
+++ CMake/BuildFunctions.cmake
@@ -1589,9 +1589,9 @@

 FUNCTION(OSG_SETUP_PYTHON_BUILD)

-  IF(${PROJECT_NAME}_NO_PYTHON OR NOT PYTHON_FOUND)
+  IF(${PROJECT_NAME}_NO_PYTHON OR NOT PYTHONLIBS_FOUND)
       RETURN()
-  ENDIF(${PROJECT_NAME}_NO_PYTHON OR NOT PYTHON_FOUND)
+  ENDIF(${PROJECT_NAME}_NO_PYTHON OR NOT PYTHONLIBS_FOUND)

   MESSAGE("  setup python for ${PROJECT_NAME}")


cmake: Set WITH_ZLIB_DEFAULT to ON for Unix only (#52, #55)

--- CMake/Config/Depends.cmake
+++ CMake/Config/Depends.cmake
@@ -54,7 +54,9 @@

 # By default, require these optional dependencies such that the library
 # features which depend on these external libraries are available
-set(WITH_ZLIB_DEFAULT ON)
+if (UNIX)
+  set(WITH_ZLIB_DEFAULT ON)
+endif ()

 # By default, use included Eigen header files
 if (Eigen3_INCLUDE_DIR)


Always define FOLLY_LIBRARY_SANITIZE_ADDRESS to either 0 or 1

Summary: [Folly] Always define `FOLLY_LIBRARY_SANITIZE_ADDRESS` to either 0 or 1.

Reviewed By: simpkins

Differential Revision: D10414836

fbshipit-source-id: d60ef8380c50971858ed282374f1b5973a27cdf4

--- CMake/folly-config.h.cmake
+++ CMake/folly-config.h.cmake
@@ -75,7 +75,7 @@
 #cmakedefine FOLLY_HAVE_LIBZSTD 1
 #cmakedefine FOLLY_HAVE_LIBBZ2 1

-#cmakedefine FOLLY_LIBRARY_SANITIZE_ADDRESS 1
+#cmakedefine01 FOLLY_LIBRARY_SANITIZE_ADDRESS

 #cmakedefine FOLLY_SUPPORT_SHARED_LIBRARY 1
 #cmakedefine FOLLY_HAVE_SENDMMSG 1


correctly set DCMTK_DIR (missing $)

correctly set DCMTK_DIR (missing $)

--- CMakeExternals/DCMTK.cmake
+++ CMakeExternals/DCMTK.cmake
@@ -35,7 +35,7 @@
          -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/${proj}-install
       DEPENDS ${proj_DEPENDENCIES}
       )
-    SET(DCMTK_DIR {CMAKE_CURRENT_BINARY_DIR}/${proj}-install)
+    SET(DCMTK_DIR ${CMAKE_CURRENT_BINARY_DIR}/${proj}-install)

   ELSE()


Unix line ends

Unix line ends

--- cmake/modules/hunter_setup_msvc_vcvarsall.cmake
+++ cmake/modules/hunter_setup_msvc_vcvarsall.cmake
@@ -1,27 +1,27 @@
-# Copyright (c) 2014, Ruslan Baratov
-# All rights reserved.
-
-macro(hunter_setup_msvc_vcvarsall)
-  if(MSVC AND NOT HUNTER_MSVC_VCVARSALL)
-    set(_hunter_result "${CMAKE_GENERATOR}")
-
-    string(REPLACE " Win64" "" _hunter_result "${_hunter_result}")
-    string(REPLACE " ARM" "" _hunter_result "${_hunter_result}")
-    string(REPLACE "Visual Studio " "" _hunter_result "${_hunter_result}")
-    set(_hunter_result "${_hunter_result}0")
-    set(_hunter_result "VS${_hunter_result}COMNTOOLS")
-
-    set(_hunter_result "$ENV{${_hunter_result}}/../../VC")
-    get_filename_component(_hunter_result "${_hunter_result}" ABSOLUTE)
-    find_file(
-        HUNTER_MSVC_VCVARSALL
-        "vcvarsall.bat"
-        PATHS
-        "${_hunter_result}"
-        NO_DEFAULT_PATH
-    )
-    if(NOT HUNTER_MSVC_VCVARSALL)
-      hunter_fatal_error("vcvarsall.bat not found in `${_hunter_result}`")
-    endif()
-  endif()
-endmacro()
+# Copyright (c) 2014, Ruslan Baratov
+# All rights reserved.
+
+macro(hunter_setup_msvc_vcvarsall)
+  if(MSVC AND NOT HUNTER_MSVC_VCVARSALL)
+    set(_hunter_result "${CMAKE_GENERATOR}")
+
+    string(REPLACE " Win64" "" _hunter_result "${_hunter_result}")
+    string(REPLACE " ARM" "" _hunter_result "${_hunter_result}")
+    string(REPLACE "Visual Studio " "" _hunter_result "${_hunter_result}")
+    set(_hunter_result "${_hunter_result}0")
+    set(_hunter_result "VS${_hunter_result}COMNTOOLS")
+
+    set(_hunter_result "$ENV{${_hunter_result}}/../../VC")
+    get_filename_component(_hunter_result "${_hunter_result}" ABSOLUTE)
+    find_file(
+        HUNTER_MSVC_VCVARSALL
+        "vcvarsall.bat"
+        PATHS
+        "${_hunter_result}"
+        NO_DEFAULT_PATH
+    )
+    if(NOT HUNTER_MSVC_VCVARSALL)
+      hunter_fatal_error("vcvarsall.bat not found in `${_hunter_result}`")
+    endif()
+  endif()
+endmacro()


ADD: added mitkPointSetSliceMapper2D

ADD: added mitkPointSetSliceMapper2D

--- Core/Rendering/files.cmake
+++ Core/Rendering/files.cmake
@@ -24,6 +24,7 @@
   mitkOpenGLRenderer.cpp
   mitkPointDataVtkMapper3D.cpp
   mitkPointSetMapper2D.cpp
+  mitkPointSetSliceMapper2D.cpp
   mitkPointSetVtkMapper3D.cpp
   mitkPolyDataGLMapper2D.cpp
   mitkRenderWindow.cpp


Augment documentation.

Augment documentation.

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

--- deal.II/cmake/macros/macro_add_test.cmake
+++ deal.II/cmake/macros/macro_add_test.cmake
@@ -258,11 +258,16 @@
         TIMEOUT ${TEST_TIME_LIMIT}
         )

-      IF(_n_cpu GREATER 4)
+      #
+      # Limit concurrency of mpi tests. We can only set concurrency
+      # for the entire test, which includes the compiling and linking
+      # stages that are purely sequential. There is no good way to model
+      # this without unnecessarily restricting concurrency. Consequently,
+      # we just choose to model an "average" concurrency as one half of
+      # the number of MPI jobs.
+      #
+      IF(_n_cpu GREATER 2)
         MATH(EXPR _slots "${_n_cpu} / 2")
-        #
-        # Limit concurrency of mpi tests:
-        #
         SET_TESTS_PROPERTIES(${_test_full} PROPERTIES PROCESSORS ${_slots})
       ENDIF()


PROTON-943: bump libqpid-proton shared library major version for 0.10 release

--- proton-c/soversion.cmake
+++ proton-c/soversion.cmake
@@ -1,2 +1,2 @@
-set (PN_LIB_SOMAJOR 2)
+set (PN_LIB_SOMAJOR 3)
 set (PN_LIB_SOMINOR "0.0")


MyPackageLibrary.cmake: add all destinations in any case

--- cmake/MyPackageLibrary.cmake
+++ cmake/MyPackageLibrary.cmake
@@ -75,8 +75,8 @@
       TARGET_INCLUDE_DIRECTORIES(${_target} PUBLIC ${_include_directory})
     ENDFOREACH ()
   ENDFOREACH ()
-  INSTALL (TARGETS ${PROJECT_NAME}        LIBRARY DESTINATION lib COMPONENT DynamicLibraryComponent)
-  INSTALL (TARGETS ${PROJECT_NAME}_static ARCHIVE DESTINATION lib COMPONENT StaticLibraryComponent)
+  INSTALL (TARGETS ${PROJECT_NAME}        ARCHIVE DESTINATION lib LIBRARY DESTINATION lib COMPONENT DynamicLibraryComponent)
+  INSTALL (TARGETS ${PROJECT_NAME}_static ARCHIVE DESTINATION lib LIBRARY DESTINATION lib COMPONENT StaticLibraryComponent)
   #
   # Call for the configuration
   #


Fix spacing in if's

Fix spacing in if's

Little fix for the indentation of the if's.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -76,33 +76,33 @@
 endfunction()

 function(_add_host_variant_swift_sanitizer_flags target)
-  if (LLVM_USE_SANITIZER)
-    if (LLVM_USE_SANITIZER STREQUAL "Address")
+  if(LLVM_USE_SANITIZER)
+    if(LLVM_USE_SANITIZER STREQUAL "Address")
       set(_Swift_SANITIZER_FLAGS "-sanitize=address")
-    elseif (LLVM_USE_SANITIZER STREQUAL "HWAddress")
+    elseif(LLVM_USE_SANITIZER STREQUAL "HWAddress")
       # Not supported?
-    elseif (LLVM_USE_SANITIZER MATCHES "Memory(WithOrigins)?")
+    elseif(LLVM_USE_SANITIZER MATCHES "Memory(WithOrigins)?")
       # Not supported
       if(LLVM_USE_SANITIZER STREQUAL "MemoryWithOrigins")
         # Not supported
       endif()
-    elseif (LLVM_USE_SANITIZER STREQUAL "Undefined")
+    elseif(LLVM_USE_SANITIZER STREQUAL "Undefined")
       set(_Swift_SANITIZER_FLAGS "-sanitize=undefined")
-    elseif (LLVM_USE_SANITIZER STREQUAL "Thread")
+    elseif(LLVM_USE_SANITIZER STREQUAL "Thread")
       set(_Swift_SANITIZER_FLAGS "-sanitize=thread")
-    elseif (LLVM_USE_SANITIZER STREQUAL "DataFlow")
+    elseif(LLVM_USE_SANITIZER STREQUAL "DataFlow")
       # Not supported
-    elseif (LLVM_USE_SANITIZER STREQUAL "Address;Undefined" OR
-            LLVM_USE_SANITIZER STREQUAL "Undefined;Address")
+    elseif(LLVM_USE_SANITIZER STREQUAL "Address;Undefined" OR
+           LLVM_USE_SANITIZER STREQUAL "Undefined;Address")
       set(_Swift_SANITIZER_FLAGS "-sanitize=address -sanitize=undefined")
-    elseif (LLVM_USE_SANITIZER STREQUAL "Leaks")
+    elseif(LLVM_USE_SANITIZER STREQUAL "Leaks")
       # Not supported
     else()
       message(SEND_ERROR "unsupported value for LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}")
     endif()

     target_compile_options(${name} PRIVATE $<$<COMPILE_LANGUAGE:Swift>:${_Swift_SANITIZER_FLAGS}>)
-  endif ()
+  endif()
 endfunction()

 # Usage:


[CMake] Fix codesign dependency (take 2)

This approach side steps the whole dependency issue between the lipo target and the codesign target by just combining them (if needed). This is accomplished by moving the codesign code into `_add_swift_lipo_target` and having it conditional on passing `CODESIGN` as an option.

This patch also updates `_add_swift_lipo_target` to use named arguments instead of positional ones, and provides a little bit of cleanup. There is more opportunity for larger refactoring and cleanup here by not generating a lipo target at all on non-darwin platforms.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -388,12 +388,20 @@
 #     source_targets...   # The source targets whose outputs will be
 #                         # lipo'd into the output.
 #   )
-function(_add_swift_lipo_target sdk target output)
-  precondition(sdk MESSAGE "sdk is required")
-  precondition(target MESSAGE "target is required")
-  precondition(output MESSAGE "output is required")
-
-  set(source_targets ${ARGN})
+function(_add_swift_lipo_target)
+  cmake_parse_arguments(
+    LIPO                # prefix
+    "CODESIGN"          # options
+    "SDK;TARGET;OUTPUT" # single-value args
+    ""                  # multi-value args
+    ${ARGN})
+
+  precondition(LIPO_SDK MESSAGE "sdk is required")
+  precondition(LIPO_TARGET MESSAGE "target is required")
+  precondition(LIPO_OUTPUT MESSAGE "output is required")
+  precondition(LIPO_UNPARSED_ARGUMENTS MESSAGE "one or more inputs are required")
+
+  set(source_targets ${LIPO_UNPARSED_ARGUMENTS})

   # Gather the source binaries.
   set(source_binaries)
@@ -408,20 +416,24 @@
     endif()
   endforeach()

-  is_darwin_based_sdk("${sdk}" IS_DARWIN)
+  is_darwin_based_sdk("${LIPO_SDK}" IS_DARWIN)
   if(IS_DARWIN)
+    if(LIPO_CODESIGN)
+      set(codesign_command COMMAND "codesign" "-f" "-s" "-" "${LIPO_OUTPUT}")
+    endif()
     # Use lipo to create the final binary.
     add_custom_command_target(unused_var
-        COMMAND "${LIPO}" "-create" "-output" "${output}" ${source_binaries}
-        CUSTOM_TARGET_NAME "${target}"
-        OUTPUT "${output}"
+        COMMAND "${LIPO}" "-create" "-output" "${LIPO_OUTPUT}" ${source_binaries}
+        ${codesign_command}
+        CUSTOM_TARGET_NAME "${LIPO_TARGET}"
+        OUTPUT "${LIPO_OUTPUT}"
         DEPENDS ${source_targets})
   else()
     # We don't know how to create fat binaries for other platforms.
     add_custom_command_target(unused_var
-        COMMAND "${CMAKE_COMMAND}" "-E" "copy" "${source_binaries}" "${output}"
-        CUSTOM_TARGET_NAME "${target}"
-        OUTPUT "${output}"
+        COMMAND "${CMAKE_COMMAND}" "-E" "copy" "${source_binaries}" "${LIPO_OUTPUT}"
+        CUSTOM_TARGET_NAME "${LIPO_TARGET}"
+        OUTPUT "${LIPO_OUTPUT}"
         DEPENDS ${source_targets})
   endif()
 endfunction()
@@ -1473,18 +1485,15 @@
         endif()

         set(lipo_target "${name}-${SWIFT_SDK_${sdk}_LIB_SUBDIR}")
+        if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND SWIFTLIB_SHARED)
+          set(codesign_arg CODESIGN)
+        endif()
         _add_swift_lipo_target(
-            ${sdk}
-            ${lipo_target}
-            ${UNIVERSAL_LIBRARY_NAME}
+            SDK ${sdk}
+            TARGET ${lipo_target}
+            OUTPUT ${UNIVERSAL_LIBRARY_NAME}
+            ${codesign_arg}
             ${THIN_INPUT_TARGETS})
-
-        if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND SWIFTLIB_SHARED)
-          # Ad-hoc sign stdlib dylibs
-          add_custom_command(TARGET "${name}-${SWIFT_SDK_${sdk}_LIB_SUBDIR}"
-                             POST_BUILD
-                             COMMAND "codesign" "-f" "-s" "-" "${UNIVERSAL_LIBRARY_NAME}")
-        endif()

         # Cache universal libraries for dependency purposes
         set(UNIVERSAL_LIBRARY_NAMES_${SWIFT_SDK_${sdk}_LIB_SUBDIR}
@@ -1534,9 +1543,9 @@
           set(UNIVERSAL_LIBRARY_NAME
               "${SWIFTSTATICLIB_DIR}/${SWIFT_SDK_${sdk}_LIB_SUBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${name}${CMAKE_STATIC_LIBRARY_SUFFIX}")
           _add_swift_lipo_target(
-              ${sdk}
-              ${lipo_target_static}
-              "${UNIVERSAL_LIBRARY_NAME}"
+              SDK ${sdk}
+              TARGET ${lipo_target_static}
+              OUTPUT "${UNIVERSAL_LIBRARY_NAME}"
               ${THIN_INPUT_TARGETS_STATIC})
           swift_install_in_component("${SWIFTLIB_INSTALL_IN_COMPONENT}"
               FILES "${UNIVERSAL_LIBRARY_NAME}"


build: overwrite the fat libraries with the targets

Ensure that the use the target specific names for the fat libraries for
non-MachO targets which do not support fat libraries.  This fixes the
windows build.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -2160,6 +2160,7 @@
         "${SWIFTEXE_SINGLE_LINK_FAT_LIBRARIES}"
         "-${SWIFT_SDK_${SWIFTEXE_SINGLE_SDK}_LIB_SUBDIR}-${SWIFTEXE_SINGLE_ARCHITECTURE}"
         SWIFTEXE_SINGLE_LINK_FAT_LIBRARIES_TARGETS)
+    set(SWIFTEXE_SINGLE_LINK_FAT_LIBRARIES ${SWIFTEXE_SINGLE_LINK_FAT_LIBRARIES_TARGETS})
   endif()

   handle_swift_sources(


Issue #9: Enable static SuperBuild.

Issue #9: Enable static SuperBuild.

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -64,7 +64,7 @@
   -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
   -DCMAKE_INCLUDE_PATH:PATH=${CMAKE_INCLUDE_PATH}
   -DCMAKE_LIBRARY_PATH:PATH=${CMAKE_LIBRARY_PATH}
-  -DBUILD_SHARED_LIBS:BOOL=ON
+  -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
   -DBUILD_TESTING:BOOL=OFF
   -DBUILD_EXAMPLES:BOOL=OFF
   -DDESIRED_QT_VERSION:STRING=${DESIRED_QT_VERSION}


BUG: Bump SEM for ParameterSerializer bug.

Was not writing valid JSON files.

Change-Id: I5e29882e37bc7b1f37ae3fec7dd128ebf842b022

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -322,7 +322,7 @@
     # Has enhancements required for the SEM ParameterSerializer.
     # Change back to upstream after pull request merged.
     GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/TubeTK/SlicerExecutionModel.git"
-    GIT_TAG "8ebf568a7b90a1d0e5ec7cf4cf2e8e490a24d0ab"
+    GIT_TAG "149520e5d0eb23abf01e5f497f0b9bdb3e356da1"
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${proj}-Build
     CMAKE_GENERATOR ${gen}


Use function instead of macro.

Use function instead of macro.

	* build-aux/cmake/modules/Flex.cmake: Do that.

Signed-off-by: Nicolas Despres <abdeb541ca46f1651c9cc594d44e707056e73d5d@gostai.com>

--- build-aux/cmake/modules/Flex.cmake
+++ build-aux/cmake/modules/Flex.cmake
@@ -17,17 +17,17 @@

 # Find flex on the system.
 # Set FLEX_EXECUTABLE to the executable name.
-macro(FIND_FLEX)
+function(FIND_FLEX)
   if(NOT FLEX_EXECUTABLE)
     find_program(FLEX_EXECUTABLE flex)
     if (NOT FLEX_EXECUTABLE)
       message(FATAL_ERROR "flex not found - aborting")
     endif (NOT FLEX_EXECUTABLE)
   endif(NOT FLEX_EXECUTABLE)
-endmacro(FIND_FLEX)
+endfunction(FIND_FLEX)

 # Add flex files to the source list.
-macro(ADD_FLEX_FILES _sources)
+function(ADD_FLEX_FILES _sources)
   find_flex()
   foreach(_current_FILE ${ARGN})
     get_filename_component(_in ${_current_FILE} ABSOLUTE)
@@ -44,6 +44,6 @@
       DEPENDS ${_in}
       )
     # Add the generated source file to the source list.
-    set(${_sources} ${${_sources}} ${_out})
+    set(${_sources} ${${_sources}} ${_out} PARENT_SCOPE)
   endforeach(_current_FILE)
-endmacro(ADD_FLEX_FILES)
+endfunction(ADD_FLEX_FILES)


Force setting further copts variables via CMake

The `CMakeCache.txt` files revealed that some variables were not propagated correctly to the subprojects. Hopefully decreases build time of the CMake build. Disabling `BENCHMARK_ENABLE_INSTALL` in addition.

Closes https://github.com/google/iree/pull/424

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/iree/pull/424 from marbre:cmake-copts ef6de266da016bb925548231450c9edf1f555456
PiperOrigin-RevId: 288726520

--- build_tools/cmake/iree_copts.cmake
+++ build_tools/cmake/iree_copts.cmake
@@ -78,16 +78,17 @@
 #-------------------------------------------------------------------------------

 set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
+set(BENCHMARK_ENABLE_INSTALL OFF CACHE BOOL "" FORCE)

 #-------------------------------------------------------------------------------
 # Third party: flatbuffers
 #-------------------------------------------------------------------------------

 set(FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "" FORCE)
-set(FLATBUFFERS_INSTALL OFF)
-set(FLATBUFFERS_BUILD_FLATC ON)
-set(FLATBUFFERS_BUILD_FLATHASH OFF)
-set(FLATBUFFERS_BUILD_GRPCTEST OFF)
+set(FLATBUFFERS_INSTALL OFF CACHE BOOL "" FORCE)
+set(FLATBUFFERS_BUILD_FLATC ON CACHE BOOL "" FORCE)
+set(FLATBUFFERS_BUILD_FLATHASH OFF CACHE BOOL "" FORCE)
+set(FLATBUFFERS_BUILD_GRPCTEST OFF CACHE BOOL "" FORCE)
 set(FLATBUFFERS_INCLUDE_DIRS
   "${CMAKE_CURRENT_SOURCE_DIR}/third_party/flatbuffers/include/"
 )
@@ -109,7 +110,7 @@
 # Third party: gtest
 #-------------------------------------------------------------------------------

-set(INSTALL_GTEST OFF)
+set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
 set(GTEST_INCLUDE_DIRS
   "${CMAKE_CURRENT_SOURCE_DIR}/third_party/googletest/include/"
   "${CMAKE_CURRENT_SOURCE_DIR}/third_party/googlemock/include/"


ctest: fix find_program usage

ctest: fix find_program usage

if the variable passed to find_program is set to an empty string, then
find_program will do nothing. It has to be unset or VAR-NOTFOUND for
find_program to work. Modified the code accordingly.

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

--- test.cmake
+++ test.cmake
@@ -175,9 +175,13 @@
       extract_msvc_compiler_info(${CL})
    endif()
 else()
-   set(CXX "$ENV{CXX}")
+   if("$ENV{CXX}")
+      set(CXX "$ENV{CXX}")
+   else()
+      find_program(CXX NAMES g++ clang++ icpc c++)
+   endif()
    if(NOT CXX)
-      find_program(CXX "g++" "clang++" "icpc" "c++")
+      message(FATAL_ERROR "No C++ compiler found")
    endif()
    extract_gnuc_compiler_info("${CXX}")
 endif()


ctest_configure requires semicolons to separate options

--- test.cmake
+++ test.cmake
@@ -36,7 +36,7 @@
    endif()
    if(NOT $ENV{ctest_model} STREQUAL "Continuous" OR res GREATER 0)
       CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}"
-         OPTIONS "-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS} -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=TRUE"
+         OPTIONS "-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS};-DCMAKE_BUILD_TYPE=Release;-DBUILD_EXAMPLES=TRUE"
          APPEND
          RETURN_VALUE res)
       ctest_submit(PARTS Notes Configure)


Clean up warning suppression a bit (#2146)

--- src/cmake/compiler.cmake
+++ src/cmake/compiler.cmake
@@ -145,18 +145,11 @@

 # gcc specific options
 if (CMAKE_COMPILER_IS_GNUCC AND NOT (CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_APPLECLANG))
-    if (NOT ${GCC_VERSION} VERSION_LESS 4.8)
-        # suppress a warning that Boost::Python hits in g++ 4.8
-        add_definitions ("-Wno-error=unused-local-typedefs")
-        add_definitions ("-Wno-unused-local-typedefs")
-    endif ()
+    add_definitions ("-Wno-unused-local-typedefs")
     add_definitions ("-Wno-unused-result")
-    if (NOT ${GCC_VERSION} VERSION_LESS 6.0)
-        add_definitions ("-Wno-error=misleading-indentation")
-    endif ()
     if (NOT ${GCC_VERSION} VERSION_LESS 7.0)
         add_definitions ("-Wno-aligned-new")
-        add_definitions ("-Wno-error=noexcept-type")
+        add_definitions ("-Wno-noexcept-type")
     endif ()
 endif ()


cmake: improve documentation for CAPNP_GENERATE_CPP

--- c++/cmake/CapnProtoMacros.cmake
+++ c++/cmake/CapnProtoMacros.cmake
@@ -3,6 +3,7 @@
 # Example usage:
 #   find_package(CapnProto)
 #   capnp_generate_cpp(CAPNP_SRCS CAPNP_HDRS schema.capnp)
+#   include_directories(${CMAKE_CURRENT_BINARY_DIR})
 #   add_executable(foo main.cpp ${CAPNP_SRCS})
 #   target_link_libraries(foo CapnProto::capnp)
 #


Revert test code for timing.

Revert test code for timing.

--- build_settings.cmake
+++ build_settings.cmake
@@ -53,14 +53,11 @@
 endif()

 # Find ccache and use it if it is found
-find_program(CCACHE_EXECUTABLE time)
+find_program(CCACHE_EXECUTABLE ccache)
 if(CCACHE_EXECUTABLE)
     set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_EXECUTABLE})
     set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE_EXECUTABLE})
 endif()
-
-set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE /usr/bin/time)
-set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK /usr/bin/time)

 # Check for valgrind and set flags
 find_program(VALGRIND_EXECUTABLE valgrind)


COMP: Set CTEST_GIT_UPDATE_CUSTOM, hopefully fixing "Cannot find UpdateCommand or GITCommand configuration key" at https://stingray.researchlumc.nl/job/SuperElastix/job/SuperElastix/job/SELX-163-GitHub-CDash-Jenkins-integration/7/consoleText

--- SuperBuild/CTest.cmake
+++ SuperBuild/CTest.cmake
@@ -36,6 +36,11 @@
     OUTPUT_VARIABLE SELX_GIT_BRANCH_NAME
 )

+if(NOT DEFINED CTEST_GIT_COMMAND)
+  find_program(CTEST_GIT_COMMAND NAMES git git.cmd)
+endif()
+set(CTEST_GIT_UPDATE_CUSTOM "${CTEST_GIT_COMMAND}" pull origin)
+
 set(CTEST_BUILD_NAME "${SELX_GIT_BRANCH_NAME};Build;commit=SHA\\:${SELX_GIT_COMMIT_SHA}")

 set(CTEST_CMAKE_GENERATOR "Unix Makefiles")


core.cmake: remove unused cmake/packages fallback

--- prosoft/core/core.cmake
+++ prosoft/core/core.cmake
@@ -25,9 +25,6 @@

 set(PSCORE "${CMAKE_CURRENT_LIST_DIR}")
 get_filename_component(PSCORE ${PSCORE} REALPATH)
-
-# fallback to local versions of packages if not provided by upper level
-list(APPEND CMAKE_MODULE_PATH ${PSCORE}/config/cmake/packages)

 include("${PSCORE}/config/cmake/config.cmake")


Mac: embed QtQuick.Controls to plugin

Mac: embed QtQuick.Controls to plugin

fix #83

--- src/Mac/projectDef.cmake
+++ src/Mac/projectDef.cmake
@@ -81,11 +81,28 @@
         ${QTDIR}/qml/QtQuick/Layouts/plugins.qmltypes
         )

+    file( GLOB QML_QTQUICK_CONTROLS
+        ${QTDIR}/qml/QtQuick/Controls/qmldir
+        ${QTDIR}/qml/QtQuick/Controls/plugins.qmltypes
+        ${QTDIR}/qml/QtQuick/Controls/[^.]*.qml
+        )
+    file( GLOB QML_QTQUICK_CONTROLS_STYLES
+        ${QTDIR}/qml/QtQuick/Controls/Styles/[^.]*
+        )
+    file( GLOB QML_QTQUICK_CONTROLS_STYLES_BASE
+        ${QTDIR}/qml/QtQuick/Controls/Styles/Base/[^.]*
+        )
+    file( GLOB QML_QTQUICK_CONTROLS_STYLES_BASE_IMAGES
+        ${QTDIR}/qml/QtQuick/Controls/Styles/Base/Images/[^.]*
+        )
+    file( GLOB QML_QTQUICK_CONTROLS_PRIVATE
+        ${QTDIR}/qml/QtQuick/Controls/Private/[^.]*
+        )
+
     file( GLOB QML_QTGRAPHICALEFFECTS
         ${QTDIR}/qml/QtGraphicalEffects/qmldir
         ${QTDIR}/qml/QtGraphicalEffects/[^.]*.qml
         )
-
     file( GLOB QML_QTGRAPHICALEFFECTS_PRIVATE
         ${QTDIR}/qml/QtGraphicalEffects/private/[^.]*.qml
         )
@@ -93,6 +110,11 @@
     set( QML_MODULES
         ${QML_QTQUICK2}
         ${QML_QTQUICK_LAYOUTS}
+        ${QML_QTQUICK_CONTROLS}
+        ${QML_QTQUICK_CONTROLS_STYLES}
+        ${QML_QTQUICK_CONTROLS_STYLES_BASE}
+        ${QML_QTQUICK_CONTROLS_STYLES_BASE_IMAGES}
+        ${QML_QTQUICK_CONTROLS_PRIVATE}
         ${QML_QTGRAPHICALEFFECTS}
         ${QML_QTGRAPHICALEFFECTS_PRIVATE}
         )
@@ -112,11 +134,37 @@
         )

     set_source_files_properties(
+        ${QML_QTQUICK_CONTROLS}
+        PROPERTIES
+        MACOSX_PACKAGE_LOCATION MacOS/qml/QtQuick/Controls
+        )
+
+    set_source_files_properties(
+        ${QML_QTQUICK_CONTROLS_STYLES}
+        PROPERTIES
+        MACOSX_PACKAGE_LOCATION MacOS/qml/QtQuick/Controls/Styles
+        )
+    set_source_files_properties(
+        ${QML_QTQUICK_CONTROLS_STYLES_BASE}
+        PROPERTIES
+        MACOSX_PACKAGE_LOCATION MacOS/qml/QtQuick/Controls/Styles/Base
+        )
+    set_source_files_properties(
+        ${QML_QTQUICK_CONTROLS_STYLES_BASE_IMAGES}
+        PROPERTIES
+        MACOSX_PACKAGE_LOCATION MacOS/qml/QtQuick/Controls/Styles/Base/Images
+        )
+    set_source_files_properties(
+        ${QML_QTQUICK_CONTROLS_PRIVATE}
+        PROPERTIES
+        MACOSX_PACKAGE_LOCATION MacOS/qml/QtQuick/Controls/Private
+        )
+
+    set_source_files_properties(
         ${QML_QTGRAPHICALEFFECTS}
         PROPERTIES
         MACOSX_PACKAGE_LOCATION MacOS/qml/QtGraphicalEffects
         )
-
     set_source_files_properties(
         ${QML_QTGRAPHICALEFFECTS_PRIVATE}
         PROPERTIES


Fixed main.cxx exclusion.

Fixed main.cxx exclusion.

--- cmake/modules/FindArduino.cmake
+++ cmake/modules/FindArduino.cmake
@@ -280,6 +280,7 @@
     if(BOARD_CORE AND NOT TARGET ${CORE_LIB_NAME})
         set(BOARD_CORE_PATH ${ARDUINO_CORES_PATH}/${BOARD_CORE})
         find_sources(CORE_SRCS ${BOARD_CORE_PATH})
+		list(REMOVE_ITEM CORE_SRCS "${BOARD_CORE_PATH}/main.cxx")
         add_library(${CORE_LIB_NAME} ${CORE_SRCS})
         set(${VAR_NAME} ${CORE_LIB_NAME} PARENT_SCOPE)
     endif()


So sad...

So sad...

git-svn-id: fbbf69ba8011aca0e74e1c67904b11cccbdbe66b@26869 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/configure/configure_metis.cmake
+++ deal.II/cmake/configure/configure_metis.cmake
@@ -5,14 +5,14 @@
 MACRO(FEATURE_METIS_FIND_EXTERNAL var)
   FIND_PACKAGE(METIS)

-  #IF(METIS_FOUND AND METIS_MAJOR GREATER 4)
+  IF(METIS_FOUND AND METIS_MAJOR GREATER 4)
     SET(${var} TRUE)
-  #ELSE()
-  #  MESSAGE(WARNING "\n"
-  #    "Could not find a sufficient modern metis installation: "
-  #    "Version 5.x required!\n\n"
-  #    )
-  #ENDIF()
+  ELSE()
+    MESSAGE(WARNING "\n"
+      "Could not find a sufficient modern metis installation: "
+      "Version 5.x required!\n\n"
+      )
+  ENDIF()
 ENDMACRO()


cilk add doc of usage

cilk add doc of usage

--- cmake/FindCilk.cmake
+++ cmake/FindCilk.cmake
@@ -1,5 +1,11 @@
+# Find Intel Cilk Plus support
+#
+# The following variable is set
+#
+# CILK_FOUND - TRUE if Cilk Plus is found and work correctly. Currently only
+#              Intel compiler has this feature

-SET (TRY_CILK_CPP "
+SET (CILK_TEST_SOURCE "
 #include <cilk/cilk.h>
 #include <cilk/reducer_opadd.h>

@@ -16,11 +22,12 @@
 IF (NOT CILK_FOUND)
     INCLUDE (CheckCXXSourceRuns)
     UNSET (CILK_FOUND CACHE)
-    MESSAGE (STATUS "Try Cilk Plus extension")
-    CHECK_CXX_SOURCE_RUNS ("${TRY_CILK_CPP}" CILK_FOUND)
-    IF (CILK_FOUND)
-        MESSAGE (STATUS "Cilk Plus supported")
-    ELSE (CILK_FOUND)
-        MESSAGE (STATUS "Cilk Plus NOT supported")
-    ENDIF (CILK_FOUND)
+    CHECK_CXX_SOURCE_RUNS ("${CILK_TEST_SOURCE}" CILK_TEST_SOURCE_RUNS)
+    IF (CILK_TEST_SOURCE_RUNS)
+        SET (CILK_FOUND TRUE)
+        MESSAGE (STATUS "Find Cilk Plus support")
+    ELSE (CILK_TEST_SOURCE_RUNS)
+        SET (CILK_FOUND FALSE)
+        MESSAGE (STATUS "NOT Find Cilk Plus support")
+    ENDIF (CILK_TEST_SOURCE_RUNS)
 ENDIF (NOT CILK_FOUND)


Prefer the GLEW static library.

Prefer the GLEW static library.

--- cmake/FindGLEW.cmake
+++ cmake/FindGLEW.cmake
@@ -29,8 +29,9 @@
 		${GLEW_ROOT_DIR}/include
 		DOC "The directory where GL/glew.h resides")

+	# Prefer the static library.
 	FIND_LIBRARY( GLEW_LIBRARY
-		NAMES GLEW glew
+		NAMES libGLEW.a GLEW
 		PATHS
 		/usr/lib64
 		/usr/lib


[hot-fix] [cmake] remove verbose messaging on FindSDL2.cmake

--- cmake/FindSDL2.cmake
+++ cmake/FindSDL2.cmake
@@ -64,8 +64,6 @@
 #=============================================================================
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
-
-message("<FindSDL2.cmake>")

 SET(SDL2_SEARCH_PATHS
 	~/Library/Frameworks
@@ -160,8 +158,6 @@
 	SET(SDL2_LIBRARY_TEMP "${SDL2_LIBRARY_TEMP}" CACHE INTERNAL "")
 ENDIF(SDL2_LIBRARY_TEMP)

-message("</FindSDL2.cmake>")
-
 INCLUDE(FindPackageHandleStandardArgs)

 FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR)


Moves FindUDev to the lxqt-build-tools repo

We will need it in other repos, so, lxqt-build-tools is the proper place to
it.

--- cmake/FindUDev.cmake
+++ cmake/FindUDev.cmake
@@ -1,50 +0,0 @@
-# - Try to find the UDev library
-# Once done this will define
-#
-#  UDEV_FOUND - system has UDev
-#  UDEV_INCLUDE_DIR - the libudev include directory
-#  UDEV_LIBS - The libudev libraries
-
-# Copyright (c) 2010, Rafael Fernández López, <ereslibre@kde.org>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-# 3. Neither the name of the University nor the names of its contributors
-#    may be used to endorse or promote products derived from this software
-#    without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-
-find_path(UDEV_INCLUDE_DIR libudev.h)
-find_library(UDEV_LIBS udev)
-
-if(UDEV_INCLUDE_DIR AND UDEV_LIBS)
-   include(CheckFunctionExists)
-   include(CMakePushCheckState)
-   cmake_push_check_state()
-   set(CMAKE_REQUIRED_LIBRARIES ${UDEV_LIBS} )
-
-   cmake_pop_check_state()
-
-endif()
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(UDev DEFAULT_MSG UDEV_INCLUDE_DIR UDEV_LIBS)
-
-mark_as_advanced(UDEV_INCLUDE_DIR UDEV_LIBS)


Bugfix in global lcov targets for generating html reports

--- cmake/Findgcov.cmake
+++ cmake/Findgcov.cmake
@@ -211,30 +211,47 @@
 )

-# Add a new global target for all lcov targets. This target could be used to
-# generate the lcov html output for the whole project instead of calling
-# <TARGET>-geninfo and <TARGET>-html for each target. It will also be used to
-# generate a html site for all project data together instead of one for each
-# target.
+# Add global targets for lcov.
 if (LCOV_FOUND)
+	# Add a new global target to generate target .info files for all targets.
+	# This target could be used to generate the .tgt.info files for the whole
+	# project instead of calling <TARGET>-geninfo for each target.
 	if (NOT TARGET lcov-geninfo)
 		add_custom_target(lcov-geninfo)
 	endif (NOT TARGET lcov-geninfo)

+	# Add a new global target to generate the lcov html report for the whole
+	# project instead of calling <TARGET>-genhtml for each target (to create
+	# an own report for each target). Instead of the lcov target it does not
+	# require geninfo for all targets, so you have to call <TARGET>-geninfo to
+	# generate the info files the targets you'd like to have in your report or
+	# lcov-geninfo for generating info files for all targets before calling
+	# lcov-genhtml.
 	if (NOT TARGET lcov-genhtml)
 		add_custom_target(lcov-genhtml
 			WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
 			COMMAND ${GENHTML_BIN}
 				-t ${CMAKE_PROJECT_NAME}
 				-o ${CMAKE_BINARY_DIR}/lcov/project
-				`find . -name \"*.info\"`
+				`find . -name \"*.tgt.info\"`
 				> /dev/null
 		)
 	endif (NOT TARGET lcov-genhtml)

+	# Add a new global target for all lcov targets. This target could be used to
+	# generate the lcov html output for the whole project instead of calling
+	# <TARGET>-geninfo and <TARGET>-genhtml for each target. It will also be
+	# used to generate a html site for all project data together instead of one
+	# for each target.
 	if (NOT TARGET lcov)
 		add_custom_target(lcov
-			DEPENDS lcov-geninfo lcov-genhtml
+			WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+			COMMAND ${GENHTML_BIN}
+				-t ${CMAKE_PROJECT_NAME}
+				-o ${CMAKE_BINARY_DIR}/lcov/project
+				`find . -name \"*.tgt.info\"`
+				> /dev/null
+			DEPENDS lcov-geninfo
 		)
 	endif ()
 endif ()


change vc_compile_for_all_implementations macro to use normal cmake compilation

Based on patch from Khouri Giordano. Thanks!

- This resolves the problem that compiler flags from .props files in MSVC
  were not used for the custom compilation.
- This change requires that the callers directory must be free of
  architecture specific flags, else the selection of architecture flags
  per source file will not work

Conflicts:
	cmake/VcMacros.cmake

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -405,59 +405,48 @@
 endmacro()

 # helper macro for vc_compile_for_all_implementations
-macro(_vc_compile_one_implementation _objs _impl)
+macro(_vc_compile_one_implementation _srcs _impl)
    list(FIND _disabled_targets "${_impl}" _disabled_index)
    list(FIND _only_targets "${_impl}" _only_index)
    if(${_disabled_index} EQUAL -1 AND (NOT _only_targets OR ${_only_index} GREATER -1))
       set(_extra_flags)
       set(_ok FALSE)
-      foreach(_flag ${ARGN})
-         if(_flag STREQUAL "NO_FLAG")
+      foreach(_flags ${ARGN})
+         if(_flags STREQUAL "NO_FLAG")
             set(_ok TRUE)
             break()
          endif()
-         string(REPLACE " " ";" _flag_list "${_flag}")
-         foreach(_flag ${_flag_list})
-            AddCompilerFlag(${_flag} CXX_RESULT _ok CXX_FLAGS _tmp)
+         string(REPLACE " " ";" _flag_list "${_flags}")
+         foreach(_f ${_flag_list})
+            AddCompilerFlag(${_f} CXX_RESULT _ok)
             if(NOT _ok)
                break()
             endif()
          endforeach()
          if(_ok)
-            set(_extra_flags ${_flag_list})
+            set(_extra_flags ${_flags})
             break()
          endif()
       endforeach()

-      set(_outfile_flag -c -o)
       if(Vc_COMPILER_IS_MSVC)
          # MSVC for 64bit does not recognize /arch:SSE2 anymore. Therefore we set override _ok if _impl
          # says SSE
          if("${_impl}" MATCHES "SSE")
             set(_ok TRUE)
          endif()
-         set(_outfile_flag /c /Fo)
       endif()

       if(_ok)
          get_filename_component(_out "${_vc_compile_src}" NAME_WE)
          get_filename_component(_ext "${_vc_compile_src}" EXT)
-         if(Vc_COMPILER_IS_MSVC)
-            set(_out "${_out}_${_impl}${_ext}.obj")
-         else()
-            set(_out "${_out}_${_impl}${_ext}.o")
-         endif()
-         add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_out}
-            COMMAND ${CMAKE_CXX_COMPILER} ${_flags} ${_extra_flags}
-            -DVC_IMPL=${_impl}
-            ${_outfile_flag}${_out} ${CMAKE_CURRENT_SOURCE_DIR}/${_vc_compile_src}
-            MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/${_vc_compile_src}
-            IMPLICIT_DEPENDS CXX ${CMAKE_CURRENT_SOURCE_DIR}/${_vc_compile_src}
-            COMMENT "Building CXX object ${_out}"
-            WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
-            VERBATIM
-            )
-         list(APPEND ${_objs} "${CMAKE_CURRENT_BINARY_DIR}/${_out}")
+         set(_out "${CMAKE_CURRENT_BINARY_DIR}/${_out}_${_impl}${_ext}")
+         configure_file( ${_vc_compile_src} "${_out}" COPYONLY )
+         set_source_files_properties( "${_out}" PROPERTIES
+            COMPILE_DEFINITIONS "VC_IMPL=${_impl}"
+            COMPILE_FLAGS "${_flags} ${_extra_flags}"
+         )
+         list(APPEND ${_srcs} "${_out}")
       endif()
    endif()
 endmacro()
@@ -468,17 +457,8 @@
 # Example:
 #   vc_compile_for_all_implementations(_objs src/trigonometric.cpp FLAGS -DCOMPILE_BLAH EXCLUDE Scalar)
 #   add_executable(executable main.cpp ${_objs})
-macro(vc_compile_for_all_implementations _objs _src)
-   # remove all -march, -msse, etc. flags from the flags we want to pass
-   string(REPLACE "${Vc_ARCHITECTURE_FLAGS}" "" _flags "${Vc_DEFINITIONS}")
-   string(REPLACE "-DVC_IMPL=[^ ]*" "" _flags "${_flags}")
-
-   # capture the -march= switch as -mtune; if there is none skip it
-   if(Vc_ARCHITECTURE_FLAGS MATCHES "-march=")
-      string(REGEX REPLACE "^.*-march=([^ ]*).*$" "-mtune=\\1" _tmp "${Vc_ARCHITECTURE_FLAGS}")
-      set(_flags "${_flags} ${_tmp}")
-   endif()
-
+macro(vc_compile_for_all_implementations _srcs _src)
+   set(_flags)
    unset(_disabled_targets)
    unset(_only_targets)
    set(_state 0)
@@ -500,52 +480,30 @@
       endif()
    endforeach()

-   # make a semicolon separated list of all flags
-   string(TOUPPER "${CMAKE_BUILD_TYPE}" _tmp)
-   set(_tmp "CMAKE_CXX_FLAGS_${_tmp}")
-   string(REPLACE " " ";" _tmp "${CMAKE_CXX_FLAGS} ${${_tmp}} ${_flags}")
-   set(_flags)
-   foreach(item ${_tmp})
-      if(item MATCHES "^[^']*'[^']*$")
-         if(_str)
-            list(APPEND _flags "${_str} ${item}")
-            unset(_str)
-         else()
-            set(_str "${item}")
-         endif()
-      else()
-         list(APPEND _flags "${item}")
-      endif()
-   endforeach()
-   get_directory_property(_inc INCLUDE_DIRECTORIES)
-   foreach(_i ${_inc})
-      list(APPEND _flags "-I${_i}")
-   endforeach()
-
    set(_vc_compile_src "${_src}")

-   _vc_compile_one_implementation(${_objs} Scalar NO_FLAG)
+   _vc_compile_one_implementation(${_srcs} Scalar NO_FLAG)
    if(NOT Vc_SSE_INTRINSICS_BROKEN)
-      _vc_compile_one_implementation(${_objs} SSE2   "-xSSE2"   "-msse2"   "/arch:SSE2")
-      _vc_compile_one_implementation(${_objs} SSE3   "-xSSE3"   "-msse3"   "/arch:SSE2")
-      _vc_compile_one_implementation(${_objs} SSSE3  "-xSSSE3"  "-mssse3"  "/arch:SSE2")
-      _vc_compile_one_implementation(${_objs} SSE4_1 "-xSSE4.1" "-msse4.1" "/arch:SSE2")
-      _vc_compile_one_implementation(${_objs} SSE4_2 "-xSSE4.2" "-msse4.2" "/arch:SSE2")
-      _vc_compile_one_implementation(${_objs} SSE3+SSE4a  "-msse4a")
+      _vc_compile_one_implementation(${_srcs} SSE2   "-xSSE2"   "-msse2"   "/arch:SSE2")
+      _vc_compile_one_implementation(${_srcs} SSE3   "-xSSE3"   "-msse3"   "/arch:SSE2")
+      _vc_compile_one_implementation(${_srcs} SSSE3  "-xSSSE3"  "-mssse3"  "/arch:SSE2")
+      _vc_compile_one_implementation(${_srcs} SSE4_1 "-xSSE4.1" "-msse4.1" "/arch:SSE2")
+      _vc_compile_one_implementation(${_srcs} SSE4_2 "-xSSE4.2" "-msse4.2" "/arch:SSE2")
+      _vc_compile_one_implementation(${_srcs} SSE3+SSE4a  "-msse4a")
    endif()
    if(NOT Vc_AVX_INTRINSICS_BROKEN)
-      _vc_compile_one_implementation(${_objs} AVX      "-xAVX"    "-mavx"    "/arch:AVX")
+      _vc_compile_one_implementation(${_srcs} AVX      "-xAVX"    "-mavx"    "/arch:AVX")
       if(NOT Vc_XOP_INTRINSICS_BROKEN)
          if(NOT Vc_FMA4_INTRINSICS_BROKEN)
-            _vc_compile_one_implementation(${_objs} SSE+XOP+FMA4 "-mxop -mfma4"        ""    "")
-            _vc_compile_one_implementation(${_objs} AVX+XOP+FMA4 "-mavx -mxop -mfma4"  ""    "")
-         endif()
-         _vc_compile_one_implementation(${_objs} SSE+XOP+FMA "-mxop -mfma"        ""    "")
-         _vc_compile_one_implementation(${_objs} AVX+XOP+FMA "-mavx -mxop -mfma"  ""    "")
-      endif()
-      _vc_compile_one_implementation(${_objs} AVX+FMA "-mavx -mfma"  ""    "")
+            _vc_compile_one_implementation(${_srcs} SSE+XOP+FMA4 "-mxop -mfma4"        ""    "")
+            _vc_compile_one_implementation(${_srcs} AVX+XOP+FMA4 "-mavx -mxop -mfma4"  ""    "")
+         endif()
+         _vc_compile_one_implementation(${_srcs} SSE+XOP+FMA "-mxop -mfma"        ""    "")
+         _vc_compile_one_implementation(${_srcs} AVX+XOP+FMA "-mavx -mxop -mfma"  ""    "")
+      endif()
+      _vc_compile_one_implementation(${_srcs} AVX+FMA "-mavx -mfma"  ""    "")
    endif()
    if(NOT Vc_AVX2_INTRINSICS_BROKEN)
-      _vc_compile_one_implementation(${_objs} AVX2 "-xCORE-AVX2"  "-mavx2"    "/arch:AVX2")
-   endif()
-endmacro()
+      _vc_compile_one_implementation(${_srcs} AVX2 "-xCORE-AVX2"  "-mavx2"    "/arch:AVX2")
+   endif()
+endmacro()


fptu: save initial CMake's flags.

fptu: save initial CMake's flags.

--- cmake/compiler.cmake
+++ cmake/compiler.cmake
@@ -199,9 +199,24 @@
 #

 macro(setup_compile_flags)
+  # LY: save initial C/CXX flags
+  if(NOT INITIAL_CMAKE_FLAGS_SAVED)
+    set(INITIAL_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "Initial CMake's flags" FORCE)
+    set(INITIAL_CMAKE_C_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "Initial CMake's flags" FORCE)
+    set(INITIAL_CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} CACHE STRING "Initial CMake's flags" FORCE)
+    set(INITIAL_CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} CACHE STRING "Initial CMake's flags" FORCE)
+    set(INITIAL_CMAKE_STATIC_LINKER_FLAGS ${CMAKE_STATIC_LINKER_FLAGS} CACHE STRING "Initial CMake's flags" FORCE)
+    set(INITIAL_CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS} CACHE STRING "Initial CMake's flags" FORCE)
+    set(INITIAL_CMAKE_FLAGS_SAVED TRUE CACHE INTERNAL "State of initial CMake's flags" FORCE)
+  endif()
+
   # LY: reset C/CXX flags
-  set(CXX_FLAGS "")
-  set(C_FLAGS "")
+  set(CXX_FLAGS ${INITIAL_CMAKE_CXX_FLAGS})
+  set(C_FLAGS ${INITIAL_CMAKE_C_FLAGS})
+  set(EXE_LINKER_FLAGS ${INITIAL_CMAKE_EXE_LINKER_FLAGS})
+  set(SHARED_LINKER_FLAGS ${INITIAL_CMAKE_SHARED_LINKER_FLAGS})
+  set(STATIC_LINKER_FLAGS ${INITIAL_CMAKE_STATIC_LINKER_FLAGS})
+  set(MODULE_LINKER_FLAGS ${INITIAL_CMAKE_MODULE_LINKER_FLAGS})

   if(CC_HAS_FNO_COMMON)
     add_compile_flags("C;CXX" "-fno-common")
@@ -281,10 +296,10 @@
     endif()

     add_compile_flags("C;CXX" "-fprofile-arcs" "-ftest-coverage")
-    set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs")
-    set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ftest-coverage")
-    set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs")
-    set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -ftest-coverage")
+    set(EXE_LINKER_FLAGS "${EXE_LINKER_FLAGS} -fprofile-arcs")
+    set(EXE_LINKER_FLAGS "${EXE_LINKER_FLAGS} -ftest-coverage")
+    set(SHARED_LINKER_FLAGS "${SHARED_LINKER_FLAGS} -fprofile-arcs")
+    set(SHARED_LINKER_FLAGS "${SHARED_LINKER_FLAGS} -ftest-coverage")

     # add_library(gcov SHARED IMPORTED)
   endif()
@@ -296,8 +311,16 @@
   # LY: push C/CXX flags into the cache
   set(CMAKE_CXX_FLAGS ${CXX_FLAGS} CACHE STRING "Flags used by the C++ compiler during all build types" FORCE)
   set(CMAKE_C_FLAGS ${C_FLAGS} CACHE STRING "Flags used by the C compiler during all build types" FORCE)
+  set(CMAKE_EXE_LINKER_FLAGS ${EXE_LINKER_FLAGS} CACHE STRING "Flags used by the linker" FORCE)
+  set(CMAKE_SHARED_LINKER_FLAGS ${SHARED_LINKER_FLAGS} CACHE STRING "Flags used by the linker during the creation of dll's" FORCE)
+  set(CMAKE_STATIC_LINKER_FLAGS ${STATIC_LINKER_FLAGS} CACHE STRING "Flags used by the linker during the creation of static libraries" FORCE)
+  set(CMAKE_MODULE_LINKER_FLAGS ${MODULE_LINKER_FLAGS} CACHE STRING "Flags used by the linker during the creation of modules" FORCE)
   unset(CXX_FLAGS)
   unset(C_FLAGS)
+  unset(EXE_LINKER_FLAGS)
+  unset(SHARED_LINKER_FLAGS)
+  unset(STATIC_LINKER_FLAGS)
+  unset(MODULE_LINKER_FLAGS)
 endmacro(setup_compile_flags)

 if(CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCC)


include files in project directories

include files in project directories

git-svn-id: 53a346f67f76028cd3290d0c97fdb7682ad2a994@12125 358b74ad-2626-0410-af80-f4c3c349ae55

--- imageutilities/cmake/FindCUDASparse.cmake
+++ imageutilities/cmake/FindCUDASparse.cmake
@@ -22,10 +22,23 @@

 # FindCUDASparse.cmake

+if( CUDA_64_BIT_DEVICE_CODE )
+	set( CUDA_SPARSE_SEARCH_PATH_SUFFIXES
+		/lib64
+		/lib
+		/libx86_64-linux-gnu
+		/lib/x64
+	)
+else()
+	set( CUDA_SPARSE_SEARCH_PATH_SUFFIXES
+		/lib
+		/lib/win32
+	)
+endif()
 find_library(CUDA_SPARSE_LIBRARY
   NAMES cusparse
   PATHS "${CUDA_TOOLKIT_ROOT_DIR}"
-  PATH_SUFFIXES "/lib64" "/lib" "/lib/x86_64-linux-gnu" "lib/x64" "lib/Win32"
+  PATH_SUFFIXES ${CUDA_SPARSE_SEARCH_PATH_SUFFIXES}
   DOC "Location of sparse library"
   NO_DEFAULT_PATH
 )


Enable GSL tests (reverts part of changeset 88c50cd078dd).

--- cmake/FindGSL.cmake
+++ cmake/FindGSL.cmake
@@ -160,7 +160,6 @@
   ENDIF(UNIX)
 ENDIF(WIN32)

-set(GSL_LIBRARIES "")

 IF(GSL_LIBRARIES)
   IF(GSL_INCLUDE_DIR OR GSL_CXX_FLAGS)


Less annoying cmake output

Less annoying cmake output

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -3,7 +3,8 @@
 # Written by Hannes Hofmann <hannes.hofmann _at_ informatik.uni-erlangen.de>
 # Improvements by Gino van den Bergen <gino _at_ dtecta.com>,
 #   Florian Uhlig <F.Uhlig _at_ gsi.de>,
-#   Jiri Marsik <jiri.marsik89 _at_ gmail.com>
+#   Jiri Marsik <jiri.marsik89 _at_ gmail.com>,
+#   Stefan Zellmann <info _at_ szellmann.de>,

 # The MIT License
 #
@@ -156,7 +157,7 @@
 endif (NOT _TBB_INSTALL_DIR)
 # sanity check
 if (NOT _TBB_INSTALL_DIR)
-    message ("ERROR: Unable to find Intel TBB install directory. ${_TBB_INSTALL_DIR}")
+    message (STATUS "Unable to find Intel TBB install directory. ${_TBB_INSTALL_DIR}")
 else (NOT _TBB_INSTALL_DIR)
 # finally: set the cached CMake variable TBB_INSTALL_DIR
 if (NOT TBB_INSTALL_DIR)
@@ -265,7 +266,7 @@
 endif (TBB_INCLUDE_DIR)

 if (NOT TBB_FOUND)
-    message("ERROR: Intel TBB NOT found!")
+    message(STATUS "Intel TBB NOT found")
     message(STATUS "Looked for Threading Building Blocks in ${_TBB_INSTALL_DIR}")
     # do only throw fatal, if this pkg is REQUIRED
     if (TBB_FIND_REQUIRED)


fixed cmake config files install path

fixed cmake config files install path

Ruby: generated foo.proto -> foo_pb.rb instead of foo.rb.

This brings us more into line with other langauges, and makes it more
obvious when we are requiring protobuf generated code.

Add a script to build protoc zip packages.

[ci skip]

Change-Id: Ia0e0bf3bb6bd24633dc8f294318bb20ac837f8b9

Ruby: translate package names from snake_case -> PascalCase.

Added unit test for PascalCasing package names in Ruby.

Added new file to ruby_EXTRA_DIST.

--- cmake/install.cmake
+++ cmake/install.cmake
@@ -110,7 +110,7 @@
   NAMESPACE protobuf::
   COMPONENT protobuf-export)

-install(DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_CMAKEDIR}/
+install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_CMAKEDIR}/
   DESTINATION "${CMAKE_INSTALL_CMAKEDIR}"
   COMPONENT protobuf-export
   PATTERN protobuf-targets.cmake EXCLUDE


Remove if(TRUE)

Remove if(TRUE)

--- cmake/install.cmake
+++ cmake/install.cmake
@@ -16,34 +16,32 @@
 install(TARGETS protoc EXPORT protobuf-targets
   RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)

-if(TRUE)
-  file(STRINGS extract_includes.bat.in _extract_strings
-    REGEX "^copy")
-  foreach(_extract_string ${_extract_strings})
-    string(REPLACE "copy \${PROTOBUF_SOURCE_WIN32_PATH}\\" ""
-      _extract_string ${_extract_string})
-    string(REPLACE "\\" "/" _extract_string ${_extract_string})
-    string(REGEX MATCH "^[^ ]+"
-      _extract_from ${_extract_string})
-    string(REGEX REPLACE "^${_extract_from} ([^$]+)" "\\1"
-      _extract_to ${_extract_string})
-    get_filename_component(_extract_from "${protobuf_SOURCE_DIR}/${_extract_from}" ABSOLUTE)
-    get_filename_component(_extract_name ${_extract_to} NAME)
-    get_filename_component(_extract_to ${_extract_to} PATH)
-    string(REPLACE "include/" "${CMAKE_INSTALL_INCLUDEDIR}/"
-      _extract_to "${_extract_to}")
-    if(EXISTS "${_extract_from}")
-      install(FILES "${_extract_from}"
-        DESTINATION "${_extract_to}"
-        COMPONENT protobuf-headers
-        RENAME "${_extract_name}")
-    else()
-      message(AUTHOR_WARNING "The file \"${_extract_from}\" is listed in "
-        "\"${protobuf_SOURCE_DIR}/cmake/extract_includes.bat.in\" "
-        "but there not exists. The file will not be installed.")
-    endif()
-  endforeach()
-endif()
+file(STRINGS extract_includes.bat.in _extract_strings
+  REGEX "^copy")
+foreach(_extract_string ${_extract_strings})
+  string(REPLACE "copy \${PROTOBUF_SOURCE_WIN32_PATH}\\" ""
+    _extract_string ${_extract_string})
+  string(REPLACE "\\" "/" _extract_string ${_extract_string})
+  string(REGEX MATCH "^[^ ]+"
+    _extract_from ${_extract_string})
+  string(REGEX REPLACE "^${_extract_from} ([^$]+)" "\\1"
+    _extract_to ${_extract_string})
+  get_filename_component(_extract_from "${protobuf_SOURCE_DIR}/${_extract_from}" ABSOLUTE)
+  get_filename_component(_extract_name ${_extract_to} NAME)
+  get_filename_component(_extract_to ${_extract_to} PATH)
+  string(REPLACE "include/" "${CMAKE_INSTALL_INCLUDEDIR}/"
+    _extract_to "${_extract_to}")
+  if(EXISTS "${_extract_from}")
+    install(FILES "${_extract_from}"
+      DESTINATION "${_extract_to}"
+      COMPONENT protobuf-headers
+      RENAME "${_extract_name}")
+  else()
+    message(AUTHOR_WARNING "The file \"${_extract_from}\" is listed in "
+      "\"${protobuf_SOURCE_DIR}/cmake/extract_includes.bat.in\" "
+      "but there not exists. The file will not be installed.")
+  endif()
+endforeach()

 # Internal function for parsing auto tools scripts
 function(_protobuf_auto_list FILE_NAME VARIABLE)


add interface for 'extra_depends_for_output' in cmake MACRO(SETUP_TEST_CASE)

--- utilities/cmake/setup_test_case.macro.cmake
+++ utilities/cmake/setup_test_case.macro.cmake
@@ -41,6 +41,7 @@
       # in parallel testing.
       # Always build the excutable before run cTest.
       # ${PRJ_NAME}
+      ${_extra_depends_for_output}
     VERBATIM
     )


ENH: SuperBuild: dead link to OSG 3.2, bump to 3.4

--- SuperBuild/CMake/External_openthreads.cmake
+++ SuperBuild/CMake/External_openthreads.cmake
@@ -39,8 +39,8 @@
   else()
     ExternalProject_Add(${proj}
       PREFIX ${proj}
-      URL "http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.2.0.zip"
-      URL_MD5 4980f8692712a24d4c99f363f80c6814
+      URL "http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-3.4.0/source/OpenSceneGraph-3.4.0.zip"
+      URL_MD5 a5e762c64373a46932e444f6f7332496
       SOURCE_DIR ${OPENTHREADS_SB_SRC}
       BINARY_DIR ${OPENTHREADS_SB_BUILD_DIR}
       INSTALL_DIR ${SB_INSTALL_PREFIX}


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/KWSys/vtksys/kwsysDateStamp.cmake
+++ Utilities/KWSys/vtksys/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   17)
+SET(KWSYS_DATE_STAMP_DAY   18)


FIX: exclude BUILDNAME and SITE when "using" VTK

--- UseVTK.cmake
+++ UseVTK.cmake
@@ -12,6 +12,8 @@
         LIBRARY_OUTPUT_PATH
         EXECUTABLE_OUTPUT_PATH
         MAKECOMMAND
+        SITE
+        BUILDNAME
       INCLUDE_INTERNALS
         VTK_BINARY_DIR
         VTK_LIBRARY_PATH
@@ -28,7 +30,9 @@
         BUILD_EXAMPLES
         LIBRARY_OUTPUT_PATH
         EXECUTABLE_OUTPUT_PATH
-        MAKECOMMAND
+        MAKECOMMAND
+        SITE
+        BUILDNAME
       INCLUDE_INTERNALS
         VTK_BINARY_DIR
         VTK_LIBRARY_PATH


Bump to new ADE release v0.1.1f

Bump to new ADE release v0.1.1f

--- modules/gapi/cmake/DownloadADE.cmake
+++ modules/gapi/cmake/DownloadADE.cmake
@@ -4,9 +4,9 @@
 endif()

 set(ade_src_dir "${OpenCV_BINARY_DIR}/3rdparty/ade")
-set(ade_filename "v0.1.1d.zip")
-set(ade_subdir "ade-0.1.1d")
-set(ade_md5 "37479d90e3a5d47f132f512b22cbe206")
+set(ade_filename "v0.1.1f.zip")
+set(ade_subdir "ade-0.1.1f")
+set(ade_md5 "b624b995ec9c439cbc2e9e6ee940d3a2")
 ocv_download(FILENAME ${ade_filename}
              HASH ${ade_md5}
              URL


Add option to ament_auto_package to install to share folder: (#166)

- This will simplify installing folders like 'cmake' and 'launch'
into a package's shared folder

Signed-off-by: Juan Pablo Samper <2a85767837cb6bdeb6ab9df34ca4358d2f954e5d@apex.ai>

--- ament_cmake_auto/cmake/ament_auto_package.cmake
+++ ament_cmake_auto/cmake/ament_auto_package.cmake
@@ -25,6 +25,9 @@
 #   Libraries are not affected by this option.
 #   They are always installed into `lib` and `dll`s into `bin`.
 # :type INSTALL_TO_PATH: option
+# :param INSTALL_TO_SHARE: a list of directories to be installed to the
+#   package's share directory
+# :type INSTALL_TO_SHARE: list of strings
 #
 # Export all found build dependencies which are also run
 # dependencies.
@@ -38,7 +41,7 @@
 #

 macro(ament_auto_package)
-  cmake_parse_arguments(_ARG "INSTALL_TO_PATH" "" "" ${ARGN})
+  cmake_parse_arguments(_ARG "INSTALL_TO_PATH" "" "INSTALL_TO_SHARE" ${ARGN})
   if(_ARG_UNPARSED_ARGUMENTS)
     message(FATAL_ERROR "ament_auto_find_build_dependencies() called with "
       "unused arguments: ${_ARG_UNPARSED_ARGUMENTS}")
@@ -87,6 +90,14 @@
     )
   endif()

+  # install directories to share
+  foreach(_dir ${_ARG_INSTALL_TO_SHARE})
+    install(
+      DIRECTORY "${_dir}"
+      DESTINATION "share/${PROJECT_NAME}"
+    )
+  endforeach()
+
   ament_execute_extensions(ament_auto_package)

   ament_package()


ARROW-65: Be less restrictive on PYTHON_LIBRARY search paths

Current CMake FindPythonLibs also uses this option instead of NO_DEFAULT_PATH.

Author: Uwe L. Korn <uwelk@xhochy.com>

Closes #43 from xhochy/arrow-65 and squashes the following commits:

10eb9e0 [Uwe L. Korn] ARROW-65: Be less restrictive on PYTHON_LIBRARY search paths

--- python/cmake_modules/FindPythonLibsNew.cmake
+++ python/cmake_modules/FindPythonLibsNew.cmake
@@ -166,7 +166,7 @@
     find_library(PYTHON_LIBRARY
         NAMES "python${PYTHON_LIBRARY_SUFFIX}"
         PATHS ${_PYTHON_LIBS_SEARCH}
-        NO_DEFAULT_PATH)
+        NO_SYSTEM_ENVIRONMENT_PATH)
     message(STATUS "Found Python lib ${PYTHON_LIBRARY}")
 endif()


fbcode_builder: fix install_fb_python_library() to work with old CMake versions

Summary:
Update install_fb_python_library() to work with CMake versions older than 3.7.

Previously the code used a generator expression in the directory argument
supplied to `install(DIRECTORY)`.  Support for generators in this parameter
was only added in CMake 3.5, but it was buggy and did not correctly handle
absolute paths until 3.7.

This updates the code to avoid using a generator expression.  This does
require that the corresponding `add_fb_python_library()` statement appear
before the `install_fb_python_library()` statement, but this seems like a
pretty reasonable restriction.

Reviewed By: chadaustin

Differential Revision: D17103597

fbshipit-source-id: 54d6af93a3f530373cfe3137db99436d8484f308

--- build/fbcode_builder/CMake/FBPythonBinary.cmake
+++ build/fbcode_builder/CMake/FBPythonBinary.cmake
@@ -369,10 +369,9 @@

   # Copy the intermediate install directory generated at build time into
   # the desired install location.
-  set(dest_dir "$<TARGET_PROPERTY:${LIB_NAME}.py_lib_install,INSTALL_DIR>")
-  set(
-    build_install_dir
-    "$<TARGET_PROPERTY:${LIB_NAME}.py_lib_install,BUILD_INSTALL_DIR>"
+  get_target_property(dest_dir "${LIB_NAME}.py_lib_install" "INSTALL_DIR")
+  get_target_property(
+    build_install_dir "${LIB_NAME}.py_lib_install" "BUILD_INSTALL_DIR"
   )
   install(
     DIRECTORY "${build_install_dir}/${LIB_NAME}"


getdeps: allow aliasing sources for add_fb_python_executable

Summary:
* Fix a minor issue with `add_fb_python_executable` where it would
  emit `--main` even if `MAIN_MODULE` had not been specified
* Introduce the ability to rename python sources in the manifest so
  that they have a different install path.
* Note that this changes the DEPENDS parameters to reference abs_sources;
  previously these were using relative paths to the sources pulled directly
  from the SOURCES arguments, but since those can now contain aliasing
  operations we need to pre-process the list.  I switched to abs_sources
  because that was already being maintained.  If for some reason the
  DEPENDS list needs to be relative paths, this will need to be adjusted.

Reviewed By: simpkins

Differential Revision: D17147417

fbshipit-source-id: d0825bfbdad6be658c078aaac6645e6926a1530f

--- build/fbcode_builder/CMake/FBPythonBinary.cmake
+++ build/fbcode_builder/CMake/FBPythonBinary.cmake
@@ -47,10 +47,11 @@
 # Build a self-executing python binary.
 #
 # This accepts the same arguments as add_fb_python_library().
-# In addition, a MAIN_MODULE argument is required.  This argument specifies
+#
+# In addition, a MAIN_MODULE argument is accepted.  This argument specifies
 # which module should be started as the __main__ module when the executable is
-# run.
-#
+# run.  If left unspecified, a __main__.py script must be present in the
+# manifest.
 function(add_fb_python_executable EXE_NAME)
   # Parse the arguments
   set(one_value_args BASE_DIR NAMESPACE MAIN_MODULE TYPE)
@@ -105,11 +106,15 @@
     endif()
   endif()

+  if(DEFINED ARG_MAIN_MODULE)
+    set(main_argument "--main" "${ARG_MAIN_MODULE}")
+  endif()
+
   add_custom_command(
     OUTPUT "${output_file}"
     ${extra_cmd_params}
     COMMAND
-      "${MAKE_PYTHON_ARCHIVE}" -o "${EXE_NAME}" --main "${ARG_MAIN_MODULE}"
+      "${MAKE_PYTHON_ARCHIVE}" -o "${EXE_NAME}" ${main_argument}
       ${make_py_args}
     DEPENDS
       ${source_files}
@@ -145,6 +150,11 @@
 #   namespace of "foo.bar"
 # - SOURCES <src1> <...>:
 #   The python source files.
+#   You may optionally specify as source using the form: PATH=ALIAS where
+#   PATH is a relative path in the source tree and ALIAS is the relative
+#   path into which PATH should be rewritten.  This is useful for mapping
+#   an executable script to the main module in a python executable.
+#   e.g.: `python/bin/watchman-wait=__main__.py`
 # - DEPENDS <target1> <...>:
 #   Other python libraries that this one depends on.
 # - INSTALL_DIR <dir>:
@@ -229,23 +239,43 @@
   file(WRITE "${tmp_manifest}" "FBPY_MANIFEST 1\n")
   set(abs_sources)
   foreach(src_path IN LISTS ARG_SOURCES)
+    if("${src_path}" MATCHES "=")
+      # We want to split the string on the `=` sign, but cmake doesn't
+      # provide much in the way of helpers for this, so we rewrite the
+      # `=` sign to `;` so that we can treat it as a cmake list and
+      # then index into the components
+      string(REPLACE "=" ";" src_path_list "${src_path}")
+      list(GET src_path_list 0 src_path)
+      # Note that we ignore the `namespace_dir` in the alias case
+      # in order to allow aliasing a source to the top level `__main__.py`
+      # filename.
+      list(GET src_path_list 1 dest_path)
+    else()
+      unset(dest_path)
+    endif()
+
     get_filename_component(abs_source "${src_path}" ABSOLUTE)
     list(APPEND abs_sources "${abs_source}")
     file(RELATIVE_PATH rel_src "${ARG_BASE_DIR}" "${abs_source}")
+
+    if(NOT DEFINED dest_path)
+      if("${rel_src}" MATCHES "^../")
+        message(
+          FATAL_ERROR "${LIB_NAME}: source file \"${abs_source}\" is not inside "
+          "the base directory ${ARG_BASE_DIR}"
+        )
+      endif()
+      set(dest_path "${namespace_dir}${rel_src}")
+    endif()
+
     target_sources(
       "${LIB_NAME}.py_lib" INTERFACE
       "$<BUILD_INTERFACE:${abs_source}>"
-      "$<INSTALL_INTERFACE:${install_dir}${LIB_NAME}/${namespace_dir}${rel_src}>"
+      "$<INSTALL_INTERFACE:${install_dir}${LIB_NAME}/${dest_path}>"
     )
-    if("${rel_src}" MATCHES "^../")
-      message(
-        FATAL_ERROR "${LIB_NAME}: source file \"${abs_source}\" is not inside "
-        "the base directory ${ARG_BASE_DIR}"
-      )
-    endif()
     file(
       APPEND "${tmp_manifest}"
-      "${abs_source} :: ${namespace_dir}${rel_src}\n"
+      "${abs_source} :: ${dest_path}\n"
     )
   endforeach()
   configure_file("${tmp_manifest}" "${manifest_path}" COPYONLY)
@@ -260,7 +290,7 @@
   # This is needed in case some of the source files are generated.  This will
   # ensure that these source files are brought up-to-date before we build
   # any python binaries that depend on this library.
-  add_custom_target("${LIB_NAME}.py_sources_built" DEPENDS ${ARG_SOURCES})
+  add_custom_target("${LIB_NAME}.py_sources_built" DEPENDS ${abs_sources})
   add_dependencies("${LIB_NAME}.py_lib" "${LIB_NAME}.py_sources_built")

   # Hook up library dependencies, and also make the *.py_sources_built target
@@ -306,7 +336,7 @@
       --install-dir "${LIB_NAME}"
       -o "${build_install_dir}/${LIB_NAME}" "${manifest_path}"
     DEPENDS
-      "${ARG_SOURCES}"
+      "${abs_sources}"
       "${manifest_path}"
       "${MAKE_PYTHON_ARCHIVE}"
   )


flowgui compiling and displaying something

git-svn-id: 53a346f67f76028cd3290d0c97fdb7682ad2a994@9805 358b74ad-2626-0410-af80-f4c3c349ae55

--- imageutilities/cmake/FindImageUtilities.cmake
+++ imageutilities/cmake/FindImageUtilities.cmake
@@ -238,7 +238,7 @@
   ## GUI module
   if(IU_IUGUI_FOUND)
     # Qt4
-    find_package(Qt4 COMPONENTS QtCore QtGui QtOpenGL)
+    find_package(Qt4 COMPONENTS QtCore QtGui)# QtOpenGL)
     if(QT4_FOUND)
       #include(${QT_USE_FILE})
       set(IU_IUGUI_LIB_DEPENDENCIES ${IU_IUGUI_LIB_DEPENDENCIES} ${QT_LIBRARIES})


gst_plugins_base: Install gstogg/gstximagesink

--- cmake/projects/gst_plugins_base/hunter.cmake
+++ cmake/projects/gst_plugins_base/hunter.cmake
@@ -45,7 +45,7 @@
 hunter_cmake_args(
     gst_plugins_base
     CMAKE_ARGS
-    DEPENDS_ON_PACKAGES=gstreamer
+    DEPENDS_ON_PACKAGES=gstreamer;libogg;x11
     DEPENDS_ON_PKGCONFIGS=gstreamer-1.0
     PKGCONFIG_EXPORT_TARGETS=${_gst_export_targets}
 )
@@ -67,6 +67,7 @@
     "lib/gstreamer-1.0/libgstaudiotestsrc.la"
     "lib/gstreamer-1.0/libgstencodebin.la"
     "lib/gstreamer-1.0/libgstgio.la"
+    "lib/gstreamer-1.0/libgstogg.la"
     "lib/gstreamer-1.0/libgstplayback.la"
     "lib/gstreamer-1.0/libgstsubparse.la"
     "lib/gstreamer-1.0/libgsttcp.la"
@@ -76,6 +77,7 @@
     "lib/gstreamer-1.0/libgstvideoscale.la"
     "lib/gstreamer-1.0/libgstvideotestsrc.la"
     "lib/gstreamer-1.0/libgstvolume.la"
+    "lib/gstreamer-1.0/libgstximagesink.la"
     "lib/libgstallocators-1.0.la"
     "lib/libgstapp-1.0.la"
     "lib/libgstaudio-1.0.la"


fix PR feedback

fix PR feedback

--- cmake/Benchmarks.cmake
+++ cmake/Benchmarks.cmake
@@ -20,8 +20,6 @@
       PRIVATE ${GTEST_INCLUDE_DIRS})
     set_target_properties(${exec_name} PROPERTIES
       RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/benchmarks")
-
-    set_property( TARGET ${exec_name} APPEND_STRING PROPERTY COMPILE_FLAGS "-g ")

     add_valgrind_sdk (${exec_name})


fixed Oracle client version detection with older headers

--- cmake/FindOracle.cmake
+++ cmake/FindOracle.cmake
@@ -41,7 +41,7 @@

 SET(ORACLE_FOUND "NO")
 SET(ORACLE_HAS_XML "NO")
-IF(DEFINED ENV{ORACLE_INSTANT_CLIENT})
+IF(DEFINED ENV{ORACLE_INSTANT_CLIENT})
     FILE(TO_CMAKE_PATH "$ENV{ORACLE_INSTANT_CLIENT}" ORACLE_HOME)
 ELSE()
     FILE(TO_CMAKE_PATH "$ENV{ORACLE_HOME}" ORACLE_HOME)
@@ -124,6 +124,10 @@
         file(READ "${ORACLE_INCLUDES}/ociver.h" ociver)
         string(REGEX MATCH "OCI_MAJOR_VERSION ([0-9]+)" _ ${ociver})
         set(ORACLE_OCI_VERSION ${CMAKE_MATCH_1})
+    elseif (EXISTS "${ORACLE_INCLUDES}/oci.h")
+        file(READ "${ORACLE_INCLUDES}/oci.h" ociver)
+        string(REGEX MATCH "OCI_MAJOR_VERSION *([0-9]+)" _ ${ociver})
+        set(ORACLE_OCI_VERSION ${CMAKE_MATCH_1})
     else()
         message(FATAL "cannot determine OCI version; missing ociver.h header")
     endif()


try a custom configure_command and using devenv

--- cmake/get-libpng.cmake
+++ cmake/get-libpng.cmake
@@ -13,6 +13,7 @@
     ${COMMON_CMAKE_ARGS}
       -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
       -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+      -DCMAKE_CONFIGURATION_TYPES=Release
       -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
       -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
       -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
@@ -30,11 +31,18 @@

 ExternalProject_Add(
   libpng
-  DEPENDS      zlib
-  PREFIX       ${DEPENDENCY_EXTRACT_DIR}
-  DOWNLOAD_DIR ${DEPENDENCY_DOWNLOAD_DIR}
-  URL          ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/lpng1624.zip
-  URL_MD5      9572a426a87407f6cfa41f61cbe2e3b2
-  INSTALL_DIR  ${DEPENDENCY_INSTALL_DIR}
-  CMAKE_ARGS   ${LIBPNG_CMAKE_ARGS}
+  DEPENDS             zlib
+  PREFIX              ${DEPENDENCY_EXTRACT_DIR}
+  DOWNLOAD_DIR        ${DEPENDENCY_DOWNLOAD_DIR}
+  URL                 ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/lpng1624.zip
+  URL_MD5             9572a426a87407f6cfa41f61cbe2e3b2
+  INSTALL_DIR         ${DEPENDENCY_INSTALL_DIR}
+  CONFIGURE_COMMAND   ${CMAKE_COMMAND} ${DEPENDENCY_EXTRACT_DIR}/src/libpng
+         -G ${CMAKE_GENERATOR}
+         -DZLIB_INCLUDE_DIR:PATH=${DEPENDENCY_INSTALL_DIR}/zlib/include
+         -DZLIB_LIBRARY:FILEPATH=${DEPENDENCY_INSTALL_DIR}/zlib/lib/zlib.lib
+         -DCMAKE_INSTALL_PREFIX=${DEPENDENCY_INSTALL_DIR}
+  BUILD_COMMAND       devenv libpng.sln /build Release /project png16
+  INSTALL_COMMAND     devenv libpng.sln /build Release /project INSTALL
+  #CMAKE_ARGS   ${LIBPNG_CMAKE_ARGS}
 )


gmp library check

gmp library check

--- cmake/unit-tests.cmake
+++ cmake/unit-tests.cmake
@@ -4,6 +4,13 @@
     "test/*.cpp"
 )

+find_library(GMP_LIBRARY gmp)
+
+IF(GMP_LIBRARY)
+    MESSAGE(STATUS "gmp library - found")
+ELSE(GMP_LIBRARY)
+    MESSAGE(FATAL_ERROR "gmp library - not found")
+ENDIF(GMP_LIBRARY)

 #include_directories(${CMAKE_BINARY_DIR}/secp256k1/include ${CMAKE_SOURCE_DIR}/src)

@@ -12,4 +19,4 @@
 add_executable(unit-tests ${TEST_SOURCES})
 add_dependencies(unit-tests bitcrypto)

-target_link_libraries(unit-tests bitcrypto ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} gmp)
+target_link_libraries(unit-tests bitcrypto ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${GMP_LIBRARY})


Update FW before merge

Update FW before merge

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "d616e5354de2d63602fdcbda434628ab071b56a3")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "6885de2401507c94137146b7c661b924b9ac049c")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Updated FW with ImageManip dynamic memory allocation

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "1a59c80266cd7a30ba874aa8d4a8277e0bf161ec")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "b98bae8e9a8a57f076b9c01217b0cd28e0540de1")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Updated device binary

Updated device binary

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "818aa7c5c13714e5890b63600b32bf45958c92cb")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "1f27e8cf4302e2f284b00f5cac6d44adb42bc285")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Update device side FW with updated mdk

Update device side FW with updated mdk

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "61ac21aa03a833ba4347e113f9ccd97f9322feaf")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "e6d983d63f717f30e27263cab037b43a1732b6f0")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Provide a cached variable for the detection of FP exceptions.

This way people can switch off the whole mechanism if the want.

--- cmake/checks/check_02_system_features.cmake
+++ cmake/checks/check_02_system_features.cmake
@@ -95,11 +95,17 @@
   "
   _HAVE_FP_EXCEPTIONS)

-IF(_HAVE_FP_EXCEPTIONS)
-  MESSAGE(STATUS "Checking for Floating Point Exception macros -- Success")
-  SET(DEAL_II_HAVE_FP_EXCEPTIONS 1)
-ELSE()
-  MESSAGE(STATUS "Checking for Floating Point Exception macros -- Failed")
+
+SET(DEAL_II_HAVE_FP_EXCEPTIONS ON CACHE BOOL "If ON, floating point exception are raised in debug mode when running the testsuite.")
+
+IF (DEAL_II_HAVE_FP_EXCEPTIONS)
+  IF(_HAVE_FP_EXCEPTIONS)
+    MESSAGE(STATUS "Checking for Floating Point Exception macros -- Success")
+    # nothing to set here -- DEAL_II_HAVE_FP_EXCEPTIONS is already ON
+  ELSE()
+    MESSAGE(STATUS "Checking for Floating Point Exception macros -- Failed")
+    SET(DEAL_II_HAVE_FP_EXCEPTIONS OFF CACHE BOOL "" FORCE)
+  ENDIF()
 ENDIF()


update fmu-v4 cmake config

update fmu-v4 cmake config

--- cmake/configs/nuttx_px4fmu-v4_default.cmake
+++ cmake/configs/nuttx_px4fmu-v4_default.cmake
@@ -35,7 +35,6 @@
 	drivers/ets_airspeed
 	drivers/meas_airspeed
 	drivers/frsky_telemetry
-	drivers/sPort_telemetry
 	modules/sensors
 	drivers/mkblctrl
 	drivers/px4flow


cmake: let find_package(OpenGL) handle all platforms

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -461,17 +461,7 @@
 #---Check for OpenGL installation-------------------------------------------------------
 if(opengl)
   message(STATUS "Looking for OpenGL")
-  if(APPLE AND NOT cocoa)
-    find_path(OPENGL_INCLUDE_DIR GL/gl.h  PATHS /usr/X11R6/include /opt/X11/include)
-    find_library(OPENGL_gl_LIBRARY NAMES GL PATHS /usr/X11R6/lib /opt/X11/lib)
-    find_library(OPENGL_glu_LIBRARY NAMES GLU PATHS /usr/X11R6/lib /opt/X11/lib)
-    find_package_handle_standard_args(OpenGL REQUIRED_VARS OPENGL_INCLUDE_DIR OPENGL_gl_LIBRARY)
-    find_package_handle_standard_args(OpenGL_GLU REQUIRED_VARS OPENGL_glu_LIBRARY)
-    set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
-    mark_as_advanced(OPENGL_INCLUDE_DIR OPENGL_glu_LIBRARY OPENGL_gl_LIBRARY)
-  else()
-    find_package(OpenGL)
-  endif()
+  find_package(OpenGL)
   if(NOT OPENGL_FOUND OR NOT OPENGL_GLU_FOUND)
     if(fail-on-missing)
       message(FATAL_ERROR "OpenGL package (with GLU) not found and opengl option required")


Add curl libraries to CFITSIO_LIBRARIES, in case cfitsio was build with support of curl on

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -800,6 +800,13 @@
         BUILD_IN_SOURCE 1
         BUILD_BYPRODUCTS ${CFITSIO_LIBRARIES}
       )
+      # We need to know which CURL_LIBRARIES were used in CFITSIO ExternalProject build
+      # and which ${CURL_LIBRARIES} should be used after for linking in ROOT together with CFITSIO.
+      # (curl is not strictly required in CFITSIO CMakeList.txt).
+      find_package(CURL)
+      if(CURL_FOUND)
+        set(CFITSIO_LIBRARIES ${CFITSIO_LIBRARIES} ${CURL_LIBRARIES})
+      endif()
       set(CFITSIO_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include)
     endif()
     set(fitsio ON CACHE BOOL "Enabled because builtin_cfitsio requested (${fitsio_description})" FORCE)


Update builtin version of VecCore to 0.5.1

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1355,7 +1355,7 @@
 endif()

 if(veccore AND NOT VecCore_FOUND)
-  set(VecCore_VERSION "0.5.0")
+  set(VecCore_VERSION "0.5.1")
   set(VecCore_PROJECT "VecCore-${VecCore_VERSION}")
   set(VecCore_SRC_URI "${lcgpackages}/${VecCore_PROJECT}.tar.gz")
   set(VecCore_DESTDIR "${CMAKE_BINARY_DIR}/externals")
@@ -1363,7 +1363,7 @@

   ExternalProject_Add(VECCORE
     URL     ${VecCore_SRC_URI}
-    URL_HASH SHA256=5b52205c1213574fa43d6362b60b0e16239035cf64106f8841d7beb7e32bdd03
+    URL_HASH SHA256=20f4ab8f599b9d12becc3e27e8dbb0f4ec0aa2de958053eb550020a9c95a6d62
     BUILD_IN_SOURCE 0
     LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
     CMAKE_ARGS -G ${CMAKE_GENERATOR}


Remove -gdwarf-4 from CMake

Remove -gdwarf-4 from CMake

--- Source/cmake_core.cmake
+++ Source/cmake_core.cmake
@@ -105,7 +105,6 @@
         PRIVATE
             # Use pthreads on Linux/macOS
             $<$<PLATFORM_ID:Linux,Darwin>:-pthread>
-            -gdwarf-4

             # MSVC compiler defines
             $<$<CXX_COMPILER_ID:MSVC>:/EHsc>


-ENH: set install dir in dashboard script.

--- Testing/Dashboard/pxDashboard_BIGR_linux64_gcc.cmake
+++ Testing/Dashboard/pxDashboard_BIGR_linux64_gcc.cmake
@@ -47,6 +47,9 @@
 ITKTOOLS_BUILD_TESTING:BOOL=ON
 ITKTOOLS_3D_SUPPORT:BOOL=ON
 ITKTOOLS_4D_SUPPORT:BOOL=ON
+
+// Install dir
+CMAKE_INSTALL_PREFIX:PATH=/cm/shared/apps/itktools/nightly/install
 ")


Setting target architecture for openblas

Former-commit-id: 120a8a32d7b6f6dd194b9db2b433da3538398a82

--- cmake-modules/SetupDependenciesConan.cmake
+++ cmake-modules/SetupDependenciesConan.cmake
@@ -42,9 +42,7 @@
             list(APPEND FOUND_TARGETS mkl::mkl)
         endif()
     else()
-        list(APPEND DMRG_CONAN_OPTIONS
-                OPTIONS openblas:dynamic_arch=False
-                OPTIONS openblas:arch=${OPENBLAS_MARCH})
+        list(APPEND DMRG_CONAN_OPTIONS OPTIONS openblas:dynamic_arch=False)
 #        cmake_host_system_information(RESULT _host_name   QUERY HOSTNAME)
 #        if(${_host_name} MATCHES "travis|TRAVIS|Travis|fv-")
 #            message(STATUS "Setting dynamic arch=False for openblas")


Node use script consistency, especially LIBRARIES

--- projects/use/usexp-node-config.cmake
+++ projects/use/usexp-node-config.cmake
@@ -2,15 +2,15 @@
 # this file (-config) installed to share/cmake
 get_filename_component(XP_ROOTDIR ${CMAKE_CURRENT_LIST_DIR}/../.. ABSOLUTE)
 get_filename_component(XP_ROOTDIR ${XP_ROOTDIR} ABSOLUTE) # remove relative parts
-include(${CMAKE_CURRENT_LIST_DIR}/xpfunmac.cmake)
+string(TOUPPER ${prj} PRJ)
 if(MSVC)
-  set(Node_LIB ${XP_ROOTDIR}/lib/node.lib)
-  set(Node_EXE ${XP_ROOTDIR}/bin/node.exe)
-  set(reqVars Node_LIB Node_EXE)
+  set(${PRJ}_LIBRARIES ${XP_ROOTDIR}/lib/node.lib)
+  set(${PRJ}_EXE ${XP_ROOTDIR}/bin/node.exe)
+  set(reqVars ${PRJ}_LIBRARIES ${PRJ}_EXE)
 else()
-  set(Node_LIB)
-  set(Node_EXE ${XP_ROOTDIR}/bin/node)
-  set(reqVars Node_EXE)
+  set(${PRJ}_LIBRARIES)
+  set(${PRJ}_EXE ${XP_ROOTDIR}/bin/node)
+  set(reqVars ${PRJ}_EXE)
 endif()
 set(Npm_SCRIPT ${XP_ROOTDIR}/node_modules/npm/bin/npm-cli.js)
 list(APPEND reqVars Npm_SCRIPT)