diff options
author | Fred Baksik <fdk17@ftml.net> | 2022-04-16 11:41:43 (GMT) |
---|---|---|
committer | Fred Baksik <fdk17@ftml.net> | 2022-04-16 11:54:46 (GMT) |
commit | 1de3382de5f183726c65415cd1e31a4e1812bc92 (patch) | |
tree | cd7477a106742c358ce4b399c98d7e47019cf9a3 /Source | |
parent | c279845ee70923504841e4b3ae7f4016cb505280 (diff) | |
download | CMake-1de3382de5f183726c65415cd1e31a4e1812bc92.zip CMake-1de3382de5f183726c65415cd1e31a4e1812bc92.tar.gz CMake-1de3382de5f183726c65415cd1e31a4e1812bc92.tar.bz2 |
GHS: Fix RERUN_CMAKE issue when generation step fails
Fixes: 23435
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalGhsMultiGenerator.cxx | 17 |
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). * |