summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-06-27 16:04:02 (GMT)
committerBrad King <brad.king@kitware.com>2013-06-27 16:57:32 (GMT)
commitd221eac81261679d3580849218220290fcd122df (patch)
tree15df696e0e790c05387fd0441d52110e16a71ec1 /Source/cmVisualStudio10TargetGenerator.cxx
parentb6385cabec5356b471dc37bd999d1803555ba386 (diff)
downloadCMake-d221eac81261679d3580849218220290fcd122df.zip
CMake-d221eac81261679d3580849218220290fcd122df.tar.gz
CMake-d221eac81261679d3580849218220290fcd122df.tar.bz2
Refactor target COMPILE_OPTIONS and COMPILE_FLAGS handling
Replace the cmLocalGenerator GetCompileOptions method with an AddCompileOptions method since all call sites of the former simply append the result to a flags string anyway. Add a "lang" argument to AddCompileOptions and move the CMAKE_<LANG>_FLAGS_REGEX filter into it. Move the call sites in each generator to a location that has both the language and configuration available. In the Makefile generator this also moves the flags from build.make to flags.make where they belong.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx11
1 files changed, 2 insertions, 9 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 7e3f444..479721a 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1276,17 +1276,10 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
{
flags += " /TP ";
}
+ this->LocalGenerator->AddCompileOptions(flags, this->Target,
+ linkLanguage, configName.c_str());
}
- std::string targetFlags;
- this->LocalGenerator->GetCompileOptions(targetFlags, this->Target,
- configName.c_str());
- // Add the target-specific flags.
- if(!targetFlags.empty())
- {
- flags += " ";
- flags += targetFlags;
- }
// Get preprocessor definitions for this directory.
std::string defineFlags = this->Target->GetMakefile()->GetDefineFlags();
clOptions.FixExceptionHandlingDefault();