mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 07:08:38 -05:00
TargetGenerator: Factor out generation of code check rules
De-duplicate code check rule generation in Ninja and Makefile generators by moving their implementation to `cmCommonTargetGenerator`. Previously Ninja was generating code check rules per language. It was changed to generate code check rules for each source file.
This commit is contained in:
committed by
Brad King
parent
023af4ab2f
commit
993dde925f
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "cmConfigure.h" // IWYU pragma: keep
|
||||
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
@@ -53,6 +54,9 @@ protected:
|
||||
|
||||
virtual void AddIncludeFlags(std::string& flags, std::string const& lang,
|
||||
const std::string& config) = 0;
|
||||
virtual std::string GetClangTidyReplacementsFilePath(
|
||||
std::string const& directory, cmSourceFile const& source,
|
||||
std::string const& config) const = 0;
|
||||
|
||||
void AppendOSXVerFlag(std::string& flags, const std::string& lang,
|
||||
const char* name, bool so);
|
||||
@@ -63,7 +67,13 @@ protected:
|
||||
std::string GetIncludes(std::string const& l, const std::string& config);
|
||||
std::string GetManifests(const std::string& config);
|
||||
std::string GetAIXExports(std::string const& config);
|
||||
std::string GenerateCodeCheckRules(
|
||||
cmSourceFile const& source, std::string& compilerLauncher,
|
||||
std::string const& cmakeCmd, std::string const& config,
|
||||
std::function<std::string(std::string const&)> const& pathConverter);
|
||||
|
||||
std::string GetCompilerLauncher(std::string const& lang,
|
||||
std::string const& config);
|
||||
std::vector<std::string> GetLinkedTargetDirectories(
|
||||
const std::string& lang, const std::string& config) const;
|
||||
std::string ComputeTargetCompilePDB(const std::string& config) const;
|
||||
|
||||
Reference in New Issue
Block a user