summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 84767a8..a9ccc68 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2239,6 +2239,9 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
linkLanguage, configName.c_str());
}
+ // Check IPO related warning/error.
+ this->GeneratorTarget->IsIPOEnabled(configName);
+
// Get preprocessor definitions for this directory.
std::string defineFlags =
this->GeneratorTarget->Target->GetMakefile()->GetDefineFlags();
@@ -2402,6 +2405,11 @@ bool cmVisualStudio10TargetGenerator::ComputeRcOptions(
std::string(this->Makefile->GetSafeDefinition(rcConfigFlagsVar));
rcOptions.Parse(flags.c_str());
+
+ // For historical reasons, add the C preprocessor defines to RC.
+ Options& clOptions = *(this->ClOptions[configName]);
+ rcOptions.AddDefines(clOptions.GetDefines());
+
this->RcOptions[configName] = pOptions.release();
return true;
}
@@ -2414,12 +2422,9 @@ void cmVisualStudio10TargetGenerator::WriteRCOptions(
}
this->WriteString("<ResourceCompile>\n", 2);
- // Preprocessor definitions and includes are shared with clOptions.
- Options& clOptions = *(this->ClOptions[configName]);
- clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ",
- "\n", "RC");
-
Options& rcOptions = *(this->RcOptions[configName]);
+ rcOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ",
+ "\n", "RC");
rcOptions.AppendFlag("AdditionalIncludeDirectories", includes);
rcOptions.AppendFlag("AdditionalIncludeDirectories",
"%(AdditionalIncludeDirectories)");