diff options
author | Brad King <brad.king@kitware.com> | 2022-11-17 15:24:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-11-18 16:16:50 (GMT) |
commit | ad16ae5c70778e6bfd6d30b17a3ad9b248b2a569 (patch) | |
tree | 1f1f3ccfa2dbc0a98ab4ef3ad0fed5a1e18eea1d /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 43918087123d5ec5b6df3b7cb56c123a7adc5b90 (diff) | |
download | CMake-ad16ae5c70778e6bfd6d30b17a3ad9b248b2a569.zip CMake-ad16ae5c70778e6bfd6d30b17a3ad9b248b2a569.tar.gz CMake-ad16ae5c70778e6bfd6d30b17a3ad9b248b2a569.tar.bz2 |
VS: Recognize -std: flag in CMAKE_C_FLAGS in target with C++ sources
Extend commit b325484928 (VS: Fix C language standard in target with C++
sources, 2020-09-28, v3.19.0-rc1~74^2) to account for users placing a
`-std:` flag in `CMAKE_C_FLAGS`.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 7e43bee..cd73551 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -3293,6 +3293,8 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( this->GeneratorTarget->GetLanguages(languages, configName); if (languages.count("C")) { std::string flagsC; + this->LocalGenerator->AddLanguageFlags( + flagsC, this->GeneratorTarget, cmBuildStep::Compile, "C", configName); this->LocalGenerator->AddCompileOptions(flagsC, this->GeneratorTarget, "C", configName); Options optC(this->LocalGenerator, Options::Compiler, |