diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-03-26 17:38:52 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-03-26 17:38:52 (GMT) |
commit | 7fc14a9cb49712f3199f3bb9bd020d6ae5860501 (patch) | |
tree | 4c317ae34aef2e14710d32950b2487a9879308a8 | |
parent | 60d604ae4e1481c139f871c30824490b6036560c (diff) | |
download | CMake-7fc14a9cb49712f3199f3bb9bd020d6ae5860501.zip CMake-7fc14a9cb49712f3199f3bb9bd020d6ae5860501.tar.gz CMake-7fc14a9cb49712f3199f3bb9bd020d6ae5860501.tar.bz2 |
ENH: use ccommand for del on windows
-rw-r--r-- | Source/ccommand.cxx | 9 | ||||
-rw-r--r-- | Source/cmBorlandMakefileGenerator.cxx | 6 | ||||
-rw-r--r-- | Source/cmNMakeMakefileGenerator.cxx | 6 |
3 files changed, 14 insertions, 7 deletions
diff --git a/Source/ccommand.cxx b/Source/ccommand.cxx index 9036ddd..9f32330 100644 --- a/Source/ccommand.cxx +++ b/Source/ccommand.cxx @@ -51,7 +51,14 @@ int main(int ac, char** av) { for ( std::string::size_type cc = 2; cc < args.size(); cc ++ ) { - cmSystemTools::RemoveFile(args[cc].c_str()); + if(args[cc] != "-f") + { + if(args[cc] == "\\-f") + { + args[cc] = "-f"; + } + cmSystemTools::RemoveFile(args[cc].c_str()); + } } return 0; } diff --git a/Source/cmBorlandMakefileGenerator.cxx b/Source/cmBorlandMakefileGenerator.cxx index ee4c3f4..fa69791 100644 --- a/Source/cmBorlandMakefileGenerator.cxx +++ b/Source/cmBorlandMakefileGenerator.cxx @@ -81,8 +81,7 @@ void cmBorlandMakefileGenerator::OutputMakeVariables(std::ostream& fout) "NULL=\n" "!ELSE \n" "NULL=nul\n" - "!ENDIF \n" - "RM = del\n"; + "!ENDIF \n"; std::string buildType = "CMAKE_CXX_FLAGS_"; buildType += m_Makefile->GetDefinition("CMAKE_BUILD_TYPE"); buildType = cmSystemTools::UpperCase(buildType); @@ -99,7 +98,8 @@ void cmBorlandMakefileGenerator::OutputMakeVariables(std::ostream& fout) std::string replaceVars = variables; m_Makefile->ExpandVariablesInString(replaceVars); - + std::string ccommand = m_Makefile->GetDefinition("CCOMMAND_COMMAND"); + fout << "RM = " << this->ConvertToOutputPath(ccommand.c_str()) << " remove -f\n"; std::string ccompiler = m_Makefile->GetDefinition("CMAKE_C_COMPILER"); fout << "CMAKE_C_COMPILER = " << this->ConvertToOutputPath(ccompiler.c_str()) diff --git a/Source/cmNMakeMakefileGenerator.cxx b/Source/cmNMakeMakefileGenerator.cxx index 5e65fc5..e88fc21 100644 --- a/Source/cmNMakeMakefileGenerator.cxx +++ b/Source/cmNMakeMakefileGenerator.cxx @@ -137,8 +137,7 @@ void cmNMakeMakefileGenerator::OutputMakeVariables(std::ostream& fout) "NULL=\n" "!ELSE \n" "NULL=nul\n" - "!ENDIF \n" - "RM = del\n"; + "!ENDIF \n"; std::string buildType = "CMAKE_CXX_FLAGS_"; buildType += m_Makefile->GetDefinition("CMAKE_BUILD_TYPE"); @@ -157,7 +156,8 @@ void cmNMakeMakefileGenerator::OutputMakeVariables(std::ostream& fout) std::string replaceVars = variables; m_Makefile->ExpandVariablesInString(replaceVars); fout << replaceVars.c_str(); - + std::string ccommand = m_Makefile->GetDefinition("CCOMMAND_COMMAND"); + fout << "RM = " << this->ConvertToOutputPath(ccommand.c_str()) << " remove -f\n"; std::string ccompiler = m_Makefile->GetDefinition("CMAKE_C_COMPILER"); fout << "CMAKE_C_COMPILER = " << this->ConvertToOutputPath(ccompiler.c_str()) << "\n"; |