summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx46
1 files changed, 30 insertions, 16 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 5ef0a3b..bd6af8c 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -61,12 +61,6 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg,
}
this->Makefile = new cmMakefile(this);
- this->WindowsShell = false;
- this->WindowsVSIDE = false;
- this->WatcomWMake = false;
- this->MinGWMake = false;
- this->NMake = false;
- this->MSYSShell = false;
this->LinkScriptShell = false;
this->IgnoreLibPrefix = false;
this->UseRelativePaths = false;
@@ -1254,7 +1248,7 @@ cmLocalGenerator::ConvertToOutputForExistingCommon(const std::string& remote,
// If this is a windows shell, the result has a space, and the path
// already exists, we can use a short-path to reference it without a
// space.
- if(this->WindowsShell && result.find(' ') != result.npos &&
+ if(this->GlobalGenerator->WindowsShell && result.find(' ') != result.npos &&
cmSystemTools::FileExists(remote.c_str()))
{
std::string tmp;
@@ -2626,7 +2620,7 @@ void cmLocalGenerator::JoinDefines(const std::set<std::string>& defines,
{
// Append the definition with proper escaping.
std::string def = dflag;
- if(this->WatcomWMake)
+ if(this->GlobalGenerator->WatcomWMake)
{
// The Watcom compiler does its own command line parsing instead
// of using the windows shell rules. Definitions are one of
@@ -2805,7 +2799,7 @@ std::string cmLocalGenerator::ConvertToOutputFormat(const std::string& source,
// For the MSYS shell convert drive letters to posix paths, so
// that c:/some/path becomes /c/some/path. This is needed to
// avoid problems with the shell path translation.
- if(this->MSYSShell && !this->LinkScriptShell)
+ if(this->GlobalGenerator->MSYSShell && !this->LinkScriptShell)
{
if(result.size() > 2 && result[1] == ':')
{
@@ -2813,7 +2807,7 @@ std::string cmLocalGenerator::ConvertToOutputFormat(const std::string& source,
result[0] = '/';
}
}
- if(this->WindowsShell)
+ if(this->GlobalGenerator->WindowsShell)
{
std::replace(result.begin(), result.end(), '/', '\\');
}
@@ -3324,6 +3318,26 @@ void cmLocalGenerator::ComputeObjectFilenames(
}
+bool cmLocalGenerator::IsWindowsShell() const
+{
+ return this->GlobalGenerator->WindowsShell;
+}
+
+bool cmLocalGenerator::IsWatcomWMake() const
+{
+ return this->GlobalGenerator->WatcomWMake;
+}
+
+bool cmLocalGenerator::IsMinGWMake() const
+{
+ return this->GlobalGenerator->MinGWMake;
+}
+
+bool cmLocalGenerator::IsNMake() const
+{
+ return this->GlobalGenerator->NMake;
+}
+
//----------------------------------------------------------------------------
std::string
cmLocalGenerator
@@ -3467,7 +3481,7 @@ std::string cmLocalGenerator::EscapeForShell(const std::string& str,
// Compute the flags for the target shell environment.
int flags = 0;
- if(this->WindowsVSIDE)
+ if(this->GlobalGenerator->WindowsVSIDE)
{
flags |= cmsysSystem_Shell_Flag_VSIDE;
}
@@ -3487,27 +3501,27 @@ std::string cmLocalGenerator::EscapeForShell(const std::string& str,
{
flags |= cmsysSystem_Shell_Flag_WatcomQuote;
}
- if(this->WatcomWMake)
+ if(this->GlobalGenerator->WatcomWMake)
{
flags |= cmsysSystem_Shell_Flag_WatcomWMake;
}
- if(this->MinGWMake)
+ if(this->GlobalGenerator->MinGWMake)
{
flags |= cmsysSystem_Shell_Flag_MinGWMake;
}
- if(this->NMake)
+ if(this->GlobalGenerator->NMake)
{
flags |= cmsysSystem_Shell_Flag_NMake;
}
// Compute the buffer size needed.
- int size = (this->WindowsShell ?
+ int size = (this->GlobalGenerator->WindowsShell ?
cmsysSystem_Shell_GetArgumentSizeForWindows(str.c_str(), flags) :
cmsysSystem_Shell_GetArgumentSizeForUnix(str.c_str(), flags));
// Compute the shell argument itself.
std::vector<char> arg(size);
- if(this->WindowsShell)
+ if(this->GlobalGenerator->WindowsShell)
{
cmsysSystem_Shell_GetArgumentForWindows(str.c_str(), &arg[0], flags);
}