[CMake] Deleting a variable

Brandon J. Van Every bvanevery at gmail.com
Tue Dec 5 16:37:01 EST 2006


James Bigler 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.  

Have you tried

FIND_PROGRAM(myvar ...)
IF(myfeature)
  SET(myvar CACHE INTERNAL "Don't show this")
ENDIF(myfeature)

Haven't tried it myself, but maybe it can change the status of a cache 
variable from visible to internal.



Cheers,
Brandon Van Every



More information about the CMake mailing list