MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0013462 | CMake | CMake | public | 2012-08-07 20:50 | 2013-01-09 10:55 |
Reporter | Benjamin kay | ||||
Assigned To | David Cole | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Platform | Debian (unstable) | OS | Linux | OS Version | 3.2.0-3-amd64 |
Product Version | CMake 2.8.8 | ||||
Target Version | Fixed in Version | ||||
Summary | 0013462: set_target_properties include_directories should accept multiple parameters | ||||
Description | The set_target_properties command can be used to set properties on a library or executable. One of the properties that can be set is INCLUDE_DIRECTORIES, which is discussed on the mailing list: http://www.cmake.org/pipermail/cmake/2009-June/030429.html [^] The ability to set INCLUDE_DIRECTORIES on a specific target without setting it on an entire directory (i.e. with the include_directories command) is useful; see related bugs 0008189 and 0001968. Unfortunately, it appears that only one include directory can be set in this way. Take a simple test project: project(TESTPROJECT) add_executable(test test.c) set_target_properties(test PROPERTIES INCLUDE_DIRECTORIES /var /tmp) Obviously there's no need to include anything from /var or /tmp -- they're just there to illustrate the following error that occurs when running cmake: CMake Error at CMakeLists.txt:3 (set_target_properties): set_target_properties called with incorrect number of arguments. The following alternative syntax appears to work, but running make with VERBOSE=1 reveals that only the last directory included (/tmp in this case) is actually included. /var is not included. project(TESTPROJECT) add_executable(test test.c) set_target_properties(test PROPERTIES INCLUDE_DIRECTORIES /var INCLUDE_DIRECTORIES /tmp) Other variations such as the following also fail (incorrect number of arguments): project(TESTPROJECT) add_executable(test test.c) set(LIST_OF_DIRECTORIES /var) list(APPEND LIST_OF_DIRECTORIES /tmp) set_target_properties(test PROPERTIES INCLUDE_DIRECTORIES ${LIST_OF_DIRECTORIES}) For set_target_properties(target PROPERTIES INCLUDE_DIRECTORIES ...) to be truly useful, it should be able to accept multiple parameters. | ||||
Steps To Reproduce | |||||
Additional Information | The version of CMake installed on my system is actually 2.8.9-rc3, not 2.8.8. | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2012-08-07 20:50 | Benjamin kay | New Issue | |||
2012-08-08 02:46 | Rolf Eike Beer | Note Added: 0030187 | |||
2012-08-08 03:42 | Stephen Kelly | Note Added: 0030188 | |||
2012-08-08 06:57 | David Cole | Assigned To | => David Cole | ||
2012-08-08 06:57 | David Cole | Status | new => assigned | ||
2012-08-08 06:58 | David Cole | Note Added: 0030189 | |||
2012-08-08 06:58 | David Cole | Status | assigned => resolved | ||
2012-08-08 06:58 | David Cole | Resolution | open => no change required | ||
2012-08-08 08:21 | Benjamin kay | Note Added: 0030190 | |||
2012-08-08 08:21 | Benjamin kay | Status | resolved => feedback | ||
2012-08-08 08:21 | Benjamin kay | Resolution | no change required => reopened | ||
2012-08-08 08:26 | Brad King | Note Added: 0030191 | |||
2012-08-08 08:26 | Brad King | Status | feedback => resolved | ||
2012-08-08 08:26 | Brad King | Resolution | reopened => no change required | ||
2013-01-09 10:55 | Robert Maynard | Note Added: 0032011 | |||
2013-01-09 10:55 | Robert Maynard | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|