[CMake] Forcing CMake to never search install path
Alexander Neundorf
a.neundorf-work at gmx.net
Mon May 16 16:00:10 EDT 2011
On Monday 16 May 2011, John Drescher wrote:
> > I've been struggling to find a way to prevent CMake from using
> > CMAKE_INSTALL_PREFIX in any of its FIND_* routines. Generally
> > speaking, stripping it out of CMAKE_SYSTEM_PREFIX_PATH seems to work,
> > but we're still getting situations on Windows where it is finding old
> > libraries from previous program installs. I've tried ensuring all of
> > the CMAKE_SYSTEM_*_PATH variables are stripped, but that doesn't seem
> > to make a difference.
> >
> > Is there a mechanism I can use to specify to CMake to NEVER search in
> > a given path, excluding it from all FIND_* routine searches? It is
> > very typical in our development process to have older builds installed
> > and be building newer versions at the same time, so we really need a
> > good solid way to make sure previously built libraries aren't picked
> > up by FIND routines.
>
> Not that I have a solution however I too am looking to solve this
> problem.
So you basically want an opposite to HINTS and PATHS, like e.g. EXCLUDE ?
Doesn't sound too bad.
If you know where your stuff will be, you could also use NO_DEFAULT_PATH and
the add all the valid options for your case yourself.
Alex
More information about the CMake
mailing list