Set the ZINC_ARCHITECTURE correctly when cross compiling on windows.  https://tracker.physiomeproject.org/show_bug.cgi?id=3726

--- cmake/ZincPackaging.cmake
+++ cmake/ZincPackaging.cmake
@@ -10,70 +10,73 @@

 SET(ZINC_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
 IF(WIN32)
-	STRING(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} ZINC_ARCHITECTURE)
+    IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
+        SET(ZINC_ARCHITECTURE x86)
+    ELSE()
+        SET(ZINC_ARCHITECTURE amd64)
 ENDIF()

 FUNCTION( GET_ZINC_SYSTEM_NAME RETURN_SYSTEM_NAME )
-	IF( WIN32 )
-		SET( SYSTEM_NAME "Windows" )
-	ELSEIF( APPLE )
-		EXECUTE_PROCESS(COMMAND sw_vers -productName RESULT_VARIABLE COMMAND_RESULT OUTPUT_VARIABLE PRODUCT_NAME )
-		STRING( STRIP ${PRODUCT_NAME} PRODUCT_NAME )
-		EXECUTE_PROCESS(COMMAND sw_vers -productVersion RESULT_VARIABLE COMMAND_RESULT OUTPUT_VARIABLE PRODUCT_VERSION )
-		STRING( STRIP ${PRODUCT_VERSION} PRODUCT_VERSION )
-		STRING( REPLACE " " "-" SYSTEM_NAME "${PRODUCT_NAME} ${PRODUCT_VERSION}" )
-	ELSEIF( UNIX )
-		SET( SYSTEM_NAME "Linux" )
-		EXECUTE_PROCESS(COMMAND cat /etc/issue RESULT_VARIABLE COMMAND_RESULT OUTPUT_VARIABLE COMMAND_OUTPUT ERROR_VARIABLE ERROR_OUTPUT)
-		IF( COMMAND_RESULT EQUAL 0 )
-			STRING( REGEX MATCH "^[^\\]*" COMMAND_OUTPUT ${COMMAND_OUTPUT} )
-			STRING( STRIP ${COMMAND_OUTPUT} COMMAND_OUTPUT )
-			STRING( REPLACE " " "-" SYSTEM_NAME ${COMMAND_OUTPUT} )
-		ENDIF()
-	ELSE()
-		MESSAGE( FATAL_ERROR "Don't yet know this system." )
-	ENDIF()
+    IF( WIN32 )
+        SET( SYSTEM_NAME "Windows" )
+    ELSEIF( APPLE )
+        EXECUTE_PROCESS(COMMAND sw_vers -productName RESULT_VARIABLE COMMAND_RESULT OUTPUT_VARIABLE PRODUCT_NAME )
+        STRING( STRIP ${PRODUCT_NAME} PRODUCT_NAME )
+        EXECUTE_PROCESS(COMMAND sw_vers -productVersion RESULT_VARIABLE COMMAND_RESULT OUTPUT_VARIABLE PRODUCT_VERSION )
+        STRING( STRIP ${PRODUCT_VERSION} PRODUCT_VERSION )
+        STRING( REPLACE " " "-" SYSTEM_NAME "${PRODUCT_NAME} ${PRODUCT_VERSION}" )
+    ELSEIF( UNIX )
+        SET( SYSTEM_NAME "Linux" )
+        EXECUTE_PROCESS(COMMAND cat /etc/issue RESULT_VARIABLE COMMAND_RESULT OUTPUT_VARIABLE COMMAND_OUTPUT ERROR_VARIABLE ERROR_OUTPUT)
+        IF( COMMAND_RESULT EQUAL 0 )
+            STRING( REGEX MATCH "^[^\\]*" COMMAND_OUTPUT ${COMMAND_OUTPUT} )
+            STRING( STRIP ${COMMAND_OUTPUT} COMMAND_OUTPUT )
+            STRING( REPLACE " " "-" SYSTEM_NAME ${COMMAND_OUTPUT} )
+        ENDIF()
+    ELSE()
+        MESSAGE( FATAL_ERROR "Don't yet know this system." )
+    ENDIF()

-	SET( ${RETURN_SYSTEM_NAME} ${SYSTEM_NAME} PARENT_SCOPE)
+    SET( ${RETURN_SYSTEM_NAME} ${SYSTEM_NAME} PARENT_SCOPE)
 ENDFUNCTION()

 GET_ZINC_SYSTEM_NAME( ZINC_SYSTEM )

 IF( WIN32 )
-	IF ( ${CMAKE_VERSION} VERSION_LESS "2.8.11" )
-		MESSAGE( STATUS "The CMAKE_SYSTEM_PROCESSOR will not give the correct value for 64 bit systems." )
-	ENDIF()
-	SET( CPACK_GENERATOR "ZIP;NSIS" )
-	SET( CPACK_NSIS_DISPLAY_NAME "${PROJECT_NAME}" )
-	SET( CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}" )
-	IF( CMAKE_CL_64 )
-		SET( CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64" )
-		SET( CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} (${ZINC_ARCHITECTURE})" )
-		SET( CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION} (${ZINC_ARCHITECTURE})" )
-	ENDIF()
-	SET( CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/distrib/windows\\\\nsis_banner.bmp" )
-	SET( CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/distrib/icons\\\\cmiss_torso.ico" )
-	SET( CPACK_NSIS_MUI_UNIICON "${CMAKE_CURRENT_SOURCE_DIR}/distrib/icons\\\\cmiss_torso.ico" )
-	SET( CPACK_NSIS_MODIFY_PATH "ON" )
+    IF ( ${CMAKE_VERSION} VERSION_LESS "2.8.11" )
+        MESSAGE( STATUS "The CMAKE_SYSTEM_PROCESSOR will not give the correct value for 64 bit systems." )
+    ENDIF()
+    SET( CPACK_GENERATOR "ZIP;NSIS" )
+    SET( CPACK_NSIS_DISPLAY_NAME "${PROJECT_NAME}" )
+    SET( CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}" )
+    IF( CMAKE_CL_64 )
+        SET( CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64" )
+        SET( CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} (${ZINC_ARCHITECTURE})" )
+        SET( CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION} (${ZINC_ARCHITECTURE})" )
+    ENDIF()
+    SET( CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/distrib/windows\\\\nsis_banner.bmp" )
+    SET( CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/distrib/icons\\\\cmiss_torso.ico" )
+    SET( CPACK_NSIS_MUI_UNIICON "${CMAKE_CURRENT_SOURCE_DIR}/distrib/icons\\\\cmiss_torso.ico" )
+    SET( CPACK_NSIS_MODIFY_PATH "ON" )
 ELSEIF( APPLE )
-	# Preserve the CMAKE_INSTALL_PREFIX for the project and work with absolute install
-	SET(CPACK_SET_DESTDIR ON)
+    # Preserve the CMAKE_INSTALL_PREFIX for the project and work with absolute install
+    SET(CPACK_SET_DESTDIR ON)

-	SET( CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_SOURCE_DIR}/distrib/osx/welcome.txt" )
-	LIST( LENGTH LENGTH_ARCHS CMAKE_OSX_ARCHITECTURES )
+    SET( CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_SOURCE_DIR}/distrib/osx/welcome.txt" )
+    LIST( LENGTH LENGTH_ARCHS CMAKE_OSX_ARCHITECTURES )

-	SET( ZINC_ARCHITECTURE "universal" )
-	SET( CPACK_GENERATOR  "TGZ" "PackageMaker" )
+    SET( ZINC_ARCHITECTURE "universal" )
+    SET( CPACK_GENERATOR  "TGZ" "PackageMaker" )
 ELSEIF( UNIX )
-	# Preserve the CMAKE_INSTALL_PREFIX for the project and work with absolute install
-	SET(CPACK_SET_DESTDIR ON)
+    # Preserve the CMAKE_INSTALL_PREFIX for the project and work with absolute install
+    SET(CPACK_SET_DESTDIR ON)

-	SET( CPACK_GENERATOR "TGZ" )
-	STRING( FIND ${ZINC_SYSTEM} "Ubuntu" INDEX )
-	IF( INDEX EQUAL 0 )
-		SET( CPACK_DEBIAN_PACKAGE_MAINTAINER "Hugh Sorby" ) #required
-		LIST( APPEND CPACK_GENERATOR "DEB" )
-	ENDIF()
+    SET( CPACK_GENERATOR "TGZ" )
+    STRING( FIND ${ZINC_SYSTEM} "Ubuntu" INDEX )
+    IF( INDEX EQUAL 0 )
+        SET( CPACK_DEBIAN_PACKAGE_MAINTAINER "Hugh Sorby" ) #required
+        LIST( APPEND CPACK_GENERATOR "DEB" )
+    ENDIF()
 ENDIF()

 SET( CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt" )


version for master branch release

version for master branch release

--- cmake/build-version.cmake
+++ cmake/build-version.cmake
@@ -19,7 +19,7 @@
   endif( )
   if( POLICY CMP0048 )
     cmake_policy( SET CMP0048 NEW )
-    project( ${PV_NAME} VERSION 0.5.0.0 LANGUAGES ${PV_LANGUAGES} )
+    project( ${PV_NAME} VERSION 0.4.2.0 LANGUAGES ${PV_LANGUAGES} )

   else( )
     project( ${PV_NAME} ${PV_LANGUAGES} )
@@ -29,11 +29,11 @@
     endif( )

     if( NOT DEFINED ${PV_NAME}_VERSION_MINOR )
-      set( ${PV_NAME}_VERSION_MINOR 5 )
+      set( ${PV_NAME}_VERSION_MINOR 4 )
     endif( )

     if( NOT DEFINED ${PV_NAME}_VERSION_PATCH )
-      set( ${PV_NAME}_VERSION_PATCH 0 )
+      set( ${PV_NAME}_VERSION_PATCH 2 )
     endif( )

     if( NOT DEFINED ${PV_NAME}_VERSION_TWEAK )


Allow embedded blanks in source directory name.

svn path=/trunk/; revision=10752

--- cmake/modules/csiro.cmake
+++ cmake/modules/csiro.cmake
@@ -43,7 +43,7 @@
     try_run(NaNAwareCCompiler COMPILE_RESULT
       ${CMAKE_BINARY_DIR}
       ${CMAKE_SOURCE_DIR}/cmake/modules/TestNaNAware.c
-      CMAKE_FLAGS "-DCOMPILE_DEFINITIONS:STRING=${NAN_CFLAGS} -I${CMAKE_SOURCE_DIR}/lib/csa ${MATH_LIB}"
+      CMAKE_FLAGS "-DCOMPILE_DEFINITIONS:STRING=${NAN_CFLAGS} -I\"${CMAKE_SOURCE_DIR}\"/lib/csa ${MATH_LIB}"
       OUTPUT_VARIABLE OUTPUT
       )
     if(NOT COMPILE_RESULT)


Fix pthread issue. Per target include directories.

--- cmake/GTest.cmake
+++ cmake/GTest.cmake
@@ -13,12 +13,14 @@
         )

 enable_testing()
-include_directories("${CMAKE_BINARY_DIR}/third-party/gtest-src/include")
 link_directories("${CMAKE_BINARY_DIR}/third-party/gtest-build")
+
+find_package(Threads)

 function(cxx_test name sources)
     add_executable(${name} ${sources})
-    target_link_libraries(${name} ${ARGN} gtest)
+    target_link_libraries(${name} ${ARGN} gtest ${CMAKE_THREAD_LIBS_INIT})
+    set_property(TARGET ${name} PROPERTY INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}/third-party/gtest-src/include")
     add_dependencies(${name} gtest_ext)
     # Working directory: where the dlls are installed.
     add_test(NAME ${name}


Update cmake-conan to version 0.16.1

Update cmake-conan to version 0.16.1

--- cmake/conan.cmake
+++ cmake/conan.cmake
@@ -33,7 +33,7 @@
 # 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.15.0
+# version: 0.16.1

 include(CMakeParseArguments)

@@ -60,19 +60,8 @@
     endif()
 endfunction()

-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")
-
-    parse_arguments(${ARGV})
+macro(_conan_detect_build_type)
+    conan_parse_arguments(${ARGV})

     if(ARGUMENTS_BUILD_TYPE)
         set(_CONAN_SETTING_BUILD_TYPE ${ARGUMENTS_BUILD_TYPE})
@@ -92,18 +81,20 @@
     elseif(_CONAN_SETTING_BUILD_TYPE_UPPER STREQUAL "MINSIZEREL")
         set(_CONAN_SETTING_BUILD_TYPE "MinSizeRel")
     endif()
-
-    if(ARGUMENTS_ARCH)
-        set(_CONAN_SETTING_ARCH ${ARGUMENTS_ARCH})
-    endif()
+endmacro()
+
+macro(_conan_check_system_name)
     #handle -s os setting
-    if(CMAKE_SYSTEM_NAME)
+    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()
-        set(CONAN_SUPPORTED_PLATFORMS Windows Linux Macos Android iOS FreeBSD WindowsStore)
+        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
@@ -112,7 +103,9 @@
             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)
@@ -123,6 +116,15 @@
     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
@@ -135,6 +137,17 @@
             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)
@@ -194,7 +207,7 @@
             endif()
         endif()

-        conan_cmake_detect_vs_runtime(_vs_runtime)
+        conan_cmake_detect_vs_runtime(_vs_runtime ${ARGV})
         message(STATUS "Conan: Detected VS runtime: ${_vs_runtime}")
         set(_CONAN_SETTING_COMPILER_RUNTIME ${_vs_runtime})

@@ -203,9 +216,33 @@
         elseif(CMAKE_VS_PLATFORM_TOOLSET AND (CMAKE_GENERATOR STREQUAL "Ninja"))
             set(_CONAN_SETTING_COMPILER_TOOLSET ${CMAKE_VS_PLATFORM_TOOLSET})
         endif()
-    else()
+        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)
@@ -223,11 +260,22 @@
     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})
@@ -251,9 +299,12 @@
 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")
@@ -264,9 +315,42 @@
         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 ${CMAKE_CXX_COMPILER} -x c++ ${compile_options} -E -dM -
+        COMMAND ${EXPAND_CXX_COMPILER} ${SPLIT_CXX_FLAGS} -x c++ ${xcode_sysroot_option} ${compile_options} -E -dM -
         OUTPUT_VARIABLE string_defines
     )

@@ -296,44 +380,77 @@
 endfunction()

 function(conan_cmake_detect_vs_runtime result)
-    string(TOUPPER ${CMAKE_BUILD_TYPE} build_type)
+
+    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}})
+            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)
+                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")
+    if("${build_type}" STREQUAL "DEBUG")
         set(${result} "MDd" PARENT_SCOPE)
     else()
         set(${result} "MD" PARENT_SCOPE)
     endif()
 endfunction()

