Commit 3d96e522 authored by Ken Martin's avatar Ken Martin
Browse files

STYLE: some m_ to this-> cleanup

parent 609af5c9
......@@ -103,7 +103,7 @@ bool cmCTestBuildCommand::InitialPass(
}
const char* ctestBuildCommand
= m_Makefile->GetDefinition("CTEST_BUILD_COMMAND");
= this->Makefile->GetDefinition("CTEST_BUILD_COMMAND");
if ( ctestBuildCommand && *ctestBuildCommand )
{
this->CTest->SetCTestConfiguration("MakeCommand", ctestBuildCommand);
......@@ -111,13 +111,13 @@ bool cmCTestBuildCommand::InitialPass(
else
{
const char* cmakeGeneratorName
= m_Makefile->GetDefinition("CTEST_CMAKE_GENERATOR");
= this->Makefile->GetDefinition("CTEST_CMAKE_GENERATOR");
const char* cmakeProjectName
= m_Makefile->GetDefinition("CTEST_PROJECT_NAME");
= this->Makefile->GetDefinition("CTEST_PROJECT_NAME");
const char* cmakeBuildConfiguration
= m_Makefile->GetDefinition("CTEST_BUILD_CONFIGURATION");
= this->Makefile->GetDefinition("CTEST_BUILD_CONFIGURATION");
const char* cmakeBuildAdditionalFlags
= m_Makefile->GetDefinition("CTEST_BUILD_FLAGS");
= this->Makefile->GetDefinition("CTEST_BUILD_FLAGS");
if ( cmakeGeneratorName && *cmakeGeneratorName &&
cmakeProjectName && *cmakeProjectName )
{
......@@ -137,12 +137,12 @@ bool cmCTestBuildCommand::InitialPass(
if ( !this->GlobalGenerator )
{
this->GlobalGenerator =
m_Makefile->GetCMakeInstance()->CreateGlobalGenerator(
this->Makefile->GetCMakeInstance()->CreateGlobalGenerator(
cmakeGeneratorName);
}
this->GlobalGenerator->FindMakeProgram(m_Makefile);
this->GlobalGenerator->FindMakeProgram(this->Makefile);
const char* cmakeMakeProgram
= m_Makefile->GetDefinition("CMAKE_MAKE_PROGRAM");
= this->Makefile->GetDefinition("CMAKE_MAKE_PROGRAM");
std::string buildCommand
= this->GlobalGenerator->GenerateBuildCommand(cmakeMakeProgram,
cmakeProjectName,
......@@ -166,7 +166,7 @@ bool cmCTestBuildCommand::InitialPass(
{
cmOStringStream str;
str << res;
m_Makefile->AddDefinition(res_var, str.str().c_str());
this->Makefile->AddDefinition(res_var, str.str().c_str());
}
return true;
}
......
......@@ -92,7 +92,7 @@ bool cmCTestConfigureCommand::InitialPass(
}
else
{
source_dir = m_Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY");
source_dir = this->Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY");
}
if ( build_dir )
......@@ -101,7 +101,7 @@ bool cmCTestConfigureCommand::InitialPass(
}
else
{
build_dir = m_Makefile->GetDefinition("CTEST_BINARY_DIRECTORY");
build_dir = this->Makefile->GetDefinition("CTEST_BINARY_DIRECTORY");
if ( !build_dir )
{
this->SetError("Build directory not specified. Either use BUILD "
......@@ -113,7 +113,7 @@ bool cmCTestConfigureCommand::InitialPass(
const char* ctestConfigureCommand
= m_Makefile->GetDefinition("CTEST_CONFIGURE_COMMAND");
= this->Makefile->GetDefinition("CTEST_CONFIGURE_COMMAND");
if ( ctestConfigureCommand && *ctestConfigureCommand )
{
this->CTest->SetCTestConfiguration("ConfigureCommand",
......@@ -122,7 +122,7 @@ bool cmCTestConfigureCommand::InitialPass(
else
{
const char* cmakeGeneratorName
= m_Makefile->GetDefinition("CTEST_CMAKE_GENERATOR");
= this->Makefile->GetDefinition("CTEST_CMAKE_GENERATOR");
if ( cmakeGeneratorName && *cmakeGeneratorName )
{
std::string cmakeConfigureCommand = "\"";
......@@ -157,7 +157,7 @@ bool cmCTestConfigureCommand::InitialPass(
{
cmOStringStream str;
str << res;
m_Makefile->AddDefinition(res_var, str.str().c_str());
this->Makefile->AddDefinition(res_var, str.str().c_str());
}
return true;
}
......
......@@ -74,7 +74,7 @@ bool cmCTestCoverageCommand::InitialPass(
this->CTest->SetCTestConfiguration("BuildDirectory", build_dir);
}
this->CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile,
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"CoverageCommand", "CTEST_COVERAGE_COMMAND");
cmCTestGenericHandler* handler
......@@ -92,7 +92,7 @@ bool cmCTestCoverageCommand::InitialPass(
{
cmOStringStream str;
str << res;
m_Makefile->AddDefinition(res_var, str.str().c_str());
this->Makefile->AddDefinition(res_var, str.str().c_str());
}
cmSystemTools::ChangeDirectory(current_dir.c_str());
return true;
......
......@@ -81,7 +81,7 @@ bool cmCTestHandlerCommand::InitialPass(
{
cmOStringStream str;
str << res;
m_Makefile->AddDefinition(
this->Makefile->AddDefinition(
this->Values[ct_RETURN_VALUE], str.str().c_str());
}
cmSystemTools::ChangeDirectory(current_dir.c_str());
......
......@@ -25,11 +25,11 @@ cmCTestGenericHandler* cmCTestMemCheckCommand::InitializeActualHandler()
cmCTestGenericHandler* handler
= this->CTest->GetInitializedHandler("memcheck");
this->CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile,
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"MemoryCheckCommand", "CTEST_MEMORYCHECK_COMMAND");
this->CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile,
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"MemoryCheckCommandOptions", "CTEST_MEMORYCHECK_COMMAND_OPTIONS");
this->CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile,
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"MemoryCheckSuppressionFile", "CTEST_MEMORYCHECK_SUPPRESSIONS_FILE");
return handler;
......
......@@ -48,11 +48,11 @@ bool cmCTestStartCommand::InitialPass(
}
if ( !src_dir )
{
src_dir = m_Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY");
src_dir = this->Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY");
}
if ( !bld_dir)
{
bld_dir = m_Makefile->GetDefinition("CTEST_BINARY_DIRECTORY");
bld_dir = this->Makefile->GetDefinition("CTEST_BINARY_DIRECTORY");
}
if ( !src_dir )
{
......@@ -75,7 +75,7 @@ bool cmCTestStartCommand::InitialPass(
<< " Source directory: " << src_dir << std::endl
<< " Build directory: " << bld_dir << std::endl);
m_Makefile->AddDefinition("CTEST_RUN_CURRENT_SCRIPT", "OFF");
this->Makefile->AddDefinition("CTEST_RUN_CURRENT_SCRIPT", "OFF");
this->CTest->SetSuppressUpdatingCTestConfiguration(true);
int model = this->CTest->GetTestModelFromString(smodel);
this->CTest->SetTestModel(model);
......
......@@ -53,13 +53,13 @@ bool cmCTestSubmitCommand::InitialPass(
}
const char* ctestDropMethod
= m_Makefile->GetDefinition("CTEST_DROP_METHOD");
= this->Makefile->GetDefinition("CTEST_DROP_METHOD");
const char* ctestDropSite
= m_Makefile->GetDefinition("CTEST_DROP_SITE");
= this->Makefile->GetDefinition("CTEST_DROP_SITE");
const char* ctestDropLocation
= m_Makefile->GetDefinition("CTEST_DROP_LOCATION");
= this->Makefile->GetDefinition("CTEST_DROP_LOCATION");
const char* ctestTriggerSite
= m_Makefile->GetDefinition("CTEST_TRIGGER_SITE");
= this->Makefile->GetDefinition("CTEST_TRIGGER_SITE");
if ( !ctestDropMethod )
{
......@@ -86,15 +86,15 @@ bool cmCTestSubmitCommand::InitialPass(
this->CTest->SetCTestConfiguration("DropLocation", ctestDropLocation);
this->CTest->SetCTestConfiguration("TriggerSite", ctestTriggerSite);
this->CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile,
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"DropSiteUser", "CTEST_DROP_SITE_USER");
this->CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile,
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"DropSitePassword", "CTEST_DROP_SITE_PASSWORD");
this->CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile,
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"ScpCommand", "CTEST_SCP_COMMAND");
const char* notesFilesVariable
= m_Makefile->GetDefinition("CTEST_NOTES_FILES");
= this->Makefile->GetDefinition("CTEST_NOTES_FILES");
if (notesFilesVariable)
{
std::vector<std::string> notesFiles;
......@@ -110,7 +110,7 @@ bool cmCTestSubmitCommand::InitialPass(
this->CTest->GenerateNotesFile(newNotesFiles);
}
const char* extraFilesVariable
= m_Makefile->GetDefinition("CTEST_EXTRA_SUBMIT_FILES");
= this->Makefile->GetDefinition("CTEST_EXTRA_SUBMIT_FILES");
if (extraFilesVariable)
{
std::vector<std::string> extraFiles;
......@@ -142,7 +142,7 @@ bool cmCTestSubmitCommand::InitialPass(
{
cmOStringStream str;
str << res;
m_Makefile->AddDefinition(res_var, str.str().c_str());
this->Makefile->AddDefinition(res_var, str.str().c_str());
}
return true;
}
......
......@@ -30,7 +30,8 @@ cmCTestTestCommand::cmCTestTestCommand()
cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler()
{
const char* ctestTimeout = m_Makefile->GetDefinition("CTEST_TEST_TIMEOUT");
const char* ctestTimeout =
this->Makefile->GetDefinition("CTEST_TEST_TIMEOUT");
double timeout = this->CTest->GetTimeOut();
if ( ctestTimeout )
{
......
......@@ -111,7 +111,7 @@ bool cmCTestSubdirCommand::InitialPass(std::vector<std::string> const& args)
}
fname += "/";
fname += testFilename;
bool readit = m_Makefile->ReadListFile( m_Makefile->GetCurrentListFile(),
bool readit = this->Makefile->ReadListFile( this->Makefile->GetCurrentListFile(),
fname.c_str());
cmSystemTools::ChangeDirectory(cwd.c_str());
if(!readit)
......
......@@ -69,24 +69,24 @@ bool cmCTestUpdateCommand::InitialPass(
}
}
this->CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile,
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"UpdateCommand", "CTEST_UPDATE_COMMAND");
this->CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile,
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"UpdateOptions", "CTEST_UPDATE_OPTIONS");
this->CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile,
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"CVSCommand", "CTEST_CVS_COMMAND");
this->CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile,
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"CVSUpdateOptions", "CTEST_CVS_UPDATE_OPTIONS");
this->CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile,
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"SVNCommand", "CTEST_SVN_COMMAND");
this->CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile,
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
"SVNUpdateOptions", "CTEST_SVN_UPDATE_OPTIONS");
const char* initialCheckoutCommand
= m_Makefile->GetDefinition("CTEST_CHECKOUT_COMMAND");
= this->Makefile->GetDefinition("CTEST_CHECKOUT_COMMAND");
if ( !initialCheckoutCommand )
{
initialCheckoutCommand = m_Makefile->GetDefinition("CTEST_CVS_CHECKOUT");
initialCheckoutCommand = this->Makefile->GetDefinition("CTEST_CVS_CHECKOUT");
}
cmCTestGenericHandler* handler
......@@ -126,7 +126,7 @@ bool cmCTestUpdateCommand::InitialPass(
{
cmOStringStream str;
str << res;
m_Makefile->AddDefinition(res_var, str.str().c_str());
this->Makefile->AddDefinition(res_var, str.str().c_str());
}
return true;
}
......
......@@ -131,7 +131,7 @@ bool cmAddCustomCommandCommand::InitialPass(
case doing_outputs:
if (!cmSystemTools::FileIsFullPath(copy.c_str()))
{
filename = m_Makefile->GetStartDirectory();
filename = this->Makefile->GetStartDirectory();
filename += "/";
}
filename += copy;
......@@ -218,14 +218,14 @@ bool cmAddCustomCommandCommand::InitialPass(
{
// Source is empty, use the target.
std::vector<std::string> no_depends;
m_Makefile->AddCustomCommandToTarget(target.c_str(), no_depends,
this->Makefile->AddCustomCommandToTarget(target.c_str(), no_depends,
commandLines, cctype,
comment.c_str(), working.c_str());
}
else if(target.empty())
{
// Target is empty, use the output.
m_Makefile->AddCustomCommandToOutput(output.c_str(), depends,
this->Makefile->AddCustomCommandToOutput(output.c_str(), depends,
main_dependency.c_str(),
commandLines, comment.c_str(),
working.c_str());
......@@ -233,7 +233,7 @@ bool cmAddCustomCommandCommand::InitialPass(
else
{
// Use the old-style mode for backward compatibility.
m_Makefile->AddCustomCommandOldStyle(target.c_str(), outputs, depends,
this->Makefile->AddCustomCommandOldStyle(target.c_str(), outputs, depends,
source.c_str(), commandLines,
comment.c_str());
}
......
......@@ -119,9 +119,9 @@ bool cmAddCustomTargetCommand::InitialPass(
// Add the utility target to the makefile.
const char* no_output = 0;
m_Makefile->AddUtilityCommand(args[0].c_str(), all, no_output,
working_directory.c_str(), depends,
commandLines);
this->Makefile->AddUtilityCommand(args[0].c_str(), all, no_output,
working_directory.c_str(), depends,
commandLines);
return true;
}
......@@ -29,7 +29,7 @@ bool cmAddDefinitionsCommand::InitialPass(
for(std::vector<std::string>::const_iterator i = args.begin();
i != args.end(); ++i)
{
m_Makefile->AddDefineFlag(i->c_str());
this->Makefile->AddDefineFlag(i->c_str());
}
return true;
}
......
......@@ -28,7 +28,7 @@ bool cmAddDependenciesCommand::InitialPass(
std::string target_name = args[0];
cmTargets &tgts = m_Makefile->GetTargets();
cmTargets &tgts = this->Makefile->GetTargets();
if (tgts.find(target_name) != tgts.end())
{
std::vector<std::string>::const_iterator s = args.begin();
......
......@@ -56,7 +56,7 @@ bool cmAddExecutableCommand::InitialPass(std::vector<std::string> const& args)
}
std::vector<std::string> srclists(s, args.end());
cmTarget* tgt = m_Makefile->AddExecutable(exename.c_str(), srclists);
cmTarget* tgt = this->Makefile->AddExecutable(exename.c_str(), srclists);
if ( use_win32 )
{
tgt->SetProperty("WIN32_EXECUTABLE", "ON");
......
......@@ -27,11 +27,11 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args)
// Library type defaults to value of BUILD_SHARED_LIBS, if it exists,
// otherwise it defaults to static library.
int shared =
!cmSystemTools::IsOff(m_Makefile->GetDefinition("BUILD_SHARED_LIBS"));
!cmSystemTools::IsOff(this->Makefile->GetDefinition("BUILD_SHARED_LIBS"));
std::vector<std::string>::const_iterator s = args.begin();
m_LibName = *s;
this->LibName = *s;
++s;
......@@ -74,7 +74,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args)
++s;
}
m_Makefile->AddLibrary(m_LibName.c_str(), shared, srclists);
this->Makefile->AddLibrary(this->LibName.c_str(), shared, srclists);
return true;
}
......
......@@ -75,7 +75,7 @@ public:
cmTypeMacro(cmAddLibraryCommand, cmCommand);
private:
std::string m_LibName;
std::string LibName;
};
......
......@@ -55,7 +55,7 @@ bool cmAddSubDirectoryCommand::InitialPass(std::vector<std::string> const& args)
// check for relative arguments
bool relativeSource = true;
std::string binPath = binArg;
std::string srcPath = std::string(m_Makefile->GetCurrentDirectory()) +
std::string srcPath = std::string(this->Makefile->GetCurrentDirectory()) +
"/" + srcArg;
// if the path does not exist then the arg was relative
if (!cmSystemTools::FileIsDirectory(srcPath.c_str()))
......@@ -79,7 +79,7 @@ bool cmAddSubDirectoryCommand::InitialPass(std::vector<std::string> const& args)
{
if (!cmSystemTools::FileIsFullPath(binPath.c_str()))
{
binPath = std::string(m_Makefile->GetCurrentOutputDirectory()) +
binPath = std::string(this->Makefile->GetCurrentOutputDirectory()) +
"/" + binArg.c_str();
}
}
......@@ -89,7 +89,7 @@ bool cmAddSubDirectoryCommand::InitialPass(std::vector<std::string> const& args)
// if the srcArg was relative then we just do the same for the binPath
if (relativeSource)
{
binPath = std::string(m_Makefile->GetCurrentOutputDirectory()) +
binPath = std::string(this->Makefile->GetCurrentOutputDirectory()) +
"/" + srcArg;
}
// otherwise we try to remove the CurrentDirectory from the srcPath and
......@@ -101,18 +101,18 @@ bool cmAddSubDirectoryCommand::InitialPass(std::vector<std::string> const& args)
// try replacing the home dir with the home output dir
binPath = srcPath;
if (!cmSystemTools::FindLastString(binPath.c_str(),
m_Makefile->GetHomeDirectory()))
this->Makefile->GetHomeDirectory()))
{
this->SetError("A full source directory was specified that is not in the source tree but no binary directory was specified. If you specify an out of tree source directory then you must provide the binary directory as well.");
return false;
}
cmSystemTools::ReplaceString(binPath,m_Makefile->GetHomeDirectory(),
m_Makefile->GetHomeOutputDirectory());
cmSystemTools::ReplaceString(binPath,this->Makefile->GetHomeDirectory(),
this->Makefile->GetHomeOutputDirectory());
}
}
// now we have all the arguments
m_Makefile->AddSubDirectory(srcPath.c_str(), binPath.c_str(),
this->Makefile->AddSubDirectory(srcPath.c_str(), binPath.c_str(),
intoplevel, false, true);
return true;
......
......@@ -42,7 +42,7 @@ bool cmAddTestCommand::InitialPass(std::vector<std::string> const& args)
arguments.push_back(*it);
}
cmTest* test = m_Makefile->CreateTest(args[0].c_str());
cmTest* test = this->Makefile->CreateTest(args[0].c_str());
test->SetCommand(args[1].c_str());
test->SetArguments(arguments);
......
......@@ -30,13 +30,13 @@ bool cmAuxSourceDirectoryCommand::InitialPass(std::vector<std::string> const& ar
std::string sourceListValue;
std::string templateDirectory = args[0];
m_Makefile->AddExtraDirectory(templateDirectory.c_str());
std::string tdir = m_Makefile->GetCurrentDirectory();
this->Makefile->AddExtraDirectory(templateDirectory.c_str());
std::string tdir = this->Makefile->GetCurrentDirectory();
tdir += "/";
tdir += templateDirectory;
// was the list already populated
const char *def = m_Makefile->GetDefinition(args[1].c_str());
const char *def = this->Makefile->GetDefinition(args[1].c_str());
if (def)
{
sourceListValue = def;
......@@ -58,9 +58,9 @@ bool cmAuxSourceDirectoryCommand::InitialPass(std::vector<std::string> const& ar
file = file.substr(0, dotpos);
// Process only source files
if( file.size() != 0
&& std::find( m_Makefile->GetSourceExtensions().begin(),
m_Makefile->GetSourceExtensions().end(), ext )
!= m_Makefile->GetSourceExtensions().end() )
&& std::find( this->Makefile->GetSourceExtensions().begin(),
this->Makefile->GetSourceExtensions().end(), ext )
!= this->Makefile->GetSourceExtensions().end() )
{
std::string fullname = templateDirectory;
fullname += "/";
......@@ -68,11 +68,11 @@ bool cmAuxSourceDirectoryCommand::InitialPass(std::vector<std::string> const& ar
// add the file as a class file so
// depends can be done
cmSourceFile cmfile;
cmfile.SetName(fullname.c_str(), m_Makefile->GetCurrentDirectory(),
m_Makefile->GetSourceExtensions(),
m_Makefile->GetHeaderExtensions());
cmfile.SetName(fullname.c_str(), this->Makefile->GetCurrentDirectory(),
this->Makefile->GetSourceExtensions(),
this->Makefile->GetHeaderExtensions());
cmfile.SetProperty("ABSTRACT","0");
m_Makefile->AddSource(cmfile);
this->Makefile->AddSource(cmfile);
if (sourceListValue.size() > 0)
{
sourceListValue += ";";
......@@ -84,7 +84,7 @@ bool cmAuxSourceDirectoryCommand::InitialPass(std::vector<std::string> const& ar
}
}
}
m_Makefile->AddDefinition(args[1].c_str(), sourceListValue.c_str());
this->Makefile->AddDefinition(args[1].c_str(), sourceListValue.c_str());
return true;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment