diff options
author | Stefan Schober <stenny.schober@gmail.com> | 2023-03-24 15:06:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-03-27 15:48:41 (GMT) |
commit | 099934e3139263b9f5bcb420c81ae7a10fdfb61e (patch) | |
tree | c1a19abd5462b53cc4602041d9eb207d515f933b /Tests | |
parent | c4c4ca0e87a900bf077b05b79b9a2198ec7493d6 (diff) | |
download | CMake-099934e3139263b9f5bcb420c81ae7a10fdfb61e.zip CMake-099934e3139263b9f5bcb420c81ae7a10fdfb61e.tar.gz CMake-099934e3139263b9f5bcb420c81ae7a10fdfb61e.tar.bz2 |
Add generator expression support to static code analysis hooks
Teach target properties `<LANG>_CPPCHECK`, `<LANG>_CPPLINT`,
`<LANG>_CLANG_TIDY` and `<LANG>_INCLUDE_WHAT_YOU_USE` to accept
generator expressions.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/ClangTidy/CXX.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Cppcheck/CXX.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Cpplint/CXX.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/IncludeWhatYouUse/CXX.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/MultiLint/CXX.cmake | 8 |
5 files changed, 8 insertions, 8 deletions
diff --git a/Tests/RunCMake/ClangTidy/CXX.cmake b/Tests/RunCMake/ClangTidy/CXX.cmake index 2d22325..3214122 100644 --- a/Tests/RunCMake/ClangTidy/CXX.cmake +++ b/Tests/RunCMake/ClangTidy/CXX.cmake @@ -1,3 +1,3 @@ enable_language(CXX) -set(CMAKE_CXX_CLANG_TIDY "${PSEUDO_TIDY}" -some -args) +set(CMAKE_CXX_CLANG_TIDY "$<1:${PSEUDO_TIDY}>" -some -args) add_executable(main main.cxx) diff --git a/Tests/RunCMake/Cppcheck/CXX.cmake b/Tests/RunCMake/Cppcheck/CXX.cmake index 3b79471..7030c61 100644 --- a/Tests/RunCMake/Cppcheck/CXX.cmake +++ b/Tests/RunCMake/Cppcheck/CXX.cmake @@ -1,3 +1,3 @@ enable_language(CXX) -set(CMAKE_CXX_CPPCHECK "${PSEUDO_CPPCHECK}") +set(CMAKE_CXX_CPPCHECK "$<1:${PSEUDO_CPPCHECK}>") add_executable(main main.cxx) diff --git a/Tests/RunCMake/Cpplint/CXX.cmake b/Tests/RunCMake/Cpplint/CXX.cmake index 35f05ee..b58609c 100644 --- a/Tests/RunCMake/Cpplint/CXX.cmake +++ b/Tests/RunCMake/Cpplint/CXX.cmake @@ -1,3 +1,3 @@ enable_language(CXX) -set(CMAKE_CXX_CPPLINT "${PSEUDO_CPPLINT}" --verbose=0 --linelength=80) +set(CMAKE_CXX_CPPLINT "$<1:${PSEUDO_CPPLINT}>" --verbose=0 --linelength=80) add_executable(main main.cxx) diff --git a/Tests/RunCMake/IncludeWhatYouUse/CXX.cmake b/Tests/RunCMake/IncludeWhatYouUse/CXX.cmake index 896930c..8780bb6 100644 --- a/Tests/RunCMake/IncludeWhatYouUse/CXX.cmake +++ b/Tests/RunCMake/IncludeWhatYouUse/CXX.cmake @@ -1,3 +1,3 @@ enable_language(CXX) -set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "${PSEUDO_IWYU}" -some -args) +set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "$<1:${PSEUDO_IWYU}>" -some -args) add_executable(main main.cxx) diff --git a/Tests/RunCMake/MultiLint/CXX.cmake b/Tests/RunCMake/MultiLint/CXX.cmake index dc30146..3e99e73 100644 --- a/Tests/RunCMake/MultiLint/CXX.cmake +++ b/Tests/RunCMake/MultiLint/CXX.cmake @@ -1,6 +1,6 @@ enable_language(CXX) -set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "${PSEUDO_IWYU}" -some -args) -set(CMAKE_CXX_CLANG_TIDY "${PSEUDO_TIDY}" -some -args) -set(CMAKE_CXX_CPPLINT "${PSEUDO_CPPLINT}" --verbose=0 --linelength=80) -set(CMAKE_CXX_CPPCHECK "${PSEUDO_CPPCHECK}") +set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "$<1:${PSEUDO_IWYU}>" -some -args) +set(CMAKE_CXX_CLANG_TIDY "$<1:${PSEUDO_TIDY}>" -some -args) +set(CMAKE_CXX_CPPLINT "$<1:${PSEUDO_CPPLINT}>" --verbose=0 --linelength=80) +set(CMAKE_CXX_CPPCHECK "$<1:${PSEUDO_CPPCHECK}>") add_executable(main main.cxx) |