summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-06-03 13:57:44 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-06-03 13:57:44 (GMT)
commite57b6a25211ea28b7b01aadfc3aaf1de79455bdb (patch)
tree3957355de7d91f18e663fc1ed13185bf31f35125 /Source/cmNinjaTargetGenerator.cxx
parentbcc29c56a599baa3e2d8bd1d56e3727911a1c7d7 (diff)
parent24466f22c0c0e3235f0a21bd2a298c39df50e2f3 (diff)
downloadCMake-e57b6a25211ea28b7b01aadfc3aaf1de79455bdb.zip
CMake-e57b6a25211ea28b7b01aadfc3aaf1de79455bdb.tar.gz
CMake-e57b6a25211ea28b7b01aadfc3aaf1de79455bdb.tar.bz2
Merge topic 'target-COMPILE_OPTIONS'
24466f2 Add target_compile_options command. 80ca9c4 Add COMPILE_OPTIONS target property. 7cb2308 cmTarget: Rename LinkInterfaceIncludeDirectoriesEntries 47f80d9 cmTarget: Rename struct to be more re-usable. 1319a14 Add <LANG>_COMPILER_ID generator expressions. 3549676 Add cmLocalGenerator::GetCompileOptions. f3ad863 VS6: Rename some variables to correspond to config values.
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 532ee67..6f912b8 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -151,9 +151,9 @@ cmNinjaTargetGenerator::ComputeFlagsForObject(cmSourceFile *source,
this->GetConfigName());
// Add include directory flags.
+ const char *config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE");
{
std::vector<std::string> includes;
- const char *config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE");
this->LocalGenerator->GetIncludeDirectories(includes,
this->GeneratorTarget,
language.c_str(), config);
@@ -171,7 +171,9 @@ cmNinjaTargetGenerator::ComputeFlagsForObject(cmSourceFile *source,
this->LocalGenerator->AppendFlags(flags, this->Makefile->GetDefineFlags());
// Add target-specific flags.
- if(this->Target->GetProperty("COMPILE_FLAGS"))
+ std::string targetFlags;
+ this->LocalGenerator->GetCompileOptions(targetFlags, this->Target, config);
+ if(!targetFlags.empty())
{
std::string langIncludeExpr = "CMAKE_";
langIncludeExpr += language;
@@ -183,7 +185,7 @@ cmNinjaTargetGenerator::ComputeFlagsForObject(cmSourceFile *source,
cmsys::RegularExpression r(regex);
std::vector<std::string> args;
cmSystemTools::ParseWindowsCommandLine(
- this->Target->GetProperty("COMPILE_FLAGS"),
+ targetFlags.c_str(),
args);
for(std::vector<std::string>::iterator i = args.begin();
i != args.end(); ++i)
@@ -198,7 +200,7 @@ cmNinjaTargetGenerator::ComputeFlagsForObject(cmSourceFile *source,
else
{
this->LocalGenerator->AppendFlags
- (flags, this->Target->GetProperty("COMPILE_FLAGS"));
+ (flags, targetFlags.c_str());
}
}