[CMake] What exactly does SITE_NAME() return?

David Cole david.cole at kitware.com
Mon Feb 1 09:08:35 EST 2010


Looks to me, from CMake/Source/cmSiteNameCommand.cxx that we simply call
"hostname" with no arguments and then use a regular expression to parse out
the name of the host from that output.

Are you encountering a problem with it that leads to unexpected results or
would you just like better documentation?


On Mon, Feb 1, 2010 at 4:15 AM, Marcel Loose <loose at astron.nl> wrote:

> Hi all,
>
> What exactly does SITE_NAME() return? Is it the short hostname, or the
> fully qualified domain name?
>
> The docs are not clear about this:
>
>  site_name
>       Set the given variable to the name of the computer.
>
> And the ChangeLog.txt is confusing me:
>
> 2001-10-18 18:01  barre
>
>        * Source/cmSiteNameCommand.cxx: SITE_NAME should return the most
>          qualified name of the host. If nslookup works, now the domain
> is
>          appended to the hostname (whereas it *replaced* the host name
>          before)
>
> Tests that I have run on a number of different systems all seem to be
> doing the equivalent of 'hostname -s', i.e. return the short hostname,
> but the ChangeLog.txt appears to suggest that it should do the
> equivalent of 'hostname -f', i.e. return the fully qualified domain
> name. Which is correct?
>
> Best regards,
> Marcel Loose.
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100201/69771c74/attachment.htm>


More information about the CMake mailing list