[CMake] add_definitions verus set_source_files_properties

Michael Wild themiwi at gmail.com
Wed Jun 1 14:55:17 EDT 2011


On 06/01/2011 05:51 PM, Benjamin Peterson wrote:
> Is it improper to use add_definitions to set compile flags instead of
> set_source_files_properties and the COMPILE_FLAGS property? The reason I ask is
> that I prefer the recursive behavior of add_definitions, but
> set_source_files_properties appears to be more modern.

Yes, it is considered to be bad practice. If you want the same behavior,
though, use set_directory_properties().

Michael



More information about the CMake mailing list