-
-macro(parse_arguments)
+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)
+    _conan_detect_build_type()
+    _conan_check_system_name()
+    _conan_check_language()
+    _conan_detect_compiler()
+    _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)
+                     INSTALL_ARGS CONFIGURATION_TYPES PROFILE_BUILD BUILD_REQUIRES)
   cmake_parse_arguments(ARGUMENTS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
 endmacro()

-function(conan_cmake_install)
+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
-    parse_arguments(${ARGV})
+    conan_parse_arguments(${ARGV})

     if(CONAN_CMAKE_MULTI)
         set(ARGUMENTS_GENERATORS ${ARGUMENTS_GENERATORS} cmake_multi)
@@ -357,14 +474,17 @@
     endif()
     set(CONAN_OPTIONS "")
     if(ARGUMENTS_CONANFILE)
-      set(CONANFILE ${CMAKE_CURRENT_SOURCE_DIR}/${ARGUMENTS_CONANFILE})
-      # A conan file has been specified - apply specified options as well if provided
-      foreach(ARG ${ARGUMENTS_OPTIONS})
-          set(CONAN_OPTIONS ${CONAN_OPTIONS} -o=${ARG})
-      endforeach()
+      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()
@@ -404,40 +524,182 @@

 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)
-  parse_arguments(${ARGV})
+  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(${ARGV})
+    conan_cmake_generate_conanfile(ON ${ARGV})
   endif()
 endfunction()

-function(conan_cmake_generate_conanfile)
-  # 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)
-  parse_arguments(${ARGV})
-  set(_FN "${CMAKE_CURRENT_BINARY_DIR}/conanfile.txt")
-
-  file(WRITE ${_FN} "[generators]\ncmake\n\n[requires]\n")
-  foreach(ARG ${ARGUMENTS_REQUIRES})
-    file(APPEND ${_FN} ${ARG} "\n")
-  endforeach()
-
-  file(APPEND ${_FN} ${ARG} "\n[options]\n")
-  foreach(ARG ${ARGUMENTS_OPTIONS})
-    file(APPEND ${_FN} ${ARG} "\n")
-  endforeach()
-
-  file(APPEND ${_FN} ${ARG} "\n[imports]\n")
-  foreach(ARG ${ARGUMENTS_IMPORTS})
-    file(APPEND ${_FN} ${ARG} "\n")
-  endforeach()
+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()

@@ -464,8 +726,8 @@

 macro(conan_cmake_run)
-    parse_arguments(${ARGV})
-
+    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)
@@ -489,12 +751,12 @@
             foreach(CMAKE_BUILD_TYPE ${ARGUMENTS_CONFIGURATION_TYPES})
                 set(ENV{CONAN_IMPORT_PATH} ${CMAKE_BUILD_TYPE})
                 conan_cmake_settings(settings ${ARGV})
-                conan_cmake_install(SETTINGS ${settings} ${ARGV})
+                old_conan_cmake_install(SETTINGS ${settings} ${ARGV})
             endforeach()
             set(CMAKE_BUILD_TYPE)
         else()
             conan_cmake_settings(settings ${ARGV})
-            conan_cmake_install(SETTINGS ${settings} ${ARGV})
+            old_conan_cmake_install(SETTINGS ${settings} ${ARGV})
         endif()
     endif()

@@ -518,26 +780,38 @@

 macro(conan_check)
     # Checks conan availability in PATH
-    # Arguments REQUIRED and VERSION are optional
+    # Arguments REQUIRED, DETECT_QUIET and VERSION are optional
     # Example usage:
     #    conan_check(VERSION 1.0.0 REQUIRED)
-    message(STATUS "Conan: checking conan executable")
-    set(options 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!")
-    endif()
-    message(STATUS "Conan: Found program ${CONAN_CMD}")
+        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)
-    message(STATUS "Conan: Version found ${CONAN_VERSION_OUTPUT}")
+
+    if(NOT "${return_code}" STREQUAL "0")
+      message(FATAL_ERROR "Conan --version failed='${return_code}'")
+    endif()
+
+    if(NOT CONAN_DETECT_QUIET)
+        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
+        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}, \
@@ -549,24 +823,32 @@

 function(conan_add_remote)
     # Adds a remote
-    # Arguments URL and NAME are required, INDEX and COMMAND are optional
+    # 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)
-    set(oneValueArgs URL NAME INDEX COMMAND)
+    #       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(CONAN_COMMAND)
-       set(CONAN_CMD ${CONAN_COMMAND})
+    if(DEFINED CONAN_COMMAND)
+        set(CONAN_CMD ${CONAN_COMMAND})
     else()
         conan_check(REQUIRED)
     endif()
-    message(STATUS "Conan: Adding ${CONAN_NAME} remote repository (${CONAN_URL})")
-    execute_process(COMMAND ${CONAN_CMD} remote add ${CONAN_NAME} ${CONAN_URL}
-      ${CONAN_INDEX_ARG} -f)
+    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)
@@ -578,7 +860,6 @@
     set(oneValueArgs ITEM TYPE SOURCE TARGET VERIFY_SSL)
     set(multiValueArgs ARGS)
     cmake_parse_arguments(CONAN "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-    set(CONAN_CONFIG_INSTALL_ARGS "")

     find_program(CONAN_CMD conan)
     if(NOT CONAN_CMD AND CONAN_REQUIRED)
@@ -586,25 +867,35 @@
     endif()

     if(DEFINED CONAN_VERIFY_SSL)
-        set(CONAN_CONFIG_INSTALL_ARGS "${CONAN_CONFIG_INSTALL_ARGS} --verify-ssl ${CONAN_VERIFY_SSL}")
+    set(CONAN_VERIFY_SSL_ARG "--verify-ssl=${CONAN_VERIFY_SSL}")
     endif()

     if(DEFINED CONAN_TYPE)
-        set(CONAN_CONFIG_INSTALL_ARGS "${CONAN_CONFIG_INSTALL_ARGS} --type ${CONAN_TYPE}")
+    set(CONAN_TYPE_ARG "--type=${CONAN_TYPE}")
     endif()

     if(DEFINED CONAN_ARGS)
-        set(CONAN_CONFIG_INSTALL_ARGS "${CONAN_CONFIG_INSTALL_ARGS} --args \"${CONAN_ARGS}\"")
+    set(CONAN_ARGS_ARGS "--args=\"${CONAN_ARGS}\"")
     endif()

     if(DEFINED CONAN_SOURCE)
-        set(CONAN_CONFIG_INSTALL_ARGS "${CONAN_CONFIG_INSTALL_ARGS} --source-folder ${CONAN_SOURCE}")
+    set(CONAN_SOURCE_ARGS "--source-folder=${CONAN_SOURCE}")
     endif()

     if(DEFINED CONAN_TARGET)
-        set(CONAN_CONFIG_INSTALL_ARGS "${CONAN_CONFIG_INSTALL_ARGS} --target-folder ${CONAN_TARGET}")
-    endif()
+    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_CONFIG_INSTALL_ARGS} ${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()


GPRODUCTS_OBTOBJ_ENV

--- include.cmake
+++ include.cmake
@@ -113,10 +113,11 @@
     endif()

     set(GPRODUCTS_ENV $ENV{GPRODUCTS})
+    set(GPRODUCTS_OBTOBJ_ENV $ENV{BTREE}/optobj/$ENV{GSYS})
     include_directories(${GPRODUCTS_ENV}/gclib
                         ${GPRODUCTS_ENV}/apiwrap/gmdobj
                         ${GPRODUCTS_ENV}/apiwrap/joat
-                        ${BTREE}/optobj/${GSYS})
+                        ${GPRODUCTS_OBTOBJ_ENV})

     set(SOURCE ${SOURCE} ${GPRODUCTS_ENV}/gclib/gclgms.c
                          ${GPRODUCTS_ENV}/gclib/gcmt.c
@@ -124,7 +125,7 @@
                          ${GPRODUCTS_ENV}/apiwrap/joat/cfgmcc.c
                          ${GPRODUCTS_ENV}/apiwrap/joat/gevmcc.c
                          ${GPRODUCTS_ENV}/apiwrap/joat/gmomcc.c
-                         ${BTREE}/optobj/optcc.c)
+                         ${GPRODUCTS_OBTOBJ_ENV}/optcc.c)

     include_directories(${GPRODUCTS_ENV}/apiexamples/C++/api)
     set(SOURCE ${SOURCE} ${GPRODUCTS_ENV}/apiexamples/C++/api/gamsoptions.cpp


cpack: Update version number.

cpack: Update version number.

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -12,8 +12,8 @@

 ### versions
 set(CPACK_PACKAGE_VERSION_MAJOR "0")
-set(CPACK_PACKAGE_VERSION_MINOR "1")
-set(CPACK_PACKAGE_VERSION_PATCH "2")
+set(CPACK_PACKAGE_VERSION_MINOR "2")
+set(CPACK_PACKAGE_VERSION_PATCH "0")
 set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")


ENH: Changed CDash URL

ENH: Changed CDash URL

git-svn-id: 496ab2bd9c9a782235c11388890d59de1024c1f0@3535 91079597-3006-4846-9bd3-4f3fb3d139a7

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -13,8 +13,8 @@
 set(CTEST_NIGHTLY_START_TIME "1:00:00 UTC")

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "www.cdash.org")
-set(CTEST_DROP_LOCATION "/CDash/submit.php?project=CDash")
+set(CTEST_DROP_SITE "open.cdash.org")
+set(CTEST_DROP_LOCATION "/submit.php?project=CDash")
 set(CTEST_DROP_SITE_CDASH TRUE)
 set(CTEST_CDASH_VERSION "1.6")
 set(CTEST_CDASH_QUERY_VERSION TRUE)


removed GOMC_CUDA from each ensemble flag

--- CMake/GOMCCUDASetup.cmake
+++ CMake/GOMCCUDASetup.cmake
@@ -11,13 +11,13 @@

 include_directories(src/GPU)

-set(GPU_NPT_flags "-DENSEMBLE=4 -DGOMC_CUDA")
+set(GPU_NPT_flags "-DENSEMBLE=4")
 set(GPU_NPT_name "GOMC_GPU_NPT")
-set(GPU_GC_flags "-DENSEMBLE=3 -DGOMC_CUDA")
+set(GPU_GC_flags "-DENSEMBLE=3")
 set(GPU_GC_name "GOMC_GPU_GCMC")
