MantisBT - CMake | ||||||||||
| View Issue Details | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||
| 0014979 | CMake | (No Category) | public | 2014-06-17 20:00 | 2015-11-02 09:13 | |||||
| Reporter | Nico Schlömer | |||||||||
| Assigned To | Stephen Kelly | |||||||||
| Priority | low | Severity | feature | Reproducibility | have not tried | |||||
| Status | closed | Resolution | duplicate | |||||||
| Platform | OS | OS Version | ||||||||
| Product Version | ||||||||||
| Target Version | Fixed in Version | |||||||||
| Summary | 0014979: build both static and dynamic with cmake arguments | |||||||||
| Description | Right now, to build both the static and the dynamic version of a library, two `add_library` calls have to be present in the respective CMakeLists.txt file, e.g., ``` add_library(MyLib SHARED source1.c source2.c) add_library(MyLibStatic STATIC source1.c source2.c) ``` To control this from the command line, one has the switch `BUILD_SHARED_LIBS` which is set to either on or off. In Debian -- and possibly other distributors too --, you would like to build *both* shared and dynamic versions of all libraries, and that without modifying the software sources. The first option (patch the software to contain both `add_library(... SHARED ...)` and `add_library(... STATIC ...)`) is hence not an option. It seems that configuring the software twice, with BUILD_SHARED_LIBS set to ON and OFF, respectively, is the only option. Is this what CMake developers would recommend, too, or would there be a smarter way of handling things? | |||||||||
| Steps To Reproduce | ||||||||||
| Additional Information | ||||||||||
| Tags | No tags attached. | |||||||||
| Relationships |
| |||||||||
| Attached Files | ||||||||||
| Issue History | ||||||||||
| Date Modified | Username | Field | Change | |||||||
| 2014-06-17 20:00 | Nico Schlömer | New Issue | ||||||||
| 2014-06-19 11:51 | Brad King | Note Added: 0036225 | ||||||||
| 2014-06-19 16:17 | Nico Schlömer | Note Added: 0036230 | ||||||||
| 2014-06-23 10:16 | Brad King | Note Added: 0036232 | ||||||||
| 2015-04-13 13:53 | Stephen Kelly | Relationship added | duplicate of 0004222 | |||||||
| 2015-04-13 13:53 | Stephen Kelly | Status | new => resolved | |||||||
| 2015-04-13 13:53 | Stephen Kelly | Resolution | open => duplicate | |||||||
| 2015-04-13 13:53 | Stephen Kelly | Assigned To | => Stephen Kelly | |||||||
| 2015-11-02 09:13 | Robert Maynard | Note Added: 0039768 | ||||||||
| 2015-11-02 09:13 | Robert Maynard | Status | resolved => closed | |||||||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||