[CMake] Having per-source file different includes

Alexander Neundorf a.neundorf-work at gmx.net
Thu Nov 27 15:21:29 EST 2008


On Wednesday 26 November 2008, Steven Van Ingelgem wrote:
> Hi,
>
>
> Is it possible to change the "include_directories" per source file?
> I know I could do set_source_file_property( ... COMPILE_DEFINITIONS
> -Itesting... ), but this is not very portable I think?

Well, I think it is not nice and not in any standard, but most/many compilers 
understand it.

> Is there a better way?

No, currently not. (except other workarounds which are probably not nicer than 
yours).

Alex


More information about the CMake mailing list