Обновление подмодулей

This commit is contained in:
Andrei Astafev 2020-03-10 06:40:36 +03:00
parent 32dcec014f
commit 801802b868
3 changed files with 43 additions and 15 deletions

View File

@ -211,7 +211,7 @@ function (pvs_studio_analyze_file SOURCE SOURCE_DIR BINARY_DIR)
COMMAND "${CMAKE_COMMAND}" -E remove_directory "${LOG}"
COMMAND ${pvscmd}
WORKING_DIRECTORY "${BINARY_DIR}"
DEPENDS "${SOURCE}" "${PVS_STUDIO_CONFIG}"
DEPENDS "${SOURCE}" "${PVS_STUDIO_CONFIG}" "${PVS_STUDIO_SUPPRESS_BASE}"
IMPLICIT_DEPENDS "${PVS_STUDIO_LANGUAGE}" "${SOURCE}"
${depCommandArg}
VERBATIM
@ -292,6 +292,7 @@ option(PVS_STUDIO_DEBUG OFF "Add debug info")
# LICENSE path path to PVS-Studio.lic (default: ~/.config/PVS-Studio/PVS-Studio.lic)
# CONFIG path path to PVS-Studio.cfg
# CFG_TEXT text embedded PVS-Studio.cfg
# SUPPRESS_BASE path to suppress base file
# KEEP_COMBINED_PLOG do not delete combined plog file *.pvs.raw for further processing with plog-converter
#
# Misc options:
@ -319,7 +320,7 @@ function (pvs_studio_add_target)
endif ()
set(OPTIONAL OUTPUT ALL RECURSIVE HIDE_HELP KEEP_COMBINED_PLOG COMPILE_COMMANDS)
set(SINGLE LICENSE CONFIG TARGET LOG FORMAT BIN CONVERTER PLATFORM PREPROCESSOR CFG_TEXT)
set(SINGLE LICENSE CONFIG TARGET LOG FORMAT BIN CONVERTER PLATFORM PREPROCESSOR CFG_TEXT SUPPRESS_BASE)
set(MULTI SOURCES C_FLAGS CXX_FLAGS ARGS DEPENDS ANALYZE MODE)
cmake_parse_arguments(PVS_STUDIO "${OPTIONAL}" "${SINGLE}" "${MULTI}" ${ARGN})
@ -404,6 +405,11 @@ function (pvs_studio_add_target)
--platform "${PVS_STUDIO_PLATFORM}"
--preprocessor "${PVS_STUDIO_PREPROCESSOR}")
if (NOT "${PVS_STUDIO_SUPPRESS_BASE}" STREQUAL "")
pvs_studio_join_path(PVS_STUDIO_SUPPRESS_BASE "${CMAKE_CURRENT_SOURCE_DIR}" "${PVS_STUDIO_SUPPRESS_BASE}")
list(APPEND PVS_STUDIO_ARGS --suppress-file "${PVS_STUDIO_SUPPRESS_BASE}")
endif ()
if (NOT "${CMAKE_CXX_COMPILER}" STREQUAL "")
list(APPEND PVS_STUDIO_ARGS --cxx "${CMAKE_CXX_COMPILER}")
endif ()
@ -476,7 +482,7 @@ function (pvs_studio_add_target)
${PVS_STUDIO_ARGS}
COMMENT "Analyzing with PVS-Studio"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
DEPENDS "${PVS_STUDIO_CONFIG}"
DEPENDS "${PVS_STUDIO_CONFIG}" "${PVS_STUDIO_SUPPRESS_BASE}"
)
list(APPEND PVS_STUDIO_PLOGS_LOGS "${COMPILE_COMMANDS_LOG}.always")
list(APPEND PVS_STUDIO_PLOGS_DEPENDENCIES "${COMPILE_COMMANDS_LOG}")

View File

