Browse Source

bug meaning that set(a b) just set a to "" and not to b

Geoffrey Cross 24 năm trước cách đây
mục cha
commit
bdfdfb73a2
1 tập tin đã thay đổi với 7 bổ sung1 xóa
  1. 7 1
      Source/cmSetCommand.cxx

+ 7 - 1
Source/cmSetCommand.cxx

@@ -65,7 +65,13 @@ bool cmSetCommand::Invoke(std::vector<std::string>& args)
   cmCacheManager::CacheEntryType type = cmCacheManager::STRING; // required if cache
   const char* docstring = 0; // required if cache
   std::string::size_type cacheStart = 0;
-  if(args.size() == 4)
+
+  if(args.size() == 2)
+    {
+      // SET (VAR value )
+      value= args[1];
+    }
+  else if(args.size() == 4)
     {
     // SET (VAR CACHE TYPE "doc String")
     cache = true;