[Cmake-commits] CMake branch, master, updated. v3.12.1-427-g786af7a

Kitware Robot kwrobot at kitware.com
Fri Aug 17 19:15:09 EDT 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  786af7a7116ff4c7703f9dc3b6eaee1d8099ad2b (commit)
       via  16e17376c74b68d8e62658c63210a30da6b98428 (commit)
      from  39cfdd65565d9be4a4a00191a6ce8168c4c49b70 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=786af7a7116ff4c7703f9dc3b6eaee1d8099ad2b
commit 786af7a7116ff4c7703f9dc3b6eaee1d8099ad2b
Merge: 39cfdd6 16e1737
Author:     Craig Scott <craig.scott at crascit.com>
AuthorDate: Fri Aug 17 23:06:28 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Aug 17 19:06:37 2018 -0400

    Merge topic 'evaluate-stdstring'
    
    16e17376c7 EvaluateExpression() returns std::string
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2293


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=16e17376c74b68d8e62658c63210a30da6b98428
commit 16e17376c74b68d8e62658c63210a30da6b98428
Author:     Vitaly Stakhovsky <vvs31415 at gitlab.org>
AuthorDate: Thu Aug 16 08:09:42 2018 -0400
Commit:     Vitaly Stakhovsky <vvs31415 at gitlab.org>
CommitDate: Thu Aug 16 08:09:42 2018 -0400

    EvaluateExpression() returns std::string

diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index f26c717..b1b2b88 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -390,7 +390,7 @@ const char* cmGeneratorExpressionInterpreter::Evaluate(
   const char* expression, const std::string& property)
 {
   if (this->Target.empty()) {
-    return this->EvaluateExpression(expression);
+    return this->EvaluateExpression(expression).c_str();
   }
 
   // Specify COMPILE_OPTIONS to DAGchecker, same semantic as COMPILE_FLAGS
@@ -398,5 +398,5 @@ const char* cmGeneratorExpressionInterpreter::Evaluate(
     this->Target, property == "COMPILE_FLAGS" ? "COMPILE_OPTIONS" : property,
     nullptr, nullptr);
 
-  return this->EvaluateExpression(expression, &dagChecker);
+  return this->EvaluateExpression(expression, &dagChecker).c_str();
 }
diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h
index 2899317..1ceb7da 100644
--- a/Source/cmGeneratorExpression.h
+++ b/Source/cmGeneratorExpression.h
@@ -181,7 +181,7 @@ public:
 
   const char* Evaluate(const char* expression)
   {
-    return this->EvaluateExpression(expression);
+    return this->EvaluateExpression(expression).c_str();
   }
   const char* Evaluate(const std::string& expression)
   {
@@ -212,7 +212,7 @@ protected:
   const std::string& GetTargetName() const { return this->Target; }
   const std::string& GetLanguage() const { return this->Language; }
 
-  const char* EvaluateExpression(
+  const std::string& EvaluateExpression(
     const char* expression,
     cmGeneratorExpressionDAGChecker* dagChecker = nullptr)
   {
@@ -220,16 +220,13 @@ protected:
       this->GeneratorExpression.Parse(expression);
 
     if (dagChecker == nullptr) {
-      return this->CompiledGeneratorExpression
-        ->Evaluate(this->LocalGenerator, this->Config, false,
-                   this->GeneratorTarget)
-        .c_str();
+      return this->CompiledGeneratorExpression->Evaluate(
+        this->LocalGenerator, this->Config, false, this->GeneratorTarget);
     }
 
-    return this->CompiledGeneratorExpression
-      ->Evaluate(this->LocalGenerator, this->Config, false,
-                 this->GeneratorTarget, dagChecker, this->Language)
-      .c_str();
+    return this->CompiledGeneratorExpression->Evaluate(
+      this->LocalGenerator, this->Config, false, this->GeneratorTarget,
+      dagChecker, this->Language);
   }
 
 private:

-----------------------------------------------------------------------

Summary of changes:
 Source/cmGeneratorExpression.cxx |  4 ++--
 Source/cmGeneratorExpression.h   | 17 +++++++----------
 2 files changed, 9 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list