mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 12:09:48 +00:00
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"))
|
||||
{
|
||||
this->WriteString("<Lib>\n", 2);
|
||||
cmVisualStudioGeneratorOptions
|
||||
libOptions(this->LocalGenerator,
|
||||
10, cmVisualStudioGeneratorOptions::Compiler,
|
||||
cmVS10LibFlagTable, 0, this);
|
||||
cmVisualStudioGeneratorOptions
|
||||
libOptions(this->LocalGenerator, 10,
|
||||
cmVisualStudioGeneratorOptions::Linker,
|
||||
cmVS10LibFlagTable, 0, this);
|
||||
libOptions.Parse(libflags);
|
||||
libOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
|
||||
libOptions.OutputFlagMap(*this->BuildFileStream, " ");
|
||||
@ -1023,10 +1023,10 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const&
|
||||
flags += " ";
|
||||
flags += targetLinkFlags;
|
||||
}
|
||||
cmVisualStudioGeneratorOptions
|
||||
linkOptions(this->LocalGenerator,
|
||||
10, cmVisualStudioGeneratorOptions::Compiler,
|
||||
cmVS10LinkFlagTable);
|
||||
cmVisualStudioGeneratorOptions
|
||||
linkOptions(this->LocalGenerator, 10,
|
||||
cmVisualStudioGeneratorOptions::Linker,
|
||||
cmVS10LinkFlagTable, 0, this);
|
||||
if ( this->Target->GetPropertyAsBool("WIN32_EXECUTABLE") )
|
||||
{
|
||||
flags += " /SUBSYSTEM:WINDOWS";
|
||||
|
Loading…
Reference in New Issue
Block a user