[CMake] Internal vs system version of a library

Antonio Valentino antonio.valentino at tiscali.it
Thu Aug 6 06:43:05 EDT 2009


Il giorno Thu, 06 Aug 2009 12:04:06 +0200
Hendrik Sattler <post at hendrik-sattler.de> ha scritto:

> Zitat von Antonio Valentino <antonio.valentino at tiscali.it>:
> > I would like allow the user to choose whenever to use the system
> > version of a library or the developer provided one.
> >
> > In the code snippet below the library is FFTW and its source
> > archive is bundled together with the project source in the
> > COTS/FFTW sub-folder.
> >
> > The problem is how to reset the cache variables once the user
> > switches between USE_INTERNAL_FFTW and NOT USE_INTERNAL_FFTW.
> 
> unset()

The unset command seems to be undocumented in cmake 2.6.2 (the one
packaged in ubuntu jaunty).
Is it new?

> > In the following code snippet there is my tentative solution.
> > It seems to work but it doesn't looks good to me.
> 
> The guard is good to detect a change in the user variable (which
> could be given using option().

Yes USE_INTERNAL_FFTW is defined as an option in another part of the
code.


thanks

-- 
Antonio Valentino


More information about the CMake mailing list