From ef9e9de0b80a08bb9290fce3816ff621d2ff3419 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 8 Dec 2010 13:32:09 -0500 Subject: Optionally suppress errors in cmGeneratorExpression --- Source/cmGeneratorExpression.cxx | 7 ++++--- Source/cmGeneratorExpression.h | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index a61880f..971cad2 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -17,8 +17,8 @@ //---------------------------------------------------------------------------- cmGeneratorExpression::cmGeneratorExpression( cmMakefile* mf, const char* config, - cmListFileBacktrace const& backtrace): - Makefile(mf), Config(config), Backtrace(backtrace) + cmListFileBacktrace const& backtrace, bool quiet): + Makefile(mf), Config(config), Backtrace(backtrace), Quiet(quiet) { this->TargetInfo.compile("^\\$Data.insert(this->Data.end(), result.begin(), result.end()); return true; } - else + else if(!this->Quiet) { // Failure. Report the error message. cmOStringStream e; @@ -99,6 +99,7 @@ bool cmGeneratorExpression::Evaluate() this->Backtrace); return false; } + return true; } //---------------------------------------------------------------------------- diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index aa36055..9bed780 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -32,7 +32,8 @@ class cmGeneratorExpression public: /** Construct with an evaluation context and configuration. */ cmGeneratorExpression(cmMakefile* mf, const char* config, - cmListFileBacktrace const& backtrace); + cmListFileBacktrace const& backtrace, + bool quiet = false); /** Evaluate generator expressions in a string. */ const char* Process(std::string const& input); @@ -41,6 +42,7 @@ private: cmMakefile* Makefile; const char* Config; cmListFileBacktrace const& Backtrace; + bool Quiet; std::vector Data; std::stack Barriers; cmsys::RegularExpression TargetInfo; -- cgit v0.12