MantisBT - CMake
View Issue Details
0015149CMakeDocumentationpublic2014-09-10 18:502015-03-02 08:57
sleske 
Brad King 
normaltextN/A
closedfixed 
CMake 3.0.1 
CMake 3.1CMake 3.1 
0015149: Document that the CHECK_* macros create cache variables
The various CHECK_* macros (CHECK_C_COMPILER_FLAG, CHECK_FORTRAN_FUNCTION_EXISTS Etc.) set a result variable whose name is specified as a parameter.

However, the macros do not document that the result variable is created as a cache variable.

While this is probaby obvious to experienced CMake users, it can be confusing for newbies.
For example, calling multiple CHECK_* macros with the same result variable will not work as expected, because the variable is only set once.
This should be documented.
No tags attached.
diff cmake-check-doc.diff (7,882) 2014-09-10 18:51
https://public.kitware.com/Bug/file/5253/cmake-check-doc.diff
Issue History
2014-09-10 18:50sleskeNew Issue
2014-09-10 18:51sleskeFile Added: cmake-check-doc.diff
2014-09-10 18:52sleskeNote Added: 0036781
2014-09-11 08:56Brad KingNote Added: 0036784
2014-09-11 08:56Brad KingAssigned To => Brad King
2014-09-11 08:56Brad KingStatusnew => resolved
2014-09-11 08:56Brad KingResolutionopen => fixed
2014-09-11 08:56Brad KingFixed in Version => CMake 3.1
2014-09-11 08:56Brad KingTarget Version => CMake 3.1
2015-03-02 08:57Robert MaynardNote Added: 0038113
2015-03-02 08:57Robert MaynardStatusresolved => closed

Notes
(0036781)
sleske   
2014-09-10 18:52   
The attached patch adds a note about cache variables to the docs of the
CHECK_* macros. Mostly it just adds the note "Will be created as an
internal cache variable." to the docs for the result variable.
(0036784)
Brad King   
2014-09-11 08:56   
Thanks. Applied with a minor tweak to the CheckTypeSize change:

 Help: Document that the CHECK_* macros create cache variables
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=908c7439 [^]
(0038113)
Robert Maynard   
2015-03-02 08:57   
Closing resolved issues that have not been updated in more than 4 months.