@ -43,7 +43,7 @@ if (NOT CMAKE_SCRIPT_MODE_FILE)
endif()
set (COTIRE_CMAKE_MODULE_FILE "${CMAKE_CURRENT_LIST_FILE}")
set (COTIRE_CMAKE_MODULE_VERSION "1.8.0")
set (COTIRE_CMAKE_MODULE_VERSION "1.8.1")
# activate select policies
if (POLICY CMP0025)
@ -1068,10 +1068,10 @@ macro (cotire_check_ignore_header_file_path _headerFile _headerIsIgnoredVar)
set (${_headerIsIgnoredVar} TRUE)
elseif (IS_DIRECTORY "${_headerFile}")
set (${_headerIsIgnoredVar} TRUE)
elseif ("${_headerFile}" MATCHES "\\.\\.|[_-]fixed" AND "${_headerFile}" MATCHES "\\.h$")
# heuristic: ignore C headers with embedded parent directory references or "-fixed" or "_fixed" in path
elseif ("${_headerFile}" MATCHES "\\.\\.|[_-]fixed")
# heuristic: ignore headers with embedded parent directory references or "-fixed" or "_fixed" in path
# these often stem from using GCC #include_next tricks, which may break the precompiled header compilation
# with the error message "error: no include path in which to search for header.h"
# with the error message "error: no include path in which to search for header"
set (${_headerIsIgnoredVar} TRUE)
else()
set (${_headerIsIgnoredVar} FALSE)
@ -1693,6 +1693,9 @@ function (cotire_add_pch_compilation_flags _language _compilerID _compilerVersio
endif()
endif()
elseif (WIN32)
file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative)
file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative)
file (TO_NATIVE_PATH "${_hostFile}" _hostFileNative)
# Clang-cl.exe options used
# /Yc creates a precompiled header file
# /Fp specifies precompiled header binary file name
@ -1705,10 +1708,10 @@ function (cotire_add_pch_compilation_flags _language _compilerID _compilerVersio
if (_flags)
# append to list
list (APPEND _flags "${_sourceFileType${_language}}"
"/Yc${_prefixFile}" "/Fp${_pchFile}" "/FI${_prefixFile}" /Zs "${_hostFile}")
"/Yc${_prefixFileNative}" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}" /Zs "${_hostFileNative}")
else()
# return as a flag string
set (_flags "/Yc\"${_prefixFile}\" /Fp\"${_pchFile}\" /FI\"${_prefixFile}\"")
set (_flags "/Yc\"${_prefixFileNative}\" /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"")
endif()
endif()
elseif (_compilerID MATCHES "Intel")
@ -1842,26 +1845,28 @@ function (cotire_add_prefix_pch_inclusion_flags _language _compilerID _compilerV
set (_flags "-include \"${_prefixFile}\"")
endif()
elseif (WIN32)
file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative)
# Clang-cl.exe options used
# /Yu uses a precompiled header file during build
# /Fp specifies precompiled header binary file name
# /FI forces inclusion of file
if (_pchFile)
file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative)
if (_flags)
# append to list
list (APPEND _flags "/Yu${_prefixFile}" "/Fp${_pchFile}" "/FI${_prefixFile}")
list (APPEND _flags "/Yu${_prefixFileNative}" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}")
else()
# return as a flag string
set (_flags "/Yu\"${_prefixFile}\" /Fp\"${_pchFile}\" /FI\"${_prefixFile}\"")
set (_flags "/Yu\"${_prefixFileNative}\" /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"")
endif()
else()
# no precompiled header, force inclusion of prefix header
if (_flags)
# append to list
list (APPEND _flags "/FI${_prefixFile}")
list (APPEND _flags "/FI${_prefixFileNative}")
else()
# return as a flag string
set (_flags "/FI\"${_prefixFile}\"")
set (_flags "/FI\"${_prefixFileNative}\"")
endif()
endif()
endif()
@ -2046,8 +2051,10 @@ function (cotire_check_precompiled_header_support _language _target _msgVar)
else()
set (_ccacheExe "${_launcher}")
endif()
# ccache 3.7.0 replaced --print-config with --show-config
# use -p instead, which seems to work for all version for now, sigh
execute_process(
COMMAND "${_ccacheExe}" "--print-config"
COMMAND "${_ccacheExe}" "-p"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
RESULT_VARIABLE _result
OUTPUT_VARIABLE _ccacheConfig OUTPUT_STRIP_TRAILING_WHITESPACE
@ -2391,6 +2398,9 @@ function (cotire_setup_pch_file_compilation _language _target _targetScript _pre
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
"${_prefixFile}" "${_pchFile}" "${_hostFile}" _flags)
set_property (SOURCE ${_hostFile} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ")
if (COTIRE_DEBUG)
message (STATUS "set_property: SOURCE ${_hostFile} APPEND_STRING COMPILE_FLAGS ${_flags}")
endif()
set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_OUTPUTS "${_pchFile}")
# make object file generated from host file depend on prefix header
set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_DEPENDS "${_prefixFile}")
@ -2442,6 +2452,9 @@ function (cotire_setup_pch_file_inclusion _language _target _wholeTarget _prefix
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
"${_prefixFile}" "${_pchFile}" _flags)
set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ")
if (COTIRE_DEBUG)
message (STATUS "set_property: SOURCE ${_sourceFiles} APPEND_STRING COMPILE_FLAGS ${_flags}")
endif()
# make object files generated from source files depend on precompiled header
set_property (SOURCE ${_sourceFiles} APPEND PROPERTY OBJECT_DEPENDS "${_pchFile}")
endif()
@ -2455,6 +2468,9 @@ function (cotire_setup_pch_file_inclusion _language _target _wholeTarget _prefix
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
"${_prefixFile}" "${_pchFile}" _flags)
set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ")
if (COTIRE_DEBUG)
message (STATUS "set_property: SOURCE ${_sourceFiles} APPEND_STRING COMPILE_FLAGS ${_flags}")
endif()
# mark sources as cotired to prevent them from being used in another cotired target
set_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET "${_target}")
endif()
@ -2472,6 +2488,9 @@ function (cotire_setup_prefix_file_inclusion _language _target _prefixFile)
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
"${_prefixFile}" "${_pchFile}" _flags)
set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ")
if (COTIRE_DEBUG)
message (STATUS "set_property: SOURCE ${_sourceFiles} APPEND_STRING COMPILE_FLAGS ${_flags}")
endif()
# mark sources as cotired to prevent them from being used in another cotired target
set_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET "${_target}")
# make object files generated from source files depend on prefix header
@ -2588,6 +2607,9 @@ function (cotire_setup_target_pch_usage _languages _target _wholeTarget)
"${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}"
"${_prefixFile}" "${_pchFile}" _options)
set_property(TARGET ${_target} APPEND PROPERTY ${_options})
if (COTIRE_DEBUG)
message (STATUS "set_property: TARGET ${_target} APPEND PROPERTY ${_options}")
endif()
endif()
endif()
endif()

@ -1 +1 @@
Subproject commit 26eced86d8e759c625b697f6b0588d7a28746725
Subproject commit dfa7faf459634501a7b76944ad264d5959f14615