summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-05-19 18:14:53 (GMT)
committerBrad King <brad.king@kitware.com>2021-05-25 14:48:25 (GMT)
commitfb3a57575aa91c636963a12b7d0b6ec64bfce241 (patch)
treeaabc6db45fe5bf76f118b7fe5cc29de3abc5668f /Source/cmNinjaTargetGenerator.cxx
parent0f2b1c9d1bc4f802a4ecb647f2ca7258fc378df5 (diff)
downloadCMake-fb3a57575aa91c636963a12b7d0b6ec64bfce241.zip
CMake-fb3a57575aa91c636963a12b7d0b6ec64bfce241.tar.gz
CMake-fb3a57575aa91c636963a12b7d0b6ec64bfce241.tar.bz2
cmNinjaTargetGenerator: Rename source file path lookup method for clarity
The `GetSourceFilePath` method is meant only for compiled sources, and automatically handles converting it to a path for the Ninja build manifest. Rename the method to clarify both.
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 5c365c4..5499ff7 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -379,7 +379,7 @@ cmNinjaDeps cmNinjaTargetGenerator::ComputeLinkDeps(
return result;
}
-std::string cmNinjaTargetGenerator::GetSourceFilePath(
+std::string cmNinjaTargetGenerator::GetCompiledSourceNinjaPath(
cmSourceFile const* source) const
{
return this->ConvertToNinjaPath(source->GetFullPath());
@@ -1199,8 +1199,9 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
const std::string& fileConfig, bool firstForConfig)
{
std::string const language = source->GetLanguage();
- std::string const sourceFilePath =
- language == "RC" ? source->GetFullPath() : this->GetSourceFilePath(source);
+ std::string const sourceFilePath = language == "RC"
+ ? source->GetFullPath()
+ : this->GetCompiledSourceNinjaPath(source);
std::string const objectDir = this->ConvertToNinjaPath(
cmStrCat(this->GeneratorTarget->GetSupportDirectory(),
this->GetGlobalGenerator()->ConfigDirectory(config)));
@@ -1575,7 +1576,7 @@ void cmNinjaTargetGenerator::WriteTargetDependInfo(std::string const& lang,
void cmNinjaTargetGenerator::EmitSwiftDependencyInfo(
cmSourceFile const* source, const std::string& config)
{
- std::string const sourceFilePath = this->GetSourceFilePath(source);
+ std::string const sourceFilePath = this->GetCompiledSourceNinjaPath(source);
std::string const objectFilePath =
this->ConvertToNinjaPath(this->GetObjectFilePath(source, config));
std::string const swiftDepsPath = [source, objectFilePath]() -> std::string {