[Cmake-commits] [cmake-commits] hoffman committed cmGetPropertyCommand.cxx 1.7 1.7.2.1 cmGetPropertyCommand.h 1.6 1.6.2.1 cmGlobalVisualStudio8Generator.cxx 1.36 1.36.2.1 cmSetPropertyCommand.cxx 1.6 1.6.2.1 cmSetPropertyCommand.h 1.3 1.3.2.1 cmSourceFile.cxx 1.47 1.47.2.1 cmTarget.cxx 1.207.2.2 1.207.2.3 cmTest.cxx 1.9 1.9.2.1

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Apr 2 09:16:14 EDT 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv9816/Source

Modified Files:
      Tag: CMake-2-6
	cmGetPropertyCommand.cxx cmGetPropertyCommand.h 
	cmGlobalVisualStudio8Generator.cxx cmSetPropertyCommand.cxx 
	cmSetPropertyCommand.h cmSourceFile.cxx cmTarget.cxx 
	cmTest.cxx 
Log Message:
ENH: merge in main tree for RC 6


Index: cmTest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTest.cxx,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -C 2 -d -r1.9 -r1.9.2.1
*** cmTest.cxx	17 Jan 2008 23:13:55 -0000	1.9
--- cmTest.cxx	2 Apr 2008 13:16:10 -0000	1.9.2.1
***************
*** 77,84 ****
      return;
      }
-   if (!value)
-     {
-     value = "NOTFOUND";
-     }
  
    this->Properties.SetProperty(prop, value, cmProperty::TEST);
--- 77,80 ----

Index: cmGlobalVisualStudio8Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio8Generator.cxx,v
retrieving revision 1.36
retrieving revision 1.36.2.1
diff -C 2 -d -r1.36 -r1.36.2.1
*** cmGlobalVisualStudio8Generator.cxx	11 Mar 2008 21:25:48 -0000	1.36
--- cmGlobalVisualStudio8Generator.cxx	2 Apr 2008 13:16:04 -0000	1.36.2.1
***************
*** 163,167 ****
        stampListFile += stampList;
        std::string stampFile;
!       cmGeneratedFileStream fout(stampList.c_str());
        for(std::vector<cmLocalGenerator*>::const_iterator
              gi = generators.begin(); gi != generators.end(); ++gi)
--- 163,167 ----
        stampListFile += stampList;
        std::string stampFile;
!       cmGeneratedFileStream fout(stampListFile.c_str());
        for(std::vector<cmLocalGenerator*>::const_iterator
              gi = generators.begin(); gi != generators.end(); ++gi)

Index: cmSetPropertyCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSetPropertyCommand.cxx,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C 2 -d -r1.6 -r1.6.2.1
*** cmSetPropertyCommand.cxx	15 Feb 2008 16:22:23 -0000	1.6
--- cmSetPropertyCommand.cxx	2 Apr 2008 13:16:05 -0000	1.6.2.1
***************
*** 24,27 ****
--- 24,28 ----
  {
    this->AppendMode = false;
+   this->Remove = true;
  }
  
***************
*** 97,100 ****
--- 98,102 ----
        sep = ";";
        this->PropertyValue += *arg;
+       this->Remove = false;
        }
      else
***************
*** 142,152 ****
    cmake* cm = this->Makefile->GetCMakeInstance();
    const char* name = this->PropertyName.c_str();
    if(this->AppendMode)
      {
!     cm->AppendProperty(name, this->PropertyValue.c_str());
      }
    else
      {
!     cm->SetProperty(name, this->PropertyValue.c_str());
      }
  
--- 144,159 ----
    cmake* cm = this->Makefile->GetCMakeInstance();
    const char* name = this->PropertyName.c_str();
+   const char *value = this->PropertyValue.c_str();
+   if (this->Remove)
+     {
+     value = 0;
+     }
    if(this->AppendMode)
      {
!     cm->AppendProperty(name, value);
      }
    else
      {
!     cm->SetProperty(name, value);
      }
  
***************
*** 203,213 ****
    // Set or append the property.
    const char* name = this->PropertyName.c_str();
    if(this->AppendMode)
      {
!     mf->AppendProperty(name, this->PropertyValue.c_str());
      }
    else
      {
!     mf->SetProperty(name, this->PropertyValue.c_str());
      }
  
--- 210,225 ----
    // Set or append the property.
    const char* name = this->PropertyName.c_str();
+   const char *value = this->PropertyValue.c_str();
+   if (this->Remove)
+     {
+     value = 0;
+     }
    if(this->AppendMode)
      {
!     mf->AppendProperty(name, value);
      }
    else
      {
!     mf->SetProperty(name, value);
      }
  
***************
*** 246,256 ****
    // Set or append the property.
    const char* name = this->PropertyName.c_str();
    if(this->AppendMode)
      {
!     target->AppendProperty(name, this->PropertyValue.c_str());
      }
    else
      {
!     target->SetProperty(name, this->PropertyValue.c_str());
      }
  
--- 258,273 ----
    // Set or append the property.
    const char* name = this->PropertyName.c_str();
+   const char *value = this->PropertyValue.c_str();
+   if (this->Remove)
+     {
+     value = 0;
+     }
    if(this->AppendMode)
      {
!     target->AppendProperty(name, value);
      }
    else
      {
!     target->SetProperty(name, value);
      }
  
***************
*** 288,298 ****
    // Set or append the property.
    const char* name = this->PropertyName.c_str();
    if(this->AppendMode)
      {
!     sf->AppendProperty(name, this->PropertyValue.c_str());
      }
    else
      {
!     sf->SetProperty(name, this->PropertyValue.c_str());
      }
    return true;
--- 305,321 ----
    // Set or append the property.
    const char* name = this->PropertyName.c_str();
+   const char *value = this->PropertyValue.c_str();
+   if (this->Remove)
+     {
+     value = 0;
+     }
+ 
    if(this->AppendMode)
      {
!     sf->AppendProperty(name, value);
      }
    else
      {
!     sf->SetProperty(name, value);
      }
    return true;
***************
*** 344,354 ****
    // Set or append the property.
    const char* name = this->PropertyName.c_str();
    if(this->AppendMode)
      {
!     test->AppendProperty(name, this->PropertyValue.c_str());
      }
    else
      {
!     test->SetProperty(name, this->PropertyValue.c_str());
      }
  
--- 367,382 ----
    // Set or append the property.
    const char* name = this->PropertyName.c_str();
+   const char *value = this->PropertyValue.c_str();
+   if (this->Remove)
+     {
+     value = 0;
+     }
    if(this->AppendMode)
      {
!     test->AppendProperty(name, value);
      }
    else
      {
!     test->SetProperty(name, value);
      }
  

Index: cmSourceFile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFile.cxx,v
retrieving revision 1.47
retrieving revision 1.47.2.1
diff -C 2 -d -r1.47 -r1.47.2.1
*** cmSourceFile.cxx	18 Feb 2008 21:38:34 -0000	1.47
--- cmSourceFile.cxx	2 Apr 2008 13:16:07 -0000	1.47.2.1
***************
*** 263,270 ****
      return;
      }
-   if (!value)
-     {
-     value = "NOTFOUND";
-     }
  
    this->Properties.SetProperty(prop, value, cmProperty::SOURCE_FILE);
--- 263,266 ----

Index: cmGetPropertyCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGetPropertyCommand.cxx,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -C 2 -d -r1.7 -r1.7.2.1
*** cmGetPropertyCommand.cxx	30 Jan 2008 16:21:54 -0000	1.7
--- cmGetPropertyCommand.cxx	2 Apr 2008 13:16:03 -0000	1.7.2.1
***************
*** 95,98 ****
--- 95,103 ----
        this->InfoType = OutFullDoc;
        }
+     else if(args[i] == "SET")
+       {
+       doing = DoingNone;
+       this->InfoType = OutSet;
+       }
      else if(args[i] == "DEFINED")
        {
***************
*** 159,162 ****
--- 164,180 ----
      this->Makefile->AddDefinition(this->Variable.c_str(), output.c_str());
      }
