开发者

CMake set_target_properties and include_directories

开发者 https://www.devze.com 2023-02-24 00:43 出处:网络
My question is largel开发者_运维问答y related to this (unanswered) question on the CMake mailing list.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消