From 364ac7e38613829b7e39cb7f80229f9734fa7a57 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Tue, 9 Sep 2008 13:04:30 -0400 Subject: BUG: fix empty /D option for vs6, fix for 7580 --- Source/cmLocalVisualStudio6Generator.cxx | 9 ++++++++- Templates/EXEHeader.dsptemplate | 8 ++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index b396f22..aa29f04 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/Source/cmLocalVisualStudio6Generator.cxx @@ -1314,6 +1314,13 @@ void cmLocalVisualStudio6Generator } std::string line; + std::string libnameExports; + if(exportSymbol.size()) + { + libnameExports = "/D \""; + libnameExports += exportSymbol; + libnameExports += "\""; + } while(cmSystemTools::GetLineFromStream(fin, line)) { const char* mfcFlag = this->Makefile->GetDefinition("CMAKE_MFC_FLAG"); @@ -1322,7 +1329,7 @@ void cmLocalVisualStudio6Generator mfcFlag = "0"; } cmSystemTools::ReplaceString(line, "OUTPUT_LIBNAME_EXPORTS", - exportSymbol.c_str()); + libnameExports.c_str()); cmSystemTools::ReplaceString(line, "CMAKE_MFC_FLAG", mfcFlag); if(target.GetType() == cmTarget::STATIC_LIBRARY ) diff --git a/Templates/EXEHeader.dsptemplate b/Templates/EXEHeader.dsptemplate index 57c5b5f..cf58f06 100644 --- a/Templates/EXEHeader.dsptemplate +++ b/Templates/EXEHeader.dsptemplate @@ -58,7 +58,7 @@ RSC=rc.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c # ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c -# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS" +# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS # ADD CPP CMAKE_CXX_FLAGS # ADD CPP CMAKE_CXX_FLAGS_RELEASE # ADD BASE RSC /l 0x409 /d "NDEBUG" @@ -88,7 +88,7 @@ CMAKE_CUSTOM_RULE_CODE_RELEASE # PROP Target_Dir "" # ADD BASE CPP /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /GZ /c # ADD CPP /nologo /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /GZ /c -# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS" +# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS # ADD CPP CMAKE_CXX_FLAGS # ADD CPP CMAKE_CXX_FLAGS_DEBUG # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 @@ -119,7 +119,7 @@ CMAKE_CUSTOM_RULE_CODE_DEBUG # PROP Target_Dir "" # ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c # ADD CPP /nologo /D "WIN32" BUILD_INCLUDES EXTRA_DEFINES /D "NDEBUG" /D "_CONSOLE" /FD /c -# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS" +# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS # ADD CPP CMAKE_CXX_FLAGS # ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL # ADD BASE RSC /l 0x409 /d "NDEBUG" @@ -149,7 +149,7 @@ CMAKE_CUSTOM_RULE_CODE_MINSIZEREL # PROP Target_Dir "" # ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c # ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c -# ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS" +# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS # ADD CPP CMAKE_CXX_FLAGS # ADD CPP CMAKE_CXX_FLAGS_RELWITHDEBINFO # ADD BASE RSC /l 0x409 /d "NDEBUG" -- cgit v0.12