MantisBT - CMake
View Issue Details
0013426CMakeModulespublic2012-07-19 14:152014-06-02 08:37
Matt Williams 
jschueller 
normalminoralways
closedfixed 
x86_64openSUSE11.2
CMake 2.8.8 
CMake 3.0CMake 3.0 
0013426: FindSWIG.cmake doesn't mark variables as advanced
FindSWIG.cmake sets number of variables in the process of finding SWIG, notably:
• SWIG_DIR
• SWIG_EXECUTABLE
• SWIG_VERSION

Of the three of these, SWIG_EXECUTABLE is used to obtain the other two and it's CMake convention to only have one non-advanced variable per module which can then set the others. In this case, SWIG_DIR and SWIG_VERSION could be mark_as_advanced() without any loss to functionality while making the cmake-gui display cleaner.

Searching around, I see at least two projects which are manually setting these varaibles as advanced in their own code (presumably simply to make cmake-gui or ccmake cleaner):

http://dtk.inria.fr/+sup/dtk/dtk-clone-sup/blobs/ac62dd518871e2ccbeebe5c96dc6c6b1c815539f/cmake/dtkDependencies.cmake [^]
http://speect.git.sourceforge.net/git/gitweb.cgi?p=speect/speect;a=commitdiff_plain;h=36485b8b7fc38be46c11aeedbc3ccf4abd26f2f6 [^]
http://www.mail-archive.com/cmake@cmake.org/msg38240.html [^]
Run a CMake script which calls find_package(SWIG) and then run 'cmake -LA' and see that all three variables are shown. Only SWIG_EXECUTABLE should be.
No tags attached.
Issue History
2012-07-19 14:15Matt WilliamsNew Issue
2012-07-19 14:30Matt WilliamsNote Added: 0030089
2012-12-26 10:52Matt WilliamsNote Added: 0031942
2013-11-22 09:07Brad KingAssigned To => jschueller
2013-11-22 09:07Brad KingStatusnew => assigned
2013-11-22 09:14Brad KingNote Added: 0034517
2013-11-22 09:20Brad KingTarget Version => CMake 3.0
2013-11-25 09:06jschuellerNote Added: 0034545
2013-11-25 09:06jschuellerStatusassigned => resolved
2013-11-25 09:06jschuellerFixed in Version => CMake 3.0
2013-11-25 09:06jschuellerResolutionopen => fixed
2014-06-02 08:37Robert MaynardNote Added: 0036026
2014-06-02 08:37Robert MaynardStatusresolved => closed

Notes
(0030089)
Matt Williams   
2012-07-19 14:30   
Of course, in "Steps to reproduce" I meant to run 'cmake -L' and not 'cmake -LA'.
(0031942)
Matt Williams   
2012-12-26 10:52   
This bug is still present in CMake 2.8.10.2. All that is needed to fix it is a

mark_as_advanced(SWIG_DIR SWIG_VERSION)

towards the end of FindSWIG.cmake.
(0034517)
Brad King   
2013-11-22 09:14   
FindSWIG: Mark SWIG_DIR & SWIG_VERSION as advanced
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6620dc76 [^]
(0034545)
jschueller   
2013-11-25 09:06   
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8c127c9e [^]
(0036026)
Robert Maynard   
2014-06-02 08:37   
Closing resolved issues that have not been updated in more than 4 months.