diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2000-09-01 14:43:10 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2000-09-01 14:43:10 (GMT) |
commit | e2ad65d3c27177b8f3ee3c9b81382ea883a3bfbd (patch) | |
tree | f5cab775c20188328fd1e3b0d0d5b98a21d596c7 | |
parent | c5e7d5a7963762ab5998e4d0a0edff826c85c6ea (diff) | |
download | CMake-e2ad65d3c27177b8f3ee3c9b81382ea883a3bfbd.zip CMake-e2ad65d3c27177b8f3ee3c9b81382ea883a3bfbd.tar.gz CMake-e2ad65d3c27177b8f3ee3c9b81382ea883a3bfbd.tar.bz2 |
BUG: fix release build on windows
-rw-r--r-- | Source/EXEHeader.dsptemplate | 10 | ||||
-rw-r--r-- | Source/cmSystemTools.cxx | 12 |
2 files changed, 11 insertions, 11 deletions
diff --git a/Source/EXEHeader.dsptemplate b/Source/EXEHeader.dsptemplate index 239cef3..8bf2f0b 100644 --- a/Source/EXEHeader.dsptemplate +++ b/Source/EXEHeader.dsptemplate @@ -54,10 +54,8 @@ RSC=rc.exe # PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GR /GX /Zm1000 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GR /GX /Zm1000 /O2 /D "WIN32" BUILD_INCLUDES EXTRA_DEFINES /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE CPP /nologo /W3 /GR /GX /Zm1000 /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /Zm1000 /O2 /D "WIN32" BUILD_INCLUDES EXTRA_DEFINES /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@@ -79,8 +77,8 @@ LINK32=link.exe # PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
-# ADD BASE CPP /W3 /GR /Zm1000 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /MD /GR /Gm /GX /Zm1000 /ZI /Od /D "WIN32" BUILD_INCLUDES EXTRA_DEFINES /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE CPP /W3 /GR /Zm1000 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /MDd /GR /Gm /GX /Zm1000 /ZI /Od /D "WIN32" BUILD_INCLUDES EXTRA_DEFINES /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 4efb05d..49dc32b 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -40,13 +40,15 @@ void cmSystemTools::ReplaceString(std::string& source, const char* replace, const char* with) { - std::string line = source; - size_t start = line.find(replace); + int lengthReplace = strlen(replace); + std::string rest; + size_t start = source.find(replace); while(start != std::string::npos) { - source = line.substr(0, start); + rest = source.substr(start+lengthReplace); + source = source.substr(0, start); source += with; - source += line.substr(start + strlen(replace)); - start = line.find(replace, start + strlen(replace) ); + source += rest; + start = source.find(replace, start + lengthReplace ); } } |