View Issue Details [ Jump to Notes ] | [ Print ] |
ID | Project | Category | View Status | Date Submitted | Last Update |
0012295 | CMake | CMake | public | 2011-06-21 18:11 | 2014-05-23 16:49 |
|
Reporter | Ben Medina | |
Assigned To | Brad King | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | no change required | |
Platform | | OS | Windows | OS Version | 7 |
Product Version | CMake 2.8.4 | |
Target Version | | Fixed in Version | | |
|
Summary | 0012295: LINK_FLAGS_RELEASE has no effect on static libraries for MSVC generators |
Description | Setting the LINK_FLAGS_RELEASE target property does not effect the output from the MSVC generators for static libraries. |
Steps To Reproduce | 1. Use CMake to generate project files for the attached project. I've tried the Visual Studio 2008 and 2010 generators.
2. Build the project in release mode. The following warning will be generated for the static library, but not the shared library:
a.obj : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance |
Additional Information | The cmake code attempts to add /LTCG to the LINK_FLAGS_RELEASE for both libraries. It does get added to the shared library, but not the static library. You can verify this in the Visual Studio GUI by going to project properties for the static library, and checking Configuration Properties>Librarian>General. The last entry is Link Time Code Generation, which is expected to be set to "Yes (/LTCG)". |
Tags | c++, msvc |
|
Attached Files | link_test.zip [^] (663 bytes) 2011-06-21 18:11 |
|