[cmake-commits] king committed CMakeLists.txt 1.350 1.351
cmGlobalBorlandMakefileGenerator.cxx 1.24 1.25
cmLocalUnixMakefileGenerator3.cxx 1.196 1.197
cmLocalUnixMakefileGenerator3.h 1.67 1.68
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Mar 8 13:05:04 EST 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv13222
Modified Files:
CMakeLists.txt cmGlobalBorlandMakefileGenerator.cxx
cmLocalUnixMakefileGenerator3.cxx
cmLocalUnixMakefileGenerator3.h
Log Message:
ENH: Fixed recursive make call target escaping for Borland to support SubDirSpaces test.
Index: cmLocalUnixMakefileGenerator3.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.h,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- cmLocalUnixMakefileGenerator3.h 8 Mar 2007 16:10:21 -0000 1.67
+++ cmLocalUnixMakefileGenerator3.h 8 Mar 2007 18:05:02 -0000 1.68
@@ -158,6 +158,13 @@
*/
void SetIgnoreLibPrefix(bool s) { this->IgnoreLibPrefix = s; }
+ /**
+ * Set whether passing a make target on a command line requires an
+ * extra level of escapes.
+ */
+ void SetMakeCommandEscapeTargetTwice(bool b)
+ { this->MakeCommandEscapeTargetTwice = b; }
+
// used in writing out Cmake files such as WriteDirectoryInformation
static void WriteCMakeArgument(std::ostream& os, const char* s);
@@ -334,6 +341,7 @@
bool UnixCD;
bool PassMakeflags;
bool SilentNoColon;
+ bool MakeCommandEscapeTargetTwice;
//==========================================================================
std::string HomeRelativeOutputPath;
Index: cmGlobalBorlandMakefileGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalBorlandMakefileGenerator.cxx,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- cmGlobalBorlandMakefileGenerator.cxx 4 Oct 2006 22:52:28 -0000 1.24
+++ cmGlobalBorlandMakefileGenerator.cxx 8 Mar 2007 18:05:02 -0000 1.25
@@ -50,6 +50,7 @@
lg->SetPassMakeflags(true);
lg->SetGlobalGenerator(this);
lg->SetUnixCD(false);
+ lg->SetMakeCommandEscapeTargetTwice(true);
return lg;
}
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CMakeLists.txt,v
retrieving revision 1.350
retrieving revision 1.351
diff -u -d -r1.350 -r1.351
--- CMakeLists.txt 7 Mar 2007 18:01:00 -0000 1.350
+++ CMakeLists.txt 8 Mar 2007 18:05:02 -0000 1.351
@@ -1012,7 +1012,7 @@
# some old versions of make simply cannot handle spaces in paths
IF (MAKE_IS_GNU OR
"${CMAKE_TEST_MAKEPROGRAM}" MATCHES "nmake|gmake|wmake" OR
- "${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio|XCode")
+ "${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio|XCode|Borland")
ADD_TEST(SubDirSpaces ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/SubDirSpaces"
@@ -1028,7 +1028,7 @@
)
ENDIF (MAKE_IS_GNU OR
"${CMAKE_TEST_MAKEPROGRAM}" MATCHES "nmake|gmake|wmake" OR
- "${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio|XCode")
+ "${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio|XCode|Borland")
IF (WIN32)
ADD_TEST(SubDir ${CMAKE_CTEST_COMMAND}
Index: cmLocalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.cxx,v
retrieving revision 1.196
retrieving revision 1.197
diff -u -d -r1.196 -r1.197
--- cmLocalUnixMakefileGenerator3.cxx 8 Mar 2007 16:49:30 -0000 1.196
+++ cmLocalUnixMakefileGenerator3.cxx 8 Mar 2007 18:05:02 -0000 1.197
@@ -53,6 +53,7 @@
this->SkipAssemblySourceRules = false;
this->NativeEchoCommand = "@echo ";
this->NativeEchoWindows = true;
+ this->MakeCommandEscapeTargetTwice = false;
}
//----------------------------------------------------------------------------
@@ -1751,6 +1752,12 @@
// The target may have been written with windows paths.
cmSystemTools::ConvertToOutputSlashes(tgt2);
+ // Escape one extra time if the make tool requires it.
+ if(this->MakeCommandEscapeTargetTwice)
+ {
+ tgt2 = this->EscapeForShell(tgt2.c_str(), true, false);
+ }
+
// The target name is now a string that should be passed verbatim
// on the command line.
cmd += this->EscapeForShell(tgt2.c_str(), true, false);
More information about the Cmake-commits
mailing list