On 01/20/2011 01:30 PM, SF Markus Elfring wrote: >> get_directory_property(info COMPILE_DEFINITIONS) > > How do you think about an extension for this programming interface? > > Would you like to support that target parameters like preprocessor > symbols are queried from the build environment even if they were not set > by the CMake command "add_definitions" explicitly? > > Regards, > Markus
Probably that would be pretty difficult to achieve and definitely would break backwards-compatibility beyond resurrection. OTOH, I really think that you're on the wrong track here. You shouldn't check for a preprocessor symbol in CMake. Instead, probably do a find_package(TinyXML) and then depending on the result offer the user an option variable (e.g. ENABLE_DEBUGGING_FUNCTIONS), define a preprocessor symbol HAVE_TINYXML which you then use in your code together with NDEBUG to determine whether to - don't call the debugging functions at all (NDEBUG defined) - either provide dummy/stub debugging functions or #error out (NDEBUG and HAVE_TINYXML not defined) - call the debugging functions (NDEBUG not defined, HAVE_TINYXML defined) This would put the load on the users shoulders, but it should be pretty clear for him what is expected and how to handle things. The INSTALL document can also help there. Michael _______________________________________________ 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