+   else if(this->InfoType == OutDefined)
+     {
+     // Lookup if the property is defined
+     if(this->Makefile->GetCMakeInstance()->
+        GetPropertyDefinition(this->PropertyName.c_str(), scope))
+       {
+       this->Makefile->AddDefinition(this->Variable.c_str(), "1");
+       }
+     else
+       {
+       this->Makefile->AddDefinition(this->Variable.c_str(), "0");
+       }
+     }
    else
      {
***************
*** 182,186 ****
  bool cmGetPropertyCommand::StoreResult(const char* value)
  {
!   if(this->InfoType == OutDefined)
      {
      this->Makefile->AddDefinition(this->Variable.c_str(), value? "1":"0");
--- 200,204 ----
  bool cmGetPropertyCommand::StoreResult(const char* value)
  {
!   if(this->InfoType == OutSet)
      {
      this->Makefile->AddDefinition(this->Variable.c_str(), value? "1":"0");

Index: cmGetPropertyCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGetPropertyCommand.h,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C 2 -d -r1.6 -r1.6.2.1
*** cmGetPropertyCommand.h	23 Jan 2008 15:27:59 -0000	1.6
--- cmGetPropertyCommand.h	2 Apr 2008 13:16:03 -0000	1.6.2.1
***************
*** 69,73 ****
          "                VARIABLE>\n"
          "               PROPERTY <name>\n"
!         "               [DEFINED | BRIEF_DOCS | FULL_DOCS])\n"
          "Get one property from one object in a scope.  "
          "The first argument specifies the variable in which to store the "
--- 69,73 ----
          "                VARIABLE>\n"
          "               PROPERTY <name>\n"
!         "               [SET | DEFINED | BRIEF_DOCS | FULL_DOCS])\n"
          "Get one property from one object in a scope.  "
          "The first argument specifies the variable in which to store the "
***************
*** 86,91 ****
          "of the property to get.  "
          "If the property is not set an empty value is returned.  "
          "If the DEFINED option is given the variable is set to a boolean "
!         "value indicating whether the property has been set.  "
          "If BRIEF_DOCS or FULL_DOCS is given then the variable is set to "
          "a string containing documentation for the requested property.  "
--- 86,94 ----
          "of the property to get.  "
          "If the property is not set an empty value is returned.  "
+         "If the SET option is given the variable is set to a boolean "
+         "value indicating whether the property has been set."
          "If the DEFINED option is given the variable is set to a boolean "
!         "value indicating whether the property has been defined "
!         "such as with define_property. "
          "If BRIEF_DOCS or FULL_DOCS is given then the variable is set to "
          "a string containing documentation for the requested property.  "
***************
*** 96,100 ****
    cmTypeMacro(cmGetPropertyCommand, cmCommand);
  private:
!   enum OutType { OutValue, OutDefined, OutBriefDoc, OutFullDoc };
    std::string Variable;
    std::string Name;
--- 99,103 ----
    cmTypeMacro(cmGetPropertyCommand, cmCommand);
  private:
!   enum OutType { OutValue, OutDefined, OutBriefDoc, OutFullDoc, OutSet };
    std::string Variable;
    std::string Name;

Index: cmSetPropertyCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSetPropertyCommand.h,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -C 2 -d -r1.3 -r1.3.2.1
*** cmSetPropertyCommand.h	23 Jan 2008 15:27:59 -0000	1.3
--- cmSetPropertyCommand.h	2 Apr 2008 13:16:06 -0000	1.3.2.1
***************
*** 93,96 ****
--- 93,97 ----
    std::string PropertyName;
    std::string PropertyValue;
+   bool Remove;
    bool AppendMode;
  

Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.207.2.2
retrieving revision 1.207.2.3
diff -C 2 -d -r1.207.2.2 -r1.207.2.3
*** cmTarget.cxx	30 Mar 2008 13:09:30 -0000	1.207.2.2
--- cmTarget.cxx	2 Apr 2008 13:16:08 -0000	1.207.2.3
***************
*** 1592,1599 ****
      return;
      }
-   if (!value)
-     {
-     value = "NOTFOUND";
-     }
  
    this->Properties.SetProperty(prop, value, cmProperty::TARGET);
--- 1592,1595 ----



More information about the Cmake-commits mailing list