cmTarget: Rename AddSource method for backward compatibility.
Add a new AddSource method for future use.
This commit is contained in:
parent
99a9c51f1a
commit
0ed5ce4cd8
@ -412,7 +412,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
|
|||||||
std::string listfile = mf->GetStartDirectory();
|
std::string listfile = mf->GetStartDirectory();
|
||||||
listfile += "/";
|
listfile += "/";
|
||||||
listfile += "CMakeLists.txt";
|
listfile += "CMakeLists.txt";
|
||||||
allbuild->AddSource(listfile.c_str());
|
allbuild->AddSourceCMP0049(listfile.c_str());
|
||||||
|
|
||||||
// Add XCODE depend helper
|
// Add XCODE depend helper
|
||||||
std::string dir = mf->GetCurrentOutputDirectory();
|
std::string dir = mf->GetCurrentOutputDirectory();
|
||||||
@ -495,7 +495,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
|
|||||||
listfile = lg->GetMakefile()->GetStartDirectory();
|
listfile = lg->GetMakefile()->GetStartDirectory();
|
||||||
listfile += "/";
|
listfile += "/";
|
||||||
listfile += "CMakeLists.txt";
|
listfile += "CMakeLists.txt";
|
||||||
target.AddSource(listfile.c_str());
|
target.AddSourceCMP0049(listfile.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1266,7 +1266,7 @@ cmMakefile::AddUtilityCommand(const std::string& utilityName,
|
|||||||
commandLines, comment,
|
commandLines, comment,
|
||||||
workingDirectory, no_replace,
|
workingDirectory, no_replace,
|
||||||
escapeOldStyle);
|
escapeOldStyle);
|
||||||
cmSourceFile* sf = target->AddSource(force);
|
cmSourceFile* sf = target->AddSourceCMP0049(force);
|
||||||
|
|
||||||
// The output is not actually created so mark it symbolic.
|
// The output is not actually created so mark it symbolic.
|
||||||
if(sf)
|
if(sf)
|
||||||
|
@ -587,13 +587,13 @@ void cmTarget::AddSources(std::vector<std::string> const& srcs)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->AddSource(src);
|
this->AddSourceCMP0049(src);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmSourceFile* cmTarget::AddSource(const std::string& s)
|
cmSourceFile* cmTarget::AddSourceCMP0049(const std::string& s)
|
||||||
{
|
{
|
||||||
std::string src = s;
|
std::string src = s;
|
||||||
|
|
||||||
@ -632,7 +632,12 @@ cmSourceFile* cmTarget::AddSource(const std::string& s)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return this->AddSource(src);
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
cmSourceFile* cmTarget::AddSource(const std::string& src)
|
||||||
|
{
|
||||||
cmSourceFile* sf = this->Makefile->GetOrCreateSource(src);
|
cmSourceFile* sf = this->Makefile->GetOrCreateSource(src);
|
||||||
this->AddSourceFile(sf);
|
this->AddSourceFile(sf);
|
||||||
return sf;
|
return sf;
|
||||||
|
@ -146,6 +146,7 @@ public:
|
|||||||
* Add sources to the target.
|
* Add sources to the target.
|
||||||
*/
|
*/
|
||||||
void AddSources(std::vector<std::string> const& srcs);
|
void AddSources(std::vector<std::string> const& srcs);
|
||||||
|
cmSourceFile* AddSourceCMP0049(const std::string& src);
|
||||||
cmSourceFile* AddSource(const std::string& src);
|
cmSourceFile* AddSource(const std::string& src);
|
||||||
|
|
||||||
enum LinkLibraryType {GENERAL, DEBUG, OPTIMIZED};
|
enum LinkLibraryType {GENERAL, DEBUG, OPTIMIZED};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user