View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012348CMakeCMakepublic2011-07-18 09:482016-06-10 14:31
ReporterDan Thill 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformWindowsOSWindows XP-64 SP2OS Version5.2.3790
Product VersionCMake 2.8.5 
Target VersionFixed in Version 
Summary0012348: Setting CMAKE_CXX_CREATE_STATIC_LIBRARY has no effect in VS2008
DescriptionOverriding 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 Reproduce1) 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 InformationAs 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.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0030287)
David Cole (manager)
2012-08-11 11:38

Sending old, never assigned issues to the backlog.

(The age of the bug, plus the fact that it's never been assigned to anyone means that nobody is actively working on it...)

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing.
(0041864)
Kitware Robot (administrator)
2016-06-10 14:28

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 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


Copyright © 2000 - 2018 MantisBT Team