[CMake] environment flag for cmake
Shaul Kedem
shaul.kedem at gmail.com
Wed Jul 20 10:33:57 EDT 2005
Hi,
Thanks for the answer :)
What I want is the option to create only a subset of a project which
uses more than one cmake lists. The idea we came up with over here was
to comment out the part which include other cmake lists when we want a
subset. if there is another way I'd very much like to hear about it.
Thanks :)
On 7/20/05, Brad King <brad.king at kitware.com> wrote:
> Shaul Kedem wrote:
> > Can someone please adivse; how do I add an environment flag for CMake?
> >
> > I want this flag to be recognized from the CMakeList.txt file ("IF (FLAG)…").
>
> Switching a build setting off an environment variable is very dangerous.
> The generated build system contains rules to automatically re-run
> cmake during a build if the build system is out of date. If the
> environment during the build is different than when CMake was first run
> you will get a different configuration. You probably want to use the
> OPTION command to create a build switch in the cache.
>
> If you must use an environment variable you can get values with
> "$ENV{VARNAME}".
>
> -Brad
>
More information about the CMake
mailing list