From 0e9651441369ae6984f728b9df14dbc2fa41aa58 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Thu, 15 Oct 2020 06:55:02 +0300 Subject: [PATCH 1/3] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=81=D0=B2=D1=8F=D0=B7=D0=BA=D0=B8?= =?UTF-8?q?=20cotire=20+=20clang?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- thirdparty/cotire.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/thirdparty/cotire.cmake b/thirdparty/cotire.cmake index 075ec79..18b55d8 100644 --- a/thirdparty/cotire.cmake +++ b/thirdparty/cotire.cmake @@ -1136,6 +1136,11 @@ function (cotire_parse_includes _language _scanOutput _ignoredIncludeDirs _honor string (REPLACE ";" "\\;" _scanOutput "${_scanOutput}") # then separate lines string (REGEX REPLACE "\n" ";" _scanOutput "${_scanOutput}") + if ("${_language}" STREQUAL "CXX") + # Fix clang9's libc++ errno + message (STATUS "replacing with ") + string (REGEX REPLACE "include_next" "include" _scanOutput "${_scanOutput}") + endif() list (LENGTH _scanOutput _len) # remove duplicate lines to speed up parsing list (REMOVE_DUPLICATES _scanOutput) From 5ffcde34e20a18cc3e644afa99c369d6157c2cab Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Tue, 1 Dec 2020 13:12:15 +0300 Subject: [PATCH 2/3] =?UTF-8?q?=D0=A4=D0=BE=D1=80=D0=BC=D0=B0=D1=82=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D1=84=D0=B0=D0=B9?= =?UTF-8?q?=D0=BB=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLibCodeAnalysisPvsStudio.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMLibCodeAnalysisPvsStudio.cmake b/CMLibCodeAnalysisPvsStudio.cmake index 70a8da5..7f82fb9 100644 --- a/CMLibCodeAnalysisPvsStudio.cmake +++ b/CMLibCodeAnalysisPvsStudio.cmake @@ -17,15 +17,17 @@ function(add_pvs_check target) add_dependencies(pvs-check pvs-check-${target}) configure_file("${CMLIB_MODULE_DIR}/hpp/pvs_studio.hpp.in" "${CMAKE_BINARY_DIR}/include/pvs_studio.hpp") get_target_property(target_type ${target} TYPE) - if (${target_type} STREQUAL "INTERFACE_LIBRARY") + if(${target_type} STREQUAL "INTERFACE_LIBRARY") set(target_type INTERFACE) else() set(target_type PRIVATE) endif() if(MSVC) - target_compile_options(${target} BEFORE ${target_type} /FI "${CMAKE_BINARY_DIR}/include/pvs_studio.hpp") + target_compile_options(${target} BEFORE ${target_type} /FI + "${CMAKE_BINARY_DIR}/include/pvs_studio.hpp") else() # GCC/Clang - target_compile_options(${target} BEFORE ${target_type} -include "${CMAKE_BINARY_DIR}/include/pvs_studio.hpp") + target_compile_options(${target} BEFORE ${target_type} -include + "${CMAKE_BINARY_DIR}/include/pvs_studio.hpp") endif() else() message(STATUS "CMLIB warning:") From f5151f5a2b102b75486c72df8d0dddd842ed0bbc Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Tue, 1 Dec 2020 13:12:24 +0300 Subject: [PATCH 3/3] =?UTF-8?q?=D0=9F=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BD=D0=BE=D0=B2=D1=8B=D1=85=20=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D1=81=D0=B8=D0=B9=20clang?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLibCodeAnalysisClangAnalyze.cmake | 10 +++++++++- CMLibCodeAnalysisClangTidy.cmake | 10 +++++++++- CMLibCodeAnalysisClazy.cmake | 11 +++++++++-- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/CMLibCodeAnalysisClangAnalyze.cmake b/CMLibCodeAnalysisClangAnalyze.cmake index d84db7a..a0ab089 100644 --- a/CMLibCodeAnalysisClangAnalyze.cmake +++ b/CMLibCodeAnalysisClangAnalyze.cmake @@ -1,4 +1,12 @@ -find_program(CLANG_CHECK_EXE NAMES clang-check-10 clang-check-9 clang-check) +find_program( + CLANG_CHECK_EXE + NAMES + clang-check-13 + clang-check-12 + clang-check-11 + clang-check-10 + clang-check-9 + clang-check) if(CLANG_CHECK_EXE) option(CMLIB_CLANG_ANALYZE_FIX "Perform fixes for Clang-Check" OFF) endif() diff --git a/CMLibCodeAnalysisClangTidy.cmake b/CMLibCodeAnalysisClangTidy.cmake index 6751f29..4116cbd 100644 --- a/CMLibCodeAnalysisClangTidy.cmake +++ b/CMLibCodeAnalysisClangTidy.cmake @@ -1,4 +1,12 @@ -find_program(CLANG_TIDY_EXE NAMES clang-tidy-10 clang-tidy-9 clang-tidy) +find_program( + CLANG_TIDY_EXE + NAMES + clang-tidy-13 + clang-tidy-12 + clang-tidy-11 + clang-tidy-10 + clang-tidy-9 + clang-tidy) if(CLANG_TIDY_EXE) option(CMLIB_CLANG_TIDY_FIX "Perform fixes for Clang-Tidy" OFF) endif() diff --git a/CMLibCodeAnalysisClazy.cmake b/CMLibCodeAnalysisClazy.cmake index 2090dbb..788df68 100644 --- a/CMLibCodeAnalysisClazy.cmake +++ b/CMLibCodeAnalysisClazy.cmake @@ -1,5 +1,12 @@ -find_program(CLANG_APPLY_REPLACEMENTS_EXE NAMES clang-apply-replacements-10 clang-apply-replacements-9 - clang-apply-replacements) +find_program( + CLANG_APPLY_REPLACEMENTS_EXE + NAMES + clang-apply-replacements-13 + clang-apply-replacements-12 + clang-apply-replacements-11 + clang-apply-replacements-10 + clang-apply-replacements-9 + clang-apply-replacements) find_program(CLAZY_EXE NAMES clazy-standalone)