summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-20 12:51:12 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-10-20 12:51:12 (GMT)
commit090c8712435f19d3cb7e23a7ca67ba21313ee0c8 (patch)
tree3bb4dee1f7895ac26eb748ccdb887d4f44429cb1 /Source/cmNinjaNormalTargetGenerator.cxx
parenta5f4463eedc31f6f552b7f7837212661349898df (diff)
parent3a9e92bce1c10e0082d431a61e100485fd6cf270 (diff)
downloadCMake-090c8712435f19d3cb7e23a7ca67ba21313ee0c8.zip
CMake-090c8712435f19d3cb7e23a7ca67ba21313ee0c8.tar.gz
CMake-090c8712435f19d3cb7e23a7ca67ba21313ee0c8.tar.bz2
Merge topic 'ninja-only-object-rules'
3a9e92bc Ninja: Add compile rules only for languages that are actually compiled
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 3b71e34..11773f9 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -107,10 +107,11 @@ void cmNinjaNormalTargetGenerator::WriteLanguagesRules()
// Write rules for languages compiled in this target.
std::set<std::string> languages;
- std::vector<cmSourceFile*> sourceFiles;
- this->GetGeneratorTarget()->GetSourceFiles(
+ std::vector<cmSourceFile const*> sourceFiles;
+ this->GetGeneratorTarget()->GetObjectSources(
sourceFiles, this->GetMakefile()->GetSafeDefinition("CMAKE_BUILD_TYPE"));
- for (std::vector<cmSourceFile*>::const_iterator i = sourceFiles.begin();
+ for (std::vector<cmSourceFile const*>::const_iterator i =
+ sourceFiles.begin();
i != sourceFiles.end(); ++i) {
const std::string& lang = (*i)->GetLanguage();
if (!lang.empty()) {