View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0012322 | CMake | CMake | public | 2011-07-08 05:27 | 2012-01-02 15:56 | ||||
Reporter | Yuri | ||||||||
Assigned To | David Cole | ||||||||
Priority | normal | Severity | tweak | Reproducibility | always | ||||
Status | closed | Resolution | won't fix | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 2.8.4 | ||||||||
Target Version | Fixed in Version | CMake 2.8.6 | |||||||
Summary | 0012322: Ability to add source files to target created with ExternalProject | ||||||||
Description | In my scenario I have part of project which should be built with different toolset (Main project is built with VC2010, and some legacy libraries with VC6 and VS2005). Basically nested project contains set(Proj_SRCS src1.cpp src2.cpp...) add_library(Proj MODULE ${Proj_SRCS}) So set() command may be moved into separate file which in turn could be included into main project. So I want to see them there to edit in IDE, but not compile. The only possibility to add files to custom target - is specify SOURCES in add_custom_target command (It's impossible to call cmTarget::AddSources from outside). However, ExternalProject_Add macro doesn't add any sources. Moreover, there is a kind of chicken-and-egg problem: all arguments are parsed and set as property on target. But you can't set property while there is no target. So as quick work-around I made private copy of ExternalProject.cmake and pass sources as directory property. So I'm asking for ideas how to properly implement this feature: modify somehow parameters parsing in ExternalProject, or may be introduce command which allows adding new sources to existing targets (I'm not sure if this will work, but for me it sounds like target_link_libraries command). | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0027196) David Cole (manager) 2011-08-12 09:23 |
I don't think we should do this. If we allow source files from external projects to be added directly to the IDE representations of the external projects in the containing project, then people will expect the dependencies to work correctly automatically... The dependencies will not work automatically. You will have to forcefully trigger an incremental rebuild of the external project on *any* build of the containing project, and then hope that its build system appropriately picks up only the incremental build changes necessary. I view this as fragile, and would not like to see it go in CMake unless it can be made robust, and shown to work automatically and as developers would expect in the vast majority of use cases. |
(0027197) David Cole (manager) 2011-08-12 09:24 |
If you need more help on this issue/topic, please send email to the CMake users list asking for advice there. There's a much wider readership of the mailing list than there is of the bug database. |
(0028127) David Cole (manager) 2012-01-02 15:56 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-07-08 05:27 | Yuri | New Issue | |
2011-08-12 09:19 | David Cole | Assigned To | => David Cole |
2011-08-12 09:19 | David Cole | Status | new => assigned |
2011-08-12 09:23 | David Cole | Note Added: 0027196 | |
2011-08-12 09:23 | David Cole | Status | assigned => resolved |
2011-08-12 09:23 | David Cole | Fixed in Version | => CMake 2.8.6 |
2011-08-12 09:23 | David Cole | Resolution | open => won't fix |
2011-08-12 09:24 | David Cole | Note Added: 0027197 | |
2012-01-02 15:56 | David Cole | Note Added: 0028127 | |
2012-01-02 15:56 | David Cole | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |