On Jan 14, 2008, at 1:01 PM, Rodolfo Schulz de Lima wrote:
Hi, I'd like to comment on the Find*.cmake variable naming
procedure adopted by cmake. Right now I have to look at some
Find*.cmake files to see what are the output variables they create.
Some packages create a *_LIBRARY, others *_LIBRARIES, others
*_INCLUDE_DIRS and others *_INCLUDE_DIR. The Modules/readme.txt
procedure isn't being used for some packages.
Also the vast majority creates upcased (is this an adjective?)
variable names, BUT Boost and wxWidgets. There two define
Boost_FOUND, Boost_LIBRARIES, wxWidgets_FOUND, wxWidgets_LIBRARIES.
It should be better if they were BOOST_FOUND, WXWIDGETS_FOUND etc.
This gets annoying when you're trying to create a macro that
accepts a package name, finds it and use their output variables.
This requires an uniformity that is lacking on Find*.cmake's.
I'll try to summarize below the discrepancies I've found (just a
few of them)
Aspell: outputs ASPELL_INCLUDE_DIR instead of ASPELL_INCLUDE_DIRS
AVIFile: outputs AVIFILE_INCLUDE_DIR instead of AVIFILE_INCLUDE_DIRS
Boost: variable names should be upcase.
Bzip2: outputs BZIP2_INCLUDE_DIR instead of BZIP2_INCLUDE_DIRS
Cable: outputs CABLE_TCL_LIBRARY instead of CABLE_TCL_LIBRARIES,
and
CABLE_INCLUDE_DIR instead of CABLE_INCLUDE_DIRS
Cups: outputs CUPS_INCLUDE_DIR instead of CUPS_INCLUDE_DIRS
Curses: outputs CURSES_INCLUDE_DIR instead of CUPS_INCLUDE_DIRS
DCMTK: outputs DCMTK_INCLUDE_DIR instead of DCMTK_INCLUDE_DIRS
...
and there's a lot more. It seems that the majority uses
*_INCLUDE_DIR instead of *_INCLUDE_DIRS
Regards,
rod
Nothing much to add except, "I Agree". Consistency in any API/
Language is essential for people to learn quickly. I would also think
that the jump from 2.4.x to 2.6.x is _perfect_ time to change the
variables. There may be other major changes API breakage, so getting
this done also makes sense in my little utopian world.
--
Mike Jackson
imikejackson & gmail * com
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake