On 4/3/2012 9:33 PM, Christoph Anton Mitterer wrote:
Actually what I'd prefer most if add_definitions (and perhaps even include_directories) could be set in a per file context[0].
add_definitions is the original interface and uses -D in its syntax for historical reasons. The earliest quick-and-dirty implementation allowed arbitrary flags so people started abusing it. Then we had to support such projects for compatibility. These days you can set the COMPILE_DEFINITIONS property on a per-directory, per-target, and per-source basis (and even per-configuration): http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_dir:COMPILE_DEFINITIONS http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:COMPILE_DEFINITIONS http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_sf:COMPILE_DEFINITIONS CMake 2.8.8 adds support for per-target INCLUDE_DIRECTORIES. -Brad -- 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