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  78681bf001f4f29cf2f452327587669078a39461 (commit)
       via  f21d811c7c4c9b61c6c81414b3e8803db392183c (commit)
       via  121a036f73665a18ccadeaf50b00cc623d8ed9df (commit)
       via  acfe53c58817c662b935fbe0f0443de298371731 (commit)
       via  b8bb6ba653df9d53d93824bb7185bf022e9bf2ef (commit)
       via  bf572ac952d7ddf2b7208efc56f104844aea72e2 (commit)
      from  cd4ed3ecb2ecfe3e2043ae0338a02323a508e0dd (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=78681bf001f4f29cf2f452327587669078a39461
commit 78681bf001f4f29cf2f452327587669078a39461
Merge: f21d811 121a036
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Wed Oct 17 17:27:49 2018 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Wed Oct 17 13:27:56 2018 -0400

    Merge topic 'better-empty-list-behavior'
    
    121a036f73 cmListCommand: handle empty lists for list(REMOVE_AT)
    acfe53c588 cmListCommand: make list(ACTION not_a_list) succeed when 
idempotent
    bf572ac952 cmListCommand: check list(FILTER) operation before the list
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !2478


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f21d811c7c4c9b61c6c81414b3e8803db392183c
commit f21d811c7c4c9b61c6c81414b3e8803db392183c
Merge: cd4ed3e b8bb6ba
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Wed Oct 17 17:26:27 2018 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Wed Oct 17 13:26:33 2018 -0400

    Merge topic 'gem-string'
    
    b8bb6ba653 cmGeneratorTarget::GetExportMacro: return const std::string*
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !2485


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=121a036f73665a18ccadeaf50b00cc623d8ed9df
commit 121a036f73665a18ccadeaf50b00cc623d8ed9df
Author:     Ben Boeckel <ben.boec...@kitware.com>
AuthorDate: Thu Oct 11 17:26:44 2018 -0400
Commit:     Ben Boeckel <ben.boec...@kitware.com>
CommitDate: Tue Oct 16 14:31:39 2018 -0400

    cmListCommand: handle empty lists for list(REMOVE_AT)
    
    Treat an empty list as a list with no valid bounds and return an error
    message indicating that any given indices are out-of-bounds.

diff --git a/Help/release/dev/better-empty-list-behavior.rst 
b/Help/release/dev/better-empty-list-behavior.rst
index 12a131f..cd864f4 100644
--- a/Help/release/dev/better-empty-list-behavior.rst
+++ b/Help/release/dev/better-empty-list-behavior.rst
@@ -4,3 +4,6 @@ better-empty-list-behavior
 * The :command:`list` operations ``REMOVE_ITEM``, ``REMOVE_DUPLICATES``,
   ``SORT``, ``REVERSE``, and ``FILTER`` all now accept a non-existent variable
   as the list since these operations on empty lists is also the empty list.
+
+* The :command:`list` operation ``REMOVE_AT`` now indicates that the given
+  indices are invalid for a non-existent variable or empty list.
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx
index b46eb6d..b2acb90 100644
--- a/Source/cmListCommand.cxx
+++ b/Source/cmListCommand.cxx
@@ -1225,13 +1225,17 @@ bool 
cmListCommand::HandleRemoveAtCommand(std::vector<std::string> const& args)
   const std::string& listName = args[1];
   // expand the variable
   std::vector<std::string> varArgsExpanded;
-  if (!this->GetList(varArgsExpanded, listName)) {
-    this->SetError("sub-command REMOVE_AT requires list to be present.");
-    return false;
-  }
-  // FIXME: Add policy to make non-existing lists an error like empty lists.
-  if (varArgsExpanded.empty()) {
-    this->SetError("REMOVE_AT given empty list");
+  if (!this->GetList(varArgsExpanded, listName) || varArgsExpanded.empty()) {
+    std::ostringstream str;
+    str << "index: ";
+    for (size_t i = 1; i < args.size(); ++i) {
+      str << args[i];
+      if (i != args.size() - 1) {
+        str << ", ";
+      }
+    }
+    str << " out of range (0, 0)";
+    this->SetError(str.str());
     return false;
   }
 
diff --git a/Tests/RunCMake/list/EmptyRemoveAt0-stderr.txt 
b/Tests/RunCMake/list/EmptyRemoveAt0-stderr.txt
index b24a0ed..9368e88 100644
--- a/Tests/RunCMake/list/EmptyRemoveAt0-stderr.txt
+++ b/Tests/RunCMake/list/EmptyRemoveAt0-stderr.txt
@@ -1,4 +1,4 @@
 CMake Error at EmptyRemoveAt0.cmake:2 \(list\):
-  list REMOVE_AT given empty list
+  list index: mylist, 0 out of range \(0, 0\)
 Call Stack \(most recent call first\):
   CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/list/REMOVE_AT-EmptyList-result.txt 
b/Tests/RunCMake/list/REMOVE_AT-EmptyList-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/list/REMOVE_AT-EmptyList-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/list/REMOVE_AT-EmptyList-stderr.txt 
b/Tests/RunCMake/list/REMOVE_AT-EmptyList-stderr.txt
new file mode 100644
index 0000000..582b74b
--- /dev/null
+++ b/Tests/RunCMake/list/REMOVE_AT-EmptyList-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at REMOVE_AT-EmptyList.cmake:2 \(list\):
+  list index: nosuchlist, 0 out of range \(0, 0\)
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/list/REMOVE_AT-EmptyList.cmake 
b/Tests/RunCMake/list/REMOVE_AT-EmptyList.cmake
new file mode 100644
index 0000000..ff0dde8
--- /dev/null
+++ b/Tests/RunCMake/list/REMOVE_AT-EmptyList.cmake
@@ -0,0 +1,6 @@
+set(nosuchlist "")
+list(REMOVE_AT nosuchlist 0)
+if (NOT DEFINED nosuchlist OR NOT nosuchlist STREQUAL "")
+  message(FATAL_ERROR
+    "list(REMOVE_AT) modified our list")
+endif ()
diff --git a/Tests/RunCMake/list/REMOVE_AT-NotList-stderr.txt 
b/Tests/RunCMake/list/REMOVE_AT-NotList-stderr.txt
index d6e8d85..563d865 100644
--- a/Tests/RunCMake/list/REMOVE_AT-NotList-stderr.txt
+++ b/Tests/RunCMake/list/REMOVE_AT-NotList-stderr.txt
@@ -1,4 +1,4 @@
 ^CMake Error at REMOVE_AT-NotList.cmake:2 \(list\):
-  list sub-command REMOVE_AT requires list to be present.
+  list index: nosuchlist, 0 out of range \(0, 0\)
 Call Stack \(most recent call first\):
   CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/list/REMOVE_AT-NotList.cmake 
b/Tests/RunCMake/list/REMOVE_AT-NotList.cmake
index 5266c7f..090df49 100644
--- a/Tests/RunCMake/list/REMOVE_AT-NotList.cmake
+++ b/Tests/RunCMake/list/REMOVE_AT-NotList.cmake
@@ -1,2 +1,6 @@
 unset(nosuchlist)
 list(REMOVE_AT nosuchlist 0)
+if (DEFINED nosuchlist)
+  message(FATAL_ERROR
+      "list(REMOVE_AT) created our list")
+endif ()
diff --git a/Tests/RunCMake/list/RunCMakeTest.cmake 
b/Tests/RunCMake/list/RunCMakeTest.cmake
index a8a0b57..bf3d22d 100644
--- a/Tests/RunCMake/list/RunCMakeTest.cmake
+++ b/Tests/RunCMake/list/RunCMakeTest.cmake
@@ -22,6 +22,8 @@ run_cmake(REMOVE_DUPLICATES-TooManyArguments)
 run_cmake(REVERSE-TooManyArguments)
 run_cmake(SUBLIST-TooManyArguments)
 
+run_cmake(REMOVE_AT-EmptyList)
+
 run_cmake(FILTER-NotList)
 run_cmake(REMOVE_AT-NotList)
 run_cmake(REMOVE_DUPLICATES-NotList)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=acfe53c58817c662b935fbe0f0443de298371731
commit acfe53c58817c662b935fbe0f0443de298371731
Author:     Ben Boeckel <ben.boec...@kitware.com>
AuthorDate: Thu Oct 11 17:23:12 2018 -0400
Commit:     Ben Boeckel <ben.boec...@kitware.com>
CommitDate: Tue Oct 16 14:31:39 2018 -0400

    cmListCommand: make list(ACTION not_a_list) succeed when idempotent
    
    The operations changed here all are no-ops on empty lists anyways, so
    just have them succeed when given non-extant lists.
    
      - `list(REMOVE_ITEM)`
      - `list(REMOVE_DUPLICATES)`
      - `list(SORT)`
      - `list(FILTER)`
      - `list(REVERSE)`

diff --git a/Help/release/dev/better-empty-list-behavior.rst 
b/Help/release/dev/better-empty-list-behavior.rst
new file mode 100644
index 0000000..12a131f
--- /dev/null
+++ b/Help/release/dev/better-empty-list-behavior.rst
@@ -0,0 +1,6 @@
+better-empty-list-behavior
+--------------------------
+
+* The :command:`list` operations ``REMOVE_ITEM``, ``REMOVE_DUPLICATES``,
+  ``SORT``, ``REVERSE``, and ``FILTER`` all now accept a non-existent variable
+  as the list since these operations on empty lists is also the empty list.
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx
index b9c7ada..b46eb6d 100644
--- a/Source/cmListCommand.cxx
+++ b/Source/cmListCommand.cxx
@@ -346,8 +346,7 @@ bool cmListCommand::HandleRemoveItemCommand(
   // expand the variable
   std::vector<std::string> varArgsExpanded;
   if (!this->GetList(varArgsExpanded, listName)) {
-    this->SetError("sub-command REMOVE_ITEM requires list to be present.");
-    return false;
+    return true;
   }
 
   std::vector<std::string> remove(args.begin() + 2, args.end());
@@ -376,8 +375,7 @@ bool 
cmListCommand::HandleReverseCommand(std::vector<std::string> const& args)
   // expand the variable
   std::vector<std::string> varArgsExpanded;
   if (!this->GetList(varArgsExpanded, listName)) {
-    this->SetError("sub-command REVERSE requires list to be present.");
-    return false;
+    return true;
   }
 
   std::string value = cmJoin(cmReverseRange(varArgsExpanded), ";");
@@ -399,9 +397,7 @@ bool cmListCommand::HandleRemoveDuplicatesCommand(
   // expand the variable
   std::vector<std::string> varArgsExpanded;
   if (!this->GetList(varArgsExpanded, listName)) {
-    this->SetError(
-      "sub-command REMOVE_DUPLICATES requires list to be present.");
-    return false;
+    return true;
   }
 
   std::vector<std::string>::const_iterator argsEnd =
@@ -1152,8 +1148,7 @@ bool 
cmListCommand::HandleSortCommand(std::vector<std::string> const& args)
   // expand the variable
   std::vector<std::string> varArgsExpanded;
   if (!this->GetList(varArgsExpanded, listName)) {
-    this->SetError("sub-command SORT requires list to be present.");
-    return false;
+    return true;
   }
 
   if ((sortCompare == cmStringSorter::Compare::STRING) &&
@@ -1304,8 +1299,7 @@ bool 
cmListCommand::HandleFilterCommand(std::vector<std::string> const& args)
   // expand the variable
   std::vector<std::string> varArgsExpanded;
   if (!this->GetList(varArgsExpanded, listName)) {
-    this->SetError("sub-command FILTER requires list to be present.");
-    return false;
+    return true;
   }
 
   const std::string& mode = args[3];
diff --git a/Tests/RunCMake/list/FILTER-NotList-result.txt 
b/Tests/RunCMake/list/FILTER-NotList-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/list/FILTER-NotList-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/list/FILTER-NotList-stderr.txt 
b/Tests/RunCMake/list/FILTER-NotList-stderr.txt
deleted file mode 100644
index 159c28d..0000000
--- a/Tests/RunCMake/list/FILTER-NotList-stderr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-^CMake Error at FILTER-NotList.cmake:2 \(list\):
-  list sub-command FILTER requires list to be present.
-Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/list/FILTER-NotList.cmake 
b/Tests/RunCMake/list/FILTER-NotList.cmake
index 1e15635..bf09ec7 100644
--- a/Tests/RunCMake/list/FILTER-NotList.cmake
+++ b/Tests/RunCMake/list/FILTER-NotList.cmake
@@ -1,2 +1,6 @@
 unset(nosuchlist)
 list(FILTER nosuchlist EXCLUDE REGEX "^FILTER_THIS_.+")
+if (DEFINED nosuchlist)
+  message(FATAL_ERROR
+    "list(FILTER) created our list")
+endif ()
diff --git a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-result.txt 
b/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-stderr.txt 
b/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-stderr.txt
deleted file mode 100644
index 96f3446..0000000
--- a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-stderr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-^CMake Error at REMOVE_DUPLICATES-NotList.cmake:2 \(list\):
-  list sub-command REMOVE_DUPLICATES requires list to be present.
-Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList.cmake 
b/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList.cmake
index 218f227..b9f3999 100644
--- a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList.cmake
+++ b/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList.cmake
@@ -1,2 +1,6 @@
 unset(nosuchlist)
 list(REMOVE_DUPLICATES nosuchlist)
+if (DEFINED nosuchlist)
+  message(FATAL_ERROR
+    "list(REMOVE_DUPLICATES) created our list")
+endif ()
diff --git a/Tests/RunCMake/list/REMOVE_ITEM-NotList-result.txt 
b/Tests/RunCMake/list/REMOVE_ITEM-NotList-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/list/REMOVE_ITEM-NotList-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/list/REMOVE_ITEM-NotList-stderr.txt 
b/Tests/RunCMake/list/REMOVE_ITEM-NotList-stderr.txt
deleted file mode 100644
index c32a4c0..0000000
--- a/Tests/RunCMake/list/REMOVE_ITEM-NotList-stderr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-^CMake Error at REMOVE_ITEM-NotList.cmake:2 \(list\):
-  list sub-command REMOVE_ITEM requires list to be present.
-Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/list/REMOVE_ITEM-NotList.cmake 
b/Tests/RunCMake/list/REMOVE_ITEM-NotList.cmake
index 079e7fb..0c66837 100644
--- a/Tests/RunCMake/list/REMOVE_ITEM-NotList.cmake
+++ b/Tests/RunCMake/list/REMOVE_ITEM-NotList.cmake
@@ -1,2 +1,6 @@
 unset(nosuchlist)
 list(REMOVE_ITEM nosuchlist alpha)
+if (DEFINED nosuchlist)
+  message(FATAL_ERROR
+    "list(REMOVE_ITEM) created our list")
+endif ()
diff --git a/Tests/RunCMake/list/REVERSE-NotList-result.txt 
b/Tests/RunCMake/list/REVERSE-NotList-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/list/REVERSE-NotList-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/list/REVERSE-NotList-stderr.txt 
b/Tests/RunCMake/list/REVERSE-NotList-stderr.txt
deleted file mode 100644
index e9dcc06..0000000
--- a/Tests/RunCMake/list/REVERSE-NotList-stderr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-^CMake Error at REVERSE-NotList.cmake:2 \(list\):
-  list sub-command REVERSE requires list to be present.
-Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/list/REVERSE-NotList.cmake 
b/Tests/RunCMake/list/REVERSE-NotList.cmake
index 977e2cc..7138329 100644
--- a/Tests/RunCMake/list/REVERSE-NotList.cmake
+++ b/Tests/RunCMake/list/REVERSE-NotList.cmake
@@ -1,2 +1,6 @@
 unset(nosuchlist)
 list(REVERSE nosuchlist)
+if (DEFINED nosuchlist)
+  message(FATAL_ERROR
+    "list(REVERSE) created our list")
+endif ()
diff --git a/Tests/RunCMake/list/SORT-NotList-result.txt 
b/Tests/RunCMake/list/SORT-NotList-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/list/SORT-NotList-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/list/SORT-NotList-stderr.txt 
b/Tests/RunCMake/list/SORT-NotList-stderr.txt
deleted file mode 100644
index 396c5b5..0000000
--- a/Tests/RunCMake/list/SORT-NotList-stderr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-^CMake Error at SORT-NotList.cmake:2 \(list\):
-  list sub-command SORT requires list to be present.
-Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/list/SORT-NotList.cmake 
b/Tests/RunCMake/list/SORT-NotList.cmake
index 8f48e10..6314f14 100644
--- a/Tests/RunCMake/list/SORT-NotList.cmake
+++ b/Tests/RunCMake/list/SORT-NotList.cmake
@@ -1,2 +1,6 @@
 unset(nosuchlist)
 list(SORT nosuchlist)
+if (DEFINED nosuchlist)
+  message(FATAL_ERROR
+    "list(SORT) created our list")
+endif ()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b8bb6ba653df9d53d93824bb7185bf022e9bf2ef
commit b8bb6ba653df9d53d93824bb7185bf022e9bf2ef
Author:     Vitaly Stakhovsky <vvs31...@gitlab.org>
AuthorDate: Sun Oct 14 19:00:34 2018 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Tue Oct 16 11:12:19 2018 -0400

    cmGeneratorTarget::GetExportMacro: return const std::string*

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 80fb621..ea283c6 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -1730,7 +1730,7 @@ bool cmGeneratorTarget::HaveWellDefinedOutputFiles() const
     this->GetType() == cmStateEnums::EXECUTABLE;
 }
 
-const char* cmGeneratorTarget::GetExportMacro() const
+const std::string* cmGeneratorTarget::GetExportMacro() const
 {
   // Define the symbol for targets that export symbols.
   if (this->GetType() == cmStateEnums::SHARED_LIBRARY ||
@@ -1743,7 +1743,7 @@ const char* cmGeneratorTarget::GetExportMacro() const
       in += "_EXPORTS";
       this->ExportMacro = cmSystemTools::MakeCidentifier(in);
     }
-    return this->ExportMacro.c_str();
+    return &this->ExportMacro;
   }
   return nullptr;
 }
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index b1daa53..98669c3 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -283,7 +283,7 @@ public:
 
   /** Get the macro to define when building sources in this target.
       If no macro should be defined null is returned.  */
-  const char* GetExportMacro() const;
+  const std::string* GetExportMacro() const;
 
   /** Get the soname of the target.  Allowed only for a shared library.  */
   std::string GetSOName(const std::string& config) const;
diff --git a/Source/cmGlobalXCodeGenerator.cxx 
b/Source/cmGlobalXCodeGenerator.cxx
index e353a37..596bc6b 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1814,9 +1814,9 @@ void 
cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
   BuildObjectListOrString ppDefs(this, true);
   this->AppendDefines(
     ppDefs, "CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"");
-  if (const char* exportMacro = gtgt->GetExportMacro()) {
+  if (const std::string* exportMacro = gtgt->GetExportMacro()) {
     // Add the export symbol definition for shared library objects.
-    this->AppendDefines(ppDefs, exportMacro);
+    this->AppendDefines(ppDefs, exportMacro->c_str());
   }
   std::vector<std::string> targetDefines;
   if (!langForPreprocessor.empty()) {
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 229f884..941d787 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1253,8 +1253,8 @@ void cmLocalGenerator::GetTargetDefines(cmGeneratorTarget 
const* target,
                                         std::set<std::string>& defines) const
 {
   // Add the export symbol definition for shared library objects.
-  if (const char* exportMacro = target->GetExportMacro()) {
-    this->AppendDefines(defines, exportMacro);
+  if (const std::string* exportMacro = target->GetExportMacro()) {
+    this->AppendDefines(defines, *exportMacro);
   }
 
   // Add preprocessor definitions for this target and configuration.
diff --git a/Source/cmLocalVisualStudio7Generator.cxx 
b/Source/cmLocalVisualStudio7Generator.cxx
index 8428672..1da077e 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -735,8 +735,8 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(
   targetOptions.AddDefine(configDefine);
 
   // Add the export symbol definition for shared library objects.
-  if (const char* exportMacro = target->GetExportMacro()) {
-    targetOptions.AddDefine(exportMacro);
+  if (const std::string* exportMacro = target->GetExportMacro()) {
+    targetOptions.AddDefine(*exportMacro);
   }
 
   // The intermediate directory name consists of a directory for the
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx 
b/Source/cmVisualStudio10TargetGenerator.cxx
index 2d39cbb..44ec899 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2580,8 +2580,9 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
   configDefine += configName;
   configDefine += "\"";
   clOptions.AddDefine(configDefine);
-  if (const char* exportMacro = this->GeneratorTarget->GetExportMacro()) {
-    clOptions.AddDefine(exportMacro);
+  if (const std::string* exportMacro =
+        this->GeneratorTarget->GetExportMacro()) {
+    clOptions.AddDefine(*exportMacro);
   }
 
   if (this->MSTools) {
@@ -2877,8 +2878,9 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions(
   configDefine += configName;
   configDefine += "\"";
   cudaOptions.AddDefine(configDefine);
-  if (const char* exportMacro = this->GeneratorTarget->GetExportMacro()) {
-    cudaOptions.AddDefine(exportMacro);
+  if (const std::string* exportMacro =
+        this->GeneratorTarget->GetExportMacro()) {
+    cudaOptions.AddDefine(*exportMacro);
   }
 
   // Get includes for this target

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf572ac952d7ddf2b7208efc56f104844aea72e2
commit bf572ac952d7ddf2b7208efc56f104844aea72e2
Author:     Ben Boeckel <ben.boec...@kitware.com>
AuthorDate: Thu Oct 11 17:22:45 2018 -0400
Commit:     Ben Boeckel <ben.boec...@kitware.com>
CommitDate: Thu Oct 11 17:33:45 2018 -0400

    cmListCommand: check list(FILTER) operation before the list
    
    A future commit will make the not-a-list case a success, but invalid
    operations should still be diagnosed in that case.

diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx
index d7de2fa..b9c7ada 100644
--- a/Source/cmListCommand.cxx
+++ b/Source/cmListCommand.cxx
@@ -1289,14 +1289,6 @@ bool 
cmListCommand::HandleFilterCommand(std::vector<std::string> const& args)
     return false;
   }
 
-  const std::string& listName = args[1];
-  // expand the variable
-  std::vector<std::string> varArgsExpanded;
-  if (!this->GetList(varArgsExpanded, listName)) {
-    this->SetError("sub-command FILTER requires list to be present.");
-    return false;
-  }
-
   const std::string& op = args[2];
   bool includeMatches;
   if (op == "INCLUDE") {
@@ -1308,6 +1300,14 @@ bool 
cmListCommand::HandleFilterCommand(std::vector<std::string> const& args)
     return false;
   }
 
+  const std::string& listName = args[1];
+  // expand the variable
+  std::vector<std::string> varArgsExpanded;
+  if (!this->GetList(varArgsExpanded, listName)) {
+    this->SetError("sub-command FILTER requires list to be present.");
+    return false;
+  }
+
   const std::string& mode = args[3];
   if (mode == "REGEX") {
     if (args.size() != 5) {

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

Summary of changes:
 Help/release/dev/better-empty-list-behavior.rst    |  9 +++++
 Source/cmGeneratorTarget.cxx                       |  4 +-
 Source/cmGeneratorTarget.h                         |  2 +-
 Source/cmGlobalXCodeGenerator.cxx                  |  4 +-
 Source/cmListCommand.cxx                           | 46 +++++++++++-----------
 Source/cmLocalGenerator.cxx                        |  4 +-
 Source/cmLocalVisualStudio7Generator.cxx           |  4 +-
 Source/cmVisualStudio10TargetGenerator.cxx         | 10 +++--
 Tests/RunCMake/list/EmptyRemoveAt0-stderr.txt      |  2 +-
 Tests/RunCMake/list/FILTER-NotList-result.txt      |  1 -
 Tests/RunCMake/list/FILTER-NotList-stderr.txt      |  4 --
 Tests/RunCMake/list/FILTER-NotList.cmake           |  4 ++
 .../REMOVE_AT-EmptyList-result.txt}                |  0
 Tests/RunCMake/list/REMOVE_AT-EmptyList-stderr.txt |  4 ++
 Tests/RunCMake/list/REMOVE_AT-EmptyList.cmake      |  6 +++
 Tests/RunCMake/list/REMOVE_AT-NotList-stderr.txt   |  2 +-
 Tests/RunCMake/list/REMOVE_AT-NotList.cmake        |  4 ++
 .../list/REMOVE_DUPLICATES-NotList-result.txt      |  1 -
 .../list/REMOVE_DUPLICATES-NotList-stderr.txt      |  4 --
 .../RunCMake/list/REMOVE_DUPLICATES-NotList.cmake  |  4 ++
 Tests/RunCMake/list/REMOVE_ITEM-NotList-result.txt |  1 -
 Tests/RunCMake/list/REMOVE_ITEM-NotList-stderr.txt |  4 --
 Tests/RunCMake/list/REMOVE_ITEM-NotList.cmake      |  4 ++
 Tests/RunCMake/list/REVERSE-NotList-result.txt     |  1 -
 Tests/RunCMake/list/REVERSE-NotList-stderr.txt     |  4 --
 Tests/RunCMake/list/REVERSE-NotList.cmake          |  4 ++
 Tests/RunCMake/list/RunCMakeTest.cmake             |  2 +
 Tests/RunCMake/list/SORT-NotList-result.txt        |  1 -
 Tests/RunCMake/list/SORT-NotList-stderr.txt        |  4 --
 Tests/RunCMake/list/SORT-NotList.cmake             |  4 ++
 30 files changed, 84 insertions(+), 64 deletions(-)
 create mode 100644 Help/release/dev/better-empty-list-behavior.rst
 delete mode 100644 Tests/RunCMake/list/FILTER-NotList-result.txt
 delete mode 100644 Tests/RunCMake/list/FILTER-NotList-stderr.txt
 copy Tests/RunCMake/{while/MissingArgument-result.txt => 
list/REMOVE_AT-EmptyList-result.txt} (100%)
 create mode 100644 Tests/RunCMake/list/REMOVE_AT-EmptyList-stderr.txt
 create mode 100644 Tests/RunCMake/list/REMOVE_AT-EmptyList.cmake
 delete mode 100644 Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-result.txt
 delete mode 100644 Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-stderr.txt
 delete mode 100644 Tests/RunCMake/list/REMOVE_ITEM-NotList-result.txt
 delete mode 100644 Tests/RunCMake/list/REMOVE_ITEM-NotList-stderr.txt
 delete mode 100644 Tests/RunCMake/list/REVERSE-NotList-result.txt
 delete mode 100644 Tests/RunCMake/list/REVERSE-NotList-stderr.txt
 delete mode 100644 Tests/RunCMake/list/SORT-NotList-result.txt
 delete mode 100644 Tests/RunCMake/list/SORT-NotList-stderr.txt


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
https://cmake.org/mailman/listinfo/cmake-commits

Reply via email to