2011/6/7 Michael Wild <them...@gmail.com>:
> If the FindXXX.cmake file called add_definitions(),
> include_directories() et al., that could be potentially harmful. Some
> sources might required that some define is not set, or a wrong header
> file might be #include'ed (thing of all the different X.h that exist).
> FindXXX.cmake modules should just define a few variables, *not* change
> the build system. That's the caller's responsibility, either by calling
> the functions himself or by including the UseXXX.cmake (if provided).

Ok, I see the point now. However, if find_package is called only in
the subdirectories that actually need it the above problem is
non-existent. No? (At least add_definitions only work on the current
dir and below.) But if the policy is they way it is, then OK, I get
the point and I'll leave it at that.

However, according to Modules/readme.txt, FindXXX.cmake files should
set XXX_LIBRARIES, XXX_INCLUDE_DIRS and XXX_DEFINITIONS. FindQt4.cmake
sets neither. I can try to come up with a patch to fix this, but I
won't complain if someone beats me to it ;-)

Best regards,
Bjørn Forsman
_______________________________________________
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

Reply via email to