Do not parse preprocessor defs for VS 10 link/lib
When constructing cmVisualStudioGeneratorOptions to parse options for tools 'link' and 'lib' the tool type is now Linker, not Compiler. This tells it not to recognize flags starting in '/D' as preprocessor macros, such as the '/DEF:<file>' linker option. See issue #9613.
This commit is contained in:
parent
d6b47bee79
commit
caee3af3c5
@ -951,10 +951,10 @@ void cmVisualStudio10TargetGenerator::WriteLibOptions(std::string const&
|
|||||||
->GetProperty("STATIC_LIBRARY_FLAGS"))
|
->GetProperty("STATIC_LIBRARY_FLAGS"))
|
||||||
{
|
{
|
||||||
this->WriteString("<Lib>\n", 2);
|
this->WriteString("<Lib>\n", 2);
|
||||||
cmVisualStudioGeneratorOptions
|
cmVisualStudioGeneratorOptions
|
||||||
libOptions(this->LocalGenerator,
|
libOptions(this->LocalGenerator, 10,
|
||||||
10, cmVisualStudioGeneratorOptions::Compiler,
|
cmVisualStudioGeneratorOptions::Linker,
|
||||||
cmVS10LibFlagTable, 0, this);
|
cmVS10LibFlagTable, 0, this);
|
||||||
libOptions.Parse(libflags);
|
libOptions.Parse(libflags);
|
||||||
libOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
|
libOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
|
||||||
libOptions.OutputFlagMap(*this->BuildFileStream, " ");
|
libOptions.OutputFlagMap(*this->BuildFileStream, " ");
|
||||||
@ -1023,10 +1023,10 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const&
|
|||||||
flags += " ";
|
flags += " ";
|
||||||
flags += targetLinkFlags;
|
flags += targetLinkFlags;
|
||||||
}
|
}
|
||||||
cmVisualStudioGeneratorOptions
|
cmVisualStudioGeneratorOptions
|
||||||
linkOptions(this->LocalGenerator,
|
linkOptions(this->LocalGenerator, 10,
|
||||||
10, cmVisualStudioGeneratorOptions::Compiler,
|
cmVisualStudioGeneratorOptions::Linker,
|
||||||
cmVS10LinkFlagTable);
|
cmVS10LinkFlagTable, 0, this);
|
||||||
if ( this->Target->GetPropertyAsBool("WIN32_EXECUTABLE") )
|
if ( this->Target->GetPropertyAsBool("WIN32_EXECUTABLE") )
|
||||||
{
|
{
|
||||||
flags += " /SUBSYSTEM:WINDOWS";
|
flags += " /SUBSYSTEM:WINDOWS";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user