James Bigler wrote:
Is is possible to add include directories for a particular source file?

Right now I do:

INCLUDE_DIRECTORIES(${Extra_Include_Dir})

But this puts the extra includes on all the files for the libraries in the CMakeLists.txt file.

Where is the harm in doing so? Are you having some kind of collision between *.h filenames in your include directories? Judicious use of the BEFORE and AFTER options can prevent such collisions.


What I want is to do something like:

  SET_SOURCE_FILES_PROPERTIES(MyFile.cc
PROPERTIES INCLUDE_DIRECTORIES ${Extra_Include_Dir})

This doesn't work, but perhaps I could add something to COMPILE_FLAGS, but how do I do this in a build system portable way?

I understand what you want, but not why.


Cheers,
Brandon Van Every

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to