[CMake] rules for writing cmake modules
Alexander Neundorf
a.neundorf-work at gmx.net
Sun Jan 1 14:48:43 EST 2006
Hi,
I think it would be a good idea if the cmake wiki would contain a page
with rules how a good cmake module file should behave.
Like:
If you write a FindLibFOO.cmake, then the following variables should be
defined:
FOO_FOUND
FOO_INCLUDE_DIR
FOO_LIBRARY
FOO_LINK_DIR (?)
Should it print some status messages on success/failure ?
Should it MESSAGE(FATAL_ERROR "Foo not found") on failure ?
Should it use ADD_DEFINITIONS() or just SET(FOO_DEFINITIONS -Dwhatever) ?
Or more general, should it use commands, which affect the build or should
it just set variables which can then be used from the outside ?
What do you think ?
How should a good cmake module work ?
Bye
Alex
--
Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
More information about the CMake
mailing list