MantisBT - CMake
View Issue Details
0013678CMakeCMakepublic2012-11-12 05:102013-04-17 08:54
Micha Renner 
David Cole 
normalminoralways
closedno change required 
All
 
CMake 2.8.11CMake 2.8.11 
0013678: The target property INCLUDE_DIRECTORIES overwrites the include_directories command values.
A better way would have been that the values of the include_directories command would appended to the values of the target property INCLUDE_DIRECTORIES, as it is with the COMPILE_DEFINITIONS property and the ADD_DEFINITION command.

# Example
INCLUDE_DIRECTORIES(general_include_directories)
 
# Projet A
...
# Overwrites INCLUDE_DIRECTORIES command
SET_TARGET_PROPERTIES(ProA PROPERTIES INCLUDE_DIRECTORIES ${ProjAIncludeDirs})
...

# Projet B
...
SET_TARGET_PROPERTIES(ProB PROPERTIES INCLUDE_DIRECTORIES ${ProjBIncludeDirs})
...
No tags attached.
Issue History
2012-11-12 05:10Micha RennerNew Issue
2012-11-12 11:07David ColeNote Added: 0031528
2012-11-12 11:07David ColeAssigned To => David Cole
2012-11-12 11:07David ColeStatusnew => assigned
2012-11-12 11:07David ColeNote Added: 0031529
2012-11-12 11:07David ColeStatusassigned => resolved
2012-11-12 11:07David ColeFixed in Version => CMake 2.8.11
2012-11-12 11:07David ColeResolutionopen => no change required
2012-11-12 11:08David ColeTarget Version => CMake 2.8.11
2013-04-17 08:54Robert MaynardNote Added: 0032866
2013-04-17 08:54Robert MaynardStatusresolved => closed

Notes
(0031528)
David Cole   
2012-11-12 11:07   
If you would like to APPEND, simply use set_property with the APPEND keyword.

  http://cmake.org/cmake/help/v2.8.10/cmake.html#command:set_property [^]

Without APPEND, you're *setting* the property directly. With APPEND, you're adding to the existing directories that are already in the property...

We did it that way on purpose so you could do either.
(0031529)
David Cole   
2012-11-12 11:07   
Please see my previous note. This behavior you are observing is correct, and by design.
(0032866)
Robert Maynard   
2013-04-17 08:54   
Closing resolved issues that have not been updated in more than 4 months.