-set(GPU_GE_flags "-DENSEMBLE=2 -DGOMC_CUDA")
+set(GPU_GE_flags "-DENSEMBLE=2")
 set(GPU_GE_name "GOMC_GPU_GEMC")
-set(GPU_NVT_flags "-DENSEMBLE=1 -DGOMC_CUDA")
+set(GPU_NVT_flags "-DENSEMBLE=1")
 set(GPU_NVT_name "GOMC_GPU_NVT")

 if(NOT DEFINED CMAKE_CUDA_STANDARD)


fixed issue #63

fixed issue #63

--- CMake/GOMCCUDASetup.cmake
+++ CMake/GOMCCUDASetup.cmake
@@ -4,8 +4,6 @@
 set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-Wno-deprecated-gpu-targets)
 set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-Xcompiler -std=c++98)
 set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-Xcompiler -D__CORRECT_ISO_CPP11_MATH_H_PROTO)
-set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-gencode arch=compute_20,code=sm_20)
-set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-gencode arch=compute_20,code=sm_21)
 set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-gencode arch=compute_30,code=sm_30)
 set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-gencode arch=compute_35,code=sm_35)
 set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-gencode arch=compute_50,code=sm_50)


Fix CPack rules to properly handle win32

--- CMake/VisomicsCPack.cmake
+++ CMake/VisomicsCPack.cmake
@@ -23,8 +23,7 @@
         FILES_MATCHING PATTERN "${QT_LIB_NAME_tmp}*"
         PATTERN "${QT_LIB_NAME_tmp}*.debug" EXCLUDE)
     ELSEIF(WIN32)
-      GET_FILENAME_COMPONENT(QT_DLL_PATH_tmp ${QT_QMAKE_EXECUTABLE} PATH)
-      INSTALL(FILES ${QT_DLL_PATH_tmp}/${qtlib}4.dll
+      INSTALL(FILES ${QT_LIBRARY_DIR}/${qtlib}4.dll
         DESTINATION ${QT_INSTALL_LIB_DIR} COMPONENT Runtime)
     ENDIF()
   ENDIF()
@@ -54,12 +53,11 @@
       LIST(APPEND files ${R_LIBRARY_LAPACK})
     ENDIF()
     INSTALL(FILES ${files}
-      DESTINATION ${Visomics_INSTALL_LIB_DIR} COMPONENT Runtime)
+	    DESTINATION ${Visomics_INSTALL_LIB_DIR} COMPONENT Runtime)
   ELSEIF(WIN32)
     #TODO
   ENDIF()
 ENDIF()
-

 # -------------------------------------------------------------------------
 # Build a CPack installer
@@ -74,7 +72,7 @@
 SET(CPACK_PACKAGE_VERSION_PATCH "${Visomics_BUILD_VERSION}")
 SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Visomics ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
 SET(CPACK_SOURCE_PACKAGE_FILE_NAME "Visomics-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-SET(CPACK_PACKAGE_EXECUTABLES "Visomics")
+SET(CPACK_PACKAGE_EXECUTABLES "Visomics;Visomics")

 # -------------------------------------------------------------------------
 # Install Visomics
@@ -89,5 +87,6 @@
   set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${VTK_DIR};VTK;RuntimeLibraries;/")
 endif()

+INCLUDE (InstallRequiredSystemLibraries)
 INCLUDE(CPack)


Enable minimal rebuild and incremental linking for RelWithDebInfo builds.

--- indra/cmake/00-Common.cmake
+++ indra/cmake/00-Common.cmake
@@ -38,7 +38,7 @@
   set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MDd /MP"
       CACHE STRING "C++ compiler debug options" FORCE)
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
-      "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /MP"
+      "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /MP /Gm /INCREMENTAL"
       CACHE STRING "C++ compiler release-with-debug options" FORCE)
   set(CMAKE_CXX_FLAGS_RELEASE
       "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP"


Remove compute 1.3 from double builds as well

There are two problems in support this old hardware.
1) Some argument lists go over the 256 byte max
2) Annoying to have to update tex2D textures to work with double4's.

I don't think anyone seriously runs on compute 1.3 hardware that much any more.

refs #1035

--- CMake/hoomd/HOOMDCUDASetup.cmake
+++ CMake/hoomd/HOOMDCUDASetup.cmake
@@ -42,7 +42,7 @@

     # if double precision is on, remove incompatible arches
     if (NOT SINGLE_PRECISION)
-        list(REMOVE_ITEM CUDA_ARCH_LIST 12 11 10)
+        list(REMOVE_ITEM CUDA_ARCH_LIST 13 12 11 10)
     endif()

     foreach(_cuda_arch ${CUDA_ARCH_LIST})


cpack settings for creating Debian packages

--- CMakeModules/CPackSettings.cmake
+++ CMakeModules/CPackSettings.cmake
@@ -24,7 +24,18 @@
     "/bindings/"
     "TODO")
 set(CPACK_SOURCE_GENERATOR "TGZ;ZIP")
-set(CPACK_GENERATOR "TGZ;ZIP")
+set(CPACK_GENERATOR "TGZ")
+
+if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+  set(CPACK_GENERATOR "DEB;${CPACK_GENERATOR}")
+  set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}")
+  set(CPACK_PACKAGE_FILE_NAME "ompl_${OMPL_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
+  set(CPACK_DEBIAN_PACKAGE_DEPENDS "python${PYTHON_VERSION}, libboost-all-dev, libode-dev")
+endif()
+
+if(WIN32)
+  set(CPACK_GENERATOR "ZIP;${CPACK_GENERATOR}")
+endif()

 include(CPack)


Update CLBlast to fix some errors on Turing cards

--- CMakeModules/build_CLBlast.cmake
+++ CMakeModules/build_CLBlast.cmake
@@ -7,7 +7,7 @@

 af_dep_check_and_populate(${clblast_prefix}
   URI https://github.com/cnugteren/CLBlast.git
-  REF 1.5.2
+  REF 4500a03440e2cc54998c0edab366babf5e504d67
 )

 include(ExternalProject)


added tighten again to testing

added tighten again to testing

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -16,7 +16,7 @@

 set(CTEST_PROJECT_NAME "Embree")
 set(CTEST_NIGHTLY_START_TIME "22:00:00 UTC")
-set(TEST_MODELS_HASH b20dc17ecad3d1313795af4ba20429d59de7fc41)
+set(TEST_MODELS_HASH 6d2b2b387b475dbd5869cd77bfaf1c66c07874da)

 IF (NOT CTEST_DROP_SITE)
   set(CTEST_DROP_METHOD "http")


added curved linear linear mblur test

added curved linear linear mblur test


fix eventually static lib renaming, if static and shared lib are built if platform is not windows

git-svn-id: e0b5bbb11d0e9fdbbfcabba14dc32ad5d6b235bd@981 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/ACGCommon.cmake
+++ cmake/ACGCommon.cmake
@@ -472,11 +472,18 @@
   endif(WIN32 OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE))

   if (_and_static)
-      add_custom_command (TARGET ${_target}Static POST_BUILD
-                          COMMAND ${CMAKE_COMMAND} -E
-                          copy_if_different
-                            $<TARGET_FILE:${_target}Static>
-                            ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/$<TARGET_FILE_NAME:${_target}Static>)
+    if( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
+      set ( postfix ${CMAKE_DEBUG_POSTFIX} )
+    else ()
+      set ( postfix "" )
+    endif ()
+
+    set( fullname ${_target}${postfix} )
+    add_custom_command (TARGET ${_target}Static POST_BUILD
+                        COMMAND ${CMAKE_COMMAND} -E
+                        copy_if_different
+                          $<TARGET_FILE:${_target}Static>
+                          ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/lib${fullname}.a)

   endif ()


Individually cache each source file found in FindCMSIS

--- cmake/FindCMSIS.cmake
+++ cmake/FindCMSIS.cmake
@@ -115,23 +115,24 @@
 )

 FOREACH(SRC ${CMSIS_DEVICE_SOURCES})
-    SET(SRC_FILE SRC_FILE-NOTFOUND)
-    FIND_FILE(SRC_FILE ${SRC}
+    STRING(MAKE_C_IDENTIFIER "${SRC}" SRC_CLEAN)
+    SET(CMSIS_${SRC_CLEAN}_FILE SRC_FILE-NOTFOUND)
+    FIND_FILE(CMSIS_${SRC_CLEAN}_FILE ${SRC}
         PATH_SUFFIXES src stm32${STM32_FAMILY_LOWER} cmsis
         HINTS ${STM32Cube_DIR}/Drivers/CMSIS/Device/ST/STM32${STM32_FAMILY}xx/Source/Templates/
         CMAKE_FIND_ROOT_PATH_BOTH
     )
-    LIST(APPEND CMSIS_SOURCES ${SRC_FILE})
+    LIST(APPEND CMSIS_SOURCES ${CMSIS_${SRC_CLEAN}_FILE})
 ENDFOREACH()

 IF(STM32_CHIP_TYPE)
-    SET(SRC_FILE SRC_FILE-NOTFOUND)
-    FIND_FILE(SRC_FILE ${CMSIS_STARTUP_SOURCE}
+    SET(CMSIS_STARTUP_SOURCE_FILE SRC_FILE-NOTFOUND)
+    FIND_FILE(CMSIS_STARTUP_SOURCE_FILE ${CMSIS_STARTUP_SOURCE}
         PATH_SUFFIXES src stm32${STM32_FAMILY_LOWER} cmsis
         HINTS ${STM32Cube_DIR}/Drivers/CMSIS/Device/ST/STM32${STM32_FAMILY}xx/Source/Templates/gcc/
         CMAKE_FIND_ROOT_PATH_BOTH
     )
-    LIST(APPEND CMSIS_SOURCES ${SRC_FILE})
+    LIST(APPEND CMSIS_SOURCES ${CMSIS_STARTUP_SOURCE_FILE})
 ENDIF()

 INCLUDE(FindPackageHandleStandardArgs)


Remove CMake find module for GMock

Remove CMake find module for GMock

GMock is handled by Conan

--- cmake/FindGMock.cmake
+++ cmake/FindGMock.cmake
@@ -1,515 +0,0 @@
-# Get the Google C++ Mocking Framework.
-# (This file is almost an copy of the original FindGTest.cmake file,
-#  altered to download and compile GMock and GTest if not found
-#  in GMOCK_ROOT or GTEST_ROOT respectively,
-#  feel free to use it as it is or modify it for your own needs.)
-#
-# Defines the following variables:
-#
-#   GMOCK_FOUND - Found or got the Google Mocking framework
-#   GTEST_FOUND - Found or got the Google Testing framework
-#   GMOCK_INCLUDE_DIRS - GMock include directory
-#   GTEST_INCLUDE_DIRS - GTest include direcotry
-#
-# Also defines the library variables below as normal variables
-#
-#   GMOCK_BOTH_LIBRARIES - Both libgmock & libgmock_main
-#   GMOCK_LIBRARIES - libgmock
-#   GMOCK_MAIN_LIBRARIES - libgmock-main
-#
-#   GTEST_BOTH_LIBRARIES - Both libgtest & libgtest_main
-#   GTEST_LIBRARIES - libgtest
-#   GTEST_MAIN_LIBRARIES - libgtest_main
-#
-# Accepts the following variables as input:
-#
-#   GMOCK_ROOT - The root directory of the gmock install prefix
-#   GTEST_ROOT - The root directory of the gtest install prefix
-#   GMOCK_SRC_DIR -The directory of the gmock sources
-#   GMOCK_VER - The version of the gmock sources to be downloaded
-#
-#-----------------------
-# Example Usage:
-#
-#    set(GMOCK_ROOT "~/gmock")
-#    find_package(GMock REQUIRED)
-#    include_directories(${GMOCK_INCLUDE_DIRS})
-#
-#    add_executable(foo foo.cc)
-#    target_link_libraries(foo ${GMOCK_BOTH_LIBRARIES})
-#
-#=============================================================================
-# Copyright (c) 2016 Michel Estermann
-# Copyright (c) 2016 Kamil Strzempowicz
-# Copyright (c) 2011 Matej Svec
-#
-# CMake - Cross Platform Makefile Generator
-# Copyright 2000-2016 Kitware, Inc.
-# Copyright 2000-2011 Insight Software Consortium
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# * Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-#
-# * Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-#
-# * Neither the names of Kitware, Inc., the Insight Software Consortium,
-#   nor the names of their contributors may be used to endorse or promote
-#   products derived from this software without specific prior written
-#   permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# ------------------------------------------------------------------------------
-#
-# The above copyright and license notice applies to distributions of
-# CMake in source and binary form.  Some source files contain additional
-# notices of original copyright by their contributors; see each source
-# for details.  Third-party software packages supplied with CMake under
-# compatible licenses provide their own copyright notices documented in
-# corresponding subdirectories.
-#
-# ------------------------------------------------------------------------------
-#
-# CMake was initially developed by Kitware with the following sponsorship:
-#
-#  * National Library of Medicine at the National Institutes of Health
-#    as part of the Insight Segmentation and Registration Toolkit (ITK).
-#
-#  * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
-#    Visualization Initiative.
-#
-#  * National Alliance for Medical Image Computing (NAMIC) is funded by the
-#    National Institutes of Health through the NIH Roadmap for Medical Research,
-#    Grant U54 EB005149.
-#
-#  * Kitware, Inc.
-#=============================================================================
-# Thanks to Daniel Blezek <blezek@gmail.com> for the GTEST_ADD_TESTS code
-
-function(gtest_add_tests executable extra_args)
-    if(NOT ARGN)
-        message(FATAL_ERROR "Missing ARGN: Read the documentation for GTEST_ADD_TESTS")
-    endif()
-    if(ARGN STREQUAL "AUTO")
-        # obtain sources used for building that executable
-        get_property(ARGN TARGET ${executable} PROPERTY SOURCES)
-    endif()
-    set(gtest_case_name_regex ".*\\( *([A-Za-z_0-9]+) *, *([A-Za-z_0-9]+) *\\).*")
-    set(gtest_test_type_regex "(TYPED_TEST|TEST_?[FP]?)")
-    foreach(source ${ARGN})
-        file(READ "${source}" contents)
-        string(REGEX MATCHALL "${gtest_test_type_regex} *\\(([A-Za-z_0-9 ,]+)\\)" found_tests ${contents})
-        foreach(hit ${found_tests})
-            string(REGEX MATCH "${gtest_test_type_regex}" test_type ${hit})
-
-            # Parameterized tests have a different signature for the filter
-            if("x${test_type}" STREQUAL "xTEST_P")
-                string(REGEX REPLACE ${gtest_case_name_regex} "*/\\1.\\2/*" test_name ${hit})
-            elseif("x${test_type}" STREQUAL "xTEST_F" OR "x${test_type}" STREQUAL "xTEST")
-                string(REGEX REPLACE ${gtest_case_name_regex} "\\1.\\2" test_name ${hit})
-            elseif("x${test_type}" STREQUAL "xTYPED_TEST")
-                string(REGEX REPLACE ${gtest_case_name_regex} "\\1/*.\\2" test_name ${hit})
-            else()
-                message(WARNING "Could not parse GTest ${hit} for adding to CTest.")
-                continue()
-            endif()
-            add_test(NAME ${test_name} COMMAND ${executable} --gtest_filter=${test_name} ${extra_args})
-        endforeach()
-    endforeach()
-endfunction()
-
-function(_append_debugs _endvar _library)
-    if(${_library} AND ${_library}_DEBUG)
-        set(_output optimized ${${_library}} debug ${${_library}_DEBUG})
-    else()
-        set(_output ${${_library}})
-    endif()
-    set(${_endvar} ${_output} PARENT_SCOPE)
-endfunction()
-
-function(_gmock_find_library _name)
-    find_library(${_name}
-        NAMES ${ARGN}
-        HINTS
-        ENV GMOCK_ROOT
-        ${GMOCK_ROOT}
-        PATH_SUFFIXES ${_gmock_libpath_suffixes}
-        )
-    mark_as_advanced(${_name})
-endfunction()
-
-function(_gtest_find_library _name)
-    find_library(${_name}
-        NAMES ${ARGN}
-        HINTS
-        ENV GTEST_ROOT
-        ${GTEST_ROOT}
-        PATH_SUFFIXES ${_gtest_libpath_suffixes}
-        )
-    mark_as_advanced(${_name})
-endfunction()
-
-if(NOT DEFINED GMOCK_MSVC_SEARCH)
-    set(GMOCK_MSVC_SEARCH MD)
-endif()
-
-set(_gmock_libpath_suffixes lib)
-set(_gtest_libpath_suffixes lib)
-if(MSVC)
-    if(GMOCK_MSVC_SEARCH STREQUAL "MD")
-        list(APPEND _gmock_libpath_suffixes
-            msvc/gmock-md/Debug
-            msvc/gmock-md/Release)
-        list(APPEND _gtest_libpath_suffixes
-            msvc/gtest-md/Debug
-            msvc/gtest-md/Release)
-    elseif(GMOCK_MSVC_SEARCH STREQUAL "MT")
-        list(APPEND _gmock_libpath_suffixes
-            msvc/gmock/Debug
-            msvc/gmock/Release)
-        list(APPEND _gtest_libpath_suffixes
-            msvc/gtest/Debug
-            msvc/gtest/Release)
-    endif()
-endif()
-
-find_path(GMOCK_INCLUDE_DIR gmock/gmock.h
-    HINTS
-    $ENV{GMOCK_ROOT}/include
-    ${GMOCK_ROOT}/include
-    )
-mark_as_advanced(GMOCK_INCLUDE_DIR)
-
-find_path(GTEST_INCLUDE_DIR gtest/gtest.h
-    HINTS
-    $ENV{GTEST_ROOT}/include
-    ${GTEST_ROOT}/include
-    )
-mark_as_advanced(GTEST_INCLUDE_DIR)
-
-if(MSVC AND GMOCK_MSVC_SEARCH STREQUAL "MD")
-    # The provided /MD project files for Google Mock add -md suffixes to the
-    # library names.
-    _gmock_find_library(GMOCK_LIBRARY gmock-md gmock)
-    _gmock_find_library(GMOCK_LIBRARY_DEBUG gmock-mdd gmockd)
-    _gmock_find_library(GMOCK_MAIN_LIBRARY gmock_main-md gmock_main)
-    _gmock_find_library(GMOCK_MAIN_LIBRARY_DEBUG gmock_main-mdd gmock_maind)
-
-    _gtest_find_library(GTEST_LIBRARY gtest-md gtest)
-    _gtest_find_library(GTEST_LIBRARY_DEBUG gtest-mdd gtestd)
-    _gtest_find_library(GTEST_MAIN_LIBRARY gtest_main-md gtest_main)
-    _gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtest_main-mdd gtest_maind)
-else()
-    _gmock_find_library(GMOCK_LIBRARY gmock)
-    _gmock_find_library(GMOCK_LIBRARY_DEBUG gmockd)
-    _gmock_find_library(GMOCK_MAIN_LIBRARY gmock_main)
-    _gmock_find_library(GMOCK_MAIN_LIBRARY_DEBUG gmock_maind)
-
-    _gtest_find_library(GTEST_LIBRARY gtest)
-    _gtest_find_library(GTEST_LIBRARY_DEBUG gtestd)
-    _gtest_find_library(GTEST_MAIN_LIBRARY gtest_main)
-    _gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtest_maind)
-endif()
-
-if(NOT TARGET GTest::GTest)
-    add_library(GTest::GTest UNKNOWN IMPORTED)
-endif()
-if(NOT TARGET GTest::Main)
-    add_library(GTest::Main UNKNOWN IMPORTED)
-endif()
-
-if(NOT TARGET GMock::GMock)
-    add_library(GMock::GMock UNKNOWN IMPORTED)
-endif()
-
-if(NOT TARGET GMock::Main)
-    add_library(GMock::Main UNKNOWN IMPORTED)
-endif()
-
-set(GMOCK_LIBRARY_EXISTS OFF)
-set(GTEST_LIBRARY_EXISTS OFF)
-
-if(EXISTS "${GMOCK_LIBRARY}" OR EXISTS "${GMOCK_LIBRARY_DEBUG}" AND GMOCK_INCLUDE_DIR)
-    set(GMOCK_LIBRARY_EXISTS ON)
-endif()
-
-if(EXISTS "${GTEST_LIBRARY}" OR EXISTS "${GTEST_LIBRARY_DEBUG}" AND GTEST_INCLUDE_DIR)
-    set(GTEST_LIBRARY_EXISTS ON)
-endif()
-
-if(NOT (${GMOCK_LIBRARY_EXISTS} AND ${GTEST_LIBRARY_EXISTS}))
-
-    include(ExternalProject)
-
-    if(GTEST_USE_STATIC_LIBS)
-        set(GTEST_CMAKE_ARGS -Dgtest_force_shared_crt:BOOL=ON -DBUILD_SHARED_LIBS=OFF)
-        if(BUILD_SHARED_LIBS)
-            list(APPEND GTEST_CMAKE_ARGS
-                -DCMAKE_POSITION_INDEPENDENT_CODE=ON
-                -Dgtest_hide_internal_symbols=ON
-                -DCMAKE_CXX_VISIBILITY_PRESET=hidden
-                -DCMAKE_VISIBILITY_INLINES_HIDDEN=ON
-                -DCMAKE_POLICY_DEFAULT_CMP0063=NEW
-            )
-        endif()
-        set(GTEST_LIBRARY_PREFIX ${CMAKE_STATIC_LIBRARY_PREFIX})
-    else()
-        set(GTEST_CMAKE_ARGS -DBUILD_SHARED_LIBS=ON)
-        set(GTEST_LIBRARY_PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX})
-    endif()
-    if(WIN32)
-        list(APPEND GTEST_CMAKE_ARGS -Dgtest_disable_pthreads=ON)
-    endif()
-
-    if("${GMOCK_SRC_DIR}" STREQUAL "")
-        message(STATUS "Downloading GMock / GTest version ${GMOCK_VER} from git")
-        if("${GMOCK_VER}" STREQUAL "1.6.0" OR "${GMOCK_VER}" STREQUAL "1.7.0")
-            set(GTEST_BIN_DIR "${GMOCK_ROOT}/src/gtest-build")
-            set(GTEST_LIBRARY "${GTEST_BIN_DIR}/${CMAKE_CFG_INTDIR}/${GTEST_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}")
-            set(GTEST_MAIN_LIBRARY "${GTEST_BIN_DIR}/${CMAKE_CFG_INTDIR}/${GTEST_LIBRARY_PREFIX}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}")
-            mark_as_advanced(GTEST_LIBRARY)
-            mark_as_advanced(GTEST_MAIN_LIBRARY)
-
-            externalproject_add(
-                gtest
-                GIT_REPOSITORY "https://github.com/google/googletest.git"
-                GIT_TAG "release-${GMOCK_VER}"
-                PREFIX ${GMOCK_ROOT}
-                INSTALL_COMMAND ""
-                LOG_DOWNLOAD ON
-                LOG_CONFIGURE ON
-                LOG_BUILD ON
-                CMAKE_ARGS
-                    ${GTEST_CMAKE_ARGS}
-                BINARY_DIR ${GTEST_BIN_DIR}
-                BUILD_BYPRODUCTS
-                    "${GTEST_LIBRARY}"
-                    "${GTEST_MAIN_LIBRARY}"
-            )
-
-            set(GMOCK_BIN_DIR "${GMOCK_ROOT}/src/gmock-build")
-            set(GMOCK_LIBRARY "${GMOCK_BIN_DIR}/${CMAKE_CFG_INTDIR}/${GTEST_LIBRARY_PREFIX}gmock${CMAKE_STATIC_LIBRARY_SUFFIX}")
-            set(GMOCK_MAIN_LIBRARY "${GMOCK_BIN_DIR}/${CMAKE_CFG_INTDIR}/${GTEST_LIBRARY_PREFIX}gmock_main${CMAKE_STATIC_LIBRARY_SUFFIX}")
-            mark_as_advanced(GMOCK_LIBRARY)
-            mark_as_advanced(GMOCK_MAIN_LIBRARY)
-
-            externalproject_add(
-                gmock
-                GIT_REPOSITORY "https://github.com/google/googlemock.git"
-                GIT_TAG "release-${GMOCK_VER}"
-                PREFIX ${GMOCK_ROOT}
-                INSTALL_COMMAND ""
-                LOG_DOWNLOAD ON
-                LOG_CONFIGURE ON
-                LOG_BUILD ON
-                CMAKE_ARGS
-                    ${GTEST_CMAKE_ARGS}
-                BINARY_DIR ${GMOCK_BIN_DIR}
-                BUILD_BYPRODUCTS
-                    "${GMOCK_LIBRARY}"
-                    "${GMOCK_MAIN_LIBRARY}"
-            )
-
-            add_dependencies(gmock gtest)
-
-            add_dependencies(GTest::GTest gtest)
-            add_dependencies(GTest::Main gtest)
-            add_dependencies(GMock::GMock gmock)
-            add_dependencies(GMock::Main gmock)
-
-            externalproject_get_property(gtest source_dir)
-            set(GTEST_INCLUDE_DIR "${source_dir}/include")
-            mark_as_advanced(GTEST_INCLUDE_DIR)
-            externalproject_get_property(gmock source_dir)
-            set(GMOCK_INCLUDE_DIR "${source_dir}/include")
-            mark_as_advanced(GMOCK_INCLUDE_DIR)
-        else() #1.8.0
-            set(GMOCK_BIN_DIR "${GMOCK_ROOT}/src/gmock-build")
-            set(GTEST_LIBRARY "${GMOCK_BIN_DIR}/googlemock/gtest/${CMAKE_CFG_INTDIR}/${GTEST_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}")
-            set(GTEST_MAIN_LIBRARY "${GMOCK_BIN_DIR}/googlemock/gtest/${CMAKE_CFG_INTDIR}/${GTEST_LIBRARY_PREFIX}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}")
-            set(GMOCK_LIBRARY "${GMOCK_BIN_DIR}/googlemock/${CMAKE_CFG_INTDIR}/${GTEST_LIBRARY_PREFIX}gmock${CMAKE_STATIC_LIBRARY_SUFFIX}")
-            set(GMOCK_MAIN_LIBRARY "${GMOCK_BIN_DIR}/googlemock/${CMAKE_CFG_INTDIR}/${GTEST_LIBRARY_PREFIX}gmock_main${CMAKE_STATIC_LIBRARY_SUFFIX}")
-            mark_as_advanced(GTEST_LIBRARY)
-            mark_as_advanced(GTEST_MAIN_LIBRARY)
-            mark_as_advanced(GMOCK_LIBRARY)
-            mark_as_advanced(GMOCK_MAIN_LIBRARY)
-
-            externalproject_add(
-                gmock
-                GIT_REPOSITORY "https://github.com/google/googletest.git"
-                GIT_TAG "release-${GMOCK_VER}"
-                PREFIX ${GMOCK_ROOT}
-                INSTALL_COMMAND ""
-                LOG_DOWNLOAD ON
-                LOG_CONFIGURE ON
-                LOG_BUILD ON
-                CMAKE_ARGS
-                    ${GTEST_CMAKE_ARGS}
-                BINARY_DIR "${GMOCK_BIN_DIR}"
-                BUILD_BYPRODUCTS
-                    "${GTEST_LIBRARY}"
-                    "${GTEST_MAIN_LIBRARY}"
-                    "${GMOCK_LIBRARY}"
-                    "${GMOCK_MAIN_LIBRARY}"
-            )
-
-            add_dependencies(GTest::GTest gmock)
-            add_dependencies(GTest::Main gmock)
-            add_dependencies(GMock::GMock gmock)
-            add_dependencies(GMock::Main gmock)
-
-            externalproject_get_property(gmock source_dir)
-            set(GTEST_INCLUDE_DIR "${source_dir}/googletest/include")
-            set(GMOCK_INCLUDE_DIR "${source_dir}/googlemock/include")
-            mark_as_advanced(GMOCK_INCLUDE_DIR)
-            mark_as_advanced(GTEST_INCLUDE_DIR)
-        endif()
-
-        # Prevent CMake from complaining about these directories missing when the libgtest/libgmock targets get used as dependencies
-        file(MAKE_DIRECTORY ${GTEST_INCLUDE_DIR} ${GMOCK_INCLUDE_DIR})
-    else()
-        message(STATUS "Building Gmock / Gtest from dir ${GMOCK_SRC_DIR}")
-
-        set(GMOCK_BIN_DIR "${GMOCK_ROOT}/src/gmock-build")
-        set(GTEST_LIBRARY "${GMOCK_BIN_DIR}/gtest/${CMAKE_CFG_INTDIR}/${GTEST_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}")
-        set(GTEST_MAIN_LIBRARY "${GMOCK_BIN_DIR}/gtest/${CMAKE_CFG_INTDIR}/${GTEST_LIBRARY_PREFIX}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}")
-        set(GMOCK_LIBRARY "${GMOCK_BIN_DIR}/${CMAKE_CFG_INTDIR}/${GTEST_LIBRARY_PREFIX}gmock${CMAKE_STATIC_LIBRARY_SUFFIX}")
-        set(GMOCK_MAIN_LIBRARY "${GMOCK_BIN_DIR}/${CMAKE_CFG_INTDIR}/${GTEST_LIBRARY_PREFIX}gmock_main${CMAKE_STATIC_LIBRARY_SUFFIX}")
-        mark_as_advanced(GTEST_LIBRARY)
-        mark_as_advanced(GTEST_MAIN_LIBRARY)
-        mark_as_advanced(GMOCK_LIBRARY)
-        mark_as_advanced(GMOCK_MAIN_LIBRARY)
-
-        if(EXISTS "${GMOCK_SRC_DIR}/gtest/include/gtest/gtest.h")
-            set(GTEST_INCLUDE_DIR "${GMOCK_SRC_DIR}/gtest/include")
-            mark_as_advanced(GTEST_INCLUDE_DIR)
-        endif()
-        if(EXISTS "${GMOCK_SRC_DIR}/include/gmock/gmock.h")
-            set(GMOCK_INCLUDE_DIR "${GMOCK_SRC_DIR}/include")
-            mark_as_advanced(GMOCK_INCLUDE_DIR)
-        elseif(EXISTS "${GMOCK_SRC_DIR}/../../include/gmock/gmock.h")
-            set(GMOCK_INCLUDE_DIR "${GMOCK_SRC_DIR}/../../include")
-            if(IS_ABSOLUTE "${GMOCK_INCLUDE_DIR}")
-                get_filename_component(GMOCK_INCLUDE_DIR "${GMOCK_INCLUDE_DIR}" ABSOLUTE)
-            endif()
-            mark_as_advanced(GMOCK_INCLUDE_DIR)
-        endif()
-
-        externalproject_add(
-            gmock
-            SOURCE_DIR ${GMOCK_SRC_DIR}
-            PREFIX ${GMOCK_ROOT}
-            INSTALL_COMMAND ""
-            LOG_DOWNLOAD ON
-            LOG_CONFIGURE ON
-            LOG_BUILD ON
-            CMAKE_ARGS
-                ${GTEST_CMAKE_ARGS}
-            BINARY_DIR "${GMOCK_BIN_DIR}"
-            BUILD_BYPRODUCTS
-                "${GTEST_LIBRARY}"
-                "${GTEST_MAIN_LIBRARY}"
-                "${GMOCK_LIBRARY}"
-                "${GMOCK_MAIN_LIBRARY}"
-        )
-
-        add_dependencies(GTest::GTest gmock)
-        add_dependencies(GTest::Main gmock)
-        add_dependencies(GMock::GMock gmock)
-        add_dependencies(GMock::Main gmock)
-    endif()
-endif()
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(GTest DEFAULT_MSG GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
-find_package_handle_standard_args(GMock DEFAULT_MSG GMOCK_LIBRARY GMOCK_INCLUDE_DIR GMOCK_MAIN_LIBRARY)
-
-include(CMakeFindDependencyMacro)
-find_dependency(Threads)
-
-set_target_properties(GTest::GTest PROPERTIES
-    INTERFACE_LINK_LIBRARIES "Threads::Threads"
-    IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
-    IMPORTED_LOCATION "${GTEST_LIBRARY}"
-    )
-
-if(GTEST_INCLUDE_DIR)
-    set_target_properties(GTest::GTest PROPERTIES
-        INTERFACE_INCLUDE_DIRECTORIES "${GTEST_INCLUDE_DIR}"
-        INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${GTEST_INCLUDE_DIR}"
-    )
-endif()
-
-set_target_properties(GTest::Main PROPERTIES
-    INTERFACE_LINK_LIBRARIES "GTest::GTest"
-    IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
-    IMPORTED_LOCATION "${GTEST_MAIN_LIBRARY}")
-
-set_target_properties(GMock::GMock PROPERTIES
-    INTERFACE_LINK_LIBRARIES "Threads::Threads"
-    IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
-    IMPORTED_LOCATION "${GMOCK_LIBRARY}")
-
-if(GMOCK_INCLUDE_DIR)
-    set_target_properties(GMock::GMock PROPERTIES
-        INTERFACE_INCLUDE_DIRECTORIES "${GMOCK_INCLUDE_DIR}"
-        INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${GMOCK_INCLUDE_DIR}"
-    )
-    if(GMOCK_VER VERSION_LESS "1.7")
-        # GMock 1.6 still has GTest as an external link-time dependency,
-        # so just specify it on the link interface.
-        set_property(TARGET GMock::GMock APPEND PROPERTY
-            INTERFACE_LINK_LIBRARIES GTest::GTest)
-    elseif(GTEST_INCLUDE_DIR)
-        # GMock 1.7 and beyond doesn't have it as a link-time dependency anymore,
-        # so merge it's compile-time interface (include dirs) with ours.
-        set_property(TARGET GMock::GMock APPEND PROPERTY
-            INTERFACE_INCLUDE_DIRECTORIES "${GTEST_INCLUDE_DIR}")
-        set_property(TARGET GMock::GMock APPEND PROPERTY
-            INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${GTEST_INCLUDE_DIR}")
-    endif()
-endif()
-
-set_target_properties(GMock::Main PROPERTIES
-    INTERFACE_LINK_LIBRARIES "GMock::GMock"
-    IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
-    IMPORTED_LOCATION "${GMOCK_MAIN_LIBRARY}")
-
-if(GTEST_FOUND)
-    set(GTEST_INCLUDE_DIRS ${GTEST_INCLUDE_DIR})
-    set(GTEST_LIBRARIES GTest::GTest)
-    set(GTEST_MAIN_LIBRARIES GTest::Main)
-    set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES})
-    if(VERBOSE)
-        message(STATUS "GTest includes: ${GTEST_INCLUDE_DIRS}")
-        message(STATUS "GTest libs: ${GTEST_BOTH_LIBRARIES}")
-    endif()
-endif()
-
-if(GMOCK_FOUND)
-    set(GMOCK_INCLUDE_DIRS ${GMOCK_INCLUDE_DIR})
-    set(GMOCK_LIBRARIES GMock::GMock)
-    set(GMOCK_MAIN_LIBRARIES GMock::Main)
-    set(GMOCK_BOTH_LIBRARIES ${GMOCK_LIBRARIES} ${GMOCK_MAIN_LIBRARIES})
-    if(VERBOSE)
-        message(STATUS "GMock includes: ${GMOCK_INCLUDE_DIRS}")
-        message(STATUS "GMock libs: ${GMOCK_BOTH_LIBRARIES}")
-    endif()
-endif()


