View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0005974 | CMake | CMake | public | 2007-10-27 13:44 | 2011-06-06 18:25 | ||||
Reporter | mnieber | ||||||||
Assigned To | David Cole | ||||||||
Priority | normal | Severity | feature | Reproducibility | always | ||||
Status | closed | Resolution | won't fix | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | CMake 2.8.4 | |||||||
Summary | 0005974: DONT_INHERIT keyword for ADD_SUBDIRECTORY | ||||||||
Description | I'm working on CSnake (a set of python classes that generate CMake scripts). CSnake knowns for each target which preprocessor defines and include paths are needed. Therefore, I would like to disable the inheritance of preprocessor defines and include paths that happens when ADD_SUBDIRECTORY is executed, for example using: ADD_SUBDIRECTORY("project2" "myBinFolder" DONT_INHERIT) In project2's CMakeLists.txt, I would specify all include folders and defines explicitly. This would allow me to get rid of include folders that are only needed by project2's "parent" target, but not by project2. Thanks in advance! | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0010494) mnieber (reporter) 2008-02-14 04:30 |
Hi, just a small note to let you know I'm still very much interested in this feature! I hope its implementation is not too complicated. |
(0023956) David Cole (manager) 2010-12-14 11:28 |
Can't you implement this by yourself by simply not adding any include directories or definitions at the top level? |
(0023963) mnieber (reporter) 2010-12-14 11:54 |
Usually this is not possible. CSnake generates a project dependency tree that has many levels. Each project in the tree uses ADD_SUBDIRECTORY for its child projects. In the current CMake, once a project has includes/defines, all its (grand)children will also get them (hence the request for DONT_INHERIT). |
(0025217) David Cole (manager) 2011-02-01 16:12 |
This request seems too much against the nature of CMake's add_subdirectory and the inheritance of property and variable values that are built-in and automatic. I think "DONT_INHERIT" would either: - block some, but not all, inherited values (and it would be confusing to explain why some things are and some things are not inherited) * OR * - block all inherited values, including cache variable values, and surprise some folks by not getting what they expect from their parent directories... I think "DONT_INHERIT" goes against the grain of what developers have come to expect from CMake. The goal that you have of not sharing defs and include dirs with other directories may be realized simply by re-organizing your calls to add_definitions, include_directories and add_subdirectory. With the understanding that subdirectories ALWAYS inherit properties and variables from the parent. Feel free to bring this up on the mailing list for a more inclusive discussion with other opinions involved... but for now, I'm going to resolve this one as "won't fix" |
(0026682) David Cole (manager) 2011-06-06 18:25 |
Closing resolved issues that have not been updated in more than 3 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2007-10-27 13:44 | mnieber | New Issue | |
2007-12-17 12:10 | Bill Hoffman | Status | new => assigned |
2007-12-17 12:10 | Bill Hoffman | Assigned To | => Ken Martin |
2008-02-14 04:30 | mnieber | Note Added: 0010494 | |
2010-12-14 11:27 | David Cole | Assigned To | Ken Martin => David Cole |
2010-12-14 11:28 | David Cole | Note Added: 0023956 | |
2010-12-14 11:54 | mnieber | Note Added: 0023963 | |
2011-02-01 16:12 | David Cole | Note Added: 0025217 | |
2011-02-01 16:12 | David Cole | Status | assigned => resolved |
2011-02-01 16:12 | David Cole | Fixed in Version | => CMake 2.8.4 |
2011-02-01 16:12 | David Cole | Resolution | open => won't fix |
2011-06-06 18:25 | David Cole | Status | resolved => closed |
2011-06-06 18:25 | David Cole | Note Added: 0026682 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |