[CMake] Forcing CMake to never search install path

Michael Hertling mhertling at online.de
Thu May 19 07:47:04 EDT 2011


On 05/16/2011 10:08 PM, Clifford Yapp wrote:
> On Mon, May 16, 2011 at 4:00 PM, Alexander Neundorf
> <a.neundorf-work at gmx.net> wrote:
> 
>> So you basically want an opposite to HINTS and PATHS, like e.g. EXCLUDE ?
>> Doesn't sound too bad.
> 
> Yes, that would work - ideally though I'd like to EXCLUDE the path
> from ALL finds by defining it once in the CMakeLists.txt file, instead
> of per-find-command.
> 
>> 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.
> 
> Unfortunately, it's not that restricted.  I do need to search
> "normally", but I need to do so WITHOUT returning the stale results in
> an old install directory.
> 
> Cheers,
> CY

Have you already tried the CMAKE_[SYSTEM_]IGNORE_PATH variables? At
the first glance, they provide exactly the functionality you need.

Regards,

Michael


More information about the CMake mailing list