Fwd: [CMake] Deleting a variable
Tristan Carel
tristan.carel at gmail.com
Tue Dec 5 16:13:39 EST 2006
...
---------- Forwarded message ----------
From: Tristan Carel <tristan.carel at gmail.com>
Date: Dec 5, 2006 4:12 PM
Subject: Re: [CMake] Deleting a variable
To: James Bigler <bigler at cs.utah.edu>
On 12/5/06, James Bigler <bigler at cs.utah.edu> wrote:
> > Message: 8
> > Date: Tue, 05 Dec 2006 00:48:31 -0800
> > From: "Brandon J. Van Every" <bvanevery at gmail.com>
> > Subject: Re: [CMake] Deleting a variable
> > To: cmake <cmake at cmake.org>
> > Message-ID: <4575325F.6000908 at gmail.com>
> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> >
> > James Bigler wrote:
> > > >
> > > > I want the variable to disappear from the list when running ccmake.
> > > > This didn't seem to do anything.
> >
> > How about SET(myvar CACHE INTERNAL "Don't show this")
> > See the docs for SET.
>
> This "hides" it (which I could live with), but when I enable the feature
> that selectively calls this code, FIND_PROGRAM doesn't run again and
> "myvar" is junk.
> [....]
In the documentation of the FIND_XXX commands, you can read:
"If nothing is found, the result will be <VAR>-NOTFOUND, and the
search will be attempted again the next time FIND_XXX is invoked with
the same variable."
So to force the FIND_XXX:
FIND_PROGRAM(Foo ...)
SET(Foo Foo-NOTFOUND)
A recent history of the same pb:
http://www.cmake.org/pipermail/cmake/2006-November/011804.html
--
Tristan Carel
Music with dinner is an insult both to the cook and the violinist.
More information about the CMake
mailing list