STXXL's debug build creates stxxl_debug.{a,so}, adapts FindSTXXL

References:

- https://github.com/Project-OSRM/osrm-backend/issues/1885

--- cmake/FindSTXXL.cmake
+++ cmake/FindSTXXL.cmake
@@ -24,7 +24,7 @@
 )

 FIND_LIBRARY(STXXL_LIBRARY
-  NAMES stxxl
+  NAMES stxxl stxxl_debug
   HINTS
   $ENV{STXXL_DIR}
   PATH_SUFFIXES lib64 lib


[cmake] Get the MSVC version by running cl rather than relying on MSVC_VERSION

MSVC_VERSION comes from the _MSC_VER macro, which won't correspond to
the STL version if the host compiler is clang-cl.

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@264901 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -139,6 +139,27 @@
   message(FATAL_ERROR "Please use architecture with 4 or 8 byte pointers.")
 endif()

+# Find and run MSVC (not clang-cl) and get its version. This will tell clang-cl
+# what version of MSVC to pretend to be so that the STL works.
+set(MSVC_VERSION_FLAG "")
+if (MSVC)
+  # Find and run MSVC (not clang-cl) and get its version. This will tell
+  # clang-cl what version of MSVC to pretend to be so that the STL works.
+  execute_process(COMMAND "$ENV{VSINSTALLDIR}/VC/bin/cl.exe"
+    OUTPUT_QUIET
+    ERROR_VARIABLE MSVC_COMPAT_VERSION
+    )
+  string(REGEX REPLACE "^.*Compiler Version ([0-9.]+) for .*$" "\\1"
+    MSVC_COMPAT_VERSION "${MSVC_COMPAT_VERSION}")
+  if (MSVC_COMPAT_VERSION MATCHES "^[0-9].+$")
+    set(MSVC_VERSION_FLAG "-fms-compatibility-version=${MSVC_COMPAT_VERSION}")
+    # Add this flag into the host build if this is clang-cl.
+    if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+      append("${MSVC_VERSION_FLAG}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+    endif()
+  endif()
+endif()
+
 # Generate the COMPILER_RT_SUPPORTED_ARCH list.
 if(ANDROID)
   # Examine compiler output to determine target architecture.
@@ -154,15 +175,10 @@
       test_target_arch(i686 __i686__ "-m32")
       test_target_arch(i386 __i386__ "-m32")
     else()
-      # Extract the major version from CMake's MSVC_VERSION variable and pass
-      # it to -fms-compatibility-version. The major version controls the most
-      # important parts of clang's compatibility.
-      string(SUBSTRING "${MSVC_VERSION}" 0 2 MSVC_MAJOR_VERSION)
-      set(flags "-fms-compatibility-version=${MSVC_MAJOR_VERSION}")
       if (CMAKE_SIZEOF_VOID_P EQUAL 4)
-        test_target_arch(i386 "" "${flags}")
+        test_target_arch(i386 "" "${MSVC_VERSION_FLAG}")
       else()
-        test_target_arch(x86_64 "" "${flags}")
+        test_target_arch(x86_64 "" "${MSVC_VERSION_FLAG}")
       endif()
     endif()
   elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc")


[libFuzzer] Fix a typo in CMake configuration.

NFC now when libFuzzer supports only one architecture,
will stop being NFC after multiple architectures are supported.

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

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@333239 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -422,7 +422,7 @@
     SANITIZER_COMMON_SUPPORTED_ARCH)
   list_intersect(FUZZER_SUPPORTED_ARCH
     ALL_FUZZER_SUPPORTED_ARCH
-    ALL_SANITIZER_COMMON_SUPPORTED_ARCH)
+    SANITIZER_COMMON_SUPPORTED_ARCH)
   list_intersect(XRAY_SUPPORTED_ARCH
     ALL_XRAY_SUPPORTED_ARCH
     SANITIZER_COMMON_SUPPORTED_ARCH)


