MantisBT - CMake | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0003250 | CMake | CMake | public | 2006-05-17 03:35 | 2012-09-03 16:00 |
| Reporter | Laurentiu Nicolae | ||||
| Assigned To | Brad King | ||||
| Priority | low | Severity | major | Reproducibility | always |
| Status | closed | Resolution | not fixable | ||
| Platform | OS | OS Version | |||
| Product Version | |||||
| Target Version | Fixed in Version | ||||
| Summary | 0003250: <config>_OUTPUT_NAME not used as target property LOCATION | ||||
| Description | My project requires the generation of DLLs and executables with different postfixes for different configurations. Therefore I am setting the <config_OUTPUT_NAME accordingly. However, when I try to add a post-build step to the build (as described in the manual), the LOCATION property of the target is set to the original generated name, regardless of the configuration. I can of course work around this by setting the prefixes by hand in the post-build command, but I believe this to be a bug. The reason being: if I am using the <config>_OUTPUT_NAME options, the LOCATION property becomes rather useless, because it points to something that may not be there any more. CMakeLists.txt excerpt: SET_TARGET_PROPERTIES ( ${ProjectName} PROPERTIES DEBUG_OUTPUT_NAME "${ProjectName}D" ) SET_TARGET_PROPERTIES ( ${ProjectName} PROPERTIES RELWITHDEBINFO_OUTPUT_NAME "${ProjectName}Q" ) SET_TARGET_PROPERTIES ( ${ProjectName} PROPERTIES RELEASE_OUTPUT_NAME "${ProjectName}R" ) ---------------- Comments from Brad King: Yes, this is a bug. The LOCATION property was around long before the target properties that could affect the name on a per-configuration basis. When those options were added the LOCATION property was never updated to deal with them and was left alone to support existing code. This is a known problem we've been ignoring until someone needed it because it is a pain to address. The problem is that we need to have a single value at CMake configure time (the LOCATION) split into multiple values at CMake generate time (the per-configuration LOCATION). One idea we've had is to return a special string for the LOCATION property which is recognized by the generator and replaced with the right thing in each generated configuration, though this leads to a hackish special syntax behind the scenes. Another idea is to allow a separate custom command to be specified for each configuration, though this will lead to duplicate code and complicated loops in user code. We have not figured out quite what to do. | ||||
| Steps To Reproduce | |||||
| Additional Information | |||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2012-03-09 14:39 | Brad King | Note Added: 0028882 | |||
| 2012-03-09 14:39 | Brad King | Status | assigned => resolved | ||
| 2012-03-09 14:39 | Brad King | Resolution | open => not fixable | ||
| 2012-09-03 16:00 | David Cole | Note Added: 0030831 | |||
| 2012-09-03 16:00 | David Cole | Status | resolved => closed | ||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||