[CMake] Excluding definitions for source files

Robert Bielik robert.bielik at xponaut.se
Thu May 19 02:18:04 EDT 2011


Robert Bielik skrev 2011-05-19 07:57:
>> I have a problem where I need to be able to select Unicode build or not, but at the same time 3 files of my project MUST NOT have
>> Unicode enabled. Is there a way to remove compile definitions for certain source files ?
>
> Oh, and I cannot extract those 3 files into a separate static library as my project _is_ a static library that should have no extra
> dependencies as viewed from including apps.

Ok, I did it by set_source_files_properties (compile_definitions) on all source files BUT the 3 I wanted in non-unicode always. Works fine,
but it would be great with a remove_compile_definitions for set_source_files_properties ? :)

Regards,
/Rob


More information about the CMake mailing list