Browse Source

cmPropertyMap: Remove scope parameter from API where not used.

Stephen Kelly 10 years ago
parent
commit
7c0aa672fe

+ 2 - 3
Source/cmCPluginAPI.cxx

@@ -662,7 +662,7 @@ void CCONV cmSourceFileSetProperty(void *arg,const char *prop,
   else if(prop)
     {
     if(!value) { value = "NOTFOUND"; }
-    sf->Properties.SetProperty(prop, value, cmProperty::SOURCE_FILE);
+    sf->Properties.SetProperty(prop, value);
     }
 }
 
@@ -801,8 +801,7 @@ void CCONV cmSourceFileSetName2(void *arg, const char* name, const char* dir,
   // Implement the old SetName method code here.
   if(headerFileOnly)
     {
-    sf->Properties.SetProperty("HEADER_FILE_ONLY", "1",
-                               cmProperty::SOURCE_FILE);
+    sf->Properties.SetProperty("HEADER_FILE_ONLY", "1");
     }
   sf->SourceName = name;
   std::string fname = sf->SourceName;

+ 2 - 2
Source/cmCacheManager.cxx

@@ -763,7 +763,7 @@ void cmCacheManager::CacheEntry::SetProperty(const std::string& prop,
     }
   else
     {
-    this->Properties.SetProperty(prop, value, cmProperty::CACHE);
+    this->Properties.SetProperty(prop, value);
     }
 }
 
@@ -789,7 +789,7 @@ void cmCacheManager::CacheEntry::AppendProperty(const std::string& prop,
     }
   else
     {
-    this->Properties.AppendProperty(prop, value, cmProperty::CACHE, asString);
+    this->Properties.AppendProperty(prop, value, asString);
     }
 }
 

+ 2 - 2
Source/cmMakefile.cxx

@@ -4089,7 +4089,7 @@ void cmMakefile::SetProperty(const std::string& prop, const char* value)
       }
     }
 
-  this->Properties.SetProperty(prop,value,cmProperty::DIRECTORY);
+  this->Properties.SetProperty(prop, value);
 }
 
 void cmMakefile::AppendProperty(const std::string& prop,
@@ -4129,7 +4129,7 @@ void cmMakefile::AppendProperty(const std::string& prop,
     return;
     }
 
-  this->Properties.AppendProperty(prop,value,cmProperty::DIRECTORY,asString);
+  this->Properties.AppendProperty(prop, value, asString);
 }
 
 const char *cmMakefile::GetProperty(const std::string& prop) const

+ 2 - 5
Source/cmPropertyMap.cxx

@@ -29,29 +29,26 @@ cmProperty *cmPropertyMap::GetOrCreateProperty(const std::string& name)
   return prop;
 }
 
