[CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?
Bill Hoffman
bill.hoffman at kitware.com
Wed Nov 26 15:16:53 EST 2008
Sean Soria wrote:
> Yea, the example was an example. I changed it to foo/bar.c so no more
> multiple main files.
>
> Why is it that source file property COMPILE_FLAGS would work but not
> COMPILE_DEFINITIONS? What is the point of having COMPILE_DEFINITIONS
> for source level if it's not obeyed?
>
COMPILE_DEFINITIONS should work on a source property. It is
INCLUDE_DIRECTORIES that does not. Feel free to put a feature request
into the bug tracker...
This works for me:
add_library(foo foo.c)
set_source_files_properties(foo.c PROPERTIES COMPILE_DEFINITIONS worked)
-Bill
More information about the CMake
mailing list