BUG: Do not recognize preprocessor definition flags for the linker which has no preprocessor but does have flags starting with /D.

This commit is contained in:
Brad King 2007-08-01 11:39:51 -04:00
parent e0fc8b2995
commit ecff1c37da
1 changed files with 3 additions and 2 deletions

View File

@ -405,6 +405,7 @@ private:
// Unrecognized flags that get no special handling. // Unrecognized flags that get no special handling.
cmStdString FlagString; cmStdString FlagString;
Tool CurrentTool;
bool DoingDefine; bool DoingDefine;
cmVS7FlagTable const* FlagTable; cmVS7FlagTable const* FlagTable;
cmVS7FlagTable const* ExtraFlagTable; cmVS7FlagTable const* ExtraFlagTable;
@ -1630,6 +1631,7 @@ std::string cmLocalVisualStudio7Generator
cmLocalVisualStudio7GeneratorOptions cmLocalVisualStudio7GeneratorOptions
::cmLocalVisualStudio7GeneratorOptions(Tool tool, ::cmLocalVisualStudio7GeneratorOptions(Tool tool,
cmVS7FlagTable const* extraTable): cmVS7FlagTable const* extraTable):
CurrentTool(tool),
DoingDefine(false), FlagTable(0), ExtraFlagTable(extraTable) DoingDefine(false), FlagTable(0), ExtraFlagTable(extraTable)
{ {
// Choose the flag table for the requested tool. // Choose the flag table for the requested tool.
@ -1728,8 +1730,7 @@ void cmLocalVisualStudio7GeneratorOptions::HandleFlag(const char* flag)
if(flag[0] == '-' || flag[0] == '/') if(flag[0] == '-' || flag[0] == '/')
{ {
// Look for preprocessor definitions. // Look for preprocessor definitions.
if(flag[1] == 'D' && strncmp(flag+1, "DEF:", 4) !=0 if(this->CurrentTool == Compiler && flag[1] == 'D')
&& strcmp(flag+1, "DLL") != 0)
{ {
if(flag[2] == '\0') if(flag[2] == '\0')
{ {