[cmake-developers] [CMake 0014009]: /LTCG option does not cause LinkTimeCodeGeneration to be set in project file
Mantis Bug Tracker
mantis at public.kitware.com
Wed Mar 13 11:25:29 EDT 2013
The following issue has been SUBMITTED.
======================================================================
http://www.itk.org/Bug/view.php?id=14009
======================================================================
Reported By: Braden McDaniel
Assigned To:
======================================================================
Project: CMake
Issue ID: 14009
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2013-03-13 11:25 EDT
Last Modified: 2013-03-13 11:25 EDT
======================================================================
Summary: /LTCG option does not cause LinkTimeCodeGeneration
to be set in project file
Description:
Adding the /LTCG linker option to LINK_FLAGS or STATIC_LIBRARY_FLAGS should
cause LinkTimeCodeGeneration to be set in the project file. For instance:
<Tool Name="VCLinkerTool" ... LinkTimeCodeGeneration="1" />
This flag has the following forms that correspond to values 1-4 for the
LinkTimeCodeGeneration attribute:
Option XML Attribute Value
---------------------------------------
/LTCG 1
/LTCG:PGINSTRUMENT 2
/LTCG:PGOPTIMIZE 3
/LTCG:PGUPDATE 4
See: http://msdn.microsoft.com/en-us/library/xbf3tbeh.aspx
Steps to Reproduce:
Add /LTCG to the linker (or librarian) using:
foreach(CONFIG _RELEASE _MINSIZEREL _RELWITHDEBINFO)
set_property(TARGET foo APPEND PROPERTY LINK_FLAGS${CONFIG} "/LTCG")
endforeach()
foreach(CONFIG _RELEASE _MINSIZEREL _RELWITHDEBINFO)
set_property(TARGET bar APPEND PROPERTY STATIC_LIBRARY_FLAGS${CONFIG}
"/LTCG")
endforeach()
Generate a Visual Studio project file.
Additional Information:
I'm observing this on Visual Studio 2008. This bug is similar to bug 0010263;
though that bug dealt with the compiler option and this one is about the related
linker option.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2013-03-13 11:25 Braden McDanielNew Issue
======================================================================
More information about the cmake-developers
mailing list