Denis Scherbakov wrote:
Eric,
Your solution requires a developer to know too much about the
project,
which is not always true and basically to answer a full-scale
questionnaire before compilation. What if it is a new developer? What if
it is not a developer, but a user who expects everything to compile
automatically?
My question is simple:
What is the way to get some code executed not during
cmake-compilation, but when a user types "gmake something" and it
becomes clear which dependencies are needed.
What you can do is something like this:
IF ( LIBXML2_FOUND )
# add executables and sub_directories that use libxml2 in here
ELSE()
MESSAGE(STATUS "libxml2 was not found, X, Y, and Z will not be built")
ENDIF ()
If you have a FATAL_ERROR, nothing will get built.
-Bill
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake