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

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 "${CMAKE_COMMAND}" -E remove_directory "${LOG}"
COMMAND ${pvscmd} COMMAND ${pvscmd}
WORKING_DIRECTORY "${BINARY_DIR}" WORKING_DIRECTORY "${BINARY_DIR}"
DEPENDS "${SOURCE}" "${PVS_STUDIO_CONFIG}" DEPENDS "${SOURCE}" "${PVS_STUDIO_CONFIG}" "${PVS_STUDIO_SUPPRESS_BASE}"
IMPLICIT_DEPENDS "${PVS_STUDIO_LANGUAGE}" "${SOURCE}" IMPLICIT_DEPENDS "${PVS_STUDIO_LANGUAGE}" "${SOURCE}"
${depCommandArg} ${depCommandArg}
VERBATIM 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) # LICENSE path path to PVS-Studio.lic (default: ~/.config/PVS-Studio/PVS-Studio.lic)
# CONFIG path path to PVS-Studio.cfg # CONFIG path path to PVS-Studio.cfg
# CFG_TEXT text embedded 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 # KEEP_COMBINED_PLOG do not delete combined plog file *.pvs.raw for further processing with plog-converter
# #
# Misc options: # Misc options:
@ -319,7 +320,7 @@ function (pvs_studio_add_target)
endif () endif ()
set(OPTIONAL OUTPUT ALL RECURSIVE HIDE_HELP KEEP_COMBINED_PLOG COMPILE_COMMANDS) 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) set(MULTI SOURCES C_FLAGS CXX_FLAGS ARGS DEPENDS ANALYZE MODE)
cmake_parse_arguments(PVS_STUDIO "${OPTIONAL}" "${SINGLE}" "${MULTI}" ${ARGN}) cmake_parse_arguments(PVS_STUDIO "${OPTIONAL}" "${SINGLE}" "${MULTI}" ${ARGN})
@ -404,6 +405,11 @@ function (pvs_studio_add_target)
--platform "${PVS_STUDIO_PLATFORM}" --platform "${PVS_STUDIO_PLATFORM}"
--preprocessor "${PVS_STUDIO_PREPROCESSOR}") --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 "") if (NOT "${CMAKE_CXX_COMPILER}" STREQUAL "")
list(APPEND PVS_STUDIO_ARGS --cxx "${CMAKE_CXX_COMPILER}") list(APPEND PVS_STUDIO_ARGS --cxx "${CMAKE_CXX_COMPILER}")
endif () endif ()
@ -476,7 +482,7 @@ function (pvs_studio_add_target)
${PVS_STUDIO_ARGS} ${PVS_STUDIO_ARGS}
COMMENT "Analyzing with PVS-Studio" COMMENT "Analyzing with PVS-Studio"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" 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_LOGS "${COMPILE_COMMANDS_LOG}.always")
list(APPEND PVS_STUDIO_PLOGS_DEPENDENCIES "${COMPILE_COMMANDS_LOG}") list(APPEND PVS_STUDIO_PLOGS_DEPENDENCIES "${COMPILE_COMMANDS_LOG}")

View File

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

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