[CMake] new Wiki article

Filipe Sousa filipe at ipb.pt
Sun Jan 29 17:11:02 EST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Neundorf wrote:
>  
> ...  
>  
> This feature has been removed again (it was never in a release version 
> AFAIK). 

Are you sure?

void cmMakefile::ConfigureString(const std::string& input,
                                 std::string& output, bool atOnly,
                                 bool escapeQuotes)
{
   //...
    // Replace #cmakedefine instances.
    if(m_cmDefineRegex.find(line))
      {
      const char* def =
this->GetDefinition(m_cmDefineRegex.match(1).c_str());
      if(!cmSystemTools::IsOff(def))
        {
        cmSystemTools::ReplaceString(line, "#cmakedefine", "#define");
        output += line;
        }
      else
        {
        cmSystemTools::ReplaceString(line, "#cmakedefine", "#undef");
        output += "/* ";
        output += line;
        output += " */";
        }
      }
    else if(m_cmDefine01Regex.find(line))
      {
      const char* def =
this->GetDefinition(m_cmDefine01Regex.match(1).c_str());
      cmSystemTools::ReplaceString(line, "#cmakedefine01", "#define");
      output += line;
      if(!cmSystemTools::IsOff(def))
        {
        output += " 1";
        }
      else
        {
        output += " 0";
        }
      }
    else
      {
      output += line;
      }
//...
}


>  
> Well, I didn't want to name it config.h.in, because this would have 
> clashed with the already existing config.h.in in KDE svn. So I chose the 
> suffix ".cmake". Do you have a better suggestion ? 

No :(

> Bye 
> Alex 
>  
> 


- --
Filipe Sousa
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFD3T12bQdNYqwwwCwRAh00AKCrnjgAwI41zhc9bDJmLFTJyKG/5ACfVP1E
esZqjVyqifD8jNf6GCuTCDg=
=64wT
-----END PGP SIGNATURE-----


More information about the CMake mailing list