refine overalls.cmake (#44623)

refine overalls.cmake (#44623)

--- cmake/coveralls.cmake
+++ cmake/coveralls.cmake
@@ -75,35 +75,20 @@
         "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
   endif()
-  set(EXCLUDE_DIRS "demo/" "build/" "tests/" ".test_env/")

   if(WITH_GPU)
     file(
-      GLOB_RECURSE PADDLE_SOURCES
-      RELATIVE "${PROJECT_SOURCE_DIR}"
-      "*.cpp" "*.cc" ".c" "*.cu")
+      GLOB_RECURSE
+      PADDLE_SOURCES
+      "${PROJECT_SOURCE_DIR}/paddle/*.cpp"
+      "${PROJECT_SOURCE_DIR}/paddle/*.cc"
+      "${PROJECT_SOURCE_DIR}/paddle/*.cu"
+      "${PROJECT_SOURCE_DIR}/paddle/*.cu.cc"
+      "${PROJECT_SOURCE_DIR}/paddle/*.c")
   else()
-    file(
-      GLOB_RECURSE PADDLE_SOURCES
-      RELATIVE "${PROJECT_SOURCE_DIR}"
-      "*.cpp" "*.cc" "*.c")
+    file(GLOB_RECURSE PADDLE_SOURCES "${PROJECT_SOURCE_DIR}/paddle/*.cpp"
+         "${PROJECT_SOURCE_DIR}/paddle/*.cc" "${PROJECT_SOURCE_DIR}/paddle/*.c")
   endif()
-
-  # exclude trivial files in PADDLE_SOURCES
-  foreach(EXCLUDE_DIR ${EXCLUDE_DIRS})
-    foreach(TMP_PATH ${PADDLE_SOURCES})
-      string(FIND ${TMP_PATH} ${EXCLUDE_DIR} EXCLUDE_DIR_FOUND)
-      if(NOT ${EXCLUDE_DIR_FOUND} EQUAL -1)
-        list(REMOVE_ITEM PADDLE_SOURCES ${TMP_PATH})
-      endif()
-    endforeach()
-  endforeach()
-
-  # convert to absolute path
-  set(PADDLE_SRCS "")
-  foreach(PADDLE_SRC ${PADDLE_SOURCES})
-    set(PADDLE_SRCS "${PADDLE_SRCS};${PROJECT_SOURCE_DIR}/${PADDLE_SRC}")
-  endforeach()

   code_coverage("${PADDLE_SRCS}" ${COVERALLS_UPLOAD}
                 "${PROJECT_SOURCE_DIR}/cmake")


[cmake] switch nd-config back to nd's master branch.

--- cmake/nd-config.cmake
+++ cmake/nd-config.cmake
@@ -11,7 +11,6 @@
   set(ND_GIT_REPOSITORY ssh://git@bitbucket.org/nclack/nd.git CACHE STRING "Location of the git repository for libnd.")
   ExternalProject_Add(libnd
     GIT_REPOSITORY ${ND_GIT_REPOSITORY}
-    GIT_TAG spin-off-plugins
     # UPDATE_COMMAND ""
     # UPDATE_COMMAND ${GIT_EXECUTABLE} pull origin master
     LIST_SEPARATOR ^^


[cmake] fix detection of the siconos script

Ubuntu install the libraries in a subdir of lib/. The path for the
siconos script is then wrong (lib/bin).

--- Numerics/cmake/FindSiconosKernel.cmake
+++ Numerics/cmake/FindSiconosKernel.cmake
@@ -31,7 +31,12 @@
   GET_FILENAME_COMPONENT(SiconosKernel_LIBRARY_DIRS_DIR ${SiconosKernel_LIBRARY_DIRS} PATH)
   GET_FILENAME_COMPONENT(SiconosKernel_LIBRARY_DIRS_DIR_DIR ${SiconosKernel_LIBRARY_DIRS_DIR} PATH)

-  set(SiconosKernel_EXE_DIR ${SiconosKernel_LIBRARY_DIRS_DIR}/bin CACHE STRING "Path to siconos executable")
+  #  set(SiconosKernel_EXE_DIR ${SiconosKernel_LIBRARY_DIRS_DIR}/bin CACHE STRING "Path to siconos executable")
+
+  FIND_PATH(SiconosKernel_EXE_DIR siconos
+    HINTS ${SiconosKernel_LIBRARY_DIRS_DIR} ${SiconosKernel_LIBRARY_DIRS_DIR_DIR}
+    ENV PATH
+    PATH_SUFFIXES bin)

   FIND_PATH(SiconosKernel_INCLUDE_DIRS SiconosKernel.hpp
     HINTS ${SiconosKernel_LIBRARY_DIRS_DIR} ${SiconosKernel_LIBRARY_DIRS_DIR_DIR}


Add required virutalenv version for producing wheels

--- Wrapping/Python/LegacyPackaging.cmake
+++ Wrapping/Python/LegacyPackaging.cmake
@@ -52,6 +52,12 @@
   find_package( PythonVirtualEnv REQUIRED )

   sitk_enforce_forbid_downloads( SimpleITK_PYTHON_USE_VIRTUALENV )
+
+  if (SimpleITK_PYTHON_WHEEL AND PYTHON_VIRTUALENV_VERSION_STRING VERSION_LESS "13")
+    message(SEND_ERROR "In sufficient version of virutalenv for \
+      building wheels. Require virtualenv>=13.0.")
+  endif()
+
   #
   # Setup Python Virtual Enviroment for testing and packaging
   #


STYLE: Remove replecated build options.

STYLE: Remove replecated build options.

Common code should be defined once rather than copied and pasted.

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -128,39 +128,21 @@
       -DITK_WRAPPING:BOOL=OFF #${BUILD_SHARED_LIBS} ## HACK:  QUICK CHANGE
       -DModule_MGHIO:BOOL=ON
       -DModule_ITKReview:BOOL=ON
-      -DModule_ITKVtkGlue:BOOL=OFF
       ${${proj}_DCMTK_ARGS}
       ${${proj}_WRAP_ARGS}
       ${${proj}_FFTWF_ARGS}
       ${${proj}_FFTWD_ARGS}
       ${${proj}_MINC_ARGS}
-    )
+  )

     if( USE_VTK STREQUAL "ON" )
-      set(${proj}_CMAKE_OPTIONS
-      -DBUILD_TESTING:BOOL=OFF
-      -DBUILD_EXAMPLES:BOOL=OFF
-      -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/${proj}-install
-      -DITK_LEGACY_REMOVE:BOOL=OFF
-      -DITK_FUTURE_LEGACY_REMOVE:=BOOL=ON
-      -DITKV3_COMPATIBILITY:BOOL=ON
-      -DITK_BUILD_DEFAULT_MODULES:BOOL=ON
-      #-DITK_INSTALL_NO_DEVELOPMENT:BOOL=ON
-      -DKWSYS_USE_MD5:BOOL=ON # Required by SlicerExecutionModel
-      -DITK_WRAPPING:BOOL=OFF #${BUILD_SHARED_LIBS} ## HACK:  QUICK CHANGE
-      -DModule_MGHIO:BOOL=ON
-      -DModule_ITKReview:BOOL=ON
-      -DModule_ITKVtkGlue:BOOL=ON
-      ${${proj}_DCMTK_ARGS}
-      ${${proj}_WRAP_ARGS}
-      ${${proj}_FFTWF_ARGS}
-      ${${proj}_FFTWD_ARGS}
-      ${${proj}_MINC_ARGS}
-      )
+      list(APPEND ${proj}_CMAKE_OPTIONS -DModule_ITKVtkGlue:BOOL=ON)
       if( USE_SYSTEM_VTK STREQUAL "OFF" )
-        LIST(APPEND ${proj}_CMAKE_OPTIONS -DVTK_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/VTK-install/lib/cmake/vtk-6.2 )
+        list(APPEND ${proj}_CMAKE_OPTIONS -DVTK_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/VTK-install/lib/cmake/vtk-6.2 )
       endif()
       list(APPEND ${proj}_DEPENDENCIES VTK)
+    else()
+      list(APPEND ${proj}_CMAKE_OPTIONS -DModule_ITKVtkGlue:BOOL=OFF)
     endif()


ctest: Update config file for new cdash board.

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -3,10 +3,9 @@
 set(MEMORYCHECK_SUPPRESSIONS_FILE ${CMAKE_SOURCE_DIR}/tests/valgrind.supp)

 set(CTEST_PROJECT_NAME "libssh")
-set(CTEST_NIGHTLY_START_TIME "04:00:00 CET")
+set(CTEST_NIGHTLY_START_TIME "01:00:00 CET")

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "my.cdash.org")
-set(CTEST_DROP_LOCATION "/submit.php?project=${CTEST_PROJECT_NAME}")
+set(CTEST_DROP_SITE "test.libssh.org")
+set(CTEST_DROP_LOCATION "/submit.php?project=libssh")
 set(CTEST_DROP_SITE_CDASH TRUE)
-


COMP: Initialize CXX standard in ITK_USE_FILE

Code that builds against ITK may not be built with a sufficient or
compatible C++ standard.

Use ITKInitializeCXXStandard.cmake in client code, which calls

  include(${ITK_USE_FILE})

according to our existing documentation, which will set
CMAKE_CXX_STANDARD and CMAKE_CXX_STANDARD_REQUIRED if not already set.

To address build errors as discussed in:

  https://discourse.itk.org/t/hello-world-from-itk-examples-installation-not-compiling-for-itk-5-3/4441/8

--- CMake/UseITK.cmake
+++ CMake/UseITK.cmake
@@ -22,6 +22,7 @@
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${ITK_REQUIRED_LINK_FLAGS}")
 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${ITK_REQUIRED_LINK_FLAGS}")
 set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${ITK_REQUIRED_LINK_FLAGS}")
+include(${ITK_CMAKE_DIR}/ITKInitializeCXXStandard.cmake)

 # Add include directories needed to use ITK.
 include_directories(BEFORE ${ITK_INCLUDE_DIRS})


Fix passing incorrect include/link strings to ParMETIS

--- cmake/external_projects/ElMath/ParMETIS.cmake
+++ cmake/external_projects/ElMath/ParMETIS.cmake
@@ -79,8 +79,8 @@
       -D CMAKE_C_COMPILER=${CMAKE_C_COMPILER}
       -D CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
       -D BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
-      -D MPI_C_INCLUDE_PATH=${MPI_C_INCLUDE_PATH}
-      -D MPI_C_LIBRARIES=${MPI_C_LIBRARIES}
+      -D MPI_C_INCLUDE_PATH=${MPI_C_INCSTRING}
+      -D MPI_C_LIBRARIES=${MPI_C_LIBSTRING}
       -D MPI_LINK_FLAGS=${MPI_LINK_FLAGS}
       -D DISABLE_PARMETIS_PROGRAMS=ON
       -D CMAKE_MACOSX_RPATH=${CMAKE_MACOSX_RPATH}


Modify cmake to allow generation without svnversion prog.

--- RageCommon.cmake
+++ RageCommon.cmake
@@ -34,8 +34,11 @@
 )

 macro( svn_repository_version DESTVAR TOPDIR )
