diff options
author | Brad King <brad.king@kitware.com> | 2015-04-01 17:19:32 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-04-01 17:19:32 (GMT) |
commit | aa508a52992990fd375253bed3a1e6c392722a56 (patch) | |
tree | fc14b9aa5d7a3131c3c887ce2b908a3a9063c94e /Source | |
parent | 6f578ee3ade86f4bad786bf87c03afb0d8262249 (diff) | |
parent | 44990732a8c2340193667c200987503bbbcb442f (diff) | |
download | CMake-aa508a52992990fd375253bed3a1e6c392722a56.zip CMake-aa508a52992990fd375253bed3a1e6c392722a56.tar.gz CMake-aa508a52992990fd375253bed3a1e6c392722a56.tar.bz2 |
Merge topic 'makefile-DELETE_ON_ERROR'
44990732 Help: Add notes for topic 'makefile-DELETE_ON_ERROR'
4adf1dad Makefile: Tell GNU make to delete rule outputs on error (#15474)
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalBorlandMakefileGenerator.h | 1 | ||||
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.h | 3 | ||||
-rw-r--r-- | Source/cmGlobalWatcomWMakeGenerator.h | 1 | ||||
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 8 |
4 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmGlobalBorlandMakefileGenerator.h b/Source/cmGlobalBorlandMakefileGenerator.h index 120d2f8..005f0d6 100644 --- a/Source/cmGlobalBorlandMakefileGenerator.h +++ b/Source/cmGlobalBorlandMakefileGenerator.h @@ -46,6 +46,7 @@ public: cmMakefile *, bool optional); virtual bool AllowNotParallel() const { return false; } + virtual bool AllowDeleteOnError() const { return false; } }; #endif diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index 50a901e..a76a835 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -128,6 +128,9 @@ public: /** Does the make tool tolerate .NOTPARALLEL? */ virtual bool AllowNotParallel() const { return true; } + /** Does the make tool tolerate .DELETE_ON_ERROR? */ + virtual bool AllowDeleteOnError() const { return true; } + virtual void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const; protected: void WriteMainMakefile2(); diff --git a/Source/cmGlobalWatcomWMakeGenerator.h b/Source/cmGlobalWatcomWMakeGenerator.h index 0e577b5..7bc209b 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.h +++ b/Source/cmGlobalWatcomWMakeGenerator.h @@ -45,6 +45,7 @@ public: cmMakefile *, bool optional); virtual bool AllowNotParallel() const { return false; } + virtual bool AllowDeleteOnError() const { return false; } }; #endif diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 641cd23..2cd2d3e 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -122,6 +122,14 @@ void cmMakefileTargetGenerator::CreateRuleFile() return; } this->LocalGenerator->WriteDisclaimer(*this->BuildFileStream); + if (this->GlobalGenerator->AllowDeleteOnError()) + { + std::vector<std::string> no_depends; + std::vector<std::string> no_commands; + this->LocalGenerator->WriteMakeRule( + *this->BuildFileStream, "Delete rule output on recipe failure.", + ".DELETE_ON_ERROR", no_depends, no_commands, false); + } this->LocalGenerator->WriteSpecialTargetsTop(*this->BuildFileStream); } |