[CMake] $ENV{HOSTNAME}
James Bigler
bigler at cs.utah.edu
Wed Nov 21 09:46:29 EST 2007
>>> shell-independent way. Maybe there's a way to execute the `hostname`
>>> command?
> Ok, I see now. HOSTNAME is a shell variable, but not an environment
> variable. Check this thread here:
>
> http://lists.freebsd.org/pipermail/freebsd-questions/2004-July/052424.html
>
> So, is there another way I could get the hostname in CMake?
I would do what was suggested and call 'hostname' with EXECUTE_PROCESS()
(see cmake documentation).
James
More information about the CMake
mailing list