From 34853be45a238b700201a8ff0245bfb124e6aded Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Wed, 5 Nov 2003 11:18:15 -0500 Subject: [PATCH] BUG: fix for bug 346, borland should now support dash in the path --- Modules/Platform/Windows-bcc32.cmake | 2 +- Source/cmGlobalBorlandMakefileGenerator.cxx | 7 ------- Source/cmLocalUnixMakefileGenerator.cxx | 10 +++++++++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Modules/Platform/Windows-bcc32.cmake b/Modules/Platform/Windows-bcc32.cmake index e7f5be9d1..b675e5ee1 100644 --- a/Modules/Platform/Windows-bcc32.cmake +++ b/Modules/Platform/Windows-bcc32.cmake @@ -41,7 +41,7 @@ SET(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_LIBRARY}) # create a C++ static library -SET(CMAKE_CXX_CREATE_STATIC_LIBRARY "tlib ${CMAKE_START_TEMP_FILE}/p512 /a ${CMAKE_END_TEMP_FILE}") +SET(CMAKE_CXX_CREATE_STATIC_LIBRARY "tlib ${CMAKE_START_TEMP_FILE}/p512 /a ${CMAKE_END_TEMP_FILE}") # create a C static library SET(CMAKE_C_CREATE_STATIC_LIBRARY ${CMAKE_CXX_CREATE_STATIC_LIBRARY}) diff --git a/Source/cmGlobalBorlandMakefileGenerator.cxx b/Source/cmGlobalBorlandMakefileGenerator.cxx index 685721962..ca99c9276 100644 --- a/Source/cmGlobalBorlandMakefileGenerator.cxx +++ b/Source/cmGlobalBorlandMakefileGenerator.cxx @@ -35,13 +35,6 @@ void cmGlobalBorlandMakefileGenerator::EnableLanguage(const char* l, return; } std::string outdir = m_CMakeInstance->GetStartOutputDirectory(); - if(outdir.find('-') != std::string::npos) - { - std::string message = "The Borland command line tools do not support path names that have - in them. Please re-name your output directory and use _ instead of -."; - message += "\nYour path currently is: "; - message += outdir; - cmSystemTools::Error(message.c_str()); - } mf->AddDefinition("BORLAND", "1"); mf->AddDefinition("CMAKE_GENERATOR_CC", "bcc32"); mf->AddDefinition("CMAKE_GENERATOR_CXX", "bcc32"); diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index 3c23d91cf..82805df1d 100644 --- a/Source/cmLocalUnixMakefileGenerator.cxx +++ b/Source/cmLocalUnixMakefileGenerator.cxx @@ -928,7 +928,15 @@ cmLocalUnixMakefileGenerator::ExpandRuleVariables(std::string& s, cmSystemTools::ReplaceString(s, "", objectsquoted); } if(target) - { + { + std::string targetQuoted = target; + if(targetQuoted.size() && targetQuoted[0] != '\"') + { + targetQuoted = '\"'; + targetQuoted += target; + targetQuoted += '\"'; + } + cmSystemTools::ReplaceString(s, "", targetQuoted.c_str()); cmSystemTools::ReplaceString(s, "", target); } if(targetBase)