diff options
author | Brad King <brad.king@kitware.com> | 2022-07-27 13:53:36 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-07-27 13:53:52 (GMT) |
commit | e781d92de56e0944b201ccb17ebb62117e05e1c2 (patch) | |
tree | 6d9c8bf1d75bb5735287fa0c72dda8cbf83b2325 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 3891b5a06fb98ca3c948e968ca7afee051ec2842 (diff) | |
parent | feeb9ae4ba8c162a84d9f7eb65ddde35eb9329a1 (diff) | |
download | CMake-e781d92de56e0944b201ccb17ebb62117e05e1c2.zip CMake-e781d92de56e0944b201ccb17ebb62117e05e1c2.tar.gz CMake-e781d92de56e0944b201ccb17ebb62117e05e1c2.tar.bz2 |
Merge topic 'vs-fuzzer'
feeb9ae4ba VS: Add support for (lib)fuzzer /fsanitize=fuzzer flag
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7471
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index a00cd2b..f17a654 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1523,6 +1523,10 @@ void cmVisualStudio10TargetGenerator::WriteMSToolConfigurationValues( this->ASanEnabledConfigurations.end()) { e1.Element("EnableAsan", "true"); } + if (this->FuzzerEnabledConfigurations.find(config) != + this->FuzzerEnabledConfigurations.end()) { + e1.Element("EnableFuzzer", "true"); + } { auto s = this->SpectreMitigation.find(config); if (s != this->SpectreMitigation.end()) { @@ -3148,6 +3152,11 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( this->ASanEnabledConfigurations.insert(configName); } + // Check if (lib)Fuzzer is enabled. + if (flags.find("/fsanitize=fuzzer") != std::string::npos) { + this->FuzzerEnabledConfigurations.insert(configName); + } + // Precompile Headers std::string pchHeader = this->GeneratorTarget->GetPchHeader(configName, linkLanguage); |