summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-09-10 14:58:45 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-09-10 14:58:53 (GMT)
commit054d626c9cca0facb372ba740b8a797d463141a3 (patch)
treec2c53b61ca1b74ee7e68a52f14751e2b8ba60fe7 /Source/cmGeneratorTarget.cxx
parentbbf48c494ad28d1c8ac5aa6e4cecb35c2cbf1b84 (diff)
parent5b96fd5b81bde4655e471a31bf0fc579c1d10136 (diff)
downloadCMake-054d626c9cca0facb372ba740b8a797d463141a3.zip
CMake-054d626c9cca0facb372ba740b8a797d463141a3.tar.gz
CMake-054d626c9cca0facb372ba740b8a797d463141a3.tar.bz2
Merge topic 'MoveIfDifferent'
5b96fd5b81 use cmSystemTools::MoveFileIfDifferent() 5eaf1e1be2 cmSystemTools: introduce MoveFileIfDifferent() Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3794
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index fc7589e..e4659b7 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3417,8 +3417,7 @@ std::string cmGeneratorTarget::GetPchHeader(const std::string& config,
file << pchEpilogue << "\n";
}
}
- cmSystemTools::CopyFileIfDifferent(filename_tmp, filename);
- cmSystemTools::RemoveFile(filename_tmp);
+ cmSystemTools::MoveFileIfDifferent(filename_tmp, filename);
}
return inserted.first->second;
}
@@ -3451,8 +3450,7 @@ std::string cmGeneratorTarget::GetPchSource(const std::string& config,
cmGeneratedFileStream file(filename_tmp);
file << "/* generated by CMake */\n";
}
- cmSystemTools::CopyFileIfDifferent(filename_tmp, filename);
- cmSystemTools::RemoveFile(filename_tmp);
+ cmSystemTools::MoveFileIfDifferent(filename_tmp, filename);
}
return inserted.first->second;
}