MantisBT - CMake |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0012348 | CMake | CMake | public | 2011-07-18 09:48 | 2016-06-10 14:31 |
|
Reporter | Dan Thill | |
Assigned To | Kitware Robot | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | moved | |
Platform | Windows | OS | Windows XP-64 SP2 | OS Version | 5.2.3790 |
Product Version | CMake 2.8.5 | |
Target Version | | Fixed in Version | | |
|
Summary | 0012348: Setting CMAKE_CXX_CREATE_STATIC_LIBRARY has no effect in VS2008 |
Description | Overriding the CMAKE_CXX_CREATE_STATIC_LIBRARY rule doesn't seem to have any effect when generating a 64-bit VS2008 project. I am attempting to add the /LTCG (link time code generation) on a global basis. I've trolled the lists and bug tracker quite a bit and I'm not the only one who has had problems with this.
|
Steps To Reproduce | 1) Create a simple static library using ADD_LIBRARY( libname STATIC [files])
2) Modify CMAKE_CXX_CREATE_STATIC_LIBRARY, e.g., add link time code generation:
STRING( REPLACE "/nologo" "/nologo /LTCG" CMAKE_CXX_CREATE_STATIC_LIBRARY ${CMAKE_CXX_CREATE_STATIC_LIBRARY})
3) Inspect the generated project properties ( Configuration Properties -> Librarian -> Command Line )and see that the command line is still "/OUT:"[xxxx]" /NOLOGO".
|
Additional Information | As a test, I manually added "/LTCG" to to the original CMAKE_CXX_CREATE_STATIC_LIBRARY value in Platform/cl.cmake. During configuration, printing the value of CMAKE_CXX_CREATE_STATIC_LIBRARY shows the expected value. But the flag does not appear in the generated .vcproj file. It's as if the project file generator is using a hardcoded value.
I am aware of the STATIC_LIBRARY_FLAGS and STATIC_LIBRARY_FLAGS_* target properties and they work correctly, but I'd prefer to not have to add (what should be) a global compiler setting explicitly on every static library in my project (of which there are dozens), or override/create my own ADD_LIBRARY macro. |
Tags | No tags attached. |
Relationships | |
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2011-07-18 09:48 | Dan Thill | New Issue | |
2011-07-29 15:01 | | Source_changeset_attached | => VTK master 87705c2f |
2012-08-11 11:38 | David Cole | Status | new => backlog |
2012-08-11 11:38 | David Cole | Note Added: 0030287 | |
2016-06-10 14:28 | Kitware Robot | Note Added: 0041864 | |
2016-06-10 14:28 | Kitware Robot | Status | backlog => resolved |
2016-06-10 14:28 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:28 | Kitware Robot | Assigned To | => Kitware Robot |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |