summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-03-14 19:58:28 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-03-14 19:58:28 (GMT)
commit15d365cdddf67fad82f80b1b0a028a6c1df2f6a3 (patch)
treecb8de571c2c4e5e8a2e14a22fd7be9d2e37f493e
parent567edf0e9a8f4dcaa82ceb0ae6a586867e3687f5 (diff)
downloadCMake-15d365cdddf67fad82f80b1b0a028a6c1df2f6a3.zip
CMake-15d365cdddf67fad82f80b1b0a028a6c1df2f6a3.tar.gz
CMake-15d365cdddf67fad82f80b1b0a028a6c1df2f6a3.tar.bz2
BUG: fix for files with dashes in them
-rw-r--r--Source/cmNMakeMakefileGenerator.cxx8
-rw-r--r--Source/cmNMakeMakefileGenerator.h3
2 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmNMakeMakefileGenerator.cxx b/Source/cmNMakeMakefileGenerator.cxx
index 5cf1385..5e65fc5 100644
--- a/Source/cmNMakeMakefileGenerator.cxx
+++ b/Source/cmNMakeMakefileGenerator.cxx
@@ -711,3 +711,11 @@ std::string cmNMakeMakefileGenerator::ConvertToOutputPath(const char* s)
{
return cmSystemTools::ConvertToOutputPath(s);
}
+
+
+std::string cmNMakeMakefileGenerator::CreateMakeVariable(const char* s, const char* s2)
+{
+ std::string ret= std::string(s) + std::string(s2);
+ cmSystemTools::ReplaceString(ret, "-", "_");
+ return ret;
+}
diff --git a/Source/cmNMakeMakefileGenerator.h b/Source/cmNMakeMakefileGenerator.h
index e6bbb8f..044d9bb 100644
--- a/Source/cmNMakeMakefileGenerator.h
+++ b/Source/cmNMakeMakefileGenerator.h
@@ -87,6 +87,9 @@ protected:
void SetLibraryPathOption(const char* lib){ m_LibraryPathOption = lib;}
void SetLibraryLinkOption(const char* lib){ m_LibraryLinkOption = lib;}
virtual std::string ConvertToOutputPath(const char* s);
+
+ virtual std::string CreateMakeVariable(const char* s, const char* s2);
+
private:
std::string m_LibraryPathOption;// option to specifiy a link path -LIBPATH
std::string m_LibraryLinkOption; // option to specify a library (like -l, empty for nmake)