View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007290CMakeCMakepublic2008-07-07 02:142008-10-01 13:22
ReporterMiguel Figueroa 
Assigned ToBill Hoffman 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0007290: Patch: Add NO_CACHE option to find_xxx commands
DescriptionMany times it would be helpful to have the find_xxx search capabilities and standard interface when searching for a path, file, etc., but with variables that are not meant for the cache. An example to illustrate this is:

find_path(wxWidgets_LIB_DIR
  "C:/wxWidgets"
  ...
  )
find_library(wxWidgets_core_LIBRARY
  NAMES
    wxmsw29_core
    wxmsw28_core
    wxmsw27_core
    wxmsw26_core
    wxmsw25_core
  PATHS ${wxWidgets_LIB_DIR}
  NO_DEFAULT_PATH
  NO_CACHE
  )

In this case we would like to cache wxWidgets_LIB_DIR to allow the user to be able to modify it in the gui. Then wxWidgets_core_LIBRARY should be searched for in wxWidgets_LIB_DIR without allowing or presenting the user with the opportunity to select another version of the library rooted elsewhere.

Note that we could achieve the above by using "if(EXISTS ...)", but it is much better and easier to use the same robust find_xxx interface.

I have attached a simple patch that implements this for the find_path command. I would be happy to produce a patch that implements the same functionality for the other find_xxx commands after we discuss this feature.

This feature request is somewhat related to 0007286. However, I still think the DEPENDS would be helpful even if there is a NO_CACHE like suggested here.

--Miguel
TagsNo tags attached.
Attached Filespatch file icon find_xxx-no_cache.patch [^] (4,259 bytes) 2008-07-07 02:14 [Show Content]

 Relationships

  Notes
(0013085)
Bill Hoffman (manager)
2008-08-19 16:49

It would always run each time cmake ran if it was not cached.
(0013653)
Bill Hoffman (manager)
2008-10-01 13:22

If we did this, cmake would do too much finding. It would be trying to find stuff every time cmake is run, even if it finds it. It should be a hard thing to do...

 Issue History
Date Modified Username Field Change
2008-07-07 02:14 Miguel Figueroa New Issue
2008-07-07 02:14 Miguel Figueroa File Added: find_xxx-no_cache.patch
2008-08-19 16:49 Bill Hoffman Note Added: 0013085
2008-08-19 16:49 Bill Hoffman Status new => assigned
2008-08-19 16:49 Bill Hoffman Assigned To => Bill Hoffman
2008-10-01 13:22 Bill Hoffman Status assigned => closed
2008-10-01 13:22 Bill Hoffman Note Added: 0013653
2008-10-01 13:22 Bill Hoffman Resolution open => won't fix


Copyright © 2000 - 2018 MantisBT Team