diff options
author | Brad King <brad.king@kitware.com> | 2007-08-01 15:39:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-08-01 15:39:51 (GMT) |
commit | ecff1c37da3963120add420e76fd940ea05edec9 (patch) | |
tree | da464aef99c0bf364a736a609bbb69f4a46809a2 /Source | |
parent | e0fc8b2995932253e3b51aca56024c617662c7bb (diff) | |
download | CMake-ecff1c37da3963120add420e76fd940ea05edec9.zip CMake-ecff1c37da3963120add420e76fd940ea05edec9.tar.gz CMake-ecff1c37da3963120add420e76fd940ea05edec9.tar.bz2 |
BUG: Do not recognize preprocessor definition flags for the linker which has no preprocessor but does have flags starting with /D.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 119f6c7..c4d7a35 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -405,6 +405,7 @@ private: // Unrecognized flags that get no special handling. cmStdString FlagString; + Tool CurrentTool; bool DoingDefine; cmVS7FlagTable const* FlagTable; cmVS7FlagTable const* ExtraFlagTable; @@ -1630,6 +1631,7 @@ std::string cmLocalVisualStudio7Generator cmLocalVisualStudio7GeneratorOptions ::cmLocalVisualStudio7GeneratorOptions(Tool tool, cmVS7FlagTable const* extraTable): + CurrentTool(tool), DoingDefine(false), FlagTable(0), ExtraFlagTable(extraTable) { // Choose the flag table for the requested tool. @@ -1728,8 +1730,7 @@ void cmLocalVisualStudio7GeneratorOptions::HandleFlag(const char* flag) if(flag[0] == '-' || flag[0] == '/') { // Look for preprocessor definitions. - if(flag[1] == 'D' && strncmp(flag+1, "DEF:", 4) !=0 - && strcmp(flag+1, "DLL") != 0) + if(this->CurrentTool == Compiler && flag[1] == 'D') { if(flag[2] == '\0') { |