MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0012543 | CMake | CMake | public | 2011-10-27 19:00 | 2011-10-27 22:46 |
Reporter | Tony Bridges | ||||
Assigned To | Clinton Stimpson | ||||
Priority | high | Severity | feature | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Platform | x86 | OS | Win2k8 | OS Version | |
Product Version | CMake-2-8 | ||||
Target Version | Fixed in Version | ||||
Summary | 0012543: Cannot specify link_libraries per configuration when using custom configurations | ||||
Description | Related to 0012124, added to refine the requirement. In my project, I need to build a particular shared project a number of different ways (Debug/Release Shared/Static MBCS/Unicode in all combinations). These are implemented as multiple configurations via CMAKE_CONFIGURATION_TYPES. (Debug, Debug-Shared, Debug-Shared-Unicode for example) At the project level, I need to specify different support libraries by name, based on the configuration. For example, for static debug I reference cppunitd.lib, and for shared debug I reference cppunitd-sh.lib. The support for conditional libraries in the target_link_libraries command is limited to the standard configurations, Debug, Release, Optimized. Custom configurations are not recognized here. What is needed is the ability to use custom configurations in the target_link_libraries command to set library names per configuration. The same argument applies to setting the library path (and to a lesser extent, the include path). Currently, these can only be set per-configuration at the solution level (via set(CMAKE_CXX_FLAGS_DEBUG_SHARED_UNICODE) ), which requires that the conditional paths for all libraries in the solution be set globally. This results in a potentially dangerous superset of LIBPATHS being pushed into every project in the solution, and loss of control over order and precedence. | ||||
Steps To Reproduce | |||||
Additional Information | to summarize, looking for features as follows : target_link_libraries ( {MyCustomConfigName} {MyLibByConfigName} ) link_directories ( {MyCustomConfigName} {MyLibPath} ) include_directories ( {MyCustomConfigName} {MyIncPath} ) | ||||
Tags | CMake, visual studio | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2011-10-27 19:00 | Tony Bridges | New Issue | |||
2011-10-27 19:04 | Tony Bridges | Tag Attached: CMake | |||
2011-10-27 19:05 | Tony Bridges | Tag Attached: static library | |||
2011-10-27 19:05 | Tony Bridges | Tag Attached: visual studio | |||
2011-10-27 19:05 | Tony Bridges | Tag Detached: static library | |||
2011-10-27 19:12 | Clinton Stimpson | Note Added: 0027664 | |||
2011-10-27 19:36 | Tony Bridges | Note Added: 0027665 | |||
2011-10-27 22:46 | Clinton Stimpson | Status | new => closed | ||
2011-10-27 22:46 | Clinton Stimpson | Assigned To | => Clinton Stimpson | ||
2011-10-27 22:46 | Clinton Stimpson | Resolution | open => no change required |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|