diff options
author | Fredrik Claesson <fredrik.claesson@sick.se> | 2022-07-13 14:12:15 (GMT) |
---|---|---|
committer | Fredrik Claesson <fredrik.claesson@sick.se> | 2022-07-13 14:12:15 (GMT) |
commit | feeb9ae4ba8c162a84d9f7eb65ddde35eb9329a1 (patch) | |
tree | 57eb079ce8651bb97cf3c35f2ac35738a27a8266 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 6a35e799fd8742fa875c304daed2784a1ce9d710 (diff) | |
download | CMake-feeb9ae4ba8c162a84d9f7eb65ddde35eb9329a1.zip CMake-feeb9ae4ba8c162a84d9f7eb65ddde35eb9329a1.tar.gz CMake-feeb9ae4ba8c162a84d9f7eb65ddde35eb9329a1.tar.bz2 |
VS: Add support for (lib)fuzzer /fsanitize=fuzzer flag
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 a7460e8..809617a 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1557,6 +1557,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()) { @@ -3315,6 +3319,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); |