MantisBT - CMake
View Issue Details
0007286CMakeCMakepublic2008-07-04 21:322016-06-10 14:30
Miguel Figueroa 
Bill Hoffman 
normalfeaturehave not tried
closedmoved 
 
 
0007286: Add a DEPENDS keyword to FIND_XXX commands.
In situations when finding software that has many components that depend on a root location, it is hard to reset the components through the GUI. For example, wxWidgets has more than 10 component libraries that after finding them once we would have to be reset each of them if one wants the libraries rooted elsewhere (say another version).

I have coded the module by saving the last value of the root directory in the cache and if it changes it sets all component previously found values to NOTFOUND. However, it would be easier if we had a DEPENDS keyword that automatically took care of this. For example,

  FIND_PATH(wxWidgets_ROOT_DIR
    NAMES include/wx/wx.h
    PATHS
      "C:/wxWidgets-2.8.8"
      "C:/wxWidgets-2.8.4"
  )

  FIND_PATH(wxWidgets_LIB_DIR
    NAMES wxpng.lib wxpngd.lib
    PATHS
    ${wxWidgets_ROOT_DIR}/lib/vc_lib
    DEPENDS wxWidgets_ROOT_DIR <- if these values change find again
  )

The first time around it will find the 2.8.8 libs. If you change the wxWidgets_ROOT_DIR to "C:/wxWidgets-2.8.4" you would need to reset the libs, otherwise they would not correspond to the 2.8.4 version.

If you look at the FindwxWidgets you can see that the naming of the libs make this feature very necessary and why we can't afford to do this with regular non-cached variables.

My thoughts is that you would need to store the CACHE values before running CMake and everytime it hits a DEPENDS list check it it currently has a different value than it started out with.

Thoughts?

--Miguel
No tags attached.
Issue History
2008-07-04 21:32Miguel FigueroaNew Issue
2008-08-19 16:51Bill HoffmanNote Added: 0013086
2008-08-19 16:51Bill HoffmanStatusnew => assigned
2008-08-19 16:51Bill HoffmanAssigned To => Bill Hoffman
2008-11-10 10:01Eric NOULARDNote Added: 0014082
2016-06-10 14:27Kitware RobotNote Added: 0041438
2016-06-10 14:27Kitware RobotStatusassigned => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:30Kitware RobotStatusresolved => closed

Notes
(0013086)
Bill Hoffman   
2008-08-19 16:51   
You might want to bring this up on the cmake mailing list...
(0014082)
Eric NOULARD   
2008-11-10 10:01   
The same idea arised in a similar context
http://www.cmake.org/pipermail/cmake/2008-November/025182.html [^]
then recalled by Miguel
http://www.cmake.org/pipermail/cmake/2008-November/025204.html [^]
(0041438)
Kitware Robot   
2016-06-10 14:27   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.