summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-04-22 12:59:56 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-04-22 13:00:07 (GMT)
commit8e666c2027c09ec21d673d482c9eca919a3d3f02 (patch)
tree7ad2d504c8fc26a4eaebb5329a5f67f7887b706b /Source
parent1bd85e8f3f57d4c279dcd2a3ea4c24a0cf3c5f58 (diff)
parent1de3382de5f183726c65415cd1e31a4e1812bc92 (diff)
downloadCMake-8e666c2027c09ec21d673d482c9eca919a3d3f02.zip
CMake-8e666c2027c09ec21d673d482c9eca919a3d3f02.tar.gz
CMake-8e666c2027c09ec21d673d482c9eca919a3d3f02.tar.bz2
Merge topic 'ghs-rerun-cmake-fix'
1de3382de5 GHS: Fix RERUN_CMAKE issue when generation step fails Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7183
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalGhsMultiGenerator.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx
index f405a04..9c334a5 100644
--- a/Source/cmGlobalGhsMultiGenerator.cxx
+++ b/Source/cmGlobalGhsMultiGenerator.cxx
@@ -425,13 +425,6 @@ void cmGlobalGhsMultiGenerator::Generate()
this->WriteFileHeader(ftarget);
this->WriteCustomTargetBOD(ftarget);
ftarget.Close();
-
- // create the stamp file when running CMake
- if (!this->StampFile.empty()) {
- cmGeneratedFileStream fstamp(this->StampFile);
- fstamp.SetCopyIfDifferent(false);
- fstamp.Close();
- }
}
void cmGlobalGhsMultiGenerator::OutputTopLevelProject(
@@ -695,10 +688,16 @@ bool cmGlobalGhsMultiGenerator::AddCheckTarget()
listFiles.erase(newEnd, listFiles.end());
// Create a rule to re-run CMake and create output file.
+ cmCustomCommandLines commandLines;
+ commandLines.emplace_back(
+ cmMakeCommandLine({ cmSystemTools::GetCMakeCommand(), "-E", "rm", "-f",
+ this->StampFile }));
std::string argS = cmStrCat("-S", lg.GetSourceDirectory());
std::string argB = cmStrCat("-B", lg.GetBinaryDirectory());
- cmCustomCommandLines commandLines = cmMakeSingleCommandLine(
- { cmSystemTools::GetCMakeCommand(), argS, argB });
+ commandLines.emplace_back(
+ cmMakeCommandLine({ cmSystemTools::GetCMakeCommand(), argS, argB }));
+ commandLines.emplace_back(cmMakeCommandLine(
+ { cmSystemTools::GetCMakeCommand(), "-E", "touch", this->StampFile }));
/* Create the target(Exclude from ALL_BUILD).
*