summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenerators.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-03-12 11:45:14 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-03-31 21:18:43 (GMT)
commit26d494ba01809553e335cca4f925d14dab2c50f7 (patch)
tree706f1662f3cba1ee836568634256930c251b5b9f /Source/cmQtAutoGenerators.cxx
parentd38423ecc4105d8339b7461130b964f3c69e8847 (diff)
downloadCMake-26d494ba01809553e335cca4f925d14dab2c50f7.zip
CMake-26d494ba01809553e335cca4f925d14dab2c50f7.tar.gz
CMake-26d494ba01809553e335cca4f925d14dab2c50f7.tar.bz2
cmTarget: Use string API to add sources to cmTarget objects.
Continue to call GetOrCreateSource where necessary to create cmSourceFile objects which have the GENERATED attribute set.
Diffstat (limited to 'Source/cmQtAutoGenerators.cxx')
-rw-r--r--Source/cmQtAutoGenerators.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index a6e6af7..71c4630 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -187,13 +187,11 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target)
mocCppFile += "/";
mocCppFile += automocTargetName;
mocCppFile += ".cpp";
- cmSourceFile* mocCppSource = makefile->GetOrCreateSource(
- mocCppFile,
- true);
+ makefile->GetOrCreateSource(mocCppFile, true);
makefile->AppendProperty("ADDITIONAL_MAKE_CLEAN_FILES",
mocCppFile.c_str(), false);
- target->AddSourceFile(mocCppSource);
+ target->AddSource(mocCppFile);
}
// create a custom target for running generators at buildtime:
std::string autogenTargetName = getAutogenTargetName(target);
@@ -479,7 +477,7 @@ void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target)
const char *skipMocSep = "";
const char *skipUicSep = "";
- std::vector<cmSourceFile*> newRccFiles;
+ std::vector<std::string> newRccFiles;
for(std::vector<cmSourceFile*>::const_iterator fileIt = srcFiles.begin();
fileIt != srcFiles.end();
@@ -512,9 +510,8 @@ void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target)
rcc_output_file += "/qrc_" + basename + ".cpp";
makefile->AppendProperty("ADDITIONAL_MAKE_CLEAN_FILES",
rcc_output_file.c_str(), false);
- cmSourceFile* rccCppSource
- = makefile->GetOrCreateSource(rcc_output_file, true);
- newRccFiles.push_back(rccCppSource);
+ makefile->GetOrCreateSource(rcc_output_file, true);
+ newRccFiles.push_back(rcc_output_file);
}
}
@@ -546,11 +543,11 @@ void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target)
}
}
- for(std::vector<cmSourceFile*>::const_iterator fileIt = newRccFiles.begin();
+ for(std::vector<std::string>::const_iterator fileIt = newRccFiles.begin();
fileIt != newRccFiles.end();
++fileIt)
{
- const_cast<cmTarget*>(target)->AddSourceFile(*fileIt);
+ const_cast<cmTarget*>(target)->AddSource(*fileIt);
}
}