-  exec_program( ${SVNVERSION} ${TOPDIR} ARGS "." OUTPUT_VARIABLE DESTVARORI )
-  STRING(REGEX REPLACE "(.+):(.+)" "\\1_\\2" ${DESTVAR} ${DESTVARORI})
+	# Only work if ${SVNVERSION} exist (prog founded)
+	IF(${SVNVERSION})
+		exec_program( ${SVNVERSION} ${TOPDIR} ARGS "." OUTPUT_VARIABLE DESTVARORI )
+		STRING(REGEX REPLACE "(.+):(.+)" "\\1_\\2" ${DESTVAR} ${DESTVARORI})
+	ENDIF(${SVNVERSION})
 endmacro( svn_repository_version )


Don't isntall gtest in embedded builds

Don't isntall gtest in embedded builds

--- build.cmake
+++ build.cmake
@@ -155,6 +155,7 @@

 if(DEFINED test_source)
    if((${PLT_TARGET} STREQUAL macOS) OR (${PLT_TARGET} STREQUAL Linux))
+      set(INSTALL_GTEST OFF)
       add_subdirectory(${CMAKE_SOURCE_DIR}/Platform/googletest)

       add_executable(test${app} ${test_source} Platform/Source/test/testMain.cpp)


fix ICU_FOUND being true if include dirs are missing

--- FindICU.cmake
+++ FindICU.cmake
@@ -272,6 +272,7 @@
         find_package_handle_standard_args(${ICU_PUBLIC_VAR_NS} "ICU not found" ${ICU_PUBLIC_VAR_NS}_LIBRARIES ${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS)
     endif(${ICU_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${ICU_PUBLIC_VAR_NS}_FIND_QUIETLY)
 else(${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS)
+    set("${ICU_PUBLIC_VAR_NS}_FOUND" FALSE)
     if(${ICU_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${ICU_PUBLIC_VAR_NS}_FIND_QUIETLY)
         message(FATAL_ERROR "Could not find ICU include directory")
     endif(${ICU_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${ICU_PUBLIC_VAR_NS}_FIND_QUIETLY)


Updated device-side firmware

Updated device-side firmware

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "65821ab36e5f54d79d02e2717783af7b95134c2c")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "0494a0af4196e78089791d4355813e00193fe35b")

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


MindPXFMUv2 add lpe/ekf2/load_mon.

MindPXFMUv2 add lpe/ekf2/load_mon.

--- cmake/configs/nuttx_mindpx-v2_default.cmake
+++ cmake/configs/nuttx_mindpx-v2_default.cmake
@@ -15,7 +15,7 @@
 	drivers/led
 	drivers/px4fmu
 	#drivers/px4io
-	drivers/test_ppm
+	#drivers/test_ppm
 	drivers/boards/mindpx-v2
 	#drivers/rgbled
 	drivers/rgbled_pwm
@@ -76,6 +76,7 @@
 	# General system control
 	#
 	modules/commander
+	modules/load_mon
 	modules/navigator
 	modules/mavlink
 	modules/gpio_led
@@ -85,11 +86,11 @@
 	#
 	# Estimation modules (EKF/ SO3 / other filters)
 	#
-	# Too high RAM usage due to static allocations
-	# modules/attitude_estimator_ekf
 	modules/attitude_estimator_q
 	modules/ekf_att_pos_estimator
 	modules/position_estimator_inav
+	modules/local_position_estimator
+	modules/ekf2

 	#
 	# Vehicle Control
@@ -135,7 +136,7 @@
 	platforms/nuttx

 	# had to add for cmake, not sure why wasn't in original config
-	platforms/common
+	platforms/common
 	platforms/nuttx/px4_layer

 	#
@@ -146,7 +147,7 @@
 	#
 	# Rover apps
 	#
-	examples/rover_steering_control
+	#examples/rover_steering_control

 	#
 	# Demo apps
@@ -154,7 +155,7 @@
 	#examples/math_demo
 	# Tutorial code from
 	# https://px4.io/dev/px4_simple_app
-	examples/px4_simple_app
+	#examples/px4_simple_app

 	# Tutorial code from
 	# https://px4.io/dev/daemon
@@ -177,10 +178,6 @@
 	sercon
 	)

-set(config_io_board
-	px4io-v2
-	)
-
 set(config_extra_libs
 	uavcan
 	uavcan_stm32_driver
@@ -192,9 +189,11 @@
 add_custom_target(sercon)
 set_target_properties(sercon PROPERTIES
 	PRIORITY "SCHED_PRIORITY_DEFAULT"
-	MAIN "sercon" STACK_MAIN "2048")
+	MAIN "sercon"
+	STACK_MAIN "2048")

 add_custom_target(serdis)
 set_target_properties(serdis PROPERTIES
 	PRIORITY "SCHED_PRIORITY_DEFAULT"
-	MAIN "serdis" STACK_MAIN "2048")
+	MAIN "serdis"
+	STACK_MAIN "2048")


Fix for auto-builds which use CPACK per nleroy's changes

--- build/cmake/CondorPackageConfig.cmake
+++ build/cmake/CondorPackageConfig.cmake
@@ -151,8 +151,8 @@
 	set( C_SBIN bin )
 	set( C_ETC etc )

-	set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CONDOR_VERSION}")
-	set (CPACK_PACKAGE_FILE_NAME "${CONDOR_PACKAGE_NAME}")
+	set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CONDOR_PACKAGE_NAME}")
+	set (CPACK_PACKAGE_FILE_NAME "${CONDOR_VERSION}")
 	set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CONDOR_VERSION}")

 	# create the WIX package input file (win.xsl) even if we aren't doing packaging.


Added a macro for replacing global flags

--- build/macros.cmake
+++ build/macros.cmake
@@ -235,6 +235,19 @@
 	replace_or_append_compiler_flag(CMAKE_C_FLAGS_RELWITHDEBINFO ${_regex_str} ${_flag_str})
 endmacro()

+macro(replace_or_append_all_flag_compilers _vc_regex_str _gcc_regex_str _vc_flag_str _gcc_flag_str)
+	get_compiler_name(COMPILER)
+	if(COMPILER MATCHES "vc")
+		replace_or_append_compiler_flag(CMAKE_CXX_FLAGS ${_vc_regex_str} ${_vc_flag_str})
+		replace_or_append_compiler_flag(CMAKE_C_FLAGS ${_vc_regex_str} ${_vc_flag_str})
+	elseif(COMPILER MATCHES "gcc")
+		replace_or_append_compiler_flag(CMAKE_CXX_FLAGS ${_gcc_regex_str} ${_gcc_flag_str})
+		replace_or_append_compiler_flag(CMAKE_C_FLAGS ${_gcc_regex_str} ${_gcc_flag_str})
+	else()
+		message(FATAL_ERROR "Error: Only MSVC and GCC supported")
+	endif()
+endmacro()
+
 macro(replace_or_append_release_flag_compilers _vc_regex_str _gcc_regex_str _vc_flag_str _gcc_flag_str)
 	get_compiler_name(COMPILER)
 	if(COMPILER MATCHES "vc")


closes #5784 don't run valgrind on tdb-recover because it's statically linked and we can't change --soname-synonyms for just one child

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

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -4,7 +4,7 @@
     # that is hard to parse out, so we'll just let it run alone
     set(MEMORYCHECK_COMMAND "${TokuDB_SOURCE_DIR}/scripts/tokuvalgrind")
   endif ()
-  set(MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=no --soname-synonyms=somalloc=*tokuportability* --quiet --num-callers=20 --leak-check=full --show-reachable=yes --trace-children=yes --trace-children-skip=sh,*/sh,basename,*/basename,dirname,*/dirname,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,*/diff,grep,*/grep,date,*/date,test,*/tokudb_dump* --trace-children-skip-by-arg=--only_create,--test,--no-shutdown,novalgrind" CACHE INTERNAL "options for valgrind")
+  set(MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=no --soname-synonyms=somalloc=*tokuportability* --quiet --num-callers=20 --leak-check=full --show-reachable=yes --trace-children=yes --trace-children-skip=sh,*/sh,basename,*/basename,dirname,*/dirname,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,*/diff,grep,*/grep,date,*/date,test,*/tokudb_dump,*/tdb-recover --trace-children-skip-by-arg=--only_create,--test,--no-shutdown,novalgrind" CACHE INTERNAL "options for valgrind")
   set(MEMORYCHECK_SUPPRESSIONS_FILE "${CMAKE_CURRENT_BINARY_DIR}/valgrind.suppressions" CACHE INTERNAL "suppressions file for valgrind")
   set(UPDATE_COMMAND "svn")
 endif()


More robust to new placement of external pugixml in Homebrew

--- src/cmake/modules/FindPugiXML.cmake
+++ src/cmake/modules/FindPugiXML.cmake
@@ -8,10 +8,14 @@

 find_path (PUGIXML_INCLUDE_DIR
            NAMES pugixml.hpp
-           PATHS ${PUGIXML_HOME}/include)
+           PATHS ${PUGIXML_HOME}/include
+           /usr/local/include
+           /usr/local/include/pugixml-1.8)
 find_library (PUGIXML_LIBRARY
               NAMES pugixml
-              PATHS ${PUGIXML_HOME}/lib)
+              PATHS ${PUGIXML_HOME}/lib
+              /usr/local/lib
+              /usr/local/lib/pugixml-1.8)

 # Support the REQUIRED and QUIET arguments, and set PUGIXML_FOUND if found.
 include (FindPackageHandleStandardArgs)


SVN_SILENT made messages (.desktop file)

--- plugins/pintxo/ktpaccountskcm_plugin_pintxo.desktop.cmake
+++ plugins/pintxo/ktpaccountskcm_plugin_pintxo.desktop.cmake
@@ -11,6 +11,7 @@
 Comment[nl]=Gebruikersinterface voor aangepaste accountconfiguratie voor accounts die de Pintxo verbindingenbeheerder gebruiken.
 Comment[pt]=Interface de utilizador de configuração de contas personalizadas com o gestor de ligações Pintxo.
 Comment[pt_BR]=Interface de configuração de contas personalizadas usando o gerenciador de conexões Pintxo.
+Comment[sk]=Vlastné používateľské rozhranie konfigurácie účtu pre účty používajúce správcu pripojení Pintxo.
 Comment[sl]=Uporabniški vmesnik za prilagoditev računov, ki uporabljajo upravljalnik povezav Pintxo.
 Comment[sr]=Корисничко сучеље за подешавање посебних налога под менаџером везе Пинтхо.
 Comment[sr@ijekavian]=Корисничко сучеље за подешавање посебних налога под менаџером везе Пинтхо.
@@ -19,6 +20,7 @@
 Comment[sv]=Användargränssnitt för anpassad kontoinställning av konton som använder anslutningshanteraren Pintxo.
 Comment[uk]=Інтерфейс користувача для нетипового налаштовування облікових записів, для роботи яких використовуються засоби керування з’єднанням Pintxo.
 Comment[x-test]=xxCustom account configuration user interface for accounts using the Pintxo connection manager.xx
+Comment[zh_TW]=對使用 Pintxo 連線管理員的帳號自訂帳號設定使用者介面。
 Icon=phone
 Name=Pintxo Account Configuration User Interface
 Name[ca]=Interfície d'usuari de configuració de compte de Pintxo
@@ -31,6 +33,7 @@
 Name[nl]=Gebruikersinterface voor Pintxo accountconfiguratie
 Name[pt]=Interface de Configuração de Contas do Pintxo
 Name[pt_BR]=Interface de configuração de contas do Pintxo
+Name[sk]=Používateľské rozhranie konfigurácie účtu Pintxo
 Name[sl]=Uporabniški vmesnik za nastavitev računov Pintxo
 Name[sr]=Корисничко сучеље за подешавање налога под Пинтхом
 Name[sr@ijekavian]=Корисничко сучеље за подешавање налога под Пинтхом
@@ -39,6 +42,7 @@
 Name[sv]=Användargränssnitt för inställning av Pintxo-konton
 Name[uk]=Інтерфейс користувача для налаштовування облікового запису Pintxo
 Name[x-test]=xxPintxo Account Configuration User Interfacexx
+Name[zh_TW]=Pintxo 帳號設定使用者介面
 Type=Service
 ServiceTypes=KTpAccountsKCM/AccountUiPlugin