-void cmPropertyMap::SetProperty(const std::string& name, const char *value,
-                                cmProperty::ScopeType scope)
+void cmPropertyMap::SetProperty(const std::string& name, const char *value)
 {
   if(!value)
     {
     this->erase(name);
     return;
     }
-  (void)scope;
 
   cmProperty *prop = this->GetOrCreateProperty(name);
   prop->Set(value);
 }
 
 void cmPropertyMap::AppendProperty(const std::string& name, const char* value,
-                                   cmProperty::ScopeType scope, bool asString)
+                                   bool asString)
 {
   // Skip if nothing to append.
   if(!value || !*value)
     {
     return;
     }
-  (void)scope;
 
   cmProperty *prop = this->GetOrCreateProperty(name);
   prop->Append(value,asString);

+ 2 - 3
Source/cmPropertyMap.h

@@ -21,11 +21,10 @@ class cmPropertyMap : public std::map<std::string,cmProperty>
 public:
   cmProperty *GetOrCreateProperty(const std::string& name);
 
-  void SetProperty(const std::string& name, const char *value,
-                   cmProperty::ScopeType scope);
+  void SetProperty(const std::string& name, const char *value);
 
   void AppendProperty(const std::string& name, const char* value,
-                      cmProperty::ScopeType scope, bool asString=false);
+                      bool asString=false);
 
   const char *GetPropertyValue(const std::string& name,
                                cmProperty::ScopeType scope,

+ 2 - 3
Source/cmSourceFile.cxx

@@ -299,7 +299,7 @@ bool cmSourceFile::Matches(cmSourceFileLocation const& loc)
 //----------------------------------------------------------------------------
 void cmSourceFile::SetProperty(const std::string& prop, const char* value)
 {
-  this->Properties.SetProperty(prop, value, cmProperty::SOURCE_FILE);
+  this->Properties.SetProperty(prop, value);
 
   if (this->IsUiFile)
     {
@@ -315,8 +315,7 @@ void cmSourceFile::SetProperty(const std::string& prop, const char* value)
 void cmSourceFile::AppendProperty(const std::string& prop, const char* value,
                                   bool asString)
 {
-  this->Properties.AppendProperty(prop, value, cmProperty::SOURCE_FILE,
-                                  asString);
+  this->Properties.AppendProperty(prop, value, asString);
 }
 
 //----------------------------------------------------------------------------

+ 2 - 3
Source/cmState.cxx

@@ -438,14 +438,13 @@ void cmState::RemoveUserDefinedCommands()
 
 void cmState::SetGlobalProperty(const std::string& prop, const char* value)
 {
-  this->GlobalProperties.SetProperty(prop, value, cmProperty::GLOBAL);
+  this->GlobalProperties.SetProperty(prop, value);
 }
 
 void cmState::AppendGlobalProperty(const std::string& prop,
                                    const char* value, bool asString)
 {
-  this->GlobalProperties.AppendProperty(prop, value,
-                                        cmProperty::GLOBAL, asString);
+  this->GlobalProperties.AppendProperty(prop, value, asString);
 }
 
 const char *cmState::GetGlobalProperty(const std::string& prop)

+ 6 - 12
Source/cmTarget.cxx

@@ -1772,7 +1772,7 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
     }
   else
     {
-    this->Properties.SetProperty(prop, value, cmProperty::TARGET);
+    this->Properties.SetProperty(prop, value);
     this->MaybeInvalidatePropertyCache(prop);
     }
 }
@@ -1857,7 +1857,7 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value,
     }
   else
     {
-    this->Properties.AppendProperty(prop, value, cmProperty::TARGET, asString);
+    this->Properties.AppendProperty(prop, value, asString);
     this->MaybeInvalidatePropertyCache(prop);
     }
 }
@@ -2938,8 +2938,7 @@ const char *cmTarget::GetProperty(const std::string& prop,
       // cannot take into account the per-configuration name of the
       // target because the configuration type may not be known at
       // CMake time.
-      this->Properties.SetProperty(propLOCATION, this->GetLocationForBuild(),
-                                   cmProperty::TARGET);
+      this->Properties.SetProperty(propLOCATION, this->GetLocationForBuild());
       }
 
     // Support "LOCATION_<CONFIG>".
@@ -2950,9 +2949,7 @@ const char *cmTarget::GetProperty(const std::string& prop,
         return 0;
         }
       const char* configName = prop.c_str() + 9;
-      this->Properties.SetProperty(prop,
-                                   this->GetLocation(configName),
-                                   cmProperty::TARGET);
+      this->Properties.SetProperty(prop, this->GetLocation(configName));
       }
     // Support "<CONFIG>_LOCATION".
     else if(cmHasLiteralSuffix(prop, "_LOCATION"))
@@ -2964,9 +2961,7 @@ const char *cmTarget::GetProperty(const std::string& prop,
           {
           return 0;
           }
-        this->Properties.SetProperty(prop,
-                                     this->GetLocation(configName),
-                                     cmProperty::TARGET);
+        this->Properties.SetProperty(prop, this->GetLocation(configName));
         }
       }
     }
@@ -3168,8 +3163,7 @@ const char *cmTarget::GetProperty(const std::string& prop,
             }
           }
         }
-      this->Properties.SetProperty("SOURCES", ss.str().c_str(),
-                                   cmProperty::TARGET);
+      this->Properties.SetProperty("SOURCES", ss.str().c_str());
       }
     }
 

+ 2 - 2
Source/cmTest.cxx

@@ -69,12 +69,12 @@ bool cmTest::GetPropertyAsBool(const std::string& prop) const
 //----------------------------------------------------------------------------
 void cmTest::SetProperty(const std::string& prop, const char* value)
 {
-  this->Properties.SetProperty(prop, value, cmProperty::TEST);
+  this->Properties.SetProperty(prop, value);
 }
 
 //----------------------------------------------------------------------------
 void cmTest::AppendProperty(const std::string& prop,
                             const char* value, bool asString)
 {
-  this->Properties.AppendProperty(prop, value, cmProperty::TEST, asString);
+  this->Properties.AppendProperty(prop, value, asString);
 }