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
|
@ -952,8 +952,8 @@ void cmVisualStudio10TargetGenerator::WriteLibOptions(std::string const&
|
|||
{
|
||||
this->WriteString("<Lib>\n", 2);
|
||||
cmVisualStudioGeneratorOptions
|
||||
libOptions(this->LocalGenerator,
|
||||
10, cmVisualStudioGeneratorOptions::Compiler,
|
||||
libOptions(this->LocalGenerator, 10,
|
||||
cmVisualStudioGeneratorOptions::Linker,
|
||||
cmVS10LibFlagTable, 0, this);
|
||||
libOptions.Parse(libflags);
|
||||
libOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
|
||||
|
@ -1024,9 +1024,9 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const&
|
|||
flags += targetLinkFlags;
|
||||
}
|
||||
cmVisualStudioGeneratorOptions
|
||||
linkOptions(this->LocalGenerator,
|
||||
10, cmVisualStudioGeneratorOptions::Compiler,
|
||||
cmVS10LinkFlagTable);
|
||||
linkOptions(this->LocalGenerator, 10,
|
||||
cmVisualStudioGeneratorOptions::Linker,
|
||||
cmVS10LinkFlagTable, 0, this);
|
||||
if ( this->Target->GetPropertyAsBool("WIN32_EXECUTABLE") )
|
||||
{
|
||||
flags += " /SUBSYSTEM:WINDOWS";
|
||||
|
|
Loading…
Reference in New Issue