[numerics] relax accuracy to avoid timeout in ci

--- numerics/numerics_tests.cmake
+++ numerics/numerics_tests.cmake
@@ -486,7 +486,7 @@
   # ---- Hyperplane Projection ----
   # HP is not converging
   NEW_FC_3D_TEST(Confeti-ex13-Fc3D-SBM.dat
-    SICONOS_FRICTION_3D_HP 1e-3 10000
+    SICONOS_FRICTION_3D_HP 1e-3 1000
     0 0 0
     WILL_FAIL)

@@ -508,7 +508,7 @@
     DPARAM 3 -1e1)

   NEW_FC_3D_TEST(BoxesStack1-i100000-32.hdf5.dat
-    SICONOS_FRICTION_3D_VI_FPP 1e-8 100000
+    SICONOS_FRICTION_3D_VI_FPP 1e-3 100000
     0 0 0
     IPARAM 2 1)


Fix missing pcre library in FindOpenCOLLADA.cmake.

--- build/modules/FindOpenCOLLADA.cmake
+++ build/modules/FindOpenCOLLADA.cmake
@@ -111,14 +111,17 @@

         FIND_LIBRARY(OpenCOLLADA_XML_LIBRARIES NAMES xml2 PATHS ${OpenCOLLADA_LIBRARY_DIRS} NO_DEFAULT_PATH)
         IF(NOT OpenCOLLADA_XML_LIBRARIES)
-          FIND_LIBRARY(OpenCOLLADA_XML_LIBRARIES NAMES xml2 )
+          FIND_LIBRARY(OpenCOLLADA_XML_LIBRARIES NAMES xml2)
         ENDIF()

-#        FIND_LIBRARY(OpenCOLLADA_PCRE_LIBRARIES NAMES pcre PATHS ${OpenCOLLADA_LIBRARY_DIRS} NO_DEFAULT_PATH)
+        FIND_LIBRARY(OpenCOLLADA_PCRE_LIBRARIES NAMES pcre PATHS ${OpenCOLLADA_LIBRARY_DIRS} NO_DEFAULT_PATH)
+        IF(NOT OpenCOLLADA_PCRE_LIBRARIES)
+          FIND_LIBRARY(OpenCOLLADA_PCRE_LIBRARIES NAMES pcre)
+        ENDIF()

         FIND_LIBRARY(OpenCOLLADA_UTF_LIBRARIES NAMES UTF PATHS ${OpenCOLLADA_LIBRARY_DIRS} NO_DEFAULT_PATH)

-        SET(OpenCOLLADA_LIBRARIES ${OpenCOLLADA_SAXFW_LIBRARIES} ${OpenCOLLADA_FW_LIBRARIES} ${OpenCOLLADA_MML_LIBRARIES} ${OpenCOLLADA_SAX_LIBRARIES} ${OpenCOLLADA_BU_LIBRARIES} ${OpenCOLLADA_XML_LIBRARIES} ${OpenCOLLADA_UTF_LIBRARIES} ${OpenCOLLADA_SW_LIBRARIES} ${OpenCOLLADA_BUFFER_LIBRARIES} ${OpenCOLLADA_FTOA_LIBRARIES} )
+        SET(OpenCOLLADA_LIBRARIES ${OpenCOLLADA_SAXFW_LIBRARIES} ${OpenCOLLADA_FW_LIBRARIES} ${OpenCOLLADA_MML_LIBRARIES} ${OpenCOLLADA_SAX_LIBRARIES} ${OpenCOLLADA_BU_LIBRARIES} ${OpenCOLLADA_XML_LIBRARIES} ${OpenCOLLADA_PCRE_LIBRARIES} ${OpenCOLLADA_UTF_LIBRARIES} ${OpenCOLLADA_SW_LIBRARIES} ${OpenCOLLADA_BUFFER_LIBRARIES} ${OpenCOLLADA_FTOA_LIBRARIES} )
     ENDIF()

     IF(OpenCOLLADA_LIBRARIES)


CMake: Introduce the same caching method for the sanity checks

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

--- deal.II/cmake/setup_compiler_flags.cmake
+++ deal.II/cmake/setup_compiler_flags.cmake
@@ -62,13 +62,18 @@

 #
 # Check the user provided C and CXX flags:
-# Only do this for CMAKE_C_FLAGS and CMAKE_CXX_FLAGS as this check is very
-# costly
 #
+
+IF(NOT "${CMAKE_C_FLAGS_SAVED}" STREQUAL "${DEAL_II_C_FLAGS_SAVED}")
+  UNSET(DEAL_II_HAVE_USABLE_C_FLAGS CACHE)
+ENDIF()
+SET(DEAL_II_C_FLAGS_SAVED "${CMAKE_C_FLAGS_SAVED}" CACHE INTERNAL "" FORCE)
+
 SET(CMAKE_REQUIRED_FLAGS "${CMAKE_C_FLAGS_SAVED}")
 CHECK_C_SOURCE_COMPILES(
   "int main(){ return 0; }"
   DEAL_II_HAVE_USABLE_C_FLAGS)
+SET(CMAKE_REQUIRED_FLAGS "")

 IF(NOT DEAL_II_HAVE_USABLE_C_FLAGS)
   UNSET(DEAL_II_HAVE_USABLE_C_FLAGS CACHE)
@@ -77,7 +82,12 @@
     "${CMAKE_C_FLAGS_SAVED}\n"
     )
 ENDIF()
-UNSET(DEAL_II_HAVE_USABLE_C_FLAGS CACHE)
+
+
+IF(NOT "${CMAKE_CXX_FLAGS_SAVED}" STREQUAL "${DEAL_II_CXX_FLAGS_SAVED}")
+  UNSET(DEAL_II_HAVE_USABLE_CXX_FLAGS CACHE)
+ENDIF()
+SET(DEAL_II_CXX_FLAGS_SAVED "${CMAKE_CXX_FLAGS_SAVED}" CACHE INTERNAL "" FORCE)

 SET(CMAKE_REQUIRED_FLAGS "${CMAKE_CXX_FLAGS_SAVED}")
 CHECK_CXX_SOURCE_COMPILES(
@@ -92,7 +102,7 @@
     "${CMAKE_CXX_FLAGS_SAVED}\n"
     )
 ENDIF()
-UNSET(DEAL_II_HAVE_USABLE_CXX_FLAGS CACHE)
+

 #
 # CMAKE_C_COMPILER and CMAKE_CXX_COMPILER have to be of the same brand.


Added a convenience macro argument for linking libraries.

--- BlueBerry/CMake/FunctionCreateBlueBerryApplication.cmake
+++ BlueBerry/CMake/FunctionCreateBlueBerryApplication.cmake
@@ -13,6 +13,7 @@
 #! \param PLUGINS (optional) A list of required plug-ins. Defaults to all known plug-ins.
 #! \param EXCLUDE_PLUGINS (optional) A list of plug-ins which should not be used. Mainly
 #!        useful if PLUGINS was not used.
+#! \param LINK_LIBRARIES A list of libraries to be linked with the executable.
 #! \param SHOW_CONSOLE (option) Show the console output window (on Windows).
 #! \param NO_PROVISIONING (option) Do not create provisioning files.
 #!
@@ -28,7 +29,7 @@
 #!
 function(FunctionCreateBlueBerryApplication)

-macro_parse_arguments(_APP "NAME;DESCRIPTION;SOURCES;PLUGINS;EXCLUDE_PLUGINS" "SHOW_CONSOLE;NO_PROVISIONING" ${ARGN})
+macro_parse_arguments(_APP "NAME;DESCRIPTION;SOURCES;PLUGINS;EXCLUDE_PLUGINS;LINK_LIBRARIES" "SHOW_CONSOLE;NO_PROVISIONING" ${ARGN})

 if(NOT _APP_NAME)
   message(FATAL_ERROR "NAME argument cannot be empty.")
@@ -84,7 +85,7 @@
   add_executable(${_APP_NAME} MACOSX_BUNDLE WIN32 ${_APP_SOURCES})
 endif()

-target_link_libraries(${_APP_NAME} org_blueberry_osgi)
+target_link_libraries(${_APP_NAME} org_blueberry_osgi ${_APP_LINK_LIBRARIES})
 if(WIN32)
   target_link_libraries(${_APP_NAME} ${QT_QTCORE_LIBRARY} ${QT_QTMAIN_LIBRARY})
 endif()


win: Pass /W4 in front of all the -wd flags.

This should fix many many -Wunused-parameter warnings in self-host builds on
Windows after r255382.  cl.exe doesn't care about the order of /W4 and
/wd flags, but clang-cl currently does (just like -Wno-foo -Wall order
matters for clang).  We might want to change how clang-cl behaves in
the future, but until then this change makes self-host builds much more
silent.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -338,7 +338,10 @@

   # Enable warnings
   if (LLVM_ENABLE_WARNINGS)
-    append("/W4" msvc_warning_flags)
+    # Put /W4 in front of all the -we flags. cl.exe doesn't care, but for
+    # clang-cl having /W4 after the -we flags will re-enable the warnings
+    # disabled by -we.
+    set(msvc_warning_flags "/W4 ${msvc_warning_flags}")
     # CMake appends /W3 by default, and having /W3 followed by /W4 will result in
     # cl : Command line warning D9025 : overriding '/W3' with '/W4'.  Since this is
     # a command line warning and not a compiler warning, it cannot be suppressed except


Disable -Wnoexcept-type due to false positives with GCC.

GCC triggers false positives if a nothrow function is called through a template argument. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80985 for details. The LLVM libraries have no stable C++ API, so the warning is not useful.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -585,6 +585,10 @@
   check_cxx_compiler_flag("-Wclass-memaccess" CXX_SUPPORTS_CLASS_MEMACCESS_FLAG)
   append_if(CXX_SUPPORTS_CLASS_MEMACCESS_FLAG "-Wno-class-memaccess" CMAKE_CXX_FLAGS)

+  # The LLVM libraries have no stable C++ API, so -Wnoexcept-type is not useful.
+  check_cxx_compiler_flag("-Wnoexcept-type" CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG)
+  append_if(CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG "-Wno-noexcept-type" CMAKE_CXX_FLAGS)
+
   # Check if -Wnon-virtual-dtor warns even though the class is marked final.
   # If it does, don't add it. So it won't be added on clang 3.4 and older.
   # This also catches cases when -Wnon-virtual-dtor isn't supported by


null sinks differ on different platforms

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -519,11 +519,17 @@
   set(hasstdstringview define)
   if(cuda)
     if(CUDA_NVCC_EXECUTABLE)
+      if (WIN32)
+        set(PLATFORM_NULL_FILE "nul")
+      else()
+        set(PLATFORM_NULL_FILE "/dev/null")
+      endif()
       execute_process(
         COMMAND "echo"
           "-e" "#include <string_view>\nint main() { char arr[3] = {'B', 'a', 'r'}; std::string_view strv(arr, sizeof(arr)); return 0;}"
-        COMMAND "${CUDA_NVCC_EXECUTABLE}" "-std=c++${CMAKE_CUDA_STANDARD}" "-o" "/dev/null" "-x" "c++" "-"
+        COMMAND "${CUDA_NVCC_EXECUTABLE}" "-std=c++${CMAKE_CUDA_STANDARD}" "-o" "${PLATFORM_NULL_FILE}" "-x" "c++" "-"
         RESULT_VARIABLE nvcc_compiled_string_view)
+      unset(PLATFORM_NULL_FILE CACHE)
       if (nvcc_compiled_string_view EQUAL "0")
         set(cudahasstdstringview define)
       endif()


only append -fimplicit-templates if -fno-implicit-templates is already there because of mysql/mariadb

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -92,15 +92,16 @@
   )
 ## set_cflags_if_supported_named("-Weffc++" -Weffcpp)

-## Clang has stricter POD checks.  So, only enable this warning on our other builds (Linux + GCC)
-if (NOT CMAKE_CXX_COMPILER_ID MATCHES Clang)
+if (CMAKE_CXX_FLAGS MATCHES -fno-implicit-templates)
   # must append this because mysql sets -fno-implicit-templates and we need to override it
-  # also clang doesn't support it on osx but also doesn't seem to know that
   check_cxx_compiler_flag(-fimplicit-templates HAVE_CXX_-fimplicit-templates)
   if (HAVE_CXX_-fimplicit-templates)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fimplicit-templates")
   endif ()
-
+endif()
+
+## Clang has stricter POD checks.  So, only enable this warning on our other builds (Linux + GCC)
+if (NOT CMAKE_CXX_COMPILER_ID MATCHES Clang)
   set_cflags_if_supported(
     -Wpacked
     )