[Cmake] Variable Behavior
Brad King
brad.king at kitware.com
Thu, 18 Mar 2004 17:14:37 -0500
Richard Wackerbarth wrote:
> In playing around with the Dart rules in order to get it to behave in a
> way that I think that I want, I noticed something that wasn't consistent
> from one run to the next.
>
> The first run starts with an empty directory
>
> The hostname is output by the lines
>
> # set the site name
> SITE_NAME(SITE)
> # set the build name
>
> in the Dart.cmake module.
>
> However, once the cache is present, the output does not occur.
> I added some MESSAGES to check. The SITE_NAME command is executed in
> both cases.
>
> My question is Should this happen? I seems to me that the command either
> should always output the value, or never do so.
>
> [Legacy] ~/TestBuildTree/dt> cmake ../../SourceTrees/dt
> -- Check for working C compiler: gcc
> -- Check for working C compiler: gcc -- works
> -- Check for working CXX compiler: c++
> -- Check for working CXX compiler: c++ -- works
> -- Check if the system is big endian
> -- Check if the system is big endian - little endian
> Legacy.Dataplex.Net
> -- Using Buildname: FreeBSD-5.2-c++
> -- Configuring done
> -- Generating done
> [Legacy] ~/TestBuildTree/dt> cmake ../../SourceTrees/dt
> -- Check for working C compiler: gcc -- works
> -- Check for working CXX compiler: c++ -- works
> -- Using Buildname: FreeBSD-5.2-c++
> -- Configuring done
> -- Generating done
>
> [Legacy] ~/TestBuildTree/dt>
I agree this is not the desired behavior. Please submit this as a bug:
http://www.cmake.org/Bug
The output should probably look like this the first time:
-- Checking system host name
-- Checking system host name - Legacy.Dataplex.Net
and then not appear again. This would make it consistent with the other
try-compile rules.
-Brad