MantisBT - CMake
View Issue Details
0011217CMakeDocumentationpublic2010-09-09 03:412012-03-06 08:37
Andrea Rivetta 
David Cole 
normalminorhave not tried
closedno change required 
CMake-2-8 
CMake 2.8.7 
0011217: find_package description
There isn't any reference on documentation how to retreive in "module" mode all parameters passed to find_package(<moduleName> params ..) inside the Find<moduleName>.cmake file.
Add this if it is correct.

If you use the signature like:
find_package(<moduleName> [<major>[.<minor>[.<patch>[.<tweak>]]]] [EXACT][QUIET] [[REQUIRED|COMPONENTS] [<components> ..]] )

inside Find<module>.cmake you can check and verify all parameters using the following temporary variables:
<moduleName>_FIND_VERSION = <major>[.<minor>[.<patch>[.<tweak>]]]
<moduleName>_FIND_VERSION_MAJOR = <major>
<moduleName>_FIND_VERSION_MINOR = <minor>
<moduleName>_FIND_VERSION_PATCH = <patch>
<moduleName>_FIND_VERSION_TWEAK = <tweak>
<moduleName>_FIND_EXACT = true if [EXACT]
<moduleName>_FIND_QUIELTY = true if [QUIET]
<moduleName>_FIND_REQUIRED = true if [REQUIRED]
<moduleName>_FIND_COMPONENTS = <components>
No tags attached.
Issue History
2010-09-09 03:41Andrea RivettaNew Issue
2011-01-20 13:45Alex NeundorfNote Added: 0024963
2011-01-26 09:29David ColeAssigned To => David Cole
2011-01-26 09:29David ColeStatusnew => assigned
2011-01-26 09:33David ColeNote Added: 0025085
2011-10-25 22:42David ColeNote Added: 0027645
2011-10-25 22:42David ColeStatusassigned => resolved
2011-10-25 22:42David ColeFixed in Version => CMake 2.8.7
2011-10-25 22:42David ColeResolutionopen => no change required
2012-03-06 08:37David ColeNote Added: 0028831
2012-03-06 08:37David ColeStatusresolved => closed

Notes
(0024963)
Alex Neundorf   
2011-01-20 13:45   
That information is in the readme.txt in CMakes module directory.

Alex
(0025085)
David Cole   
2011-01-26 09:33   
Since this information is already available in CMake/Modules/readme.txt, where would you suggest that we add a copy or a link to this information to make it clearer for you?

In the output of "cmake --help-command find_package"? (maybe people would look here, maybe not)

In each and every Find module? (unrealistic, I think)

It is expected that people writing Find modules will understand the system sufficiently to write a good Find module by:
- reading CMake/Modules/readme.txt
- inspecting other Find modules to get a sense of "in practice" usage
- investigating the actual C++ source code of the find_package command itself
- asking questions on the CMake mailing lists (users and developers)

I'd like to resolve this bug by adding some documentation for you to make this more clear...... but I'm not sure where to add it.

Do you have a suggestion?

Thanks,
David
(0027645)
David Cole   
2011-10-25 22:42   
see previous notes for details
(0028831)
David Cole   
2012-03-06 08:37   
Closing resolved issues that have not been updated in more than 4 months.