remove 3rd party conan.cmake

remove 3rd party conan.cmake

--- cmake/conan.cmake
+++ cmake/conan.cmake
@@ -1,902 +0,0 @@
-# The MIT License (MIT)
-
-# Copyright (c) 2018 JFrog
-
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-
-# The above copyright notice and this permission notice shall be included in all
-# copies or substantial portions of the Software.
-
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-
-
-
-# This file comes from: https://github.com/conan-io/cmake-conan. Please refer
-# to this repository for issues and documentation.
-
-# Its purpose is to wrap and launch Conan C/C++ Package Manager when cmake is called.
-# It will take CMake current settings (os, compiler, compiler version, architecture)
-# and translate them to conan settings for installing and retrieving dependencies.
-
-# It is intended to facilitate developers building projects that have conan dependencies,
-# but it is only necessary on the end-user side. It is not necessary to create conan
-# packages, in fact it shouldn't be use for that. Check the project documentation.
-
-# version: 0.17.0-dev
-
-include(CMakeParseArguments)
-
-function(_get_msvc_ide_version result)
-    set(${result} "" PARENT_SCOPE)
-    if(NOT MSVC_VERSION VERSION_LESS 1400 AND MSVC_VERSION VERSION_LESS 1500)
-        set(${result} 8 PARENT_SCOPE)
-    elseif(NOT MSVC_VERSION VERSION_LESS 1500 AND MSVC_VERSION VERSION_LESS 1600)
-        set(${result} 9 PARENT_SCOPE)
-    elseif(NOT MSVC_VERSION VERSION_LESS 1600 AND MSVC_VERSION VERSION_LESS 1700)
-        set(${result} 10 PARENT_SCOPE)
-    elseif(NOT MSVC_VERSION VERSION_LESS 1700 AND MSVC_VERSION VERSION_LESS 1800)
-        set(${result} 11 PARENT_SCOPE)
-    elseif(NOT MSVC_VERSION VERSION_LESS 1800 AND MSVC_VERSION VERSION_LESS 1900)
-        set(${result} 12 PARENT_SCOPE)
-    elseif(NOT MSVC_VERSION VERSION_LESS 1900 AND MSVC_VERSION VERSION_LESS 1910)
-        set(${result} 14 PARENT_SCOPE)
-    elseif(NOT MSVC_VERSION VERSION_LESS 1910 AND MSVC_VERSION VERSION_LESS 1920)
-        set(${result} 15 PARENT_SCOPE)
-    elseif(NOT MSVC_VERSION VERSION_LESS 1920 AND MSVC_VERSION VERSION_LESS 1930)
-        set(${result} 16 PARENT_SCOPE)
-    else()
-        message(FATAL_ERROR "Conan: Unknown MSVC compiler version [${MSVC_VERSION}]")
-    endif()
-endfunction()
-
-macro(_conan_detect_build_type)
-    conan_parse_arguments(${ARGV})
-
-    if(ARGUMENTS_BUILD_TYPE)
-        set(_CONAN_SETTING_BUILD_TYPE ${ARGUMENTS_BUILD_TYPE})
-    elseif(CMAKE_BUILD_TYPE)
-        set(_CONAN_SETTING_BUILD_TYPE ${CMAKE_BUILD_TYPE})
-    else()
-        message(FATAL_ERROR "Please specify in command line CMAKE_BUILD_TYPE (-DCMAKE_BUILD_TYPE=Release)")
-    endif()
-
-    string(TOUPPER ${_CONAN_SETTING_BUILD_TYPE} _CONAN_SETTING_BUILD_TYPE_UPPER)
-    if (_CONAN_SETTING_BUILD_TYPE_UPPER STREQUAL "DEBUG")
-        set(_CONAN_SETTING_BUILD_TYPE "Debug")
-    elseif(_CONAN_SETTING_BUILD_TYPE_UPPER STREQUAL "RELEASE")
-        set(_CONAN_SETTING_BUILD_TYPE "Release")
-    elseif(_CONAN_SETTING_BUILD_TYPE_UPPER STREQUAL "RELWITHDEBINFO")
-        set(_CONAN_SETTING_BUILD_TYPE "RelWithDebInfo")
-    elseif(_CONAN_SETTING_BUILD_TYPE_UPPER STREQUAL "MINSIZEREL")
-        set(_CONAN_SETTING_BUILD_TYPE "MinSizeRel")
-    endif()
-endmacro()
-
-macro(_conan_check_system_name)
-    #handle -s os setting
-    if(CMAKE_SYSTEM_NAME AND NOT CMAKE_SYSTEM_NAME STREQUAL "Generic")
-        #use default conan os setting if CMAKE_SYSTEM_NAME is not defined
-        set(CONAN_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
-        if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
-            set(CONAN_SYSTEM_NAME Macos)
-        endif()
-        if(${CMAKE_SYSTEM_NAME} STREQUAL "QNX")
-            set(CONAN_SYSTEM_NAME Neutrino)
-        endif()
-        set(CONAN_SUPPORTED_PLATFORMS Windows Linux Macos Android iOS FreeBSD WindowsStore WindowsCE watchOS tvOS FreeBSD SunOS AIX Arduino Emscripten Neutrino)
-        list (FIND CONAN_SUPPORTED_PLATFORMS "${CONAN_SYSTEM_NAME}" _index)
-        if (${_index} GREATER -1)
-            #check if the cmake system is a conan supported one
-            set(_CONAN_SETTING_OS ${CONAN_SYSTEM_NAME})
-        else()
-            message(FATAL_ERROR "cmake system ${CONAN_SYSTEM_NAME} is not supported by conan. Use one of ${CONAN_SUPPORTED_PLATFORMS}")
-        endif()
-    endif()
-endmacro()
-
-macro(_conan_check_language)
-    get_property(_languages GLOBAL PROPERTY ENABLED_LANGUAGES)
-    if (";${_languages};" MATCHES ";CXX;")
-        set(LANGUAGE CXX)
-        set(USING_CXX 1)
-    elseif (";${_languages};" MATCHES ";C;")
-        set(LANGUAGE C)
-        set(USING_CXX 0)
-    else ()
-        message(FATAL_ERROR "Conan: Neither C or C++ was detected as a language for the project. Unabled to detect compiler version.")
-    endif()
-endmacro()
-
-macro(_conan_detect_compiler)
-
-    conan_parse_arguments(${ARGV})
-
-    if(ARGUMENTS_ARCH)
-        set(_CONAN_SETTING_ARCH ${ARGUMENTS_ARCH})
-    endif()
-
-    if (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL GNU)
-        # using GCC
-        # TODO: Handle other params
-        string(REPLACE "." ";" VERSION_LIST ${CMAKE_${LANGUAGE}_COMPILER_VERSION})
-        list(GET VERSION_LIST 0 MAJOR)
-        list(GET VERSION_LIST 1 MINOR)
-        set(COMPILER_VERSION ${MAJOR}.${MINOR})
-        if(${MAJOR} GREATER 4)
-            set(COMPILER_VERSION ${MAJOR})
-        endif()
-        set(_CONAN_SETTING_COMPILER gcc)
-        set(_CONAN_SETTING_COMPILER_VERSION ${COMPILER_VERSION})
-        if (USING_CXX)
-            conan_cmake_detect_unix_libcxx(_LIBCXX)
-            set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX})
-        endif ()
-    elseif (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL Intel)
-        string(REPLACE "." ";" VERSION_LIST ${CMAKE_${LANGUAGE}_COMPILER_VERSION})
-        list(GET VERSION_LIST 0 MAJOR)
-        list(GET VERSION_LIST 1 MINOR)
-        set(COMPILER_VERSION ${MAJOR}.${MINOR})
-        set(_CONAN_SETTING_COMPILER intel)
-        set(_CONAN_SETTING_COMPILER_VERSION ${COMPILER_VERSION})
-        if (USING_CXX)
-            conan_cmake_detect_unix_libcxx(_LIBCXX)
-            set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX})
-        endif ()
-    elseif (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL AppleClang)
-        # using AppleClang
-        string(REPLACE "." ";" VERSION_LIST ${CMAKE_${LANGUAGE}_COMPILER_VERSION})
-        list(GET VERSION_LIST 0 MAJOR)
-        list(GET VERSION_LIST 1 MINOR)
-        set(_CONAN_SETTING_COMPILER apple-clang)
-        set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR}.${MINOR})
-        if (USING_CXX)
-            conan_cmake_detect_unix_libcxx(_LIBCXX)
-            set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX})
-        endif ()
-    elseif (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL Clang)
-        string(REPLACE "." ";" VERSION_LIST ${CMAKE_${LANGUAGE}_COMPILER_VERSION})
-        list(GET VERSION_LIST 0 MAJOR)
-        list(GET VERSION_LIST 1 MINOR)
-        set(_CONAN_SETTING_COMPILER clang)
-        set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR}.${MINOR})
-        if(APPLE)
-            cmake_policy(GET CMP0025 APPLE_CLANG_POLICY)
-            if(NOT APPLE_CLANG_POLICY STREQUAL NEW)
-                message(STATUS "Conan: APPLE and Clang detected. Assuming apple-clang compiler. Set CMP0025 to avoid it")
-                set(_CONAN_SETTING_COMPILER apple-clang)
-            endif()
-        endif()
-        if(${_CONAN_SETTING_COMPILER} STREQUAL clang AND ${MAJOR} GREATER 7)
-            set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR})
-        endif()
-        if (USING_CXX)
-            conan_cmake_detect_unix_libcxx(_LIBCXX)
-            set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX})
-        endif ()
-    elseif(${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL MSVC)
-        set(_VISUAL "Visual Studio")
-        _get_msvc_ide_version(_VISUAL_VERSION)
-        if("${_VISUAL_VERSION}" STREQUAL "")
-            message(FATAL_ERROR "Conan: Visual Studio not recognized")
-        else()
-            set(_CONAN_SETTING_COMPILER ${_VISUAL})
-            set(_CONAN_SETTING_COMPILER_VERSION ${_VISUAL_VERSION})
-        endif()
-
-        if(NOT _CONAN_SETTING_ARCH)
-            if (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "64")
-                set(_CONAN_SETTING_ARCH x86_64)
-            elseif (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "^ARM")
-                message(STATUS "Conan: Using default ARM architecture from MSVC")
-                set(_CONAN_SETTING_ARCH armv6)
-            elseif (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "86")
-                set(_CONAN_SETTING_ARCH x86)
-            else ()
-                message(FATAL_ERROR "Conan: Unknown MSVC architecture [${MSVC_${LANGUAGE}_ARCHITECTURE_ID}]")
-            endif()
-        endif()
-
-        conan_cmake_detect_vs_runtime(_vs_runtime ${ARGV})
-        message(STATUS "Conan: Detected VS runtime: ${_vs_runtime}")
-        set(_CONAN_SETTING_COMPILER_RUNTIME ${_vs_runtime})
-
-        if (CMAKE_GENERATOR_TOOLSET)
-            set(_CONAN_SETTING_COMPILER_TOOLSET ${CMAKE_VS_PLATFORM_TOOLSET})
-        elseif(CMAKE_VS_PLATFORM_TOOLSET AND (CMAKE_GENERATOR STREQUAL "Ninja"))
-            set(_CONAN_SETTING_COMPILER_TOOLSET ${CMAKE_VS_PLATFORM_TOOLSET})
-        endif()
-        else()
-        message(FATAL_ERROR "Conan: compiler setup not recognized")
-    endif()
-
-endmacro()
-
-function(conan_cmake_settings result)
-    #message(STATUS "COMPILER " ${CMAKE_CXX_COMPILER})
-    #message(STATUS "COMPILER " ${CMAKE_CXX_COMPILER_ID})
-    #message(STATUS "VERSION " ${CMAKE_CXX_COMPILER_VERSION})
-    #message(STATUS "FLAGS " ${CMAKE_LANG_FLAGS})
-    #message(STATUS "LIB ARCH " ${CMAKE_CXX_LIBRARY_ARCHITECTURE})
-    #message(STATUS "BUILD TYPE " ${CMAKE_BUILD_TYPE})
-    #message(STATUS "GENERATOR " ${CMAKE_GENERATOR})
-    #message(STATUS "GENERATOR WIN64 " ${CMAKE_CL_64})
-
-    message(STATUS "Conan: Automatic detection of conan settings from cmake")
-
-    conan_parse_arguments(${ARGV})
-
-    _conan_detect_build_type(${ARGV})
-
-    _conan_check_system_name()
-
-    _conan_check_language()
-
-    _conan_detect_compiler(${ARGV})
-
-    # If profile is defined it is used
-    if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND ARGUMENTS_DEBUG_PROFILE)
-        set(_APPLIED_PROFILES ${ARGUMENTS_DEBUG_PROFILE})
-    elseif(CMAKE_BUILD_TYPE STREQUAL "Release" AND ARGUMENTS_RELEASE_PROFILE)
-        set(_APPLIED_PROFILES ${ARGUMENTS_RELEASE_PROFILE})
-    elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" AND ARGUMENTS_RELWITHDEBINFO_PROFILE)
-        set(_APPLIED_PROFILES ${ARGUMENTS_RELWITHDEBINFO_PROFILE})
-    elseif(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel" AND ARGUMENTS_MINSIZEREL_PROFILE)
-        set(_APPLIED_PROFILES ${ARGUMENTS_MINSIZEREL_PROFILE})
-    elseif(ARGUMENTS_PROFILE)
-        set(_APPLIED_PROFILES ${ARGUMENTS_PROFILE})
-    endif()
-
-    foreach(ARG ${_APPLIED_PROFILES})
-        set(_SETTINGS ${_SETTINGS} -pr=${ARG})
-    endforeach()
-    foreach(ARG ${ARGUMENTS_PROFILE_BUILD})
-        conan_check(VERSION 1.24.0 REQUIRED DETECT_QUIET)
-        set(_SETTINGS ${_SETTINGS} -pr:b=${ARG})
-    endforeach()
-
-    if(NOT _SETTINGS OR ARGUMENTS_PROFILE_AUTO STREQUAL "ALL")
-        set(ARGUMENTS_PROFILE_AUTO arch build_type compiler compiler.version
-                                   compiler.runtime compiler.libcxx compiler.toolset)
-    endif()
-
-    # remove any manually specified settings from the autodetected settings
-    foreach(ARG ${ARGUMENTS_SETTINGS})
-        string(REGEX MATCH "[^=]*" MANUAL_SETTING "${ARG}")
-        message(STATUS "Conan: ${MANUAL_SETTING} was added as an argument. Not using the autodetected one.")
-        list(REMOVE_ITEM ARGUMENTS_PROFILE_AUTO "${MANUAL_SETTING}")
-    endforeach()
-
-    # Automatic from CMake
-    foreach(ARG ${ARGUMENTS_PROFILE_AUTO})
-        string(TOUPPER ${ARG} _arg_name)
-        string(REPLACE "." "_" _arg_name ${_arg_name})
-        if(_CONAN_SETTING_${_arg_name})
-            set(_SETTINGS ${_SETTINGS} -s ${ARG}=${_CONAN_SETTING_${_arg_name}})
-        endif()
-    endforeach()
-
-    foreach(ARG ${ARGUMENTS_SETTINGS})
-        set(_SETTINGS ${_SETTINGS} -s ${ARG})
-    endforeach()
-
-    message(STATUS "Conan: Settings= ${_SETTINGS}")
-
-    set(${result} ${_SETTINGS} PARENT_SCOPE)
-endfunction()
-
-
-function(conan_cmake_detect_unix_libcxx result)
-    # Take into account any -stdlib in compile options
-    get_directory_property(compile_options DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_OPTIONS)
-    string(GENEX_STRIP "${compile_options}" compile_options)
-
-    # Take into account any _GLIBCXX_USE_CXX11_ABI in compile definitions
-    get_directory_property(defines DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS)
-    string(GENEX_STRIP "${defines}" defines)
-
-    foreach(define ${defines})
-        if(define MATCHES "_GLIBCXX_USE_CXX11_ABI")
-            if(define MATCHES "^-D")
-                set(compile_options ${compile_options} "${define}")
-            else()
-                set(compile_options ${compile_options} "-D${define}")
-            endif()
-        endif()
-    endforeach()
-
-    # add additional compiler options ala cmRulePlaceholderExpander::ExpandRuleVariable
-    set(EXPAND_CXX_COMPILER ${CMAKE_CXX_COMPILER})
-    if(CMAKE_CXX_COMPILER_ARG1)
-        # CMake splits CXX="foo bar baz" into CMAKE_CXX_COMPILER="foo", CMAKE_CXX_COMPILER_ARG1="bar baz"
-        # without this, ccache, winegcc, or other wrappers might lose all their arguments
-        separate_arguments(SPLIT_CXX_COMPILER_ARG1 NATIVE_COMMAND ${CMAKE_CXX_COMPILER_ARG1})
-        list(APPEND EXPAND_CXX_COMPILER ${SPLIT_CXX_COMPILER_ARG1})
-    endif()
-
-    if(CMAKE_CXX_COMPILE_OPTIONS_TARGET AND CMAKE_CXX_COMPILER_TARGET)
-        # without --target= we may be calling the wrong underlying GCC
-        list(APPEND EXPAND_CXX_COMPILER "${CMAKE_CXX_COMPILE_OPTIONS_TARGET}${CMAKE_CXX_COMPILER_TARGET}")
-    endif()
-
-    if(CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN AND CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN)
-        list(APPEND EXPAND_CXX_COMPILER "${CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}")
-    endif()
-
-    if(CMAKE_CXX_COMPILE_OPTIONS_SYSROOT)
-        # without --sysroot= we may find the wrong #include <string>
-        if(CMAKE_SYSROOT_COMPILE)
-            list(APPEND EXPAND_CXX_COMPILER "${CMAKE_CXX_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT_COMPILE}")
-        elseif(CMAKE_SYSROOT)
-            list(APPEND EXPAND_CXX_COMPILER "${CMAKE_CXX_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}")
-        endif()
-    endif()
-
-    separate_arguments(SPLIT_CXX_FLAGS NATIVE_COMMAND ${CMAKE_CXX_FLAGS})
-
-    if(CMAKE_OSX_SYSROOT)
-        set(xcode_sysroot_option "--sysroot=${CMAKE_OSX_SYSROOT}")
-    endif()
-
-    execute_process(
-        COMMAND ${CMAKE_COMMAND} -E echo "#include <string>"
-        COMMAND ${EXPAND_CXX_COMPILER} ${SPLIT_CXX_FLAGS} -x c++ ${xcode_sysroot_option} ${compile_options} -E -dM -
-        OUTPUT_VARIABLE string_defines
-    )
-
-    if(string_defines MATCHES "#define __GLIBCXX__")
-        # Allow -D_GLIBCXX_USE_CXX11_ABI=ON/OFF as argument to cmake
-        if(DEFINED _GLIBCXX_USE_CXX11_ABI)
-            if(_GLIBCXX_USE_CXX11_ABI)
-                set(${result} libstdc++11 PARENT_SCOPE)
-                return()
-            else()
-                set(${result} libstdc++ PARENT_SCOPE)
-                return()
-            endif()
-        endif()
-
-        if(string_defines MATCHES "#define _GLIBCXX_USE_CXX11_ABI 1\n")
-            set(${result} libstdc++11 PARENT_SCOPE)
-        else()
-            # Either the compiler is missing the define because it is old, and so
-            # it can't use the new abi, or the compiler was configured to use the
-            # old abi by the user or distro (e.g. devtoolset on RHEL/CentOS)
-            set(${result} libstdc++ PARENT_SCOPE)
-        endif()
-    else()
-        set(${result} libc++ PARENT_SCOPE)
-    endif()
-endfunction()
-
-function(conan_cmake_detect_vs_runtime result)
-
-    conan_parse_arguments(${ARGV})
-    if(ARGUMENTS_BUILD_TYPE)
-        set(build_type "${ARGUMENTS_BUILD_TYPE}")
-    elseif(CMAKE_BUILD_TYPE)
-        set(build_type "${CMAKE_BUILD_TYPE}")
-    else()
-        message(FATAL_ERROR "Please specify in command line CMAKE_BUILD_TYPE (-DCMAKE_BUILD_TYPE=Release)")
-    endif()
-
-    if(build_type)
-        string(TOUPPER "${build_type}" build_type)
-    endif()
-    set(variables CMAKE_CXX_FLAGS_${build_type} CMAKE_C_FLAGS_${build_type} CMAKE_CXX_FLAGS CMAKE_C_FLAGS)
-    foreach(variable ${variables})
-        if(NOT "${${variable}}" STREQUAL "")
-            string(REPLACE " " ";" flags "${${variable}}")
-            foreach (flag ${flags})
-                if("${flag}" STREQUAL "/MD" OR "${flag}" STREQUAL "/MDd" OR "${flag}" STREQUAL "/MT" OR "${flag}" STREQUAL "/MTd")
-                    string(SUBSTRING "${flag}" 1 -1 runtime)
-                    set(${result} "${runtime}" PARENT_SCOPE)
-                    return()
-                endif()
-            endforeach()
-        endif()
-    endforeach()
-    if("${build_type}" STREQUAL "DEBUG")
-        set(${result} "MDd" PARENT_SCOPE)
-    else()
-        set(${result} "MD" PARENT_SCOPE)
-    endif()
-endfunction()
-
-function(_collect_settings result)
-    set(ARGUMENTS_PROFILE_AUTO arch build_type compiler compiler.version
-                            compiler.runtime compiler.libcxx compiler.toolset)
-    foreach(ARG ${ARGUMENTS_PROFILE_AUTO})
-        string(TOUPPER ${ARG} _arg_name)
-        string(REPLACE "." "_" _arg_name ${_arg_name})
-        if(_CONAN_SETTING_${_arg_name})
-            set(detected_setings ${detected_setings} ${ARG}=${_CONAN_SETTING_${_arg_name}})
-        endif()
-    endforeach()
-    set(${result} ${detected_setings} PARENT_SCOPE)
-endfunction()
-
-function(conan_cmake_autodetect detected_settings ${ARGV})
-    _conan_detect_build_type(${ARGV})
-    _conan_check_system_name()
-    _conan_check_language()
-    _conan_detect_compiler(${ARGV})
-    _collect_settings(collected_settings)
-    set(${detected_settings} ${collected_settings} PARENT_SCOPE)
-endfunction()
-
-macro(conan_parse_arguments)
-  set(options BASIC_SETUP CMAKE_TARGETS UPDATE KEEP_RPATHS NO_LOAD NO_OUTPUT_DIRS OUTPUT_QUIET NO_IMPORTS SKIP_STD)
-  set(oneValueArgs CONANFILE  ARCH BUILD_TYPE INSTALL_FOLDER CONAN_COMMAND)
-  set(multiValueArgs DEBUG_PROFILE RELEASE_PROFILE RELWITHDEBINFO_PROFILE MINSIZEREL_PROFILE
-                     PROFILE REQUIRES OPTIONS IMPORTS SETTINGS BUILD ENV GENERATORS PROFILE_AUTO
-                     INSTALL_ARGS CONFIGURATION_TYPES PROFILE_BUILD BUILD_REQUIRES)
-  cmake_parse_arguments(ARGUMENTS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-endmacro()
-
-function(old_conan_cmake_install)
-    # Calls "conan install"
-    # Argument BUILD is equivalant to --build={missing, PkgName,...} or
-    # --build when argument is 'BUILD all' (which builds all packages from source)
-    # Argument CONAN_COMMAND, to specify the conan path, e.g. in case of running from source
-    # cmake does not identify conan as command, even if it is +x and it is in the path
-    conan_parse_arguments(${ARGV})
-
-    if(CONAN_CMAKE_MULTI)
-        set(ARGUMENTS_GENERATORS ${ARGUMENTS_GENERATORS} cmake_multi)
-    else()
-        set(ARGUMENTS_GENERATORS ${ARGUMENTS_GENERATORS} cmake)
-    endif()
-
-    set(CONAN_BUILD_POLICY "")
-    foreach(ARG ${ARGUMENTS_BUILD})
-        if(${ARG} STREQUAL "all")
-            set(CONAN_BUILD_POLICY ${CONAN_BUILD_POLICY} --build)
-            break()
-        else()
-            set(CONAN_BUILD_POLICY ${CONAN_BUILD_POLICY} --build=${ARG})
-        endif()
-    endforeach()
-    if(ARGUMENTS_CONAN_COMMAND)
-       set(CONAN_CMD ${ARGUMENTS_CONAN_COMMAND})
-    else()
-        conan_check(REQUIRED)
-    endif()
-    set(CONAN_OPTIONS "")
-    if(ARGUMENTS_CONANFILE)
-      if(IS_ABSOLUTE ${ARGUMENTS_CONANFILE})
-          set(CONANFILE ${ARGUMENTS_CONANFILE})
-      else()
-          set(CONANFILE ${CMAKE_CURRENT_SOURCE_DIR}/${ARGUMENTS_CONANFILE})
-      endif()
-    else()
-      set(CONANFILE ".")
-    endif()
-    foreach(ARG ${ARGUMENTS_OPTIONS})
-      set(CONAN_OPTIONS ${CONAN_OPTIONS} -o=${ARG})
-    endforeach()
-    if(ARGUMENTS_UPDATE)
-      set(CONAN_INSTALL_UPDATE --update)
-    endif()
-    if(ARGUMENTS_NO_IMPORTS)
-      set(CONAN_INSTALL_NO_IMPORTS --no-imports)
-    endif()
-    set(CONAN_INSTALL_FOLDER "")
-    if(ARGUMENTS_INSTALL_FOLDER)
-      set(CONAN_INSTALL_FOLDER -if=${ARGUMENTS_INSTALL_FOLDER})
-    endif()
-    foreach(ARG ${ARGUMENTS_GENERATORS})
-        set(CONAN_GENERATORS ${CONAN_GENERATORS} -g=${ARG})
-    endforeach()
-    foreach(ARG ${ARGUMENTS_ENV})
-        set(CONAN_ENV_VARS ${CONAN_ENV_VARS} -e=${ARG})
-    endforeach()
-    set(conan_args install ${CONANFILE} ${settings} ${CONAN_ENV_VARS} ${CONAN_GENERATORS} ${CONAN_BUILD_POLICY} ${CONAN_INSTALL_UPDATE} ${CONAN_INSTALL_NO_IMPORTS} ${CONAN_OPTIONS} ${CONAN_INSTALL_FOLDER} ${ARGUMENTS_INSTALL_ARGS})
-
-    string (REPLACE ";" " " _conan_args "${conan_args}")
-    message(STATUS "Conan executing: ${CONAN_CMD} ${_conan_args}")
-
-    if(ARGUMENTS_OUTPUT_QUIET)
-        execute_process(COMMAND ${CONAN_CMD} ${conan_args}
-                        RESULT_VARIABLE return_code
-                        OUTPUT_VARIABLE conan_output
-                        ERROR_VARIABLE conan_output
-                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
-    else()
-        execute_process(COMMAND ${CONAN_CMD} ${conan_args}
-                        RESULT_VARIABLE return_code
-                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
-    endif()
-
-    if(NOT "${return_code}" STREQUAL "0")
-      message(FATAL_ERROR "Conan install failed='${return_code}'")
-    endif()
-
-endfunction()
-
-function(conan_cmake_install)
-    if(DEFINED CONAN_COMMAND)
-        set(CONAN_CMD ${CONAN_COMMAND})
-    else()
-        conan_check(REQUIRED)
-    endif()
-
-    set(installOptions UPDATE NO_IMPORTS OUTPUT_QUIET ERROR_QUIET)
-    set(installOneValueArgs PATH_OR_REFERENCE REFERENCE REMOTE LOCKFILE LOCKFILE_OUT LOCKFILE_NODE_ID INSTALL_FOLDER)
-    set(installMultiValueArgs GENERATOR BUILD ENV ENV_HOST ENV_BUILD OPTIONS_HOST OPTIONS OPTIONS_BUILD PROFILE
-                              PROFILE_HOST PROFILE_BUILD SETTINGS SETTINGS_HOST SETTINGS_BUILD)
-    cmake_parse_arguments(ARGS "${installOptions}" "${installOneValueArgs}" "${installMultiValueArgs}" ${ARGN})
-    foreach(arg ${installOptions})
-        if(ARGS_${arg})
-            set(${arg} ${${arg}} ${ARGS_${arg}})
-        endif()
-    endforeach()
-    foreach(arg ${installOneValueArgs})
-        if(DEFINED ARGS_${arg})
-            if("${arg}" STREQUAL "REMOTE")
-                set(flag "--remote")
-            elseif("${arg}" STREQUAL "LOCKFILE")
-                set(flag "--lockfile")
-            elseif("${arg}" STREQUAL "LOCKFILE_OUT")
-                set(flag "--lockfile-out")
-            elseif("${arg}" STREQUAL "LOCKFILE_NODE_ID")
-                set(flag "--lockfile-node-id")
-            elseif("${arg}" STREQUAL "INSTALL_FOLDER")
-                set(flag "--install-folder")
-            endif()
-            set(${arg} ${${arg}} ${flag} ${ARGS_${arg}})
-        endif()
-    endforeach()
-    foreach(arg ${installMultiValueArgs})
-        if(DEFINED ARGS_${arg})
-            if("${arg}" STREQUAL "GENERATOR")
-                set(flag "--generator")
-            elseif("${arg}" STREQUAL "BUILD")
-                set(flag "--build")
-            elseif("${arg}" STREQUAL "ENV")
-                set(flag "--env")
-            elseif("${arg}" STREQUAL "ENV_HOST")
-                set(flag "--env:host")
-            elseif("${arg}" STREQUAL "ENV_BUILD")
-                set(flag "--env:build")
-            elseif("${arg}" STREQUAL "OPTIONS")
-                set(flag "--options")
-            elseif("${arg}" STREQUAL "OPTIONS_HOST")
-                set(flag "--options:host")
-            elseif("${arg}" STREQUAL "OPTIONS_BUILD")
-                set(flag "--options:build")
-            elseif("${arg}" STREQUAL "PROFILE")
-                set(flag "--profile")
-            elseif("${arg}" STREQUAL "PROFILE_HOST")
-                set(flag "--profile:host")
-            elseif("${arg}" STREQUAL "PROFILE_BUILD")
-                set(flag "--profile:build")
-            elseif("${arg}" STREQUAL "SETTINGS")
-                set(flag "--settings")
-            elseif("${arg}" STREQUAL "SETTINGS_HOST")
-                set(flag "--settings:host")
-            elseif("${arg}" STREQUAL "SETTINGS_BUILD")
-                set(flag "--settings:build")
-            endif()
-            list(LENGTH ARGS_${arg} numargs)
-            foreach(item ${ARGS_${arg}})
-                if(${item} STREQUAL "all" AND ${arg} STREQUAL "BUILD")
-                    set(${arg} "--build")
-                    break()
-                endif()
-                set(${arg} ${${arg}} ${flag} ${item})
-            endforeach()
-        endif()
-    endforeach()
-    if(DEFINED UPDATE)
-        set(UPDATE --update)
-    endif()
-    if(DEFINED NO_IMPORTS)
-        set(NO_IMPORTS --no-imports)
-    endif()
-    set(install_args install ${PATH_OR_REFERENCE} ${REFERENCE} ${UPDATE} ${NO_IMPORTS} ${REMOTE} ${LOCKFILE} ${LOCKFILE_OUT} ${LOCKFILE_NODE_ID} ${INSTALL_FOLDER}
-                                ${GENERATOR} ${BUILD} ${ENV} ${ENV_HOST} ${ENV_BUILD} ${OPTIONS} ${OPTIONS_HOST} ${OPTIONS_BUILD}
-                                ${PROFILE} ${PROFILE_HOST} ${PROFILE_BUILD} ${SETTINGS} ${SETTINGS_HOST} ${SETTINGS_BUILD})
-
-    string(REPLACE ";" " " _install_args "${install_args}")
-    message(STATUS "Conan executing: ${CONAN_CMD} ${_install_args}")
-
-    if(ARGS_OUTPUT_QUIET)
-      set(OUTPUT_OPT OUTPUT_QUIET)
-    endif()
-    if(ARGS_ERROR_QUIET)
-      set(ERROR_OPT ERROR_QUIET)
-    endif()
-
-    execute_process(COMMAND ${CONAN_CMD} ${install_args}
-                    RESULT_VARIABLE return_code
-                    ${OUTPUT_OPT}
-                    ${ERROR_OPT}
-                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
-
-    if(NOT "${return_code}" STREQUAL "0")
-        if (ARGS_ERROR_QUIET)
-            message(WARNING "Conan install failed='${return_code}'")
-        else()
-            message(FATAL_ERROR "Conan install failed='${return_code}'")
-        endif()
-    endif()
-
-endfunction()
-
-function(conan_cmake_setup_conanfile)
-  conan_parse_arguments(${ARGV})
-  if(ARGUMENTS_CONANFILE)
-    get_filename_component(_CONANFILE_NAME ${ARGUMENTS_CONANFILE} NAME)
-    # configure_file will make sure cmake re-runs when conanfile is updated
-    configure_file(${ARGUMENTS_CONANFILE} ${CMAKE_CURRENT_BINARY_DIR}/${_CONANFILE_NAME}.junk COPYONLY)
-    file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${_CONANFILE_NAME}.junk)
-  else()
-    conan_cmake_generate_conanfile(ON ${ARGV})
-  endif()
-endfunction()
-
-function(conan_cmake_configure)
-    conan_cmake_generate_conanfile(OFF ${ARGV})
-endfunction()
-
-# Generate, writing in disk a conanfile.txt with the requires, options, and imports
-# specified as arguments
-# This will be considered as temporary file, generated in CMAKE_CURRENT_BINARY_DIR)
-function(conan_cmake_generate_conanfile DEFAULT_GENERATOR)
-
-    conan_parse_arguments(${ARGV})
-
-    set(_FN "${CMAKE_CURRENT_BINARY_DIR}/conanfile.txt")
-    file(WRITE ${_FN} "")
-
-    if(DEFINED ARGUMENTS_REQUIRES)
-        file(APPEND ${_FN} "[requires]\n")
-        foreach(REQUIRE ${ARGUMENTS_REQUIRES})
-            file(APPEND ${_FN} ${REQUIRE} "\n")
-        endforeach()
-    endif()
-
-    if (DEFAULT_GENERATOR OR DEFINED ARGUMENTS_GENERATORS)
-        file(APPEND ${_FN} "[generators]\n")
-        if (DEFAULT_GENERATOR)
-            file(APPEND ${_FN} "cmake\n")
-        endif()
-        if (DEFINED ARGUMENTS_GENERATORS)
-            foreach(GENERATOR ${ARGUMENTS_GENERATORS})
-                file(APPEND ${_FN} ${GENERATOR} "\n")
-            endforeach()
-        endif()
-    endif()
-
-    if(DEFINED ARGUMENTS_BUILD_REQUIRES)
-        file(APPEND ${_FN} "[build_requires]\n")
-        foreach(BUILD_REQUIRE ${ARGUMENTS_BUILD_REQUIRES})
-            file(APPEND ${_FN} ${BUILD_REQUIRE} "\n")
-        endforeach()
-    endif()
-
-    if(DEFINED ARGUMENTS_IMPORTS)
-        file(APPEND ${_FN} "[imports]\n")
-        foreach(IMPORTS ${ARGUMENTS_IMPORTS})
-            file(APPEND ${_FN} ${IMPORTS} "\n")
-        endforeach()
-    endif()
-
-    if(DEFINED ARGUMENTS_OPTIONS)
-        file(APPEND ${_FN} "[options]\n")
-        foreach(OPTION ${ARGUMENTS_OPTIONS})
-            file(APPEND ${_FN} ${OPTION} "\n")
-        endforeach()
-    endif()
-
-endfunction()
-
-
-macro(conan_load_buildinfo)
-    if(CONAN_CMAKE_MULTI)
-      set(_CONANBUILDINFO conanbuildinfo_multi.cmake)
-    else()
-      set(_CONANBUILDINFO conanbuildinfo.cmake)
-    endif()
-    if(ARGUMENTS_INSTALL_FOLDER)
-        set(_CONANBUILDINFOFOLDER ${ARGUMENTS_INSTALL_FOLDER})
-    else()
-        set(_CONANBUILDINFOFOLDER ${CMAKE_CURRENT_BINARY_DIR})
-    endif()
-    # Checks for the existence of conanbuildinfo.cmake, and loads it
-    # important that it is macro, so variables defined at parent scope
-    if(EXISTS "${_CONANBUILDINFOFOLDER}/${_CONANBUILDINFO}")
-      message(STATUS "Conan: Loading ${_CONANBUILDINFO}")
-      include(${_CONANBUILDINFOFOLDER}/${_CONANBUILDINFO})
-    else()
-      message(FATAL_ERROR "${_CONANBUILDINFO} doesn't exist in ${CMAKE_CURRENT_BINARY_DIR}")
-    endif()
-endmacro()
-
-
-macro(conan_cmake_run)
-    conan_parse_arguments(${ARGV})
-
-    if(ARGUMENTS_CONFIGURATION_TYPES AND NOT CMAKE_CONFIGURATION_TYPES)
-        message(WARNING "CONFIGURATION_TYPES should only be specified for multi-configuration generators")
-    elseif(ARGUMENTS_CONFIGURATION_TYPES AND ARGUMENTS_BUILD_TYPE)
-        message(WARNING "CONFIGURATION_TYPES and BUILD_TYPE arguments should not be defined at the same time.")
-    endif()
-
-    if(CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE AND NOT CONAN_EXPORTED
-            AND NOT ARGUMENTS_BUILD_TYPE)
-        set(CONAN_CMAKE_MULTI ON)
-        if (NOT ARGUMENTS_CONFIGURATION_TYPES)
-            set(ARGUMENTS_CONFIGURATION_TYPES "Release;Debug")
-        endif()
-        message(STATUS "Conan: Using cmake-multi generator")
-    else()
-        set(CONAN_CMAKE_MULTI OFF)
-    endif()
-
-    if(NOT CONAN_EXPORTED)
-        conan_cmake_setup_conanfile(${ARGV})
-        if(CONAN_CMAKE_MULTI)
-            foreach(CMAKE_BUILD_TYPE ${ARGUMENTS_CONFIGURATION_TYPES})
-                set(ENV{CONAN_IMPORT_PATH} ${CMAKE_BUILD_TYPE})
-                conan_cmake_settings(settings ${ARGV})
-                old_conan_cmake_install(SETTINGS ${settings} ${ARGV})
-            endforeach()
-            set(CMAKE_BUILD_TYPE)
-        else()
-            conan_cmake_settings(settings ${ARGV})
-            old_conan_cmake_install(SETTINGS ${settings} ${ARGV})
-        endif()
-    endif()
-
-    if (NOT ARGUMENTS_NO_LOAD)
-      conan_load_buildinfo()
-    endif()
-
-    if(ARGUMENTS_BASIC_SETUP)
-        foreach(_option CMAKE_TARGETS KEEP_RPATHS NO_OUTPUT_DIRS SKIP_STD)
-            if(ARGUMENTS_${_option})
-                if(${_option} STREQUAL "CMAKE_TARGETS")
-                    list(APPEND _setup_options "TARGETS")
-                else()
-                    list(APPEND _setup_options ${_option})
-                endif()
-            endif()
-        endforeach()
-        conan_basic_setup(${_setup_options})
-    endif()
-endmacro()
-
-macro(conan_check)
-    # Checks conan availability in PATH
-    # Arguments REQUIRED, DETECT_QUIET and VERSION are optional
-    # Example usage:
-    #    conan_check(VERSION 1.0.0 REQUIRED)
-    set(options REQUIRED DETECT_QUIET)
-    set(oneValueArgs VERSION)
-    cmake_parse_arguments(CONAN "${options}" "${oneValueArgs}" "" ${ARGN})
-    if(NOT CONAN_DETECT_QUIET)
-        message(STATUS "Conan: checking conan executable")
-    endif()
-
-    find_program(CONAN_CMD conan)
-    if(NOT CONAN_CMD AND CONAN_REQUIRED)
-        message(FATAL_ERROR "Conan executable not found! Please install conan.")
-    endif()
-    if(NOT CONAN_DETECT_QUIET)
-        message(STATUS "Conan: Found program ${CONAN_CMD}")
-    endif()
-    execute_process(COMMAND ${CONAN_CMD} --version
-                    RESULT_VARIABLE return_code
-                    OUTPUT_VARIABLE CONAN_VERSION_OUTPUT
-                    ERROR_VARIABLE CONAN_VERSION_OUTPUT)
-
-    if(NOT "${return_code}" STREQUAL "0")
-      message(FATAL_ERROR "Conan --version failed='${return_code}'")
-    endif()
-
-    if(NOT CONAN_DETECT_QUIET)
-        string(STRIP "${CONAN_VERSION_OUTPUT}" _CONAN_VERSION_OUTPUT)
-        message(STATUS "Conan: Version found ${_CONAN_VERSION_OUTPUT}")
-    endif()
-
-    if(DEFINED CONAN_VERSION)
-        string(REGEX MATCH ".*Conan version ([0-9]+\\.[0-9]+\\.[0-9]+)" FOO
-            "${CONAN_VERSION_OUTPUT}")
-        if(${CMAKE_MATCH_1} VERSION_LESS ${CONAN_VERSION})
-            message(FATAL_ERROR "Conan outdated. Installed: ${CMAKE_MATCH_1}, \
-                required: ${CONAN_VERSION}. Consider updating via 'pip \
-                install conan==${CONAN_VERSION}'.")
-        endif()
-    endif()
-endmacro()
-
-function(conan_add_remote)
-    # Adds a remote
-    # Arguments URL and NAME are required, INDEX, COMMAND and VERIFY_SSL are optional
-    # Example usage:
-    #    conan_add_remote(NAME bincrafters INDEX 1
-    #       URL https://api.bintray.com/conan/bincrafters/public-conan
-    #       VERIFY_SSL True)
-    set(oneValueArgs URL NAME INDEX COMMAND VERIFY_SSL)
-    cmake_parse_arguments(CONAN "" "${oneValueArgs}" "" ${ARGN})
-
-    if(DEFINED CONAN_INDEX)
-        set(CONAN_INDEX_ARG "-i ${CONAN_INDEX}")
-    endif()
-    if(DEFINED CONAN_COMMAND)
-        set(CONAN_CMD ${CONAN_COMMAND})
-    else()
-        conan_check(REQUIRED DETECT_QUIET)
-    endif()
-    set(CONAN_VERIFY_SSL_ARG "True")
-    if(DEFINED CONAN_VERIFY_SSL)
-        set(CONAN_VERIFY_SSL_ARG ${CONAN_VERIFY_SSL})
-    endif()
-    message(STATUS "Conan: Adding ${CONAN_NAME} remote repository (${CONAN_URL}) verify ssl (${CONAN_VERIFY_SSL_ARG})")
-    execute_process(COMMAND ${CONAN_CMD} remote add ${CONAN_NAME} ${CONAN_INDEX_ARG} -f ${CONAN_URL} ${CONAN_VERIFY_SSL_ARG}
-                    RESULT_VARIABLE return_code)
-    if(NOT "${return_code}" STREQUAL "0")
-      message(FATAL_ERROR "Conan remote failed='${return_code}'")
-    endif()
-endfunction()
-
-macro(conan_config_install)
-    # install a full configuration from a local or remote zip file
-    # Argument ITEM is required, arguments TYPE, SOURCE, TARGET and VERIFY_SSL are optional
-    # Example usage:
-    #    conan_config_install(ITEM https://github.com/conan-io/cmake-conan.git
-    #       TYPE git SOURCE source-folder TARGET target-folder VERIFY_SSL false)
-    set(oneValueArgs ITEM TYPE SOURCE TARGET VERIFY_SSL)
-    set(multiValueArgs ARGS)
-    cmake_parse_arguments(CONAN "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-
-    find_program(CONAN_CMD conan)
-    if(NOT CONAN_CMD AND CONAN_REQUIRED)
-        message(FATAL_ERROR "Conan executable not found!")
-    endif()
-
-    if(DEFINED CONAN_VERIFY_SSL)
-	set(CONAN_VERIFY_SSL_ARG "--verify-ssl=${CONAN_VERIFY_SSL}")
-    endif()
-
-    if(DEFINED CONAN_TYPE)
-	set(CONAN_TYPE_ARG "--type=${CONAN_TYPE}")
-    endif()
-
-    if(DEFINED CONAN_ARGS)
-	set(CONAN_ARGS_ARGS "--args=\"${CONAN_ARGS}\"")
-    endif()
-
-    if(DEFINED CONAN_SOURCE)
-	set(CONAN_SOURCE_ARGS "--source-folder=${CONAN_SOURCE}")
-    endif()
-
-    if(DEFINED CONAN_TARGET)
-	set(CONAN_TARGET_ARGS "--target-folder=${CONAN_TARGET}")
-    endif()
-
-    set (CONAN_CONFIG_INSTALL_ARGS 	${CONAN_VERIFY_SSL_ARG}
-					${CONAN_TYPE_ARG}
-					${CONAN_ARGS_ARGS}
-					${CONAN_SOURCE_ARGS}
-					${CONAN_TARGET_ARGS})
-
-    message(STATUS "Conan: Installing config from ${CONAN_ITEM}")
-	execute_process(COMMAND ${CONAN_CMD} config install ${CONAN_ITEM} ${CONAN_CONFIG_INSTALL_ARGS}
-                  RESULT_VARIABLE return_code)
-  if(NOT "${return_code}" STREQUAL "0")
-    message(FATAL_ERROR "Conan config failed='${return_code}'")
-  endif()
-endmacro()


CMake: Fix minor spelling mistake

CMake: Fix minor spelling mistake

--- scripts/cmake/Modules/LibAddBinding.cmake
+++ scripts/cmake/Modules/LibAddBinding.cmake
@@ -173,7 +173,7 @@

 # ~~~
 # - Check if a binding will be built.
-#   Can only be used run after bindins have been processed (e.g. in
+#   Can only be used run after bindings have been processed (e.g. in
 #   ADDTESTING_PHASE of plugins)
 #   This is function can be used anywhere.
 #


Got coverage working for debug builds.

Got coverage working for debug builds.

--- common/cmake/CommonHeader.cmake
+++ common/cmake/CommonHeader.cmake
@@ -1,5 +1,7 @@
 set (CMAKE_CXX_STANDARD 11)
 set (CMAKE_CXX_STANDARD_REQUIRED TRUE)
+
+set (PROJECT_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../..)

 # adapted from
 # https://github.com/RLovelett/eigen/blob/master/CMakeLists.txt
@@ -22,8 +24,6 @@
 endif ()

-set (PROJECT_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../..)
-
 include_directories (${PROJECT_ROOT_DIR}/common/include)

 # Don't make any install rules
@@ -31,31 +31,26 @@

 include (CheckCXXCompilerFlag)
 if (MSVC)
-	foreach (i IN ITEMS /W4 /w44640)
-		message (STATUS "Checking compiler support for ${i}")
-		check_cxx_compiler_flag (${i} SUPPORTS_i)
+	list (APPEND COMPILER_FLAGS_TO_CHECK /W4 /w44640)
+else ()
+	list (APPEND COMPILER_FLAGS_TO_CHECK -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic)
+	if (cmake_build_type_tolower STREQUAL "debug")
+		list (APPEND COMPILER_FLAGS_TO_CHECK -g -O0 --coverage)
+		link_libraries (--coverage)
+	endif (cmake_build_type_tolower STREQUAL "debug")
+endif ()

-		if (SUPPORTS_i)
-			message (STATUS "Checking compiler support for ${i} - Success")
-			add_compile_options (${i})
-		else ()
-			message (STATUS "Checking compiler support for ${i} - Failed")
-		endif ()
-	endforeach ()
-else ()
-	foreach (i IN ITEMS -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic)
-		message (STATUS "Checking compiler support for ${i}")
-		check_cxx_compiler_flag (${i} SUPPORTS_i)
+foreach (i IN LISTS COMPILER_FLAGS_TO_CHECK)
+	message (STATUS "Checking compiler support for ${i}")
+	check_cxx_compiler_flag (${i} SUPPORTS_i)

-		if (SUPPORTS_i)
-			message (STATUS "Checking compiler support for ${i} - Success")
-			add_compile_options (${i})
-		else ()
-			message (STATUS "Checking compiler support for ${i} - Failed")
-		endif ()
-		unset (SUPPORTS_i)
-	endforeach ()
-endif ()
+	if (SUPPORTS_i)
+		message (STATUS "Checking compiler support for ${i} - Success")
+		add_compile_options (${i})
+	else ()
+		message (STATUS "Checking compiler support for ${i} - Failed")
+	endif ()
+endforeach ()

 find_package (OpenMP)
 if (OPENMP_FOUND)


correctly support building for AVX

correctly support building for AVX

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -142,8 +142,10 @@
          list(APPEND _enable_vector_unit_list "sse3")
          _my_find(_available_vector_units_list "ssse3" SSSE3_FOUND)
          _my_find(_available_vector_units_list "sse4a" SSE4a_FOUND)
+         _my_find(_available_vector_units_list "avx" AVX_FOUND)
          set(USE_SSSE3  ${SSSE3_FOUND}  CACHE BOOL "Use SSSE3. If SSSE3 instructions are not enabled they will be emulated.")
          set(USE_SSE4a  ${SSE4a_FOUND}  CACHE BOOL "Use SSE4a. If SSE4a instructions are not enabled they will be emulated.")
+         set(USE_AVX    ${AVX_FOUND}  CACHE BOOL "Use AVX. This will double some of the vector sizes relative to SSE.")
          if(USE_SSSE3)
             list(APPEND _enable_vector_unit_list "ssse3")
             _my_find(_available_vector_units_list "sse4.1" SSE4_1_FOUND)
@@ -168,6 +170,9 @@
          else(USE_SSE4a)
             list(APPEND _disable_vector_unit_list "sse4a")
          endif(USE_SSE4a)
+         if(USE_AVX)
+            list(APPEND _enable_vector_unit_list "avx")
+         endif(USE_AVX)
       else(USE_SSE3)
          list(APPEND _disable_vector_unit_list "sse3" "ssse3" "sse4.1" "sse4.2" "sse4a")
       endif(USE_SSE3)


Do not warn users about "broken" FMA4 and/or XOP

Even AMD processors use FMA3 these days, so on most CPUs
FMA4 is "broken". CPUs supporting XOP and FMA4 are mostly
obsolete.

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -459,13 +459,11 @@
       else()
          set(_avx_broken false)
          if(DEFINED Vc_FMA4_INTRINSICS_BROKEN AND Vc_FMA4_INTRINSICS_BROKEN)
-            UserWarning("FMA4 disabled per default because of old/broken toolchain")
             set(_fma4_broken true)
          else()
             set(_fma4_broken false)
          endif()
          if(DEFINED Vc_XOP_INTRINSICS_BROKEN AND Vc_XOP_INTRINSICS_BROKEN)
-            UserWarning("XOP disabled per default because of old/broken toolchain")
             set(_xop_broken true)
          else()
             set(_xop_broken false)


cmake: do not strip tar gz builds

cmake: do not strip tar gz builds

Signed-off-by: Luca Guerra <a05bd890c4868ea1807f8564055d1fba77c6ba81@guerra.sh>

--- cmake/cpack/CMakeCPackOptions.cmake
+++ cmake/cpack/CMakeCPackOptions.cmake
@@ -10,5 +10,4 @@

 if(CPACK_GENERATOR MATCHES "TGZ")
 	set(CPACK_SET_DESTDIR "ON")
-	set(CPACK_STRIP_FILES "OFF")
 endif()


STYLE: CLANGFORMAT_EXECUTABLE is an advanced feature

--- CMake/ITKClangFormatSetup.cmake
+++ CMake/ITKClangFormatSetup.cmake
@@ -48,6 +48,9 @@
   unset( CLANGFORMAT_DOWNLOAD_URL )
   set( CLANGFORMAT_EXECUTABLE "${ITK_BINARY_DIR}/clang-format-${CMAKE_SYSTEM_NAME}" CACHE FILEPATH "The binary for clang-format" FORCE)
 endif()
+if(CLANGFORMAT_EXECUTABLE)
+  mark_as_advanced(CLANGFORMAT_EXECUTABLE)
+endif()
 if ( ITK_USE_CLANGFORMAT AND NOT EXISTS "${CLANGFORMAT_EXECUTABLE}")
   message(FATAL_ERROR "Missing suitable clang-format executable, set CLANGFORMAT_EXECUTABLE variable to version 8.0")
   unset(CLANGFORMAT_EXECUTABLE)


[OS X] Remove unnecessary dependency lib copies. Resolves strange errors during CMake configuration.

--HG--
branch : v1-9

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -114,13 +114,6 @@
 		install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/release CONFIGURATIONS Release)
 		install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
 	  endif ()
-	elseif(APPLE)
-#        install(FILES
-#          ${OGRE_DEP_DIR}/lib/$(PLATFORM_NAME)/$(CONFIGURATION)/libOIS.a
-#          DESTINATION lib/$(PLATFORM_NAME)/$(CONFIGURATION)
-#        )
-      install_debug(libOIS.a)
-      install_release(libOIS.a)
 	endif ()
 	  endif ()

@@ -155,15 +148,6 @@
     if (OGRE_BUILD_RENDERSYSTEM_GLES2)
       install_debug(libGLESv2.dll)
 	  install_release(libEGL.dll)
-    endif ()
-  elseif(APPLE)
-    # copy the dependency libs to the right places
-    install_debug(libOIS.a)
-    install_release(libOIS.a)
-
-    if (OGRE_BUILD_PLUGIN_CG)
-      install_debug(Cg.framework)
-      install_release(Cg.framework)
     endif ()
   endif ()

@@ -284,16 +268,6 @@
       copy_release(libEGL.dll)
       copy_release(libGLESv2.dll)
     endif ()
-
-  elseif(APPLE AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
-    # copy the required libs and frameworks to the build directory (configure_file is the only copy-like op I found in CMake)
-    copy_debug(libOIS.a)
-    copy_release(libOIS.a)
-
-    if (OGRE_BUILD_PLUGIN_CG)
-      copy_debug(Cg.framework)
-      copy_release(Cg.framework)
-    endif ()
   endif ()

 endif ()


Cached resource files in plug-ins can now be specified with absolute path.

Relative paths are treated relative to the plug-ins source directory,
absolute paths will be converted to a relative path relative to the
plug-ins binary directory.

--- CMake/ctkMacroBuildPlugin.cmake
+++ CMake/ctkMacroBuildPlugin.cmake
@@ -194,7 +194,7 @@

   # Create translation files (.ts and .qm)
   SET(_plugin_qm_files )
-  SET(_plugin_relative_qm_files )
+  SET(_plugin_cached_resources_in_binary_tree )
   SET(_translations_dir "${CMAKE_CURRENT_BINARY_DIR}/CTK-INF/l10n")
   IF(MY_TRANSLATIONS)
     SET_SOURCE_FILES_PROPERTIES(${MY_TRANSLATIONS}
@@ -205,18 +205,31 @@
   IF(_plugin_qm_files)
     FOREACH(_qm_file ${_plugin_qm_files})
       FILE(RELATIVE_PATH _relative_qm_file ${CMAKE_CURRENT_BINARY_DIR} ${_qm_file})
-      LIST(APPEND _plugin_relative_qm_files ${_relative_qm_file})
+      LIST(APPEND _plugin_cached_resources_in_binary_tree ${_relative_qm_file})
     ENDFOREACH()
   ENDIF()

+  SET(_plugin_cached_resources_in_source_tree )
+  IF(MY_CACHED_RESOURCEFILES)
+    FOREACH(_cached_resource ${MY_CACHED_RESOURCEFILES})
+      IF(IS_ABSOLUTE "${_cached_resource}")
+        # create a path relative to the current binary dir
+        FILE(RELATIVE_PATH _relative_cached_resource ${CMAKE_CURRENT_BINARY_DIR} ${_cached_resource})
+        LIST(APPEND _plugin_cached_resources_in_binary_tree ${_relative_cached_resource})
+      ELSE()
+        LIST(APPEND _plugin_cached_resources_in_source_tree ${_cached_resource})
+      ENDIF()
+    ENDFOREACH()
+  ENDIF()
+
   # Add any other additional resource files
-  IF(MY_CACHED_RESOURCEFILES OR _plugin_relative_qm_files)
+  IF(_plugin_cached_resources_in_source_tree OR _plugin_cached_resources_in_binary_tree)
     STRING(REPLACE "." "_" _plugin_symbolicname ${Plugin-SymbolicName})
     ctkMacroGeneratePluginResourceFile(MY_QRC_SRCS
       NAME ${_plugin_symbolicname}_cached.qrc
       PREFIX ${Plugin-SymbolicName}
-      RESOURCES ${MY_CACHED_RESOURCEFILES}
-      BINARY_RESOURCES ${_plugin_relative_qm_files})
+      RESOURCES ${_plugin_cached_resources_in_source_tree}
+      BINARY_RESOURCES ${_plugin_cached_resources_in_binary_tree})
   ENDIF()

   SOURCE_GROUP("Resources" FILES


COMP: Change option -libdir into -prefix in CMakeExternals/QtMoblity.cmake

--- CMakeExternals/QtMobility.cmake
+++ CMakeExternals/QtMobility.cmake
@@ -42,11 +42,10 @@
   SET(qtmobility_install_cmd)
   IF(UNIX OR MINGW)
     SET(qtmobility_make_cmd make)
-	IF(MINGW AND NOT MSYS)
-	  SET(qtmobility_make_cmd mingw32-make)
-	ENDIF()
-
-    SET(qtmobility_config_args -${qtmobility_build_type} -libdir ${CTK_CMAKE_LIBRARY_OUTPUT_DIRECTORY} -no-docs -modules ${qtmobility_modules})
+	  IF(MINGW AND NOT MSYS)
+	    SET(qtmobility_make_cmd mingw32-make)
+	  ENDIF()
+    SET(qtmobility_config_args -${qtmobility_build_type} -prefix ${CTK_CMAKE_LIBRARY_OUTPUT_DIRECTORY} -no-docs -modules ${qtmobility_modules})
     SET(qtmobility_install_cmd ${qtmobility_make_cmd} install)
   ELSEIF(WIN32)
     SET(qtmobility_make_cmd nmake)


allow external projects to use glowwindow

--- glow-config.cmake
+++ glow-config.cmake
@@ -79,7 +79,7 @@

 find(glow ${LIB_PATHS})
 find(utils ${LIB_PATHS})
-#find(window ${LIB_PATHS})
+find(window ${LIB_PATHS})

 find_package_handle_standard_args(GLOW DEFAULT_MSG GLOW_LIBRARIES GLOW_INCLUDE_DIR)
 mark_as_advanced(GLOW_FOUND)


Install .cfg files when OGRE_INSTALL_SAMPLES_SOURCE is specified even if OGRE_INSTALL_SAMPLES (binaries) is false Needed for SDK

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -88,7 +88,7 @@
 configure_file(${OGRE_TEMPLATES_DIR}/samples.cfg.in ${OGRE_BINARY_DIR}/inst/bin/release/samples.cfg)

 # install resource files
-if (OGRE_INSTALL_SAMPLES OR OGRE_INSTALL_TOOLS)
+if (OGRE_INSTALL_SAMPLES OR OGRE_INSTALL_SAMPLES_SOURCE OR OGRE_INSTALL_TOOLS)
   install(FILES
     ${OGRE_BINARY_DIR}/inst/bin/debug/resources.cfg
     ${OGRE_BINARY_DIR}/inst/bin/debug/plugins.cfg
@@ -111,7 +111,7 @@
 	DESTINATION "bin${OGRE_MINSIZE_PATH}" CONFIGURATIONS MinSizeRel
   )
 endif ()
-if (OGRE_INSTALL_SAMPLES)
+if (OGRE_INSTALL_SAMPLES OR OGRE_INSTALL_SAMPLES_SOURCE)
   install(FILES
 	${OGRE_BINARY_DIR}/inst/bin/debug/samples.cfg
     ${OGRE_BINARY_DIR}/inst/bin/debug/media.cfg


Handle FILES_MATCHING parameter in MITK_INSTALL macro

--- CMake/mitkMacroInstall.cmake
+++ CMake/mitkMacroInstall.cmake
@@ -9,22 +9,37 @@
 macro(MITK_INSTALL)

   set(ARGS ${ARGN})
-
   set(install_directories "")
   list(FIND ARGS DESTINATION _destination_index)
-  # set(_install_DESTINATION "")
   if(_destination_index GREATER -1)
     message(SEND_ERROR "MITK_INSTALL macro must not be called with a DESTINATION parameter.")
-    ### This code was a try to replace a given DESTINATION
-    #math(EXPR _destination_index ${_destination_index} + 1)
-    #list(GET ARGS ${_destination_index} _install_DESTINATION)
-    #string(REGEX REPLACE ^bin "" _install_DESTINATION ${_install_DESTINATION})
   else()
+    # If there is a FILES_MATCHING parameter we need to make sure that the
+    # DESTINATION parameter is located in front of it.
+    set(ARGS1 "")
+    set(ARGS2 "")
+    list(FIND ARGS FILES_MATCHING _files_matching_index)
+    if(_files_matching_index GREATER -1)
+      set(_index "0")
+      list(LENGTH ARGS _count)
+      while(_index LESS _files_matching_index )
+        list(GET ARGS ${_index} _arg)
+        list(APPEND ARGS1 ${_arg})
+        math(EXPR _index "${_index}+1")
+      endwhile()
+      while(_index LESS _count)
+        list(GET ARGS ${_index} _arg)
+        list(APPEND ARGS2 ${_arg})
+        math(EXPR _index "${_index}+1")
+      endwhile()
+    else()
+      set(ARGS1 ${ARGS})
+    endif()
     if(NOT MACOSX_BUNDLE_NAMES)
-      install(${ARGS} DESTINATION bin/${_install_DESTINATION})
+      install(${ARGS1} DESTINATION bin/${_install_DESTINATION} ${ARGS2})
     else()
       foreach(bundle_name ${MACOSX_BUNDLE_NAMES})
-        install(${ARGS} DESTINATION ${bundle_name}.app/Contents/MacOS/${_install_DESTINATION})
+        install(${ARGS1} DESTINATION ${bundle_name}.app/Contents/MacOS/${_install_DESTINATION} ${ARGS2})
       endforeach()
     endif()
   endif()


COMP: depend on the target, not on the executable.

--- CMake/vtkWrapHierarchy.cmake
+++ CMake/vtkWrapHierarchy.cmake
@@ -100,7 +100,7 @@
     )

   # ugly but necessary
-  ADD_DEPENDENCIES(vtk${KIT} ${VTK_WRAP_HIERARCHY_EXE})
+  ADD_DEPENDENCIES(vtk${KIT} vtkWrapHierarchy)

   # make a dummy target so that items that depend on the heirarchy
   # file will rebuild when the file changes, but will not have to


Allow overriding CMAKE_INSTALL_PREFIX.

Allow overriding CMAKE_INSTALL_PREFIX.

Still results in ${CMAKE_INSTALL_PREFIX}/usr/bin/eosio*

--- CMakeModules/installer.cmake
+++ CMakeModules/installer.cmake
@@ -4,7 +4,9 @@

 set(CPACK_PACKAGE_CONTACT "support@block.one")
 set(CPACK_OUTPUT_FILE_PREFIX ${CMAKE_BINARY_DIR}/packages)
-set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install)
+if(NOT DEFINED CMAKE_INSTALL_PREFIX)
+  set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install)
+endif()

 SET(CPACK_PACKAGE_DIRECTORY "${CMAKE_INSTALL_PREFIX}")
 set(CPACK_PACKAGE_NAME "EOS.IO")


added missing file to files.cmake -> now compiles with windows

--- Modules/OpenIGTLink/files.cmake
+++ Modules/OpenIGTLink/files.cmake
@@ -3,6 +3,7 @@
   mitkIGTLServer.cpp
   mitkIGTLDevice.cpp
   mitkIGTLMessageSource.cpp
+  mitkIGTLMessageCommon.cpp
   mitkIGTLDeviceSource.cpp
   mitkIGTLMessage.cpp
   mitkIGTLMessageFactory.cpp
@@ -10,4 +11,4 @@
   mitkIGTLDummyMessage.cpp
   mitkIGTLMessageQueue.cpp
   mitkIGTLMessageProvider.cpp
-)
+)


FIX: fix cached internal filter lists

FIX: fix cached internal filter lists

IMAGE_FILTER_LIST and REGION_GROWING_FILTER_LIST were not getting cleared out
each time cmake was run, so they continued to append each run and caused errors
when not on the first run

--- Code/BasicFilters/SourceCodeGenerator.cmake
+++ Code/BasicFilters/SourceCodeGenerator.cmake
@@ -1,3 +1,5 @@
+set ( IMAGE_FILTER_LIST "" CACHE INTERNAL "" )
+set ( REGION_GROWING_FILTER_LIST "" CACHE INTERNAL "" )
 set ( GENERATED_FILTER_LIST "" CACHE INTERNAL "" )

 set ( image_filter_template 0 )


Switch zlib back to compiling static only (this regressed on switch to 1.2.7)

--- CMake/zlib.cmake
+++ CMake/zlib.cmake
@@ -4,6 +4,10 @@
 project(zlib C)

 set(VERSION "1.2.7")
+
+if(NOT DEFINED BUILD_SHARED_LIBS)
+    option(BUILD_SHARED_LIBS "Build a shared library form of zlib" ON)
+endif()

 set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
 set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
@@ -147,12 +151,19 @@
     set(ZLIB_SRCS ${ZLIB_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
 endif(MINGW)

-add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
-add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
-set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
-set_target_properties(zlib PROPERTIES SOVERSION 1)
-
-if(NOT CYGWIN)
+if (BUILD_SHARED_LIBS)
+    add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
+    add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
+    set(BUILD_TARGETS zlib zlibstatic)
+ELSE(BUILD_SHARED_LIBS)
+    add_library(zlib STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
+    set(BUILD_TARGETS zlib)
+ENDIF(BUILD_SHARED_LIBS)
+
+set_target_properties(${BUILD_TARGETS} PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
+set_target_properties(${BUILD_TARGETS} PROPERTIES SOVERSION 1)
+
+if(NOT CYGWIN AND BUILD_SHARED_LIBS)
     # This property causes shared libraries on Linux to have the full version
     # encoded into their final filename.  We disable this on Cygwin because
     # it causes cygz-${ZLIB_FULL_VERSION}.dll to be created when cygz.dll
@@ -164,16 +175,18 @@
 endif()

 if(UNIX)
-    # On unix-like platforms the library is almost always called libz
-   set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z)
-   set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,${CMAKE_CURRENT_SOURCE_DIR}/zlib.map")
+     # On unix-like platforms the library is almost always called libz
+    set_target_properties(${BUILD_TARGETS} PROPERTIES OUTPUT_NAME z)
+    IF(BUILD_SHARED_LIBS)
+       set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,${CMAKE_CURRENT_SOURCE_DIR}/zlib.map")
+    ENDIF(BUILD_SHARED_LIBS)
 elseif(BUILD_SHARED_LIBS AND WIN32)
     # Creates zlib1.dll when building shared library version
     set_target_properties(zlib PROPERTIES SUFFIX "1.dll")
 endif()

 if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
-    install(TARGETS zlib zlibstatic
+    install(TARGETS ${BUILD_TARGETS}
         RUNTIME DESTINATION "${INSTALL_BIN_DIR}"
         ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
         LIBRARY DESTINATION "${INSTALL_LIB_DIR}" )


cmake: enable LTO for gcc compilers

cmake: enable LTO for gcc compilers

--- src/cmake/common-settings.cmake
+++ src/cmake/common-settings.cmake
@@ -228,7 +228,7 @@
 	endif()

 	# link
-	#compile_flag("-flto"                 FLTO  RELEASE RELWITHDEBINFO)
+	compile_flag("-flto"  FLTO  DEBUG RELEASE RELWITHDEBINFO)

 	# debugging symbols
 	compile_flag("-g"     DEBUG_G     DEBUG RELWITHDEBINFO)


Updating ITK git revision for VectorImageCC filter fix.

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -16,7 +16,9 @@

 # NOTE: it is very important to update the ITK_DIR path with the
 # current version of ITK
-set(ITK_TAG_COMMAND GIT_TAG v4.2rc04 )
+
+# this tag is post ITKv4.2rc04
+set(ITK_TAG_COMMAND GIT_TAG 710376dca4848d16af928489ac18ca7d9c65c2ae )

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )


[FIX] added ugly copying of CTestConfig.cmake

--- util/travis/linux-cibuild.cmake
+++ util/travis/linux-cibuild.cmake
@@ -27,7 +27,15 @@

 # run the classical ctest suite without update
 # travis-ci handles this for us
-ctest_start     (Experimental)
+ctest_start     (Continuous)
+
+# Copying the CTestConfig.cmake here is not optimal.  You might have to call
+# ctest twice to get an actual build since ctest expects it to be present
+# at the first time and will fail.
+CONFIGURE_FILE (${CTEST_SOURCE_DIRECTORY}/util/cmake/CTestConfig.cmake
+                ${CTEST_SOURCE_ROOT_DIRECTORY}/CTestConfig.cmake
+                COPYONLY)
+
 ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE _configure_ret)
 ctest_build     (BUILD "${CTEST_BINARY_DIRECTORY}" NUMBER_ERRORS _build_errors)
 ctest_test      (BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL 3)


add RelWithDebInfo build type to Conan.cmake

--- cmake/Conan.cmake
+++ cmake/Conan.cmake
@@ -1,5 +1,5 @@
 macro(setup_conan)
-  set(options Release Debug TARGETS)
+  set(options Release Debug RelWithDebInfo TARGETS)
   set(oneValueArgs PROFILE)
   cmake_parse_arguments(MARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
   if(MARGS_Release)


Fix check for found valac and mention VALAC variable

--- cmake/FindVala.cmake
+++ cmake/FindVala.cmake
@@ -1,12 +1,12 @@
 # Copyright (C) 2013 Christian Dywan <christian@twotoasts.de>

 find_program(VALA_EXECUTABLE NAMES $ENV{VALAC} valac)
-if (NOT VALA_NOTFOUND)
+if (VALA_EXECUTABLE)
     execute_process(COMMAND ${VALA_EXECUTABLE} "--version" OUTPUT_VARIABLE "VALA_VERSION")
     string(REPLACE "Vala " "" VALA_VERSION ${VALA_VERSION})
     string(STRIP ${VALA_VERSION} VALA_VERSION)
 else ()
-    message(FATAL_ERROR "valac not found")
+    message(FATAL_ERROR "valac not found - install Vala compiler or specify compiler name eg. VALAC=valac-0.20")
 endif ()

 macro(vala_require VALA_REQUIRED)


Switched find order for llvm, means it will choose llvm version 5.0 before any other version. (#446)

--- cmake/Findllvm.cmake
+++ cmake/Findllvm.cmake
@@ -8,7 +8,7 @@
 # LLVM_LIBDIRS

 find_program(LLVM_CONFIG_EXE
-    NAMES llvm-config llvm-config-5.0
+    NAMES llvm-config-5.0 llvm-config
     PATHS
         "/mingw64/bin"
         "/c/msys64/mingw64/bin"


--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -250,6 +250,9 @@
          string(REPLACE " -Wparentheses " " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
          string(REPLACE " -Wparentheses " " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
          set(Vc_DEFINITIONS "${Vc_DEFINITIONS} -Wno-parentheses")
+      elseif(Vc_GCC_VERSION VERSION_EQUAL 4.6.0)
+         UserWarning("GCC 4.6.0 miscompiles AVX loads/stores, leading to spurious segfaults. Disabling AVX per default.")
+         set(Vc_AVX_INTRINSICS_BROKEN true)
       elseif(Vc_GCC_VERSION VERSION_EQUAL 4.7.0)
          UserWarning("GCC 4.7.0 miscompiles at -O3, adding -fno-predictive-commoning to the compiler flags as workaround")
          set(Vc_DEFINITIONS "${Vc_DEFINITIONS} -fno-predictive-commoning")


Update pack-cpp.cmake

Update pack-cpp.cmake

--- cmake/pack-cpp.cmake
+++ cmake/pack-cpp.cmake
@@ -5,7 +5,7 @@
     if(GIT_FOUND)
         set(PACK_CPP_CAHCE_DIR "${CMAKE_SOURCE_DIR}/.pack-cpp")
         set(PACK_CPP_PACKAGE_SOURCE_DIR "${CMAKE_SOURCE_DIR}/.pack-cpp/packages")
-        set(PACK_CPP_PACKAGE_BUILD_DIR "${CMAKE_BINARY_DIR}/packages" )
+        set(PACK_CPP_PACKAGE_BUILD_DIR "${CMAKE_BINARY_DIR}" )
         if(EXISTS "${PACK_CPP_CAHCE_DIR}" AND IS_DIRECTORY "${PACK_CPP_CAHCE_DIR}")
             execute_process(COMMAND "${GIT_EXECUTABLE}" pull WORKING_DIRECTORY "${PACK_CPP_CAHCE_DIR}")
         else()


Add Boost version 1.55 in CMake build

Add Boost version 1.55 in CMake build

--- src/cmake/externalpackages.cmake
+++ src/cmake/externalpackages.cmake
@@ -1,7 +1,7 @@
 ###########################################################################
 # Find libraries

-setup_path (THIRD_PARTY_TOOLS_HOME
+setup_path (THIRD_PARTY_TOOLS_HOME
             "unknown"
             "Location of third party libraries in the external project")

@@ -23,7 +23,7 @@
 endif ()

-setup_string (SPECIAL_COMPILE_FLAGS ""
+setup_string (SPECIAL_COMPILE_FLAGS ""
                "Custom compilation flags")
 if (SPECIAL_COMPILE_FLAGS)
     add_definitions (${SPECIAL_COMPILE_FLAGS})
@@ -52,8 +52,8 @@
 message (STATUS "BOOST_ROOT ${BOOST_ROOT}")

 if (NOT DEFINED Boost_ADDITIONAL_VERSIONS)
-  set (Boost_ADDITIONAL_VERSIONS "1.54" "1.53" "1.52" "1.51" "1.50"
-                                 "1.49" "1.48" "1.47" "1.46" "1.45" "1.44"
+  set (Boost_ADDITIONAL_VERSIONS "1.55" "1.54" "1.53" "1.52" "1.51" "1.50"
+                                 "1.49" "1.48" "1.47" "1.46" "1.45" "1.44"
                                  "1.43" "1.43.0" "1.42" "1.42.0")
 endif ()
 if (LINKSTATIC)
@@ -70,7 +70,7 @@
         list (APPEND Boost_COMPONENTS wave)
     endif ()

-    find_package (Boost 1.42 REQUIRED
+    find_package (Boost 1.42 REQUIRED
                   COMPONENTS ${Boost_COMPONENTS}
                  )
 endif ()


Update rpaht settings

Update rpaht settings

--- cmake/ilcsoft_default_rpath_settings.cmake
+++ cmake/ilcsoft_default_rpath_settings.cmake
@@ -1,14 +1,14 @@
-# add library install path to the rpath list
-SET( CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib" )
-MARK_AS_ADVANCED( CMAKE_INSTALL_RPATH )
+#  When building, don't use the install RPATH already (but later on when installing)
+set(CMAKE_SKIP_BUILD_RPATH FALSE)         # don't skip the full RPATH for the build tree
+set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) # use always the build RPATH for the build tree
+set(CMAKE_MACOSX_RPATH TRUE)              # use RPATH for MacOSX
+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) # point to directories outside the build tree to the install RPATH

-# add install path to the rpath list (apple)
-IF( APPLE )
-    SET( CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" )
-    MARK_AS_ADVANCED( CMAKE_INSTALL_NAME_DIR )
-ENDIF()
+set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}) # install LIBDIR
+set(CMAKE_SKIP_INSTALL_RPATH FALSE)          # don't skip the full RPATH for the install tree
+if(APPLE)
+  set(CMAKE_INSTALL_NAME_DIR "@rpath")
+  set(CMAKE_INSTALL_RPATH "@loader_path/../lib")    # self relative LIBDIR
+  set(CMAKE_SKIP_INSTALL_RPATH FALSE)          # don't skip the full RPATH for the install tree
+endif()

-# append link pathes to rpath list
-SET( CMAKE_INSTALL_RPATH_USE_LINK_PATH 1 )
-MARK_AS_ADVANCED( CMAKE_INSTALL_RPATH_USE_LINK_PATH )
-


fix missing doc file during install

fix missing doc file during install

--- cmakemodules/script_install_commands.cmake
+++ cmakemodules/script_install_commands.cmake
@@ -94,7 +94,6 @@
 	IF (NOT IS_DEBIAN_DBG_PKG)
 		INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/doc/html" DESTINATION ${mrpt_doc_INSTALL_PREFIX}share/doc/mrpt-doc/  )
 		INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/samples" DESTINATION ${mrpt_doc_INSTALL_PREFIX}share/doc/mrpt-doc/  )
-		INSTALL(FILES "${MRPT_SOURCE_DIR}/doc/mrpt_example1.tar.gz" DESTINATION ${mrpt_doc_INSTALL_PREFIX}share/doc/mrpt-doc/ )
 		IF(EXISTS "${MRPT_SOURCE_DIR}/doc/mrpt-book.ps.gz")
 			INSTALL(FILES "${MRPT_SOURCE_DIR}/doc/mrpt-book.ps.gz" DESTINATION ${mrpt_doc_INSTALL_PREFIX}share/doc/mrpt-doc/ )
 		ENDIF(EXISTS "${MRPT_SOURCE_DIR}/doc/mrpt-book.ps.gz")


Only update path when there is none

Only update path when there is none

--- source/raptor/FindJsonCpp.cmake
+++ source/raptor/FindJsonCpp.cmake
@@ -8,6 +8,9 @@
 # JsonCpp_LIBRARIES - the libraries to link against to use JsonCpp
 # JsonCpp_FOUND - if false the library was not found.

+
+# Check if we have cached results in case the last round was successful.
+if (NOT (JsonCpp_INCLUDE_DIR AND JsonCpp_LIBRARY))
 find_path(JsonCpp_INCLUDE_DIR "json/json.h"
   PATHS ~/.linuxbrew/include
   PATH_SUFFIXES "jsoncpp"
@@ -48,3 +51,5 @@
   ${_JsonCpp_version_args})

 mark_as_advanced(JsonCpp_INCLUDE_DIR JsonCpp_LIBRARY)
+endif ()
+


CondorConfigure: remove old SYS_NAME hack on OSX

which will definitely break builds on arm macs, this hasn't been required since cmake-3.0.0,
see https://gitlab.kitware.com/cmake/cmake/-/commit/9d2a0900ed48eb4ae2df0e7672b9ede5af28e193

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -18,10 +18,7 @@

 # OS pre mods
 if(${OS_NAME} STREQUAL "DARWIN")
-	# All recent versions of Mac OS X are 64-bit, but 'uname -p'
-	# (the source for SYS_ARCH) reports 'i386'.
-	# Override that to set the actual architecture.
-	set (SYS_ARCH "X86_64")
+	#this needs to be evaluated in order due to WIN collision.
 elseif(${OS_NAME} MATCHES "WIN")
 	set(WINDOWS ON)


(#6326) allow passing in -DPYTHON_VERSION=3.x to cmake

... would probably be better to have a WANT_PYTHON3 or something, eventually.

also print PYTHONLIBS_VERSION_STRING / PYTHON_VERSION_STRING status
messages.

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -82,7 +82,11 @@

 # To find python in Windows we will use alternate technique
 if(NOT WINDOWS AND NOT CONDOR_PLATFORM MATCHES "Fedora19")
+	if (DEFINED PYTHON_VERSION)
+		set(Python_ADDITIONAL_VERSIONS ${PYTHON_VERSION})
+	endif()
 	include (FindPythonLibs)
+	message(STATUS "Got PYTHONLIBS_VERSION_STRING = ${PYTHONLIBS_VERSION_STRING}")
 	# As of cmake 2.8.8, the variable below is defined by FindPythonLibs.
 	# This helps ensure we get the same version of the libraries and python
 	# on systems with both python2 and python3.
@@ -90,6 +94,7 @@
 		set(PythonInterp_FIND_VERSION "${PYTHONLIBS_VERSION_STRING}")
 	endif()
 	include (FindPythonInterp)
+	message(STATUS "Got PYTHON_VERSION_STRING = ${PYTHON_VERSION_STRING}")
 else()
 	if(WINDOWS)
 		#only for Visual Studio 2012


Support Qt 5.6 compilation

Support Qt 5.6 compilation

--- CMake/ctkMacroGenerateMocs.cmake
+++ CMake/ctkMacroGenerateMocs.cmake
@@ -26,7 +26,11 @@
     set(moc_file ${CMAKE_CURRENT_BINARY_DIR}/moc_${source_name}${source_ext})

     if(CTK_QT_VERSION VERSION_GREATER "4")
-      QT5_CREATE_MOC_COMMAND(${abs_file} ${moc_file} "${_moc_flags}" "" "")
+      if(Qt5_VERSION VERSION_LESS "5.6")
+        QT5_CREATE_MOC_COMMAND(${abs_file} ${moc_file} "${_moc_flags}" "" "")
+      else()
+        QT5_CREATE_MOC_COMMAND(${abs_file} ${moc_file} "${_moc_flags}" "" "" "")
+      endif()
     else()
       QT4_CREATE_MOC_COMMAND(${abs_file} ${moc_file} "${_moc_flags}" "" "")
     endif()


Add old gcc fallback for CUDA 5.0

Add old gcc fallback for CUDA 5.0

--- CMake/hoomd/HOOMDCUDASetup.cmake
+++ CMake/hoomd/HOOMDCUDASetup.cmake
@@ -84,7 +84,14 @@

     if (CUDA_VERSION VERSION_EQUAL 4.2)
         if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.6.99)
-            message(STATUS "CUDA 4.1 doesn't support gcc >= 4.7, falling back on /usr/bin/gcc")
+            message(STATUS "CUDA 4.2 doesn't support gcc >= 4.7, falling back on /usr/bin/gcc")
+            list(APPEND CUDA_NVCC_FLAGS "-ccbin;/usr/bin/gcc")
+        endif()
+    endif()
+
+    if (CUDA_VERSION VERSION_EQUAL 5.0)
+        if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.6.99)
+            message(STATUS "CUDA 5.0 doesn't support gcc >= 4.7, falling back on /usr/bin/gcc")
             list(APPEND CUDA_NVCC_FLAGS "-ccbin;/usr/bin/gcc")
         endif()
     endif()


STYLE: cleanup otbGenerateOTBConfig.cmake

--- CMake/otbGenerateOTBConfig.cmake
+++ CMake/otbGenerateOTBConfig.cmake
@@ -22,12 +22,6 @@

 # Package directories (cmake files...)
 SET(OTB_CMAKEMODULE_DIRS_CONFIG ${OTB_SOURCE_DIR}/CMake)
-
-#            SET(OTB_LIBRARY_DIRS_CONFIG ${OTB_LIBRARY_DIRS_CONFIG} ${GDAL_LIBRARY_DIRS} ${ITK_LIBRARY_DIRS} ${FLTK_LIBRARY_DIRS})
-
-
-
-

 # Determine the include directories needed.
 SET(OTB_INCLUDE_DIRS_CONFIG


Set cmake policy 0064 to support if(TEST)

--- plugin.cmake
+++ plugin.cmake
@@ -13,6 +13,11 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 ###############################################################################
+
+# support the "if(TEST ...)" command
+if(POLICY CMP0064)
+  cmake_policy(SET CMP0064 NEW)
+endif()

 function(add_histomicstk_python_test case)
   add_python_test("${case}" PLUGIN HistomicsTK
@@ -116,7 +121,7 @@
     # multiple tests, so add it in one of the tests for now
     # "plugins/HistomicsTK/Easy1.png"
 )
-if (TEST server_HistomicsTK.cli_results)
+if(TEST "server_HistomicsTK.cli_results")
   set_property(TEST server_HistomicsTK.cli_results APPEND PROPERTY ENVIRONMENT
       "CLI_LIST_ENTRYPOINT=${PROJECT_SOURCE_DIR}/plugins/slicer_cli_web/server/cli_list_entrypoint.py"
       "CLI_CWD=${PROJECT_SOURCE_DIR}/plugins/HistomicsTK/server"
@@ -131,7 +136,7 @@
 )
 # Ideally, client tests would support the EXTERNAL_DATA keyword, but for now
 # we just use a data file used for one of the server tests.
-if (TEST web_client_HistomicsTK_annotations)
+if(TEST "web_client_HistomicsTK_annotations")
   set_property(
     TEST web_client_HistomicsTK_annotations APPEND PROPERTY
     ENVIRONMENT "GIRDER_TEST_DATA_PREFIX=${GIRDER_EXTERNAL_DATA_ROOT}"


fix installation folder

fix installation folder

--- src/cmake/licensecc-config.cmake
+++ src/cmake/licensecc-config.cmake
@@ -1,11 +1,16 @@
 # licensecc-config.cmake - package configuration file
 get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+#TODO windows?
+set(LCC_PRJ_BASE "${SELF_DIR}/../../licensecc")
+set(LCC_FOUND false)
+
 if(licensecc_FIND_COMPONENTS)
 	foreach(component ${licensecc_FIND_COMPONENTS})
-		set(cmakefile "${SELF_DIR}/${component}/cmake/licensecc.cmake")
+		set(cmakefile "${LCC_PRJ_BASE}/${component}/cmake/licensecc.cmake")
 		if(EXISTS "${cmakefile}")
 			include("${cmakefile}")
 			set(${component}_FOUND true CACHE BOOL "Licensecc ${component} present")
+			set(LCC_FOUND true)
 		else(EXISTS "${cmakefile}")
 			set(${component}_FOUND false CACHE BOOL "Licensecc ${component} present")
 			message( WARNING "Component ${component} declared but not found." )
@@ -14,25 +19,29 @@
 	endforeach(component)
 else(licensecc_FIND_COMPONENTS)
 	if(LCC_PROJECT_NAME)
-		if(EXISTS "${SELF_DIR}/${LCC_PROJECT_NAME}/cmake/licensecc.cmake")
-			include("${SELF_DIR}/${LCC_PROJECT_NAME}/cmake/licensecc.cmake")
+		if(EXISTS "${LCC_PRJ_BASE}/${LCC_PROJECT_NAME}/cmake/licensecc.cmake")
+			include("${LCC_PRJ_BASE}/${LCC_PROJECT_NAME}/cmake/licensecc.cmake")
 			set(${LCC_PROJECT_NAME}_FOUND true CACHE BOOL "Licensecc ${LCC_PROJECT_NAME} present")
+			set(LCC_FOUND true)
 		else()
 			message( WARNING "Variable LCC_PROJECT_NAME declared but project ${LCC_PROJECT_NAME} not found.")
 		endif()
 		mark_as_advanced(${LCC_PROJECT_NAME}_FOUND)
 	else(LCC_PROJECT_NAME)
-		if(PROJECT_NAME AND (EXISTS "${SELF_DIR}/${PROJECT_NAME}/cmake/licensecc.cmake"))
-			include("${SELF_DIR}/${PROJECT_NAME}/cmake/licensecc.cmake")
+		if(PROJECT_NAME AND (EXISTS "${LCC_PRJ_BASE}/${PROJECT_NAME}/cmake/licensecc.cmake"))
+			include("${LCC_PRJ_BASE}/${PROJECT_NAME}/cmake/licensecc.cmake")
 			set(${PROJECT_NAME}_FOUND true CACHE BOOL "Licensecc ${PROJECT_NAME} present")
 		    mark_as_advanced(${PROJECT_NAME}_FOUND)
+		    set(LCC_FOUND true)
 		endif()
 	endif(LCC_PROJECT_NAME)
 endif(licensecc_FIND_COMPONENTS)

-get_property(COMPILE_DEF TARGET licensecc::licensecc_static PROPERTY INTERFACE_COMPILE_DEFINITIONS)
-if("HAS_OPENSSL" IN_LIST COMPILE_DEF AND NOT OpenSSL_FOUND)
-	#message( VERBOSE "Trying to find openssl (required by the target)")
-    SET ( OPENSSL_USE_STATIC_LIBS ON )
-    find_package(OpenSSL REQUIRED COMPONENTS Crypto)
-endif()+if(LCC_FOUND)
+	get_property(COMPILE_DEF TARGET licensecc::licensecc_static PROPERTY INTERFACE_COMPILE_DEFINITIONS)
+	if("HAS_OPENSSL" IN_LIST COMPILE_DEF AND NOT OpenSSL_FOUND)
+		#message( VERBOSE "Trying to find openssl (required by the target)")
+	    SET ( OPENSSL_USE_STATIC_LIBS ON )
+	    find_package(OpenSSL REQUIRED COMPONENTS Crypto)
+	endif()
+endif(LCC_FOUND)


fix(CMake/FindMySQL): Allow MySQL 8.0 in Windows (#3087)

--- src/cmake/macros/FindMySQL.cmake
+++ src/cmake/macros/FindMySQL.cmake
@@ -143,12 +143,15 @@
     /usr/local/include
     /usr/local/include/mysql
     /usr/local/mysql/include
+    "C:/Program Files/MySQL/MySQL Server 8.0/include"
     "C:/Program Files/MySQL/MySQL Server 5.7/include"
     "C:/Program Files/MySQL/MySQL Server 5.6/include"
     "C:/Program Files/MySQL/include"
     "C:/MySQL/include"
+    "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 8.0;Location]/include"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.7;Location]/include"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/include"
+    "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 8.0;Location]/include"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.7;Location]/include"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/include"
     "$ENV{ProgramFiles}/MySQL/*/include"
@@ -181,14 +184,20 @@
       libmysql
     PATHS
       ${MYSQL_ADD_LIBRARIES_PATH}
+      "C:/Program Files/MySQL/MySQL Server 8.0/lib"
+      "C:/Program Files/MySQL/MySQL Server 8.0/lib/opt"
       "C:/Program Files/MySQL/MySQL Server 5.7/lib/opt"
       "C:/Program Files/MySQL/MySQL Server 5.6/lib/opt"
       "C:/Program Files/MySQL/lib"
       "C:/MySQL/lib/debug"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 8.0;Location]/lib"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 8.0;Location]/lib/opt"
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.7;Location]/lib"
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.7;Location]/lib/opt"
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/lib"
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/lib/opt"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 8.0;Location]/lib"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 8.0;Location]/lib/opt"
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.7;Location]/lib"
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.7;Location]/lib/opt"
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/lib"


binding.gyp.cmake: Fix npm builds for ia32 node.js 0.10.x

Node.js 0.10.x seems to struggle with the 'or' directive. Fixes #272

Signed-off-by: Brendan Le Foll <3e0e8c4069934e8b47d99704927a85c66c0ceb33@intel.com>

--- src/javascript/binding.gyp.cmake
+++ src/javascript/binding.gyp.cmake
@@ -16,8 +16,11 @@
       'cflags_cc!': [ '-fno-rtti', '-fno-exceptions' ],
       'cflags!': [ '-fno-exceptions' ],
       'conditions' : [
-          [ 'arch=="x64"' or 'arch=="ia32"',
+          [ 'arch=="x64"',
             { 'defines' : [ 'X86PLAT=ON' ], },
+          ],
+          [ 'arch=="ia32"',
+            { 'defines' : [ 'X86PLAT=ON'], },
           ],
           [ 'arch=="arm"',
             { 'defines' : [ 'ARMPLAT=ON'], },


ENH: FixedPointInverseDisplacementField moved to InsightSoftwareConsortium

FixedPointInverseDisplacementField module repository was forked in
InsightSoftwareConsortium and remote repository was moved from original
repository to forked repository.

Change-Id: I938c1eecc522f202f69456619ebc8c07d9d522d4

--- Modules/Remote/FixedPointInverseDisplacementField.remote.cmake
+++ Modules/Remote/FixedPointInverseDisplacementField.remote.cmake
@@ -1,5 +1,5 @@
 itk_fetch_module(FixedPointInverseDisplacementField
   "Computes the inverse of a displacement field."
-  GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/ITKFixedPointInverseDisplacementField.git
+  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKFixedPointInverseDisplacementField.git
   GIT_TAG 23698cf58d439e62c872a3e7426c364702494ceb
   )


ignore unavailable rmw implementations

ignore unavailable rmw implementations

--- rosidl_generator_py/cmake/rosidl_generator_py_get_typesupports.cmake
+++ rosidl_generator_py/cmake/rosidl_generator_py_get_typesupports.cmake
@@ -14,8 +14,10 @@

 macro(accumulate_typesupports)
   set(_typesupport_impl "")
-  get_rmw_typesupport(_typesupport_impl ${rmw_implementation} LANGUAGE "C")
-  list_append_unique(_typesupport_impls ${_typesupport_impl})
+  if(${rmw_implementation}_FOUND)
+    get_rmw_typesupport(_typesupport_impl ${rmw_implementation} LANGUAGE "C")
+    list_append_unique(_typesupport_impls ${_typesupport_impl})
+  endif()
 endmacro()

 macro(rosidl_generator_py_get_typesupports TYPESUPPORT_IMPLS)


emscripten: remove OUTLINING_LIMIT linker arg if compiling for wasm

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -134,7 +134,9 @@
     set(EMSC_CXX_FLAGS "${EMSC_CXX_FLAGS} -fno-rtti")
 endif()
 set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE} --llvm-lto ${FIPS_EMSCRIPTEN_LTO_LEVEL}")
-set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE} -s OUTLINING_LIMIT=${FIPS_EMSCRIPTEN_OUTLINING_LIMIT}")
+if (NOT FIPS_EMSCRIPTEN_USE_WASM)
+    set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE} -s OUTLINING_LIMIT=${FIPS_EMSCRIPTEN_OUTLINING_LIMIT}")
+endif()
 if (FIPS_EMSCRIPTEN_USE_CLOSURE)
     set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE} --closure 1")
 else()


Silent new warnings with ICC 15

Silent new warnings with ICC 15

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -101,7 +101,7 @@
     if(CMAKE_CXX_COMPILER_ID STREQUAL Clang)
       set(LZMA_CFLAGS "-Wno-format-nonliteral")
     elseif( CMAKE_CXX_COMPILER_ID STREQUAL Intel)
-      set(LZMA_CFLAGS "-wd188 -wd181 -wd1292 -wd10006 -wd10156 -wd2259 -wd981 -wd128 -wd3179")
+      set(LZMA_CFLAGS "-wd188 -wd181 -wd1292 -wd10006 -wd10156 -wd2259 -wd981 -wd128 -wd3179 -wd2102")
     endif()
     ExternalProject_Add(
       LZMA


OpenSSL-1.0.2 don't like quotes

OpenSSL-1.0.2 don't like quotes

--- cmake/modules/hunter_dump_cmake_flags.cmake
+++ cmake/modules/hunter_dump_cmake_flags.cmake
@@ -45,8 +45,9 @@
       if(NOT EXISTS "${CMAKE_OSX_SYSROOT}")
         hunter_internal_error("Not exists: '${CMAKE_OSX_SYSROOT}'")
       endif()
-      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isysroot \"${CMAKE_OSX_SYSROOT}\"")
-      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -isysroot \"${CMAKE_OSX_SYSROOT}\"")
+      # Note: do not use quotes here, see OpenSSL-1.0.2 example
+      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isysroot ${CMAKE_OSX_SYSROOT}")
+      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -isysroot ${CMAKE_OSX_SYSROOT}")
     endif()

     if(NOT "${CMAKE_OSX_DEPLOYMENT_TARGET}" STREQUAL "")


Add prefix property to debugging-information

--- cmake/debugging-information.cmake
+++ cmake/debugging-information.cmake
@@ -40,6 +40,11 @@
                 set(LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${config}")
             endif()

+            get_target_property(PREFIX ${ARG_TARGET} PREFIX)
+            if(NOT PREFIX)
+                set(PREFIX "")
+            endif()
+
             get_target_property(OUTPUT_NAME ${ARG_TARGET} OUTPUT_NAME_${config_upper})
             if(NOT OUTPUT_NAME)
                 get_target_property(OUTPUT_NAME ${ARG_TARGET} NAME)
@@ -51,8 +56,8 @@
             endif()

             if(private_debinfo_postfix)
-                set(DEBINFO_PATH "${LIBRARY_OUTPUT_DIRECTORY}/${OUTPUT_NAME}${POSTFIX}${private_debinfo_postfix}.pdb")
-                set(DEBINFO_STRIP_PATH "${LIBRARY_OUTPUT_DIRECTORY}/${OUTPUT_NAME}${POSTFIX}.pdb")
+                set(DEBINFO_PATH "${LIBRARY_OUTPUT_DIRECTORY}/${PREFIX}${OUTPUT_NAME}${POSTFIX}${private_debinfo_postfix}.pdb")
+                set(DEBINFO_STRIP_PATH "${LIBRARY_OUTPUT_DIRECTORY}/${PREFIX}${OUTPUT_NAME}${POSTFIX}.pdb")

                 set_target_properties(${ARG_TARGET} PROPERTIES DEBINFO_PATH_${config_upper} "${DEBINFO_PATH}")
                 set_target_properties(${ARG_TARGET} PROPERTIES DEBINFO_STRIP_PATH_${config_upper} "${DEBINFO_STRIP_PATH}")
@@ -61,7 +66,7 @@
                     " /PDB:${DEBINFO_PATH} /PDBSTRIPPED:${DEBINFO_STRIP_PATH} "
                 )
             else()
-                set(DEBINFO_PATH "${LIBRARY_OUTPUT_DIRECTORY}/${OUTPUT_NAME}${POSTFIX}.pdb")
+                set(DEBINFO_PATH "${LIBRARY_OUTPUT_DIRECTORY}/${PREFIX}${OUTPUT_NAME}${POSTFIX}.pdb")
                 set_target_properties(${ARG_TARGET} PROPERTIES DEBINFO_PATH_${config_upper} "${DEBINFO_PATH}")
             endif()
         else()


Search for ClangTidy which matches the Clang compiler

--- cmake/modules/FindClangTidy.cmake
+++ cmake/modules/FindClangTidy.cmake
@@ -14,7 +14,17 @@
 # limitations under the License.
 #

-find_program(CLANG_TIDY_EXECUTABLE NAMES clang-tidy)
+if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+	message(FATAL_ERROR "ClangTidy is only supported for the Clang compiler!")
+endif()
+
+get_filename_component(_clang_directory ${CMAKE_CXX_COMPILER} DIRECTORY)
+get_filename_component(_clang_name ${CMAKE_CXX_COMPILER} NAME)
+string(REPLACE "clang++" "clang-tidy" _clang_tidy_name ${_clang_name})
+find_program(CLANG_TIDY_EXECUTABLE ${_clang_tidy_name} PATHS ${_clang_directory})
+unset(_clang_directory)
+unset(_clang_name)
+unset(_clang_tidy_name)

 if(CLANG_TIDY_EXECUTABLE)
 	execute_process(COMMAND ${CLANG_TIDY_EXECUTABLE} -version OUTPUT_VARIABLE _clang_tidy_version_output ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)


Undid hotfix...

Undid hotfix...

--- cmake/modules/FindUsdCycles.cmake
+++ cmake/modules/FindUsdCycles.cmake
@@ -47,7 +47,7 @@

     DOC "usdCycles Libraries directory")

-set(USD_CYCLES_LIBS UsdCycles)
+set(USD_CYCLES_LIBS usdCycles)

 foreach (lib ${USD_CYCLES_LIBS})
     find_library(${lib}_LIBRARY


Small fixes for FindRapidJson.cmake

Small fixes for FindRapidJson.cmake

This tiny fix cleans up the FindRapidJson.cmake file, which wasn't
actually searching for the rapidjson.h header correctly but instead
assuming a particular location for it, making some of the other code in
the file redundant.

Change-Id: I5fe3c664b8a078b6610440a8ae4173f38d57a84b
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3631
Reviewed-by: Alex Behm <fe1626037acfc2dc542d2aa723a6d14f2464a20c@cloudera.com>
Tested-by: jenkins

--- cmake_modules/FindRapidJson.cmake
+++ cmake_modules/FindRapidJson.cmake
@@ -1,13 +1,12 @@
 # - Find rapidjson headers and lib.
-# This module defines RAPIDJSON_INCLUDE_DIR, directory containing headers
+# This module defines RAPIDJSON_INCLUDE_DIR, the directory containing headers

 set(RAPIDJSON_SEARCH_HEADER_PATHS
-  ${CMAKE_SOURCE_DIR}/thirdparty/rapidjson/include/rapidjson
+  ${CMAKE_SOURCE_DIR}/thirdparty/rapidjson/include/
 )

-set(RAPIDJSON_INCLUDE_DIR
-  ${CMAKE_SOURCE_DIR}/thirdparty/rapidjson/include
-)
+find_path(RAPIDJSON_INCLUDE_DIR rapidjson/rapidjson.h HINTS
+  ${RAPIDJSON_SEARCH_HEADER_PATHS})

 if (RAPIDJSON_INCLUDE_DIR)
   set(RAPIDJSON_FOUND TRUE)


Get Matlab_ROOT_DIR from the environment variable if it's there.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -62,7 +62,7 @@
 endif()
 FIND_PACKAGE(PythonLibs)

-set(Matlab_ROOT_DIR CACHE PATH "Path to Matlab root directory")
+set(Matlab_ROOT_DIR $ENV{Matlab_ROOT_DIR} CACHE PATH "Path to Matlab root directory" )

 option(USE_SYSTEM_Boost "Build using an external version of Boost" OFF)
 option(USE_SYSTEM_STIR "Build using an external version of STIR" OFF)
@@ -99,7 +99,7 @@
 message(STATUS "STIR_DIR = " ${STIR_DIR})
 message(STATUS "HDF5_ROOT = " ${HDF5_ROOT})
 message(STATUS "GTEST_ROOT = " ${GTEST_ROOT})
-message(STATUS "MATLAB_ROOT = " ${MATLAB_ROOT})
+message(STATUS "Matlab_ROOT_DIR = " ${Matlab_ROOT_DIR})
 message(STATUS "PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}")
 message(STATUS "PYTHON_LIBRARY=${PYTHON_LIBRARY}")
 message(STATUS "PYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR}")


Move definition of the list of external project to the top of Superbuild,cmake

Also added a comment guiding the developer when adding new external project
dependency.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -19,92 +19,8 @@
 ###########################################################################

 #-----------------------------------------------------------------------------
-# Declare CTK_EXTERNAL_LIBRARY_DIRS variable - This variable stores
-# the library output directory associated with the different external project
-# It's then used in Utilities/LastConfigureStep/CTKGenerateCTKConfig.cmake to
-# configure CTKConfig.cmake.in
-# This variable would then be exposed to project building against CTK
-SET(CTK_EXTERNAL_LIBRARY_DIRS)
-
-#-----------------------------------------------------------------------------
-# Make sure ${CTK_BINARY_DIR}/CTK-build/bin exists
-# May be used by some external project to install libs (e.g QtMobility)
-IF(NOT EXISTS ${CTK_BINARY_DIR}/CTK-build/bin)
-  FILE(MAKE_DIRECTORY ${CTK_BINARY_DIR}/CTK-build/bin)
-ENDIF()
-
-#-----------------------------------------------------------------------------
-# Git protocole option
-#
-option(CTK_USE_GIT_PROTOCOL "If behind a firewall turn this OFF to use http instead." ON)
-
-set(git_protocol "git")
-if(NOT CTK_USE_GIT_PROTOCOL)
-  set(git_protocol "http")
-endif()
-
-#-----------------------------------------------------------------------------
-# Enable and setup External project global properties
-#
-INCLUDE(ExternalProject)
-INCLUDE(ctkMacroEmptyExternalProject)
-
-SET(ep_base "${CMAKE_BINARY_DIR}/CMakeExternals")
-SET_PROPERTY(DIRECTORY PROPERTY EP_BASE ${ep_base})
-
-SET(ep_install_dir ${ep_base}/Install)
-SET(ep_build_dir ${ep_base}/Build)
-SET(ep_source_dir ${ep_base}/Source)
-#SET(ep_parallelism_level)
-SET(ep_build_shared_libs ON)
-SET(ep_build_testing OFF)
-
-SET(ep_common_args
-  -DCMAKE_INSTALL_PREFIX:PATH=${ep_install_dir}
-  -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-  -DBUILD_TESTING:BOOL=${ep_build_testing}
-  )
-
-# Compute -G arg for configuring external projects with the same CMake generator:
-IF(CMAKE_EXTRA_GENERATOR)
-  SET(gen "${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}")
-ELSE()
-  SET(gen "${CMAKE_GENERATOR}")
-ENDIF()
-
-# Use this value where semi-colons are needed in ep_add args:
-set(sep "^^")
-
-#-----------------------------------------------------------------------------
-# Collect CTK library target dependencies
-#
-
-ctkMacroCollectAllTargetLibraries("${CTK_LIBS_SUBDIRS}" "Libs" ALL_TARGET_LIBRARIES)
-ctkMacroCollectAllTargetLibraries("${CTK_PLUGINS_SUBDIRS}" "Plugins" ALL_TARGET_LIBRARIES)
-ctkMacroCollectAllTargetLibraries("${CTK_APPLICATIONS_SUBDIRS}" "Applications" ALL_TARGET_LIBRARIES)
-#MESSAGE(STATUS ALL_TARGET_LIBRARIES:${ALL_TARGET_LIBRARIES})
-
-#-----------------------------------------------------------------------------
-# Initialize NON_CTK_DEPENDENCIES variable
-#
-# Using the variable ALL_TARGET_LIBRARIES initialized above with the help
-# of the macro ctkMacroCollectAllTargetLibraries, let's get the list of all Non-CTK dependencies.
-# NON_CTK_DEPENDENCIES is expected by the macro ctkMacroShouldAddExternalProject
-ctkMacroGetAllNonCTKTargetLibraries("${ALL_TARGET_LIBRARIES}" NON_CTK_DEPENDENCIES)
-#MESSAGE(STATUS NON_CTK_DEPENDENCIES:${NON_CTK_DEPENDENCIES})
-
-#-----------------------------------------------------------------------------
-# Qt is expected to be setup by CTK/CMakeLists.txt just before it includes the SuperBuild script
-#
-
-#-----------------------------------------------------------------------------
-# Attempt to discover Doxygen so that DOXYGEN_EXECUTABLE is set to an appropriate default value
-#
-FIND_PACKAGE(Doxygen QUIET)
-
-#-----------------------------------------------------------------------------
 # ExternalProjects - Project should be topologically ordered
-#
+#-----------------------------------------------------------------------------
 SET(external_projects
   CTKData
   Log4Qt
@@ -120,6 +36,99 @@
   XIP
   ITK
   )
+
+#-----------------------------------------------------------------------------
+# WARNING - No change should be required after this comment
+#           when you are adding a new external project dependency.
+#-----------------------------------------------------------------------------
+
+#-----------------------------------------------------------------------------
+# Declare CTK_EXTERNAL_LIBRARY_DIRS variable - This variable stores
+# the library output directory associated with the different external project
+# It's then used in Utilities/LastConfigureStep/CTKGenerateCTKConfig.cmake to
+# configure CTKConfig.cmake.in
+# This variable would then be exposed to project building against CTK
+SET(CTK_EXTERNAL_LIBRARY_DIRS)
+
+#-----------------------------------------------------------------------------
+# Make sure ${CTK_BINARY_DIR}/CTK-build/bin exists
+# May be used by some external project to install libs (e.g QtMobility)
+IF(NOT EXISTS ${CTK_BINARY_DIR}/CTK-build/bin)
+  FILE(MAKE_DIRECTORY ${CTK_BINARY_DIR}/CTK-build/bin)
+ENDIF()
+
+#-----------------------------------------------------------------------------
+# Git protocole option
+#
+option(CTK_USE_GIT_PROTOCOL "If behind a firewall turn this OFF to use http instead." ON)
+
+set(git_protocol "git")
+if(NOT CTK_USE_GIT_PROTOCOL)
+  set(git_protocol "http")
+endif()
+
+#-----------------------------------------------------------------------------
+# Enable and setup External project global properties
+#
+INCLUDE(ExternalProject)
+INCLUDE(ctkMacroEmptyExternalProject)
+
+SET(ep_base "${CMAKE_BINARY_DIR}/CMakeExternals")
+SET_PROPERTY(DIRECTORY PROPERTY EP_BASE ${ep_base})
+
+SET(ep_install_dir ${ep_base}/Install)
+SET(ep_build_dir ${ep_base}/Build)
+SET(ep_source_dir ${ep_base}/Source)
+#SET(ep_parallelism_level)
+SET(ep_build_shared_libs ON)
+SET(ep_build_testing OFF)
+
+SET(ep_common_args
+  -DCMAKE_INSTALL_PREFIX:PATH=${ep_install_dir}
+  -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+  -DBUILD_TESTING:BOOL=${ep_build_testing}
+  )
+
+# Compute -G arg for configuring external projects with the same CMake generator:
+IF(CMAKE_EXTRA_GENERATOR)
+  SET(gen "${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}")
+ELSE()
+  SET(gen "${CMAKE_GENERATOR}")
+ENDIF()
+
+# Use this value where semi-colons are needed in ep_add args:
+set(sep "^^")
+
+#-----------------------------------------------------------------------------
+# Collect CTK library target dependencies
+#
+
+ctkMacroCollectAllTargetLibraries("${CTK_LIBS_SUBDIRS}" "Libs" ALL_TARGET_LIBRARIES)
+ctkMacroCollectAllTargetLibraries("${CTK_PLUGINS_SUBDIRS}" "Plugins" ALL_TARGET_LIBRARIES)
+ctkMacroCollectAllTargetLibraries("${CTK_APPLICATIONS_SUBDIRS}" "Applications" ALL_TARGET_LIBRARIES)
+#MESSAGE(STATUS ALL_TARGET_LIBRARIES:${ALL_TARGET_LIBRARIES})
+
+#-----------------------------------------------------------------------------
+# Initialize NON_CTK_DEPENDENCIES variable
+#
+# Using the variable ALL_TARGET_LIBRARIES initialized above with the help
+# of the macro ctkMacroCollectAllTargetLibraries, let's get the list of all Non-CTK dependencies.
+# NON_CTK_DEPENDENCIES is expected by the macro ctkMacroShouldAddExternalProject
+ctkMacroGetAllNonCTKTargetLibraries("${ALL_TARGET_LIBRARIES}" NON_CTK_DEPENDENCIES)
+#MESSAGE(STATUS NON_CTK_DEPENDENCIES:${NON_CTK_DEPENDENCIES})
+
+#-----------------------------------------------------------------------------
+# Qt is expected to be setup by CTK/CMakeLists.txt just before it includes the SuperBuild script
+#
+
+#-----------------------------------------------------------------------------
+# Attempt to discover Doxygen so that DOXYGEN_EXECUTABLE is set to an appropriate default value
+#
+FIND_PACKAGE(Doxygen QUIET)
+
+#-----------------------------------------------------------------------------
+# Include external projects
+#

 # This variable will contain the list of CMake variable specific to each external project
 # that should passed to CTK.
@@ -130,7 +139,6 @@
 # This variable will contain the list of external project that CTK depends on.
 SET(CTK_DEPENDS)

-# Include external projects
 SET(dependency_args )
 FOREACH(p ${external_projects})
   INCLUDE(CMakeExternals/${p}.cmake)


Fix bug in InstallDebugSymbols.cmake

Fix bug in InstallDebugSymbols.cmake

--- cmake/InstallDebugSymbols.cmake
+++ cmake/InstallDebugSymbols.cmake
@@ -53,7 +53,7 @@
         set(HAS_SYMBOLS_CONDITION)
         foreach(_config ${INSTALLSYMS_CONFIGURATIONS})
             list(APPEND HAS_SYMBOLS_CONDITION "$<CONFIG:${_config}>")
-        endif()
+        endforeach()
         # make list comma separated
         string(REPLACE ";" "," HAS_SYMBOLS_CONDITION "${HAS_SYMBOLS_CONDITION}")
         # Wrap in an "OR" generator expression


Explicitly say we don't define new/delete in libc++ during Apple stage1 bootstrap

This is not necessary in stage2 because we don't even build libc++.dylib
there.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@358582 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/caches/Apple-stage1.cmake
+++ cmake/caches/Apple-stage1.cmake
@@ -33,6 +33,9 @@
 set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "")
 set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")

+set(LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "")
+set(LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS ON CACHE BOOL "")
+
 set(CLANG_BOOTSTRAP_TARGETS
   generate-order-file
   check-all


CodeGenerator.cmake: Add capability for installing module configuration files

Change-Id: Iae522cd14a08e0067da6dd26fc47b6c6dc0f0f7b

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -265,6 +265,7 @@
     SERVER_IMPL_LIB_EXTRA_LIBRARIES
     MODULE_EXTRA_INCLUDE_DIRS
     MODULE_EXTRA_LIBRARIES
+    MODULE_CONFIG_FILES_DIRS
     SERVER_IMPL_LIB_FIND_CMAKE_EXTRA_LIBRARIES
   )

@@ -755,6 +756,41 @@
   )

   ###############################################################
+  # Install configuration files
+  ###############################################################
+
+  if(NOT DEFINED SYSCONF_INSTALL_DIR)
+    set(SYSCONF_INSTALL_DIR etc CACHE PATH
+                "Install directory for system-wide configuration files")
+  endif()
+
+  if (NOT DEFINED PARAM_MODULE_CONFIG_FILES_DIRS)
+    set (PARAM_MODULE_CONFIG_FILES_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/config)
+  endif()
+
+  message (STATUS "Getting config files from ${PARAM_MODULE_CONFIG_FILES_DIRS}")
+
+  foreach (DIR ${PARAM_MODULE_CONFIG_FILES_DIRS})
+    file (GLOB_RECURSE TMP_FILES ${DIR}/*)
+    list (APPEND CONFIG_FILES ${TMP_FILES})
+  endforeach()
+
+  if (CONFIG_FILES)
+    message (STATUS "Found config files: ${CONFIG_FILES}")
+    if (${VALUE_NAME} STREQUAL "core" OR ${VALUE_NAME} STREQUAL "elements" OR ${VALUE_NAME} STREQUAL "filters")
+      set (CONFIG_FILES_DIR "kurento")
+    else ()
+      set (CONFIG_FILES_DIR ${VALUE_NAME})
+    endif()
+    install (FILES
+      ${CONFIG_FILES}
+      DESTINATION ${SYSCONF_INSTALL_DIR}/kurento/modules/${CONFIG_FILES_DIR}
+    )
+  else()
+    message (STATUS "No config files found")
+  endif()
+
+  ###############################################################
   # Generate Java Client Project
   ###############################################################


Assertions disabled in GDCM builds on Mac

There are some - likely invalid - assertions in GDCM that make the
DICOM plugin and several unit tests crash. The faulty code is invoked
by itk::GDCMImageIO::CanReadFile.

Signed-off-by: Miklos Espak <1f23f8cb8ef21e3878b3aceb94f79bc0b720967c@ucl.ac.uk>

--- CMakeExternals/GDCM.cmake
+++ CMakeExternals/GDCM.cmake
@@ -30,6 +30,13 @@
     )
   endif()

+  # On Mac some assertions fail that prevent reading certain DICOM files. Bug #19995
+  if(APPLE)
+    list(APPEND additional_args
+      "-DCMAKE_CXX_FLAGS_DEBUG:STRING=${CMAKE_CXX_FLAGS_DEBUG} -DNDEBUG"
+    )
+  endif()
+
   ExternalProject_Add(${proj}
      LIST_SEPARATOR ${sep}
      URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/gdcm-2.6.3.tar.bz2


Added "commit=no" flag. (And tested change on remote queue by using this flag.)

--- test/remote/RunRemoteTest.cmake
+++ test/remote/RunRemoteTest.cmake
@@ -20,6 +20,8 @@
 #   Valid options:
 #      changelist = svn changelist to submit (defaults to default changelist)
 #      ZORBA_BUILD_DIR = zorba build directory (defaults to src_dir/build)
+#      commit = set to "no" to prevent remote queue from committing changes
+#               (default "yes")

 # We'll need Subversion.
@@ -61,10 +63,18 @@

 # Copy the local changes to the remotequeue svn repository.  In
 # future, we could pass data to the remote queue (such as test suites
-# to run, etc.) with properties on the checkin.
+# to run, etc.) with properties on the checkin. For now at least, if
+# the "commit" argument is "no", then use a special checkin message to
+# instruct the remote queue not to commit the job to svn. (Doing it
+# this way also prevents this script for prompting for a checkin
+# message, which is useful.)
 message ("Submitting job ${changefile}....")
+if (commit STREQUAL "no")
+  set (commitargs -m "DO NOT COMMIT")
+endif (commit STREQUAL "no")
 execute_process (COMMAND
-                 "${svn}" import "${CMAKE_ZORBA_BUILD_DIR}/remotequeue/${changefile}"
+                 "${svn}" import ${commitargs}
+                 "${CMAKE_ZORBA_BUILD_DIR}/remotequeue/${changefile}"
                  "${svn_path}/workingsets/${changefile}"
                  TIMEOUT 300 RESULT_VARIABLE result)


GNU modules: Add support for ENV( MODULE_SW_BASEDIR ) and Mac OS X

--- GNUModules.cmake
+++ GNUModules.cmake
@@ -4,10 +4,11 @@
 # Offers a target named 'module' to create a GNU module
 # (http://modules.sourceforge.net/) from your software.
 #
-# The GNUModules.cmake is supposed to be included after Common.cmake and
-# CPackConfig.cmake to gather required variables from them.
-# Additionally, the following variables have to set before including
-# GNUModules.cmake.
+# The GNUModules.cmake is supposed to be included after Common.cmake,
+# CPackConfig.cmake and all targets to gather required variables from
+# them.
+
+# The following variables have to set before including GNUModules.cmake:

 # Need variables defined by (Common)CPackConfig
 if(NOT CPACK_PROJECT_NAME OR NOT CPACK_PACKAGE_VENDOR OR NOT VERSION OR
@@ -32,6 +33,9 @@
 endif()

 # the base directory containing all modules on a machine
+if(NOT MODULE_SW_BASEDIR)
+  set(MODULE_SW_BASEDIR $ENV{MODULE_SW_BASEDIR})
+endif()
 if(NOT MODULE_SW_BASEDIR)
   set(MODULE_SW_BASEDIR "/usr/share/Modules")
 endif()
@@ -67,6 +71,8 @@
   set(MODULE_PLATFORM "rhel${LSB_RELEASE}-${CMAKE_SYSTEM_PROCESSOR}")
 elseif(LSB_DISTRIBUTOR_ID MATCHES "Ubuntu")
   set(MODULE_PLATFORM "ubuntu${LSB_RELEASE}-${CMAKE_SYSTEM_PROCESSOR}")
+elseif(APPLE)
+  set(MODULE_PLATFORM "darwin${CMAKE_SYSTEM_VERSION}-${CMAKE_SYSTEM_PROCESSOR}")
 else()
   message(STATUS "Unsupported platform for GNUModules, please add support here")
   return()