CMake set_target_properties and include_directories
My question is largel开发者_运维问答y related to this (unanswered) question on the CMake mailing list.
Essentially I want to know about the behaviour of include_directories behind the scenes of the Visual Studio 2010 generator; do the directories from previous calls to include_directories get overwritten when you do this:
set_target_properties(${Target} PROPERTIES COMPILE_FLAGS /I${some_directory})
The comments on the mailing list say "it shouldn't", but that seems to be the behaviour I am seeing. I understand that the projects in VS2010 are a little more complicated, but I am unable to find a definitive answer. Could it just be a bug with the 2010 generator?
I'm using Visual Studio 2010 SP1 and CMake 2.8.4
I haven't seen your CMakeLists.txt, but is the ordering of the include paths good? I think the order of the include paths is not defined if you do it that way. See: /I compiler option, set_target_properties and include_directories documentation.
精彩评论