[CMake] Include Directories Cleanup/Remove Prior Entries

Jeremy Torres jeremy.torres at gmail.com
Tue Nov 9 20:37:40 EST 2010


I have a question regarding removing prior entries from include_directories.  Specifically, in a CMakeLists.txt, I have several targets.  For example:

# target 1
include_directories(x y z)
add_executable(my_exe ...)

#target 2
include_directories(a b c)
add_executable(my_exe2 ...)

#target 3
....

#target N


I would like to be able to "cleanup" all includes for each target2 so that they ONLY include the target-specified includes.  I have looked through mailing lists, etc, and I only see the set_directory_properties(PROPERITES INCLUDE_DIRECTORES ""). I have tried this but it does not work.

Thanks in advance for your help,

Jeremy


More information about the CMake mailing list