How about suggesting a naming convention for "standard" macros then, so that they don't have a name clash with other CMake modules like Find*, Check*, Test*...

Perhaps if the macro is named "LogToFile", the file could be named "LogToFileMacro.cmake"?

Only 2 cents, ;)
David


Brad King wrote:

Alexander Neundorf wrote:

Hi, what do you think about creating a cmake module which contains several useful macros ? E.g. stuff like: MACRO(OPTIONAL_PACKAGE name) OPTION(WITH_${name} "ON" "Support ${name}") IF(WITH_${name}) FIND_PACKAGE(${name}) ENDIF(WITH_${name}) ENDMACRO(OPTIONAL_PACKAGE) (just as an example, needs finetuning). What would be a good name ? CMakeUtils, CMakeTools, CMakeLib (sounds as it would be related to creating libraries) ?


We should put each macro in its own module of the same name to allow users to include them individually and so that the documentation is nicely formatted by --help-module. Then they could be packaged together under a single module that just INCLUDEs the other modules. It could be called something like CMakeStandardMacros.

-Brad
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to